﻿/* ============================================
   归云阁首页 - 全新设计
   参考 chortle.asia 清新毛玻璃风格
   ============================================ */

/* ---------- Page Shell ---------- */
.home-page {
  min-height: 100vh;
  /* 背景必须透明：body 与 .home-bg-layer（背景图 z0）、天气 canvas（z1）都在它下面，
     这里一旦放不透明背景，首页的背景图和雨雪花瓣就全被盖住了 */
  background: transparent;
  position: relative;
  z-index: 1;
}

/* (Background / fog / sea CSS moved to styles.css for global use) */

/* ---------- Hero Banner ---------- */
.home-hero {
  position: relative;
  padding: 10px 20px 0;
  z-index: 30;
  background: rgba(13, 27, 46, .35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: heroFadeIn .8s ease-out;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.home-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 4px 16px 10px;
}

.home-hero-logo {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
  animation: logoGlow 4s ease-in-out infinite;
}

@keyframes logoGlow {
  0%, 100% { box-shadow: 0 6px 20px rgba(0, 0, 0, .2), 0 0 0 rgba(100, 160, 255, 0); }
  50%      { box-shadow: 0 6px 20px rgba(0, 0, 0, .2), 0 0 18px rgba(100, 160, 255, .18); }
}

.home-hero-logo img {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  object-fit: cover;
}

.home-hero-text h1 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .2);
}

.home-hero-text p {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, .75);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .5px;
}

/* ---------- Navigation ---------- */
.home-nav {
  position: relative;
  z-index: 1;
  display: flex;
  /* 菜单项多时不换行，超出部分横向滚动 */
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 4px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 6px 16px;
  background: rgba(13, 27, 46, .55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255, 255, 255, .1);
  overflow: visible;
}

.home-nav::-webkit-scrollbar { display: none; }
.home-nav > * { flex: 0 0 auto; }

.home-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px 8px 0 0;
  color: rgba(255, 255, 255, .8);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: all .25s cubic-bezier(.22, 1, .36, 1);
  flex-shrink: 0;
  position: relative;
}

.home-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--nav-accent, #5a9ae6);
  border-radius: 1px;
  transition: all .3s cubic-bezier(.22, 1, .36, 1);
  transform: translateX(-50%);
}

.home-nav-link svg,
.home-nav-link img {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  opacity: .7;
}

.home-nav-link img {
  filter: brightness(0) invert(1);
}

.home-nav-link:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
  text-decoration: none;
}

.home-nav-link:hover::after {
  width: 60%;
}

.home-nav-link:hover svg,
.home-nav-link:hover img {
  opacity: 1;
}

.home-nav-link.active {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}

.home-nav-link.active::after {
  width: 80%;
  background: #fff;
}

.home-nav-link.active svg,
.home-nav-link.active img {
  opacity: 1;
}

/* ---------- Drop Line ---------- */
.home-drop-line {
  max-width: 1360px;
  margin: 24px auto;
  padding: 20px 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  z-index: 3;
  border: 1px solid rgba(180, 210, 240, .25);
  box-shadow: 0 4px 20px rgba(40, 80, 140, .06);
}

.home-drop-line-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.home-drop-line-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}

.home-drop-line-header h2 {
  margin: 0;
  color: #1a2a4a;
  font-size: 20px;
  font-weight: 700;
}

.home-drop-line-summary {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 16px;
  border-left: 4px solid #27ae60;
  background: rgba(39, 174, 96, .06);
  border-radius: 0 12px 12px 0;
}

.home-drop-line-summary strong {
  color: #1e8449;
  font-size: 16px;
}

.home-drop-line-summary span {
  color: #4a7a5a;
  font-size: 14px;
}

.home-drop-line-grid {
  display: grid;
  grid-template-columns: repeat(15, minmax(52px, 1fr));
  gap: 6px;
  margin-top: 14px;
}

.home-drop-line-grid > span {
  display: grid;
  min-height: 52px;
  place-items: center;
  align-content: center;
  border: 1px solid;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  transition: transform .15s, box-shadow .15s;
}

.home-drop-line-grid > span:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .1);
}

