/* 落葉谷 Classic evo — 白色 × 落葉色簡潔官網 */

:root {
  --white: #ffffff;
  --bg: #faf8f5;
  --bg-soft: #fff7ef;
  --leaf: #d97706;
  --leaf-dark: #b45309;
  --leaf-soft: #fdebd2;
  --leaf-muted: #f5dcc0;
  --text: #3d2f24;
  --muted: #7a6654;
  --line: #eadfce;
  --line-strong: #d4b896;
  --discord: #5865f2;
  --discord-dark: #4752c4;
  --green: #5a9e4a;
  --red: #c45c4c;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(120, 80, 40, 0.08);
  --font: "Segoe UI", "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  max-width: 100%;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  background:
    radial-gradient(circle at 8% 0%, rgba(217, 119, 6, 0.07) 0%, transparent 32%),
    radial-gradient(circle at 92% 4%, rgba(250, 204, 21, 0.08) 0%, transparent 28%),
    linear-gradient(180deg, var(--white) 0%, var(--bg) 100%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

main.wrap {
  min-width: 0;
}

/* ── 頂欄 ── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 18px rgba(120, 80, 40, 0.05);
}

.header-inner {
  min-height: 68px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  object-fit: cover;
}

.brand strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.brand small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
}

.links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.links a:hover {
  color: var(--leaf-dark);
  background: var(--leaf-soft);
}

.links a.active {
  color: #fff;
  background: linear-gradient(180deg, #7ec956 0%, #5aad38 52%, #458f2a 100%);
  border: 2px solid #3d7a28;
  border-bottom-width: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 2px 0 #2d5f1e;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
  font-weight: 800;
}

.btn-discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7289da 0%, var(--discord) 100%);
  border: 2px solid var(--discord-dark);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(88, 101, 242, 0.28);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-discord:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(88, 101, 242, 0.34);
}

/* ── 首頁 ── */

.hero-home {
  padding: 48px 0 36px;
  text-align: center;
}

.launch-strip {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  margin: 0 auto 28px;
  padding: 14px 0 12px;
  border-top: 1px solid var(--text);
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-variant-numeric: tabular-nums;
}

.launch-strip-month,
.launch-strip-day {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
}

.launch-strip-sep {
  margin: 0 2px;
  font-size: clamp(24px, 3.2vw, 30px);
  font-weight: 400;
  line-height: 1;
  color: var(--muted);
}

.launch-strip-line {
  align-self: center;
  width: 1px;
  height: 28px;
  margin: 0 20px;
  background: var(--line-strong);
}

.launch-strip-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  color: var(--leaf-dark);
  line-height: 1;
  white-space: nowrap;
}

.hero-home h1 {
  margin: 0;
  display: grid;
  gap: 6px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.18;
  color: var(--text);
  font-weight: 800;
}

.hero-title-main {
  display: block;
  font-size: clamp(28px, 4.2vw, 44px);
  color: var(--muted);
  font-weight: 800;
}

.hero-title-brand {
  display: block;
  color: var(--leaf-dark);
}

.hero-home .tagline {
  margin: 14px auto 0;
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(18px, 2.6vw, 24px);
  font-weight: 700;
}

.hero-home .subtag {
  margin: 8px auto 0;
  max-width: 560px;
  color: var(--leaf-dark);
  font-size: 15px;
  font-weight: 700;
}

.video-frame {
  margin: 32px auto 0;
  max-width: 860px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.video-frame video {
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  background: #1a1410;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.video-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.home-pulse {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 8px 16px;
  border: 1px solid rgba(180, 130, 70, 0.28);
  border-radius: 999px;
  background: rgba(255, 248, 234, 0.7);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.home-pulse-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5aad38;
  box-shadow: 0 0 0 0 rgba(90, 173, 56, 0.4);
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(90, 173, 56, 0.45); }
  70%  { box-shadow: 0 0 0 7px rgba(90, 173, 56, 0); }
  100% { box-shadow: 0 0 0 0 rgba(90, 173, 56, 0); }
}

.home-pulse-text {
  color: var(--muted);
}

.home-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.home-estate-section {
  padding: 8px 0 48px;
}

.home-estate-divider {
  margin: 0 auto 20px;
}

.home-estate-title {
  margin: 0 0 16px;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  color: var(--text);
  text-align: center;
}

.home-estate-map {
  display: block;
}

.home-estate-map:hover .map-preview {
  border-color: var(--line-strong);
}

.home-estate-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
}

