/* ==========================================================================
   LuckyForge Lab｜全站樣式
   設計方向：深墨綠賭桌絨面 + 香檳金 + 象牙白，純系統字體，零外部請求。
   效能原則：單一 CSS、CSS 變數、避免大面積即時濾鏡、尊重 reduced-motion。
   ========================================================================== */

/* 1. 設計權杖 ------------------------------------------------------------- */
:root {
  color-scheme: dark;
  --ink: #070a10;
  --ink-2: #0a0f18;
  --panel: #0e1522;
  --panel-2: #121b2b;
  --panel-3: #172235;
  --felt: #0a3a2e;
  --felt-2: #0d4a3a;
  --gold: #e9b95c;
  --gold-2: #f8dda0;
  --gold-3: #a87428;
  --coral: #ff6f61;
  --mint: #5ed8aa;
  --sky: #76baff;
  --text: #f3eee2;
  --muted: #a7afbe;
  --muted-2: #7f8899;
  --line: rgba(233, 185, 92, 0.16);
  --line-2: rgba(255, 255, 255, 0.08);
  --ok: #65d6a0;
  --danger: #ff7d70;
  --radius-s: 10px;
  --radius: 18px;
  --radius-l: 28px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --shadow-s: 0 10px 30px rgba(0, 0, 0, 0.3);
  --font-sans: system-ui, -apple-system, "Segoe UI", "Noto Sans TC",
    "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Noto Serif TC",
    "Songti TC", "PMingLiU", Georgia, serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas,
    "Liberation Mono", monospace;
  --container: 1180px;
  --header-h: 70px;
}

/* 2. 基礎重設 ------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 620px at 82% -8%, rgba(17, 92, 72, 0.42), transparent 60%),
    radial-gradient(900px 540px at 4% 12%, rgba(72, 49, 16, 0.26), transparent 58%),
    linear-gradient(180deg, #080c14 0%, #070a10 55%, #090d14 100%);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding-left: 1.3em;
}

a {
  color: var(--gold-2);
  text-decoration-color: rgba(233, 185, 92, 0.4);
  text-underline-offset: 3px;
}

a:hover {
  color: #fff3d2;
  text-decoration-color: currentColor;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: rgba(233, 185, 92, 0.3);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 3px;
  border-radius: 4px;
}

[hidden] {
  display: none !important;
}

hr {
  border: 0;
  border-top: 1px solid var(--line-2);
  margin: 2rem 0;
}

small {
  font-size: 0.82rem;
}

abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

code,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

kbd {
  padding: 0.12em 0.45em;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--gold-2);
}

/* 3. 通用工具類 ----------------------------------------------------------- */
.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - 40px, 820px);
  margin-inline: auto;
}

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

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 999;
  padding: 12px 20px;
  border-radius: 0 0 12px 12px;
  background: var(--gold);
  color: #171006;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
}

.gold-text {
  color: var(--gold-2);
  background: linear-gradient(105deg, #f8e2ad 10%, #e9b95c 48%, #c18a33 92%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.85rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.h3 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  font-weight: 600;
  line-height: 1.25;
}

.lead {
  max-width: 65ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.13rem);
  line-height: 1.8;
}

.section {
  padding: clamp(56px, 8vw, 96px) 0;
  content-visibility: auto;
  contain-intrinsic-size: auto 720px;
}

.section--tight {
  padding: clamp(40px, 6vw, 64px) 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.section-head p {
  max-width: 58ch;
  margin-top: 12px;
  color: var(--muted);
}

.section-head__link {
  flex: none;
  font-size: 0.92rem;
  font-weight: 700;
}

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

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

.card {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.035), transparent 42%),
    var(--panel);
  box-shadow: var(--shadow-s);
}

