/* ==========================================================================
   PAPER — Whack-a-Rodney (paper carnival game)
   JS hooks kept: #gameScore #gameTimer #gameBoard .game-hole[data-idx](.active/.hit)
   #gameCountdown[hidden] #gameCountdownNum(.go) #gameStartBtn([disabled])
   #gameResult #gameReward[hidden] #gameRewardPct/Desc/Code/Copy/Next
   Injected by JS: <svg class="rodney-face"> in the active hole (an <img
   class="rodney-face"> is styled too), a bare <span>&#10006;</span> on a hit.
   ========================================================================== */
.game-section { overflow-x: clip; }
.game-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); gap: clamp(40px, 7vw, 120px); align-items: start; }
.game-head { margin-bottom: 0; }
.game-title { font-size: clamp(64px, 11vw, 176px); line-height: .86; }
.game-title-a { display: block; color: var(--pp-ink); font-size: .56em; line-height: 1; }
.game-title-b { display: block; }
.game-head .game-aside { font-size: clamp(18px, 2vw, 26px); }
.game-stakes { max-width: 40ch; color: var(--pp-ink); font-weight: 600; margin-top: 6px; }
.game-tiers { display: flex; flex-wrap: wrap; gap: 14px 16px; margin-top: 10px; }
/* little raffle tickets */
.game-tier { position: relative; isolation: isolate; display: grid; justify-items: center; gap: 5px; padding: 12px 20px 11px; rotate: var(--r, 0deg); filter: var(--pp-drop-1); color: var(--pp-ink); }
.game-tier::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--pp-kraft) url(../../images/paper/kraft.webp); background-size: 200px; clip-path: var(--pp-torn-c); }
.game-tier span { font-weight: 800; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; line-height: 1; }
.game-tier b { font-weight: 900; }
.game-tier strong { font-family: var(--pp-f-display); font-weight: 400; text-transform: uppercase; font-size: clamp(26px, 2.6vw, 34px); line-height: 1; color: var(--pp-red); }

