/* Hot Potato: vintage hot-sauce label meets kitchen chaos. Warm char background,
   molten orange, butter yellow, sticker-style ink outlines. Phone-first. */

:root {
  --char: #160c08;
  --char2: #21120c;
  --char3: #2e1911;
  --ink: #2a120b;
  --cream: #fff3dc;
  --cream2: #f3dcbf;
  --muted: #c9a894;
  --dim: #8d6c5c;
  --butter: #ffd166;
  --orange: #ff8a1d;
  --hot: #ff4a1c;
  --chili: #e0133c;
  --mint: #43e6b5;
  --sky: #5ad1ff;
  --line: rgba(255, 243, 220, 0.13);
  --panel: rgba(255, 243, 220, 0.055);
  --panel2: rgba(255, 243, 220, 0.09);
  --display: "Shrikhand", "Arial Black", Impact, sans-serif;
  --ui: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --pc: var(--butter);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--char); color: var(--cream); }
body {
  font-family: var(--ui);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}
input, button { font: inherit; color: inherit; }
input { -webkit-user-select: text; user-select: text; }
button { cursor: pointer; background: none; border: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
b { font-weight: 750; }
:focus-visible { outline: 3px solid var(--butter); outline-offset: 3px; border-radius: 12px; }

#stage { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; touch-action: none; }
.cam-feed { position: fixed; width: 2px; height: 2px; opacity: 0; pointer-events: none; left: -10px; top: -10px; }

/* ── controls ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 750; font-size: 17px; line-height: 1; letter-spacing: 0.005em;
  padding: 15px 20px; border-radius: 18px; min-height: 52px;
  color: var(--cream); background: var(--panel);
  border: 2px solid var(--line);
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease), filter 0.2s, opacity 0.2s, background 0.2s;
}
.btn:active { transform: translateY(2px); }
.btn:disabled { opacity: 0.4; cursor: default; transform: none; }
.btn.hot {
  color: var(--ink);
  background: linear-gradient(180deg, #ffe08a 0%, var(--butter) 30%, var(--orange) 78%, #ff6a1c 100%);
  border: 3px solid var(--ink);
  box-shadow: 0 5px 0 var(--ink), 0 14px 30px -10px rgba(255, 106, 28, 0.65), inset 0 2px 0 rgba(255, 255, 255, 0.55);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn.hot:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink), 0 8px 20px -10px rgba(255, 106, 28, 0.65), inset 0 2px 0 rgba(255, 255, 255, 0.55); }
.btn.hot:hover:not(:disabled) { filter: brightness(1.05) saturate(1.05); }
.btn.big { width: 100%; font-size: 20px; min-height: 60px; border-radius: 20px; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--panel); }
.btn.danger { color: #ff9a8a; border-color: rgba(255, 110, 90, 0.3); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 700; padding: 9px 14px; border-radius: 999px; min-height: 40px;
  background: var(--panel2); border: 1.5px solid var(--line); color: var(--cream);
}
.chip.ghost { background: transparent; }
.chip:active { transform: scale(0.96); }

.icon-btn {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(22, 12, 8, 0.55); border: 1.5px solid var(--line); color: var(--cream);
}
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:active { transform: scale(0.94); }
.snd .off { display: none; }
body.muted .snd .on { display: none; }
body.muted .snd .off { display: inline; }

.kicker { font-size: 12.5px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); font-stretch: 80%; }
.tag { justify-self: center; font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; font-stretch: 80%; color: var(--cream2); padding: 7px 12px; border-radius: 999px; background: rgba(22, 12, 8, 0.55); border: 1.5px solid var(--line); }

.hub-link {
  position: fixed; z-index: 40; top: calc(12px + var(--sat)); left: calc(12px + var(--sal));
  display: inline-flex; gap: 6px; align-items: center;
  font: 700 13.5px var(--ui); color: var(--cream); text-decoration: none;
  padding: 9px 14px; border-radius: 999px;
  background: rgba(22, 12, 8, 0.72); border: 1.5px solid var(--line);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
body.show-hub .hub-link { opacity: 1; pointer-events: auto; }

/* ── screens ──────────────────────────────────────── */
.app { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.screen {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  padding: var(--sat) var(--sar) 0 var(--sal);
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(0.99);
  transition: opacity 0.32s var(--ease), transform 0.32s var(--ease), visibility 0s linear 0.32s;
}
.screen.on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; pointer-events: auto; }
.screen.play.on { pointer-events: none; }
.screen.play.on .hud .bar, .screen.play.on .stuck, .screen.play.on .overlay:not([hidden]) { pointer-events: auto; }

.bar {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: 10px 14px; min-height: 64px;
}
.bar-t { justify-self: center; font: 400 22px var(--display); color: var(--cream); text-shadow: 0 3px 0 var(--ink); white-space: nowrap; }
.bar-gap { width: 44px; }
.scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 4px 16px 24px; }
.foot { padding: 12px 16px calc(14px + var(--sab)); display: flex; gap: 10px; background: linear-gradient(180deg, rgba(22, 12, 8, 0), rgba(22, 12, 8, 0.92) 30%); }
.foot.two .btn:first-child { flex: 0 0 auto; }
.spud-slot { pointer-events: none; }

