/* ===========================================================================
   狐面屋 Kitsune Play —— 視覺（第三版，2026-09-18）
   ---------------------------------------------------------------------------
   世界觀是「祭典的夜晚」：靛藍的夜色、燈籠的暖光、狐火的青白。
   參考座標是**遊戲主機商店的首頁**（主視覺、縮圖列、有編號的收藏卡），
   不是娛樂城大廳。

   第三版跟第二版的差別，一句話：少一點框、多一點材質與節奏。

     · 段落標題有了「拉丁字 kicker + 中文標題 + 一條延伸的線」的固定節奏
     · 主視覺底下是十張縮圖（以前是十顆點，看不出哪顆是哪款）
     · 卡片有圖鑑編號（No.01 … No.10），十款是一套收藏，不是十張廣告
     · 介紹頁四個章節有編號，結尾是用該款自己的場景與角色做的橫幅
     · 夜祭的遠景（山、鳥居、燈籠）從「固定在視窗底部」搬進頁尾 ——
       以前它會透在錢包表格與條款內文後面
     · 全站鋪一層很淡的和紙顆粒；橫幅底下鋪七宝紋，都只有幾個百分點

   ⚠ 這份樣式刻意不提供的東西，每一項都是為了不讓它看起來像賭場：

     · 沒有金色漸層、沒有黑底金字（那是賭場的預設配色）
     · 沒有 $ / NT$ 的樣式 —— 錢包裡是狐幣，用幣的圖示不用貨幣符號
     · 沒有跳動、閃爍、發光的金額數字
     · 沒有「限時」倒數條、沒有紅色促銷角標
     · 朱紅只用在點綴（鳥居、章節印記、focus），不做大面積

   「質感」在這裡的意思是：多層但很淡的陰影、1px 的亮邊、玻璃質感的面板、
   短而有加速度的動效、留白、字距。不是更多光暈。

   ⚠ backdrop-filter 只用在少數幾個大面積的元件（頁首、主視覺底下的兩條
     導覽列、箭頭、玻璃按鈕）。封面上的小籤、標題旁的小標一律用半透明底色 ——
     一頁裡幾十個毛玻璃元件會讓手機的合成器跟不上（2026-09-18 在平板寬度
     實際看到畫面停住不重繪）。

   固定深色。這不是「還沒做淺色模式」，是夜祭本來就在晚上。

   ⚠⚠ 頁面那側（web/*.ts）**不能**寫 style="…"：全站 CSP 是 style-src 'self'，
       HTML 的 style 屬性會被瀏覽器丟掉，而且不會有任何錯誤提示。
       CSS 裡的 data: 圖（顆粒、七宝紋）走的是 img-src，那一條允許 data:。
   =========================================================================== */

:root {
  /* 夜色 */
  --ink: #0a0e1c;
  --ink-2: #0f1528;
  --ink-card: #141b31;
  --ink-card-2: #192240;
  --line: rgb(255 255 255 / 0.07);
  --line-strong: rgb(255 255 255 / 0.14);

  /* 光 */
  --foxfire: #8ad7f0;
  --foxfire-deep: #4fb2d6;
  --lantern: #f5c97a;
  --lantern-deep: #e0a955;
  --torii: #d9473f;

  /* 字 */
  --washi: #f2ede2;
  --washi-dim: #aeb6c9;
  --washi-faint: #717b98;

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
  --radius-xl: 30px;

  --font: "Noto Sans TC", "PingFang TC", "Hiragino Sans", "Microsoft JhengHei UI",
    "Microsoft JhengHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* 拉丁字（kicker、羅馬字、編號）。要一套字距開得起來的無襯線。 */
  --font-latin: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue",
    system-ui, sans-serif;

  /* 陰影：一道極細的內亮邊 + 很遠很淡的投影。這兩層是整站質感的來源。 */
  --edge: inset 0 1px 0 rgb(255 255 255 / 0.07);
  --shadow-card: var(--edge), 0 24px 48px -28px rgb(0 0 0 / 0.75);
  --shadow-lift: inset 0 1px 0 rgb(255 255 255 / 0.1), 0 36px 64px -28px rgb(0 0 0 / 0.8),
    0 0 0 1px rgb(138 215 240 / 0.28), 0 0 48px -12px rgb(138 215 240 / 0.28);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --bnav-h: 60px;
  --top-h: 69px;

  /* 和紙的顆粒。feTurbulence 生成，白色、alpha 很低。 */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.055 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* 七宝紋（しっぽう）。橫幅與面板的底紋，只有幾個百分點。 */
  --shippo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.07'%3E%3Ccircle cx='28' cy='28' r='27.5'/%3E%3Ccircle cx='0' cy='0' r='27.5'/%3E%3Ccircle cx='56' cy='0' r='27.5'/%3E%3Ccircle cx='0' cy='56' r='27.5'/%3E%3Ccircle cx='56' cy='56' r='27.5'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  min-height: 100dvh;
  background-color: var(--ink);
  color: var(--washi);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;

  /* 夜空。兩顆光暈，一冷一暖，再一道由上而下的漸層。 */
  background-image:
    radial-gradient(80rem 46rem at 12% -12%, rgb(138 215 240 / 0.1), transparent 60%),
    radial-gradient(56rem 40rem at 92% -6%, rgb(245 201 122 / 0.085), transparent 60%),
    linear-gradient(180deg, #0c1224 0%, var(--ink) 55%);
  background-attachment: fixed;
}

/* 和紙顆粒。固定一層在最底，內容站在它上面。 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--grain);
  opacity: 0.7;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
b, strong { font-weight: 800; }

:focus-visible {
  outline: 2px solid var(--foxfire);
  outline-offset: 3px;
  border-radius: 8px;
}
main:focus { outline: none; }
main { position: relative; z-index: 1; }

/* 全站共用的 SVG 漸層（layout.ts 的 SVG_DEFS，每一頁 <body> 的第一行）。
   縮成 0×0 但**不能 display:none**：Firefox 不解析 display:none 的 SVG 裡的
   漸層，整站的面具會變成黑的。 */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

::selection { background: rgb(138 215 240 / 0.3); }

/* --- 只給螢幕閱讀器 ------------------------------------------------------
   看不到但念得到。用在大廳登入後的 <h1> —— 每一頁都要有剛好一個 h1
   （標題階層、搜尋引擎、螢幕閱讀器的「跳到標題」都吃它），但已經登入的
   玩家不需要在大廳上再讀一次這個站是什麼。

   ⚠ 不要用 display:none 或 visibility:hidden —— 那兩個連螢幕閱讀器都念不到，
     等於沒有這個 h1。1px + clip-path 是唯一同時「看不到」與「念得到」的做法。 */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- 跳到主要內容 -------------------------------------------------------- */

.skip-link {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translate(-50%, -120%);
  z-index: 60;
  padding: 0.6rem 1.2rem;
  background: var(--foxfire);
  color: #06202c;
  font-weight: 700;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: transform 0.16s ease;
}
.skip-link:focus { transform: translate(-50%, 0); }

/* --- 頁面載入進度條 ------------------------------------------------------
   點遊戲後 launch 要跟 RGS 來回一趟，這條線告訴玩家「收到了，在跑」。 */

.page-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  z-index: 60;
  background: linear-gradient(90deg, var(--foxfire), var(--lantern));
  opacity: 0;
  pointer-events: none;
}
.page-progress.is-active {
  opacity: 1;
  animation: progress-run 6s cubic-bezier(0.12, 0.72, 0.3, 1) forwards;
}
@keyframes progress-run {
  0% { width: 0; } 25% { width: 38%; } 60% { width: 68%; } 100% { width: 88%; }
}

/* --- 轉圈 ---------------------------------------------------------------- */

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: none;
  border: 2px solid rgb(138 215 240 / 0.25);
  border-top-color: var(--foxfire);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spinner-lg { width: 28px; height: 28px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- 版面 ---------------------------------------------------------------- */

.wrap {
  width: min(1220px, 100% - 3rem);
  margin-inline: auto;
}
@media (max-width: 640px) { .wrap { width: calc(100% - 2rem); } }

.section { margin: 3rem 0; }

/* kicker：段落標題上方那一行小小的拉丁字。整站的節奏標記。 */
.kicker {
  display: inline-block;
  font-family: var(--font-latin);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--foxfire);
  opacity: 0.9;
  line-height: 1.4;
}

.section-head {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  margin: 0 0 1.3rem;
}
.section-title { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.section-head h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.section-head .hint { font-size: 0.86rem; color: var(--washi-faint); padding-bottom: 0.2rem; white-space: nowrap; }
.section-rule {
  flex: 1;
  min-width: 2rem;
  height: 1px;
  margin-bottom: 0.55rem;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}
@media (max-width: 640px) {
  .section-head { flex-wrap: wrap; gap: 0.3rem 0.8rem; }
  .section-head h2 { font-size: 1.3rem; }
  .section-rule { display: none; }
}

/* 有 h1 的功能頁（補給、錢包）的頁首：標題 + 一句話 + 右側一個東西。 */
.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem 1.5rem;
  margin: 1.4rem 0 1.8rem;
}
.page-head h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3.5vw, 2.2rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.page-lede { grid-column: 1; margin: 0; color: var(--washi-dim); font-size: 0.95rem; max-width: 56ch; }
.page-aside { grid-column: 2; grid-row: 1 / span 2; justify-self: end; align-self: center; }
@media (max-width: 640px) {
  .page-head { grid-template-columns: 1fr; }
  .page-aside { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 0.4rem; }
}

