/* ═══════════════════════════════════════════════════════════════════════════
   電影感深色（2026-10-30 Kevin：照首頁主視覺的方向「大幅修改整個網站」，實驗版未上線）
   取代 foundation.css 開頭那段「攻略站／BBS、不用漸層光暈毛玻璃」的方向：
     · 預設深色（不再跟系統）；頁尾切「淺色」＝ <html data-theme="light">，這支整支不生效、回到舊外觀。
     · 色票：深藍黑底＋玻璃面板（半透明＋模糊＋1px 亮邊）＋橘金漸層重點色；圓角 10–14px。
     · 標題大字漸層；官方視窗框（frame.png 九宮格）換成玻璃卡，標題列改成卡片內的小標。
     · 各頁頂端的場景帶（官方地圖＋角色／怪逐幀）在 React 殼 src/shell/PageStage.jsx。
   載入順序：foundation.css 之後、motion.css 之前（motion 守住互動狀態要最後）。
   ⚠️ 所有規則都掛在 :root:not([data-theme="light"]) 底下，淺色模式一條都不吃。
   ═══════════════════════════════════════════════════════════════════════════ */

:root:not([data-theme="light"]) {
  color-scheme: dark;
  --bg: #0b0d12;
  --bg-sky: #0d1119;
  --bg-paper: #10131a;
  --card: #151922;
  --card-parchment: #151922;
  --card-wood: #191e28;
  --paper: #10131a;
  --frame-body: rgba(21, 25, 34, .78);
  --wood-bar: #0f121a;
  --wood-bar-hi: #262c3a;
  --wood-border: rgba(255, 255, 255, .09);
  --wood-border-dark: rgba(255, 255, 255, .2);
  --line: rgba(255, 255, 255, .06);
  --line-strong: rgba(255, 255, 255, .1);
  --line-gold: rgba(240, 178, 50, .45);
  --text: #d5dae3;
  --text-dark: #f3f5f8;
  --text-brown: #c9ced9;
  --text-title: #ffffff;
  --muted: #8f97a8;
  --muted-brown: #9ba3b4;
  --accent: #ff7a2f;
  --accent-ink: #e8590c;
  --accent-ink-deep: #c2410c;
  --accent-text: #ffa260;
  --gold-text: #f2bd4b;
  --accent-gold-light: #f2bd4b;
  --frame-title: #f3f5f8;
  --row-hover: rgba(255, 255, 255, .035);
  --th-bg: rgba(255, 255, 255, .03);
  --chip-bg: rgba(255, 255, 255, .05);
  --input-bg: rgba(0, 0, 0, .35);
  --sk-hi: #1e2330;
  --tint-warm: rgba(255, 154, 61, .12);
  --tint-red: rgba(237, 66, 69, .14);
  --tint-green: rgba(35, 165, 89, .14);
  --paper-edge: #0e1118;
  --paper-glow: rgba(255, 255, 255, .03);
  --red-text: #ff8a80;
  --green-text: #6fdc9a;
  --gloss: rgba(255, 255, 255, .025);
  --r: 12px; --r-sm: 8px;
  --rad-sm: 6px; --rad-md: 8px; --rad-lg: 12px; --rad-pill: 999px;
  --shadow-wood: 0 1px 0 rgba(255, 255, 255, .04) inset;
  --shadow-card: 0 18px 40px -24px rgba(0, 0, 0, .8);
  --shadow-hover: 0 24px 50px -24px rgba(0, 0, 0, .9);
  --e1: none; --e2: 0 10px 30px -18px rgba(0, 0, 0, .8); --e3: 0 20px 40px -20px rgba(0, 0, 0, .9);
  --glass: rgba(21, 25, 34, .62);
  --glass-hi: rgba(255, 255, 255, .08);
  --grad-accent: linear-gradient(135deg, #ff9a3d, #f2542d);
  --grad-title: linear-gradient(100deg, #ffffff 10%, #ffd58a 60%, #ff8a3d 100%);
}

/* ── 頁面底：深藍黑＋兩團光暈＋極淡網格（固定不捲） ── */
:root:not([data-theme="light"]), :root:not([data-theme="light"]) body {
  background:
    radial-gradient(900px 520px at 12% -120px, rgba(255, 138, 61, .16), transparent 70%),
    radial-gradient(900px 600px at 100% 0%, rgba(88, 101, 242, .14), transparent 65%),
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px) 0 0 / 100% 48px,
    #0b0d12;
  background-attachment: fixed;
  color: var(--text);
}
:root:not([data-theme="light"]) ::selection { background: rgba(255, 122, 47, .4); color: #fff; }

/* ── 標題 ── */
:root:not([data-theme="light"]) #app h1 {
  width: fit-content;   /* 漸層要跟著字寬，不然短標題只吃到開頭的白色 */
  font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.1; letter-spacing: -0.01em;
  background: var(--grad-title); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 24px rgba(255, 138, 61, .18));
}
:root:not([data-theme="light"]) #app h1 + p, :root:not([data-theme="light"]) #app h1 + .sub, :root:not([data-theme="light"]) #app .sub { color: var(--muted); }
:root:not([data-theme="light"]) h2 { color: #fff; }
:root:not([data-theme="light"]) h2::after { background: linear-gradient(90deg, rgba(255, 255, 255, .14), transparent); }

/* ── 頂欄：玻璃條 ── */
:root:not([data-theme="light"]) header.top, :root:not([data-theme="light"]) header.top.is-compact {
  background: rgba(11, 13, 18, .72);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
:root:not([data-theme="light"]) .brand-t b, :root:not([data-theme="light"]) #brand { color: #fff; }
:root:not([data-theme="light"]) .top .nav a.nav-top:not(.on):not(.live-link), :root:not([data-theme="light"]) .top .nav .nav-btn:not(.on) { color: rgba(255, 255, 255, .72); }
:root:not([data-theme="light"]) .top .nav a.nav-top:hover, :root:not([data-theme="light"]) .top .nav .nav-btn:hover { color: #fff; }
:root:not([data-theme="light"]) .top .nav a.nav-top.on, :root:not([data-theme="light"]) .top .nav .nav-btn.on, :root:not([data-theme="light"]) .top .nav a.nav-top[aria-current="page"] { color: #fff; border-bottom-color: #ff8a3d; }
:root:not([data-theme="light"]) .nav-panel {
  background: rgba(17, 20, 28, .92); border: 1px solid var(--glass-hi); border-radius: 14px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8);
}
:root:not([data-theme="light"]) .top .search input { background: rgba(255, 255, 255, .06); border: 1px solid var(--glass-hi); border-radius: 999px; color: #fff; }
:root:not([data-theme="light"]) .auth-btn { border-radius: 999px; }

/* ── 官方視窗框 → 玻璃卡（標題列從框外的白條搬進卡片裡） ── */
:root:not([data-theme="light"]) .frame {
  border: 1px solid var(--glass-hi); border-image: none; border-radius: 14px;
  background: var(--glass); background-clip: border-box;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 24px 50px -30px rgba(0, 0, 0, .9);
  padding: 46px 18px 18px;
}
:root:not([data-theme="light"]) .frame > .frame-t {
  top: 14px; left: 18px; right: 18px; height: 22px;
  font: 700 .9375rem/22px var(--font-display); color: #fff;
}
:root:not([data-theme="light"]) .frame > .frame-t a { color: var(--accent-text); font-family: var(--font-body); }

/* ── 面板、卡片、篩選列 ── */
:root:not([data-theme="light"]) .panel, :root:not([data-theme="light"]) .card, :root:not([data-theme="light"]) .filters,
:root:not([data-theme="light"]) .rk-toolbar, :root:not([data-theme="light"]) .dl2, :root:not([data-theme="light"]) .rk-table {
  background: var(--glass); border: 1px solid var(--glass-hi); border-radius: 14px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
:root:not([data-theme="light"]) .dl2, :root:not([data-theme="light"]) .rk-table { overflow: hidden; }
:root:not([data-theme="light"]) .card { transition: transform var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease); }
:root:not([data-theme="light"]) .card:hover { transform: translateY(-2px); border-color: rgba(255, 162, 96, .45); box-shadow: 0 20px 40px -24px rgba(255, 122, 47, .45); }
:root:not([data-theme="light"]) .card .thumb, :root:not([data-theme="light"]) .mob .sp, :root:not([data-theme="light"]) .gear .ic {
  background: radial-gradient(circle at 50% 60%, rgba(255, 255, 255, .07), rgba(255, 255, 255, .015) 70%);
}

/* ── 籌碼／按鈕／輸入框：膠囊 ── */
:root:not([data-theme="light"]) .chip, :root:not([data-theme="light"]) .rk-chip {
  border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid var(--glass-hi); color: var(--text);
}
:root:not([data-theme="light"]) .chip:hover, :root:not([data-theme="light"]) .rk-chip:hover { background: rgba(255, 255, 255, .1); color: #fff; }
:root:not([data-theme="light"]) .chip.on, :root:not([data-theme="light"]) .rk-chip.on {
  background: var(--grad-accent); border-color: transparent; color: #fff; box-shadow: 0 6px 18px -8px rgba(242, 84, 45, .8);
}
:root:not([data-theme="light"]) .btn { border-radius: 999px; }
:root:not([data-theme="light"]) .btn:not(.ghost) { background: var(--grad-accent); border-color: transparent; color: #fff; }
:root:not([data-theme="light"]) .btn.ghost { background: rgba(255, 255, 255, .06); border: 1px solid var(--glass-hi); color: #fff; }
:root:not([data-theme="light"]) input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), :root:not([data-theme="light"]) select {
  background: rgba(0, 0, 0, .3); border: 1px solid var(--glass-hi); border-radius: 10px; color: #fff;
}
:root:not([data-theme="light"]) input:focus, :root:not([data-theme="light"]) select:focus { border-color: rgba(255, 162, 96, .6); outline: none; box-shadow: 0 0 0 3px rgba(255, 122, 47, .2); }
:root:not([data-theme="light"]) .badge { border-radius: 6px; }

/* ── 表格：透明底、細線、表頭小字 ── */
:root:not([data-theme="light"]) table { background: transparent; }
:root:not([data-theme="light"]) th { background: rgba(255, 255, 255, .03); color: var(--muted); font-size: .8125rem; letter-spacing: .02em; }
:root:not([data-theme="light"]) th, :root:not([data-theme="light"]) td { border-bottom-color: rgba(255, 255, 255, .06); }
:root:not([data-theme="light"]) tbody tr { transition: background var(--dur-1) ease; }
:root:not([data-theme="light"]) tbody tr:hover { background: rgba(255, 255, 255, .035); }
:root:not([data-theme="light"]) .dl2 dt { background: rgba(255, 255, 255, .03); color: var(--muted); }

/* ── 像素素材在深底上：加一點陰影浮起來 ── */
:root:not([data-theme="light"]) img.mob-ico, :root:not([data-theme="light"]) .ico img,
:root:not([data-theme="light"]) .manim, :root:not([data-theme="light"]) .janim { filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .55)); }

/* ── 頁尾 ── */
:root:not([data-theme="light"]) .foot { background: rgba(8, 9, 13, .7); border-top: 1px solid rgba(255, 255, 255, .06); color: var(--muted); }

/* ── 各頁頂端場景帶（src/shell/PageStage.jsx）：標題壓在場景上 ── */
.ps { display: none; }
:root:not([data-theme="light"]) .ps {
  display: block; position: absolute; left: 0; right: 0; top: 0; height: 420px; z-index: 0; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 100%);
}
.ps-bg { position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px); max-width: none; object-fit: cover; filter: blur(3px) saturate(1.2) brightness(.55); }
.ps::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 13, 18, .92) 0%, rgba(11, 13, 18, .55) 45%, rgba(11, 13, 18, .25) 100%); }
.ps-cast { position: absolute; right: max(4vw, calc((100vw - 1180px) / 2 + 24px)); top: 230px; translate: 0 -100%; z-index: 1; display: flex; align-items: flex-end; gap: 18px; animation: psIn .7s var(--ease) both; }
.ps-cast > * { image-rendering: pixelated; filter: drop-shadow(0 12px 12px rgba(0, 0, 0, .6)); }
.ps-cast img { max-height: 130px; }
.ps-cast.mid { right: auto; left: calc(50% + 40px); }
.ps-cast .ps-ic { width: 44px; height: 44px; animation: psFloat 3s ease-in-out infinite; }
.ps-cast .ps-ic:nth-child(2n) { animation-delay: -1.2s; margin-bottom: 40px; }
.ps-cast .ps-ic:nth-child(3n) { animation-delay: -2s; margin-bottom: 18px; }
@keyframes psIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes psFloat { 50% { transform: translateY(-8px); } }
/* body 自己有底色：場景帶 z-index 不能是負的（會被底色蓋掉），改成內容疊在它上面 */
:root:not([data-theme="light"]) main#app { position: relative; z-index: 1; padding-top: 40px; }
/* 標題區留給右邊的角色：標題那一列不要被卡片擋住 */
@media (max-width: 768px) {
  :root:not([data-theme="light"]) .ps { height: 220px; }
  .ps-cast { right: 12px; top: 150px; gap: 8px; scale: .5; transform-origin: bottom right; opacity: .85; }
}
@media (prefers-reduced-motion: reduce) { .ps-cast, .ps-cast .ps-ic { animation: none; } }