.card--pad {
  padding: clamp(20px, 3vw, 30px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(233, 185, 92, 0.28);
  border-radius: 999px;
  background: rgba(233, 185, 92, 0.07);
  color: var(--gold-2);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.5;
  white-space: nowrap;
}

.badge--muted {
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.badge--mint {
  border-color: rgba(94, 216, 170, 0.3);
  background: rgba(94, 216, 170, 0.08);
  color: var(--mint);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  font-size: 0.94rem;
  line-height: 1.2;
  text-decoration: none;
  transition:
    transform 0.16s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  transform: translateY(-1px);
  color: var(--text);
}

.btn:active {
  transform: translateY(0);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(180deg, #f6d99a, #e9b95c 58%, #c58f36);
  color: #1b1204;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 10px 28px rgba(233, 185, 92, 0.22);
}

.btn-primary:hover {
  color: #120c02;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 14px 36px rgba(233, 185, 92, 0.3);
}

.btn-ghost {
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(233, 185, 92, 0.4);
  background: rgba(233, 185, 92, 0.06);
}

.btn-sm {
  min-height: 38px;
  padding: 8px 16px;
  font-size: 0.84rem;
}

.btn-block {
  width: 100%;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  font-weight: 700;
  text-decoration: none;
}

.link-arrow::after {
  content: "→";
  transition: transform 0.18s ease;
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

/* 4. 站頭 ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  background: rgba(7, 10, 16, 0.66);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line-2);
  background: rgba(7, 10, 16, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(233, 185, 92, 0.5);
  border-radius: 11px;
  background:
    linear-gradient(145deg, rgba(233, 185, 92, 0.22), rgba(233, 185, 92, 0.02)),
    #0c1320;
  color: var(--gold-2);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: 0 0 24px rgba(233, 185, 92, 0.12) inset;
}

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.brand-name strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-name span {
  color: var(--muted-2);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.site-nav a:not(.btn) {
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.site-nav a:not(.btn):hover,
.site-nav a:not(.btn)[aria-current="page"] {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 6px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  transition: color 0.16s ease, border-color 0.16s ease;
}

.icon-btn:hover {
  border-color: rgba(233, 185, 92, 0.4);
  color: var(--gold-2);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn .icon-sound-off,
.icon-btn[aria-pressed="true"] .icon-sound-on {
  display: none;
}

.icon-btn[aria-pressed="true"] .icon-sound-off {
  display: block;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 1.5px;
  margin-inline: auto;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-toggle span {
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] span::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
  top: 0;
  transform: rotate(-45deg);
}

/* 5. 首頁主視覺 ----------------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(48px, 7vw, 92px) 0 clamp(36px, 5vw, 60px);
  overflow: clip;
}

.hero::before {
  content: "";
  position: absolute;
  top: -18%;
  right: -6%;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 185, 92, 0.11), transparent 62%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 13px 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(233, 185, 92, 0.05);
  color: var(--gold-2);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-kicker .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(94, 216, 170, 0.12);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(94, 216, 170, 0.12);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(94, 216, 170, 0.03);
  }
}

.hero h1 {
  margin: 20px 0 20px;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.7vw, 4.5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.hero h1 .line {
  display: block;
}

.hero-lede {
  max-width: 55ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted-2);
  font-size: 0.82rem;
}

.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-points svg {
  width: 14px;
  height: 14px;
  color: var(--mint);
}

.hero-stage {
  position: relative;
  min-height: 430px;
  display: grid;
  place-items: center;
}

.hero-stage::before {
  content: "";
  position: absolute;
  inset: 10% 3%;
  border: 1px solid rgba(233, 185, 92, 0.14);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.cabinet {
  position: relative;
  width: min(100%, 430px);
  padding: 18px;
  border: 1px solid rgba(233, 185, 92, 0.3);
  border-radius: 26px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), transparent 36%),
    linear-gradient(180deg, #1b2433, #0b111c 72%);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 70px rgba(233, 185, 92, 0.1);
  transform: rotate(2.4deg);
  animation: cabinet-float 7s ease-in-out infinite;
}

@keyframes cabinet-float {
  0%,
  100% {
    transform: rotate(2.4deg) translateY(0);
  }
  50% {
    transform: rotate(2.4deg) translateY(-9px);
  }
}

.cabinet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 14px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cabinet-top .live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--mint);
}

.cabinet-top .live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.mini-reels {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 17px;
  background:
    radial-gradient(circle at 50% 30%, rgba(94, 216, 170, 0.11), transparent 66%),
    #071a16;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.4) inset;
}

.mini-reel {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1.45;
  border: 1px solid rgba(233, 185, 92, 0.14);
  border-radius: 11px;
  background: linear-gradient(180deg, #0c211c, #081712);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24) inset;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 4.1rem);
  font-weight: 700;
  color: var(--gold-2);
  text-shadow: 0 0 24px rgba(233, 185, 92, 0.55);
}

.mini-reel--gem {
  color: var(--sky);
  text-shadow: 0 0 24px rgba(118, 186, 255, 0.55);
}

.mini-reel--star {
  color: var(--coral);
  text-shadow: 0 0 24px rgba(255, 111, 97, 0.5);
}

.payline {
  position: absolute;
  left: 13px;
  right: 13px;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 111, 97, 0.95), transparent);
  box-shadow: 0 0 12px rgba(255, 111, 97, 0.8);
  pointer-events: none;
}

.payline::before,
.payline::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
  transform: translateY(-50%);
  box-shadow: 0 0 12px var(--coral);
}

.payline::before {
  left: 0;
}

.payline::after {
  right: 0;
}

.win-callout {
  position: absolute;
  right: -18px;
  top: 38%;
  padding: 10px 15px;
  border: 1px solid rgba(233, 185, 92, 0.5);
  border-radius: 13px;
  background: linear-gradient(160deg, #f8e2ad, #dda643 70%, #b9822e);
  color: #1a1102;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(233, 185, 92, 0.3);
  transform: rotate(-3deg);
}

.win-callout strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1;
  letter-spacing: 0.02em;
}

.win-callout span {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.cabinet-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 4px 1px;
}

.cabinet-foot .chips {
  display: flex;
}

.chip {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: -7px;
  border: 2px dashed rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: var(--chip, #c94a42);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.3);
}

.chip:first-child {
  margin-left: 0;
}

.chip--gold {
  --chip: #c4933e;
  color: #1a1102;
}

.chip--green {
  --chip: #1e6b52;
}

.chip--black {
  --chip: #1d2430;
}

.cabinet-foot .hint {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-align: right;
}

.floating-chip {
  position: absolute;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 3px dashed rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: #b23f3a;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.42);
}

.floating-chip--one {
  left: 0;
  top: 12%;
  transform: rotate(-14deg);
  animation: chip-float 5s ease-in-out infinite;
}

.floating-chip--two {
  right: 2%;
  bottom: 8%;
  background: #1d2430;
  transform: rotate(10deg);
  animation: chip-float 6s ease-in-out 0.8s infinite;
}

@keyframes chip-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -12px;
  }
}

/* 6. 信任列 --------------------------------------------------------------- */
.trust-strip {
  border-block: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.018);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.trust-item {
  padding: 20px 24px;
  border-left: 1px solid var(--line-2);
}

.trust-item:first-child {
  border-left: 0;
}

.trust-item strong {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.2;
}

.trust-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

/* 7. 遊戲卡 --------------------------------------------------------------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-s);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.game-card:hover {
  transform: translateY(-5px);
  border-color: rgba(233, 185, 92, 0.38);
  color: var(--text);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

.game-card--wide {
  grid-column: span 2;
}

.game-art {
  position: relative;
  min-height: 200px;
  overflow: hidden;
  border-bottom: 1px solid var(--line-2);
  background:
    radial-gradient(circle at 72% 24%, var(--art-glow, rgba(233, 185, 92, 0.28)), transparent 55%),
    linear-gradient(145deg, var(--art-a, #123a31), var(--art-b, #081019));
}

.game-card--wide .game-art {
  min-height: 240px;
}

.game-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 55%, rgba(5, 8, 13, 0.62)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 46px);
  pointer-events: none;
}

.game-art svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.game-art__label {
  position: absolute;
  top: 16px;
  left: 18px;
  z-index: 2;
  display: flex;
  gap: 6px;
}

.game-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 11px;
  padding: 20px 22px 22px;
}

.game-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.36rem;
  font-weight: 600;
  line-height: 1.2;
}

.game-card-body h3 small {
  margin-left: 6px;
  color: var(--muted-2);
  font-family: var(--font-sans);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-card-body p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.game-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line-2);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.03em;
}

.game-card-meta b {
  color: var(--gold);
  font-weight: 700;
}

.game-card-cta {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(233, 185, 92, 0.3);
  border-radius: 50%;
  background: rgba(233, 185, 92, 0.08);
  color: var(--gold-2);
  font-size: 1rem;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.game-card:hover .game-card-cta {
  background: var(--gold);
  color: #171006;
  transform: rotate(-8deg);
}

/* 8. 數學表 --------------------------------------------------------------- */
.math-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.math-copy {
  min-width: 0;
}

.math-copy p + p {
  margin-top: 14px;
}

.math-copy p {
  color: var(--muted);
}

.math-copy .btn {
  margin-top: 24px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--panel);
  -webkit-overflow-scrolling: touch;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  white-space: nowrap;
}

table.data caption {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-2);
  color: var(--muted);
  font-size: 0.78rem;
  text-align: left;
}

table.data th,
table.data td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-2);
  text-align: left;
}