/* ---- scoreboard ---- */
.game-wrapper { width: 100%; max-width: 500px; margin-inline: auto; }
.game-stats { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 26px; padding-inline: 4px; }
.game-stat { display: flex; align-items: baseline; gap: 12px; font-weight: 800; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--pp-ink); }
.game-score, .game-clock { font-family: var(--pp-f-display); font-size: clamp(48px, 6vw, 68px); line-height: .9; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.game-score { color: var(--pp-red); min-width: 1.1ch; }
.game-clock { color: var(--pp-ink); text-transform: none; }

/* ---- the board: a kraft sheet with nine punched holes ---- */
.game-sheet { position: relative; rotate: -.6deg; }
.game-board {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 2.6vw, 20px);
  padding: clamp(16px, 4vw, 30px); background: var(--pp-kraft) url(../../images/paper/kraft.webp); background-size: 220px;
  box-shadow: var(--pp-shadow-2); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
}
/* while a round is running (start button disabled) the board swallows touches, so a missed whack never scrolls the page */
.game-wrapper:has(.game-start-btn:disabled) .game-board { touch-action: none; }
.game-hole {
  position: relative; aspect-ratio: 1; border-radius: 50%; overflow: hidden; cursor: pointer;
  display: grid; place-items: center; line-height: 1;
  background: var(--pp-paper); border: 2px solid rgba(20,20,20,.55);
  box-shadow: inset 0 7px 10px rgba(20,20,20,.3), inset 0 -2px 0 rgba(255,255,255,.6);
  transition: background .12s, border-color .12s, scale .12s;
}
.game-hole.active { background: var(--pp-paper-hi); border-color: var(--pp-red); box-shadow: inset 0 0 0 4px var(--pp-red), inset 0 7px 10px rgba(20,20,20,.18); }
.game-hole.hit { background: var(--pp-red); border-color: var(--pp-red-deep); box-shadow: none; scale: .92; }
.game-hole.hit > span { color: #fff !important; font-size: clamp(30px, 8vw, 46px) !important; line-height: 1; }
/* Rodney: the injected face, redrawn in marker on paper */
.game-hole .rodney-face { display: block; width: 74%; height: 74%; overflow: visible; pointer-events: none; animation: game-pop .2s var(--pp-ease-back) both; }
.game-hole img.rodney-face { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; border-radius: 50%; }
.game-hole svg.rodney-face > circle:nth-of-type(1) { fill: var(--pp-paper-hi); stroke: var(--pp-ink); stroke-width: 3; }
.game-hole svg.rodney-face > circle:nth-of-type(2) { display: none; }
.game-hole svg.rodney-face > path[stroke], .game-hole svg.rodney-face > line { stroke: var(--pp-ink); }
@keyframes game-pop { from { transform: translateY(70%) rotate(-12deg); } to { transform: none; } }

/* 3 · 2 · 1 · GO! */
.game-countdown { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(251,250,247,.9); pointer-events: none; }
.game-countdown-num { font-family: var(--pp-f-display); color: var(--pp-red); font-size: clamp(130px, 38vw, 230px); line-height: 1; animation: game-count .8s var(--pp-ease-back) both; }
.game-countdown-num.go { color: var(--pp-ink); font-size: clamp(96px, 27vw, 160px); rotate: -6deg; }
@keyframes game-count { 0% { opacity: 0; transform: scale(2.2) rotate(8deg); } 45% { opacity: 1; transform: scale(.94); } 100% { opacity: 1; transform: none; } }

.game-start-btn { margin-top: 22px; }
.game-start-btn:disabled { opacity: .55; pointer-events: none; }
.game-result { margin-top: 16px; min-height: 2.7em; text-align: center; font-family: var(--pp-f-marker); color: var(--pp-ink); font-size: clamp(16px, 1.6vw, 20px); line-height: 1.3; }

/* ---- the prize: a torn red coupon ---- */
.game-reward { position: relative; isolation: isolate; margin-top: 14px; padding: 30px 26px 28px; color: #fff; text-align: center; rotate: -1.2deg; filter: var(--pp-drop-2); animation: game-coupon .7s var(--pp-ease-back) both; }
.game-reward::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--pp-red); clip-path: var(--pp-torn-b); }
.game-reward::after { content: ''; position: absolute; inset: 12px 10px; z-index: -1; border: 2px dashed rgba(255,255,255,.6); pointer-events: none; }
.game-reward-title { font-weight: 900; font-style: italic; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; }
.game-reward-pct { font-family: var(--pp-f-display); text-transform: uppercase; font-size: clamp(64px, 17vw, 104px); line-height: .92; margin: 8px 0 6px; }
.game-reward-desc { font-weight: 600; font-size: 15px; line-height: 1.45; max-width: 34ch; margin: 0 auto 18px; }
.game-reward-code-row { display: flex; align-items: stretch; justify-content: center; gap: 8px; margin-bottom: 16px; }
.game-reward-code { display: grid; place-items: center; min-height: 48px; padding: 8px 18px; background: var(--pp-paper-hi); color: var(--pp-ink); border: 2px dashed var(--pp-ink); font-family: var(--pp-f-display); font-size: 26px; letter-spacing: .1em; line-height: 1; }
.game-reward-copy { min-height: 48px; min-width: 92px; padding: 8px 18px; background: var(--pp-ink); color: #fff; font-weight: 900; font-style: italic; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; transition: transform .3s var(--pp-ease), background .2s; }
.game-reward-copy:hover { background: #000; transform: translateY(-2px); }
.game-reward-copy:focus-visible { outline-color: #fff; }
.game-reward-note { font-size: 13px; line-height: 1.5; font-weight: 600; max-width: 40ch; margin-inline: auto; }
.game-reward-note a { color: #fff; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.game-reward-note a:focus-visible { outline-color: #fff; }
.game-reward-next { margin-top: 10px; font-family: var(--pp-f-marker); font-size: 16px; line-height: 1.3; }
.game-reward-next:empty { display: none; }
@keyframes game-coupon { from { opacity: 0; transform: translateY(18px) scale(.86) rotate(5deg); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .game-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .game-head { justify-items: center; text-align: center; }
  .game-title { font-size: clamp(76px, 24vw, 150px); }
  .game-head .game-aside { transform-origin: center; }
  .game-tiers { justify-content: center; }
}
@media (max-width: 480px) {
  .game-tiers { gap: 8px; flex-wrap: nowrap; }
  .game-tier { padding: 10px 11px 9px; }
  .game-tier span { font-size: 9px; letter-spacing: .14em; }
  .game-tier strong { font-size: 23px; }
}

/* Metric-matched stand-in while Anton is still downloading (font-display: swap): without it the
   wide system fallback overflows the edge-to-edge words on phones. Same face is declared in the
   other fan-club stylesheets; it is not a new typeface, just a squeezed local bold sans. */
@font-face { font-family: 'Anton Standin'; font-weight: 400; src: local('Arial Bold'), local('Arial-BoldMT'), local('Roboto Bold'), local('Roboto-Bold'), local('Helvetica Neue Bold'), local('HelveticaNeue-Bold'); size-adjust: 66%; ascent-override: 118%; descent-override: 33%; line-gap-override: 0%; }
.game-title, .game-tier strong, .game-score, .game-clock, .game-countdown-num, .game-reward-pct, .game-reward-code { font-family: 'Anton', 'Anton Standin', 'Arial Narrow', Impact, sans-serif; }

/* ---- touch ---- */
.game-hole { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
.game-wrapper { scroll-margin-top: 76px; }
.game-wrapper.is-playing .game-board { touch-action: none; }   /* same as the :has() rule above, set by s-game.js for browsers without :has() */
.game-stats, .game-result { user-select: none; -webkit-user-select: none; }
.game-reward-copy { touch-action: manipulation; }
.game-reward-note a { display: inline-block; padding-block: 13px; margin-block: -13px; touch-action: manipulation; }   /* 44px tap target without changing the line */
@media (max-width: 900px) {
  /* scoreboard + board always fit one phone screen between the nav and the sticky ticket bar */
  .game-wrapper { max-width: min(500px, calc(100vh - 236px)); max-width: min(500px, calc(100svh - 236px)); min-width: min(100%, 250px); }
}
@media (max-width: 480px) {
  .game-stats { margin-bottom: 20px; }
  .game-tier span { font-size: 11px; letter-spacing: .1em; }
  .game-tier { padding-inline: 9px; }
}
/* phone held sideways: scoreboard and start button sit beside the board so the whole round fits */
@media (orientation: landscape) and (max-height: 520px) {
  .game-wrapper {
    --game-b: min(500px, calc(100vh - 84px));
    max-width: none; width: fit-content; min-width: 0; display: grid; column-gap: 28px; align-items: start;
    grid-template-columns: var(--game-b) minmax(150px, 190px); grid-template-rows: auto 1fr auto auto;
    grid-template-areas: "board stats" "board start" "result result" "reward reward";
  }
  @supports (height: 100svh) { .game-wrapper { --game-b: min(500px, calc(100svh - 84px)); } }
  .game-stats { grid-area: stats; flex-direction: column; align-items: flex-start; gap: 16px; margin: 6px 0 22px; padding: 0; }
  .game-sheet { grid-area: board; }
  .game-board { padding: 14px; gap: 10px; }
  .game-start-btn { grid-area: start; margin-top: 0; padding-inline: .8em; }
  .game-result { grid-area: result; }
  .game-reward { grid-area: reward; }
}
