/* CLANKER — a comedy-club flyer printed in two inks.
   Answers are comedians' index cards. The clanker is a cardboard robot doing stand-up.
   Spicy mode swaps the inks for the late show. */

:root {
  --paper: #fff5e1;
  --paper-2: #fbe8c4;
  --card: #fffdf7;
  --ink: #201c3d;
  --ink-2: #4a4566;
  --muted: #7d7792;
  --accent: #ff4fa3; /* fluorescent pink */
  --accent-soft: #ffd3e8;
  --blue: #2f5bff;
  --blue-soft: #d9e2ff;
  --yellow: #ffd23f;
  --green: #00a676;
  --rule: #cfdcf5;
  --margin: #ff9cc6;
  --display: 'Shrikhand', 'Georgia', serif;
  --sans: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  --mono: 'DM Mono', ui-monospace, Menlo, monospace;
  --radius: 14px;
  color-scheme: light;
}

/* The late show: hotter inks, warmer paper. */
body[data-mode='spicy'] {
  --paper: #ffeede;
  --paper-2: #ffd9bf;
  --accent: #ff3b1f;
  --accent-soft: #ffd0c4;
  --blue: #8a1650;
  --blue-soft: #f6d3e2;
  --yellow: #ffb11b;
  --margin: #ff8d78;
  --rule: #f1d3c4;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--accent) 22%, transparent) 1.1px, transparent 1.6px),
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--blue) 14%, transparent) 1.1px, transparent 1.6px);
  background-size: 9px 9px, 9px 9px;
  background-position: 0 0, 4px 5px;
  background-attachment: fixed;
  color: var(--ink);
  font: 400 16px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s;
}
body::before {
  /* fade the dot pattern out in the middle so content sits on clean paper */
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 45%, var(--paper) 40%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .25 0 0 0 0 .2 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
b { font-weight: 700; }
[hidden] { display: none !important; }

.app {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  padding: 16px 16px calc(40px + env(safe-area-inset-bottom));
}
.screen { display: flex; flex-direction: column; gap: 18px; animation: enter 0.35s ease-out both; }
.center { text-align: center; }

.kicker {
  margin: 0;
  font: 500 11px/1.2 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.hint { margin: 0; color: var(--muted); font-size: 14px; }
.hint.no-spam { font-size: 13px; text-align: center; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px dashed color-mix(in srgb, var(--ink) 25%, transparent);
}
.tb-brand {
  font: 400 22px/1 var(--display);
  color: var(--accent);
  text-shadow: 2px 2px 0 var(--blue);
  transform: rotate(-3deg);
}
.tb-spicy {
  display: none;
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--paper);
  padding: 5px 7px 4px;
  transform: rotate(4deg);
}
body[data-mode='spicy'] .tb-spicy { display: inline-block; }
.tb-meta { display: flex; gap: 6px; margin-left: auto; }
.tb-chip {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--card);
  border: 1.5px solid color-mix(in srgb, var(--ink) 18%, transparent);
  color: var(--ink-2);
  white-space: nowrap;
}
.tb-score { background: var(--yellow); border-color: transparent; color: var(--ink); }
.tb-restart {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--ink) 25%, transparent);
  background: var(--card);
  color: var(--ink-2);
}
.tb-restart:hover, .tb-restart:focus-visible { color: var(--accent); border-color: var(--accent); }
.tb-back { flex: none; color: var(--ink); }

/* ---------- language switch ---------- */

.langs {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  transform: rotate(-2deg);
}
.lang {
  min-width: 40px;
  padding: 6px 10px 5px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.1em;
}
.lang.on { background: var(--ink); color: var(--paper); }
.lang:disabled { cursor: default; }
.lang:disabled:not(.on) { opacity: 0.45; }
.lang-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; }

/* ---------- buttons & fields ---------- */

.btn {
  --shadow: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: 700 16px/1.1 var(--sans);
  box-shadow: 3px 3px 0 var(--shadow);
  transition: transform 0.08s, box-shadow 0.08s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; --shadow: var(--accent); }
.btn-ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--ink); }
.btn-ghost:active:not(:disabled) { transform: none; box-shadow: inset 0 0 0 2px var(--ink); }
.btn-quiet { background: transparent; box-shadow: none; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; min-height: 40px; }
.btn-quiet:active:not(:disabled) { transform: none; box-shadow: none; }
.btn-block { width: 100%; }
.btn-xl { min-height: 58px; font-size: 19px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.label { font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--card);
  font-size: 18px;
  font-weight: 600;
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--ink) 35%, transparent); font-weight: 500; }
input:focus, textarea:focus { outline: 3px solid var(--accent); outline-offset: 2px; }

.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.divider::before, .divider::after { content: ''; flex: 1; border-top: 2px dotted color-mix(in srgb, var(--ink) 30%, transparent); }
.join-row { display: flex; gap: 10px; }
.code-input { flex: 1; text-align: center; letter-spacing: 0.3em; font-family: var(--mono); text-transform: uppercase; }

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.2s ease-in-out infinite;
}
.ico { width: 14px; height: 14px; }