table.data th {
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

table.data tr:last-child td {
  border-bottom: 0;
}

table.data td.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.rtp-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rtp-bar i {
  display: block;
  width: 58px;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.rtp-bar i::after {
  content: "";
  display: block;
  width: var(--rtp, 96%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-3), var(--gold-2));
}

.note {
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 0.76rem;
  line-height: 1.6;
}

/* 9. 工程卡 --------------------------------------------------------------- */
.eng-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.eng-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.035), transparent 45%),
    var(--panel);
}

.eng-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(233, 185, 92, 0.26);
  border-radius: 12px;
  background: rgba(233, 185, 92, 0.07);
  color: var(--gold-2);
}

.eng-icon svg {
  width: 20px;
  height: 20px;
}

.eng-card h3 {
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 600;
}

.eng-card p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.eng-card a {
  margin-top: auto;
  font-size: 0.82rem;
}

/* 10. 三步驟 -------------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  counter-reset: step;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.018);
  overflow: hidden;
}

.step {
  position: relative;
  padding: 28px;
  border-left: 1px solid var(--line-2);
  counter-increment: step;
}

.step:first-child {
  border-left: 0;
}

.step::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: 18px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

.step h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}

.step p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.7;
}

/* 11. FAQ ---------------------------------------------------------------- */
.faq {
  max-width: 880px;
  margin-inline: auto;
  border-top: 1px solid var(--line-2);
}