/* --- 頁首 ----------------------------------------------------------------
   玻璃。捲動時內容從它底下穿過去。 */

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--top-h);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  background: rgb(10 14 28 / 0.7);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.03), 0 12px 32px -22px rgb(0 0 0 / 0.9);
}

.top-inner {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  height: calc(var(--top-h) - 1px);
}

/* 商標 */
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-right: auto;
  flex: none;
}
.brand-mark {
  width: 42px;
  height: 42px;
  flex: none;
  filter: drop-shadow(0 6px 14px rgb(0 0 0 / 0.55));
  transition: transform 0.35s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.05); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.brand-sub {
  margin-top: 3px;
  font-family: var(--font-latin);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--foxfire);
  opacity: 0.85;
}

/* 桌機分頁 */
.tabs {
  display: flex;
  gap: 0.15rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.035);
  border: 1px solid var(--line);
}
.tab {
  padding: 0.42rem 1.05rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--washi-dim);
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.tab:hover { color: var(--washi); background: rgb(255 255 255 / 0.05); }
.tab[aria-current="page"] {
  color: var(--foxfire);
  background: rgb(138 215 240 / 0.12);
  box-shadow: inset 0 0 0 1px rgb(138 215 240 / 0.3), inset 0 1px 0 rgb(255 255 255 / 0.08);
}

.top-right { display: flex; align-items: center; gap: 0.7rem; flex: none; }

/* 狐幣。膠囊，右邊掛一顆「＋」。
   ⚠ 這是餘額唯一的顯示樣式：沒有 $、沒有跳動。它要像遊戲的道具計數器。 */
.coins {
  display: inline-flex;
  align-items: stretch;
  border-radius: 999px;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.06), rgb(255 255 255 / 0.02));
  border: 1px solid var(--line-strong);
  box-shadow: var(--edge);
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.coins-main {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.9rem 0.42rem 0.6rem;
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
}
a.coins-main:hover { background: rgb(255 255 255 / 0.04); }
.coins-icon { width: 22px; height: 22px; flex: none; filter: drop-shadow(0 2px 4px rgb(0 0 0 / 0.5)); }
.coins-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  border-left: 1px solid var(--line);
  color: var(--lantern);
  font-size: 1.15rem;
  font-weight: 800;
  background: rgb(245 201 122 / 0.08);
  transition: background 0.16s ease, color 0.16s ease;
}
.coins-add:hover { background: rgb(245 201 122 / 0.2); color: #fff; }
.coins-static { cursor: default; }

/* 玩家 */
.avatar {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.25rem 0.8rem 0.25rem 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgb(255 255 255 / 0.03);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--washi-dim);
  transition: border-color 0.16s ease, color 0.16s ease;
}
.avatar:hover { border-color: rgb(138 215 240 / 0.5); color: var(--washi); }
.avatar-mask {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 30%, #1d2a4c, #0f1730);
  border: 1px solid var(--line-strong);
}
.avatar-mask .brand-mark { width: 24px; height: 24px; filter: none; }
.avatar-name { max-width: 9ch; overflow: hidden; text-overflow: ellipsis; }

/* --- 按鈕 ---------------------------------------------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.35rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.05);
  color: var(--washi);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), background 0.18s ease, border-color 0.18s ease,
    box-shadow 0.18s ease, opacity 0.18s ease;
  box-shadow: var(--edge);
}
.btn:hover { transform: translateY(-2px); background: rgb(255 255 255 / 0.08); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn-primary {
  background: linear-gradient(180deg, #ade5f7 0%, #6fc5e3 55%, var(--foxfire-deep) 100%);
  color: #052430;
  border-color: rgb(169 228 247 / 0.6);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.6), inset 0 -1px 0 rgb(0 0 0 / 0.15),
    0 10px 24px -10px rgb(138 215 240 / 0.7);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #c0ecfa 0%, #82d0ea 55%, #5bbbdd 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.65), 0 14px 32px -10px rgb(138 215 240 / 0.85),
    0 0 0 4px rgb(138 215 240 / 0.12);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--washi-dim);
  box-shadow: none;
}
.btn-ghost:hover { border-color: var(--foxfire); color: var(--washi); background: rgb(138 215 240 / 0.06); }

/* 玻璃按鈕：放在影片或圖片上面用。 */
.btn-glass {
  background: rgb(10 14 28 / 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-color: rgb(255 255 255 / 0.22);
}
.btn-glass:hover { background: rgb(10 14 28 / 0.62); border-color: rgb(255 255 255 / 0.42); }

.btn-sm { padding: 0.48rem 1rem; font-size: 0.9rem; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

.btn.is-busy { pointer-events: none; opacity: 0.72; transform: none; }
.btn.is-busy::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid rgb(0 0 0 / 0.25);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.ico-sm { width: 15px; height: 15px; flex: none; }
.btn .ico-sm { margin-left: -0.2rem; }

/* 小標籤（玩法分類）。 */
.tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.62rem;
  border-radius: 999px;
  background: rgb(138 215 240 / 0.1);
  color: var(--foxfire);
  border: 1px solid rgb(138 215 240 / 0.24);
  letter-spacing: 0.02em;
}

/* --- 通知 ---------------------------------------------------------------- */

.notice { padding: 0.75rem 1rem; border-radius: var(--radius-sm); font-size: 0.88rem; margin-bottom: 1rem; }
.notice-error { background: rgb(217 71 63 / 0.12); border: 1px solid rgb(217 71 63 / 0.35); color: #ffb3ae; }
.notice-good {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 1.2rem 0 0;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgb(245 201 122 / 0.14), rgb(138 215 240 / 0.06));
  border: 1px solid rgb(245 201 122 / 0.32);
  box-shadow: var(--edge);
  color: var(--washi);
  font-weight: 700;
}
.notice-good .coins-icon { width: 24px; height: 24px; }
/* 面板裡（驗證完成、付款完成）它在按鈕上面，要留下方的空間而不是上方。 */
.panel .notice-good { margin: 0 0 1.2rem; }

/* --- 大廳的報頭（未登入）------------------------------------------------
   主視覺上面的一條線：面具 + h1 + 一句話。

   ⚠ 它的存在理由一半是 SEO（首頁在講什麼要被說出來），一半是第一次來的人
     需要一句話知道這是什麼。字級刻意壓小 —— 它不是主視覺，主視覺在它
     下面那張大圖。已登入的玩家看不到這一段（pages.ts 換成 .sr-only 的 h1）。 */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
  margin: 1.6rem 0 0;
}
.masthead-main { display: flex; align-items: center; gap: 0.7rem; }
.masthead-mark .brand-mark { width: 30px; height: 30px; filter: drop-shadow(0 4px 10px rgb(0 0 0 / 0.5)); }
.masthead h1 {
  margin: 0;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.3;
}
.masthead-sub { margin: 0; color: var(--washi-dim); font-size: 0.9rem; max-width: 48ch; }
@media (max-width: 640px) {
  .masthead { margin-top: 1.1rem; }
  .masthead-sub { font-size: 0.84rem; }
}

/* --- 主視覺（大廳）------------------------------------------------------
   一張大圖 + 循環短片 + 角色立繪 + 一顆按鈕，底下一排縮圖。
   像遊戲主機商店的首屏。

   ⚠ 影片是 muted/loop 的短循環，不是那支 90 秒的宣傳片。
     手機、prefers-reduced-motion、省流量模式都不載入影片（app.js 決定），
     那時候看到的是 poster（場景圖）。 */

.featured {
  position: relative;
  margin: 1.3rem 0 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-card), 0 0 0 1px rgb(0 0 0 / 0.4), 0 40px 80px -50px rgb(138 215 240 / 0.25);
  background: var(--ink-2);
}

.featured-stage { position: relative; }

.featured-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.featured-track::-webkit-scrollbar { display: none; }

.featured-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 100%;
  height: clamp(420px, 56vh, 600px);
  scroll-snap-align: start;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.featured-video,
.featured-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.featured-bg { filter: brightness(1.32) saturate(1.1); }
.featured-video { opacity: 0; transition: opacity 0.8s ease; }
.featured-video.is-playing { opacity: 1; }

/* 文字要壓在影片上，所以由左往右、由下往上各一道暗 */
.featured-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgb(10 14 28 / 0.9) 0%, rgb(10 14 28 / 0.58) 40%, rgb(10 14 28 / 0.05) 72%),
    linear-gradient(180deg, rgb(10 14 28 / 0.28) 0%, transparent 35%, rgb(10 14 28 / 0.8) 100%);
}

/* 角色立繪：右側 */
.featured-figure {
  position: absolute;
  bottom: 0;
  z-index: 2;
  height: 96%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgb(0 0 0 / 0.6));
  pointer-events: none;
  transition: transform 1.2s var(--ease);
}
.featured-figure-r { right: 4%; }
.featured-figure-l { right: 26%; height: 82%; opacity: 0.92; }
.featured-slide:hover .featured-figure-r { transform: translateY(-6px); }