/* ═══ 各頁版面（2026-10-30 第二階段）：新加的版面元素兩種主題都要能看，所以不掛 :root 前綴，只用色票 ═══ */

/* ── 排行榜：前三名領獎台（site/pages/ranking.js） ── */
.rk-podium { list-style: none; margin: 28px 0 22px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 14px; max-width: 760px; margin-inline: auto; }
.rk-pod { display: flex; flex-direction: column; align-items: stretch; min-width: 0; animation: rkRise .6s var(--ease) both; }
.rk-pod.p1 { animation-delay: .15s; } .rk-pod.p3 { animation-delay: .3s; }
.rk-pod-who { all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 4px 10px; text-align: center; min-width: 0; }
.rk-pod-who:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; border-radius: 12px; }
.rk-pod-av { position: relative; display: grid; place-items: end center; height: 130px; width: 100%; }
.rk-pod-av::before { content: ""; position: absolute; left: 50%; bottom: -6px; width: min(150px, 100%); height: 26px; translate: -50% 0; border-radius: 50%; background: radial-gradient(closest-side, var(--glow, rgba(255, 255, 255, .18)), transparent); }
.rk-pod-av img { position: relative; image-rendering: pixelated; height: auto; max-height: 120px; max-width: 100%; width: auto; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .5)); transition: transform var(--dur-2) var(--ease); }
.rk-pod-who:hover .rk-pod-av img { transform: translateY(-6px); }
.rk-pod.p1 .rk-pod-av { height: 150px; } .rk-pod.p1 .rk-pod-av img { max-height: 140px; }
.rk-pod-name { font-weight: 800; font-size: 1.05rem; color: var(--text-title); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 8px; }
.rk-pod-job { font-size: .8125rem; color: var(--muted); }
.rk-pod-val { display: flex; align-items: baseline; gap: 3px; color: var(--gold-text); }
.rk-pod-val b { font-size: 1.6rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rk-pod-val small { font-size: .75rem; color: var(--muted); }
.rk-pod-base { display: grid; place-items: center; height: 70px; border-radius: 12px 12px 4px 4px; font: 900 2.4rem/1 var(--font-display, inherit); color: rgba(0, 0, 0, .55);
  background: linear-gradient(180deg, var(--c1), var(--c2)); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 20px 30px -20px var(--c2); }
.rk-pod.p1 { --c1: #ffe08a; --c2: #e0a020; --glow: rgba(255, 200, 80, .45); } .rk-pod.p1 .rk-pod-base { height: 92px; font-size: 3rem; }
.rk-pod.p2 { --c1: #eef2f6; --c2: #9aa6b2; --glow: rgba(200, 215, 230, .35); } .rk-pod.p2 .rk-pod-base { height: 68px; }
.rk-pod.p3 { --c1: #f2c09a; --c2: #b9733f; --glow: rgba(230, 150, 90, .35); } .rk-pod.p3 .rk-pod-base { height: 50px; }
@keyframes rkRise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) {
  .rk-podium { gap: 6px; }
  .rk-pod-av { height: 96px; } .rk-pod.p1 .rk-pod-av { height: 112px; }
  .rk-pod-av img { max-height: 92px; } .rk-pod.p1 .rk-pod-av img { max-height: 108px; }
  .rk-pod-name { font-size: .875rem; } .rk-pod-val b { font-size: 1.2rem; }
  .rk-pod-base { height: 46px; font-size: 1.8rem; } .rk-pod.p1 .rk-pod-base { height: 72px; font-size: 2.4rem; } .rk-pod.p2 .rk-pod-base { height: 58px; } .rk-pod.p3 .rk-pod-base { height: 38px; }
}
@media (prefers-reduced-motion: reduce) { .rk-pod { animation: none; } }

/* ── 突襲：王的卡片牆＋每隻王的頭（site/app.js raidsPage） ── */
.rb-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 18px 0 28px; }
.rb-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; border-radius: 14px; text-decoration: none; color: var(--text); overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, rgba(255, 162, 96, .16), transparent 60%), var(--card); border: 1px solid var(--line-strong);
  transition: transform var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease); }