.home-estate-action {
  margin: 18px 0 0;
  text-align: center;
}

/* ── 通用區塊 ── */

.page-title {
  padding: 36px 0 8px;
}

.page-title .eyebrow {
  margin: 0 0 8px;
  color: var(--leaf);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.page-title h1,
.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: var(--text);
}

.page-title p,
.section-lead {
  margin: 12px 0 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.75;
}

.section {
  padding: 18px 0 44px;
}

.leaf-divider {
  width: min(360px, 80%);
  height: 3px;
  margin: 16px 0 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--leaf-muted) 20%, var(--leaf) 50%, var(--leaf-muted) 80%, transparent);
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.card p,
.card li {
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.card ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

a.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 2px solid var(--line-strong);
  background: var(--white);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.btn.primary {
  border-color: var(--leaf-dark);
  background: linear-gradient(180deg, #ffb347 0%, var(--leaf) 100%);
  color: #fff;
}

.btn:hover {
  filter: brightness(1.03);
}

.feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.feature img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  image-rendering: pixelated;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
}

.system-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  padding: 6px;
  border: 2px solid #ddb878;
  border-radius: 10px;
  background: #fff8ea;
}

.system-tabs button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 2px solid transparent;
  background: transparent;
  color: #7a5235;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.system-tabs button:hover {
  color: #5a3d28;
  border-color: #ddb878;
  background: #fff3dc;
}

.system-tabs button.active {
  color: #fff;
  border: 2px solid #3d7a28;
  border-bottom-width: 3px;
  background: linear-gradient(180deg, #7ec956 0%, #5aad38 52%, #458f2a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 2px 0 #2d5f1e;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
}

.system-panel { display: none; }
.system-panel.active { display: block; }

.info-list {
  display: grid;
  gap: 10px;
}

.info-list li {
  list-style: none;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--text);
}

.reward-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.reward-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
  text-align: center;
}

.reward-item img {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  object-fit: contain;
  image-rendering: pixelated;
}

.reward-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 15px;
}

.reward-item span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.promo-banner {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.section-banner {
  display: block;
  width: min(100%, 420px);
  margin-bottom: 16px;
}

.systems-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 44px;
}

  .systems-menu {
    position: sticky;
    top: 84px;
    display: grid;
    gap: 6px;
    align-self: start;
    padding: 8px;
    border: 2px solid #ddb878;
    border-radius: 12px;
    background: #fff8ea;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

.system-tab {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 10px;
  color: #7a5235;
  text-align: left;
  border: 2px solid transparent;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.system-tab:not(:has(img)) {
  grid-template-columns: 1fr;
  padding-left: 14px;
}

.game-menu {
  grid-template-columns: 1fr;
}

.game-menu .system-tab {
  grid-template-columns: 1fr;
  padding-left: 14px;
}

.game-panel-body {
  padding-top: 4px;
}

.game-panel-body .grid + .grid,
.game-panel-body .grid + .card-wrap,
.game-panel-body .card-wrap + .card-wrap {
  margin-top: 16px;
}

.game-panel-body .card-wrap .card {
  margin: 0;
}

/* ── 規格表排版（遊戲資訊 / 成就系統） ── */

.spec-page {
  padding: 4px 0 8px;
}

.spec-title {
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--text);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.spec-sheet {
  border: 1px solid var(--line-strong);
  background: var(--white);
}

.spec-row {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  border-top: 1px solid var(--line);
}

.spec-row:first-child {
  border-top: none;
}

.spec-row-head {
  padding: 16px 18px;
  border-right: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--text);
}

.spec-row-body {
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.spec-text {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.spec-cell-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
}

.spec-cell-grid li {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--white);
}

.spec-cell-grid li:nth-child(2n) {
  border-right: none;
}

.spec-cell-grid li:last-child {
  border-bottom: none;
}

.spec-cell-grid li:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  border-right: none;
}