.featured-body {
  position: relative;
  z-index: 3;
  padding: 2.4rem 2.8rem 2.6rem;
  max-width: 36rem;
}
.featured-kickers { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.featured-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.26rem 0.75rem;
  border-radius: 999px;
  background: rgb(10 14 28 / 0.66);
  border: 1px solid rgb(255 255 255 / 0.18);
  color: var(--washi-dim);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.featured-kicker-hot {
  background: rgb(245 201 122 / 0.16);
  border-color: rgb(245 201 122 / 0.45);
  color: var(--lantern);
}
.featured-title {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0.07em;
  text-shadow: 0 6px 30px rgb(0 0 0 / 0.7);
}
.featured-romaji {
  margin: 0.5rem 0 0;
  font-family: var(--font-latin);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--lantern);
}
.featured-tagline {
  margin: 1rem 0 1.5rem;
  color: var(--washi-dim);
  font-size: 1.02rem;
  max-width: 30ch;
  text-shadow: 0 2px 10px rgb(0 0 0 / 0.8);
}
.featured-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.featured-note { margin: 0.9rem 0 0; font-size: 0.8rem; color: var(--washi-faint); text-shadow: 0 2px 8px rgb(0 0 0 / 0.8); }

/* 左右箭頭：只在滑鼠停在主視覺上時浮出來 */
.featured-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 0.22);
  background: rgb(10 14 28 / 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--washi);
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.16s ease, border-color 0.16s ease;
}
.featured-arrow svg { width: 20px; height: 20px; }
.featured-arrow-l { left: 1rem; }
.featured-arrow-r { right: 1rem; }
.featured-stage:hover .featured-arrow, .featured-arrow:focus-visible { opacity: 1; }
.featured-arrow:hover { background: rgb(10 14 28 / 0.8); border-color: var(--foxfire); }
.featured-arrow[hidden] { display: none; }

/* 縮圖列 */
.featured-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1.1rem;
  border-top: 1px solid var(--line);
  background: rgb(10 14 28 / 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.featured-bar[hidden] { display: none; }
.featured-count {
  flex: none;
  min-width: 4.6ch;
  font-family: var(--font-latin);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--washi-faint);
  font-variant-numeric: tabular-nums;
}
.featured-count b { color: var(--washi); font-weight: 800; }
.featured-thumbs {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
  padding: 3px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.featured-thumbs::-webkit-scrollbar { display: none; }
.featured-thumb {
  position: relative;
  flex: none;
  width: 98px;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  border-radius: 9px;
  overflow: hidden;
  background: var(--ink-card);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease, transform 0.2s var(--ease), box-shadow 0.2s ease;
}
.featured-thumb img { width: 100%; height: 100%; object-fit: cover; }
.featured-thumb:hover { opacity: 0.9; transform: translateY(-1px); }
.featured-thumb.is-active {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--foxfire), 0 0 18px -4px rgb(138 215 240 / 0.8);
}
/* 進度線：目前這一張底下由左往右跑滿，跑滿就換下一張（7 秒，跟 app.js 對齊）。 */
.featured-thumb::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0;
  background: var(--foxfire);
}
.featured-thumb.is-active::after { animation: thumb-progress 7s linear forwards; }
.featured.is-paused .featured-thumb.is-active::after { animation-play-state: paused; }
.featured.no-auto .featured-thumb.is-active::after { animation: none; }
@keyframes thumb-progress { from { width: 0; } to { width: 100%; } }

/* 暫停／恢復自動輪播（縮圖列最右邊那一顆）。自動換頁的內容要給人一個
   停下來的開關 —— 滑鼠停留會暫停，但手機沒有滑鼠，這顆是觸控與鍵盤
   使用者唯一的開關。按下去顯示播放三角，再按一次恢復。 */
.featured-toggle {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 50%;
  background: rgb(10 14 28 / 0.55);
  color: var(--washi-dim);
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.featured-toggle:hover { color: var(--washi); border-color: var(--foxfire); background: rgb(10 14 28 / 0.8); }
.featured-toggle[hidden] { display: none; }
.featured-toggle svg { width: 16px; height: 16px; }
.featured-toggle .ico-play { display: none; }
.featured-toggle[aria-pressed="true"] .ico-play { display: block; }
.featured-toggle[aria-pressed="true"] .ico-pause { display: none; }

/* 沒有滑鼠的裝置（平板）看不到「停上去才浮出來」的箭頭 —— 直接顯示。
   手機（640px 以下）本來就把箭頭拿掉，用手指滑。 */
@media (hover: none) and (min-width: 641px) {
  .featured-arrow { opacity: 0.85; }
}

@media (max-width: 900px) {
  .featured-figure-l { display: none; }
  .featured-figure-r { right: -4%; height: 84%; opacity: 0.85; }
}
@media (max-width: 640px) {
  .featured { border-radius: var(--radius-lg); margin-top: 1rem; }
  .featured-slide { height: clamp(380px, 62vh, 500px); }
  .featured-figure-r { right: -14%; height: 70%; opacity: 0.6; }
  .featured-body { padding: 1.6rem 1.3rem 1.8rem; max-width: 100%; }
  .featured-slide::after {
    background:
      linear-gradient(180deg, rgb(10 14 28 / 0.2) 0%, rgb(10 14 28 / 0.15) 40%, rgb(10 14 28 / 0.92) 100%);
  }
  .featured-arrow { display: none; }
  .featured-bar { padding: 0.6rem 0.8rem; gap: 0.7rem; }
  .featured-thumb { width: 74px; border-radius: 7px; }
  .featured-toggle { width: 32px; height: 32px; }
}

/* --- 賣點（未登入）------------------------------------------------------
   一條玻璃橫幅切成三格，不是三張卡。 */

.pitch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 1rem 0 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.035), rgb(255 255 255 / 0.012));
  box-shadow: var(--edge);
  overflow: hidden;
}
.pitch-item {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1.1rem 1.3rem;
}
.pitch-item + .pitch-item { border-left: 1px solid var(--line); }
.pitch-ico {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgb(245 201 122 / 0.12);
  border: 1px solid rgb(245 201 122 / 0.22);
  color: var(--lantern);
}
.pitch-ico svg { width: 18px; height: 18px; }
.pitch-text strong { display: block; font-size: 0.95rem; margin-bottom: 0.15rem; }
.pitch-text span { font-size: 0.84rem; color: var(--washi-faint); }
@media (max-width: 760px) {
  .pitch { grid-template-columns: 1fr; }
  .pitch-item + .pitch-item { border-left: 0; border-top: 1px solid var(--line); }
}

/* --- 橫向列（繼續玩、介紹頁的另外九款）--------------------------------- */

.rail {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 0.3rem 0.2rem 1rem;
  margin: 0 -0.2rem;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }

.rail-card {
  position: relative;
  flex: 0 0 240px;
  scroll-snap-align: start;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ink-card);
  box-shadow: var(--shadow-card);
  transition: transform 0.28s var(--ease), box-shadow 0.28s ease, border-color 0.28s ease;
}
.rail-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: transparent; }
/* ⚠ height: auto 一定要寫：<img> 上有 width/height 屬性（給瀏覽器預留版位用），
   而屬性的 height 會蓋掉 aspect-ratio —— 少了這一行，圖會被撐成 240×420 再
   用 object-fit 裁到只剩中間一小塊（2026-09-18 實際踩到）。 */
.rail-art { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.5s var(--ease); }
.rail-card:hover .rail-art { transform: scale(1.05); }
.rail-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.7rem 0.9rem 0.8rem;
}
.rail-name { font-weight: 800; font-size: 0.95rem; }
.rail-play {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--foxfire);
}
.rail-play .ico-sm { width: 12px; height: 12px; }
.rail-kind { font-size: 0.74rem; color: var(--washi-faint); flex: none; }
.rail-others .rail-card { flex-basis: 222px; }

/* --- 玩法篩選 ------------------------------------------------------------ */

.kind-filter[hidden] { display: none; }
.kind-filter, .chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.2rem; }

.chip {
  padding: 0.42rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgb(255 255 255 / 0.03);
  color: var(--washi-dim);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.chip:hover { color: var(--washi); border-color: rgb(138 215 240 / 0.5); }
.chip.is-active {
  color: var(--foxfire);
  background: rgb(138 215 240 / 0.12);
  border-color: rgb(138 215 240 / 0.45);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08);
}

/* --- 遊戲卡片牆 ---------------------------------------------------------- */

.games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(262px, 1fr));
  gap: 1.2rem;
}
.games-empty { color: var(--washi-faint); font-size: 0.9rem; padding: 2rem 0; text-align: center; }

.game {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(180deg, var(--ink-card-2), var(--ink-card));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease, border-color 0.3s ease;
  animation: rise 0.55s var(--ease) both;
}
.game:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); border-color: transparent; }
.game[hidden] { display: none; }
.game:focus-within { box-shadow: var(--shadow-lift); }