.home-drop-line-grid small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 400;
}

.home-drop-line-grid .on {
  border-color: rgba(39, 174, 96, .3);
  background: rgba(39, 174, 96, .08);
  color: #1e8449;
}

.home-drop-line-grid .off {
  border-color: rgba(180, 195, 210, .25);
  background: rgba(245, 247, 250, .5);
  color: #8a9aaa;
}

.home-drop-line-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.home-drop-line-tags span {
  padding: 5px 12px;
  border-radius: 16px;
  background: rgba(41, 128, 185, .06);
  color: #2a5a86;
  font-size: 12px;
  font-weight: 500;
}

.home-drop-line-note {
  margin: 10px 0 0;
  color: #8a7a4a;
  font-size: 12px;
}

/* ---------- Sponsor / Friend Links ---------- */
.home-sponsors {
  margin-top: 16px;
}

.home-sponsors-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px 8px;
}
.home-sponsors-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #173f6c;
}
.home-sponsors-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #dff4e8;
  color: #278356;
  font-weight: 800;
  letter-spacing: .5px;
}

.home-sponsor-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.home-sponsor-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(246, 250, 255, .72);
  border: 1px solid rgba(141, 178, 214, .28);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.home-sponsor-item:hover {
  transform: translateX(3px);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 2px 10px rgba(33, 118, 202, .15);
}