.faq details {
  border-bottom: 1px solid var(--line-2);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  color: var(--text);
  font-weight: 600;
  line-height: 1.5;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 400;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.faq details[open] summary::after {
  content: "−";
  background: rgba(233, 185, 92, 0.08);
  transform: rotate(180deg);
}

.faq details[open] summary {
  color: var(--gold-2);
}

.faq .faq-answer {
  max-width: 72ch;
  padding: 0 4px 24px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.85;
}

.faq .faq-answer p + p {
  margin-top: 10px;
}

/* 12. CTA 區 -------------------------------------------------------------- */
.cta-band {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  align-items: center;
  gap: 30px;
  padding: clamp(30px, 5vw, 52px);
  border: 1px solid rgba(233, 185, 92, 0.28);
  border-radius: var(--radius-l);
  background:
    radial-gradient(circle at 82% 30%, rgba(233, 185, 92, 0.16), transparent 52%),
    linear-gradient(140deg, #10251f, #0b111c 62%);
}

.cta-band::before {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -80px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(233, 185, 92, 0.18);
  border-radius: 50%;
  pointer-events: none;
}

.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
}

.cta-band p {
  max-width: 55ch;
  margin-top: 10px;
  color: var(--muted);
}

.cta-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 190px;
}

/* 13. 頁尾 --------------------------------------------------------------- */
.site-footer {
  margin-top: clamp(60px, 9vw, 110px);
  border-top: 1px solid var(--line-2);
  background: rgba(4, 7, 11, 0.55);
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 0.75fr));
  gap: 40px;
  padding: 54px 0 42px;
}

.footer-brand p {
  max-width: 34ch;
  margin-top: 16px;
  color: var(--muted-2);
  font-size: 0.84rem;
  line-height: 1.75;
}

.footer-col h2 {
  margin: 0 0 14px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-col ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col a {
  display: inline-block;
  padding: 4px 0;
  color: var(--muted);
  font-size: 0.84rem;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--gold-2);
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 0 30px;
  border-top: 1px solid var(--line-2);
  color: var(--muted-2);
  font-size: 0.74rem;
}

.footer-bottom p {
  max-width: 82ch;
}

.footer-bottom a {
  color: var(--muted);
}

/* 14. 內頁通用 ------------------------------------------------------------ */
.breadcrumbs {
  padding: 18px 0 0;
  font-size: 0.76rem;
  color: var(--muted-2);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs li + li::before {
  content: "/";
  color: rgba(255, 255, 255, 0.2);
}

.breadcrumbs a,
.breadcrumbs [aria-current="page"] {
  display: inline-block;
  padding: 4px 0;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--gold-2);
}

.breadcrumbs [aria-current="page"] {
  color: var(--gold-2);
}

.page-hero {
  padding: clamp(34px, 5vw, 58px) 0 clamp(26px, 4vw, 42px);
}

