:root{--ink:#06162d;--panel:#0d2544;--panel2:#102a49;--line:#274362;--gold:#d8b675;--lime:#b5f779;--ice:#8ac4e9;--shadow:0 26px 70px rgba(1,9,17,.4)}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:radial-gradient(ellipse at 82% 3%,rgba(181,247,121,.11),transparent 29%),radial-gradient(ellipse at 3% 42%,rgba(216,182,117,.12),transparent 33%),#06162d;color:var(--white);font:16px/1.5 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;min-height:100vh}body:before{content:"";position:fixed;inset:0;pointer-events:none;opacity:.14;background:repeating-linear-gradient(135deg,transparent 0px,transparent 18px,#274362 19px,transparent 20px);mask-image:linear-gradient(transparent 0%,#000 75%)}a{color:inherit}button{font:inherit;cursor:pointer}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid var(--lime);outline-offset:4px}.shell{width:min(1180px,calc(100% - 32px));margin:auto}.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line);padding:18px 0}.logo{font-weight:1000;letter-spacing:.12em;text-decoration:none;color:var(--white)}.logo span{color:var(--lime)}.topbar nav{display:flex;gap:22px;color:var(--muted);font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}.topbar nav a{text-decoration:none}.topbar nav a:hover{color:var(--gold)}.kicker{color:var(--lime);text-transform:uppercase;letter-spacing:.18em;font-size:12px;font-weight:900}.hero{padding:70px 0 48px;position:relative}.hero h1{font-size:clamp(48px,8vw,102px);font-weight:1000;line-height:.95;letter-spacing:-.065em;text-transform:uppercase;max-width:940px;margin:18px 0 26px;text-shadow:3px 5px 0 #000}.hero h1 em{color:var(--gold);font-style:normal}.hero p{max-width:610px;color:var(--ice);font-size:clamp(16px,2vw,20px)}.hero-tag{display:inline-flex;background:rgba(181,247,121,.09);border:1px solid rgba(181,247,121,.4);padding:8px 12px;border-radius:6px;font-weight:800;letter-spacing:.06em;font-size:12px;color:var(--lime)}.section-title{display:flex;justify-content:space-between;align-items:end;gap:16px;margin:12px 0 20px}.section-title h2{font-size:28px;text-transform:uppercase;letter-spacing:-.03em;margin:0}.section-title span{font-size:12px;font-weight:800;letter-spacing:.12em;color:var(--muted)}.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;padding-bottom:70px}.game-card{display:block;text-decoration:none;border:1px solid var(--line);background:linear-gradient(160deg,#1d2933,#0e151c);border-radius:14px;overflow:hidden;transition:transform .2s,border-color .2s,box-shadow .2s}.game-card:hover{transform:translateY(-5px);border-color:var(--gold);box-shadow:var(--shadow)}.art{height:220px;position:relative;overflow:hidden;background:#17232a;display:flex;align-items:center;justify-content:center}.art:after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,rgba(7,12,17,.1),transparent 65%)}.art.merge{background:radial-gradient(circle at 50% 35%,#506957,#13241e 70%)}.tile-art{display:grid;grid-template-columns:repeat(4,36px);gap:6px;transform:rotate(-7deg);box-shadow:20px 18px 0 rgba(0,0,0,.12)}.tile-art b{display:grid;place-items:center;width:36px;height:36px;background:#af8a52;border-radius:4px;font-weight:900;font-size:13px;color:#222}.tile-art b:nth-child(3n){background:#ead08a}.tile-art b:nth-child(4n){background:#8fb970}.art.tower{background:radial-gradient(circle at 60% 20%,#61707d,#1d293e 65%)}.moon{position:absolute;width:125px;height:125px;background:#efdeb3;border-radius:100%;top:26px;right:21%;box-shadow:0 0 60px rgba(240,212,151,.5)}.floors{height:190px;width:150px;position:absolute;bottom:-80px;left:calc(50% - 75px);transform:rotate(-7deg);background:repeating-linear-gradient(to bottom,#1a2c32 0,#1a2c32 20px,#daab60 21px,#daab60 27px);border:2px solid #f0d4a0;box-shadow:12px 4px 0 #101d29}.art.breaker{background:radial-gradient(circle at 30% 14%,#6b3756,#191c30 65%)}.bricks-art{width:220px;display:grid;grid-template-columns:repeat(8,1fr);gap:5px;transform:rotate(-8deg)}.bricks-art span{height:18px;background:#f2be62;box-shadow:0 3px 0 #111}.bricks-art span:nth-child(3n){background:#d87863}.bricks-art span:nth-child(4n){background:#b5f779}.art.runner{background:linear-gradient(#1e3643,#283b35 65%,#9e7b49 66%,#65452d 100%)}.ridge{position:absolute;bottom:31%;height:135px;width:130%;background:polygon(0 100%,100% 100%)}.ridge:before{content:"";position:absolute;inset:0;background:#1d2f33;clip-path:polygon(0 85%,15% 48%,27% 78%,40% 20%,58% 68%,71% 28%,86% 72%,100% 41%,100% 100%,0 100%)}.marker{width:62px;height:62px;border-radius:14px;position:absolute;bottom:23%;left:28%;background:var(--gold);transform:rotate(14deg);box-shadow:6px 6px 0 #553817,0 0 32px rgba(216,182,117,.3)}.marker:after{content:"RUN";position:absolute;top:18px;left:9px;transform:rotate(-14deg);font-weight:1000;font-size:18px;color:#29190d}.barrier-art{position:absolute;bottom:20%;right:25%;height:42px;width:21px;background:#131f25;transform:skew(-9deg)}.card-copy{padding:22px 24px 24px}.card-index{color:var(--lime);font-size:11px;font-weight:1000;letter-spacing:.18em}.card-copy h3{font-size:clamp(26px,3vw,36px);line-height:1;margin:10px 0;text-transform:uppercase;letter-spacing:-.04em}.card-copy p{color:var(--ice);margin:0 0 24px;min-height:48px}.meta{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding-top:15px}.meta small{color:var(--muted);font-weight:800;text-transform:uppercase;letter-spacing:.11em}.go{font-weight:1000;text-transform:uppercase;color:var(--gold);letter-spacing:.08em}.footer{border-top:1px solid var(--line);color:var(--muted);display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:25px 0;font-size:12px}.game-hero{padding:36px 0 12px;display:flex;align-items:end;justify-content:space-between;gap:15px;flex-wrap:wrap}.game-hero h1{font-size:clamp(38px,6vw,72px);text-transform:uppercase;line-height:1;letter-spacing:-.05em;margin:6px 0}.game-hero p{color:var(--muted);margin:0}.crumb{color:var(--lime);font-size:13px;text-decoration:none;font-weight:800}.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 265px;gap:18px;margin:16px 0 70px;align-items:start}.stage,.sidepanel{border:1px solid var(--line);background:linear-gradient(145deg,#18252d,#101820);box-shadow:0 14px 45px #0004;border-radius:12px}.stage{padding:22px;min-height:360px;display:flex;align-items:center;flex-direction:column;justify-content:center;position:relative}.sidepanel{padding:22px}.sidepanel h2{margin:0 0 18px;font-size:18px;text-transform:uppercase;letter-spacing:.04em}.stat{display:flex;align-items:baseline;justify-content:space-between;gap:10px;border-bottom:1px solid var(--line);padding:13px 0}.stat span{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em;font-weight:800}.stat strong{font-size:22px;color:var(--gold);font-variant-numeric:tabular-nums}.sidepanel p{font-size:13px;color:var(--ice);line-height:1.7}.btn{background:var(--lime);border:1px solid var(--lime);color:#0d170a;font-size:13px;font-weight:1000;text-transform:uppercase;letter-spacing:.08em;padding:12px 18px;border-radius:6px;transition:transform .15s,background .15s}.btn:hover{background:#c5ff7f;transform:translateY(-1px)}.btn.secondary{background:transparent;border-color:var(--line);color:var(--white)}.btn.secondary:hover{border-color:var(--gold)}.buttons{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.notice{color:var(--muted);font-size:13px}.gamecanvas{display:block;width:100%;height:auto;max-width:760px;aspect-ratio: 8/5;touch-action:none;background:#0d1720;border:1px solid #40515a;border-radius:8px}.gamecanvas.wide{aspect-ratio: 19/8}.merge-surface{display:flex;flex-direction:column;gap:15px;width:min(100%,440px)}.merge-board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;background:#33453e;padding:10px;border-radius:10px;touch-action:none;user-select:none;aspect-ratio:1}.merge-cell{display:flex;align-items:center;justify-content:center;border-radius:7px;background:#20322b;font-size:clamp(20px,5.5vw,42px);font-weight:1000;letter-spacing:-.04em;color:#25301f;font-variant-numeric:tabular-nums}.merge-cell[data-value="2"]{background:#f3e3bd}.merge-cell[data-value="4"]{background:#edcf89}.merge-cell[data-value="8"]{background:#f4b76b}.merge-cell[data-value="16"]{background:#f1a156}.merge-cell[data-value="32"]{background:#de7852}.merge-cell[data-value="64"]{background:#c35b4f;color:#fff}.merge-cell[data-value="128"]{background:#d9d27b}.merge-cell[data-value="256"]{background:#b3d57a}.merge-cell[data-value="512"]{background:#b5f779}.merge-cell[data-value="1024"]{background:#7cce9d;font-size:clamp(18px,4.5vw,33px)}.merge-cell[data-value="2048"],.merge-cell[data-value="4096"],.merge-cell[data-value="8192"]{background:#f8e194;font-size:clamp(18px,4.5vw,33px)}.merge-actions{display:flex;gap:10px;align-items:center;justify-content:space-between}.merge-message{margin:0;min-height:22px;font-size:13px;color:var(--gold)}.controls{display:flex;gap:7px;margin-top:16px;flex-wrap:wrap;justify-content:center}.controls button{min-width:56px;min-height:48px}.stage-note{text-align:center;color:var(--muted);font-size:13px;margin:14px 0 0}.levelnote{display:inline-block;background:#1e322a;border:1px solid #386c42;padding:8px 12px;border-radius:5px;margin:10px 0;color:var(--lime);font-size:12px;letter-spacing:.08em;text-transform:uppercase;font-weight:800}@media(max-width:760px){.cards{grid-template-columns:1fr}.game-layout{grid-template-columns:1fr}.hero{padding:50px 0 32px}.art{height:190px}.stage{padding:12px;min-height:280px}.sidepanel{padding:18px}.topbar nav{gap:12px;font-size:11px}.shell{width:min(1180px,calc(100% - 22px))}.game-hero{padding-top:22px}.merge-board{gap:6px;padding:6px}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.game-card,.btn{transition:none}}

/* =====================================================================================
   GOATCOIN site design-system overrides (live rules).
   Declared after the prototype block above so they win at equal specificity. Everything
   here uses the website's own tokens from assets/css/site.css and mirrors the approved
   story-page components (.episode-card, .episode-grid, .episode-overline, .episode-link).
   No palette, typography or button system is introduced by the Arcade.
   ===================================================================================== */
body{background:var(--bg);color:var(--white);
  font:16px/1.55 Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Arial,sans-serif;
  -webkit-font-smoothing:antialiased}
body:before{content:none}

.shell{width:auto;max-width:var(--max);margin:0 auto;padding:26px 20px 48px}

.hero{padding:32px 0 30px;border-bottom:1px solid var(--stroke);position:static}
.hero h1{font-size:clamp(34px,6.4vw,66px);line-height:.99;letter-spacing:-.02em;font-weight:900;
  text-transform:uppercase;text-shadow:none;max-width:none;margin:0 0 15px}
.hero h1 em{color:var(--green);font-style:normal}
.hero p{max-width:64ch;color:var(--muted);font-size:15px}
.hero-hub p{max-width:80ch}
.hero-tag{background:transparent;border:0;padding:0;margin:0 0 18px;color:var(--green);
  font-size:11px;font-weight:850;letter-spacing:.11em;text-transform:uppercase}
.kicker{color:var(--green);font-size:11px;font-weight:850;letter-spacing:.11em}

.section-title{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:38px 0 18px}
.section-title h2{margin:0;font-size:clamp(22px,3vw,32px);letter-spacing:.01em}
.section-title span{color:var(--muted);font-size:11px;font-weight:850;letter-spacing:.16em;text-transform:uppercase}

.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}
.game-card{min-width:0;overflow:hidden;display:flex;flex-direction:column;text-decoration:none;
  border:1px solid #354761;border-radius:13px;background:linear-gradient(155deg,#152638,#0e1b2b);
  box-shadow:0 14px 38px #01091160;transition:transform .2s,box-shadow .2s,border-color .2s}
.game-card:hover{transform:translateY(-3px);border-color:#4c6685;box-shadow:0 18px 44px #01091180}
.game-card:focus-visible{outline:2px solid var(--green);outline-offset:3px}
.card-copy{gap:9px;padding:20px 22px 22px}
.card-index{color:var(--green);font-size:11px;font-weight:850;letter-spacing:.2em;text-transform:uppercase}
.card-copy h3{margin:0;font-size:21px;letter-spacing:.01em;text-transform:uppercase}
.card-copy p{color:var(--muted);font-size:14px}
.meta{margin-top:auto;padding-top:15px;border-top:1px solid var(--stroke);
  display:flex;align-items:center;justify-content:space-between;gap:12px}
.meta small{color:#a1bad5;font-size:11px;font-weight:850;letter-spacing:.1em;text-transform:uppercase}
.go{color:var(--green);font-size:12px;letter-spacing:.11em;font-weight:900;
  border-bottom:1px solid #b5f77955;padding-bottom:3px}
.game-card:hover .go,.crumb:hover{color:#d9ffaf}

.game-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;
  padding:30px 0 22px;border-bottom:1px solid var(--stroke)}
.game-hero h1{margin:9px 0 7px;font-size:clamp(28px,4.6vw,46px);line-height:1;letter-spacing:-.01em}
.game-hero p{margin:0;color:var(--muted);font-size:14px}
.crumb{display:inline-block;color:var(--green);font-size:11px;font-weight:900;letter-spacing:.13em;
  text-decoration:none}
.levelnote{color:var(--muted);font-size:11px;font-weight:850;letter-spacing:.16em;text-transform:uppercase;white-space:nowrap}

/* The sidebar sits beside the game only while the game column stays usable. Flex basis does the
   deciding: when the row cannot fit basis(basis+panel+gap) the panel wraps underneath, which is a
   content-aware switch rather than another viewport breakpoint. */
.game-layout{display:flex;flex-wrap:wrap;justify-content:center;gap:22px;margin:26px 0 0;align-items:stretch}
/* When both boxes fit on one line they grow to fill it, so centring changes nothing there;
   when the stats wrap, each box is centred on its own line instead of hugging the left edge. */
/* One stage box for all four cabinets: 857.6 x 748 on desktop, shrinking with the viewport.
   Width is a cap (never a fixed width) and height a floor, so nothing can be clipped. */
.game-layout>.stage{flex:1 1 857.6px;min-width:0;max-width:857.6px;max-height:748px}
/* Bull Run only: a 19:8 runner wants the whole row, not a portrait-friendly column. The canvas
   still maps to the 760x320 world and the 80dvh budget still governs height, so this widens the
   course without touching physics, hitboxes or scoring. */
body.game-wide .game-layout>.stage{flex:1 1 100%;max-width:100%;max-height:748px}
/* its stats panel follows the same full row, so the two boxes keep one width */
body.game-wide .game-layout>.sidepanel{flex:1 1 100%;max-width:100%}
/* The old 360px / 280px floors predate the height budget; the caps govern height now, so a short
   landscape window is not forced into a scroll just to reach an arbitrary minimum. */
.stage{min-height:0}
@media (max-width:760px){.stage{min-height:0}}
.game-layout>.sidepanel{flex:1 1 265px;min-width:240px}
/* Focused cabinets are laid out by the Type B block at the end of this file. */
.stage,.sidepanel{border:1px solid #354761;border-radius:13px;
  background:linear-gradient(155deg,#152638,#0e1b2b);box-shadow:0 14px 38px #01091160;padding:16px}
.sidepanel{background:var(--pane);padding:20px}
.gamecanvas{display:block;width:100%;height:auto;border-radius:9px;background:#08182b;touch-action:manipulation}
.gamecanvas:focus-visible{outline:2px solid var(--green);outline-offset:3px}
.stage-note{margin:12px 0 0;color:var(--muted);font-size:13px}
.buttons{display:flex;flex-wrap:wrap;gap:11px;margin:15px 0 0}
.buttons .btn{width:auto}
.sidepanel h2{margin:0 0 14px;color:var(--green);font-size:12px;font-weight:850;
  letter-spacing:.16em;text-transform:uppercase}
.stat{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:11px 0;
  border-bottom:1px solid var(--stroke);font-size:13px}
.stat span{color:var(--muted)}
.stat strong{font-size:19px;font-weight:900;color:var(--white)}
.sidepanel p{margin:14px 0 0;color:var(--muted);font-size:13px}
.sidepanel p strong{color:var(--white)}

@media (max-width:820px){.game-layout{grid-template-columns:1fr}}
@media (max-width:760px){
  .cards{grid-template-columns:1fr;gap:18px}
  .hero{padding-top:22px}
  .section-title{flex-direction:column;align-items:flex-start;gap:8px}
  .game-hero{flex-direction:column;align-items:flex-start}
}
@media (max-width:350px){.shell{padding-inline:14px}.card-copy{padding:16px}}
@media (prefers-reduced-motion:reduce){
  .game-card,.game-card:hover{transform:none}
  .game-card,.go,.crumb{transition:none}
}

/* ---------- card artwork, redrawn in the website palette ---------- */
.art{border-bottom:1px solid var(--stroke);background:var(--pane)}
.art.merge{background:radial-gradient(circle at 50% 35%,#16324f,#0b1c30 72%)}
.art.tower{background:radial-gradient(circle at 60% 20%,#2c5478,#0b1c30 70%)}
.art.breaker{background:radial-gradient(circle at 30% 14%,#2c5478,#0b1c30 70%)}
.art.runner{background:linear-gradient(#16324f,#123049 64%,#0b1c30 66%,#08182b 100%)}
.art.chess{height:152px;background:radial-gradient(circle at 42% 22%,#2c5478,#0b1c30 72%);display:flex;align-items:center;justify-content:center}
.chess-art{width:132px;height:132px;display:flex;align-items:center;justify-content:center;
  border:1px solid #354761;border-radius:6px;
  background:repeating-conic-gradient(#cddaea 0 25%,#2f4a6b 0 50%) 0 0/33px 33px;
  box-shadow:0 10px 26px #01091170}
.chess-art b{font-family:"Segoe UI Symbol","Apple Symbols","Noto Sans Symbols 2",serif;font-weight:400;
  font-size:58px;line-height:1;color:#f6f9ff;-webkit-text-stroke:2px #06162d;
  text-shadow:0 3px 8px rgba(1,9,17,.55)}

/* Chinese chess card art: the approved Red general piece on a wood-field grid, so the hub card
   matches the game page without a new image or a font dependency. */
.art.cchess{height:152px;background:radial-gradient(circle at 42% 22%,#4a371f,#0b1c30 74%);
  display:flex;align-items:center;justify-content:center}
.art.cchess:before{content:"";position:absolute;inset:0;pointer-events:none;background:
  repeating-linear-gradient(90deg,rgba(216,182,117,.12) 0 1px,transparent 1px 31px),
  repeating-linear-gradient(0deg,rgba(216,182,117,.12) 0 1px,transparent 1px 31px)}
.xq-card-piece{width:106px;height:106px;position:relative;filter:drop-shadow(0 12px 22px rgba(1,9,17,.55))}
.tile-art b{background:var(--pane2);border:1px solid #354761;color:var(--muted)}
.tile-art b:nth-child(2n){background:#16324f;border-color:#2c5478;color:var(--blue)}
.tile-art b:nth-child(3n){background:var(--green);border-color:var(--green);color:#061c2c}
.tile-art b:nth-child(4n){background:var(--blue);border-color:var(--blue);color:#061c2c}

.moon{background:radial-gradient(circle at 34% 30%,var(--white),var(--muted));
  box-shadow:0 0 60px rgba(246,249,255,.35)}
.floors{background:repeating-linear-gradient(to bottom,var(--pane2) 0 20px,var(--green) 21px 27px);
  border:2px solid var(--muted);box-shadow:12px 4px 0 #0b1c30}

.bricks-art span{background:var(--green);box-shadow:0 3px 0 #061c2c}
.bricks-art span:nth-child(3n){background:var(--blue)}
.bricks-art span:nth-child(4n){background:var(--pane2)}

.ridge:before{background:#123049}
.marker{background:var(--green);color:#061c2c;box-shadow:6px 6px 0 #0b1c30,0 0 32px rgba(181,247,121,.3)}
.marker:after{color:#061c2c}
.barrier-art{background:var(--green);border:1px solid #061c2c}

/* ---------- buttons: the website's own .btn recipe ---------- */
.btn{min-height:46px;display:inline-flex;align-items:center;justify-content:center;gap:9px;
  padding:0 20px;border-radius:8px;background:transparent;color:var(--white);
  border:1px solid #4c6685;font-size:12px;font-weight:860;letter-spacing:.04em}
.btn:hover{background:transparent;border-color:var(--green);color:var(--green);transform:none}
.btn.primary{background:var(--green);border-color:var(--green);color:#061c2c}
.btn.primary:hover{background:#c9ff96;border-color:#c9ff96;color:#061c2c}

/* ---------- game frames and labels ---------- */
.gamecanvas{border:1px solid var(--stroke)}
.levelnote{background:transparent;border:0;padding:0;color:var(--muted)}
.notice{background:var(--pane);border:1px solid var(--stroke);color:var(--muted);border-radius:9px}
.merge-surface{background:var(--pane2);border:1px solid var(--stroke);border-radius:10px}
.merge-board{background:var(--pane)}
.merge-cell{background:var(--pane);border:1px solid var(--stroke)}
.merge-message,.merge-actions{color:var(--muted)}
.controls button{background:transparent;border:1px solid #4c6685;color:var(--white);border-radius:8px}
.controls button:hover{border-color:var(--green);color:var(--green)}
/* 2048 tile ramp: functional game colours, deliberately kept (see module docstring) */

/* ---------- Hall of Legends leaderboard ----------
   Same design language as the rest of the Arcade: site tokens from assets/css/site.css,
   story-card surfaces, the site's .btn. No separate palette, no --lb-* variables. */
.lb-facts{list-style:none;display:flex;flex-wrap:wrap;gap:10px;margin:20px 0 0;padding:0}
.lb-facts li{border:1px solid #354761;border-radius:999px;background:var(--pane);padding:9px 14px;
  color:var(--muted);font-size:12px}
.lb-facts strong{color:var(--green);font-weight:850}
.lb-controls{display:flex;flex-wrap:wrap;gap:22px;margin:30px 0 0}
.lb-control-label{color:var(--muted);font-size:11px;font-weight:850;letter-spacing:.16em;
  text-transform:uppercase;margin:0 0 10px}
.lb-tabs,.lb-filters{display:flex;flex-wrap:wrap;gap:9px}
.lb-tab,.lb-filter{min-height:40px;display:inline-flex;align-items:center;gap:8px;padding:0 16px;
  border-radius:8px;border:1px solid #4c6685;background:transparent;color:var(--white);
  font-size:12px;font-weight:850;letter-spacing:.04em;cursor:pointer}
.lb-tab:hover,.lb-filter:hover{border-color:var(--green);color:var(--green)}
.lb-tab[aria-selected="true"],.lb-filter[aria-pressed="true"]{background:var(--green);
  border-color:var(--green);color:#061c2c}
.lb-tab:focus-visible,.lb-filter:focus-visible,.lb-table-wrap:focus-visible{outline:3px solid var(--green);
  outline-offset:3px}
.lb-status{margin:22px 0 0;color:var(--muted);font-size:13px}
.lb-status[data-kind="error"],.lb-status[data-kind="notenabled"],.lb-status[data-kind="offline"]{color:#ffd9a8}
.lb-podium[hidden],.lb-place[hidden],.lb-table[hidden],.lb-empty[hidden]{display:none}
.lb-podium{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:end;margin:22px 0 0}
.lb-place{border:1px solid #354761;border-radius:13px;background:linear-gradient(155deg,#152638,#0e1b2b);
  box-shadow:0 14px 38px #01091160;padding:20px;text-align:center;margin:0}
.lb-first{border-color:var(--green);box-shadow:0 18px 44px #01091180}
.lb-place-label{margin:0 0 12px;color:var(--muted);font-size:11px;font-weight:850;letter-spacing:.16em;
  text-transform:uppercase}
.lb-avatar{width:44px;height:44px;margin:0 auto 10px;border-radius:50%;border:1px solid #4c6685;
  display:flex;align-items:center;justify-content:center;color:var(--green);font-weight:900;font-size:13px}
.lb-first .lb-avatar{border-color:var(--green)}
.lb-name{margin:0 0 6px;font-size:17px}
.lb-points{margin:0;color:var(--green);font-weight:900;font-size:20px}
.lb-layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:22px;margin:26px 0 0;
  align-items:start}
.lb-table-wrap{border:1px solid #354761;border-radius:13px;background:linear-gradient(155deg,#152638,#0e1b2b);
  padding:20px;min-width:0}
.lb-table-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:14px}
.lb-table-head h2{margin:0 0 4px;font-size:19px}
.lb-sub{margin:0;color:var(--muted);font-size:12px}
.lb-right{text-align:right}
.lb-table{width:100%;border-collapse:collapse;font-size:14px}
.lb-table th{text-align:left;color:var(--muted);font-size:11px;font-weight:850;letter-spacing:.14em;
  text-transform:uppercase;padding:10px 8px;border-bottom:1px solid var(--stroke)}
.lb-table td{padding:12px 8px;border-bottom:1px solid var(--stroke)}
.lb-table tbody tr:last-child td{border-bottom:0}
.lb-rank{color:var(--muted);font-weight:850;width:64px}
.lb-player{display:flex;align-items:center;gap:10px}
.lb-player::first-letter{color:var(--green)}
.lb-cell-points{text-align:right;font-weight:900;white-space:nowrap}
.lb-cell-points small{color:var(--muted);font-weight:600;letter-spacing:.06em}
.lb-empty{margin:18px 0 0;color:var(--muted);font-size:14px}
.lb-side{display:flex;flex-direction:column;gap:18px;min-width:0}
.lb-card{border:1px solid #354761;border-radius:13px;background:var(--pane);padding:20px}
.lb-card h2{margin:0 0 12px;color:var(--green);font-size:12px;font-weight:850;letter-spacing:.16em;
  text-transform:uppercase}
.lb-climb{color:var(--muted);font-size:14px;margin:0 0 14px}
.lb-play{width:100%}
.lb-how{margin:0 0 14px;padding-left:20px;color:var(--muted);font-size:13px}
.lb-how li{margin-bottom:9px}
.lb-how strong{color:var(--white)}
.lb-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media (max-width:900px){.lb-layout{grid-template-columns:1fr}.lb-podium{grid-template-columns:1fr;align-items:stretch}}
@media (max-width:760px){.lb-controls{gap:16px}.lb-table{font-size:13px}.lb-rank{width:48px}.lb-right{text-align:left}}

/* Hall of Legends promo band on the Arcade hub - site tokens, same treatment as .game-card */
.lb-promo{display:block;margin:22px 0 0;padding:20px 22px;border:1px solid var(--green);border-radius:13px;
  background:linear-gradient(135deg,#152638,#0e1b2b);text-decoration:none}
.lb-promo-eyebrow{display:block;color:var(--green);font-size:11px;font-weight:850;letter-spacing:.16em}
.lb-promo-title{display:block;margin:6px 0 4px;color:var(--white);font-size:24px;font-weight:900}
.lb-promo-copy{display:block;color:var(--muted);font-size:13px}
.lb-promo:hover .lb-promo-title,.lb-promo:focus-visible .lb-promo-title{color:var(--green)}
.lb-promo:focus-visible{outline:3px solid var(--green);outline-offset:3px}

/* Bull Run fills its stage. Scoped by class, not by #game - moon-tower and bear-breaker use the
   same element id and must keep their 760px cap. */
.gamecanvas.fullbleed{max-width:none;width:100%}

/* Landscape suggestion: purely informational. It never blocks play, never forces rotation and
   disappears entirely in landscape, where the playfield is already as wide as it can be. */
.rotate-hint{display:none;margin:0 0 10px;color:#9fb4cc;font-size:11px;letter-spacing:.06em;text-align:center}
@media (max-width:760px) and (orientation:portrait){.rotate-hint{display:block}}

/* ---------------------------------------------------------------------------------------------
   Responsive cabinets. Each game keeps its own logical resolution and aspect ratio; only the
   display box changes. No #game selector is used here on purpose - three canvases share that id,
   so each rule is scoped to its own class.
   --------------------------------------------------------------------------------------------- */

/* Bull Run - 760x320, lands as a wide letterbox. */
.gamecanvas.fullbleed{max-width:none;width:100%}

/* Moon Tower - 440x620 portrait. Width is capped by a height budget so it cannot run off a
   desktop screen; on a phone the container width wins and the tower simply scrolls. */
/* Native cabinet size is the ceiling: 440x620. The height budget can only shrink it further. */
.gamecanvas.tower{width:100%;max-width:min(440px,calc(var(--game-h) * .7097));aspect-ratio:22/31;height:auto}

/* Bear Breaker - 640x420. The old rule inherited the generic 8/5 ratio, which squashed it by
   about 5%; the real ratio is declared here. */
.gamecanvas.breaker{width:100%;max-width:none;aspect-ratio:32/21;height:auto}

/* 2048 - DOM grid, no canvas. The board grows until either the column or the viewport height
   stops it, and the tile text is sized against the board itself rather than the viewport. */
/* Board ceiling is 520x520, with 64px reserved so the action row is never clipped. */
.merge-surface{width:100%;max-width:min(520px,calc(var(--game-h) - 64px))}
.merge-board{container-type:inline-size}
.merge-cell{font-size:clamp(16px,11.5cqw,64px)}
.merge-cell[data-value="1024"],.merge-cell[data-value="2048"],.merge-cell[data-value="4096"],.merge-cell[data-value="8192"]{font-size:clamp(14px,9cqw,50px)}

/* ---------------------------------------------------------------------------------------------
   Two display types. Type A (Bull Run, Bear Breaker) takes the whole game column. Type B
   (Moon Tower, 2048) is centred and narrower, so a tall or square cabinet does not dominate the
   page. Scoped by the page's own body class, never by #game.
   --------------------------------------------------------------------------------------------- */
/* Type A - wide */
.gamecanvas.fullbleed,
.gamecanvas.breaker{width:100%;margin-inline:auto}

/* Type B - focused pages reuse the exact same row behaviour as Type A: the panel asks for its
   full width, the stats take what is left, and when that will not fit the stats wrap underneath.
   One geometry for all four cabinets; only the playable-area caps differ. */
.game-focus .stage>.gamecanvas,
.game-focus .merge-surface{width:100%;margin-inline:auto}

/* ---------------------------------------------------------------------------------------------
   Viewport height budget. Owner-approved: no game may display taller than 80% of the viewport.
   --game-h is the height the game box may occupy inside its stage (stage padding removed), and
   every cabinet turns that into a width via its own aspect ratio - width shrinks, the ratio never
   changes, so nothing can stretch, squash or crop. dvh follows mobile toolbars as they slide; the
   vh declaration above it is the fallback for browsers without dvh.
   --------------------------------------------------------------------------------------------- */
.stage{
  --game-h:calc(80vh - 44px);
  --game-h:calc(80dvh - 44px);
}

/* Type A: full column until the height budget caps the width. */
.gamecanvas.fullbleed{max-width:min(100%,calc(var(--game-h) * 2.375))}
.gamecanvas.breaker{max-width:min(100%,calc(var(--game-h) * 1.5238))}

/* Type B: focused width first, height budget second, fixed ceiling last. */
.merge-surface{max-width:min(520px,calc(var(--game-h) - 64px))}

/* Page header: breadcrumb and level label sit on one left-aligned line, so nothing floats alone
   at the right edge of the row. */
.hero-meta{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.hero-meta .levelnote{color:var(--muted)}
.hero-meta .crumb+ .levelnote:before{content:"·";margin-right:14px;opacity:.5}

/* Page header, compact: the breadcrumb and level label share the top line, then the title and
   tagline sit together on one baseline row. Nothing strands at the right edge. */
.game-hero{flex-direction:column;align-items:flex-start;gap:8px;padding:2px 0 2px}
/* Left / centre / right across one row. (float:center is not a real value - grid gives the same
   three positions deterministically, and keeps the tagline optically centred in the row.) */
.hero-line{display:grid;grid-template-columns:1fr auto 1fr;align-items:baseline;gap:16px;width:100%}
.hero-line>h1{grid-column:1;justify-self:start;margin:0}
.hero-line>p{grid-column:2;justify-self:center;text-align:center;margin:0;font-size:14px}
.hero-line>.levelnote{grid-column:3;justify-self:end;text-align:right}

@media (max-width:760px){
  .hero-line{grid-template-columns:1fr;gap:4px}
  .hero-line>p,.hero-line>.levelnote{justify-self:start;text-align:left}
}

@media (max-width:767px){
  .game-layout>.stage{max-height:none;max-width:100%}
}

/* The stats panel may never grow wider than the game panel beside it. */
aside.sidepanel{max-width:857.6px;width:100%}

/* ---------------------------------------------------------------------------------------------
   Landscape phones (844x390 and friends): plenty of width, almost no height. Reclaim the vertical
   space the chrome was spending rather than fighting the ratio caps, and let the stage use 92% of
   the viewport instead of 80%. Gated on height, so no desktop viewport is affected.
   ------------------------------------------------------------------------------------------- */
@media (orientation:landscape) and (max-height:500px){
  .header-inner{min-height:52px}
  .nav-buy{display:none}
  .game-hero{padding:0 0 2px}
  .hero-line>p,.hero-line>.levelnote{display:none}
  .game-hero h1{font-size:clamp(24px,4vw,32px)}
  .game-layout{margin:6px 0 18px;gap:14px}
  .stage{padding:10px;--game-h:calc(92dvh - 20px)}
  .sidepanel{padding:14px}
}

/* 320 px phones: the game-hero row (title + standfirst + level chip) needs ~304 px inside a 277 px
   shell, so the chip spilled ~1-12 px past the page on 2048, Moon Tower and Bear Breaker. Give the
   chip its own row instead of shrinking it - its label is letter-spaced and cannot break. */
@media (max-width:340px){
  .hero-line{grid-template-columns:auto 1fr}
  .hero-line .levelnote{grid-column:1/-1;justify-self:start}
}

/* Both status lines print the wallet address as one 42-character token: the gate's line in the game
   sidepanel and the hub's "#arcade-entry-status". Without a break opportunity they widened the
   document by 17-93 px as soon as a wallet was connected (chess already carried this in chess.css). */
#arcade-gate-status, .arcade-gate-status,
#arcade-entry-status { overflow-wrap: anywhere; word-break: break-word; }

/* Arcade pages are the only ones that carry the sound control on top of the wallet control, so their
   phone header is ~46 px wider than the homepage's. Drop the wordmark here (and only here) to keep the
   row on one line; site.css tightens the spacing for every page. */
@media (max-width:480px){
  .brand-word{display:none}
}

/* The hub card carries the game's Chinese name as a second, subordinate title. No CJK webfont
   ships with the site, so this borrows the device's own face; the lang attribute is what makes a
   screen reader switch voice instead of spelling the characters in English. */
.card-copy h3 .card-cn{font-size:.62em;font-weight:600;letter-spacing:.04em;margin-left:.42em;vertical-align:.08em;color:#c3d2e4;font-family:"Noto Serif SC","Songti SC","Source Han Serif SC","SimSun",serif}
/* The Chinese Chess meta is the only three-part one on the hub (199 px at 11 px type) and it
   wrapped onto a second line below 390 px. Under 430 px it drops the genre instead of reflowing:
   the eyebrow already reads 06 / STRATEGY, so nothing is lost, and the row stays one line. */
.card-copy .meta .meta-short{display:none}
@media (max-width:420px){.card-copy .meta .meta-full{display:none}.card-copy .meta .meta-short{display:inline}}
/* The 2048 card and page title carry a second name, the way Chinese Chess carries 象棋. It is a
   subtitle, not a clause: no dash, and no font-family override, so it stays in the site sans. */
.card-copy h3 .card-sub{font-size:.62em;font-weight:600;letter-spacing:.04em;margin-left:.42em;vertical-align:.08em;color:#c3d2e4;text-transform:none}
.game-hero h1 .page-sub{font-size:.5em;font-weight:700;letter-spacing:.01em;margin-left:.3em;color:var(--ice,#8ac4e9);vertical-align:.12em}
/* Phase 1A: the guest allowance line on GOAT Run. It is a standing fact (what is left, when it
   resets), so it sits above the status line rather than replacing it. */
#arcade-guest-note{margin:0 0 10px;font-size:12px;line-height:1.5;letter-spacing:.02em;
  color:var(--ice,#8ac4e9);border-left:2px solid var(--line,#274362);padding-left:10px}
#arcade-guest-note[data-kind="ok"]{color:var(--lime,#b5f779);border-left-color:var(--lime,#b5f779)}
/* a refused start flashes the line that already carries the facts, instead of printing a copy */
#arcade-guest-note[data-kind="refused"]{color:var(--amber,#f0c274);border-left-color:var(--amber,#f0c274);font-weight:600}

/* 2048 sidebar primary action (26 Nov 2026): the only paid entry point on the page. */
.side-buy { margin: 0 0 14px; }
.side-buy-btn { width: 100%; min-height: 48px; font-weight: 700; letter-spacing: .04em; }
.side-buy-btn[disabled] { opacity: .55; cursor: not-allowed; }
.side-balance { margin: 8px 0 0; font-size: 13px; color: var(--muted, #8fa3b8); }
.side-balance strong { color: var(--gold, #e8c37a); }
@media (max-width: 760px) {
  .side-buy-btn { min-height: 52px; }
  .side-buy { position: sticky; top: 0; z-index: 2; padding: 8px 0;
    background: linear-gradient(180deg, rgba(6,17,33,.96), rgba(6,17,33,.86)); border-radius: 12px; }
}
