[hidden] { display: none !important; }
/* 金樂派對 官網＋遊戲大廳 共用版型（依 docs/design/mock-web 核定模擬稿；電腦版與手機版共用同一份，手機版以 media query 切換）
   ・所有頁面共用：頁首（電腦版主選單／手機版漢堡選單）、頁尾、右側快捷列（電腦版）、底部四鍵（手機版）
   ・嚴格 CSP：不使用 inline style；動態樣式一律用 class 切換
   ・字型：模擬稿用 Noto Sans TC；完整字型檔 28MB 太大，先用玩家裝置已安裝的同款或系統黑體（子集化見 docs/DECISIONS-PENDING.md） */
@font-face { font-family: "JL Sans"; font-weight: 400; src: local("Noto Sans TC Regular"), local("NotoSansTC-Regular"), local("Noto Sans TC"); }
@font-face { font-family: "JL Sans"; font-weight: 500; src: local("Noto Sans TC Medium"), local("NotoSansTC-Medium"), local("Noto Sans TC"); }
@font-face { font-family: "JL Sans"; font-weight: 700; src: local("Noto Sans TC Bold"), local("NotoSansTC-Bold"), local("Noto Sans TC"); }
@font-face { font-family: "JL Sans"; font-weight: 900; src: local("Noto Sans TC Black"), local("NotoSansTC-Black"), local("Noto Sans TC"); }

:root {
  --wine-950: #1c070c;
  --wine-900: #2a0810;
  --wine-800: #3a0a16;
  --wine-700: #4a0c1c;
  --wine-600: #5a0f23;
  --wine-500: #6b1030;
  --wine-400: #8a1a3d;
  --gold-50: #fff8d6;
  --gold-100: #ffe9a8;
  --gold-200: #f5c76b;
  --gold-300: #e0b04a;
  --gold-400: #c9a04a;
  --gold-500: #a67c2e;
  --gold-700: #7a4a10;
  --orange: #e8731c;
  --cream: #fff6e5;
  --text: #fff6e5;
  --text-soft: #f0e0c0;
  --text-muted: #d4c09a;
  --mint: #7ed6c8;
  --focus: #d9650f; /* 輸入框聚焦外框：與白底對比 3.4:1、在深酒紅底上也清楚 */
  --radius-lg: 22px;
  --radius-pill: 999px;
  --font: "JL Sans", "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", "Heiti TC", system-ui, sans-serif;
  --wrap: 1240px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--wine-950); }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