.spec-kv-list {
  display: grid;
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
}

.spec-kv-list.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.spec-kv-list.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.spec-kv-list.cols-4 > div {
  border-bottom: none;
}

.spec-kv-list.cols-2 > div:nth-last-child(-n+2) {
  border-bottom: none;
}

.spec-kv-list > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--white);
}

.spec-kv-list.cols-2 > div:nth-child(2n),
.spec-kv-list.cols-4 > div:nth-child(4n) {
  border-right: none;
}

.spec-kv-list.cols-2 > div:last-child,
.spec-kv-list.cols-4 > div:last-child {
  border-bottom: none;
}

.spec-kv-list.cols-2 > div:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  border-right: none;
}

.spec-kv-list dt {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.spec-kv-list dd {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--leaf-dark);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.system-tab img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  image-rendering: pixelated;
}

.system-tab[data-system="mount"] img {
  object-fit: cover;
  border-radius: 4px;
  image-rendering: auto;
}

.system-tab:hover {
  background: #fff3dc;
  border-color: #f0c878;
}

.system-tab.active {
  color: #fff;
  border: 2px solid #3d7a28;
  border-bottom-width: 3px;
  background: linear-gradient(180deg, #7ec956 0%, #5aad38 52%, #458f2a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 2px 0 #2d5f1e;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
}

.system-stage {
  min-height: 480px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.system-panel {
  display: none;
  padding: 28px;
}

.system-panel.active {
  display: block;
}

.system-hero {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.system-hero img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  image-rendering: pixelated;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-soft);
}

.system-hero img.section-banner {
  width: min(100%, 420px);
  height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.system-hero:has(img.section-banner) {
  grid-template-columns: 1fr;
}

.boss-roster {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.boss-card {
  margin: 0;
  width: 300px;
  max-width: 100%;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
}

.boss-card img {
  width: 300px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 300 / 60;
  object-fit: contain;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.boss-card.is-open {
  border-color: #c8860a;
  box-shadow: 0 4px 14px rgba(200, 134, 10, 0.16);
}

.boss-card.is-locked {
  border-color: #c8c4bc;
  background: #eceae6;
  filter: grayscale(1) saturate(0);
  opacity: 0.72;
}

.boss-card.is-locked img {
  opacity: 0.88;
}

.boss-card .boss-lock-tag {
  display: block;
  padding: 5px 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #8a847a;
  background: #e4e2de;
  border-top: 1px solid #d0ccc4;
}

.boss-roster-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.boss-roster-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.boss-roster-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.boss-roster-legend i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}

.boss-roster-legend .leg-open i {
  background: linear-gradient(180deg, #ffe89a, #ffc94a);
  border: 1px solid #c8860a;
}

.boss-roster-legend .leg-lock i {
  background: #d8d4cc;
  border: 1px solid #b8b4ac;
  filter: grayscale(1);
}

.system-coming-soon {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.system-hero:not(:has(img)) {
  grid-template-columns: 1fr;
}

.system-hero h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.5vw, 36px);
}

.system-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.system-detail-grid div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}

.system-detail-grid strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 15px;
}

.system-detail-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.system-subhead {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.system-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.system-flow i {
  width: 18px;
  height: 2px;
  background: var(--leaf);
  display: inline-block;
}

.system-icon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
  justify-content: center;
}

.system-icon-row figure {
  margin: 0;
  width: 88px;
  text-align: center;
}

.system-icon-row img {
  width: 48px;
  height: 48px;
  margin: 0 auto 8px;
  object-fit: contain;
  image-rendering: pixelated;
}

.system-icon-row figcaption {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.system-icon-row--wide figure {
  width: 72px;
}

.costume-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.costume-gallery img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--white);
}

.showcase-title {
  margin: 0 0 18px;
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 800;
  color: var(--text);
}

.system-video-feature {
  margin-top: 0;
  max-width: none;
}

.vfx-video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.vfx-video-grid .video-frame {
  margin: 0;
  padding: 10px;
}

.vfx-video-grid .video-frame video {
  aspect-ratio: 16 / 9;
}