/* 進場：由下往上淡入，一張接一張。 */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.game:nth-child(1) { animation-delay: 0.02s; }
.game:nth-child(2) { animation-delay: 0.06s; }
.game:nth-child(3) { animation-delay: 0.1s; }
.game:nth-child(4) { animation-delay: 0.14s; }
.game:nth-child(5) { animation-delay: 0.18s; }
.game:nth-child(6) { animation-delay: 0.22s; }
.game:nth-child(7) { animation-delay: 0.26s; }
.game:nth-child(8) { animation-delay: 0.3s; }
.game:nth-child(9) { animation-delay: 0.34s; }
.game:nth-child(10) { animation-delay: 0.38s; }

/* 每款的主題色（封面載不到時的底色）。色值對齊 slotgame 的 meta.json。 */
.game[data-game="aki_amaterasu"] { --tint: #1a1430; }
.game[data-game="aki_matsuri"]   { --tint: #0b1128; }
.game[data-game="aki_hyakki"]    { --tint: #0a0c0e; }
.game[data-game="aki_yukionna"]  { --tint: #101825; }
.game[data-game="aki_ryugu"]     { --tint: #02161a; }
.game[data-game="aki_sengoku"]   { --tint: #120a08; }
.game[data-game="aki_hanazono"]  { --tint: #1d211a; }
.game[data-game="aki_momotaro"]  { --tint: #2b1a10; }
.game[data-game="aki_ninpo"]     { --tint: #0c120e; }
.game[data-game="aki_senryo"]    { --tint: #1c1209; }

.game-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(80% 65% at 50% 22%, rgb(255 255 255 / 0.11), transparent 68%),
    var(--tint, var(--ink-2));
}
/* 層級由下往上：家紋 0 → 盒繪 1 → 暗角 2 → 編號與分類 2 → 主連結熱區 3 → 「介紹」4 → 開啟中 5 */
.game-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgb(10 14 28 / 0.12) 0%, transparent 30%, transparent 60%, rgb(10 14 28 / 0.55) 100%);
}
.game-crest { width: 40%; max-width: 110px; opacity: 0.85; filter: drop-shadow(0 4px 14px rgb(0 0 0 / 0.5)); }
.game-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.game:hover .game-art { transform: scale(1.05); }

/* 封面上的兩個小籤：左上圖鑑編號、右上玩法分類。 */
.game-no, .game-kind {
  position: absolute;
  top: 0.7rem;
  z-index: 2;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: rgb(10 14 28 / 0.7);
  border: 1px solid rgb(255 255 255 / 0.14);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.4;
}
.game-no {
  left: 0.8rem;
  font-family: var(--font-latin);
  letter-spacing: 0.14em;
  color: rgb(242 237 226 / 0.78);
}
.game-kind { right: 0.8rem; color: var(--foxfire); letter-spacing: 0.06em; }

.game-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: rgb(10 14 28 / 0.82);
  backdrop-filter: blur(3px);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--foxfire);
}
.game.is-opening, .rail-card.is-opening { pointer-events: none; }
.game.is-opening .game-loading, .rail-card.is-opening .game-loading { display: flex; }

.game-body {
  padding: 1rem 1.15rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}
.game-head { display: flex; flex-direction: column; gap: 0.1rem; }
.game-name { margin: 0; font-size: 1.15rem; font-weight: 800; letter-spacing: 0.03em; line-height: 1.3; }
.game-link::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.game-link:focus-visible { outline: none; }
.game-romaji {
  font-family: var(--font-latin);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--washi-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-tagline {
  font-size: 0.86rem;
  color: var(--washi-dim);
  line-height: 1.6;
  margin: 0.15rem 0 0;
  flex: 1;
}
.game-foot { display: flex; align-items: center; gap: 0.7rem; margin-top: 0.95rem; }

.game-about {
  position: relative;
  z-index: 4;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--washi-faint);
  transition: color 0.16s ease;
}
.game-about:hover { color: var(--foxfire); }

/* 「開始玩」是視覺（整張卡片就是連結），但要長得像一顆按鈕。 */
.game-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.44rem 0.95rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
  color: #06202c;
  background: linear-gradient(180deg, #ade5f7, var(--foxfire-deep));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.55), 0 8px 18px -10px rgb(138 215 240 / 0.7);
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease;
}
.game:hover .game-cta { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.6), 0 12px 24px -10px rgb(138 215 240 / 0.9); }
.game-cta svg { width: 12px; height: 12px; }

/* --- 遊戲頁（iframe 舞台）------------------------------------------------- */

.stage { width: min(1400px, 100% - 2rem); margin: 1rem auto; }

/* 高度是「視窗剩下的全部」。遊戲本身 1920×900 等比縮放，
   該留多少黑邊由它自己決定。 */
.stage-frame {
  position: relative;
  width: 100%;
  height: calc(100dvh - 52px - 2rem);
  min-height: 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.stage-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 1; }
.stage-loading {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  color: var(--washi-faint);
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .stage { width: 100%; margin: 0; }
  .stage-frame { height: calc(100dvh - 52px); border-radius: 0; border: 0; }
}

/* 全畫面。⚠ :fullscreen 與 :-webkit-full-screen 要分成兩條規則：
   selector list 裡只要有一個瀏覽器看不懂，整條會被丟掉。 */
.stage-frame:fullscreen { width: 100vw; height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
.stage-frame:-webkit-full-screen { width: 100vw; height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
.stage-frame::backdrop { background: var(--ink); }

.stage-controls { display: none; position: absolute; top: 14px; right: 14px; z-index: 3; gap: 0.5rem; }
.stage-frame:fullscreen .stage-controls { display: flex; }
.stage-frame:-webkit-full-screen .stage-controls { display: flex; }

.stage-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 0.18);
  background: rgb(10 14 28 / 0.7);
  backdrop-filter: blur(8px);
  color: var(--washi);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.3;
  transition: opacity 0.16s ease, border-color 0.16s ease;
}
.stage-controls:hover .stage-btn, .stage-btn:focus-visible { opacity: 1; }
.stage-btn:hover { border-color: var(--foxfire); }
.stage-btn svg { width: 16px; height: 16px; flex: none; }
.stage-btn[hidden] { display: none; }
/* 全畫面切換鈕：沒進全畫面時是「展開」，進了換成「收合」。 */
.stage-btn .fs-on, .stage-btn[aria-pressed="true"] .fs-off { display: none; }
.stage-btn[aria-pressed="true"] .fs-on { display: block; }
@media (hover: none) { .stage-btn { opacity: 0.85; } }

/* 手機橫放。橫過來寬度超過 720px，會掉進桌機那組規則：頁首 52px、四周
   留白、圓角 —— 本來就只剩三百多 px 高，盤面再被吃掉一截。
   2026-09-18 被回報：iPhone 橫放時盤面沒辦法全畫面。

   所以矮的觸控橫向螢幕：頁首收掉，舞台鋪滿整個視窗，出口改由浮在
   左上角的 .stage-controls 提供（跟全畫面時同一組，只留圖示）。
   iPhone Safari 沒有元素全畫面可用，這已經是它能給的最大盤面；
   Android 的 Chrome 另外還有那顆全畫面可以把網址列也收掉。

   ⚠ 限定 pointer: coarse：桌機把視窗拉矮不該把頁首跟餘額收掉。
   ⚠ viewport-fit=cover：橫放時瀏海在側邊，iframe 要讓開 safe-area，
     讓開的那一條由 .stage-frame 的黑底補上。 */
@media (orientation: landscape) and (max-height: 540px) and (pointer: coarse) {
  body.is-bare { overflow: hidden; }
  body.is-bare .top-bare { display: none; }
  .stage { width: 100%; margin: 0; }
  .stage-frame { height: 100dvh; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
  /* ⚠ 不能用 inset 四邊 + width: auto：iframe 是置換元素，auto 會退回 300×150。 */
  .stage-frame iframe {
    top: env(safe-area-inset-top, 0px);
    left: env(safe-area-inset-left, 0px);
    width: calc(100% - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    height: calc(100% - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }
  .stage-controls {
    display: flex;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    right: auto;
    left: calc(env(safe-area-inset-left, 0px) + 8px);
  }
  /* 全畫面鈕只留圖示；「離開」一定要帶字 —— 只有一個 ✕ 的話，遊戲裡的
     規則、注單視窗打開時畫面上會有兩個 ✕，玩家想關視窗卻按到這顆、整個
     離開遊戲（2026-09-18 被回報）。 */
  .stage-controls [data-fullscreen-toggle] { padding: 0.5rem; }
  .stage-controls [data-fullscreen-toggle] span { display: none; }
  .stage-controls .stage-btn { padding-block: 0.4rem; font-size: 0.78rem; }
}

/* 遊戲頁的 slim 頁首 */
.top-bare { height: 53px; }
.top-inner-bare {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  height: 52px;
  width: min(1400px, 100% - 1.6rem);
  margin-inline: auto;
}
.btn-leave:hover { border-color: var(--torii); color: #ffb3ae; background: rgb(217 71 63 / 0.08); }
.btn-fs[hidden] { display: none; }
.bare-title { flex: 1; text-align: center; font-weight: 800; font-size: 0.98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- 表單面板 ------------------------------------------------------------ */

.panel {
  max-width: 440px;
  margin: 3.2rem auto;
  padding: 2.2rem 2.2rem 2rem;
  background: linear-gradient(180deg, var(--ink-card-2), var(--ink-card));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), 0 0 80px -30px rgb(138 215 240 / 0.25);
}
.panel-center { text-align: center; }
.panel h1 { margin: 0 0 0.3rem; font-size: 1.55rem; font-weight: 800; letter-spacing: 0.04em; }
.panel .lede { margin: 0 0 1.6rem; color: var(--washi-dim); font-size: 0.92rem; }
.panel-center .spinner-lg { margin: 0 auto 1rem; }
.panel-note { margin: 0 0 1.2rem; font-size: 0.85rem; color: var(--washi-faint); text-align: left; }
.panel-mark { display: flex; justify-content: center; margin-bottom: 0.8rem; }
.panel-mark .brand-mark { width: 56px; height: 56px; }

.error-code {
  margin-bottom: 0.6rem;
  font-family: var(--font-latin);
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgb(138 215 240 / 0.5);
  font-variant-numeric: tabular-nums;
}

.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--washi-dim); margin-bottom: 0.4rem; }
.field input {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgb(10 14 28 / 0.7);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--washi);
  font: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.field input::placeholder { color: var(--washi-faint); }
.field input:focus { outline: none; border-color: var(--foxfire); box-shadow: 0 0 0 4px rgb(138 215 240 / 0.14); }

.field-with-action { position: relative; }
.field-with-action input { padding-right: 4rem; }
.field-action {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.35rem 0.6rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--washi-faint);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.field-action:hover { color: var(--foxfire); }
.field-action[hidden] { display: none; }

.panel-foot { margin-top: 1.2rem; font-size: 0.85rem; color: var(--washi-faint); text-align: center; line-height: 1.8; }
.panel-foot a { color: var(--foxfire); font-weight: 700; }

/* --- 登入／註冊：左圖右表單 ---------------------------------------------
   左欄是主打那一款的場景與角色（跟大廳主視覺同一組檔案），
   右欄是 .panel。手機上左欄不出現。 */

.auth {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: calc(100dvh - var(--top-h));
}
.auth-art {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  padding: 3rem 3rem 3.2rem;
}
.auth-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(1.15) saturate(1.1);
}
.auth-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgb(10 14 28 / 0.2), rgb(10 14 28 / 0.05) 50%, var(--ink) 100%),
    linear-gradient(180deg, rgb(10 14 28 / 0.35), transparent 40%, rgb(10 14 28 / 0.88) 100%);
}
.auth-figure {
  position: absolute;
  right: 6%;
  bottom: 0;
  z-index: 2;
  height: 86%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgb(0 0 0 / 0.6));
  pointer-events: none;
}
.auth-art-body { position: relative; z-index: 3; max-width: 24rem; }
.auth-art-title {
  margin: 0.4rem 0 1rem;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-shadow: 0 6px 30px rgb(0 0 0 / 0.7);
}
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.auth-points li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--washi-dim);
  font-size: 0.95rem;
  text-shadow: 0 2px 10px rgb(0 0 0 / 0.8);
}
.auth-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--foxfire);
  transform: rotate(45deg);
}
.auth-panel { align-self: center; justify-self: center; width: min(440px, 100% - 2rem); margin: 3rem 1rem; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth-art { display: none; }
  .auth-panel { margin: 2.6rem auto; }
}