/* ── home ─────────────────────────────────────────── */
.home { justify-content: center; }
.home-in { width: min(440px, 100%); margin: 0 auto; padding: 56px 20px calc(24px + var(--sab)); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.spud-slot.hero { width: min(64vw, 250px, 30dvh); aspect-ratio: 1.15; margin-bottom: -10px; }
.logo { width: min(86vw, 380px); line-height: 0; margin-top: -4px; }
.logo svg { width: 100%; height: auto; overflow: visible; }
.logo text { font-family: var(--display); font-size: 84px; text-anchor: middle; stroke-linejoin: round; paint-order: stroke fill; }
.logo .w2 text { font-size: 88px; }
.logo .shadow { fill: var(--ink); stroke: var(--ink); stroke-width: 18px; }
.logo .face { fill: url(#lg-hot); stroke: var(--ink); stroke-width: 11px; }
.logo .w { animation: wob 4.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.logo .w2 { animation-delay: -2.3s; }
@keyframes wob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
.pitch { font-size: 17px; line-height: 1.45; color: var(--cream2); max-width: 34ch; }
.pitch b { color: var(--butter); }
.home-acts { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 8px; }
.meta { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--dim); letter-spacing: 0.04em; margin-top: 4px; }
.meta i { width: 4px; height: 4px; border-radius: 50%; background: var(--dim); }

/* ── setup ────────────────────────────────────────── */
.setup .scroll { width: min(560px, 100%); margin: 0 auto; }
.note { font-size: 14.5px; line-height: 1.45; color: var(--muted); margin: 2px 2px 12px; }
.players { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.pl {
  display: grid; grid-template-columns: 22px 46px 1fr 40px 40px; align-items: center; gap: 6px;
  padding: 6px 6px 6px 10px; border-radius: 18px; background: var(--panel); border: 1.5px solid var(--line);
  animation: pop-in 0.3s var(--ease) both;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(0.98); } }
.pl .seat { font-weight: 800; font-size: 13px; color: var(--dim); text-align: center; font-stretch: 80%; }
.pl .av { width: 46px; height: 44px; border-radius: 14px; display: grid; place-items: center; transition: transform 0.15s; }
.pl .av:active { transform: scale(0.9) rotate(-8deg); }
.pl .av .spud { width: 42px; height: 40px; }
.pl input {
  width: 100%; min-width: 0; font-size: 18px; font-weight: 700; padding: 11px 12px; border-radius: 12px;
  background: rgba(22, 12, 8, 0.6); border: 1.5px solid transparent; outline: none; color: var(--cream);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pl input::placeholder { color: var(--dim); font-weight: 600; }
.pl input:focus { border-color: var(--pc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc) 25%, transparent); }
.mini { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); font-size: 20px; font-weight: 700; }
.mini svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mini:active { background: var(--panel2); }
.mini:disabled { opacity: 0.25; }
.row-acts { display: flex; gap: 8px; margin: 12px 0 6px; flex-wrap: wrap; }
.sec { font: 400 21px var(--display); color: var(--butter); text-shadow: 0 2px 0 var(--ink); margin: 22px 2px 10px; display: flex; align-items: baseline; gap: 10px; }
.sec-n { font: 700 13px var(--ui); color: var(--dim); text-shadow: none; letter-spacing: 0.06em; }
.seg { display: flex; gap: 6px; padding: 5px; border-radius: 18px; background: rgba(22, 12, 8, 0.65); border: 1.5px solid var(--line); }
.seg + .seg { margin-top: 8px; }
.seg button {
  flex: 1; min-height: 46px; padding: 8px 6px; border-radius: 13px; font-weight: 750; font-size: 15.5px; color: var(--muted);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.seg.small button { min-height: 40px; font-size: 14.5px; }
.seg button[aria-checked="true"] { color: var(--ink); background: linear-gradient(180deg, var(--butter), var(--orange)); box-shadow: 0 3px 0 var(--ink), inset 0 0 0 2px var(--ink); }
.seg-note { font-size: 13.5px; color: var(--dim); margin: 8px 4px 0; line-height: 1.4; }
.dares { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.dare-chip {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px 10px; border-radius: 16px;
  background: var(--panel); border: 2px solid var(--line); color: var(--dim); position: relative;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.12s;
}
.dare-chip svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dare-chip span { font-weight: 800; font-size: 14px; }
.dare-chip small { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-stretch: 80%; opacity: 0.8; }
.dare-chip.on { color: var(--cream); border-color: rgba(255, 209, 102, 0.55); background: rgba(255, 138, 29, 0.12); }
.dare-chip.on svg { stroke: var(--butter); }
.dare-chip:active { transform: scale(0.96); }

/* ── wake ─────────────────────────────────────────── */
.wake-in, .ready-in { flex: 1; width: min(460px, 100%); margin: 0 auto; padding: 0 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; }
.wake .spud-slot, .ready .spud-slot { width: min(52vw, 210px, 26dvh); aspect-ratio: 1.15; }
.title { font: 400 clamp(30px, 8.6vw, 40px) / 1.05 var(--display); color: var(--cream); text-shadow: 0 4px 0 var(--ink); }
.lead { font-size: 16px; line-height: 1.5; color: var(--cream2); max-width: 36ch; }
.lead b { color: var(--butter); }
.caps { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.caps li { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; font-weight: 750; font-size: 14px; background: var(--panel); border: 1.5px solid var(--line); color: var(--muted); }
.caps i { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); }
.caps li.ok { color: var(--cream); border-color: rgba(67, 230, 181, 0.45); }
.caps li.ok i { background: var(--mint); box-shadow: 0 0 10px var(--mint); }
.caps li.no { opacity: 0.6; text-decoration: line-through; text-decoration-color: rgba(255, 243, 220, 0.4); }
.caps li.no i { background: var(--hot); }
.wake .note { text-align: center; color: var(--butter); }

/* ── ready ────────────────────────────────────────── */
.who { font: 400 clamp(28px, 8vw, 40px) / 1.1 var(--display); text-shadow: 0 4px 0 var(--ink); }
.who .nm { color: var(--pc); }
.who .tail { color: var(--cream); }
.sub { font-size: 15.5px; line-height: 1.45; color: var(--cream2); max-width: 34ch; }
.table { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; max-width: 420px; }
.table li {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 5px; border-radius: 999px;
  background: var(--panel); border: 1.5px solid var(--line); font-weight: 750; font-size: 14px;
}
.table li .spud { width: 26px; height: 25px; }
.table li.out { opacity: 0.42; }
.table li.out .nm { text-decoration: line-through; }
.table li.first { border-color: var(--pc); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pc) 35%, transparent); }
.table .pips svg { width: 15px; height: 13px; }
.btn.light .match { width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* pips: lives as little potatoes */
.pips { display: inline-flex; gap: 3px; align-items: center; }
.pip { width: 20px; height: 17px; }
.pip path:first-child { stroke: var(--ink); stroke-width: 1.6; }
.pip.on path:first-child { fill: var(--butter); }
.pip.off path:first-child, .pip.lost path:first-child { fill: #4a2e22; }
.pip path + path { stroke: #160c08; }
.pip.lost { animation: crack 0.7s var(--ease) both; }
@keyframes crack { 0% { transform: scale(1.6) rotate(-14deg); filter: brightness(2.5); } 100% { transform: none; } }
.pips.big .pip { width: 40px; height: 34px; }
.burns { display: inline-flex; gap: 2px; align-items: center; }
.burns svg { width: 13px; height: 16px; fill: var(--hot); stroke: var(--ink); stroke-width: 1.4; }
.burns b { font-size: 13px; color: var(--hot); margin-left: 3px; }
.burns.none { font-size: 12px; font-weight: 700; color: var(--dim); }

/* ── play HUD ─────────────────────────────────────── */
.hud { position: relative; z-index: 2; pointer-events: none; background: linear-gradient(180deg, rgba(22, 12, 8, 0.85) 0%, rgba(22, 12, 8, 0.6) 70%, rgba(22, 12, 8, 0)); padding-bottom: 8px; }
.hud .bar { min-height: 58px; padding-bottom: 4px; }
.holder {
  display: flex; align-items: center; gap: 10px; margin: 0 max(14px, calc(50% - 280px)); padding: 6px 12px 6px 6px; border-radius: 18px;
  background: color-mix(in srgb, var(--pc) 16%, rgba(22, 12, 8, 0.7)); border: 2px solid color-mix(in srgb, var(--pc) 60%, transparent);
  transition: background 0.3s, border-color 0.3s;
}
.holder .av .spud { width: 44px; height: 42px; display: block; }
.holder .hn { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.holder .lbl { font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-stretch: 80%; }
.holder b { font: 400 25px / 1.15 var(--display); color: var(--pc); text-shadow: 0 2px 0 var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.holder.bump { animation: bump 0.4s var(--ease); }
@keyframes bump { 30% { transform: scale(1.04); } }
.dare { display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: 8px; padding: 0 16px; }
.dare .verb {
  font: 400 clamp(46px, 14vw, 76px) / 1 var(--display); color: var(--butter); letter-spacing: 0.01em;
  text-shadow: 3px 3px 0 var(--ink), -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 0 7px 0 var(--ink);
}
.dare .verb.slam { animation: slam 0.5s var(--ease); }
@keyframes slam { 0% { transform: scale(1.9) rotate(-6deg); opacity: 0; } 55% { transform: scale(0.94) rotate(1deg); opacity: 1; } 100% { transform: none; } }
.dare .hint { font-size: 17px; font-weight: 750; color: var(--cream); margin-top: 4px; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); }
.hud-foot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; min-height: calc(92px + var(--sab)); padding: 10px 18px calc(12px + var(--sab)); text-align: center; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; background: linear-gradient(0deg, rgba(22, 12, 8, 0.8), rgba(22, 12, 8, 0)); }
.how { font-size: 14px; line-height: 1.4; color: var(--muted); max-width: 40ch; }
.stuck { font-size: 14px; font-weight: 750; color: var(--butter); padding: 10px 14px; border-radius: 999px; border: 1.5px dashed rgba(255, 209, 102, 0.55); background: rgba(22, 12, 8, 0.7); animation: pop-in 0.3s var(--ease) both; }

/* while passing, only the top bar stays; boom and forfeit get the whole screen */
.play[data-mode="pass"] .holder, .play[data-mode="pass"] .dare, .play[data-mode="pass"] .hud-foot,
.play[data-mode="boom"] .hud, .play[data-mode="boom"] .hud-foot,
.play[data-mode="forfeit"] .hud, .play[data-mode="forfeit"] .hud-foot { visibility: hidden; }
.play[data-mode="pass"] .hud { background: none; }

/* ── overlays ─────────────────────────────────────── */
.overlay { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: calc(16px + var(--sat)) 18px calc(18px + var(--sab)); gap: 10px; }
.overlay.pass { background: radial-gradient(120% 80% at 50% 40%, rgba(22, 12, 8, 0.25), rgba(22, 12, 8, 0.75)); animation: fade-in 0.2s both; }
@keyframes fade-in { from { opacity: 0; } }
.pass-done { font-size: 15px; font-weight: 800; letter-spacing: 0.06em; color: var(--mint); text-shadow: 0 2px 0 var(--ink); }
.pass-t { font: 400 clamp(48px, 15vw, 82px) / 1 var(--display); color: var(--cream); text-shadow: 3px 3px 0 var(--ink), -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 0 7px 0 var(--ink); animation: slam 0.45s var(--ease) both; }
.spud-slot.pass { width: min(44vw, 170px, 20dvh); aspect-ratio: 1.15; }
.catch {
  width: min(100%, 440px); flex: 0 1 auto; min-height: min(36dvh, 290px); border-radius: 30px; padding: 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: var(--ink); background: radial-gradient(120% 100% at 30% 20%, color-mix(in srgb, var(--pc) 70%, #fff) 0%, var(--pc) 55%, color-mix(in srgb, var(--pc) 75%, #000) 100%);
  border: 4px solid var(--ink); box-shadow: 0 8px 0 var(--ink), 0 24px 50px -16px color-mix(in srgb, var(--pc) 60%, transparent);
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease), opacity 0.2s, filter 0.2s;
}
.catch:active { transform: translateY(5px); box-shadow: 0 3px 0 var(--ink); }
.catch.wait { filter: saturate(0.5) brightness(0.7); }
.catch .c0 { font-size: 13px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; font-stretch: 80%; opacity: 0.8; }
.catch .c1 { font: 400 clamp(40px, 12vw, 64px) / 1.05 var(--display); color: var(--cream); text-shadow: 3px 3px 0 var(--ink), -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 0 6px 0 var(--ink); max-width: 100%; overflow-wrap: anywhere; }
.catch .c2 { font-size: 17px; font-weight: 800; padding: 8px 16px; border-radius: 999px; background: rgba(42, 18, 11, 0.85); color: var(--cream); margin-top: 6px; }
.catch.go .c2 { animation: throb 0.9s ease-in-out infinite; }
@keyframes throb { 50% { transform: scale(1.07); } }
.pass-warn { font-size: 13.5px; font-weight: 700; color: var(--muted); }

.overlay.boom { background: radial-gradient(90% 70% at 50% 40%, rgba(255, 74, 28, 0.12), rgba(22, 12, 8, 0.55)); justify-content: space-between; padding-bottom: calc(14px + var(--sab)); }
.boom-t {
  --len: 6;
  font: 400 min(calc(112vw / var(--len)), 120px, 22dvh) / 1 var(--display); white-space: nowrap; color: var(--butter); margin-top: 7dvh;
  text-shadow: 4px 4px 0 var(--ink), -3px -3px 0 var(--ink), 3px -3px 0 var(--ink), -3px 3px 0 var(--ink), 0 10px 0 var(--ink);
  animation: boom-in 0.6s var(--ease) both;
}
@keyframes boom-in { 0% { transform: scale(0.2) rotate(-20deg); opacity: 0; } 60% { transform: scale(1.12) rotate(3deg); opacity: 1; } 100% { transform: rotate(-4deg); } }
.boom-card {
  width: min(100%, 440px); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 16px 16px;
  border-radius: 26px; background: rgba(22, 12, 8, 0.94); border: 2px solid var(--line);
  box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, 0.6); animation: sheet-up 0.4s 0.15s var(--ease) both;
}
.boom-who { font: 400 clamp(26px, 7.6vw, 36px) / 1.15 var(--display); color: var(--cream); text-shadow: 0 4px 0 var(--ink); }
.boom-who .nm { color: var(--pc); }
.boom-sub { font-size: 16px; font-weight: 700; color: var(--cream2); }
.boom-shave { font-size: 14px; font-weight: 700; color: var(--mint); }
.boom-shave:empty { display: none; }
.overlay.boom .btn { margin-top: 6px; }
.overlay.boom .btn:disabled { opacity: 0.25; }

.overlay.forfeit { background: rgba(22, 12, 8, 0.86); }
.ff-name { font: 400 clamp(32px, 10vw, 48px) / 1.1 var(--display); color: var(--pc); text-shadow: 0 4px 0 var(--ink); }
.card {
  width: min(100%, 360px); min-height: 220px; margin: 8px 0 4px; padding: 26px 22px 18px; border-radius: 24px; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: var(--ink); background: linear-gradient(160deg, #fff7e6, #ffe1ad); border: 4px solid var(--ink);
  box-shadow: 0 8px 0 var(--ink), 0 30px 60px -20px rgba(255, 138, 29, 0.6);
  animation: deal 0.6s var(--ease) both;
}
.card::before { content: ""; position: absolute; inset: 9px; border-radius: 16px; border: 2px dashed rgba(42, 18, 11, 0.25); pointer-events: none; }
@keyframes deal { 0% { transform: translateY(40px) rotate(-12deg) scale(0.7); opacity: 0; } 100% { transform: rotate(-1.5deg); } }
.card.again { animation: deal2 0.5s var(--ease) both; }
@keyframes deal2 { 0% { transform: rotateY(90deg); } 100% { transform: rotate(1.5deg); } }
.card-k { font: 400 18px var(--display); color: var(--hot); }
.card p { font-size: 21px; font-weight: 800; line-height: 1.3; }
.card-n { font-size: 11px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.45; }
.ff-acts { display: flex; gap: 10px; width: min(100%, 360px); margin-top: 8px; }
.ff-acts .btn { flex: 1; }

.overlay.pause { background: rgba(22, 12, 8, 0.96); }
.pause-in { width: min(100%, 360px); display: flex; flex-direction: column; gap: 10px; }
.pause-in h2 { font: 400 44px var(--display); text-shadow: 0 4px 0 var(--ink); }
.pause-in p { color: var(--muted); margin-bottom: 10px; }

/* ── over ─────────────────────────────────────────── */
.over .scroll { width: min(520px, 100%); margin: 0 auto; padding-top: 58px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.spud-slot.small { width: min(46vw, 180px, 24dvh); aspect-ratio: 1.15; }
.over-name { font: 400 clamp(42px, 13vw, 66px) / 1.05 var(--display); color: var(--pc); text-shadow: 3px 3px 0 var(--ink), -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 0 7px 0 var(--ink); margin-top: 4px; overflow-wrap: anywhere; }
.over-sub { font-size: 17px; font-weight: 700; color: var(--cream2); margin-top: 4px; }
.final { list-style: none; width: 100%; display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.final li {
  display: grid; grid-template-columns: 30px 38px 1fr auto; align-items: center; gap: 8px; text-align: left;
  padding: 7px 12px 7px 8px; border-radius: 16px; background: var(--panel); border: 1.5px solid var(--line);
  animation: pop-in 0.4s var(--ease) both;
}
.final li.win { background: color-mix(in srgb, var(--pc) 14%, rgba(22, 12, 8, 0.6)); border-color: color-mix(in srgb, var(--pc) 55%, transparent); }
.final .rk { font: 400 18px var(--display); color: var(--muted); text-align: center; }
.final li.win .rk { color: var(--butter); }
.final .spud { width: 36px; height: 34px; }
.final .nm { font-weight: 800; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.final .nm small { display: block; font-size: 12px; font-weight: 700; color: var(--dim); }
.awards { list-style: none; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.awards li { padding: 12px 12px 11px; border-radius: 16px; text-align: left; background: rgba(255, 138, 29, 0.09); border: 1.5px solid rgba(255, 209, 102, 0.25); animation: pop-in 0.5s var(--ease) both; }
.awards .a-t { font: 400 15px var(--display); color: var(--butter); }
.awards .a-n { display: block; font-weight: 800; font-size: 17px; color: var(--pc); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.awards .a-d { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.over .foot { width: min(560px, 100%); margin: 0 auto; }

/* ── sheet + toast ────────────────────────────────── */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(10, 5, 3, 0.7); animation: fade-in 0.2s both; }
.sheet-in {
  width: min(100%, 520px); max-height: 92dvh; overflow-y: auto; padding: 24px 20px calc(18px + var(--sab));
  border-radius: 28px 28px 0 0; background: var(--char2); border: 2px solid var(--line); border-bottom: 0;
  animation: sheet-up 0.35s var(--ease) both;
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
.sheet-in h2 { font: 400 32px var(--display); color: var(--butter); text-shadow: 0 3px 0 var(--ink); margin-bottom: 12px; }
.how-list { padding-left: 0; list-style: none; counter-reset: h; display: flex; flex-direction: column; gap: 12px; }
.how-list li { counter-increment: h; position: relative; padding-left: 40px; font-size: 15.5px; line-height: 1.45; color: var(--cream2); }
.how-list li::before { content: counter(h); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 400 15px var(--display); color: var(--ink); background: var(--butter); border: 2px solid var(--ink); }
.how-list b { color: var(--cream); }
.tip { font-size: 14px; color: var(--muted); margin: 16px 0; padding: 12px 14px; border-radius: 14px; background: var(--panel); line-height: 1.45; }
.toast {
  position: fixed; z-index: 60; left: 50%; bottom: calc(96px + var(--sab)); transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 14px; font-weight: 700; font-size: 15px;
  background: var(--cream); color: var(--ink); border: 2px solid var(--ink); box-shadow: 0 5px 0 var(--ink);
}
.toast.in { animation: toast-in 0.3s var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ── spud avatars ─────────────────────────────────── */
.spud { overflow: visible; }
.spud path, .spud circle, .spud ellipse { stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ── wider screens ────────────────────────────────── */
@media (min-width: 760px) {
  .home-in { padding-top: 40px; }
  .spud-slot.hero { width: min(260px, 30dvh); }
}
@media (max-height: 640px) {
  .home-in { gap: 10px; padding-top: 50px; }
  .spud-slot.hero { width: min(50vw, 22dvh); }
  .pitch { font-size: 15.5px; }
  .dare .verb { font-size: clamp(38px, 11vw, 56px); }
  .catch { min-height: min(30dvh, 240px); }
}
/* phones on their side: two columns, and the play HUD becomes a sidebar */
@media (orientation: landscape) and (max-height: 520px) {
  .spud-slot.hero, .wake .spud-slot, .ready .spud-slot, .spud-slot.pass, .spud-slot.small { display: none; }
  .home-in {
    width: min(780px, 100%); display: grid; grid-template-columns: 1.1fr 1fr; align-items: center;
    gap: 6px 28px; padding: 50px 24px calc(12px + var(--sab)); text-align: left;
  }
  .home-in .logo { grid-column: 1; grid-row: 1; width: min(100%, 320px); justify-self: center; }
  .home-in .pitch { grid-column: 1; grid-row: 2; text-align: center; justify-self: center; font-size: 15px; }
  .home-in .home-acts { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
  .home-in .meta { grid-column: 1 / -1; grid-row: 3; justify-self: center; }
  .wake-in, .ready-in { overflow-y: auto; justify-content: flex-start; padding-top: 4px; gap: 8px; }
  .title, .who { font-size: 28px; }
  .bar { min-height: 54px; padding: 6px 12px; }
  .foot { padding-top: 6px; }

  .play .hud {
    position: absolute; left: 0; top: 0; bottom: 0; width: min(40%, 300px); padding: var(--sat) 0 0 var(--sal);
    background: linear-gradient(90deg, rgba(22, 12, 8, 0.88) 70%, rgba(22, 12, 8, 0));
  }
  .play .hud .bar { min-height: 52px; }
  .play .holder { margin: 0 10px; }
  .play .holder b { font-size: 21px; }
  .play .dare { align-items: flex-start; text-align: left; margin-top: 8px; padding: 0 14px; }
  .play .dare .verb { font-size: 42px; }
  .play .dare .hint { font-size: 15px; }
  .play .hud-foot { right: auto; width: min(40%, 300px); min-height: 0; align-items: flex-start; text-align: left; background: none; padding-left: calc(14px + var(--sal)); }
  .play .how { font-size: 13px; }
  .pass-t { font-size: 46px; }
  .catch { min-height: 130px; width: min(100%, 520px); }
  .boom-t { margin-top: 2dvh; }
  .card { min-height: 140px; padding: 16px 18px 12px; }
  .card p { font-size: 18px; }
  .ff-name { font-size: 30px; }
  .overlay { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