.home-sponsor-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.home-sponsor-logo[data-tone="blue"]  { background: linear-gradient(135deg, #4a8fd8, #2670bd); }
.home-sponsor-logo[data-tone="pink"]  { background: linear-gradient(135deg, #ff7eb3, #d6427a); }
.home-sponsor-logo[data-tone="green"] { background: linear-gradient(135deg, #6ec188, #278356); }
.home-sponsor-logo[data-tone="amber"] { background: linear-gradient(135deg, #f5b461, #d6883a); }

.home-sponsor-title {
  font-size: 13px;
  font-weight: 700;
  color: #173f6c;
}

/* Featured sponsor card */
/* 广告位暂不招租时加 .is-hidden 隐藏，去掉这个类即可恢复 */
.home-sponsor-featured.is-hidden {
  display: none;
}

.home-sponsor-featured {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(246, 250, 255, .78);
  border: 1px solid rgba(141, 178, 214, .28);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.home-sponsor-featured:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(33, 118, 202, .18);
}

.home-sponsor-featured-banner {
  height: 84px;
  background: linear-gradient(135deg, #4a8fd8 0%, #6bb6ff 50%, #dff4e8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 3px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .15);
}

.home-sponsor-featured-title {
  margin: 12px 14px 4px;
  font-size: 15px;
  font-weight: 700;
  color: #173f6c;
}
.home-sponsor-featured-desc {
  margin: 0 14px 28px;
  font-size: 12px;
  line-height: 1.55;
  color: #617d98;
}

.home-sponsor-tag {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .92);
  color: #bd4733;
  font-weight: 800;
  letter-spacing: .5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

/* ---------- Card Stagger Animation ---------- */
@keyframes cardSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.home-card {
  animation: cardSlideUp .6s cubic-bezier(.22, 1, .36, 1) both;
}

.home-card:nth-child(1) { animation-delay: .05s; }
.home-card:nth-child(2) { animation-delay: .1s; }
.home-card:nth-child(3) { animation-delay: .15s; }
.home-card:nth-child(4) { animation-delay: .2s; }
.home-card:nth-child(5) { animation-delay: .25s; }
.home-card:nth-child(6) { animation-delay: .3s; }
.home-card:nth-child(7) { animation-delay: .35s; }
.home-card:nth-child(8) { animation-delay: .4s; }

/* ---------- Card Grid ---------- */
.home-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: start;
  gap: 20px;
  max-width: 1360px;
  margin: 24px auto 0;
  position: relative;
  z-index: 3;
}

.home-guide-column,
.home-schedule-column {
  min-width: 0;
}

.home-announcements {
  margin: 0 0 16px;
}

.home-announcements[hidden] { display: none; }
.home-announcement-list { display: grid; gap: 7px; }

.home-announcement-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(141, 178, 214, .28);
  border-radius: 10px;
  background: rgba(246, 250, 255, .72);
  transition: transform .2s, box-shadow .2s;
}

.home-announcement-item:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 12px rgba(33, 118, 202, .1);
}

.home-announcement-type {
  padding: 3px 8px;
  border-radius: 99px;
  background: #dcecff;
  color: #2670bd;
  font-size: 10px;
  font-weight: 800;
}

.home-announcement-item.is-important .home-announcement-type { background: #ffe5df; color: #bd4733; }
.home-announcement-item.is-update .home-announcement-type { background: #dff4e8; color: #278356; }
.home-announcement-item div strong { display: block; color: #0f2c4c; font-size: 13px; }
.home-announcement-item div p { margin-top: 2px; color: #3b5670; font-size: 12px; line-height: 1.55; }
.home-announcement-item > a { color: #1a5da0; font-size: 12px; font-weight: 700; white-space: nowrap; }

/* 最新游戏公告：每个公告版本只向同一浏览器展示一次 */
body.has-announcement-dialog {
  overflow: hidden;
}

.announcement-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 13, 25, .72);
  opacity: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity .22s ease;
}

.announcement-dialog-backdrop.is-visible { opacity: 1; }
.announcement-dialog-backdrop.is-closing { opacity: 0; }

.announcement-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(540px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  overflow: hidden;
  padding: 26px 28px 24px;
  border: 1px solid rgba(119, 181, 235, .48);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(238, 248, 255, .98), rgba(255, 255, 255, .96)),
    #fff;
  box-shadow: 0 30px 80px rgba(0, 12, 30, .42), inset 0 1px 0 #fff;
  color: #173654;
  transform: translateY(18px) scale(.96);
  transition: transform .25s cubic-bezier(.22, 1, .36, 1);
}

.announcement-dialog-backdrop.is-visible .announcement-dialog {
  transform: translateY(0) scale(1);
}

.announcement-dialog::before,
.announcement-dialog::after {
  content: "";
  position: absolute;
  width: 54px;
  height: 54px;
  pointer-events: none;
}

.announcement-dialog::before {
  top: 9px;
  left: 9px;
  border-top: 2px solid #6da9dc;
  border-left: 2px solid #6da9dc;
  border-radius: 10px 0 0;
}

.announcement-dialog::after {
  right: 9px;
  bottom: 9px;
  border-right: 2px solid #6da9dc;
  border-bottom: 2px solid #6da9dc;
  border-radius: 0 0 10px;
}

.announcement-dialog-decoration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #6a8dac;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 4px;
}

.announcement-dialog-decoration span {
  width: 46px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #78a8cf);
}

.announcement-dialog-decoration span:last-child { transform: rotate(180deg); }
.announcement-dialog-decoration i { font-style: normal; }

.announcement-dialog-header {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  text-align: center;
}

.announcement-dialog-header h2 {
  margin: 0;
  color: #102f50;
  font-size: clamp(21px, 5vw, 28px);
  line-height: 1.3;
}

.announcement-dialog-badge {
  padding: 4px 9px;
  border-radius: 999px;
  background: #dcecff;
  color: #2670bd;
  font-size: 11px;
  font-weight: 800;
}

.announcement-dialog.is-important .announcement-dialog-badge { background: #ffe5df; color: #bd4733; }
.announcement-dialog.is-update .announcement-dialog-badge { background: #dff4e8; color: #278356; }

.announcement-dialog-content {
  min-height: 0;
  max-height: min(48vh, 420px);
  overflow-y: auto;
  margin: 20px 0;
  padding: 18px 20px;
  border-top: 1px solid rgba(96, 145, 190, .2);
  border-bottom: 1px solid rgba(96, 145, 190, .2);
  color: #36536d;
  font-size: 15px;
  line-height: 1.9;
  text-align: left;
}

.announcement-dialog-link {
  display: table;
  margin: -7px auto 15px;
  color: #1b67aa;
  font-size: 13px;
  font-weight: 700;
}

.announcement-dialog-confirm {
  display: block;
  min-width: 150px;
  margin: 0 auto;
  padding: 11px 28px;
  border: 1px solid #438dcc;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #2478be, #4fa7e1);
  box-shadow: 0 8px 20px rgba(35, 112, 178, .25);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.announcement-dialog-confirm:hover { filter: brightness(1.06); transform: translateY(-1px); }
.announcement-dialog-confirm:focus-visible { outline: 3px solid rgba(63, 148, 219, .32); outline-offset: 3px; }

@media (max-width: 560px) {
  .announcement-dialog-backdrop { padding: 14px; }
  .announcement-dialog { padding: 23px 18px 20px; border-radius: 15px; }
  .announcement-dialog-content { padding: 14px 13px; font-size: 14px; line-height: 1.75; }
}

.home-guide-column .home-grid {
  max-width: none;
  margin: 0;
  padding: 0 0 32px;
  gap: 16px;
}

.home-schedule-column {
  display: grid;
  gap: 16px;
  align-self: start;
}

.home-side-card {
  overflow: hidden;
  padding: 16px;
  border: 1px solid rgba(180, 210, 240, .34);
  border-radius: 16px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 8px 28px rgba(31, 84, 142, .09);
  backdrop-filter: blur(14px);
}

.home-side-card-header {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 13px;
}

.home-side-card-header > div {
  min-width: 0;
  flex: 1;
}

.home-side-card-header small {
  display: block;
  color: #86a1ba;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.4px;
}

.home-side-card-header h2 {
  margin: 2px 0 0;
  color: #183f68;
  font-size: 18px;
  line-height: 1.2;
}

.home-side-card-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  box-shadow: 0 7px 16px rgba(40, 104, 158, .2);
  font-size: 18px;
  font-weight: 900;
}

.home-side-card-icon.is-notice {
  background: linear-gradient(145deg, #e55349, #ee9350);
}

.home-side-card-icon.is-guide {
  background: linear-gradient(145deg, #2475b9, #52a7d6);
}

.home-side-card-status {
  padding: 4px 8px;
  border: 1px solid #f2c1a6;
  border-radius: 999px;
  color: #bd513d;
  background: #fff4ec;
  font-size: 10px;
  font-weight: 800;
}

/* 游戏公告：卡片内直接放完整的公告列表，点条目弹详情 */

.home-game-notice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 460px;
  overflow-y: auto;
  padding: 2px;
}

.home-game-notice-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #f0ddd2;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 249, 245, .98), rgba(255, 253, 249, .92));
  color: #61352e;
  font: inherit;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}

.home-game-notice-item:hover {
  border-color: #eeb89b;
  background: #fff4ec;
  transform: translateX(2px);
}

.home-game-notice-item-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.home-game-notice-item-time {
  flex: 0 0 auto;
  color: #b08a7f;
  font-size: 11px;
}

.home-game-notice-item:focus-visible,
.home-beginner-links a:focus-visible {
  outline: 3px solid rgba(45, 133, 205, .25);
  outline-offset: 2px;
}

.home-beginner-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.home-beginner-links a {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #dfeaf4;
  border-radius: 11px;
  background: rgba(246, 250, 255, .9);
  text-decoration: none;
  transition: border-color .2s, background .2s, box-shadow .2s, transform .2s;
}

.home-beginner-links a:hover {
  border-color: #a9cdea;
  background: #fff;
  box-shadow: 0 6px 16px rgba(35, 101, 157, .1);
  transform: translateY(-1px);
}

.home-beginner-links strong,
.home-beginner-links span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-beginner-links strong {
  color: #244f76;
  font-size: 13px;
}

.home-beginner-links span {
  margin-top: 3px;
  color: #7e96ad;
  font-size: 10px;
}

.home-side-card-icon.is-version {
  background: linear-gradient(145deg, #7a4fd0, #b06ee0);
}

.home-version-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.home-version-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 10px 6px 8px;
  border: 1px solid #dfeaf4;
  border-radius: 11px;
  background: rgba(246, 250, 255, .9);
  text-decoration: none;
  transition: border-color .2s, background .2s, box-shadow .2s, transform .2s;
}

.home-version-grid a:hover {
  border-color: #a9cdea;
  background: #fff;
  box-shadow: 0 6px 16px rgba(35, 101, 157, .1);
  transform: translateY(-1px);
}

.home-version-grid img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.home-version-grid span {
  overflow: hidden;
  max-width: 100%;
  color: #244f76;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .home-version-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.home-calendar {
  overflow: hidden;
  border: 1px solid rgba(180, 210, 240, .3);
  border-radius: 16px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 8px 28px rgba(31, 84, 142, .09);
  backdrop-filter: blur(14px);
}

/* ---------- 活动日历卡片底部的「更多活动」展开行 ---------- */

.home-calendar-more-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 20px;
  border: 0;
  border-top: 1px solid #e1ebf5;
  background: rgba(240, 248, 255, .6);
  color: #1d5a9e;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.home-calendar-more-toggle:hover {
  background: #e9f3fd;
  color: #176bc9;
}

.home-calendar-more-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform .25s ease;
}

.home-calendar-more-toggle.is-open svg {
  transform: rotate(180deg);
}

.home-calendar-more {
  padding: 4px 16px 16px;
}

.home-calendar-more h3 {
  margin: 10px 0;
  color: #173f70;
  font-size: 16px;
}

.home-more-list {
  display: grid;
  gap: 8px;
}

.home-more-item {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid #dfebf6;
  border-radius: 12px;
  background: rgba(246, 250, 255, .88);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.home-more-item:hover {
  border-color: #95c2ed;
  box-shadow: 0 4px 14px rgba(33, 111, 194, .12);
  transform: translateY(-1px);
}

.home-more-item strong {
  color: #183f69;
  font-size: 14px;
}

.home-more-item span {
  color: #718aa3;
  font-size: 11px;
  line-height: 1.5;
}

.home-more-all {
  display: block;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed #9ec6ee;
  border-radius: 12px;
  background: rgba(231, 243, 255, .55);
  color: #1d5a9e;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  transition: background .2s, border-color .2s;
}

.home-more-all:hover {
  border-color: #2676c4;
  background: #e3f0fd;
}

.home-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 16px;
}

.home-calendar-header h2 {
  margin: 0;
  color: #173f70;
  font-size: 24px;
}

.home-calendar-header time {
  color: #507294;
  font-size: 12px;
  font-weight: 700;
}

.home-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  padding: 0 16px 16px;
}

.home-calendar-days button {
  min-width: 0;
  padding: 9px 2px;
  border: 1px solid #d4e4f4;
  border-radius: 10px;
  background: #f6faff;
  color: #54708d;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.home-calendar-days button small {
  display: block;
  margin-bottom: 1px;
  font-size: 9px;
  font-weight: 500;
}

.home-calendar-days button.is-today:not(.is-active) {
  border-color: #8bbcf1;
  color: #2275cf;
}

.home-calendar-days button.is-active {
  border-color: transparent;
  background: linear-gradient(145deg, #3189ea, #176bc9);
  color: #fff;
  box-shadow: 0 7px 16px rgba(37, 125, 218, .25);
}

.home-calendar-list {
  display: grid;
  gap: 8px;
  padding: 0 16px 18px;
}

.home-calendar-event {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dfebf6;
  border-radius: 12px;
  background: rgba(246, 250, 255, .88);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.home-calendar-event.is-featured {
  border-color: #a8cef5;
  background: linear-gradient(100deg, rgba(231, 243, 255, .95), rgba(248, 252, 255, .95));
}

.home-calendar-event.is-toggleable {
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}

.home-calendar-event.is-toggleable:hover {
  border-color: #95c2ed;
  box-shadow: 0 4px 14px rgba(33, 111, 194, .12);
  transform: translateY(-1px);
}

.home-calendar-event.is-open {
  cursor: default;
  border-color: #95c2ed;
  background: linear-gradient(100deg, rgba(220, 240, 255, .95), rgba(248, 252, 255, .95));
}

.home-calendar-event time {
  color: #216fc2;
  font-size: 12px;
  font-weight: 800;
}

.home-calendar-event-body {
  min-width: 0;
}

.home-calendar-event strong {
  color: #183f69;
  font-size: 14px;
}

.home-calendar-event strong small {
  display: block;
  margin-top: 3px;
  color: #7b8fa3;
  font-size: 10px;
  font-weight: 500;
}

.home-calendar-detail {
  display: none;
  margin-top: 8px;
  padding: 8px 10px;
  border-left: 3px solid #6aa8e3;
  border-radius: 6px;
  background: rgba(231, 243, 255, .55);
  font-size: 11px;
  line-height: 1.55;
  color: #2c4a6b;
}

.home-calendar-event.is-open .home-calendar-detail {
  display: block;
}

.home-calendar-detail p {
  margin: 0 0 4px;
}

.home-calendar-detail p:last-child {
  margin-bottom: 0;
}

.home-calendar-detail b {
  color: #1a3f6b;
  font-weight: 700;
  margin-right: 2px;
}

.home-calendar-event span {
  padding: 3px 7px;
  border-radius: 99px;
  background: #e7f2fd;
  color: #52779a;
  font-size: 10px;
  white-space: nowrap;
}

.home-calendar-expand-hint {
  display: inline-block;
  vertical-align: middle;
  width: 12px;
  height: 12px;
  margin-left: 4px;
  color: #6aa8e3;
  transition: transform .25s ease, color .2s;
}

.home-calendar-event.is-toggleable:hover .home-calendar-expand-hint {
  color: #216fc2;
}

.home-calendar-event.is-open .home-calendar-expand-hint {
  transform: rotate(180deg);
  color: #216fc2;
}

.home-periodic-events {
  margin: 0 16px 16px;
  padding: 15px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(245, 249, 255, .96), rgba(235, 245, 252, .92));
}

.home-periodic-events h3 {
  margin: 0 0 10px;
  color: #244f78;
  font-size: 14px;
}

.home-periodic-list {
  display: grid;
  gap: 8px;
}

.home-periodic-list > * {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #315a80;
  font-size: 12px;
}

.home-periodic-list a:hover strong {
  color: #1976d2;
}

.home-periodic-list span {
  color: #718aa3;
  text-align: right;
}

.home-calendar-source {
  margin: 0;
  padding: 12px 16px;
  border-top: 1px solid #e1ebf5;
  color: #7b8fa3;
  font-size: 10px;
  line-height: 1.6;
}

.home-calendar-source a {
  color: #2676c4;
}

.home-schedule-column .home-drop-line {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 18px;
}

.home-schedule-column .home-drop-line-summary {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.home-schedule-column .home-drop-line-grid {
  grid-template-columns: repeat(5, 1fr);
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1px;
  grid-auto-flow: row dense;
  align-items: start;
  gap: 18px;
  max-width: 1360px;
  margin: 0 auto 0;
  padding: 0 0 32px;
  position: relative;
  z-index: 3;
}

/* ---------- Card (深色主题) ---------- */
.home-card {
  --card-from: rgba(36, 78, 156, .88);
  --card-to:   rgba(18, 44, 100, .95);
  --card-accent:  #5a9ae6;
  --card-accent-2: #3a7bd5;
  display: flex;
  align-self: start;
  flex-direction: column;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .06), transparent 34%),
    linear-gradient(180deg, var(--card-from) 0%, transparent 30%, var(--card-to) 100%),
    var(--card-to);
  border: 1px solid color-mix(in srgb, var(--card-accent) 45%, rgba(255, 255, 255, .12));
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28), 0 0 0 1px color-mix(in srgb, var(--card-accent) 15%, transparent), inset 0 1px 0 rgba(255, 255, 255, .06);
  overflow: hidden;
  transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .35s cubic-bezier(.22, 1, .36, 1);
  color: #fff;
}

/* 主题色变体（按 icon 类型自动套色） */
.home-card:has(.equip-icon)    { --card-from: rgba(36, 78, 156, .92);  --card-to: rgba(18, 44, 100, .96);  --card-accent: #5a9ae6; --card-accent-2: #3a7bd5; }
.home-card:has(.realm-icon)    { --card-from: rgba(96, 60, 165, .92);  --card-to: rgba(58, 30, 120, .96);  --card-accent: #b48ce0; --card-accent-2: #8e44ad; }
.home-card:has(.activity-icon) { --card-from: rgba(196, 96, 30, .92);  --card-to: rgba(120, 50, 10, .96);  --card-accent: #f0a04b; --card-accent-2: #e67e22; }
.home-card:has(.coin-icon)     { --card-from: rgba(196, 150, 30, .92); --card-to: rgba(120, 90, 10, .96);  --card-accent: #f1c40f; --card-accent-2: #d4ac0d; }
.home-card:has(.quest-icon)    { --card-from: rgba(30, 130, 80, .92);  --card-to: rgba(12, 80, 50, .96);   --card-accent: #5fd49a; --card-accent-2: #2ecc71; }
.home-card:has(.raid-icon)     { --card-from: rgba(180, 50, 50, .92);  --card-to: rgba(110, 24, 24, .96);  --card-accent: #f17775; --card-accent-2: #e74c3c; }
.home-card:has(.misc-icon)     { --card-from: rgba(20, 140, 140, .92); --card-to: rgba(10, 90, 90, .96);   --card-accent: #5fd6cf; --card-accent-2: #1abc9c; }
.home-card:has(.title-icon)    { --card-from: rgba(196, 60, 120, .92); --card-to: rgba(120, 30, 80, .96);  --card-accent: #f178b0; --card-accent-2: #e91e63; }

.home-card:hover {
  transform: translateY(-4px) scale(1.008);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .36), 0 0 20px color-mix(in srgb, var(--card-accent) 30%, transparent), inset 0 1px 0 rgba(255, 255, 255, .1);
}

.home-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 12px 22px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .25), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.home-card-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .35;
  pointer-events: none;
  z-index: 0;
}

.home-card-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(104deg, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .12) 58%, transparent 58%),
    linear-gradient(90deg, transparent 72%, rgba(255, 255, 255, .08));
  pointer-events: none;
  z-index: 0;
}

.home-card-header > * {
  position: relative;
  z-index: 1;
}

/* 头部背景图（WebP：原 PNG 每张 2.3~2.8MB，转 WebP 后 169~353KB，肉眼无损） */
.home-card:has(.equip-icon)    .home-card-header::before { background-image: url('../images/card-bg/bg-equip.webp'); }
.home-card:has(.realm-icon)    .home-card-header::before { background-image: url('../images/card-bg/bg-realm.webp'); }
.home-card:has(.activity-icon) .home-card-header::before { background-image: url('../images/card-bg/bg-activity.webp'); }
.home-card:has(.coin-icon)     .home-card-header::before { background-image: url('../images/card-bg/bg-equip.webp'); }
.home-card:has(.quest-icon)    .home-card-header::before { background-image: url('../images/card-bg/bg-quest.webp'); }
.home-card:has(.raid-icon)     .home-card-header::before { background-image: url('../images/card-bg/bg-raid.webp'); }
.home-card:has(.misc-icon)     .home-card-header::before { background-image: url('../images/card-bg/bg-realm.webp'); }
.home-card:has(.title-icon)    .home-card-header::before { background-image: url('../images/card-bg/bg-activity.webp'); }

.home-card-icon {
  display: grid;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3), 0 0 12px rgba(255, 255, 255, .15);
}

.home-card-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.home-card-icon.reference-header-icon {
  border-radius: 8px;
  background: transparent;
  box-shadow: 0 5px 12px rgba(0, 0, 0, .26);
  overflow: hidden;
}

.home-card-icon.reference-header-icon img {
  width: 100%;
  height: 100%;
}

.home-card-icon svg {
  width: 22px;
  height: 22px;
}

.equip-icon { background: linear-gradient(135deg, #3a7bd5, #5a9ae6); }
.realm-icon { background: linear-gradient(135deg, #8e44ad, #a569c7); }
.activity-icon { background: linear-gradient(135deg, #e67e22, #f0a04b); }
.coin-icon { background: linear-gradient(135deg, #f1c40f, #d4ac0d); }
.quest-icon { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.raid-icon { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.misc-icon { background: linear-gradient(135deg, #1abc9c, #16a085); }
.title-icon { background: linear-gradient(135deg, #e91e63, #c2185b); }

.home-card-title {
  margin: 0;
  color: #fff;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}

.home-card-body {
  padding: 14px 18px 18px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .08), rgba(0, 0, 0, .18));
}

.home-card-group {
  margin-top: 12px;
}

.home-card-group:first-child {
  margin-top: 0;
}

.home-card-group h3 {
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid color-mix(in srgb, var(--card-accent) 42%, transparent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}

.home-card-links {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px 8px;
}

.home-card-links a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  padding: 7px 3px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
  min-width: 0;
  border-radius: 4px;
  border: 1px solid transparent;
  background: rgba(0, 0, 0, .08);
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
  transition: all .2s;
}

.home-card-links a span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  width: 100%;
}

.home-card-links a:hover {
  background: rgba(255, 255, 255, .12);
  border-color: color-mix(in srgb, var(--card-accent) 60%, white 40%);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .3), inset 0 0 0 1px color-mix(in srgb, var(--card-accent) 18%, transparent);
  transform: translateY(-2px);
}

.home-card-links a img {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 6px;
  object-fit: contain;
  object-position: center;
  background: transparent;
  padding: 0;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .34);
  transition: transform .2s;
}

.home-card-links a:hover img {
  transform: scale(1.08);
}

/* ---------- Footer ---------- */
.home-footer {
  border-top: 1px solid rgba(180, 210, 240, .25);
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  z-index: 3;
  margin-top: 24px;
}

.home-footer-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.home-footer-brand {
  color: #3a5a7a;
  font-size: 13px;
  font-weight: 600;
}

.home-footer-links {
  display: flex;
  gap: 18px;
  color: #5a7a9a;
  font-size: 12px;
}

.home-footer-links a {
  color: #2980b9;
  font-weight: 600;
}

.home-footer-links a:hover {
  color: #1a6fa0;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .home-dashboard {
    grid-template-columns: 1fr;
    margin: 18px 16px 0;
  }

  .home-schedule-column {
    position: static;
  }

  .home-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    grid-auto-flow: row;
  }

  .home-hero-content {
    padding-bottom: 28px;
  }

  .home-hero-text h1 {
    font-size: 30px;
  }
}

@media (max-width: 680px) {
  .home-hero {
    padding: 32px 16px 0;
  }

  .home-hero-logo {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
    padding: 6px;
    border-radius: 18px;
  }

  .home-hero-logo img {
    border-radius: 12px;
  }

  .home-hero-text h1 {
    font-size: 24px;
  }

  .home-hero-text p {
    font-size: 14px;
  }

  .home-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 10px 12px;
  }

  .home-nav-link {
    padding: 8px 10px;
    justify-content: center;
    font-size: 13px;
    min-width: 0;
    overflow: hidden;
  }

  .home-nav-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }

  .home-nav-link svg,
  .home-nav-link img {
    display: none;
  }

  .home-drop-line {
    margin: 16px;
    padding: 14px 16px;
  }

  .home-drop-line-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .home-drop-line-summary {
    flex-direction: column;
    gap: 2px;
  }

  .home-grid {
    padding: 0 16px 24px;
    gap: 14px;
  }

  .home-guide-column .home-grid {
    padding: 0 0 24px;
  }

  .home-schedule-column .home-drop-line {
    margin: 0;
  }

  .home-calendar-event {
    grid-template-columns: 94px minmax(0, 1fr);
  }

  .home-calendar-event span {
    grid-column: 2;
    justify-self: start;
  }

  .home-card-header {
    padding: 14px 16px;
  }

  .home-card-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 10px;
  }

  .home-card-icon svg {
    width: 18px;
    height: 18px;
  }

  .home-card-title {
    font-size: 16px;
  }

  .home-card-body {
    padding: 14px 16px;
  }

  .home-card-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 8px;
  }

  .home-card-links a {
    padding: 6px 8px;
    font-size: 12px;
  }

  .home-card-links a img {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
  }

  .home-footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }

  .home-footer-links {
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
}