/* --- 補給（商店）---------------------------------------------------------
   ⚠ 這裡最容易寫成賭場。規則：用「補給」不用「儲值」；方案最多一個掛註記；
     沒有倒數、沒有「限時」；台幣金額用小字、次要顏色。 */

.packs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
  margin-top: 0.4rem;
}
.pack {
  position: relative;
  padding: 2rem 1.3rem 1.4rem;
  background: linear-gradient(180deg, var(--ink-card-2), var(--ink-card));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.28s var(--ease), box-shadow 0.28s ease;
}
.pack:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.pack-plate {
  width: 118px;
  height: 118px;
  margin: 0 auto 0.7rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 38%, rgb(245 201 122 / 0.2), rgb(245 201 122 / 0.05) 62%, transparent 72%);
  border: 1px solid rgb(245 201 122 / 0.18);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08);
}
.pack-art { width: 84px; height: 84px; }
.pack-name { font-weight: 800; font-size: 1.1rem; letter-spacing: 0.04em; }
.pack-coins {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 1.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--lantern);
  line-height: 1.2;
}
.pack-coins .coins-icon { width: 26px; height: 26px; }
.pack-unit { font-size: 0.7rem; letter-spacing: 0.16em; color: var(--washi-faint); margin-top: -0.3rem; }
.pack-price { font-size: 0.86rem; color: var(--washi-faint); margin: 0.2rem 0 0.9rem; }
.pack-note {
  position: absolute;
  top: -0.7rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.14rem 0.8rem;
  border-radius: 999px;
  background: var(--ink-2);
  border: 1px solid rgb(138 215 240 / 0.4);
  color: var(--foxfire);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}
.pack button { margin-top: auto; }

.fineprint { margin: 2rem 0 0; padding: 0; list-style: none; color: var(--washi-faint); font-size: 0.82rem; max-width: 56ch; }
.fineprint li { margin: 0.35rem 0; padding-left: 1rem; position: relative; }
.fineprint li::before { content: "·"; position: absolute; left: 0.25rem; }
.fineprint strong { color: var(--washi-dim); font-weight: 700; }
.fineprint a { color: var(--foxfire); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgb(138 215 240 / 0.4); }

/* 補給頁：按下「取得」之前的告知（狐幣立即發放、不適用七日解除權）。
   ⚠ 放在方案**上面**：法規要的是「事先」告知並取得同意，它得在按鈕之前
     被看到，放在方案下面的小字裡等於沒講。 */
.shop-terms {
  margin: 0 0 1.4rem;
  padding: 0.8rem 1rem;
  max-width: 60rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--lantern-deep);
  border-radius: var(--radius-sm);
  background: rgb(255 255 255 / 0.03);
  color: var(--washi-dim);
  font-size: 0.85rem;
  line-height: 1.7;
}
.shop-terms strong { color: var(--washi); font-weight: 700; }
.shop-terms a {
  color: var(--foxfire);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgb(138 215 240 / 0.4);
}

/* --- 錢包 ---------------------------------------------------------------- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.9rem;
  margin-bottom: 2.2rem;
}
.stat {
  padding: 1.05rem 1.15rem;
  background: linear-gradient(180deg, var(--ink-card-2), var(--ink-card));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: var(--shadow-card);
}
.stat-hero {
  background:
    radial-gradient(90% 120% at 15% 0%, rgb(245 201 122 / 0.16), transparent 70%),
    linear-gradient(180deg, var(--ink-card-2), var(--ink-card));
  border-color: rgb(245 201 122 / 0.3);
}
.stat-label { font-size: 0.74rem; font-weight: 700; color: var(--washi-faint); letter-spacing: 0.08em; }
.stat-value { display: flex; align-items: center; gap: 0.4rem; font-size: 1.55rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-value small { font-size: 0.8rem; font-weight: 700; color: var(--washi-faint); margin-left: 0.1rem; }
.stat-value-sm { font-size: 1.08rem; }
.stat-action { margin-top: 0.15rem; font-size: 0.8rem; font-weight: 700; color: var(--lantern); }
.stat-action:hover { color: #fff; }

.ledger-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 0.4rem; }
.ledger-title { margin: 0; font-size: 1.1rem; font-weight: 800; letter-spacing: 0.04em; }
.ledger-head .chips { margin-bottom: 0; }

.ledger {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
  margin-top: 1rem;
  background: var(--ink-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.ledger th { text-align: left; font-weight: 700; color: var(--washi-faint); font-size: 0.74rem; letter-spacing: 0.06em; padding: 0.75rem 1rem; background: rgb(255 255 255 / 0.03); border-bottom: 1px solid var(--line); }
.ledger td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.ledger tbody tr:last-child td { border-bottom: 0; }
.ledger tbody tr:hover td { background: rgb(255 255 255 / 0.025); }
.col-num { text-align: right; }
.amount-in { color: var(--foxfire); font-weight: 700; }
.amount-out { color: var(--washi-faint); }
.ledger-more { margin-top: 0.8rem; font-size: 0.8rem; color: var(--washi-faint); }
.wallet-foot { margin: 2rem 0 0; font-size: 0.82rem; color: var(--washi-faint); }

@media (max-width: 640px) {
  .ledger { margin-top: 0.8rem; background: transparent; border: 0; border-radius: 0; overflow: visible; }
  .ledger thead { display: none; }
  .ledger, .ledger tbody, .ledger tr, .ledger td { display: block; width: 100%; }
  .ledger tr { background: var(--ink-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.7rem 0.9rem; margin-bottom: 0.6rem; }
  .ledger td { border: 0; padding: 0.16rem 0; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
  .ledger td::before { content: attr(data-label); color: var(--washi-faint); font-size: 0.76rem; flex: none; }
  .col-num { text-align: right; font-weight: 700; }
}

/* --- 空狀態 -------------------------------------------------------------- */