.reincarnation-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.reincarnation-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

.mount-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.mount-gallery figure {
  margin: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  overflow: hidden;
}

.mount-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
  background: #1a1a1a;
}

.mount-gallery figcaption {
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.notice {
  padding: 14px 16px;
  border-left: 4px solid var(--leaf);
  border-radius: 10px;
  background: var(--leaf-soft);
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
}

.map-preview {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.live-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e8f5e4;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

/* ── 股市 ── */

.stock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.stock-table th,
.stock-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.stock-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stock-up { color: var(--red); font-weight: 700; }
.stock-down { color: var(--green); font-weight: 700; }
.stock-flat { color: var(--muted); font-weight: 700; }

.market-meta {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.chart-box {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}

#stockChart {
  width: 100%;
  height: 280px;
}

.footer {
  margin-top: 20px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
}

.footer a {
  color: var(--leaf-dark);
  font-weight: 700;
}

/* ── 全站頁尾（落葉風） ── */

.site-footer {
  margin-top: 48px;
  background:
    linear-gradient(180deg, rgba(253, 235, 210, 0) 0%, rgba(253, 235, 210, 0.45) 18%, #f7e8cf 62%, #edd5ad 100%);
  border-top: 1px solid var(--line-strong);
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--leaf-muted) 18%, var(--leaf) 50%, var(--leaf-muted) 82%, transparent 100%);
}

.site-footer-inner {
  padding: 32px 0 40px;
}

.footer-leaf-bar {
  height: 10px;
  margin: 18px 0 16px;
  background:
    radial-gradient(circle at 8% 50%, rgba(180, 120, 40, 0.18) 0 3px, transparent 4px),
    radial-gradient(circle at 22% 60%, rgba(200, 140, 50, 0.14) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 40%, rgba(180, 120, 40, 0.16) 0 3px, transparent 4px),
    radial-gradient(circle at 92% 55%, rgba(200, 140, 50, 0.12) 0 2px, transparent 3px),
    linear-gradient(90deg, transparent, rgba(217, 119, 6, 0.22) 20%, rgba(217, 119, 6, 0.32) 50%, rgba(217, 119, 6, 0.22) 80%, transparent);
  border-radius: 999px;
  opacity: 0.85;
}

.footer-desc {
  margin: 0;
  max-width: 820px;
  color: #6f5a46;
  font-size: 13px;
  line-height: 1.85;
}

.footer-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 20px 0 0;
  padding: 0;
  opacity: 0.45;
}

.footer-keywords span {
  padding: 3px 8px;
  border: 1px solid rgba(180, 130, 70, 0.22);
  border-radius: 999px;
  background: transparent;
  color: #8a6f52;
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed rgba(180, 130, 70, 0.45);
  color: #8f7965;
  font-size: 12px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.footer-nav a {
  color: var(--leaf-dark);
  font-size: 13px;
  font-weight: 700;
}

.footer-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand discord"
      "nav nav";
    gap: 10px 12px;
    padding: 10px 0;
    min-height: auto;
  }

  .header-inner > .brand {
    grid-area: brand;
    min-width: 0;
  }

  .header-inner > .btn-discord {
    grid-area: discord;
    width: auto;
    min-height: 38px;
    padding: 0 14px;
    font-size: 13px;
    white-space: nowrap;
  }

  .header-inner > .links {
    grid-area: nav;
    justify-content: flex-start;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 2px;
    padding-bottom: 2px;
  }

  .header-inner > .links::-webkit-scrollbar {
    display: none;
  }

  .header-inner > .links a {
    flex-shrink: 0;
    font-size: 13px;
    padding: 7px 11px;
  }

  .grid, .grid-2, .reward-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .footer { flex-direction: column; align-items: flex-start; }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .systems-layout { grid-template-columns: 1fr; }
  .systems-menu {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .system-detail-grid { grid-template-columns: 1fr; }
  .system-hero { grid-template-columns: 1fr; }

  .spec-row {
    grid-template-columns: 1fr;
  }

  .spec-row-head {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
  }

  .spec-row-body {
    padding: 14px 16px;
  }

  .spec-cell-grid {
    grid-template-columns: 1fr;
  }

  .spec-cell-grid li {
    border-right: none;
  }

  .spec-cell-grid li:not(:last-child) {
    border-bottom: 1px solid var(--line);
  }

  .spec-cell-grid li:last-child {
    border-bottom: none;
    grid-column: auto;
  }

  .spec-kv-list.cols-2,
  .spec-kv-list.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .spec-kv-list.cols-2 > div:nth-child(2n),
  .spec-kv-list.cols-4 > div:nth-child(2n) {
    border-right: none;
  }

  .spec-kv-list.cols-2 > div:nth-child(-n+2),
  .spec-kv-list.cols-4 > div:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }

  .spec-kv-list.cols-4 > div:nth-last-child(-n+2) {
    border-bottom: none;
  }

  .spec-kv-list.cols-2 > div:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .costume-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reincarnation-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mount-gallery { grid-template-columns: 1fr; }
  .system-panel { padding: 18px; }
  .system-stage { min-height: 0; }
  .stock-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding: 0 4px;
  }
  .hero-home { padding: 32px 0 28px; }
  .card-row { flex-direction: column; align-items: stretch; }
  .card-row .btn-discord { width: 100%; }
  .page-title .leaf-divider { width: min(280px, 90%); }
}