.sticker {
  display: inline-block;
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 7px 4px;
  border-radius: 4px;
}

/* ---------- the clanker ---------- */

.robot { display: block; flex: none; overflow: visible; }
.robot-xl { width: 150px; }
.robot-lg { width: 120px; }
.robot-md { width: 92px; }
.robot-sm { width: 70px; }
.robot-xs { width: 26px; display: inline-block; vertical-align: -6px; }
.r-blue { fill: var(--blue); }
.r-accent { fill: var(--accent); }
.r-yellow { fill: var(--yellow); }
.r-paper { fill: var(--card); }
.r-ink { fill: var(--ink); }
.r-stroke { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.r-grille { stroke: var(--card); stroke-width: 1.6; }
.r-accent { mix-blend-mode: multiply; }
.eyes-win, .eyes-lose { display: none; }
.robot-win .eyes-open, .robot-lose .eyes-open { display: none; }
.robot-win .eyes-win, .robot-lose .eyes-lose { display: inline; }
.robot-body { transform-origin: 60px 120px; animation: bob 2.6s ease-in-out infinite; }
.robot-win .robot-body { animation: bounce 0.6s ease-in-out infinite alternate; }
.robot-lose .robot-body { transform: rotate(-8deg) translateY(4px); animation: none; }
.robot-lose .mouth { transform: translate(2px, 2px) scaleX(0.6); transform-origin: 60px 66px; }
.r-antenna { animation: blink 1.6s ease-in-out infinite; }
.robot-xs .robot-body, .robot-xs .r-antenna { animation: none; }
.robot-xs .mic { display: none; }
.arm-left { display: none; }
.robot-xs { margin-right: 6px; }

/* Victory dance */
.robot-dance .mic { display: none; }
.robot-dance .eyes-open { display: none; }
.robot-dance .eyes-win { display: inline; }
.robot-dance .arm-left { display: inline; }
.robot-dance .robot-body { animation: dance 0.47s ease-in-out infinite alternate; transform-origin: 60px 120px; }
.robot-dance .arm { transform-origin: 88px 104px; animation: wave 0.235s ease-in-out infinite alternate; }
.robot-dance .arm-left { transform-origin: 34px 104px; animation: wave-left 0.235s ease-in-out infinite alternate; }
.robot-dance .r-antenna { animation: blink 0.25s steps(1) infinite; }
.robot-dance .mouth { transform: scaleY(2.2); transform-origin: 60px 66px; }
.robot-dance-xl { width: min(70vw, 260px); }
@keyframes dance { from { transform: translateY(0) rotate(-12deg); } to { transform: translateY(-16px) rotate(12deg); } }
@keyframes wave { from { transform: rotate(-35deg); } to { transform: rotate(25deg); } }
@keyframes wave-left { from { transform: rotate(35deg); } to { transform: rotate(-25deg); } }

.stage { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stage-row { flex-direction: row; align-items: flex-end; gap: 10px; }
.stage-row .bubble { margin-bottom: 30px; }
.stage-row .bubble::after { left: -9px; bottom: 14px; top: auto; border-width: 8px 10px 8px 0; border-color: transparent var(--card) transparent transparent; }
.stage-small .bubble { font-size: 15px; }

.bubble {
  position: relative;
  margin: 0;
  padding: 12px 16px;
  background: var(--card);
  border-radius: 18px;
  box-shadow: 3px 3px 0 var(--accent);
  font: 600 16px/1.35 var(--sans);
  max-width: 340px;
  min-height: 48px;
}
.bubble::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -9px;
  margin-left: -8px;
  border-style: solid;
  border-width: 0 8px 10px 8px;
  border-color: transparent transparent var(--card) transparent;
}
.stage:not(.stage-row) .bubble { text-align: center; }
.stage:not(.stage-row) .robot { margin-bottom: 8px; }

/* ---------- home ---------- */

.flyer-top {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 0;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}
.flyer-top span + span::before { content: '★'; margin-right: 8px; color: var(--accent); }

.title { margin: 0; text-align: center; display: flex; flex-direction: column; align-items: center; }
.title-small { font: 800 22px/1.1 var(--sans); letter-spacing: -0.01em; }
.title-big {
  position: relative;
  display: inline-block;
  font: 400 clamp(54px, 17vw, 82px)/1 var(--display);
  color: var(--accent);
  text-shadow: 4px 4px 0 var(--blue);
  transform: rotate(-4deg);
  margin-top: 6px;
  padding: 0 6px 6px;
}

.ticket {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 18px 20px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px -14px rgba(32, 28, 61, 0.45);
  /* punched notches on the sides, like a ticket */
  -webkit-mask: radial-gradient(circle 11px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 11px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 11px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 11px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
}

.setlist {
  padding: 18px 18px 6px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--yellow);
  transform: rotate(0.6deg);
}
.setlist h2 { margin: 0 0 6px; font: 400 26px/1 var(--display); color: var(--ink); }
.setlist ol { margin: 0; padding: 0; list-style: none; counter-reset: set; }
.setlist li { counter-increment: set; display: grid; grid-template-columns: 30px 1fr; gap: 6px; padding: 8px 0; border-top: 1.5px dashed color-mix(in srgb, var(--ink) 30%, transparent); font-size: 15px; }
.setlist li:first-child { border-top: 0; }
.setlist li::before { content: counter(set, decimal-leading-zero); font: 500 13px/1.6 var(--mono); color: var(--ink-2); }

/* ---------- lobby ---------- */

.admit {
  display: flex;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--blue);
  overflow: hidden;
}
.admit-main { flex: 1; padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.admit .kicker { color: rgba(255, 255, 255, 0.85); }
.room-code { display: flex; gap: 6px; }
.room-code span {
  font: 400 50px/1 var(--display);
  color: #fff;
  text-shadow: 3px 3px 0 var(--blue);
  animation: drop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both;
  animation-delay: calc(var(--i) * 70ms);
}
.join-url { margin: 0; font-size: 13px; line-height: 1.35; color: rgba(255, 255, 255, 0.92); overflow-wrap: anywhere; }
.join-url b { font-family: var(--mono); font-weight: 500; }
.admit-stub {
  display: grid;
  place-items: center;
  padding: 12px;
  background: var(--card);
  border-left: 3px dashed var(--accent);
  margin: 6px 6px 6px 0;
  border-radius: 0 10px 10px 0;
}
.qr img, .qr canvas { display: block; width: 96px; height: 96px; }

.shows { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.show {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 14px 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
  text-align: left;
  transition: transform 0.15s, background 0.2s;
}
button.show:active { transform: scale(0.98); }
.show-name { display: inline-flex; align-items: center; gap: 4px; font: 500 11px/1.2 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.show-mode { font: 400 28px/1.05 var(--display); }
.show-blurb { font-size: 13px; line-height: 1.3; color: var(--ink-2); }
.show-ai { display: block; margin-top: 8px; font-family: 'DM Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 0.04em; color: var(--ink-2); }
.show-spicy.on .show-ai { color: rgba(255, 255, 255, 0.85); }
.show.on { background: var(--yellow); box-shadow: 4px 4px 0 var(--ink); }
.show-spicy.on { background: #ff3b1f; color: #fff; }
.show-spicy.on .show-name, .show-spicy.on .show-blurb { color: rgba(255, 255, 255, 0.9); }
.show.off { opacity: 0.45; }
.show-stamp {
  position: absolute;
  top: -10px;
  right: -6px;
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 7px 4px;
  background: var(--ink);
  color: var(--paper);
  transform: rotate(6deg);
}
.chili { width: 15px; height: 15px; color: #ff3b1f; }
.show-spicy.on .chili { color: var(--yellow); }

.signup {
  padding: 16px 16px 14px;
  background: var(--card);
  border-radius: 6px;
  box-shadow: 0 10px 24px -14px rgba(32, 28, 61, 0.45);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.signup-head, .board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.signup-head h2, .board-head h2 { margin: 0; font: 400 24px/1 var(--display); }
.count { font: 500 12px/1 var(--mono); color: var(--muted); }
.signup-list { margin: 0; padding: 0; list-style: none; counter-reset: slot; }
.signup-list li {
  counter-increment: slot;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border-bottom: 1.5px solid var(--rule);
  animation: enter 0.3s ease-out both;
}
.signup-list li::before { content: counter(slot) '.'; width: 22px; font: 500 13px/1 var(--mono); color: var(--muted); }
.signup-list li.gone { opacity: 0.45; }
.signup-list .pname { font-weight: 700; font-size: 18px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signup-list .headliner { border-bottom: 0; }
.signup-list .headliner::before { content: '★'; color: var(--accent); }
.signup-list .headliner .pname { font: 400 20px/1 var(--display); color: var(--blue); flex: 0 0 auto; overflow: visible; }
.signup-list .headliner { flex-wrap: wrap; row-gap: 6px; }
.signup-list .headliner .ptags { margin-left: auto; }
.ptags { display: flex; gap: 4px; }
.tag { font: 500 10px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 6px 3px; border-radius: 4px; background: var(--blue-soft); color: var(--blue); }
.tag-you { background: var(--accent-soft); color: var(--ink); }
.tag-bot { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink-2); }
.tag-head { background: var(--blue); color: #fff; }
.icon-btn { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; font-size: 22px; line-height: 1; color: var(--muted); }

.actions { display: flex; flex-direction: column; gap: 6px; }
.waiting { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0; font-weight: 600; color: var(--ink-2); }

/* ---------- index cards (prompts & answers) ---------- */

.icard {
  --line: 26px;
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 36px 16px 14px;
  border: 0;
  border-radius: 3px;
  background-color: var(--card);
  background-image:
    linear-gradient(var(--margin), var(--margin)),
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--line) - 1px), var(--rule) calc(var(--line) - 1px) var(--line));
  background-size: 100% 2px, 100% calc(100% - 36px);
  background-position: 0 26px, 0 36px;
  background-repeat: no-repeat, no-repeat;
  background-origin: border-box;
  box-shadow: 0 1px 0 rgba(32, 28, 61, 0.06), 0 12px 22px -14px rgba(32, 28, 61, 0.5);
  text-align: left;
  transform: rotate(var(--r, 0deg));
  color: var(--ink);
}
.icard-label {
  position: absolute;
  top: 8px;
  left: 16px;
  margin: 0;
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.icard-text { display: block; margin: 0; font: 600 19px/var(--line) var(--sans); overflow-wrap: anywhere; }

.round-tag { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font: 500 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.sticker-x2 { background: var(--yellow); color: var(--ink); transform: rotate(-2deg); }

.prompt-card { padding-bottom: 18px; }
.prompt { margin: 0; font: 800 23px/var(--line) var(--sans); letter-spacing: -0.01em; text-wrap: balance; }
.prompt-small { margin: 0; text-align: center; font: 700 17px/1.3 var(--sans); color: var(--ink-2); text-wrap: balance; }

.compose { display: flex; flex-direction: column; gap: 10px; }
.icard-input {
  min-height: 132px;
  resize: none;
  font: 600 19px/var(--line) var(--sans);
  padding-top: 36px;
  --r: 0.6deg;
}
.icard-input:focus { outline: 3px solid var(--accent); outline-offset: 3px; }
.compose-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wc { font: 500 12px/1 var(--mono); color: var(--muted); }
.wc.over { color: #d0021b; font-weight: 700; }
.locked { display: flex; flex-direction: column; align-items: center; gap: 6px; }

.status { display: flex; flex-direction: column; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--card);
  border: 1.5px solid color-mix(in srgb, var(--ink) 15%, transparent);
  font-size: 14px;
  font-weight: 600;
}
.chip .dot { background: color-mix(in srgb, var(--ink) 30%, transparent); }
.chip.done { background: var(--green); border-color: var(--green); color: #fff; }
.chip.gone { opacity: 0.45; }
.chip-bot { border-style: dashed; border-color: var(--blue); color: var(--blue); }
.chip-bot .dot { background: var(--blue); }
.chip-bot.done { background: var(--blue); border-color: var(--blue); }
.chip-kick { margin: -6px -6px -6px -2px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: inherit; opacity: 0.6; font-size: 18px; line-height: 1; }

/* ---------- vote ---------- */

.shout { margin: 0; text-align: center; font: 400 clamp(32px, 10vw, 44px)/1.05 var(--display); color: var(--accent); text-shadow: 3px 3px 0 var(--blue); transform: rotate(-2deg); }
.cards { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.cards li { animation: deal 0.4s cubic-bezier(0.2, 1.2, 0.4, 1) both; animation-delay: calc(var(--i, 0) * 90ms); }
.answer-card { padding-left: 54px; min-height: 84px; transition: transform 0.15s, box-shadow 0.15s; }
button.answer-card:not(:disabled):active { transform: rotate(var(--r)) scale(0.98); }
.card-letter {
  position: absolute;
  left: 12px;
  top: 34px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--blue);
  color: var(--blue);
  font: 500 14px/1 var(--mono);
}
.answer-card.selected { box-shadow: 0 0 0 3px var(--accent), 0 12px 22px -14px rgba(32, 28, 61, 0.5); }
.answer-card.selected .card-letter { background: var(--accent); border-color: var(--accent); color: #fff; }
.answer-card.mine { opacity: 0.7; cursor: default; }
.answer-card .sticker { position: absolute; top: 6px; right: 10px; }
.sticker-mine { background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink-2); }
.sticker-pick { background: var(--accent); color: #fff; transform: rotate(4deg); }

/* ---------- results ---------- */

.reveal li { animation: deal 0.5s cubic-bezier(0.2, 1.2, 0.4, 1) both; animation-delay: var(--d); }
.result-card { display: flex; flex-direction: column; gap: 6px; padding-top: 34px; }
.byline { position: absolute; top: 6px; left: 16px; right: 16px; display: flex; align-items: center; gap: 6px; font: 500 12px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); white-space: nowrap; overflow: hidden; }
.byline b { font-weight: 500; }
.byline small { color: var(--muted); text-transform: none; letter-spacing: 0; }
.score-line { display: flex; align-items: center; gap: 10px; min-height: 26px; }
.tally { color: var(--ink); }
.tally line { stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.tally-none, .tally-n { font: 500 12px/1 var(--mono); color: var(--muted); }
.gain { font: 500 13px/1 var(--mono); padding: 4px 7px 3px; border-radius: 4px; background: var(--green); color: #fff; }
.voters { font-size: 13px; color: var(--muted); }
.result-card.is-bot { background-color: var(--blue-soft); }
.result-card.is-bot .byline { color: var(--blue); }
.sticker-ai { background: var(--blue); color: #fff; }
.result-card.top { box-shadow: 0 0 0 3px var(--yellow), 0 12px 22px -14px rgba(32, 28, 61, 0.5); }
.laugh {
  position: absolute;
  right: -8px;
  bottom: -14px;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  transform: rotate(12deg);
  animation: pop 0.45s cubic-bezier(0.3, 1.8, 0.5, 1) both;
  animation-delay: calc(var(--d) + 0.3s);
}
.laugh svg { position: absolute; inset: 0; fill: var(--yellow); filter: drop-shadow(2px 2px 0 var(--accent)); }
.laugh span { position: relative; width: 50px; text-align: center; font: 800 10px/1 var(--sans); text-transform: uppercase; letter-spacing: 0.02em; }
.result-card.top .score-line { padding-right: 70px; }
.result-card.top .voters { padding-right: 70px; }

.verdict, .board { animation: enter 0.45s ease-out both; animation-delay: var(--d, 0s); }
.verdict { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 8px; }
.stamp {
  margin: 0;
  padding: 10px 16px 8px;
  border: 4px solid currentColor;
  border-radius: 10px;
  font: 400 clamp(26px, 8vw, 34px)/1.05 var(--display);
  text-align: center;
  transform: rotate(-4deg);
  color: var(--accent);
  background: color-mix(in srgb, var(--card) 70%, transparent);
}
.stamp-clanker { color: var(--blue); }
.stamp-tie { color: var(--ink-2); }

.versus {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 12px;
}
.vs-side { display: flex; align-items: center; gap: 10px; }
.vs-side b { font: 400 34px/1 var(--display); color: var(--accent); }
.vs-side small { font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.vs-bot { justify-content: flex-end; }
.vs-bot b { color: #8fa8ff; }
body[data-mode='spicy'] .vs-bot b { color: #ff9fc7; }
.vs-mid { font: 500 10px/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.6; text-align: center; }

.board { padding: 16px; background: var(--card); border-radius: 6px; box-shadow: 0 10px 24px -14px rgba(32, 28, 61, 0.45); display: flex; flex-direction: column; gap: 8px; }
.scoreboard { margin: 0; padding: 0; list-style: none; }
.score-row { display: flex; align-items: center; gap: 10px; min-height: 44px; border-bottom: 1.5px solid var(--rule); }
.score-row:last-child { border-bottom: 0; }
.rank { width: 20px; font: 500 13px/1 var(--mono); color: var(--muted); }
.score-row .pname { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-row small { font: 500 10px/1 var(--mono); text-transform: uppercase; color: var(--muted); letter-spacing: 0.06em; }
.score-row.me .pname { color: var(--accent); }
.score-row.is-bot .pname { font: 400 18px/1 var(--display); color: var(--blue); }
.pts { font: 500 16px/1 var(--mono); }

/* ---------- final ---------- */

.final-title { text-align: center; align-self: center; font-size: clamp(40px, 12vw, 58px); line-height: 1.02; }
.winner-clanker .final-title { color: var(--blue); text-shadow: 4px 4px 0 var(--accent); }
.podium { margin: 4px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; gap: 8px; }
.podium-step { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; animation: rise 0.6s cubic-bezier(0.2, 1.3, 0.4, 1) both; animation-delay: calc(0.3s + var(--i) * 0.2s); }
.podium .step-1 { order: 2; }
.podium .step-2 { order: 1; }
.podium .step-3 { order: 3; }
.podium .pname { max-width: 100%; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .is-bot .pname { font: 400 15px/1.2 var(--display); color: var(--blue); }
.podium .pts { font-size: 13px; color: var(--ink-2); }
.step-block { width: 100%; display: grid; place-items: center; border-radius: 8px 8px 0 0; font: 400 34px/1 var(--display); color: #fff; }
.step-1 .step-block { height: 110px; background: var(--accent); }
.step-2 .step-block { height: 80px; background: var(--blue); }
.step-3 .step-block { height: 58px; background: var(--yellow); color: var(--ink); }

.loading { align-items: center; padding-top: 18vh; }
.podium-step .robot { width: 54px; margin-bottom: -2px; }

/* ---------- sound buttons ---------- */

.home-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.home-tools { display: flex; gap: 8px; }
.sound-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--ink) 25%, transparent);
  background: var(--card);
  color: var(--ink-2);
}
.home-top + .flyer-top { flex-wrap: wrap; row-gap: 6px; }
[data-music-toggle][aria-pressed='false'],
[data-sound-toggle][aria-pressed='false'] { color: var(--muted); }

/* ---------- drinking game ---------- */

.glass { width: 22px; height: 22px; flex: none; color: currentColor; }
.glass-liquid { fill: var(--yellow); }
.drinks-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 14px;
  padding: 12px 14px;
  border: 2px dashed color-mix(in srgb, var(--ink) 35%, transparent);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  text-align: left;
  font: inherit;
}
.drinks-row.on { border-style: solid; border-color: var(--ink); background: var(--card); box-shadow: 4px 4px 0 var(--ink); }
div.drinks-row:not(.on) { opacity: 0.55; }
.drinks-row .glass { width: 30px; height: 30px; }
.drinks-row:not(.on) .glass-liquid { fill: transparent; }
.drinks-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.drinks-text b { font: 400 20px/1.05 var(--display); }
.drinks-text small { font-size: 13px; line-height: 1.3; color: var(--ink-2); }
.switch {
  position: relative;
  flex: none;
  width: 58px;
  height: 30px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 18%, transparent);
  transition: background 0.2s;
}
.switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}
.switch-word {
  position: absolute;
  inset: 0 8px 0 auto;
  display: grid;
  place-items: center;
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.drinks-row.on .switch { background: var(--green); }
.drinks-row.on .switch-knob { transform: translateX(28px); }
.drinks-row.on .switch-word { inset: 0 auto 0 9px; color: #fff; }

.drink-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--card);
  border: 2px solid var(--ink);
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
}
.drink-strip.me { background: var(--yellow); }
.drink-strip.me .glass-liquid { fill: var(--accent); }
.drink-strip .glass { width: 28px; height: 28px; }
.drink-strip span b { display: block; font: 400 20px/1.1 var(--display); margin-bottom: 2px; }
.drink-final { margin: 0; }
.sips { display: inline-flex; align-items: center; gap: 2px; font: 500 11px/1 var(--mono); color: var(--ink-2); white-space: nowrap; }
.sips .glass { width: 14px; height: 14px; }

.drink {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: color-mix(in srgb, var(--ink) 55%, transparent);
  animation: fade 0.2s ease-out;
}
.drink.leaving { opacity: 0; transition: opacity 0.3s; }
.drink-card {
  width: min(360px, 100%);
  padding: 22px 18px 14px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 6px 6px 0 var(--ink);
  text-align: center;
  animation: pop 0.35s cubic-bezier(0.3, 1.6, 0.6, 1);
}
.drink-me .drink-card { background: var(--yellow); animation: pop 0.35s cubic-bezier(0.3, 1.6, 0.6, 1), wobble 0.5s 0.4s 2; }
.glass-xl { width: 96px; height: 96px; color: var(--ink); }
.glass-xl .glass-liquid { transform-box: fill-box; transform-origin: bottom; animation: pour 1.2s 0.2s ease-out both; }
.drink-me .glass-xl .glass-liquid { fill: var(--accent); }
.drink-shot .glass-xl { width: 70px; height: 70px; }
.drink-title { margin: 6px 0 4px; font: 400 32px/1.05 var(--display); }
.drink-why { margin: 0; font-weight: 600; }
.drink-also { margin: 8px 0 0; font: 500 12px/1.4 var(--mono); letter-spacing: 0.04em; color: var(--ink-2); }
.drink-card .stage { margin-top: 14px; text-align: left; }
.drink-card .dance-sub { margin: 10px 0 0; font: 500 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
@keyframes pour { from { transform: scaleY(0); } }
@keyframes fade { from { opacity: 0; } }
@keyframes wobble { 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }

/* ---------- accounts, shop, feedback ---------- */

.link-btn {
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--blue);
  font: 600 14px/1.3 var(--sans);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.account-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; margin: 10px 0 0; font-size: 13px; color: var(--ink-2); }
.account-bar span { overflow-wrap: anywhere; }

.sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: color-mix(in srgb, var(--ink) 50%, transparent);
  animation: fade 0.2s ease-out;
}
.sheet {
  position: relative;
  width: min(480px, 100%);
  max-height: 92dvh;
  overflow-y: auto;
  padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
  border: 3px solid var(--ink);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: var(--paper);
  animation: rise 0.25s ease-out;
}
@media (min-width: 520px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-bottom: 3px solid var(--ink); border-radius: 20px; box-shadow: 6px 6px 0 var(--ink); }
}
.sheet-body { display: flex; flex-direction: column; gap: 12px; }
.sheet-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  font-size: 26px;
  line-height: 1;
}
.sheet-title { margin: 0; padding-right: 36px; font: 400 28px/1.1 var(--display); }
.sheet-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-2); }
.sheet-links span { overflow-wrap: anywhere; }
.code-6 { font: 500 28px/1 var(--mono); letter-spacing: 0.4em; text-align: center; }

/* Today's AI budget is spent: the "email me when it's back" card (home screen, host's lobby). */
.limit-card { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; padding: 14px 16px; border-radius: 12px; background: var(--card); border: 2px dashed var(--accent); }
.limit-card p { margin: 0; }
.limit-title { font-weight: 700; }
.limit-row { display: flex; gap: 8px; }
.limit-row input { flex: 1; min-width: 0; }
.limit-thanks { font-weight: 600; color: var(--green); }
.limit-banner { display: block; width: 100%; margin: 8px 0 0; padding: 8px 12px; border: 0; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.3; text-align: center; }
.limit-banner:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.ai-meter { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 2px dashed color-mix(in srgb, var(--ink) 30%, transparent); }
.ai-meter small { color: var(--ink-2); font-size: 13px; line-height: 1.35; }
/* The shop: each pack is an admission ticket with a tear-off stub that holds the price. */
.passes { display: flex; flex-direction: column; gap: 14px; margin: 4px 0 0; padding: 0; list-style: none; }
.pass {
  --t-bg: var(--card);
  --t-fg: var(--ink);
  --t-soft: var(--ink-2);
  --t-stub: var(--paper-2);
  --t-tick: var(--accent);
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--t-bg);
  color: var(--t-fg);
  box-shadow: 4px 4px 0 var(--ink);
  overflow: hidden;
  animation: pass-in 0.45s cubic-bezier(0.3, 1.4, 0.5, 1) both;
  animation-delay: calc(var(--i, 0) * 80ms + 60ms);
}
.pass:nth-child(odd) { --tilt: -0.6deg; }
.pass:nth-child(even) { --tilt: 0.6deg; }
.pass-party { --t-stub: var(--yellow); }
.pass-unlimited {
  --t-bg: var(--ink);
  --t-fg: var(--paper);
  --t-soft: color-mix(in srgb, var(--paper) 78%, transparent);
  --t-stub: var(--accent);
  --t-tick: var(--yellow);
}
/* a slow shine across the season pass */
.pass-unlimited::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.22) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: shine 4.5s ease-in-out 1s infinite;
  pointer-events: none;
}
.pass-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 14px 14px 14px 16px; }
.pass-kicker { font: 500 10px/1.2 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--t-tick); }
.pass-name { font: 400 26px/1.05 var(--display); }
.pass-perks { display: flex; flex-direction: column; gap: 3px; margin: 8px 0 0; padding: 0; list-style: none; }
.pass-perks li { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; line-height: 1.3; color: var(--t-soft); }
.pass-perks .ico { flex: none; width: 13px; height: 13px; margin-top: 2px; color: var(--t-tick); }
.pass-stub {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 112px;
  padding: 14px 10px;
  border-left: 2px dashed color-mix(in srgb, var(--ink) 55%, transparent);
  background: var(--t-stub);
  color: var(--ink);
  text-align: center;
}
.pass-unlimited .pass-stub { color: #fff; border-left-color: color-mix(in srgb, var(--paper) 60%, transparent); }
/* the punched notches where the stub tears off */
.pass-stub::before, .pass-stub::after {
  content: '';
  position: absolute;
  left: -10px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}
.pass-stub::before { top: -11px; }
.pass-stub::after { bottom: -11px; }
.pass-price { font: 400 27px/1 var(--display); letter-spacing: -0.01em; }
.pass-unlimited .pass-price { text-shadow: 2px 2px 0 var(--ink); }
.pass-each { font: 500 10px/1.2 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.8; }
.pass-buy { min-height: 40px; min-width: 0; width: 100%; margin-top: 6px; padding: 8px 10px; font-size: 14px; }
.pass-unlimited .pass-buy { --shadow: var(--ink); }
.pass-sticker {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: -2px 0 4px;
  padding: 4px 6px 3px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font: 500 9px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-4deg);
  box-shadow: 1.5px 1.5px 0 var(--ink);
}
.pass-sticker .chili { width: 11px; height: 11px; color: var(--yellow); }
.pass-unlimited .pass-sticker { background: var(--yellow); color: var(--ink); }
.pass-party .pass-sticker { background: var(--ink); }
.pass.owned { --t-stub: color-mix(in srgb, var(--green) 18%, var(--card)); }
.pass.owned .pass-stub { color: var(--ink); }
.pass.owned .pass-price { text-decoration: line-through; text-decoration-thickness: 2px; opacity: 0.5; text-shadow: none; }
@keyframes pass-in { from { opacity: 0; transform: translateY(14px) rotate(var(--tilt, 0deg)); } }
@keyframes shine { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@media (max-width: 360px) {
  .pass-stub { width: 96px; }
  .pass-name { font-size: 23px; }
}
/* Paying inside the shop: Stripe's form sits on a white card. */
.pay-back { align-self: flex-start; margin: -6px 0 -4px; text-decoration: none; }
.pay-price { font: 500 18px/1 var(--mono); color: var(--ink-2); vertical-align: 3px; }
.pay-box { min-height: 340px; padding: 6px 0; border: 2px solid var(--ink); border-radius: var(--radius); background: #fff; overflow: hidden; }
.pay-loading { margin: 0; padding: 140px 16px; text-align: center; color: var(--muted); font-size: 14px; animation: pulse 1.4s ease-in-out infinite alternate; }
.pay-safe { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; color: var(--muted); font-size: 12px; text-align: center; }
.pay-safe .ico { flex: none; width: 12px; height: 12px; }
.pay-done { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 0 4px; text-align: center; animation: enter 0.45s ease-out both; }
.pay-done-text { margin: 0; font-weight: 700; font-size: 18px; }
.pay-done-games { margin: 0; font: 500 13px/1.3 var(--mono); color: var(--ink-2); }
@keyframes pulse { from { opacity: 0.45; } }
.product-owned { display: inline-flex; align-items: center; gap: 4px; flex: none; color: var(--green); font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; }

.show.locked { border-style: dashed; }
.show.locked .show-mode, .show.locked .show-blurb { opacity: 0.6; }
.show-lock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 5px 8px 4px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.04em;
}
.ai-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; margin: 12px 0 0; font-size: 14px; color: var(--ink-2); text-align: center; }
.ai-line.empty { color: var(--accent); font-weight: 600; }

.report-btn {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}
.report-btn:hover, .report-btn:focus-visible { color: var(--accent); background: var(--accent-soft); }
.kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.kind { padding: 8px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); color: var(--ink); font: 600 14px/1 var(--sans); }
.kind.on { background: var(--ink); color: var(--paper); }
.quote { margin: 0; padding: 10px 14px; border-left: 4px solid var(--accent); background: var(--card); font-weight: 600; }
.fine-print { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 8px 0 0; text-align: center; font-size: 12px; line-height: 1.4; color: var(--muted); }
.fine-print a { color: inherit; }