.empty { padding: 3rem 1rem; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); margin-top: 1rem; }
.empty p { margin: 0 0 1.2rem; color: var(--washi-faint); }

/* --- 麵包屑 --------------------------------------------------------------
   介紹頁（主視覺底部那條導覽列裡）與資訊頁的第一行。很淡，不搶主視覺。 */

.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 1.1rem 0 0;
  font-size: 0.8rem;
  color: var(--washi-faint);
}
.crumbs a { color: var(--washi-dim); }
.crumbs a:hover { color: var(--foxfire); }
.crumbs-sep { opacity: 0.5; }
.crumbs [aria-current="page"] { color: var(--washi); }

/* --- 遊戲介紹頁 ---------------------------------------------------------- */

.about { position: relative; }

.about-hero {
  position: relative;
  min-height: min(74vh, 660px);
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  margin-top: calc(-1 * var(--top-h));
  padding: calc(var(--top-h) + 3rem) 1rem 6.2rem;
  border-bottom: 1px solid var(--line);
}
.about-bg, .about-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.about-bg { filter: brightness(1.4) saturate(1.15); }
.about-video { opacity: 0; transition: opacity 0.8s ease; z-index: 1; }
.about-video.is-playing { opacity: 1; }
.about-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgb(10 14 28 / 0.62) 0%, rgb(10 14 28 / 0.08) 30%, rgb(10 14 28 / 0.12) 60%, rgb(10 14 28 / 0.86) 90%, var(--ink) 100%);
}
.about-figure {
  position: absolute;
  bottom: 52px;
  z-index: 3;
  height: min(86%, 520px);
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 16px 36px rgb(0 0 0 / 0.6));
  pointer-events: none;
}
.about-figure-l { left: max(3vw, 12px); }
.about-figure-r { right: max(3vw, 12px); }
.about-hero-inner { position: relative; z-index: 4; text-align: center; max-width: 38rem; }

/* 家紋，裝在一個玻璃的圓印裡 */
.about-seal {
  width: 76px;
  height: 76px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgb(10 14 28 / 0.58);
  border: 1px solid rgb(255 255 255 / 0.18);
  box-shadow: 0 0 0 6px rgb(255 255 255 / 0.04), 0 10px 30px -10px rgb(0 0 0 / 0.7);
}
.about-seal .game-crest { width: 50px; opacity: 0.92; }

.about-chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.chip-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.26rem 0.78rem;
  border-radius: 999px;
  background: rgb(10 14 28 / 0.66);
  border: 1px solid rgb(255 255 255 / 0.18);
  color: var(--washi-dim);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.chip-tag-kind { color: var(--foxfire); border-color: rgb(138 215 240 / 0.4); background: rgb(138 215 240 / 0.1); }

.about-title { margin: 0; font-size: clamp(2.3rem, 6vw, 3.9rem); font-weight: 900; line-height: 1.12; letter-spacing: 0.08em; text-shadow: 0 6px 30px rgb(0 0 0 / 0.75); }
.about-romaji { margin: 0.5rem 0 0; font-family: var(--font-latin); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.36em; text-transform: uppercase; color: var(--lantern); }
.about-tagline { margin: 1.1rem auto 1.7rem; color: var(--washi-dim); font-size: 1.04rem; max-width: 30ch; text-shadow: 0 2px 12px rgb(0 0 0 / 0.85); }
.about-cta { display: flex; justify-content: center; gap: 0.7rem; flex-wrap: wrap; }
.about-cta-note { margin: 0.9rem 0 0; font-size: 0.8rem; color: var(--washi-faint); text-shadow: 0 2px 8px rgb(0 0 0 / 0.8); }

/* 主視覺底部的導覽列：麵包屑 + 章節捷徑 */
.about-hero-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  border-top: 1px solid rgb(255 255 255 / 0.08);
  background: rgb(10 14 28 / 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.about-hero-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 52px;
}
.about-hero-bar .crumbs { padding: 0; flex-wrap: nowrap; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jump { display: flex; gap: 0.15rem; flex: none; }
.jump a {
  padding: 0.36rem 0.85rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--washi-dim);
  transition: color 0.16s ease, background 0.16s ease;
}
.jump a:hover { color: var(--washi); background: rgb(255 255 255 / 0.07); }

/* 章節 */
.about-section { margin: 3.6rem 0; scroll-margin-top: calc(var(--top-h) + 1rem); }
.about-head { display: flex; gap: 1.2rem; align-items: flex-start; margin: 0 0 1.5rem; }
.about-no {
  flex: none;
  padding-top: 0.15rem;
  font-family: var(--font-latin);
  font-size: 3rem;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgb(138 215 240 / 0.5);
  font-variant-numeric: tabular-nums;
}
.about-no:empty { display: none; }
.about-head-text { min-width: 0; }
.about-h2 { margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: 0.05em; line-height: 1.25; }
.about-h3 { margin: 1.8rem 0 0.8rem; font-size: 0.92rem; font-weight: 800; letter-spacing: 0.08em; color: var(--washi-dim); }
.about-lede { margin: 0.5rem 0 0; color: var(--washi-faint); font-size: 0.9rem; max-width: 60ch; }
.about-lede b { color: var(--foxfire); font-weight: 800; }

/* 遊戲資料：介紹頁主視覺下方的一條資訊列（開發、玩法、盤面、平台、費用），
   像遊戲商店頁的那一條。關於頁的「營運資訊」用同一個元件。
   ⚠ minmax 的下限決定手機上是一欄還是兩欄 —— 9rem 在 375px 寬是兩欄，
     再大就變成五列疊下來。 */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  margin: 2.2rem 0 0;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.035), rgb(255 255 255 / 0.015));
  box-shadow: var(--edge);
}
.fact { min-width: 0; margin: 0; padding: 0.65rem 0.9rem; }
.fact dt {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--washi-faint);
}
.fact dd {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--washi);
  overflow-wrap: anywhere;
}
.fact dd a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgb(138 215 240 / 0.45);
  text-underline-offset: 3px;
}
.fact dd a:hover { color: var(--foxfire); text-decoration-color: currentColor; }
/* 內文裡（關於頁的營運資訊）欄寬比較窄，一格要放得下一整個信箱。 */
.prose .facts { margin: 0 0 1.3rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.prose .fact dd { overflow-wrap: break-word; }

/* 宣傳片 */
.trailer {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-card), 0 0 80px -30px rgb(138 215 240 / 0.3);
  background: #000;
  aspect-ratio: 16 / 9;
}
.trailer-video { width: 100%; height: 100%; object-fit: cover; }

/* 怎麼玩 */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0.9rem;
}
.step {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  background: linear-gradient(180deg, var(--ink-card-2), var(--ink-card));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.step-no {
  flex: none;
  width: 2.4rem;
  font-family: var(--font-latin);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--foxfire);
  font-variant-numeric: tabular-nums;
}
.step-text { min-width: 0; }
.step-title { margin: 0 0 0.3rem; font-size: 1.02rem; font-weight: 800; }
.step-body { margin: 0; color: var(--washi-dim); font-size: 0.9rem; line-height: 1.7; }
.step-body b { color: var(--washi); font-weight: 800; }

