:root {
  color-scheme: dark;
  --bg: #0b1120;
  --panel: #121b2c;
  --panel-2: #172338;
  --line: #2a3851;
  --text: #f5f7fb;
  --muted: #aab6c9;
  --gold: #e8bd64;
  --cyan: #6fd5e5;
  --green: #57d58d;
  --red: #ee6875;
  --blue: #4c89f4;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: radial-gradient(ellipse at 50% -20%, #253758 0, var(--bg) 62%); font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; }
button, a { font: inherit; }
a { color: inherit; }
.guide-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px max(20px, calc((100vw - 1160px) / 2)); background: rgba(9, 15, 27, .92); border-bottom: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border: 1px solid #c89f4f; border-radius: 50%; color: var(--gold); font-size: 26px; }
.brand small { display: block; color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.top-actions button, .play-link { padding: 10px 14px; border: 1px solid #3a4963; border-radius: 10px; background: #152137; color: var(--text); text-decoration: none; cursor: pointer; }
.top-actions button:hover, .play-link:hover { border-color: var(--gold); }
.play-link { border-color: #c59d4e; background: #302719; color: #ffe6ae; font-weight: 750; }
.guide-shell { width: min(1100px, calc(100% - 32px)); margin: 42px auto 72px; }
.eyebrow { margin: 0 0 10px; color: var(--cyan); font-size: 12px; font-weight: 800; letter-spacing: .18em; }
h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(34px, 6vw, 60px); line-height: 1.04; letter-spacing: -.04em; }
.lede { max-width: 680px; margin: 14px 0 28px; color: var(--muted); font-size: 17px; line-height: 1.55; }
.stepper { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 14px; }
.step-tab { display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #111a2a; color: var(--muted); text-align: left; cursor: pointer; }
.step-tab b { display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px; border: 1px solid #52627a; border-radius: 50%; font-size: 12px; }
.step-tab span { overflow: hidden; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.step-tab[aria-current="step"] { border-color: #8b7040; background: #241f18; color: #ffe3a3; }
.step-tab[aria-current="step"] b { border-color: var(--gold); background: var(--gold); color: #17120a; }
.slide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, .92fr); min-height: 475px; overflow: hidden; border: 1px solid #32415a; border-radius: 18px; background: linear-gradient(135deg, rgba(22,33,53,.98), rgba(13,21,36,.98)); box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.print-slides { display: none; }
.slide-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(24px, 5vw, 58px); }
.slide-kicker { margin: 0 0 9px; color: var(--gold); font-size: 12px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.slide h2 { margin: 0 0 14px; font: 700 clamp(28px, 4vw, 43px)/1.08 Georgia, serif; }
.slide-copy > p { margin: 0; color: #c2ccda; font-size: 16px; line-height: 1.6; }
.effect { margin-top: 24px; padding: 15px 16px; border-left: 3px solid var(--green); border-radius: 0 10px 10px 0; background: rgba(50,169,108,.11); }
.effect b { display: block; margin-bottom: 4px; color: #9cf0be; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.effect span { color: #e1f5e9; font-size: 14px; line-height: 1.45; }
.snapshot-wrap { display: flex; flex-direction: column; justify-content: center; gap: 13px; padding: 24px; background: radial-gradient(ellipse at center, #202f49, #111a2b 72%); border-left: 1px solid rgba(255,255,255,.07); }
.snapshot-label { display: flex; align-items: center; justify-content: space-between; color: #c1cede; font-size: 11px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.snapshot-label span:last-child { color: #74839b; font-size: 10px; }
.snapshot-board { overflow: hidden; padding: 10px; border: 1px solid #3a4c68; border-radius: 12px; background: #0e1828; box-shadow: inset 0 1px 14px #0005, 0 10px 30px #0003; }
.lane { display: grid; grid-template-columns: 65px repeat(5, minmax(0, 1fr)); gap: 4px; align-items: stretch; margin: 4px 0; }
.lane-name { display: flex; align-items: center; color: #91a0b7; font-size: 9px; font-weight: 750; line-height: 1.15; }
.cell { position: relative; display: flex; min-width: 0; min-height: 63px; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 1px solid #27354c; border-radius: 6px; background: linear-gradient(145deg, #1b2b40, #142235); }
.cell--focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.cell--gain { border-color: #3b9c70; background: linear-gradient(145deg, #1d4a3b, #183c35); }
.cell--steal { border-color: #ad5262; background: linear-gradient(145deg, #4b2734, #332333); }
.cell--won { border-color: #d4a94d; box-shadow: inset 0 0 0 1px #d4a94d55; }
.cell--empty::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #33435b; }
.cell-note { position: absolute; z-index: 1; top: -7px; padding: 2px 4px; border-radius: 4px; background: #1b3c32; color: #a8f1c4; font-size: 8px; font-weight: 900; white-space: nowrap; }
.cell--steal .cell-note { background: #512c3b; color: #ffb4bd; }
.mini-card { display: flex; width: 80%; min-height: 34px; flex-direction: column; align-items: center; justify-content: center; border: 1px solid #6781a3; border-radius: 5px; background: linear-gradient(145deg, #29466c, #172a47); color: #eef4ff; font-size: 8px; line-height: 1.1; text-align: center; }
.mini-card--enemy { border-color: #9c626a; background: linear-gradient(145deg, #653941, #332b3d); }
.mini-card--gold { border-color: #d1a74f; background: linear-gradient(145deg, #5b4a29, #302a20); }
.mini-card strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-card em { margin-top: 2px; color: #ffe09a; font-size: 9px; font-style: normal; font-weight: 900; }
.pawns { display: flex; min-height: 6px; gap: 2px; }
.pawn { width: 6px; height: 6px; border: 1px solid #b7d0ff; border-radius: 50%; background: var(--blue); box-shadow: 0 0 5px #4c89f488; }
.pawn--enemy { border-color: #ffc1c7; background: #df5264; box-shadow: 0 0 5px #df526488; }
.snapshot-note { margin: 0; color: #8f9eb4; font-size: 12px; line-height: 1.4; text-align: center; }
.comparison { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.comparison .snapshot-board { padding: 7px; }
.comparison .lane { grid-template-columns: 34px repeat(5, minmax(0, 1fr)); gap: 2px; }
.comparison .lane-name { font-size: 7px; }
.comparison .cell { min-height: 52px; }
.comparison .mini-card { width: 94%; font-size: 6px; }
.comparison .pawn { width: 5px; height: 5px; }
.compare-arrow { color: var(--gold); font-size: 25px; font-weight: 900; }
.deck-pile { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; padding: 12px 0; }
.deck-card { display: flex; min-height: 106px; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 8px 4px; border: 1px solid #4a607d; border-radius: 8px; background: linear-gradient(155deg, #294463, #17283f); box-shadow: 0 4px 10px #0004; text-align: center; }
.deck-card:nth-child(2n) { transform: translateY(7px); }
.deck-card b { color: #f1d28a; font: 700 10px Georgia, serif; }
.deck-card span { color: #bcc9d8; font-size: 8px; }
.deck-card em { color: var(--green); font-size: 10px; font-style: normal; }
.hand { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; padding: 16px 0 8px; }
.hand-card { display: flex; min-height: 140px; flex-direction: column; align-items: center; justify-content: space-between; padding: 8px 4px; border: 1px solid #55708e; border-radius: 8px; background: linear-gradient(160deg, #2a4562, #16283e); box-shadow: 0 7px 12px #0005; text-align: center; }
.hand-card:nth-child(2) { transform: translateY(-6px); }
.hand-card.is-picked { transform: translateY(-11px); border: 2px solid var(--cyan); box-shadow: 0 0 0 3px #6fd5e52b, 0 10px 15px #0005; }
.hand-card small { color: #9cb0c8; font-size: 8px; }
.hand-card b { color: #f3daa0; font: 700 10px Georgia, serif; }
.hand-card .card-point { color: white; font-size: 18px; font-weight: 900; }
.hand-card .picked-tag { color: var(--cyan); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.score-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.score-item { padding: 11px 8px; border: 1px solid #40516a; border-radius: 9px; background: #142135; text-align: center; }
.score-item small { display: block; margin-bottom: 5px; color: #aab7c8; font-size: 9px; }
.score-item b { color: #ffe0a0; font-size: 16px; }
.score-item.is-win { border-color: #c9a24f; background: #3a3020; }
.result-card { padding: 22px; border: 1px solid #a58546; border-radius: 14px; background: radial-gradient(ellipse at top, #554626, #1e2028 75%); text-align: center; }
.result-card .cup { font-size: 42px; }
.result-card h3 { margin: 5px 0; color: #ffe0a0; font: 700 28px Georgia, serif; }
.result-card p { margin: 4px 0; color: #c6cddd; font-size: 13px; }
.result-total { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 16px; }
.result-total b { color: white; font-size: 27px; }
.result-total span { color: #97a4b8; font-size: 11px; }
.music-bar { display: flex; justify-content: center; gap: 5px; height: 28px; align-items: end; margin: 15px auto 0; }
.music-bar i { width: 5px; height: 12px; border-radius: 5px; background: var(--gold); animation: wave .7s ease-in-out infinite alternate; }
.music-bar i:nth-child(2n) { height: 22px; animation-delay: .15s; }
.music-bar i:nth-child(3n) { height: 16px; animation-delay: .3s; }
@keyframes wave { to { height: 5px; opacity: .45; } }
.guide-nav { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 17px; }
.guide-nav button { min-width: 132px; padding: 12px 16px; border: 1px solid #3d4e69; border-radius: 10px; color: var(--text); cursor: pointer; }
.nav-secondary { background: #121b2b; }
.nav-primary { border-color: #b38c46 !important; background: linear-gradient(#d8b15f, #b88739); color: #1d170c !important; font-weight: 850; }
.nav-primary:disabled, .nav-secondary:disabled { opacity: .35; cursor: default; }
.step-count { color: #9aa9bd; font-size: 13px; }
.guide-disclaimer { margin: 35px auto 0; color: #79869b; font-size: 12px; line-height: 1.5; text-align: center; }
@media (max-width: 800px) {
  .stepper { grid-template-columns: repeat(7, 34px); justify-content: center; }
  .step-tab { width: 34px; min-height: 34px; justify-content: center; padding: 3px; border-radius: 50%; }
  .step-tab span { display: none; }
  .step-tab b { width: 25px; height: 25px; flex-basis: 25px; }
  .slide { grid-template-columns: 1fr; }
  .slide-copy { padding: 26px 24px 20px; }
  .snapshot-wrap { border-top: 1px solid rgba(255,255,255,.07); border-left: 0; padding: 18px 12px 22px; }
  .snapshot-board { padding: 6px; }
  .lane { grid-template-columns: 48px repeat(5, minmax(0, 1fr)); gap: 3px; }
  .cell { min-height: 55px; }
  .lane-name { font-size: 8px; }
  .comparison { gap: 4px; }
  .comparison .lane { grid-template-columns: 28px repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 440px) {
  .guide-top { padding: 9px 12px; }
  .brand { gap: 7px; font-size: 12px; }
  .brand-mark { width: 31px; height: 31px; font-size: 21px; }
  .top-actions { gap: 5px; }
  .top-actions button, .play-link { padding: 8px 9px; font-size: 11px; }
  .guide-shell { width: calc(100% - 20px); margin-top: 28px; }
  .lede { font-size: 15px; }
  .lane { grid-template-columns: 38px repeat(5, minmax(0, 1fr)); gap: 2px; }
  .cell { min-height: 48px; }
  .mini-card { min-height: 28px; font-size: 6px; }
  .snapshot-wrap { padding-inline: 7px; }
  .comparison .lane { grid-template-columns: 23px repeat(5, minmax(0, 1fr)); }
  .comparison .cell { min-height: 43px; }
  .guide-nav button { min-width: 0; padding: 10px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
@media print {
  :root { color-scheme: light; --text: #111827; --muted: #465366; }
  body { color: #111827; background: white; }
  .guide-top, .stepper, .guide-nav { display: none !important; }
  #guide-slide { display: none !important; }
  .print-slides { display: block; }
  .print-slides .slide { margin: 12px 0; break-inside: avoid; }
  .guide-shell { width: 100%; margin: 0; }
  .slide { display: grid; grid-template-columns: 1fr 1fr; min-height: 0; margin: 12px 0; break-inside: avoid; color: #111827; background: white; box-shadow: none; }
  .slide-copy { padding: 18px; }
  .slide-copy > p, .effect span, .snapshot-note { color: #253247; }
  .snapshot-wrap { background: #edf2f8; }
  .snapshot-board, .cell { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .guide-disclaimer { color: #465366; }
}