/* ---------- the clanker heckling you ---------- */

.heckle {
  position: fixed;
  right: 0;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 80;
  display: flex;
  align-items: flex-end;
  flex-direction: row-reverse;
  gap: 4px;
  max-width: calc(100% - 24px);
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  animation: peek 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.heckle .robot { transform: rotate(-14deg) translateX(18px); }
.heckle-bubble {
  margin-bottom: 44px;
  padding: 10px 14px;
  border-radius: 16px 16px 4px 16px;
  background: var(--ink);
  color: var(--paper);
  font: 700 15px/1.3 var(--sans);
  box-shadow: 3px 3px 0 var(--accent);
}
.heckle.leaving { animation: unpeek 0.4s ease-in both; }
@keyframes peek { from { transform: translateX(110%); } }
@keyframes unpeek { to { transform: translateX(110%); } }

/* ---------- victory dance takeover ---------- */

.dance {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  background: var(--blue);
  cursor: pointer;
  animation: flash-in 0.25s ease-out both;
}
.dance.leaving { animation: flash-out 0.35s ease-in both; }
.dance-rays {
  position: absolute;
  inset: -50%;
  background: repeating-conic-gradient(from 0deg, var(--accent) 0deg 12deg, transparent 12deg 24deg);
  opacity: 0.55;
  animation: spin 6s linear infinite;
}
.dance > *:not(.dance-rays) { position: relative; }
.dance-title {
  margin: 0;
  padding: 0 16px;
  text-align: center;
  font: 400 clamp(40px, 13vw, 64px)/1 var(--display);
  color: var(--yellow);
  text-shadow: 4px 4px 0 var(--ink);
  animation: throb 0.47s ease-in-out infinite alternate;
}
.dance .r-paper { fill: #fff; }
.dance-notes { position: absolute; inset: 0; pointer-events: none; }
.dance-notes span {
  position: absolute;
  bottom: -40px;
  font-size: 34px;
  color: var(--yellow);
  animation: float-up 2.2s linear infinite;
}
.dance-notes span:nth-child(1) { left: 8%; animation-delay: 0s; }
.dance-notes span:nth-child(2) { left: 22%; animation-delay: 0.6s; }
.dance-notes span:nth-child(3) { left: 38%; animation-delay: 1.2s; }
.dance-notes span:nth-child(4) { left: 54%; animation-delay: 0.3s; }
.dance-notes span:nth-child(5) { left: 68%; animation-delay: 0.9s; }
.dance-notes span:nth-child(6) { left: 80%; animation-delay: 1.5s; }
.dance-notes span:nth-child(7) { left: 90%; animation-delay: 0.45s; }
.dance-notes span:nth-child(8) { left: 14%; animation-delay: 1.8s; }
.dance-sub { margin: 0; font: 500 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: #fff; opacity: 0.8; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes throb { from { transform: rotate(-4deg) scale(1); } to { transform: rotate(3deg) scale(1.08); } }
@keyframes float-up { to { transform: translateY(-115vh) rotate(30deg); } }
@keyframes flash-in { from { opacity: 0; transform: scale(1.1); } }
@keyframes flash-out { to { opacity: 0; transform: scale(0.9); } }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 90;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- motion ---------- */

@keyframes enter { from { opacity: 0; transform: translateY(10px); } }
@keyframes deal { from { opacity: 0; transform: translateY(24px) rotate(calc(var(--r, 0deg) * -4)); } }
@keyframes drop { from { opacity: 0; transform: translateY(-24px) rotate(-12deg); } }
@keyframes pop { from { opacity: 0; transform: scale(0.2) rotate(-30deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } }
@keyframes blink { 50% { opacity: 0.35; } }
@keyframes bob { 50% { transform: translateY(-3px) rotate(-1.5deg); } }
@keyframes bounce { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(-8px) rotate(3deg); } }

@media (max-width: 440px) {
  #tb-code { display: none; }
  .topbar { gap: 6px; }
  .tb-meta { gap: 4px; }
  .tb-restart { width: 30px; height: 30px; }
}
@media (max-width: 390px) {
  body[data-mode='spicy'] .tb-spicy { display: none; } /* the red palette already says it */
}

@media (max-width: 360px) {
  .shows { grid-template-columns: 1fr; }
  .room-code span { font-size: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