.rb-card:hover { transform: translateY(-4px); border-color: var(--line-gold); box-shadow: 0 24px 40px -24px rgba(255, 122, 47, .6); text-decoration: none; }
.rb-stage { display: grid; place-items: end center; height: 150px; position: relative; }
.rb-stage::after { content: ""; position: absolute; bottom: 2px; left: 50%; width: 60%; height: 14px; translate: -50% 0; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .45), transparent); z-index: 0; }
.rb-stage > * { position: relative; z-index: 1; image-rendering: pixelated; max-height: 150px; }
.rb-stage .manim { --z: min(1, 140 / var(--fh), 190 / var(--fw)); }
.rk-boss .rb-head .rb-stage .manim { --z: min(1.3, 170 / var(--fh), 190 / var(--fw)); }
.rb-card .rb-lv { position: absolute; top: 12px; left: 14px; }
.rb-lv { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 800; letter-spacing: .04em; color: #fff; background: var(--grad-accent, var(--accent)); }
.rb-name { font-size: 1.15rem; color: var(--text-title); }
.rb-hp { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.rb-hp i { display: block; height: 6px; border-radius: 999px; background: rgba(127, 127, 127, .2); overflow: hidden; position: relative; }
.rb-hp i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--hp); border-radius: inherit; background: linear-gradient(90deg, #ff5a5a, #ffb04a); }
.rb-meta { display: flex; flex-wrap: wrap; gap: 4px; font-size: .75rem; color: var(--muted); }
.rb-meta > span { padding: 1px 8px; border-radius: 999px; background: var(--chip-bg); border: 1px solid var(--line); }
.rb-meta .rb-need { color: var(--accent-text); border-color: var(--line-gold); }
.rk-boss .rb-head { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: end; margin: -6px 0 16px; }
.rk-boss .rb-head .rb-stage { height: 180px; border-radius: 14px; background: radial-gradient(70% 70% at 50% 70%, rgba(255, 162, 96, .2), transparent 70%); }
.rk-boss .rb-head .rb-stage > * { max-height: 170px; }
.rb-title { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 6px 0 4px; border: 0; padding: 0; display: block; }
.rb-title::before, .rb-title::after { content: none; display: none; }
.rb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 0 0 16px; align-items: start; }
.rb-tiles > .wide { grid-column: span 2; }
.rb-tiles > div { padding: 10px 12px; border-radius: 10px; background: var(--chip-bg); border: 1px solid var(--line); min-width: 0; }
.rb-tiles dt { font-size: .75rem; color: var(--muted); margin: 0; padding: 0; background: none; border: 0; }
.rb-tiles dd { margin: 2px 0 0; padding: 0; font-weight: 700; color: var(--text-title); }
.rb-tiles > div:first-child dd { color: #ff7b7b; font-size: 1.25rem; }
@media (max-width: 560px) {
  .rb-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .rb-card { padding: 10px; } .rb-stage { height: 100px; } .rb-stage > * { max-height: 100px; } .rb-stage .manim { --z: min(.8, 96 / var(--fh), 140 / var(--fw)); }
  .rb-name { font-size: 1rem; } .rb-meta .rb-need { display: none; }
  .rk-boss .rb-head { grid-template-columns: 1fr; } .rk-boss .rb-head .rb-stage { height: 140px; }
}

/* ── 轉蛋：左邊機台、右邊大獎牆，機率表收進折疊（site/app.js gachaPage） ── */
.ga-show { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 24px; align-items: start; margin: 12px 0 18px; }
.ga-show .ga-machine { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0; padding: 24px 12px 16px; border-radius: 16px; border: 1px solid var(--line-strong); text-align: center;
  background: radial-gradient(70% 60% at 50% 45%, rgba(255, 190, 90, .28), transparent 70%), var(--card); }
.ga-show .ga-machine img { width: auto; height: auto; max-width: 100%; max-height: 260px; image-rendering: pixelated; scale: 1.4; transform-origin: 50% 100%; margin-top: 50px; filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .55)); }
.ga-show .ga-machine b { font-size: 1.05rem; color: var(--text-title); }
.ga-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ga-cost { display: flex; flex-wrap: wrap; gap: 6px; }
.ga-cost > span { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--chip-bg); border: 1px solid var(--line); font-weight: 700; font-size: .875rem; }
.ga-cost small { color: var(--muted); font-weight: 400; }
.ga-side .chips { margin: 0; }
.ga-prizes { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.ga-prizes li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px 10px; border-radius: 12px; text-align: center; min-width: 0;
  background: var(--card); border: 1px solid var(--line-strong); animation: gaPop .5s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
.ga-prizes li.rare { border-color: rgba(255, 196, 64, .55); background: radial-gradient(80% 60% at 50% 30%, rgba(255, 196, 64, .22), transparent 70%), var(--card); }
.ga-prizes li.uncommon { border-color: rgba(160, 120, 255, .45); background: radial-gradient(80% 60% at 50% 30%, rgba(160, 120, 255, .18), transparent 70%), var(--card); }
.ga-pi { display: grid; place-items: center; width: 56px; height: 56px; }
.ga-pi img { image-rendering: pixelated; width: auto; height: auto; max-width: 56px; max-height: 56px; scale: 1.4; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .45)); animation: psFloat 3s ease-in-out infinite; animation-delay: calc(var(--i) * -400ms); }
.ga-prizes b { font-size: .8125rem; line-height: 1.3; color: var(--text-title); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ga-prizes small { color: var(--gold-text); font-variant-numeric: tabular-nums; font-weight: 700; }
.ga-odds > summary { cursor: pointer; font-weight: 800; color: var(--text-title); padding: 4px 0; list-style-position: inside; }
.ga-odds > summary .muted { font-weight: 400; font-size: .8125rem; margin-left: 6px; }
.ga-odds[open] > summary { margin-bottom: 10px; }
@keyframes gaPop { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .ga-show { grid-template-columns: 1fr; gap: 14px; }
  .ga-show .ga-machine { padding: 12px; } .ga-show .ga-machine img { max-height: 150px; scale: 1.1; margin-top: 16px; }
  .ga-prizes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .ga-prizes li, .ga-pi img { animation: none; } }

/* ── 職業：卡片裡的技能列，頁首「技能」打開後展開名稱（src/pages/classes/JobCard.jsx） ── */
.cls-sub { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cls-sub .sub { margin: 0; }
.jcard .jsk { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.jsk-i { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.jsk-i img, .jsk-i i { width: 22px; height: 22px; border-radius: 5px; image-rendering: pixelated; background: rgba(0, 0, 0, .25); box-shadow: 0 0 0 1px var(--line-strong); }
.jsk-i i { display: inline-block; }
.jsk-i.k-attack img { box-shadow: 0 0 0 1px rgba(255, 120, 80, .55); }
.jsk-i.k-buff img, .jsk-i.k-heal img { box-shadow: 0 0 0 1px rgba(120, 200, 255, .5); }
.jsk-n { display: none; font-size: .75rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cls.show-skills .jcard { align-items: flex-start; }
.cls.show-skills .jcard .jsk { display: grid; grid-template-columns: 1fr; gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.cls.show-skills .jsk-n { display: block; }
.famlater .jcard .jsk { display: none; }
.cls.show-skills .famlater .jcard .jsk { display: grid; }

/* ── 裝備／地圖／怪物列表：篩選列黏在頂欄下、卡片圖示發光（深色） ── */
@media (min-width: 769px) {
  :root:not([data-theme="light"]) .filters.col { position: sticky; top: 64px; z-index: 6; }
}
:root:not([data-theme="light"]) .filters, :root:not([data-theme="light"]) .bf {
  background: rgba(16, 19, 27, .82); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid var(--glass-hi); border-radius: 14px; box-shadow: 0 18px 40px -28px rgba(0, 0, 0, .9);
}
:root:not([data-theme="light"]) .bf.stuck, :root:not([data-theme="light"]) .filters.col { box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .95), 0 1px 0 rgba(255, 255, 255, .06) inset; }
:root:not([data-theme="light"]) .gear > summary .ic {
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, rgba(255, 190, 110, .2), rgba(255, 255, 255, .03) 70%); border: 1px solid var(--glass-hi);
}
:root:not([data-theme="light"]) .gear > summary .ic img { image-rendering: pixelated; scale: 1.25; transition: transform var(--dur-2) var(--ease); }
:root:not([data-theme="light"]) .gear:hover > summary .ic img { transform: translateY(-2px) rotate(-6deg); }
:root:not([data-theme="light"]) .gear[open] { border-color: rgba(255, 162, 96, .4); }
:root:not([data-theme="light"]) .gear .name .lv { color: var(--gold-text); }
:root:not([data-theme="light"]) a.card .thumb { overflow: hidden; }
:root:not([data-theme="light"]) a.card .thumb img { transition: transform var(--dur-3) var(--ease); }
:root:not([data-theme="light"]) a.card:hover .thumb img { transform: scale(1.06); }
:root:not([data-theme="light"]) a.card .badge { background: rgba(10, 12, 18, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid var(--glass-hi); color: #fff; }
:root:not([data-theme="light"]) a.card .badge.good { background: rgba(35, 165, 89, .8); }
:root:not([data-theme="light"]) .dex { border-radius: 14px; }
@media (prefers-reduced-motion: reduce) { :root:not([data-theme="light"]) .gear > summary .ic img, :root:not([data-theme="light"]) a.card .thumb img { transition: none; } }

/* ── 更新日誌：左邊一條時間軸，每天一個節點（src/pages/Changelog.jsx） ── */
:root:not([data-theme="light"]) .cl-day { position: relative; padding-left: 34px; margin-top: 0; padding-top: 22px; }
:root:not([data-theme="light"]) .cl-day::before { content: ""; position: absolute; left: 9px; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, rgba(255, 162, 96, .5), rgba(255, 255, 255, .06)); }
:root:not([data-theme="light"]) .cl-day:first-of-type::before { top: 34px; }
:root:not([data-theme="light"]) .cl-day h2 { position: relative; }
:root:not([data-theme="light"]) .cl-day h2::before { content: ""; display: block; position: absolute; left: -31px; top: 50%; translate: 0 -50%; width: 14px; height: 14px; margin: 0; border-radius: 50%;
  background: var(--grad-accent); box-shadow: 0 0 0 4px var(--bg), 0 0 16px rgba(255, 122, 47, .7); }
:root:not([data-theme="light"]) .cl-day h2::after { content: none; }
:root:not([data-theme="light"]) .cl-day h2 time { background: var(--grad-title); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root:not([data-theme="light"]) .cl-item { background: rgba(21, 25, 34, .7); border: 1px solid var(--glass-hi); border-radius: 12px; transition: border-color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
:root:not([data-theme="light"]) .cl-item:hover { border-color: rgba(255, 162, 96, .35); transform: translateX(3px); }
:root:not([data-theme="light"]) .cl-tag { border-radius: 999px; background: rgba(255, 162, 96, .12); color: var(--accent-text); border: 1px solid rgba(255, 162, 96, .3); }
:root:not([data-theme="light"]) .cl-tags a { border-radius: 999px; }
:root:not([data-theme="light"]) .cl-tags a.on { background: var(--grad-accent); color: #fff; border-color: transparent; }

/* ── 組隊任務：流程改成編號步驟、卡片頭加光（src/pages/Party.jsx） ── */
:root:not([data-theme="light"]) .pq-flow { counter-reset: pqs; list-style: none; padding-left: 0; gap: 0; }
:root:not([data-theme="light"]) .pq-flow > li { counter-increment: pqs; position: relative; padding: 0 0 12px 38px; min-height: 28px; }
:root:not([data-theme="light"]) .pq-flow > li::before { content: counter(pqs); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: .75rem; font-weight: 800; color: #fff; background: var(--grad-accent); box-shadow: 0 0 0 3px rgba(255, 122, 47, .15); }
:root:not([data-theme="light"]) .pq-flow > li:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 28px; bottom: 2px; width: 2px; background: rgba(255, 162, 96, .25); }
:root:not([data-theme="light"]) .pq-card { position: relative; overflow: hidden; border-radius: 16px; background: radial-gradient(120% 60% at 0% 0%, rgba(255, 162, 96, .12), transparent 60%), rgba(21, 25, 34, .75); border: 1px solid var(--glass-hi); }
:root:not([data-theme="light"]) .pq-card h2 { font-size: 1.5rem; }
:root:not([data-theme="light"]) .pq-card h2::before, :root:not([data-theme="light"]) .pq-card h2::after { content: none; }
:root:not([data-theme="light"]) .pq-rew > li::marker { color: var(--gold-text); }
:root:not([data-theme="light"]) .pq-reward-card { border-radius: 14px; background: rgba(21, 25, 34, .75); border: 1px solid var(--glass-hi); }
:root:not([data-theme="light"]) .pq-reward-ic { border-radius: 12px; background: radial-gradient(circle at 50% 40%, rgba(255, 190, 110, .22), rgba(255, 255, 255, .03) 70%); }
:root:not([data-theme="light"]) .pq-stat-chip { border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { :root:not([data-theme="light"]) .cl-item { transition: none; } }

/* ── 網頁遊玩（#/me）：Discord 嵌入卡換成整站的玻璃卡、按鈕跟整站同一套（深色） ── */
:root:not([data-theme="light"]) .dc-embed {
  border-radius: 14px; background: rgba(21, 25, 34, .72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--glass-hi); box-shadow: 0 18px 40px -26px rgba(0, 0, 0, .9); padding: 16px 18px 16px 20px; overflow: hidden;
}
:root:not([data-theme="light"]) .dc-embed::before { width: 3px; border-radius: 0; top: 14px; bottom: 14px; left: 0; opacity: .9; }
:root:not([data-theme="light"]) .dc-btn { border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid var(--glass-hi); color: #fff; padding: 0 18px; }
:root:not([data-theme="light"]) .dc-btn:hover { background: rgba(255, 255, 255, .13); }
:root:not([data-theme="light"]) .dc-btn.primary { background: var(--grad-accent); border-color: transparent; box-shadow: 0 8px 20px -10px rgba(242, 84, 45, .8); }
:root:not([data-theme="light"]) .dc-btn.primary:hover { filter: brightness(1.08); background: var(--grad-accent); }
:root:not([data-theme="light"]) .me-lv { background: var(--grad-accent); }
:root:not([data-theme="light"]) .me-exp i { background: linear-gradient(90deg, #f2bd4b, #ffd77a); }
:root:not([data-theme="light"]) .me-av { background: radial-gradient(70% 60% at 50% 75%, rgba(255, 162, 96, .28), transparent 70%); }
/* 鬧鬼宅邸三間：名稱欄依字數、進度條要是區塊才有寬度 */
.me-tiers li .me-tier-prize .me-play { display: block; margin: 0; }
.dc-embed .me-tiers li:has(.me-play) { grid-template-columns: max-content 1fr auto; }

/* ── 標題旁的 Discord 指令晶片（lib/commands.js）：玻璃底、橘金字 ── */
.pg-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.pg-head h1 { margin-bottom: 0; }
.dc-cmd-wrap { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.dc-cmd-wrap i { font-style: normal; color: var(--muted); }
.dc-cmd, .dc-cmd-step {
  display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 999px;
  font: 600 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap;
}
.dc-cmd { color: var(--accent-text); background: rgba(255, 122, 47, .12); border: 1px solid rgba(255, 162, 96, .35); }
.dc-cmd-step { font-family: inherit; color: var(--text); background: rgba(255, 255, 255, .06); border: 1px solid var(--line-strong); }
p .dc-cmd, h3 .dc-cmd, li .dc-cmd { height: 22px; padding: 0 9px; font-size: 12px; vertical-align: 1px; }
:root[data-theme="light"] .dc-cmd { color: #c2410c; background: rgba(232, 89, 12, .08); border-color: rgba(232, 89, 12, .3); }
:root[data-theme="light"] .dc-cmd-step { color: #3b3f48; background: rgba(0, 0, 0, .04); border-color: rgba(0, 0, 0, .1); }
/* 組隊任務的場次規則：欄位兩欄 */
.dc-fields.pq-rules { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 4px 0 18px; }
.dc-fields.pq-rules dt { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.dc-fields.pq-rules dd { margin: 0; }