button, a, input, select { font-family: inherit; }
button { cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
.hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

body {
  font-family: var(--font);
  color: var(--text);
  background-color: var(--wine-700);
  background-image:
    radial-gradient(ellipse 90% 50% at 50% -10%, rgba(138, 26, 61, 0.85), transparent 58%),
    radial-gradient(circle at 8% 30%, rgba(245, 199, 107, 0.07), transparent 28%),
    radial-gradient(circle at 92% 70%, rgba(245, 199, 107, 0.06), transparent 30%),
    linear-gradient(180deg, #6b1030 0%, #4a0c1c 42%, #2a0810 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
  font-size: 15px;
}
.wrap { width: min(var(--wrap), calc(100% - 32px)); margin: 0 auto; }
.page-main { padding-bottom: 8px; min-height: 60vh; }
.muted { color: var(--text-muted); font-size: 13px; }
.center { text-align: center; }
.mt { margin-top: 14px; }

/* ---------- 金字 ---------- */
.gold-text {
  background: linear-gradient(180deg, #fff8d6 0%, #ffe9a8 16%, #f5c76b 42%, #c9a04a 62%, #fff1c0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #f5c76b;
  filter: drop-shadow(0 1px 0 #8a5a12) drop-shadow(0 2px 0 #5a3a0c) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 8px rgba(245, 199, 107, 0.35));
}
.section-head { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 36px 0 22px; }
.section-title { font-weight: 900; font-size: 32px; letter-spacing: 0.1em; line-height: 1.3; white-space: nowrap; }
.section-head svg.ico { width: 28px; height: 28px; flex: 0 0 28px; filter: drop-shadow(0 0 8px rgba(245, 199, 107, 0.7)); }
.page-title { text-align: center; }
.page-subhead { text-align: center; margin: -8px 0 22px; color: var(--text-muted); font-size: 14px; line-height: 1.7; }
.page-subhead strong { color: var(--gold-200); }
.btn-more {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: var(--radius-pill);
  background: linear-gradient(180deg, #e8731c, #c85a12); color: #fff6e5; font-size: 13px; font-weight: 700;
  box-shadow: 0 2px 8px rgba(232, 115, 28, 0.45); border: 1px solid #ffc08a;
}
.btn-more:hover { filter: brightness(1.08); }

/* ---------- 按鈕（同時支援表單工具 dom.js 的 btn primary / gold / danger / block / small） ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 18px;
  border-radius: var(--radius-pill); font-weight: 700; font-size: 15px; letter-spacing: 0.04em; line-height: 1.2;
  white-space: nowrap; transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  background: rgba(255, 246, 229, 0.06); color: var(--gold-200); border: 1px solid var(--gold-200); cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; flex: 0 0 18px; }
.btn-orange, .btn.primary {
  background: linear-gradient(180deg, #ff9a3d 0%, #e8731c 48%, #c85a12 100%); color: #fff6e5; border: 1px solid #ffd2a6;
  box-shadow: 0 4px 14px rgba(232, 115, 28, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35); text-shadow: 0 1px 0 rgba(80, 30, 0, 0.35);
}
.btn-gold, .btn.gold {
  background: linear-gradient(180deg, #fff0b8 0%, #f5c76b 45%, #c9a04a 100%); color: #5a0f23; border: 1px solid #fff4c8;
  box-shadow: 0 4px 12px rgba(245, 199, 107, 0.35), inset 0 1px 0 #fff;
}
.btn.danger { background: rgba(198, 40, 40, 0.15); color: #ffb4a8; border-color: #ff8a80; }
.btn-dark {
  background: linear-gradient(180deg, #2a0810, #1c070c); color: var(--gold-100); border: 2px solid var(--gold-200); border-radius: 14px;
  min-height: 64px; padding: 0 22px; font-size: 18px; box-shadow: 0 0 16px rgba(245, 199, 107, 0.22);
}
.btn-dark:hover { box-shadow: 0 0 24px rgba(245, 199, 107, 0.45); }
.btn-lg { min-height: 48px; padding: 0 28px; font-size: 17px; }
.btn.small { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; margin-top: 14px; }

/* ---------- 頁首 ---------- */
.env-ribbon { background: #1c070c; color: var(--gold-100); font-size: 12px; text-align: center; padding: 2px 8px; border-bottom: 1px solid var(--gold-500); }
.site-header {
  height: var(--header-h);
  background: linear-gradient(180deg, #8a1a3d 0%, #5a0f23 52%, #3a0a16 100%);
  border-bottom: 2px solid var(--gold-200);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 16px rgba(245, 199, 107, 0.25);
  position: sticky; top: 0; z-index: 80;
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; min-height: 40px; }
.logo-mark { width: 42px; height: 42px; flex: 0 0 42px; filter: drop-shadow(0 0 8px rgba(245, 199, 107, 0.7)); }
.logo-text { font-weight: 900; font-size: 28px; letter-spacing: 0.06em; line-height: 1.2; }
.main-nav { display: flex; align-items: stretch; height: 100%; gap: 2px; flex: 1 1 auto; justify-content: center; }
.main-nav a {
  display: flex; align-items: center; gap: 6px; padding: 0 16px; color: var(--gold-100); font-weight: 700; font-size: 15px;
  letter-spacing: 0.04em; white-space: nowrap;
}
.main-nav a svg { width: 18px; height: 18px; flex: 0 0 18px; }
.main-nav a:hover { color: #fff; }
.main-nav a.is-active { background: linear-gradient(180deg, #f3e0b8 0%, #e8d0a0 100%); color: #5a0f23; box-shadow: inset 0 2px 0 #fff6e5; }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: 0 0 auto; }
.balance-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px 0 6px; border-radius: var(--radius-pill);
  background: #1c070c; border: 1px solid var(--gold-400); color: var(--gold-100); font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.balance-chip img { width: 24px; height: 24px; }
.icon-btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  border: 1.5px solid var(--gold-200); color: var(--gold-200); background: rgba(0, 0, 0, 0.15); box-shadow: 0 0 8px rgba(245, 199, 107, 0.25); flex: 0 0 40px;
}
.icon-btn svg { width: 22px; height: 22px; }
.menu-btn, .mobile-only { display: none; }
.hamburger-lines { width: 22px; height: 16px; display: flex; flex-direction: column; justify-content: space-between; }
.hamburger-lines span { display: block; height: 2.5px; border-radius: 2px; background: linear-gradient(180deg, #ffe9a8, #f5c76b); }

/* 手機選單抽屜 */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(16, 0, 6, 0.62); opacity: 0; pointer-events: none; transition: opacity 0.25s ease; z-index: 120; }
.drawer {
  position: fixed; top: 0; left: 0; width: 300px; max-width: 86vw; height: 100%; overflow-y: auto;
  background: linear-gradient(180deg, #6b1030, #2a0810); border-right: 2px solid var(--gold-200); box-shadow: 8px 0 28px rgba(0, 0, 0, 0.45);
  transform: translateX(-105%); visibility: hidden; transition: transform 0.28s ease, visibility 0.28s; z-index: 130;
  padding: 20px 18px 32px; display: flex; flex-direction: column; gap: 6px;
}
body.menu-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
body.menu-open .drawer { transform: translateX(0); visibility: visible; }
.drawer a { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 10px; color: var(--gold-100); font-weight: 700; font-size: 16px; }
.drawer a svg { width: 20px; height: 20px; }
.drawer a:hover, .drawer a.is-active { background: rgba(245, 199, 107, 0.12); }
.drawer-actions { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 16px; }
.drawer-close { align-self: flex-end; font-size: 18px; }

/* ---------- 主視覺輪播 ---------- */
.hero-block { padding-top: 24px; }
.gold-frame {
  position: relative; padding: 3px; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fff0b8, #f5c76b 22%, #a67c2e 50%, #f5c76b 78%, #fff0b8);
  box-shadow: 0 0 0 1px #6a4510, 0 0 32px rgba(245, 199, 107, 0.45), 0 14px 40px rgba(0, 0, 0, 0.4);
}
.gold-frame__inner { border-radius: 19px; overflow: hidden; background: var(--wine-800); position: relative; }
.hero-stage { aspect-ratio: 16 / 9; }
.hero-slides { position: relative; width: 100%; height: 100%; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.55s ease; display: block; }
.hero-slide.is-on { opacity: 1; z-index: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(42, 8, 16, 0.62); border: 1.5px solid var(--gold-200); color: var(--gold-100);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 12px rgba(245, 199, 107, 0.35);
}
.hero-arrow:hover { background: rgba(90, 15, 35, 0.9); }
.hero-arrow.prev { left: 14px; }
.hero-arrow.next { right: 14px; }
.hero-arrow svg { width: 22px; height: 22px; }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 6px; z-index: 3; display: flex; justify-content: center; gap: 2px; }
.hero-dots button { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.hero-dots button::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 246, 229, 0.45); border: 1px solid var(--gold-400); }
.hero-dots button.is-on::before { background: var(--gold-200); box-shadow: 0 0 8px rgba(245, 199, 107, 0.9); transform: scale(1.15); }
.corner { position: absolute; width: 22px; height: 22px; z-index: 4; pointer-events: none; border: 2px solid #ffe9a8; }
.corner.tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; border-top-left-radius: 6px; }
.corner.tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; border-top-right-radius: 6px; }
.corner.bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; border-bottom-left-radius: 6px; }
.corner.br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; border-bottom-right-radius: 6px; }
.intro-line { text-align: center; color: var(--text-soft); font-size: 15px; margin: 16px auto 0; max-width: 860px; line-height: 1.7; }
.intro-line strong { color: var(--gold-200); }

/* ---------- 遊戲卡片 ---------- */
.game-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.game-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px 16px; }
.game-card { display: block; min-width: 0; text-align: center; transition: transform 0.22s ease; cursor: pointer; color: inherit; }
.game-card:hover { transform: translateY(-8px) scale(1.03); }
button.game-card { width: 100%; padding: 0; font: inherit; background: none; border: 0; }
.game-card__art {
  position: relative; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #f5c76b 0%, transparent 55%), linear-gradient(180deg, #5a0f23, #2a0810);
  border: 2px solid var(--gold-200); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(90, 58, 16, 0.5); transition: box-shadow 0.22s ease;
}
.game-card:hover .game-card__art { box-shadow: 0 0 28px rgba(245, 199, 107, 0.55), 0 12px 28px rgba(0, 0, 0, 0.4); }
.game-card__art img { width: 100%; height: 100%; object-fit: cover; }
.game-card.is-soon .game-card__art img { filter: saturate(0.75) brightness(0.8); }
.game-card__name { display: block; margin-top: 10px; font-size: 16px; font-weight: 700; color: var(--gold-100); letter-spacing: 0.04em; line-height: 1.4; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.soon-ribbon {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 4px 0; font-size: 13px; font-weight: 700;
  background: rgba(28, 7, 12, 0.88); color: var(--gold-100); letter-spacing: 0.1em;
}
.badge {
  position: absolute; top: 8px; left: 8px; z-index: 2; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 900;
  letter-spacing: 0.06em; display: inline-flex; align-items: center; line-height: 1; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.badge--new { background: linear-gradient(180deg, #ff8a3d, #e23b3b); color: #fff; border: 1px solid #ffd0a0; }
.badge--hot { background: linear-gradient(180deg, #f5c76b, #e8731c); color: #5a0f23; }
.badge--vip { background: linear-gradient(180deg, #ffe9a8, #c9a04a); color: #3a0a16; }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.tab {
  min-height: 32px; padding: 0 16px; border-radius: var(--radius-pill); font-weight: 700; font-size: 14px; color: var(--gold-100);
  background: rgba(255, 246, 229, 0.06); border: 1px solid rgba(245, 199, 107, 0.35); line-height: 1;
}
.tab.is-on { background: linear-gradient(180deg, #ff8a3d, #e23b3b); border-color: #ffd0a0; color: #fff; box-shadow: 0 2px 10px rgba(226, 59, 59, 0.35); }

/* ---------- 最新消息 ---------- */
.panel {
  border-radius: 16px; background: linear-gradient(180deg, rgba(90, 15, 35, 0.7), rgba(42, 8, 16, 0.85));
  border: 2px solid var(--gold-400); box-shadow: 0 0 20px rgba(245, 199, 107, 0.18), inset 0 0 0 1px rgba(245, 199, 107, 0.15);
}
.news-panel { padding: 8px 0; display: grid; grid-template-columns: 1fr 1fr; }
.news-panel.single { grid-template-columns: 1fr; }
.news-col { padding: 8px 20px; margin: 0; list-style: none; }
.news-col + .news-col { border-left: 1px solid rgba(245, 199, 107, 0.28); }
.news-item a, .news-item > div { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 9px 4px; border-radius: 8px; min-height: 40px; }
.news-item a:hover { background: rgba(245, 199, 107, 0.08); }
.news-tag { height: 22px; padding: 0 8px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; line-height: 1; white-space: nowrap; }
.news-tag--sys { background: #c62828; color: #fff; }
.news-tag--act { background: #a8500c; color: #fff; }
.news-tag--note { background: #8f1d2c; color: var(--gold-100); border: 1px solid var(--gold-400); }
.news-item .ttl { font-size: 14px; color: var(--text-soft); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 1.4; }
.news-item .date { font-size: 13px; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.news-article { padding: 22px 24px; }
.news-article h2 { font-size: 22px; margin: 10px 0 6px; color: var(--cream); }
.news-article p { color: var(--text-soft); margin-top: 10px; line-height: 1.8; }

/* ---------- 進入遊戲 ---------- */
.download-grid { display: grid; grid-template-columns: 1.2fr 1fr 0.7fr; gap: 16px; align-items: stretch; }
.dl-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dl-actions .btn-dark { width: 100%; min-height: 70px; font-size: 16px; white-space: normal; text-align: center; }
.dl-actions .btn-lg { width: 100%; }
.dl-actions .span-2 { grid-column: 1 / -1; }
.mobile-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px; text-align: center; }
.mobile-card img { width: 96px; height: 96px; border-radius: 14px; border: 2px solid var(--gold-200); }
.mobile-card p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.trust-banners { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.trust-banner {
  min-height: 110px; border-radius: 14px; overflow: hidden; border: 2px solid var(--gold-400); box-shadow: 0 0 16px rgba(245, 199, 107, 0.16);
  display: flex; align-items: center; padding: 16px 18px 16px 16px; gap: 14px;
}
.trust-banner img { width: 130px; height: 86px; object-fit: cover; border-radius: 10px; flex: 0 0 130px; border: 1px solid rgba(245, 199, 107, 0.4); }
.trust-banner h3 { font-size: 18px; font-weight: 900; line-height: 1.35; margin-bottom: 4px; }
.trust-banner p { font-size: 13px; color: var(--text-soft); line-height: 1.55; }
.trust-banner--cash { background: linear-gradient(90deg, #4a0c1c, #6b1030 60%, #3a0a16); }
.trust-banner--safe { background: linear-gradient(90deg, #1f4a44, #2a6b5e 40%, #1c3a36); }

/* ---------- 頁尾 ---------- */
.site-footer { margin-top: 48px; background: linear-gradient(180deg, #14050a, #0a0306); border-top: 2px solid var(--gold-500); padding: 28px 0 24px; color: var(--text-muted); }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: start; }
.age-badge {
  width: 64px; height: 64px; border-radius: 10px; border: 2px solid #e23b3b; background: #1c070c; color: #ff6b6b;
  display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 900; line-height: 1;
}
.age-badge .n { font-size: 22px; }
.age-badge .t { font-size: 10px; margin-top: 3px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 8px; }
.footer-links a { color: var(--gold-200); font-size: 14px; font-weight: 500; min-height: 28px; display: inline-flex; align-items: center; }
.footer-links a:hover { color: var(--gold-50); text-decoration: underline; }
.footer-note { font-size: 12px; line-height: 1.7; max-width: 760px; }
.footer-note strong { color: var(--gold-200); }
.footer-copy { font-size: 12px; margin-top: 12px; color: #b5a386; }
.footer-contact { font-size: 13px; line-height: 1.8; text-align: right; }

/* ---------- 電腦版右側快捷列 ---------- */
.float-dock { position: fixed; right: 16px; top: 200px; z-index: 70; display: flex; flex-direction: column; gap: 8px; width: 72px; }
.float-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; padding: 8px 4px; border-radius: 12px;
  background: linear-gradient(180deg, #6b1030, #3a0a16); border: 1.5px solid var(--gold-200); color: var(--gold-100);
  font-size: 11px; font-weight: 700; text-align: center; line-height: 1.25; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), 0 0 10px rgba(245, 199, 107, 0.2);
  transition: transform 0.18s ease;
}
.float-btn svg { width: 22px; height: 22px; }
.float-btn:hover { transform: translateX(-3px); }
.float-btn--cta { background: linear-gradient(180deg, #ff9a3d, #e8731c); color: #fff; border-color: #ffd2a6; }
.float-btn--top { width: 48px; min-height: 48px; margin: 6px auto 0; border-radius: 50%; font-size: 10px; }

/* ---------- 手機版底部四鍵 ---------- */
.tabbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; height: calc(64px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: linear-gradient(180deg, #5a0f23, #2a0810); border-top: 2px solid var(--gold-200);
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.35); grid-template-columns: repeat(4, 1fr); z-index: 100;
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--gold-100); line-height: 1.2; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.is-on { color: #ffe9a8; text-shadow: 0 0 8px rgba(245, 199, 107, 0.6); background: rgba(245, 199, 107, 0.1); }

/* ---------- 會員列、麵包屑 ---------- */
.crumb { margin: 16px 0 0; font-size: 13px; color: var(--text-muted); }
.crumb a { color: var(--gold-200); display: inline-block; min-height: 24px; }
.crumb a:hover { text-decoration: underline; }
.member-bar { margin-top: 22px; display: flex; align-items: center; gap: 16px; padding: 14px 20px; flex-wrap: wrap; }
.member-avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; border: 2px solid var(--gold-200); box-shadow: 0 0 12px rgba(245, 199, 107, 0.45); flex: 0 0 56px; }
.member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-meta { flex: 1 1 160px; }
.member-meta .name { font-weight: 700; font-size: 18px; color: var(--cream); line-height: 1.3; }
.member-meta .sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.member-points { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.stat { text-align: right; }
.stat .k { font-size: 12px; color: var(--text-muted); }
.stat .v { font-size: 22px; font-weight: 900; color: var(--gold-200); font-variant-numeric: tabular-nums; line-height: 1.25; }

/* ---------- 儲值商城 ---------- */
.pack-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.pack-card {
  position: relative; border-radius: 16px; overflow: hidden; border: 2px solid rgba(245, 199, 107, 0.4); background: linear-gradient(180deg, #5a0f23, #2a0810);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease; display: flex; flex-direction: column;
}
.pack-card:hover { transform: translateY(-6px); box-shadow: 0 0 24px rgba(245, 199, 107, 0.4); }
.pack-card.is-on { border-color: var(--gold-200); box-shadow: 0 0 0 2px var(--gold-200), 0 0 28px rgba(245, 199, 107, 0.5); }
.pack-card--vip { background: linear-gradient(180deg, #3a0a16, #14121f); }
.pack-card__art { aspect-ratio: 2 / 1; overflow: hidden; }
.pack-card__art img { width: 100%; height: 100%; object-fit: cover; }
.pack-card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.pack-card__body h2 { font-size: 17px; font-weight: 700; color: var(--cream); line-height: 1.35; }
.pack-price { margin-top: 4px; font-size: 26px; font-weight: 900; color: var(--gold-200); font-variant-numeric: tabular-nums; line-height: 1.2; }
.pack-price span { font-size: 14px; margin-left: 2px; font-weight: 700; }
.pack-coin { margin-top: 4px; font-size: 14px; color: var(--text-soft); line-height: 1.5; }
.pack-bonus { margin-top: 2px; font-size: 13px; color: var(--mint); line-height: 1.4; }
.pack-bonus--first { color: var(--gold-100); font-weight: 700; }
.best-tag--first { right: auto; left: 8px; background: var(--orange); color: #1c070c; border-color: var(--orange); }
.pack-buy.is-disabled, .btn.is-disabled { opacity: .5; pointer-events: none; }
.pack-card .field { display: grid; gap: 4px; margin: 6px 0; font-size: 13px; }
.pack-card .field input { height: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--gold-400); font: inherit; font-size: 16px; }
.checkin-table { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 8px 0; }
.checkin-day { border: 1px solid var(--gold-500); border-radius: 8px; padding: 6px 2px; text-align: center; font-size: 12px; }
.checkin-day.is-today { border-color: var(--gold-100); background: var(--wine-700); font-weight: 700; }
.checkin-day.is-done { opacity: .6; }
.pack-card .btn { margin-top: auto; }
.pack-card .pack-buy { margin-top: 10px; min-height: 36px; }
.best-tag { position: absolute; top: 8px; right: 8px; z-index: 2; height: 24px; padding: 0 10px; border-radius: 6px; font-size: 12px; font-weight: 900; background: #1c070c; color: var(--gold-100); border: 1px solid var(--gold-200); display: inline-flex; align-items: center; }
.pay-panel { margin-top: 28px; padding: 20px 22px 22px; }
.pay-panel h2 { font-size: 20px; margin-bottom: 6px; display: flex; align-items: center; }
.sim-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; margin-left: 8px; border-radius: 6px; background: #a94c0c; color: #fff; font-size: 12px; font-weight: 700; }
.pay-hint { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; line-height: 1.6; }
.pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pay-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1.5px solid rgba(245, 199, 107, 0.35);
  background: rgba(255, 246, 229, 0.04); cursor: pointer; min-height: 72px; text-align: left; color: inherit;
}
.pay-item:hover, .pay-item.is-on { border-color: var(--gold-200); box-shadow: 0 0 14px rgba(245, 199, 107, 0.3); }
.pay-ico { width: 44px; height: 44px; border-radius: 10px; background: linear-gradient(180deg, #f5c76b, #a67c2e); color: #5a0f23; display: flex; align-items: center; justify-content: center; flex: 0 0 44px; }
.pay-ico svg { width: 24px; height: 24px; }
.pay-item .lab { font-weight: 700; font-size: 16px; color: var(--cream); line-height: 1.3; display: block; }
.pay-item .sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; display: block; }
.store-cta { margin-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.store-cta .note { font-size: 13px; color: var(--text-muted); line-height: 1.6; max-width: 720px; }
.store-cta .note strong { color: var(--gold-200); }

/* ---------- 內容頁（表單、會員中心、客服、條款） ---------- */
.content { max-width: 760px; margin: 0 auto; }
.content.wide { max-width: var(--wrap); }
.card { padding: 20px 22px; margin-bottom: 16px; }
.card h2 { font-size: 20px; color: var(--gold-100); margin-bottom: 10px; }
.card h3 { font-size: 16px; color: var(--gold-100); margin: 14px 0 6px; }
.card p, .card li { color: var(--text-soft); line-height: 1.75; }
.card p + p { margin-top: 8px; }
.card ul, .card ol { padding-left: 22px; margin: 6px 0; }
.form-card { max-width: 480px; margin: 0 auto; }
label { display: block; font-size: 14px; color: var(--gold-100); margin: 14px 0 6px; font-weight: 500; }
input, select {
  width: 100%; font-size: 16px; padding: 10px 12px; border: 1px solid var(--gold-400); border-radius: 10px; background: #fff6e5; color: #2a0810; min-height: 44px;
}
input:focus, select:focus { outline: 3px solid var(--focus); outline-offset: 1px; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; margin: 0 8px 0 0; flex: 0 0 20px; accent-color: #e8731c; }
.check { display: flex; align-items: flex-start; color: var(--text-soft); font-size: 14px; line-height: 1.6; }
.check a, .content a:not(.btn), .card a:not(.btn) { color: var(--gold-200); text-decoration: underline; }
.row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.row > * { flex: 1 1 140px; }
.row > .btn { flex: 0 0 auto; }
.auth-links { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; margin-top: 16px; }
.auth-links a { color: var(--gold-200); min-height: 28px; display: inline-flex; align-items: center; }
.msg { padding: 10px 12px; border-radius: 10px; margin: 10px 0; font-size: 14px; line-height: 1.6; }
.msg.error { background: #fdecea; color: #a1231b; }
.msg.ok { background: #e7f4ec; color: #1b6b37; }
.msg.warn { background: #fff4dc; color: #7a4f00; }
.msg a { color: inherit; text-decoration: underline; }
.waking { position: fixed; top: 0; left: 0; right: 0; z-index: 200; margin: 0; border-radius: 0; text-align: center; }
.waking:not(.hidden) { display: flex; align-items: center; justify-content: center; gap: 12px; }
.waking-art { width: 120px; height: auto; flex: none; }
@media (max-width: 520px) { .waking-art { width: 72px; } }
/* 登入／註冊主視覺 */
.auth-layout { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 24px; align-items: center; }
.auth-hero { width: 100%; height: auto; border-radius: 16px; box-shadow: 0 10px 28px rgba(0,0,0,0.45); }
@media (max-width: 860px) { .auth-layout { grid-template-columns: 1fr; gap: 14px; } .auth-hero { max-width: 440px; justify-self: center; } }
/* 頁尾橫式 Logo */
.footer-wordmark { display: block; width: 200px; height: auto; margin: 10px 0 4px; }
/* 角色介紹 */
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 16px 0 32px; }
.char-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px; text-align: center; }
.char-card.is-focus { outline: 3px solid var(--gold-200); }
.char-full { width: 240px; max-width: 100%; height: auto; }
.char-body h2 { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; }
.char-avatar { width: 48px; height: 48px; border-radius: 50%; }
.intro-char { display: inline-flex; align-items: center; gap: 8px; color: var(--gold-200); margin: 4px 0 8px; min-height: 40px; }
.intro-card img.intro-char-avatar { width: 40px; height: 40px; border-radius: 50%; border: 0; object-fit: contain; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--text-muted); font-size: 14px; }
.kv dd { margin: 0; color: var(--cream); }
.kv dd.strong { color: var(--gold-200); font-weight: 900; font-size: 18px; }
.kv dd a { color: var(--gold-200); text-decoration: underline; display: inline-block; min-height: 24px; }
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid rgba(245, 199, 107, 0.2); }
.list-item:last-child { border-bottom: 0; }
.amount-plus { color: var(--mint); font-weight: 700; font-variant-numeric: tabular-nums; }
.amount-minus { color: #ffb4a8; font-weight: 700; font-variant-numeric: tabular-nums; }
.status-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: #fff4dc; color: #7a4f00; white-space: nowrap; }
.status-badge.ok { background: #e7f4ec; color: #1b6b37; }
.status-badge.bad { background: #fdecea; color: #a1231b; }
.balance-big { font-size: 34px; font-weight: 900; color: var(--gold-200); font-variant-numeric: tabular-nums; }
.subnav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 20px; }
.subnav a { min-height: 36px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; font-weight: 700; font-size: 14px; color: var(--gold-100); border: 1px solid rgba(245, 199, 107, 0.4); background: rgba(255, 246, 229, 0.05); }
.subnav a.is-on { background: linear-gradient(180deg, #fff0b8, #c9a04a); color: #5a0f23; border-color: #fff4c8; }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.section-row select { width: auto; min-width: 140px; }
fieldset.methods { border: 1px solid rgba(245, 199, 107, 0.35); border-radius: 12px; padding: 10px 14px 14px; margin: 14px 0; }
fieldset.methods legend { color: var(--gold-100); font-weight: 700; padding: 0 6px; }
.method { display: flex; align-items: center; gap: 4px; margin: 8px 0 0; color: var(--cream); font-size: 15px; min-height: 32px; }
.method .muted { margin-left: 8px; }
.empty-art { margin: 10px auto; }
.result-art { margin: 10px auto; }
.result-actions { justify-content: center; margin-top: 16px; }
.result-actions .btn { flex: 0 0 auto; }
.faq dt { color: var(--gold-100); font-weight: 700; margin-top: 14px; }
.faq dd { margin: 4px 0 0; color: var(--text-soft); line-height: 1.75; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid rgba(245, 199, 107, 0.25); }
th { color: var(--gold-100); }
td { color: var(--text-soft); }
.games-intro { display: grid; gap: 16px; }
.intro-card { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: center; padding: 16px; }
.intro-card img { width: 180px; height: 180px; border-radius: 14px; border: 2px solid var(--gold-200); object-fit: cover; }
.intro-card h2 { font-size: 22px; color: var(--cream); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.intro-card p { color: var(--text-soft); line-height: 1.75; }
.intro-card .row { margin-top: 12px; }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #1c070c; color: var(--gold-100); border: 1px solid var(--gold-400); }
.pill.live { background: #1f5a3a; color: #e7fff0; border-color: #7ed6a8; }

/* 條款頁（伺服器輸出的靜態頁，共用頁首頁尾） */
.legal-doc { max-width: 860px; margin: 24px auto 0; padding: 24px 28px; }
.legal-doc h1 { font-size: 26px; color: var(--gold-100); margin-bottom: 12px; }
.legal-doc h2 { font-size: 20px; color: var(--gold-100); margin: 22px 0 8px; }
.legal-doc h3 { font-size: 17px; color: var(--gold-100); margin: 16px 0 6px; }
.legal-doc p, .legal-doc li { color: var(--text-soft); line-height: 1.8; margin: 6px 0; }
.legal-doc ul, .legal-doc ol { padding-left: 22px; }
.legal-doc blockquote { margin: 10px 0; }
.legal-doc a { color: var(--gold-200); text-decoration: underline; }

/* ---------- 遊戲畫面（金寶派對） ---------- */
.game-shell { max-width: 980px; margin: 0 auto; }
.game-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 16px 0 12px; }
.game-top h1 { font-size: 30px; font-weight: 900; letter-spacing: 0.08em; }
.game-stage { padding: 14px; }
.game-canvas-wrap { position: relative; border-radius: 16px; overflow: hidden; background: #2a0810; aspect-ratio: 16 / 10; max-height: max(340px, calc(100vh - 340px)); width: 100%; }
.game-canvas-wrap canvas { width: 100%; height: 100%; display: block; }
.game-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; margin-top: 14px; }
.bet-picker { display: flex; align-items: center; gap: 8px; }
.bet-picker .btn { min-width: 44px; min-height: 44px; padding: 0; font-size: 20px; }
.bet-value { min-width: 110px; text-align: center; }
.bet-value .k, .win-box .k { font-size: 12px; color: var(--text-muted); display: block; }
.bet-value .v, .win-box .v { font-size: 24px; font-weight: 900; color: var(--gold-200); font-variant-numeric: tabular-nums; display: block; line-height: 1.2; }
.spin-btn { min-width: 168px; min-height: 64px; font-size: 22px; border-radius: 999px; }
.win-box { text-align: right; }
.game-msg { min-height: 28px; text-align: center; margin-top: 10px; font-weight: 700; color: var(--gold-100); }
.paytable { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.paytable .pt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(28, 7, 12, 0.5); border: 1px solid rgba(245, 199, 107, 0.25); }
.paytable canvas { width: 40px; height: 40px; flex: 0 0 40px; }
.paytable .pt b { color: var(--gold-200); }
.history { font-size: 14px; }
.promo-card { margin-top: 14px; padding: 14px 20px; }
.promo-card h2 { font-size: 18px; color: var(--gold-100); margin-bottom: 6px; }
.promo-card p { margin: 6px 0; color: var(--text-soft); display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
dialog.reminder { max-width: min(420px, calc(100% - 32px)); border: 2px solid var(--gold-200); border-radius: 16px; padding: 22px; background: #2a0810; color: var(--cream); }
dialog.reminder::backdrop { background: rgba(16, 0, 6, 0.7); }
dialog.reminder h2 { font-size: 20px; color: var(--gold-100); margin-bottom: 10px; }
dialog.reminder p { line-height: 1.7; margin: 6px 0; }
dialog.reminder .row { margin-top: 14px; }
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px); background: rgba(28, 7, 12, 0.96); color: var(--cream);
  border: 1px solid var(--gold-200); border-radius: 12px; padding: 12px 18px; font-size: 14px; line-height: 1.5; opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease; z-index: 200; max-width: min(360px, calc(100% - 32px)); text-align: center;
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 平板 ---------- */
@media (max-width: 1180px) {
  .main-nav a { padding: 0 10px; }
  .logo-text { font-size: 24px; }
  .game-grid, .game-row { grid-template-columns: repeat(4, 1fr); }
  .pack-grid { grid-template-columns: repeat(3, 1fr); }
  .float-dock { display: none; }
}

/* ---------- 手機 ---------- */
@media (max-width: 860px) {
  :root { --header-h: 56px; }
  body { background-attachment: scroll; padding-bottom: calc(72px + env(safe-area-inset-bottom)); font-size: 14px; }
  .main-nav, .desktop-only { display: none !important; }
  .menu-btn, .mobile-only { display: inline-flex; }
  .header-inner { gap: 8px; width: 100%; padding: 0 10px; }
  .logo { gap: 6px; }
  .logo-mark { width: 32px; height: 32px; flex-basis: 32px; }
  .logo-text { font-size: 20px; }
  .header-actions { gap: 6px; }
  .balance-chip { min-height: 32px; font-size: 13px; padding: 0 10px 0 4px; }
  .balance-chip img { width: 20px; height: 20px; }
  .tabbar { display: grid; }
  .section-title { font-size: 22px; letter-spacing: 0.06em; }
  .section-head { margin: 22px 0 14px; }
  .hero-block { padding-top: 14px; }
  .hero-arrow { width: 36px; height: 36px; }
  .hero-arrow.prev { left: 8px; }
  .hero-arrow.next { right: 8px; }
  .corner { display: none; }
  .intro-line { font-size: 13px; margin-top: 12px; text-align: left; }
  .quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
  .game-row { display: flex; overflow-x: auto; gap: 12px; padding-bottom: 8px; scroll-snap-type: x mandatory; }
  .game-row .game-card { flex: 0 0 148px; scroll-snap-align: start; }
  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
  .game-card:hover { transform: none; }
  .news-panel { grid-template-columns: 1fr; padding: 4px 0; }
  .news-col { padding: 4px 10px; }
  .news-col + .news-col { border-left: 0; border-top: 1px solid rgba(245, 199, 107, 0.28); }
  .news-item .ttl { font-size: 13px; }
  .download-grid, .trust-banners { grid-template-columns: 1fr; }
  .trust-banner img { width: 96px; height: 72px; flex-basis: 96px; }
  .pack-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .pack-price { font-size: 22px; }
  .pay-grid { grid-template-columns: 1fr; }
  .store-cta { flex-direction: column; align-items: stretch; }
  .store-cta .btn { width: 100%; }
  .member-bar { padding: 12px 14px; gap: 12px; }
  .member-avatar { width: 44px; height: 44px; flex-basis: 44px; }
  .stat { text-align: left; }
  .stat .v { font-size: 20px; }
  .site-footer { margin-top: 24px; padding: 20px 0 28px; }
  .footer-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 14px; }
  .footer-contact { text-align: center; }
  .footer-links { justify-content: center; }
  .card { padding: 16px; }
  .intro-card { grid-template-columns: 96px 1fr; gap: 12px; }
  .intro-card img { width: 96px; height: 96px; }
  .intro-card h2 { font-size: 18px; }
  .game-top h1 { font-size: 22px; }
  .game-stage { padding: 8px; }
  .game-canvas-wrap { aspect-ratio: 1 / 1; max-height: none; }
  .enter-section .section-head, .download-grid { display: none; }
  .game-controls { grid-template-columns: 1fr 1fr; }
  .game-controls .spin-wrap { grid-column: 1 / -1; order: -1; display: flex; justify-content: center; }
  .paytable { grid-template-columns: repeat(2, 1fr); }
  .legal-doc { padding: 16px; margin-top: 14px; }
  .toast { bottom: 84px; }
}
@media (min-width: 861px) {
  .quick-grid { display: none; }
}
.quick-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: 12px;
  background: linear-gradient(180deg, #6b1030, #3a0a16); border: 1.5px solid var(--gold-200); color: var(--gold-100); font-weight: 700; font-size: 14px;
}
.quick-btn svg { width: 20px; height: 20px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- 星光連鎖對決 ---------- */
.pvp-shell { max-width: 980px; margin: 0 auto; }
.pvp-hud { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 10px 16px; margin-top: 14px; }
.pvp-player { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pvp-player > div { min-width: 0; }
.pvp-player.foe { justify-content: flex-end; text-align: right; }
.pvp-player .name { display: block; font-weight: 700; color: var(--cream); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pvp-player .k { display: block; font-size: 11px; color: var(--text-muted); }
.pvp-player .v { display: block; font-size: 22px; font-weight: 900; color: var(--gold-200); font-variant-numeric: tabular-nums; line-height: 1.1; }
.pvp-avatar { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--gold-200); object-fit: cover; flex: 0 0 48px; }
.pvp-center { text-align: center; }
.pvp-timer { display: block; font-size: 26px; font-weight: 900; color: var(--gold-100); font-variant-numeric: tabular-nums; }
.pvp-timer.urgent { color: #ff8a80; }
.pvp-deadline { width: 90px; height: 6px; border-radius: 3px; background: rgba(255,246,229,0.15); overflow: hidden; margin: 4px auto 0; }
.pvp-deadline span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff9a3d, #f5c76b); }
.pvp-banner { text-align: center; color: var(--gold-100); font-size: 13px; margin: 8px 0; }
.pvp-stage { position: relative; padding: 8px; }
.pvp-canvas-wrap { width: 100%; aspect-ratio: 16 / 11; max-height: max(380px, calc(100vh - 300px)); border-radius: 14px; overflow: hidden; touch-action: none; }
.pvp-canvas-wrap canvas { width: 100%; height: 100%; display: block; }
.pvp-controls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.pvp-key { min-height: 56px; font-size: 26px; border-radius: 14px; background: linear-gradient(180deg, #6b1030, #3a0a16); }
.pvp-settings { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin: 12px 0; }
.pvp-tip { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); width: min(420px, calc(100% - 24px)); background: #1c070c; border: 2px solid var(--gold-200); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; color: var(--cream); z-index: 3; box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
.pvp-tip strong { color: var(--gold-100); }
/* 對戰正式圖：計時器底座、暱稱名牌、操作鍵、教學圖（沒有正式圖時不套用，維持文字與色塊） */
.pvp-timer-medal { position: relative; display: inline-grid; place-items: center; width: 72px; height: 72px; }
.pvp-timer-medal .pvp-timer-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.pvp-timer-medal .pvp-timer { position: relative; font-size: 20px; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }
.pvp-nameplate { position: relative; display: flex; align-items: center; justify-content: center; width: 150px; max-width: 100%; aspect-ratio: 5 / 1; padding: 0 16%; }
.pvp-nameplate .pvp-nameplate-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.pvp-nameplate .name { position: relative; text-align: center; max-width: 100%; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }
.pvp-controls-art { grid-template-columns: 2fr 1fr 1fr; align-items: center; }
.pvp-key-art { border: 0; padding: 0; background: none; min-height: 56px; cursor: pointer; display: grid; place-items: center; }
.pvp-key-art img { width: 100%; max-width: 120px; height: auto; }
.pvp-move-pad { position: relative; display: grid; grid-template-columns: 1fr 1fr; max-width: 240px; width: 100%; justify-self: center; }
.pvp-move-pad .pvp-move-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pvp-key-half { position: relative; min-height: 64px; border: 0; background: none; cursor: pointer; border-radius: 14px; }
.pvp-key-art:focus-visible, .pvp-key-half:focus-visible { outline: 3px solid var(--gold-200); outline-offset: 2px; }
.pvp-key-art:active img, .pvp-key-half:active { transform: scale(0.96); }
.pvp-tip-art { width: 200px; max-width: 100%; height: auto; align-self: center; border-radius: 10px; }
.pvp-result-pose-foe { transform: scaleX(-1); }
@media (max-width: 520px) { .pvp-nameplate { padding: 0 8%; } .pvp-timer-medal { width: 56px; height: 56px; } .pvp-timer-medal .pvp-timer { font-size: 16px; } .pvp-tip-art { width: 140px; } .pvp-key-half { min-height: 52px; } }
.pvp-tip .btn { align-self: flex-end; }
.pvp-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(16,0,6,0.55); z-index: 4; border-radius: 14px; }
.pvp-result-card { width: min(440px, calc(100% - 24px)); background: #2a0810; border: 2px solid var(--gold-200); border-radius: 18px; padding: 20px; text-align: center; box-shadow: 0 0 40px rgba(245,199,107,0.35); }
.pvp-result-card h2 { font-size: 38px; font-weight: 900; margin-bottom: 6px; }
.pvp-result-card p { margin: 6px 0; color: var(--text-soft); }
.pvp-result-card select { width: auto; margin-top: 10px; }
.pvp-result-card [data-testid="pvp-rematch-status"] { min-height: 1.6em; } /* 再戰狀態文字出現時不讓按鈕跳動 */
.pvp-scoreline { display: flex; justify-content: center; gap: 10px; font-size: 22px; font-weight: 900; color: var(--gold-200); }
@media (max-width: 860px) {
  /* 手機：盤面＋操作鍵要在頁首與底部四鍵之間一次看完 */
  .pvp-crumb { display: none; }
  .pvp-banner { font-size: 12px; margin: 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pvp-stage { padding: 4px; }
  .pvp-canvas-wrap { aspect-ratio: auto; height: max(340px, calc(100dvh - 56px - 64px - 74px - 26px - 70px - 68px)); max-height: none; }
  .pvp-controls { margin-top: 8px; gap: 8px; }
  .pvp-player .name { font-size: 13px; }
  .pvp-hud { padding: 8px 10px; gap: 6px; }
  .pvp-avatar { width: 36px; height: 36px; flex-basis: 36px; }
  .pvp-player .v { font-size: 18px; }
  .pvp-timer { font-size: 20px; }
  .pvp-key { min-height: 52px; }
  .pvp-result-card h2 { font-size: 30px; }
}
.pvp-avatar-slot { display: inline-flex; }
.pvp-countdown { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 96px; font-weight: 900; color: #fff3c4; text-shadow: 0 0 24px rgba(245,199,107,0.9), 0 4px 0 #7a1020; z-index: 5; pointer-events: none; }
.pvp-modes { display: grid; gap: 10px; margin: 12px 0; }
.pvp-mode { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--gold-400); background: linear-gradient(180deg, #5a0f23, #2a0810); color: var(--cream); text-align: left; cursor: pointer; }
.pvp-mode:hover:not(:disabled) { border-color: var(--gold-200); box-shadow: 0 0 14px rgba(245,199,107,0.35); }
.pvp-mode:disabled { opacity: 0.5; cursor: not-allowed; }
.pvp-mode strong { font-size: 18px; color: var(--gold-100); }
.pvp-mode span { font-size: 13px; color: var(--text-soft); }
.pvp-mode .pvp-mode-extra { color: var(--mint); display: inline-flex; align-items: center; gap: 4px; }
.pvp-ticket-icon { width: 20px; height: auto; flex: none; }
.pvp-mode-icon { width: 48px; height: 48px; margin-bottom: 4px; }
.pvp-rank { display: inline-flex; align-items: center; gap: 4px; line-height: inherit; }
.pvp-tier-holder { display: inline-flex; }
.pvp-tier-badge { width: 22px; height: 22px; flex: none; }
.pvp-rank .pvp-tier-badge { width: 16px; height: 16px; margin: -2px 0; }
.pvp-rank-summary { display: flex; align-items: center; justify-content: center; gap: 6px; }
.pvp-rank-summary .pvp-tier-badge { width: 32px; height: 32px; }
.pvp-result-visual { display: flex; align-items: flex-end; justify-content: center; gap: 4px; margin: -4px 0 4px; }
.pvp-result-banner { width: min(320px, 70vw); height: auto; }
.pvp-result-pose { width: 96px; height: auto; }
@media (max-width: 520px) { .pvp-result-pose { width: 72px; } .pvp-result-banner { width: min(240px, 60vw); } }
.pvp-rankline { color: var(--gold-100); font-weight: 700; }

/* ---------- 寶物與圖鑑 ---------- */
.progress { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.progress-track { flex: 1; height: 12px; border-radius: 6px; background: rgba(255,246,229,0.12); overflow: hidden; border: 1px solid rgba(245,199,107,0.35); }
.progress-fill { display: block; height: 100%; background: linear-gradient(90deg, #ff9a3d, #f5c76b); }
.progress-text { font-size: 13px; color: var(--gold-100); font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; }
.item-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 10px; }
.item-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; border-radius: 14px; background: rgba(28,7,12,0.55); border: 1.5px solid rgba(245,199,107,0.3); text-align: center; }
.item-card.owned { border-color: var(--gold-200); }
.item-card h3 { font-size: 15px; color: var(--cream); }
.item-card .muted { margin: 0; }
.item-card .pill { position: absolute; top: 8px; right: 8px; }
.item-art { width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; }
.item-art img { max-width: 120px; max-height: 120px; width: auto; height: auto; }
.rarity-4 { box-shadow: 0 0 14px rgba(245,199,107,0.35); }
.rarity-5 { box-shadow: 0 0 20px rgba(255,154,61,0.55); }
.pvp-avatar-slot { position: relative; }
.pvp-frame { position: absolute; left: -8px; top: -8px; width: 64px; height: 64px; pointer-events: none; }
.pvp-look { color: var(--mint); }
.pvp-entrance { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); width: min(520px, calc(100% - 24px)); display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 6; pointer-events: none; text-align: center; color: var(--gold-100); text-shadow: 0 2px 6px #000; }
.pvp-entrance-art { width: 100%; height: auto; }
@media (max-width: 860px) {
  .item-grid { grid-template-columns: repeat(2, 1fr); }
  .pvp-frame { left: -6px; top: -6px; width: 48px; height: 48px; }
}
.pvp-avatar-holder { display: inline-flex; }

/* 賽季與任務 */
.pass-track { display: grid; gap: 6px; margin: 12px 0; }
.pass-row { display: grid; grid-template-columns: 64px 1fr 1fr; gap: 8px; align-items: stretch; }
.pass-head { font-size: 13px; color: var(--gold-200); }
.pass-lv { display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--cream); border-radius: 10px; background: rgba(255,246,229,0.06); }
.pass-row.reached .pass-lv { background: linear-gradient(180deg, var(--gold-200), #d99a2b); color: #3a1206; }
.pass-cell { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; background: rgba(28,7,12,0.55); border: 1.5px solid rgba(245,199,107,0.25); min-height: 64px; }
.pass-cell.ready { border-color: var(--gold-200); box-shadow: 0 0 0 2px rgba(245,199,107,0.25); }
.pass-cell.claimed { opacity: 0.7; }
.pass-cell.locked { filter: saturate(0.5); }
.pass-cell .pass-name { flex: 1; font-size: 14px; color: var(--cream); }
.pass-ticket { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(245,199,107,0.18); color: var(--gold-200); font-weight: 700; }
.pass-ticket.pass-shard { background: rgba(126,214,200,0.18); color: var(--mint); }
.mission-list { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 10px; }
.mission { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(28,7,12,0.45); border: 1px solid rgba(245,199,107,0.25); }
.mission.done { border-color: var(--gold-200); }
.mission-main { flex: 1; display: grid; gap: 4px; }
.board-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.board-table th, .board-table td { padding: 8px; text-align: left; border-bottom: 1px solid rgba(245,199,107,0.18); }
.board-table tr.me td { color: var(--gold-200); font-weight: 700; }
.pvp-seasonline { color: var(--gold-200); }
.muted.small { font-size: 13px; }
@media (max-width: 640px) {
  .pass-row { grid-template-columns: 48px 1fr 1fr; gap: 4px; }
  .pass-cell { flex-direction: column; text-align: center; padding: 6px; }
  .pass-cell img { width: 40px; height: 40px; }
  .mission { flex-direction: column; align-items: stretch; }
}
.pvp-netnote { margin: 4px 0; padding: 6px 10px; border-radius: 10px; background: rgba(255,170,60,0.15); border: 1px solid rgba(255,170,60,0.5); color: var(--cream); font-size: 14px; text-align: center; }
/* 每日連鎖挑戰、對手名片、賽後表情、精彩回放（星光連鎖對決 E2） */
.puzzle-layout { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.puzzle-board { display: grid; grid-template-columns: repeat(6, 32px); gap: 2px; padding: 6px; border-radius: 12px; background: var(--wine-950); border: 2px solid var(--gold-500); }
.puzzle-cell { width: 32px; height: 32px; border-radius: 6px; background: rgba(255,255,255,0.04); display: grid; place-items: center; }
.puzzle-cell img { width: 30px; height: 30px; }
.puzzle-pieces { display: flex; flex-direction: column; gap: 8px; }
.puzzle-piece { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--gold-500); }
.puzzle-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 12px; }
.puzzle-controls fieldset { display: grid; gap: 4px; border: 1px solid var(--gold-500); border-radius: 10px; padding: 6px 10px; }
.puzzle-controls select { min-height: 40px; font: inherit; }
.pvp-avatar-btn { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%; }
.pvp-card { position: absolute; right: 12px; top: 12px; z-index: 6; max-width: 280px; padding: 12px 14px; border-radius: 14px; background: var(--wine-900); border: 1.5px solid var(--gold-400); color: var(--cream); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.pvp-card-head { display: flex; align-items: center; gap: 8px; }
.pvp-emotes { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.pvp-emote-log { min-height: 1.4em; color: var(--gold-100); text-align: center; }
.highlight-canvas { border-radius: 8px; border: 1.5px solid var(--gold-500); background: var(--wine-950); }
.highlight-card { display: block; margin: 8px 0; border-radius: 8px; max-width: 100%; height: auto; }
@media (max-width: 520px) { .puzzle-board { grid-template-columns: repeat(6, 26px); } .puzzle-cell { width: 26px; height: 26px; } .puzzle-cell img { width: 24px; height: 24px; } .pvp-card { left: 8px; right: 8px; max-width: none; } }
.pvp-rest { margin: 8px 0; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--mint); color: var(--cream); }

/* ── 機會型遊戲共用畫面（game-chance.js） ── */
.test-ribbon { background: #2a9b8c; }
.chance-stage { --bg: linear-gradient(160deg, #3a1230, #6b1f3c); --accent: var(--gold-200, #ffd36e); background: linear-gradient(rgba(18,8,28,.45), rgba(18,8,28,.7)), var(--bgimg, none) center / cover no-repeat, var(--bg); color: #fff; }
.chance-scene { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 300px; padding: 16px; flex-wrap: wrap; }
.chance-char { max-width: 34%; height: auto; filter: drop-shadow(0 8px 16px rgba(0,0,0,.35)); }
.chance-chip { --c: #ccc; --s: 56px; width: var(--s); height: var(--s); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: radial-gradient(circle at 35% 30%, #fff 0, var(--c) 55%, color-mix(in srgb, var(--c) 60%, #000) 100%); box-shadow: 0 2px 6px rgba(0,0,0,.3); vertical-align: middle; }
.chance-chip-label { font-size: calc(var(--s) * .2); font-weight: 700; color: #2a1430; text-align: center; line-height: 1.1; padding: 2px; }
.chance-reels { display: grid; grid-template-columns: repeat(3, 72px); gap: 8px; padding: 12px; background: rgba(255,255,255,.12); border-radius: 18px; }
.reel-cell { width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: rgba(0,0,0,.18); }
.reel-cell.mid { outline: 2px dashed var(--accent); }
.chance-reels.won .reel-cell.mid { background: color-mix(in srgb, var(--accent) 45%, transparent); animation: chance-pulse .6s 3; }
.chance-wheel { position: relative; width: min(300px, 80vw); aspect-ratio: 1; }
.wheel-disc { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 6px var(--accent), 0 10px 30px rgba(0,0,0,.4); }
.wheel-disc svg { width: 100%; height: 100%; display: block; }
.wheel-disc.spinning { animation: chance-spin .5s linear infinite; }
.wheel-pointer { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 26px solid var(--accent); z-index: 2; filter: drop-shadow(0 2px 2px rgba(0,0,0,.4)); }
.chance-scratch { display: grid; gap: 10px; justify-items: center; }
.scratch-grid { display: grid; grid-template-columns: repeat(3, 76px); gap: 8px; padding: 14px; background: #fff6e5; border-radius: 14px; border: 3px solid var(--accent); }
.scratch-cell { width: 76px; height: 76px; border: 0; border-radius: 10px; background: linear-gradient(135deg, #c9a04a, #f5d98a, #b68a3a); color: #7a4a10; font-size: 28px; cursor: pointer; }
.scratch-cell.open { background: #fffaf0; cursor: default; }
.scratch-cell.hit { box-shadow: 0 0 0 3px #e23b3b inset; animation: chance-pulse .6s 3; }
.chance-chests { display: flex; gap: 18px; }
.chest { position: relative; width: 96px; height: 90px; border: 0; background: none; cursor: pointer; padding: 0; }
.chest .body { position: absolute; bottom: 0; left: 0; right: 0; height: 58px; border-radius: 8px; background: linear-gradient(#8a5a2b, #5a3414); border: 3px solid var(--accent); display: flex; align-items: center; justify-content: center; }
.chest .lid { position: absolute; top: 4px; left: 0; right: 0; height: 30px; border-radius: 14px 14px 4px 4px; background: linear-gradient(#a8743a, #6b4118); border: 3px solid var(--accent); transition: transform .4s; transform-origin: bottom left; }
.chest.open .lid { transform: rotate(-35deg) translateY(-8px); }
.chest.chosen .body { box-shadow: 0 0 18px var(--accent); }
.chest.other { opacity: .7; }
.chest.shake { animation: chance-shake .25s infinite; }
.chest:disabled { cursor: default; }
.chance-gacha { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.gacha-machine { position: relative; width: 160px; height: 200px; border-radius: 80px 80px 16px 16px; background: linear-gradient(#e9d58f, #b9973f); }
.gacha-machine .dome { position: absolute; top: 10px; left: 15px; right: 15px; height: 120px; border-radius: 65px; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.9), rgba(255,255,255,.25)); }
.capsule { --c: #ff8fb1; position: absolute; left: 60px; top: 60px; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(var(--c) 50%, #fff 50%); border: 2px solid rgba(0,0,0,.2); }
.capsule.rolling { animation: chance-shake .2s infinite; }
.capsule.drop { animation: chance-drop 1s ease-in forwards; }
.capsule.open { top: 150px; transform: scale(1.2); }
.gacha-prize { display: flex; align-items: center; gap: 10px; min-height: 64px; font-size: 1.1rem; }
.gift-box { position: relative; width: 170px; height: 170px; }
.gift-box .layer { position: absolute; inset: calc(var(--i) * 10px); border-radius: 16px; background: hsl(calc(200 + var(--i) * 30) 70% 70%); border: 3px solid #fff; transition: transform .4s, opacity .4s; }
.gift-box .layer.peel { transform: translateY(-120px) rotate(-20deg); opacity: 0; }
.gift-box.wobble { animation: chance-shake .3s infinite; }
.gift-reveal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.chance-pusher { position: relative; width: min(320px, 86vw); height: 220px; border-radius: 16px; background: rgba(255,255,255,.18); overflow: hidden; }
.pusher-arm { position: absolute; top: 0; left: 0; right: 0; height: 26px; background: linear-gradient(#ffe39b, #ffb347); }
.chance-pusher.pushing .pusher-arm { animation: chance-push .6s ease-in-out infinite alternate; }
.pusher-tray { position: absolute; top: 40px; left: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 26px; }
.pusher-basket { position: absolute; bottom: 8px; left: 10px; right: 10px; min-height: 50px; border-radius: 12px; background: rgba(0,0,0,.25); display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; font-size: 24px; align-items: center; }
.pusher-basket .fall { animation: chance-fall .4s ease-in; }
.odds-table td, .odds-table th { padding: 6px 10px; }
@keyframes chance-spin { to { transform: rotate(360deg); } }
@keyframes chance-pulse { 50% { transform: scale(1.06); } }
@keyframes chance-shake { 25% { transform: translateX(-3px) rotate(-2deg); } 75% { transform: translateX(3px) rotate(2deg); } }
@keyframes chance-drop { to { top: 150px; } }
@keyframes chance-push { to { transform: translateY(14px); } }
@keyframes chance-fall { from { transform: translateY(-80px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .chance-stage * { animation: none !important; transition: none !important; } }
.skill-stage { background: linear-gradient(rgba(6,11,46,.55), rgba(6,11,46,.8)), url(img/bg-starcatch-640.webp) center / cover no-repeat, #060b2e; color: #fff; }
.skill-scene { display: flex; align-items: flex-end; justify-content: center; gap: 12px; padding: 12px; flex-wrap: wrap; }
.skill-canvas { width: min(560px, 92vw); aspect-ratio: 4 / 3; border-radius: 14px; touch-action: none; cursor: none; }
.skill-board { padding-left: 1.2em; }

/* 各遊戲背景（CSP 不允許 inline style，背景圖以 class 指定） */
.bg-rabbit { --bgimg: url(img/bg-rabbit-640.webp); }
.bg-panda { --bgimg: url(img/bg-panda-640.webp); }
.bg-island { --bgimg: url(img/bg-island-640.webp); }
.bg-stage { --bgimg: url(img/bg-stage-640.webp); }
.bg-cloudgift { --bgimg: url(img/bg-cloudgift-640.webp); }
.bg-blessing { --bgimg: url(img/bg-blessing-640.webp); }
.bg-treasure { --bgimg: url(img/bg-treasure-640.webp); }
.bg-vault { --bgimg: url(img/bg-vault-640.webp); }
.bg-starnight { --bgimg: url(img/bg-starnight-640.webp); }
.chance-wheel { width: min(300px, 100%); }
.chance-pusher { width: min(320px, 100%); }
.skill-canvas { width: min(560px, 100%); max-width: 100%; cursor: crosshair; }
.skill-canvas.playing { cursor: none; }
.chance-chests { flex-wrap: wrap; justify-content: center; }
.chance-scene > [data-testid="chance-board"] { padding: 14px; border-radius: 22px; border: 3px solid var(--accent); background: rgba(0,0,0,.22); box-shadow: inset 0 0 24px rgba(0,0,0,.35), 0 0 0 6px rgba(255,255,255,.06); }
.chance-wheel[data-testid="chance-board"] { padding: 0; border: 0; background: none; box-shadow: none; }
.balance-box { text-align: left; }
@media (min-width: 861px) {
  .chance-wheel { width: min(400px, 100%); }
  .chance-reels { grid-template-columns: repeat(3, 96px); }
  .reel-cell { width: 96px; height: 96px; }
  .chance-scene { min-height: 420px; }
}
@media (max-width: 520px) { .chance-char { max-width: 28%; } .chance-scene { padding: 8px; gap: 8px; } }
/* QR Code 付款頁 */
.qr-img { display: block; margin: 12px auto; background: #fff; padding: 10px; border-radius: 12px; }
.stack { display: grid; gap: 12px; }
.plain { list-style: none; padding: 0; }
.big { font-size: 1.25rem; }
.msg.info { background: #e8f1ff; color: #1d4f91; }
.method-label { display: flex; flex-direction: column; }
.notice { padding: 10px 12px; border-radius: 10px; background: rgba(255,214,110,.12); border: 1px solid rgba(255,214,110,.4); }

/* 盤面寬度用百分比時，舞台面板要撐滿（否則會縮成內容寬度） */
.chance-stage, .skill-stage { width: 100%; box-sizing: border-box; }
.chance-wheel { width: 400px; max-width: 100%; flex: 0 1 auto; }
.chance-pusher { width: 320px; max-width: 100%; flex: 0 1 auto; }
.chance-stage { background: linear-gradient(rgba(18,8,28,.25), rgba(18,8,28,.55)), var(--bgimg, none) center / cover no-repeat, var(--bg); }
.rhythm-canvas.playing { cursor: pointer; }