/* 圖鑑 —— 不是賠付表：沒有賠率數字，強度用星星。 */
.codex {
  list-style: none;
  padding: 0;
  margin: 0 0 0.6rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.8rem;
}
.codex-low { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.codex-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.8rem 0.7rem 0.9rem;
  background: linear-gradient(180deg, var(--ink-card-2), var(--ink-card));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--edge);
  transition: transform 0.25s var(--ease), border-color 0.25s ease, box-shadow 0.25s ease;
}
.codex-item:hover { transform: translateY(-3px); border-color: rgb(138 215 240 / 0.4); box-shadow: var(--shadow-card); }
.codex-frame {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin-bottom: 0.4rem;
  border-radius: 14px;
  background: radial-gradient(60% 60% at 50% 42%, rgb(255 255 255 / 0.09), transparent 72%);
}
.codex-img { width: auto; height: auto; max-width: 78%; max-height: 78%; object-fit: contain; filter: drop-shadow(0 8px 14px rgb(0 0 0 / 0.55)); }
.codex-low .codex-img { max-width: 68%; max-height: 68%; }
.codex-name { font-size: 0.88rem; font-weight: 800; }
.codex-stars { font-size: 0.72rem; color: var(--lantern); letter-spacing: 0.08em; }
.codex-stars-off { color: rgb(110 120 150 / 0.4); }
.codex-special { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.codex-item-wide { flex-direction: row; align-items: center; gap: 1rem; text-align: left; padding: 0.9rem 1.1rem 0.9rem 0.9rem; }
.codex-item-wide .codex-frame { width: 84px; flex: none; margin: 0; }
.codex-wide-text { min-width: 0; display: flex; flex-direction: column; }
.codex-role {
  align-self: flex-start;
  margin-bottom: 0.3rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  background: var(--torii);
  color: #fff;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.codex-note { margin: 0.2rem 0 0; font-size: 0.83rem; color: var(--washi-faint); line-height: 1.55; }

/* 物語 */
.about-story { max-width: 46rem; }
.epigraph {
  margin: 0 0 2rem;
  padding: 1.1rem 1.4rem;
  border-left: 3px solid var(--torii);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgb(217 71 63 / 0.06);
  color: var(--washi-dim);
  font-size: 0.98rem;
  line-height: 1.9;
}
.chapter { margin-bottom: 2.4rem; }
.chapter-h {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.7rem;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--washi);
}
/* 章節前面一枚小小的朱印 */
.chapter-h::before {
  content: "";
  flex: none;
  width: 0.5em;
  height: 0.5em;
  border-radius: 2px;
  background: var(--torii);
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgb(217 71 63 / 0.5);
}
.chapter p { margin: 0 0 1rem; color: var(--washi-dim); line-height: 1.95; font-size: 0.97rem; }
.chapter p b { color: var(--washi); font-weight: 800; }

/* 結尾橫幅：這一款自己的場景與角色 */
.about-end {
  position: relative;
  margin: 4.2rem 0 0;
  min-height: 400px;
  padding: 3.6rem 1.5rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-xl);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line-strong);
  background: var(--ink-2);
  box-shadow: var(--shadow-card), 0 0 100px -40px rgb(138 215 240 / 0.35);
}
.about-end-bg {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  object-fit: cover;
  z-index: 0;
  filter: blur(7px) brightness(0.95) saturate(1.15);
}
.about-end::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    var(--shippo),
    linear-gradient(180deg, rgb(10 14 28 / 0.4) 0%, rgb(10 14 28 / 0.62) 60%, rgb(10 14 28 / 0.82) 100%);
}
.about-end-figure {
  position: absolute;
  bottom: 0;
  z-index: 2;
  height: 92%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 16px 36px rgb(0 0 0 / 0.6));
  pointer-events: none;
}
.about-end-figure-l { left: 4%; }
.about-end-figure-r { right: 4%; }
.about-end-inner { position: relative; z-index: 3; text-align: center; max-width: 34rem; }
.about-end-title {
  margin: 0.5rem 0 0.6rem;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-shadow: 0 6px 30px rgb(0 0 0 / 0.75);
}
.about-end-tagline { margin: 0 0 1.6rem; color: var(--washi-dim); font-size: 1rem; text-shadow: 0 2px 12px rgb(0 0 0 / 0.85); }

.about-others { margin-top: 3.6rem; }
.about-back { margin: 0.6rem 0 0; }

@media (max-width: 1080px) {
  .about-end-figure { height: 74%; opacity: 0.7; }
  .about-end-figure-l { left: -4%; }
  .about-end-figure-r { right: -4%; }
}
@media (max-width: 900px) {
  .about-figure { display: none; }
  .about-hero { min-height: 52vh; }
  .about-no { font-size: 2.4rem; }
}
@media (max-width: 720px) {
  .about-hero { padding-top: calc(var(--top-h) + 2.2rem); padding-bottom: 5.6rem; }
  .about-hero-bar-inner { height: 46px; }
  .jump a { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
  .about-end { min-height: 340px; padding: 3rem 1.2rem; }
  .about-end-figure-l { display: none; }
  .about-end-figure-r { right: -22%; height: 72%; opacity: 0.4; }
  .codex { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
  .codex-low { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  /* ⚠ 「特別的幾個」是橫式的寬卡（圖左、字右），手機上要整排一欄。
     上面那條 .codex 的規則寫在後面、優先權一樣，會把它也切成 118px 的窄欄 ——
     說明文字變成一行一個字（2026-09-18 在 375px 寬實際看到）。 */
  .codex-special { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .about-hero-bar .crumbs { display: none; }
  .about-hero-bar-inner { justify-content: center; }
}

/* --- 資訊頁（關於、常見問題、健康遊玩、條款、隱私）----------------------
   純文字頁。整站唯一需要「一長段字讀起來不累」的地方，所以這裡的規則跟
   別處相反：行寬收窄、行距放大、標題之間留白給足。

   ⚠ 68ch 不是隨便挑的。中文一行超過 40 個字左右眼睛回行就會找錯行，
     而這幾頁（特別是條款）是真的會被從頭讀到尾的。 */

.info-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
  margin-top: 1.2rem;
}
.info-nav {
  position: sticky;
  top: calc(var(--top-h) + 1.4rem);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-top: 0.6rem;
}
.info-nav .kicker { margin: 0 0 0.7rem 0.8rem; letter-spacing: 0.18em; color: var(--washi-faint); }
.info-nav-link {
  padding: 0.5rem 0.8rem;
  border-radius: 10px;
  border-left: 2px solid transparent;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--washi-dim);
  transition: color 0.16s ease, background 0.16s ease;
}
.info-nav-link:hover { color: var(--washi); background: rgb(255 255 255 / 0.04); }
.info-nav-link[aria-current="page"] {
  color: var(--washi);
  background: rgb(255 255 255 / 0.05);
  border-left-color: var(--foxfire);
  border-radius: 0 10px 10px 0;
}

.prose {
  max-width: 68ch;
  margin: 0 0 4rem;
  font-size: 0.97rem;
  line-height: 1.85;
  color: var(--washi-dim);
}
.prose-kicker { margin-bottom: 0.3rem; }
.prose h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.25;
  color: var(--washi);
}
.prose-lede {
  margin: 0 0 2.2rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
  color: var(--washi);
  font-size: 1.04rem;
}
.prose h2 {
  margin: 2.6rem 0 0.8rem;
  font-size: 1.16rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--washi);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
/* 資訊頁的 h2 沒有 kicker，所以留一小截狐火色的線當段落標記。 */
.prose h2::before {
  content: "";
  flex: none;
  width: 4px;
  height: 1.05em;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--foxfire), var(--foxfire-deep));
  box-shadow: 0 0 12px rgb(138 215 240 / 0.5);
}
/* 條款的段落可以被直接連到（補給頁連 /terms#payment）。頁首是固定的，
   不留這段距離的話標題會被蓋在頁首底下。 */
.prose h2[id] { scroll-margin-top: calc(var(--top-h) + 1rem); }
.prose p { margin: 0 0 1.1rem; }
.prose ul { margin: 0 0 1.3rem; padding-left: 1.3rem; }
.prose li { margin: 0 0 0.55rem; }
.prose strong { color: var(--washi); font-weight: 700; }
.prose a { color: var(--foxfire); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgb(138 215 240 / 0.4); }
.prose a:hover { color: var(--lantern); text-decoration-color: currentColor; }
.prose code {
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: rgb(255 255 255 / 0.07);
  border: 1px solid var(--line);
  font-size: 0.88em;
  color: var(--washi);
}
.prose-note {
  margin: 2.6rem 0 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--washi-faint);
}
.prose-back { margin: 2.2rem 0 0; font-size: 0.88rem; }
.prose-back a { color: var(--washi-dim); text-decoration: none; }
.prose-back a:hover { color: var(--foxfire); }

/* 常見問題：每一題一張卡，掃讀時看得出邊界。 */
.faq { display: grid; gap: 0.9rem; margin-bottom: 1rem; }
.faq-item {
  padding: 1.1rem 1.3rem 0.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--ink-card-2), var(--ink-card));
  box-shadow: var(--edge);
}
.faq-item h2 { margin-top: 0.2rem; font-size: 1.04rem; }
.faq-item p { margin-bottom: 1rem; }

@media (max-width: 860px) {
  .info-layout { grid-template-columns: 1fr; gap: 1.2rem; }
  .info-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 0.35rem; padding-top: 0; }
  .info-nav .kicker { display: none; }
  .info-nav-link {
    padding: 0.36rem 0.85rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 0.82rem;
  }
  .info-nav-link[aria-current="page"] {
    border-radius: 999px;
    border-color: rgb(138 215 240 / 0.45);
    background: rgb(138 215 240 / 0.12);
    color: var(--foxfire);
  }
}
@media (max-width: 640px) {
  .prose { font-size: 0.94rem; }
  .prose h2 { margin-top: 2.1rem; }
  .faq-item { padding: 0.95rem 1.05rem 0.3rem; }
}

/* --- 頁尾 ----------------------------------------------------------------
   第四版（2026-09-18）。三欄 → 一條狐幣的告示 → © 與回到頂端，
   然後是夜祭的遠景：每一頁走到最後都走到同一座神社前面。
   結構與改版理由寫在 layout.ts 的 footer()。

   節奏跟全站一樣：欄標題是「拉丁字 kicker ＋ 中文」，連結是 washi-dim、
   hover 變狐火色；朱紅只出現在遠景的鳥居。 */

.foot {
  position: relative;
  z-index: 1;
  margin-top: 5rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.018), transparent 55%);
  color: var(--washi-faint);
  font-size: 0.86rem;
  overflow: hidden;
}
.foot-inner { padding: 3.4rem 0 0; }
.foot-top {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.7fr) minmax(0, 1.2fr);
  gap: 2.4rem clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