.page-hero h1 {
  max-width: 22ch;
  margin: 10px 0 16px;
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 4.8vw, 3.7rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.page-hero .lead {
  max-width: 70ch;
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 20px;
  color: var(--muted-2);
  font-size: 0.76rem;
}

.page-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.page-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

.key-takeaway {
  margin-top: 24px;
  padding: 20px 22px;
  border: 1px solid rgba(233, 185, 92, 0.26);
  border-left-width: 3px;
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  background: rgba(233, 185, 92, 0.055);
}

.key-takeaway strong {
  display: block;
  margin-bottom: 6px;
  color: var(--gold-2);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.key-takeaway p {
  max-width: 78ch;
  color: #ddd5c4;
  font-size: 0.92rem;
  line-height: 1.8;
}

.prose {
  min-width: 0;
  color: #d5d7dc;
  font-size: 1rem;
  line-height: 1.9;
}

/* 長網址、程式碼 token 與表格在窄螢幕必須可換行，否則會撐破網格 */
.prose :where(p, li, h2, h3, h4, td, th, figcaption) {
  overflow-wrap: break-word;
}

.prose code {
  overflow-wrap: anywhere;
}

.prose pre {
  max-width: 100%;
}

.prose > * + * {
  margin-top: 1.2em;
}

.prose h2 {
  margin-top: 2.2em;
  padding-top: 0.4em;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
}

.prose h3 {
  margin-top: 1.8em;
  color: var(--gold-2);
  font-family: var(--font-display);
  font-size: 1.24rem;
  font-weight: 600;
}

.prose p,
.prose li {
  max-width: 74ch;
}

.prose ul,
.prose ol {
  display: grid;
  gap: 0.5em;
}

.prose strong {
  color: var(--text);
}

.prose a {
  text-decoration-thickness: 1px;
}

.prose blockquote {
  margin: 1.6em 0;
  padding: 18px 22px;
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  background: rgba(255, 255, 255, 0.028);
  color: var(--muted);
}

.prose blockquote p {
  margin: 0;
}

.prose code {
  padding: 0.15em 0.42em;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--gold-2);
  font-size: 0.86em;
}

.prose pre {
  overflow-x: auto;
  margin: 1.5em 0;
  padding: 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-s);
  background: #070d15;
  color: #c8d4e2;
  font-size: 0.82rem;
  line-height: 1.7;
  -webkit-overflow-scrolling: touch;
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

.prose figure {
  margin: 1.6em 0;
}

.prose figcaption {
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 0.76rem;
}

.prose .table-wrap {
  margin: 1.6em 0;
}

.prose .table-wrap table.data {
  white-space: normal;
}

.prose .table-wrap table.data th,
.prose .table-wrap table.data td {
  vertical-align: top;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: clamp(30px, 5vw, 70px);
  align-items: start;
  padding-bottom: 40px;
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-s);
  background: rgba(255, 255, 255, 0.02);
}

.toc h2 {
  margin: 0 0 12px;
  color: var(--muted-2);
  font-family: var(--font-sans);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.toc ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
  font-size: 0.8rem;
  line-height: 1.5;
}

.toc a {
  display: block;
  padding-left: 22px;
  color: var(--muted);
  text-decoration: none;
  text-indent: -22px;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero) " ";
  color: var(--gold-3);
  font-family: var(--font-mono);
  font-size: 0.66rem;
}

.toc a:hover {
  color: var(--gold-2);
}

.author-box {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 40px;
  padding: 22px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--panel);
}

.author-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(233, 185, 92, 0.35);
  border-radius: 50%;
  background: rgba(233, 185, 92, 0.08);
  color: var(--gold-2);
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.author-box h2 {
  margin: 0 0 4px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.author-box p {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.65;
}

.sources {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line-2);
}

.sources h2 {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.sources ol {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.sources li + li {
  margin-top: 7px;
}

.callout {
  margin: 1.6em 0;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: rgba(233, 185, 92, 0.05);
  color: var(--muted);
  font-size: 0.9rem;
}

.callout strong {
  color: var(--gold-2);
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.related-links a {
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: none;
}

.related-links a:hover {
  border-color: rgba(233, 185, 92, 0.35);
  color: var(--gold-2);
}

/* 15. 指南列表 ------------------------------------------------------------ */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.guide-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.035), transparent 46%),
    var(--panel);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.guide-card:hover {
  transform: translateY(-3px);
  border-color: rgba(233, 185, 92, 0.36);
  color: var(--text);
}

.guide-card .guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
}

.guide-card h2 {
  font-family: var(--font-display);
  font-size: 1.34rem;
  font-weight: 600;
  line-height: 1.28;
}

.guide-card p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.guide-card .link-arrow {
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.82rem;
}

/* 16. 頁面揭露與通知 ------------------------------------------------------ */
.demo-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(233, 185, 92, 0.2);
  border-radius: var(--radius-s);
  background: rgba(233, 185, 92, 0.04);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.65;
}