@media (max-width: 480px) {
  .wrap {
    width: calc(100% - 16px);
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .brand strong {
    font-size: 15px;
  }

  .brand small {
    font-size: 10px;
  }

  .hero-home {
    padding: 24px 0 20px;
  }

  .launch-strip {
    margin-bottom: 22px;
    padding: 12px 0 10px;
  }

  .launch-strip-line {
    height: 22px;
    margin: 0 14px;
  }

  .launch-strip-label {
    font-size: 11px;
    letter-spacing: 0.22em;
    text-indent: 0.22em;
  }

  .hero-home .tagline {
    font-size: 17px;
  }

  .home-estate-section {
    padding-bottom: 32px;
  }

  .home-estate-action .btn.primary {
    width: 100%;
  }

  .hero-home .subtag {
    font-size: 13px;
  }

  .video-frame {
    margin-top: 20px;
    padding: 10px;
    border-radius: 14px;
  }

  .home-actions .btn-discord {
    width: 100%;
  }

  .page-title {
    padding: 24px 0 6px;
  }

  .page-title h1 {
    font-size: clamp(26px, 8vw, 34px);
  }

  .page-title p {
    font-size: 14px;
  }

  .section {
    padding: 12px 0 32px;
  }

  .card {
    padding: 16px;
  }

  .card h3 {
    font-size: 16px;
  }

  .system-panel {
    padding: 14px;
  }

  .systems-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 6px;
  }

  .system-tab {
    min-height: 44px;
    font-size: 12px;
    padding: 6px 8px;
    gap: 6px;
  }

  .system-tab img {
    width: 26px;
    height: 26px;
  }

  .system-icon-row--wide figure {
    width: 64px;
  }

  .system-icon-row {
    gap: 10px;
    padding: 12px;
  }

  .system-icon-row figure {
    width: 72px;
  }

  .system-flow {
    font-size: 13px;
    padding: 12px;
  }

  .costume-gallery {
    grid-template-columns: 1fr;
  }

  .reincarnation-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .mount-gallery {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .vfx-video-grid {
    grid-template-columns: 1fr;
  }

  .boss-roster {
    gap: 10px;
  }

  .boss-card,
  .boss-card img {
    width: min(300px, 100%);
  }

  .reincarnation-gallery img {
    padding: 6px;
  }

  .info-list li {
    padding: 10px 12px;
    font-size: 13px;
  }

  .footer {
    padding: 20px 0 28px;
    font-size: 12px;
  }

  .site-footer-inner {
    padding: 24px 0 32px;
  }

  .footer-keywords span {
    font-size: 10px;
    padding: 4px 8px;
  }

  #stockChart {
    height: 220px;
  }

  .stock-table {
    font-size: 12px;
    min-width: 520px;
  }

  .stock-table th,
  .stock-table td {
    padding: 10px 8px;
  }
}