/* 商標：跟頁首同一組（面具 ＋ 直排的中文與羅馬字），大一號。 */
.foot-lockup { display: inline-flex; align-items: center; gap: 0.8rem; color: var(--washi); }
.foot-lockup .brand-mark {
  width: 46px;
  height: 46px;
  flex: none;
  filter: drop-shadow(0 6px 14px rgb(0 0 0 / 0.55));
  transition: transform 0.35s var(--ease);
}
.foot-lockup:hover .brand-mark { transform: rotate(-6deg) scale(1.05); }
.foot-name { display: flex; flex-direction: column; line-height: 1.05; }
.foot-name-zh { font-size: 1.28rem; font-weight: 900; letter-spacing: 0.12em; }
.foot-name-en {
  margin-top: 4px;
  font-family: var(--font-latin);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--foxfire);
  opacity: 0.85;
}
.foot-about { margin: 1.1rem 0 1.25rem; max-width: 34ch; line-height: 1.85; color: var(--washi-dim); }
.foot-about a {
  color: var(--washi);
  text-decoration: underline;
  text-decoration-color: rgb(138 215 240 / 0.35);
  text-underline-offset: 3px;
}
.foot-about a:hover { color: var(--foxfire); text-decoration-color: currentColor; }

/* 服務信箱：一顆膠囊，比一行「服務信箱：xxx」好找。 */
.foot-mail {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  max-width: 100%;
  padding: 0.5rem 1rem 0.5rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.03);
  color: var(--washi);
  font-size: 0.84rem;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}
.foot-mail:hover { border-color: rgb(138 215 240 / 0.5); background: rgb(138 215 240 / 0.07); color: var(--foxfire); }
.foot-mail svg { width: 18px; height: 18px; flex: none; color: var(--foxfire); }
.foot-mail > span { min-width: 0; overflow-wrap: anywhere; }
.foot-mail-label { margin-right: 0.5rem; color: var(--washi-faint); font-size: 0.78rem; }

/* 欄標題：kicker 在上、中文在下（跟全站的段落標題同一個節奏）。 */
.foot-h {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0.2rem 0 1rem;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--washi);
}
.foot-links, .foot-games { margin: 0; padding: 0; list-style: none; }
.foot-links { display: grid; gap: 0.1rem; }
.foot-games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.1rem 1.6rem; }
.foot-links a, .foot-games a {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  padding: 0.32rem 0;
  color: var(--washi-dim);
  transition: color 0.16s ease, transform 0.2s var(--ease);
}
.foot-links a:hover, .foot-games a:hover { color: var(--foxfire); transform: translateX(3px); }
/* 圖鑑編號：跟大廳卡片的 No.01 同一套。 */
.foot-no {
  flex: none;
  min-width: 1.5em;
  font-family: var(--font-latin);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--washi-faint);
  transition: color 0.16s ease;
}
.foot-games a:hover .foot-no { color: var(--lantern); }

/* 告示：兩行、整行寬 —— 上面是分級（限制級 18+），下面是狐幣的定義。
   左邊一欄固定寬度放標章與小判，兩行的文字對齊在同一條線上。
   ⚠ word-break: keep-all 讓中文只在標點後面換行 —— 以前是在「不可兌換現」
     與「金」之間斷開。overflow-wrap: anywhere 是單一片語比一行還長時的退路。 */
.foot-notice {
  margin: 2.8rem 0 0;
  padding: 0.3rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgb(245 201 122 / 0.08), rgb(138 215 240 / 0.03) 70%);
  box-shadow: var(--edge);
  color: var(--washi-dim);
  font-size: 0.84rem;
  line-height: 1.75;
}
.foot-notice-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0;
  padding: 0.7rem 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.foot-notice-row + .foot-notice-row { border-top: 1px solid var(--line); }
.foot-notice-ico { flex: none; width: 3.6rem; display: flex; justify-content: center; }
.foot-notice .coins-icon { width: 28px; height: 28px; }
.foot-notice strong { color: var(--washi); font-weight: 700; }

/* 分級標章：「限」＋「18+」。朱紅在這裡是法規標示的顏色，不是裝飾 ——
   全站朱紅只做點綴的規矩，這一塊是例外。 */
.rating {
  display: inline-flex;
  align-items: stretch;
  flex: none;
  border: 1px solid rgb(217 71 63 / 0.7);
  border-radius: 7px;
  overflow: hidden;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
}
.rating-mark {
  display: grid;
  place-items: center;
  padding: 0.3rem 0.4rem;
  background: var(--torii);
  color: #fff;
  font-size: 0.86rem;
}
.rating-age {
  display: grid;
  place-items: center;
  padding: 0.3rem 0.42rem;
  background: rgb(217 71 63 / 0.14);
  color: #ffc4bf;
  font-family: var(--font-latin);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
/* 遊戲資料列裡的那一個：跟文字並排。 */
.fact .rating { margin-right: 0.45rem; }

/* 註冊表單的年齡與條款確認。 */
.field-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.2rem 0 1.1rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--washi-dim);
  cursor: pointer;
}
.field-check input {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0.2rem 0 0;
  accent-color: var(--foxfire-deep);
}
.field-check a { color: var(--foxfire); text-decoration: underline; text-underline-offset: 3px; }

.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  margin-top: 1.4rem;
  font-size: 0.78rem;
}
.foot-copy { display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; margin: 0; }
.foot-totop {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--washi-faint);
  transition: color 0.16s ease;
}
.foot-totop svg { width: 15px; height: 15px; transition: transform 0.2s var(--ease); }
.foot-totop:hover { color: var(--foxfire); }
.foot-totop:hover svg { transform: translateY(-2px); }

/* 遠景。頁尾內容底下的一條場景帶，山與鳥居從下方升上來。
   ⚠ 高度跟著寬度走（15vw）。以前固定 190px：SVG 是 slice 裁切，寬螢幕上
     縮放比例由寬度決定、圖變高，上緣被切掉的正好是鳥居的笠木 ——
     1900px 寬時只剩兩根柱子。高度與寬度等比之後，看得到的永遠是
     viewBox 的下面 216 單位（鳥居從 172 開始），手機上則由 min 150px 撐住。 */
.foot-scene {
  height: clamp(150px, 15vw, 320px);
  margin-top: 1rem;
  pointer-events: none;
  opacity: 0.9;
  mask-image: linear-gradient(180deg, transparent, #000 30%);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%);
}
.sky-svg { width: 100%; height: 100%; display: block; }

@media (max-width: 900px) {
  .foot-top { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
  .foot-brand { grid-column: 1 / -1; }
  .foot-about { max-width: 46ch; }
}
@media (max-width: 560px) {
  .foot-inner { padding-top: 2.6rem; }
  .foot-top { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  /* 手機上站台資訊改成一排膠囊，不要五行直直疊下去。 */
  .foot-links { display: flex; flex-wrap: wrap; gap: 0.45rem; }
  .foot-links a {
    padding: 0.42rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgb(255 255 255 / 0.03);
    font-size: 0.82rem;
  }
  .foot-links a:hover { transform: none; }
  .foot-games { gap: 0.1rem 1rem; }
  .foot-notice { padding: 0.2rem 1rem; }
  .foot-notice-row { align-items: flex-start; }
  .foot-notice-ico { width: 3.2rem; padding-top: 0.2rem; }
}

/* --- 底部導覽（手機）---------------------------------------------------- */

.bnav { display: none; }

@media (max-width: 720px) {
  :root { --top-h: 63px; }
  .tabs, .hide-sm { display: none; }
  .top-inner { gap: 0.6rem; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-name { font-size: 1.08rem; }
  .brand-sub { display: none; }
  .avatar { padding-right: 0.25rem; }

  .bnav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    height: calc(var(--bnav-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgb(10 14 28 / 0.9);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-top: 1px solid var(--line);
  }
  .bnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--washi-faint);
    transition: color 0.16s ease;
  }
  .bnav-item[aria-current="page"] { color: var(--foxfire); }
  .nav-ico { width: 23px; height: 23px; }
  .nav-ico .ico-fill { fill: currentColor; stroke: none; }

  .foot { padding-bottom: var(--bnav-h); }
  body.is-bare .foot { padding-bottom: 0; }
}

@media (max-width: 480px) {
  .hide-xs { display: none; }
  .btn-fs-label { display: none; }
  .btn-fs { padding-inline: 0.6rem; }
  .top-inner-bare { gap: 0.5rem; }
  .bare-title { font-size: 0.9rem; }
}

/* --- 狐火 ---------------------------------------------------------------- */

.foxfire-layer { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.foxfire-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--foxfire);
  filter: blur(1px);
  opacity: 0;
  animation: drift linear infinite;
}
@keyframes drift {
  0% { transform: translateY(20vh) scale(0.6); opacity: 0; }
  15% { opacity: 0.5; }
  85% { opacity: 0.35; }
  100% { transform: translateY(-110vh) scale(1.1); opacity: 0; }
}

/* 使用者關掉動畫時，裝飾停掉；轉圈與進度條是「系統在忙」的訊號，留著。 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .foxfire-layer { display: none; }
  .game, .rail-card, .pack, .btn, .codex-item, .featured-thumb { animation: none !important; transition: none !important; }
  .game:hover, .rail-card:hover, .pack:hover, .btn:hover, .codex-item:hover { transform: none; }
  .game:hover .game-art, .rail-card:hover .rail-art { transform: none; }
  .featured-figure { transition: none; }
  .featured-thumb.is-active::after { animation: none; }
  .spinner { animation-duration: 1.2s !important; }
}
