:root {
  color-scheme: light;
  --ink: #111;
  --muted: #585858;
  --paper: #fff;
  --blue: #2874d2;
  font-family: "Comic Sans MS", "Segoe Print", cursive;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #fff; }
button { color: inherit; font: inherit; }
.page { max-width: 1160px; margin: 0 auto; padding: 24px 38px 20px; }
.masthead { min-height: 55px; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding-bottom: 16px; border-bottom: 2px solid var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; font: 900 10px/1.08 Arial, sans-serif; letter-spacing: 1.2px; text-decoration: none; }
.brand-mark { color: var(--ink); font: 34px/1 Arial, sans-serif; }
.edition, .eyebrow, .score-label, .board-topline, .page-footer { font: 10px/1.4 "Courier New", monospace; letter-spacing: 1.15px; }
.edition { color: #4b4b4b; }
.toggles { display: flex; gap: 8px; }
.pill { border: 1.5px solid var(--ink); border-radius: 4px 7px 3px 6px; padding: 8px 12px; background: #fff; font: 700 11px Arial, sans-serif; cursor: pointer; transform: rotate(-.4deg); }
.pill:hover { background: #f0f5fc; }
button:focus-visible, canvas:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 32px; padding: 38px 4px 28px; }
.eyebrow { margin: 0 0 11px; color: #333; }
h1 { margin: 0; font: 900 clamp(46px, 6vw, 74px)/.91 "Comic Sans MS", "Segoe Print", cursive; letter-spacing: -3.5px; }
h1 span { position: relative; color: var(--ink); }
h1 span::after { position: absolute; right: 2%; bottom: -5px; left: -2%; height: 4px; border-radius: 50%; background: var(--blue); content: ""; transform: rotate(-1.5deg); }
.subhead { margin: 17px 0 0; color: #373737; font-size: 14px; line-height: 1.5; }
.score-card { width: 150px; min-width: 150px; min-height: 106px; padding: 14px 17px; border: 2px solid var(--ink); border-radius: 3px 9px 4px 7px; background: #fff; box-shadow: 4px 5px 0 var(--ink); transform: rotate(1.5deg); }
.score-label { display: block; font-size: 9px; }
.score-card strong { display: block; margin: 4px 0 -2px; font: 900 46px/1 Arial, sans-serif; }
.score-foot { font-size: 10px; color: #444; }
.game-card { border: 2px solid var(--ink); border-radius: 2px 8px 5px 7px; background: #fff; box-shadow: 0 5px 0 var(--ink); overflow: hidden; }
.board-topline { min-height: 40px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 19px; border-bottom: 2px solid var(--ink); color: #222; font-size: 9px; }
.board-topline span:last-child { text-align: right; }
.board-topline span:nth-child(2) { color: var(--blue); }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border: 1.5px solid var(--ink); border-radius: 50%; background: #fff; }
.stage-wrap { position: relative; background: #fff; }
canvas { display: block; width: 100%; height: auto; aspect-ratio: 1100 / 570; touch-action: none; cursor: grab; }
canvas:active { cursor: grabbing; }
.stage-note { position: absolute; bottom: 14px; left: 50%; width: max-content; max-width: 78%; transform: translateX(-50%) rotate(-.4deg); padding: 8px 14px; border: 1.5px solid var(--ink); border-radius: 3px 6px 4px 5px; background: #fff; color: #222; font-size: 11px; font-weight: 700; text-align: center; pointer-events: none; }
.game-footer { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 20px; border-top: 2px solid var(--ink); }
.instruction { display: flex; align-items: center; gap: 12px; }
.hand { display: grid; width: 33px; height: 33px; place-items: center; border: 1.5px solid var(--ink); border-radius: 50%; color: var(--blue); font: 22px/1 Arial, sans-serif; transform: rotate(-7deg); }
.instruction b { font-size: 12px; }
.instruction small { display: block; margin-top: 3px; color: #444; font: 10px/1.35 Arial, sans-serif; }
.new-board { padding: 9px 14px; border: 1.5px solid var(--ink); border-radius: 4px 6px 4px 7px; background: #fff; color: var(--ink); font: 700 11px Arial, sans-serif; cursor: pointer; transform: rotate(.7deg); }
.new-board:hover { color: var(--blue); background: #f5f8fc; }
.new-board span { padding-left: 5px; font: 16px Arial, sans-serif; }
.page-footer { display: flex; justify-content: space-between; gap: 14px; padding: 19px 2px 0; color: #444; font-size: 8px; letter-spacing: .9px; }
.celebration { position: absolute; inset: 0; display: grid; place-items: center; padding: 22px; background: #ffffffd9; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.celebration.show { opacity: 1; }
.celebration-inner { max-width: 490px; transform: translateY(12px) rotate(-1deg) scale(.92); padding: 26px 35px 29px; border: 3px solid var(--ink); border-radius: 4px 10px 5px 8px; background: #fff; box-shadow: 6px 7px 0 var(--ink); text-align: center; transition: transform .35s cubic-bezier(.17,.89,.3,1.4); }
.celebration-kicker { display: block; margin-bottom: 8px; color: var(--blue); font: 10px "Courier New", monospace; letter-spacing: 1.5px; }
.celebration strong { display: block; color: var(--ink); font: 900 clamp(32px, 5vw, 62px)/.88 "Comic Sans MS", "Segoe Print", cursive; letter-spacing: -2px; }
.celebration-copy { display: block; margin-top: 12px; font-size: 12px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
@media (max-width: 760px) {
  .page { padding: 17px 16px 15px; }
  .masthead { flex-wrap: wrap; gap: 10px; }
  .brand { font-size: 9px; }
  .brand-mark { font-size: 28px; }
  .edition { display: none; }
  .toggles { margin-left: auto; }
  .pill { padding: 7px 9px; font-size: 10px; }
  .intro { align-items: end; gap: 10px; padding: 30px 2px 22px; }
  h1 { font-size: clamp(40px, 9vw, 62px); letter-spacing: -2px; }
  .eyebrow { max-width: 260px; font-size: 8px; letter-spacing: .7px; }
  .subhead { max-width: 420px; font-size: 12px; }
  .score-card { width: 105px; min-width: 105px; min-height: 85px; padding: 10px; }
  .score-card strong { font-size: 36px; }
  .score-label { font-size: 7px; }
  .score-foot { font-size: 8px; }
  .board-topline { min-height: 37px; padding: 0 11px; font-size: 7px; letter-spacing: .5px; }
  canvas { aspect-ratio: 760 / 570; }
  .stage-note { bottom: 8px; max-width: 90%; padding: 6px 9px; font-size: 9px; }
  .game-footer { min-height: 63px; padding: 9px 11px; }
  .instruction { gap: 8px; }
  .hand { width: 27px; height: 27px; font-size: 17px; }
  .instruction b { font-size: 10px; }
  .instruction small { max-width: 300px; font-size: 8px; }
  .new-board { padding: 8px 10px; font-size: 9px; white-space: nowrap; }
  .page-footer { flex-wrap: wrap; font-size: 7px; }
  .page-footer span:nth-child(2) { display: none; }
}
@media (max-width: 430px) {
  .intro { align-items: center; }
  .subhead { max-width: 255px; }
  .desktop-break { display: none; }
  .score-card { width: 88px; min-width: 88px; min-height: 75px; transform: rotate(1deg); }
  .score-card strong { font-size: 31px; }
  .score-foot { display: none; }
  .instruction small { max-width: 205px; }
}
.reduced-motion *, .reduced-motion *::before, .reduced-motion *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }

/* Use the browser viewport as the game board instead of a centered card. */
html, body { width: 100%; height: 100%; overflow: hidden; }
body { min-height: 100%; }
.page { width: 100%; max-width: none; height: 100vh; height: 100svh; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 10px 24px 8px; }
.masthead { flex: 0 0 auto; min-height: 45px; padding-bottom: 10px; }
.intro { flex: 0 0 auto; align-items: center; padding: 11px 4px 9px; }
.eyebrow { margin-bottom: 5px; }
h1 { font-size: clamp(34px, 4.1vw, 55px); line-height: .88; }
.subhead { margin-top: 7px; font-size: 12px; }
.score-card { width: 115px; min-width: 115px; min-height: 73px; padding: 8px 12px; }
.score-card strong { font-size: 34px; }
.score-foot { font-size: 9px; }
.game-card { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.board-topline { flex: 0 0 34px; min-height: 34px; }
.stage-wrap { flex: 1 1 auto; min-height: 0; }
canvas { width: 100%; height: 100%; aspect-ratio: auto; }
.stage-note { bottom: 10px; }
.game-footer { flex: 0 0 auto; min-height: 56px; padding: 7px 15px; }
.hand { width: 27px; height: 27px; }
.page-footer { flex: 0 0 auto; padding-top: 2px; }
@media (max-width: 760px) {
  .page { gap: 6px; padding: 8px 12px 5px; }
  .masthead { min-height: 39px; padding-bottom: 7px; }
  .intro { padding: 6px 2px; }
  h1 { font-size: clamp(32px, 7vw, 47px); }
  .subhead { margin-top: 5px; font-size: 10px; }
  .score-card { width: 90px; min-width: 90px; min-height: 61px; padding: 7px 8px; }
  .score-card strong { font-size: 29px; }
  .score-label { font-size: 6px; }
  .score-foot { font-size: 7px; }
  .board-topline { flex-basis: 31px; min-height: 31px; }
  .game-footer { min-height: 51px; padding: 6px 9px; }
  .page-footer { display: none; }
}
@media (max-width: 430px) {
  .intro { gap: 5px; }
  h1 { font-size: clamp(29px, 7.4vw, 34px); letter-spacing: -1px; }
  .eyebrow { font-size: 7px; }
  .subhead { font-size: 9px; }
  .score-card { width: 77px; min-width: 77px; }
  .score-foot { display: none; }
  .instruction small { max-width: 190px; }
}
@media (max-height: 650px) and (min-width: 761px) {
  .page { gap: 5px; padding-top: 6px; padding-bottom: 4px; }
  .masthead { min-height: 36px; padding-bottom: 6px; }
  .intro { padding: 4px 3px; }
  h1 { font-size: 34px; }
  .subhead { margin-top: 3px; }
  .score-card { min-height: 55px; }
  .game-footer { min-height: 45px; }
  .page-footer { display: none; }
}