.demo-disclaimer svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  color: var(--gold);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 90;
  max-width: min(92vw, 420px);
  padding: 12px 18px;
  border: 1px solid rgba(233, 185, 92, 0.32);
  border-radius: 999px;
  background: rgba(12, 19, 30, 0.96);
  color: var(--text);
  font-size: 0.82rem;
  box-shadow: var(--shadow-s);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* 17. 404 ---------------------------------------------------------------- */
.error-page {
  display: grid;
  place-items: center;
  min-height: 62vh;
  padding: 60px 0;
  text-align: center;
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 18vw, 11rem);
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1px rgba(233, 185, 92, 0.5);
}

.error-page h1 {
  margin: 18px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 600;
}

.error-page p {
  max-width: 46ch;
  margin-inline: auto;
  color: var(--muted);
}

.error-page .hero-actions {
  justify-content: center;
}

/* 18. 動畫與無障礙偏好 ---------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* 19. 響應式 -------------------------------------------------------------- */
@media (max-width: 1020px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-stage {
    min-height: 360px;
    order: 2;
  }

  .cabinet {
    max-width: 400px;
  }

  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-card--wide {
    grid-column: span 2;
  }

  .eng-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .math-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    display: none;
  }

  .footer-main {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .footer-brand {
    grid-column: span 3;
  }
}

@media (max-width: 860px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  :root {
    --header-h: 62px;
  }

  /* 漸進增強：只有在 JS 可用的情況才啟用漢堡選單；
     停用 JS 時導覽仍以靜態多列方式完整顯示。 */
  html.js .nav-toggle {
    display: grid;
    place-items: center;
    order: 3;
  }

  .header-tools {
    order: 2;
  }

  html.js .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 14px 20px 22px;
    border-bottom: 1px solid var(--line-2);
    background: rgba(7, 10, 16, 0.98);
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.4);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  }

  html.js .site-nav.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  html.js .site-nav a:not(.btn) {
    padding: 12px 14px;
    font-size: 1rem;
  }

  html.js .site-nav .btn {
    margin-top: 8px;
  }

  html:not(.js) .site-header {
    position: static;
    height: auto;
  }

  html:not(.js) .header-inner {
    flex-wrap: wrap;
    padding-block: 10px;
  }

  html:not(.js) .site-nav {
    order: 4;
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-left: 0;
  }

  .brand {
    margin-right: auto;
  }

  .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trust-item:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line-2);
  }

  .trust-item:nth-child(4) {
    border-top: 1px solid var(--line-2);
  }

  .step {
    padding: 22px;
  }

  .cta-band {
    grid-template-columns: 1fr;
  }

  .cta-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

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

  .footer-brand {
    grid-column: span 2;
  }
}

@media (max-width: 620px) {
  .container,
  .container--narrow {
    width: min(100% - 28px, var(--container));
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

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

  .game-card--wide {
    grid-column: span 1;
  }

  .game-art,
  .game-card--wide .game-art {
    min-height: 180px;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .step {
    border-left: 0;
    border-top: 1px solid var(--line-2);
  }

  .step:first-child {
    border-top: 0;
  }

  .hero {
    padding-top: 36px;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 11vw, 3.2rem);
  }

  .hero-stage {
    min-height: 320px;
  }

  .cabinet {
    width: min(100%, 350px);
    padding: 13px;
  }

  .window-callout,
  .win-callout {
    right: -6px;
    transform: scale(0.88) rotate(-3deg);
    transform-origin: right center;
  }

  .floating-chip {
    width: 44px;
    height: 44px;
    font-size: 0.58rem;
  }

  .floating-chip--one {
    left: -6px;
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .trust-item,
  .trust-item:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line-2);
    padding: 16px 18px;
  }

  .trust-item:first-child {
    border-top: 0;
  }

  .footer-main {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: span 1;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-actions .btn {
    width: 100%;
  }

  .page-hero h1 {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }
}

/* 20. 窄螢幕網格保底：避免長內容撐破容器 */
@media (max-width: 620px) {
  .game-grid,
  .trust-grid,
  .footer-main {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 21. 列印 ---------------------------------------------------------------- */
@media print {
  body {
    background: #fff;
    color: #111;
  }

  .site-header,
  .site-footer,
  .hero-stage,
  .cta-band,
  .skip-link {
    display: none !important;
  }

  a {
    color: #111;
  }

  .prose,
  .lead {
    color: #222;
  }
}
