/* Rowdy Rooms.
   Art direction: Codex (CODEX-DESIGN-BRIEF.txt). A premium camera party-game clubhouse:
   charcoal surfaces, warm ivory type, one coral accent, mint as the quiet second color.
   Components are separated by real borders, spacing and type, not glows.
   Two type families: Barlow Condensed for display, Barlow for everything else.
   Phones get one column. Computers get a site frame, and during a game the room (everyone's
   cameras and your own switches) stays in a panel beside the game.
   Polaroids are a game mechanic (the photos the game takes), not a general-purpose panel. */
:root {
  color-scheme: dark;
  --bg: #101113;
  --surface: #191A1D;
  --raised: #222326;
  --line: #343538;
  --ink: #F6F1E8;
  --muted: #B5B3B0;
  --coral: #FF654F;
  --coral-hover: #FF806E;
  --coral-ink: #1C0E0A;
  --coral-wash: rgba(255, 101, 79, 0.14);
  --mint: #B9E4D5;
  --mint-ink: #10201B;
  --ok: #6FD08C;
  --alert: #FF5A5A;
  --amber: #F2C879;
  --steel: #9DB7C9;
  --paper: #F3EEE4;
  --paper-ink: #1B1B1D;
  --paper-muted: #6B6862;
  --scrim: rgba(16, 17, 19, 0.74);
  --shade: rgba(0, 0, 0, 0.35);
  --shade-strong: rgba(0, 0, 0, 0.62);
  --flash: #FFFFFF;
  --qr-tile: #FFFFFF;
  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 1.25rem;
  --radius-sm: 0.875rem;
  --gutter: 1.25rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Big screens: the whole site grows with the screen. It is drawn at its normal size on a
   1080p monitor and scales up from there (about 1.4 times on a 1440p monitor, double on 4K),
   held back by whichever of the screen's width or height runs out first. */
@media (min-width: 1500px) and (min-height: 800px) {
  html { font-size: clamp(100%, min(0.86vw, 1.72vh), 200%); }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
strong { font-weight: 600; }
img { max-width: 100%; }
:focus-visible { outline: 0.1875rem solid var(--mint); outline-offset: 0.1875rem; }

.wrap {
  max-width: 96rem;
  margin: 0 auto;
  padding-block: 0 4.5rem;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: screen-in 0.18s ease both;
}
@keyframes screen-in { from { opacity: 0; } }
/* A game on a phone or tablet: one comfortable column. */
.wrap.game { max-width: 33.75rem; padding-top: 0.75rem; }
.stack { display: flex; flex-direction: column; gap: 0.75rem; }
.narrow { width: 100%; max-width: 35rem; margin-inline: auto; }
.offscreen { position: fixed; left: -9999px; top: 0; }

/* ---------- type ---------- */
h1 { font-family: var(--font-display); font-size: 2.5rem; font-weight: 700; line-height: 1.02; letter-spacing: 0.005em; text-wrap: balance; }
.display { font-size: clamp(3.125rem, 14vw, 3.625rem); font-weight: 800; line-height: 0.94; letter-spacing: -0.005em; text-transform: uppercase; }
.section-title, .side-title { font-family: var(--font-display); font-size: clamp(2.125rem, 8vw, 3.25rem); font-weight: 700; line-height: 1; text-wrap: balance; }
.side-title { font-size: 1.75rem; }
.headline { font-family: var(--font-display); font-size: clamp(2.75rem, 12vw, 3.75rem); font-weight: 800; line-height: 0.96; text-transform: uppercase; text-wrap: balance; overflow-wrap: anywhere; }
.lead { font-size: 1.1875rem; font-weight: 600; line-height: 1.3; }
.note { color: var(--muted); font-size: 0.9375rem; line-height: 1.45; }
.eyebrow { color: var(--coral); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.14em; line-height: 1.3; text-transform: uppercase; }
.error { color: var(--alert); font-size: 0.9375rem; font-weight: 600; }
.banner { padding: 0.75rem 1rem; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 500; }
.banner.motion { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 0.75rem; }
.sign { font-family: var(--font-display); font-weight: 800; line-height: 0.95; letter-spacing: 0.01em; text-transform: uppercase; }
.sign.red { color: var(--coral); }
.sign.blue { color: var(--mint); }
.points { display: flex; flex-direction: column; gap: 0.625rem; }
.points li { position: relative; padding-left: 1.375rem; }
.points li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 0.5rem; height: 0.5rem; background: var(--coral); border-radius: 50%; }

/* ---------- surfaces and controls ---------- */
.card { padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

.btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 3.375rem;
  padding: 0.75rem 1.375rem;
  background: var(--raised);
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}
.btn.primary { background: var(--coral); color: var(--coral-ink); border-color: var(--coral); font-weight: 700; }
.btn.primary:hover { background: var(--coral-hover); border-color: var(--coral-hover); }
.btn.ghost { background: transparent; border-color: var(--muted); }
.btn.ghost:hover { border-color: var(--ink); background: var(--raised); }
.btn.small { width: auto; min-height: 3rem; padding: 0.5rem 1rem; font-size: 0.9375rem; }
.link {
  appearance: none;
  -webkit-appearance: none;
  align-self: flex-start;
  min-height: 3rem;
  padding: 0.625rem 0.25rem;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.25rem;
  cursor: pointer;
}
.link:hover { color: var(--ink); }

.field { display: flex; flex-direction: column; gap: 0.375rem; }
.field > span { color: var(--muted); font-size: 0.875rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.input {
  width: 100%;
  min-height: 3.375rem;
  padding: 0.875rem 1rem;
  background: var(--bg);
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 1.125rem;
  font-weight: 500;
}
.input:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 0.1875rem rgba(185, 228, 213, 0.25); }
.input::placeholder { color: var(--muted); font-weight: 400; opacity: 0.7; }
textarea.input { display: block; min-height: 6.75rem; resize: none; line-height: 1.35; }
.input.code { font-family: var(--font-display); font-size: 2.125rem; font-weight: 700; letter-spacing: 0.3em; text-align: center; text-transform: uppercase; }
.counter { font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.tag {
  flex: none;
  padding: 0.1875rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}
.tag.hot { border-color: var(--coral); color: var(--coral); }
.tag.gold { border-color: var(--mint); color: var(--mint); }

.seg { display: flex; padding: 0.25rem; gap: 0.25rem; background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--radius-sm); }
.seg button {
  appearance: none;
  -webkit-appearance: none;
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.875rem;
  padding: 0.5rem 0.375rem;
  background: transparent;
  border: 0;
  border-radius: 0.625rem;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.15;
  cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* On/off switches that say what they are: "Mic on", "Sound off". */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.15;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.chip::before { content: ""; flex: none; width: 0.5625rem; height: 0.5625rem; border: 1.5px solid var(--muted); border-radius: 50%; }
.chip[aria-pressed="true"] { color: var(--ink); border-color: var(--ok); }
.chip[aria-pressed="true"]::before { background: var(--ok); border-color: var(--ok); }

details.more { border: 1px solid var(--line); border-radius: var(--radius-sm); }
details.more > summary { min-height: 3rem; padding: 0.75rem 1rem; color: var(--muted); font-size: 0.9375rem; font-weight: 600; cursor: pointer; }
details.more > .stack { padding: 0.25rem 1rem 1rem; }

/* ---------- brand and site frame ---------- */
.brand { display: inline-flex; align-items: center; gap: 0.75rem; color: var(--ink); }
.brand-mark { display: block; width: 2.5rem; height: 2.5rem; color: var(--coral); }
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-word { font-family: var(--font-display); font-size: 2.125rem; font-weight: 800; letter-spacing: 0.03em; line-height: 1; text-transform: uppercase; white-space: nowrap; }
.brand.small .brand-mark { width: 1.875rem; height: 1.875rem; }
.brand.small .brand-word { font-size: 1.5rem; }
.age-mark { flex: none; padding: 0.25rem 0.5rem; border: 1.5px solid var(--muted); border-radius: 0.5rem; color: var(--muted); font-size: 0.8125rem; font-weight: 700; line-height: 1.1; }

.site { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 1.25rem; min-height: 4.5rem; border-bottom: 1px solid var(--line); }
.site-brand { appearance: none; -webkit-appearance: none; padding: 0.375rem 0.25rem; background: none; border: 0; border-radius: 0.625rem; cursor: pointer; }
.site-nav { display: none; flex: 1 1 auto; gap: 0.25rem; }
.nav-link {
  appearance: none;
  -webkit-appearance: none;
  min-height: 3rem;
  padding: 0.625rem 0.875rem;
  background: none;
  border: 0;
  border-radius: 0.625rem;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--ink); }
.site-side { display: flex; align-items: center; gap: 0.75rem; }
.site-side .btn { min-height: 3rem; padding-inline: 0.875rem; white-space: nowrap; }
@media (max-width: 420px) {
  .site { gap: 0.5rem; }
  .site-side { gap: 0.5rem; }
  .site .brand { gap: 0.5rem; }
  .site .brand.small .brand-word { font-size: 1.3125rem; }
  .site .brand.small .brand-mark { width: 1.625rem; height: 1.625rem; }
}

/* ---------- front page ---------- */
.hero { position: relative; display: flex; flex-direction: column; gap: 1.25rem; }
.hero-media { position: relative; height: 13.75rem; overflow: hidden; background: var(--surface); border-radius: var(--radius); }
.hero-art { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 72% center; }
/* The moving version of the same picture fades in over the still once it is really playing. */
.hero-clip { opacity: 0; transition: opacity 0.5s ease; }
.hero-clip.rolling { opacity: 1; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 0.875rem; }
.hero-sub { max-width: 30em; color: var(--muted); font-size: 1.1875rem; line-height: 1.4; }
.hero-actions { display: flex; flex-direction: column; gap: 0.625rem; width: 100%; padding-top: 0.375rem; }
.hero-meta { color: var(--muted); font-size: 0.875rem; font-weight: 500; }
.hero-panel { display: none; }

.section { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 3rem; scroll-margin-top: 1.25rem; }
.feature { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.feature-art { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 3 / 2; }
.feature-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.feature-art figcaption { position: absolute; left: 0.75rem; bottom: 0.75rem; padding: 0.25rem 0.625rem; background: var(--scrim); border-radius: 0.5rem; color: var(--ink); font-size: 0.75rem; font-weight: 500; }
.feature-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; }
.feature-name { font-family: var(--font-display); font-size: clamp(2.75rem, 11vw, 4rem); font-weight: 800; line-height: 0.95; text-transform: uppercase; }
.feature-line { font-size: 1.3125rem; font-weight: 600; line-height: 1.3; }
.facts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.facts li { padding: 0.375rem 0.75rem; border: 1px solid var(--line); border-radius: 0.625rem; color: var(--muted); font-size: 0.875rem; font-weight: 600; }
.feature-copy .btn { width: auto; min-width: 11.25rem; }

.how { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--line); }
.how-item { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); gap: 0.25rem 0.875rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.how-no { grid-row: span 2; font-family: var(--font-display); font-size: 2.75rem; font-weight: 800; line-height: 0.9; color: var(--coral); }
.how-item h3 { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; line-height: 1.05; }
.how-item p { color: var(--muted); }

.rooms-cta { padding: 1.75rem 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.rooms-cta-copy { display: flex; flex-direction: column; gap: 0.5rem; }
.rooms-cta-actions { display: flex; flex-direction: column; gap: 0.625rem; }

.foot { display: flex; flex-direction: column; align-items: flex-start; gap: 0.625rem; margin-top: 3rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.foot-top { display: flex; align-items: center; gap: 0.875rem; }

.gate { display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem; width: 100%; max-width: 35rem; margin: 0 auto; padding-top: 12vh; }

/* ---------- public rooms list, and the name and camera step ---------- */
.tables-cols { display: flex; flex-direction: column; gap: 1.5rem; padding-top: 1.5rem; }
.tables { display: flex; flex-direction: column; gap: 0.625rem; }
.table-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 1rem 1.125rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.table-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.table-name { font-family: var(--font-display); font-size: 1.625rem; font-weight: 700; line-height: 1.1; overflow-wrap: anywhere; }
.table-row .btn { flex: none; }
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; padding: 1.5rem; border: 1px dashed var(--line); border-radius: var(--radius); }

.setup { margin-top: 1.5rem; }
/* On a computer the camera gets its own half, big enough to check how you look. */
.setup.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; gap: 2.5rem; width: 100%; max-width: 65rem; margin-inline: auto; padding: 2.25rem; }
.setup-back { width: 100%; max-width: 65rem; margin-inline: auto; }
.setup-cam .cam-card { flex-direction: column; align-items: stretch; gap: 0.875rem; padding: 0.875rem; }
.setup-cam .cam-view { width: 100%; }
.setup-cam .cam-view .av.mon { --s: 9.375rem; aspect-ratio: 4 / 3; }
.setup-cam .cam-side { align-items: stretch; }
.setup-cam .cam-buttons { flex-direction: row; flex-wrap: wrap; align-items: center; }
.cam-card { display: flex; align-items: center; gap: 1rem; padding: 0.875rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.cam-view { flex: none; width: 8rem; line-height: 0; }
.cam-view .av.mon { --s: 6rem; }
.cam-side { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; min-width: 0; }
.cam-side > .eyebrow { color: var(--muted); letter-spacing: 0.08em; }
.cam-buttons { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
/* The real camera plays in a speck-sized hidden video so its pictures can be copied out. */
.cam-source { position: fixed; left: 0; top: 0; width: 2px; height: 2px; opacity: 0.01; pointer-events: none; }
@media (max-width: 360px) { .cam-card { flex-direction: column; align-items: flex-start; } }

/* ---------- faces ---------- */
.av {
  --s: 2.75rem;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--s);
  height: var(--s);
  background: var(--raised);
  border: 2px solid var(--line);
  border-radius: 50%;
  line-height: 0;
}
.av.cam { border-color: var(--muted); }
.av.xs { --s: 1.5rem; border-width: 1px; }
.av.sm { --s: 2.125rem; }
.av.md { --s: 3.5rem; }
.av.lg { --s: 4.5rem; }
.av.xl { --s: 7.75rem; }
.av.tilt { transform: rotate(-4deg); }
/* A camera picture fills its face. Until the first picture arrives, the initial shows through. */
.av > .feed, .av > img, .av > video.live { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
/* The smooth picture: real video straight from that player's device, laid over the slower
   fallback picture once its first frame has arrived. */
.av > video.live { opacity: 0; }
.av > video.live.rolling { opacity: 1; }
.av > video.live.mirror { transform: scaleX(-1); }
.av.lost > .feed { filter: grayscale(1) brightness(0.5); }
.av.lost > video.live { opacity: 0; }
/* No camera: the player's initial. The same name always gets the same color. */
.av-letter { font-family: var(--font-display); font-size: calc(var(--s) * 0.56); font-weight: 700; line-height: 1; text-transform: uppercase; }
.av-letter.n0 { color: var(--coral); }
.av-letter.n1 { color: var(--mint); }
.av-letter.n2 { color: var(--ink); }
.av-letter.n3 { color: var(--amber); }
.av-letter.n4 { color: var(--steel); }

/* A camera frame in the room: a calm rounded square. */
.av.mon { --s: 5.25rem; width: 100%; height: auto; aspect-ratio: 1; border-radius: 1rem; }
.av.mon > .feed, .av.mon > video.live { border-radius: 0.875rem; }
/* Small, truthful status text on a picture. */
.rec, .stamp {
  position: absolute;
  z-index: 2;
  padding: 0.25rem 0.5rem;
  background: var(--scrim);
  border-radius: 0.5rem;
  color: var(--ink);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}
.rec { left: 0.375rem; top: 0.375rem; display: inline-flex; align-items: center; gap: 0.3125rem; }
.rec::before { content: ""; width: 0.4375rem; height: 0.4375rem; background: var(--ok); border-radius: 50%; }
.av.lost > .rec { display: none; }
.av.mon.lost::after, .av.snap.lost::after {
  content: "Reconnecting";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  padding: 0.3125rem 0.625rem;
  background: var(--scrim);
  border-radius: 0.5rem;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.av.poked { z-index: 2; animation: nudge 0.5s ease; }
.av.poked::after {
  content: "Poke";
  position: absolute;
  top: -0.625rem;
  right: -0.875rem;
  left: auto;
  padding: 0.1875rem 0.5rem;
  background: var(--mint);
  color: var(--mint-ink);
  border-radius: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: none;
}
@keyframes nudge { 25% { transform: translateX(-0.25rem); } 50% { transform: translateX(0.25rem); } 75% { transform: translateX(-2px); } }

.crowned { position: relative; display: inline-block; line-height: 0; }
.crown { position: absolute; left: 50%; top: -1.5rem; z-index: 1; width: 2.625rem; margin-left: -1.3125rem; transform: rotate(-6deg); animation: crown-drop 0.4s ease both; animation-delay: var(--cd, 0.8s); }
.crown svg { display: block; width: 100%; height: auto; overflow: visible; }
.crown path { fill: var(--amber); stroke: var(--bg); stroke-width: 2; stroke-linejoin: round; }
@keyframes crown-drop { from { opacity: 0; transform: translateY(-1.125rem) rotate(-6deg); } }

/* ---------- in a room: top bar, the room panel, the manage sheet ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 0.625rem; min-height: 3.5rem; border-bottom: 1px solid var(--line); }
.bar.site { min-height: 4.5rem; justify-content: flex-start; gap: 1.25rem; }
.bar.site .bar-main { flex: 1 1 auto; justify-content: center; }
.bar-main { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.625rem; min-width: 0; }
.bar-code { padding: 0.25rem 0.625rem; border: 1.5px solid var(--line); border-radius: 0.5rem; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; letter-spacing: 0.12em; line-height: 1.1; }
.bar-label { font-size: 0.9375rem; font-weight: 600; }
.bar-score { color: var(--mint); font-size: 0.9375rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.bar-offline { font-size: 0.8125rem; font-weight: 600; color: var(--alert); }
.bar .link { align-self: center; flex: none; }
.bar-side { display: flex; flex: none; align-items: center; gap: 0.375rem; }
@media (max-width: 420px) {
  .bar { gap: 0.5rem; }
  .bar-main { gap: 0.25rem 0.5rem; }
  .bar-code { padding: 0.1875rem 0.4375rem; font-size: 1.0625rem; letter-spacing: 0.08em; }
  .bar-label, .bar-score { font-size: 0.875rem; white-space: nowrap; }
}

.side-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.625rem 1rem; }
.side-name { display: flex; align-items: center; gap: 0.625rem; }
.side-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.5rem; }
.side-tools .note { max-width: 22rem; }
.side-tools .btn.small, .side-tools .chip { min-height: 2.75rem; }
.wall { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 0.625rem; }
/* The room on a computer: a gallery of everyone's camera. The page's code works out how many
   across and how big (--cols, --tile), so the pictures are as large as the space allows. */
.side-wall { flex: 1 1 0; min-height: 0; grid-template-columns: repeat(var(--cols, 2), var(--tile, minmax(0, 1fr))); gap: var(--gap, 0.75rem); justify-content: center; align-content: center; overflow: hidden; }
.side-wall .mon-cell { gap: 0; }
.side-wall .mon-btn { border-radius: 1.125rem; }
.side-wall .av.mon { --s: calc(var(--tile, 15rem) * 0.42); aspect-ratio: 4 / 3; border-radius: 1.125rem; background: radial-gradient(120% 100% at 50% 0%, #2C2D31 0%, var(--raised) 62%); }
.side-wall .av.mon > .feed, .side-wall .av.mon > video.live { border-radius: 1rem; }
.side-wall .tile-cap { position: absolute; left: 0.5rem; right: 0.5rem; bottom: 0.5rem; z-index: 2; flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 0.5rem; max-width: none; pointer-events: none; }
.side-wall .tile-who { flex-direction: row; align-items: center; gap: 0.375rem; padding: 0.3125rem 0.5625rem; background: var(--scrim); border-radius: 0.5625rem; }
.side-wall .tile-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
.side-wall .tile-tags { flex: none; flex-wrap: nowrap; }
.side-wall .tile-tags:empty { display: none; }
.side-wall .cell-meta { flex: none; min-height: 0; padding: 0.3125rem 0.5625rem; background: var(--scrim); border-radius: 0.5625rem; color: var(--ink); }
.side-wall .rec { left: 0.625rem; top: 0.625rem; }
.mon-cell.waiting .av.mon { border-color: var(--amber); }
.mon-cell.picked .av.mon { border-color: var(--coral); box-shadow: 0 0 0 0.25rem var(--coral-wash); }
.mon-cell { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.375rem; min-width: 0; text-align: center; }
.mon-cell.enter { animation: rise 0.3s ease both; animation-delay: calc(var(--i, 0) * 50ms); }
.mon-btn { appearance: none; -webkit-appearance: none; display: block; width: 100%; padding: 0; background: none; border: 0; border-radius: 1rem; line-height: 0; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.tile-cap, .tile-who { display: flex; flex-direction: column; align-items: center; gap: 0.375rem; max-width: 100%; min-width: 0; }
.tile-name { max-width: 100%; font-size: 0.9375rem; font-weight: 600; line-height: 1.15; overflow-wrap: anywhere; }
.tile-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem; }
.mon-cell.away .av { opacity: 0.55; }
.cell-meta { min-height: 1.3em; color: var(--muted); font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.3; }
.cell-meta:empty { display: none; }
.mon-cell.done .av.mon { border-color: var(--ok); }

.sheet-back { position: fixed; inset: 0; z-index: 25; display: flex; align-items: flex-end; justify-content: center; background: var(--shade-strong); animation: fade-in 0.15s ease both; }
.sheet {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: min(100%, 35rem);
  max-height: 86vh;
  max-height: 86dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.25rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 1.5rem 1.5rem 0 0;
  animation: sheet-up 0.2s ease both;
}
.sheet-back.settled, .sheet-back.settled .sheet { animation: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 0.625rem; }
.sheet-head .link { align-self: center; }
.roster { display: flex; flex-direction: column; }
.roster-row { display: flex; flex-direction: column; gap: 0.625rem; padding: 0.875rem 0; border-top: 1px solid var(--line); }
.roster-row.first { padding-top: 0; border-top: 0; }
.roster-who { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.625rem; min-width: 0; font-size: 1.0625rem; font-weight: 600; overflow-wrap: anywhere; }
.roster-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes sheet-up { from { opacity: 0; transform: translateY(1.5rem); } }

/* ---------- lobby ---------- */
.share { display: flex; align-items: center; gap: 1.125rem; }
.qr { flex: none; width: 8.25rem; height: 8.25rem; padding: 0.375rem; background: var(--qr-tile); border-radius: 0.75rem; }
.qr svg { display: block; width: 100%; height: 100%; }
.share-text { display: flex; flex-direction: column; align-items: flex-start; gap: 0.375rem; min-width: 0; }
.share-text .note { overflow-wrap: anywhere; }
.share-text .eyebrow { color: var(--muted); }
.codebig { font-family: var(--font-display); font-size: 3.75rem; font-weight: 800; letter-spacing: 0.1em; line-height: 0.95; }
@media (max-width: 380px) { .share { flex-direction: column; align-items: flex-start; } }
.group-label { color: var(--muted); font-size: 0.875rem; font-weight: 600; }
.packs { display: flex; flex-direction: column; gap: 0.5rem; }
.packs ul { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pack { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.5rem 0.375rem 0.75rem; border: 1px dashed var(--line); border-radius: 0.625rem; color: var(--muted); font-size: 0.875rem; font-weight: 500; }
.pack.on { border-style: solid; color: var(--ink); }

/* ---------- rounds ---------- */
.prompt-card { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.375rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.prompt-row { display: flex; align-items: flex-start; gap: 0.875rem; }
.prompt-row .prompt { min-width: 0; }
.prompt { font-family: var(--font-display); font-size: clamp(2rem, 9vw, 2.875rem); font-weight: 700; line-height: 1; text-transform: uppercase; text-wrap: balance; overflow-wrap: anywhere; }
.prompt.small { font-size: 1.625rem; }
.blank { display: inline-block; width: 2.6em; height: 0.12em; margin: 0 0.12em; background: var(--coral); border-radius: 0.1875rem; vertical-align: baseline; }

.felt { padding: 0.875rem 0.625rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem 0.375rem; }
.pick {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.75rem 2px 0.625rem;
  background: none;
  border: 1.5px solid transparent;
  border-radius: 1rem;
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.pick .av { --s: 5rem; }
@media (max-width: 360px) { .pick .av { --s: 68px; } }
.pick:hover { background: var(--raised); }
.pick-name { max-width: 100%; font-size: 0.9375rem; font-weight: 600; line-height: 1.15; overflow-wrap: anywhere; }
.pick.picked { background: var(--coral-wash); border-color: var(--coral); }
.pick.picked .av { border-color: var(--coral); }
.pick.picked .pick-name { color: var(--coral); }

.ballot { display: flex; flex-direction: column; gap: 0.625rem; }
.answer {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.875rem 1.125rem;
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.answer:hover { border-color: var(--muted); }
.answer.picked { background: var(--coral-wash); border-color: var(--coral); }
.answer.mine { background: transparent; border-style: dashed; color: var(--muted); }
.answer-text { min-width: 0; overflow-wrap: anywhere; }

.progress { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.whos { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.who { appearance: none; -webkit-appearance: none; position: relative; padding: 0; background: none; border: 0; border-radius: 50%; line-height: 0; }
button.who { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.who.wait .av { opacity: 0.5; }
.who.done::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 0.75rem; height: 0.75rem; background: var(--ok); border: 2px solid var(--bg); border-radius: 50%; }
.quote { font-size: 1.3125rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }

/* ---------- reveal ---------- */
.stage { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.stage > .sign { font-size: clamp(4rem, 20vw, 6rem); }
.spin { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding: 0.75rem 0 0.25rem; }
.spin-name { min-height: 1.1em; font-family: var(--font-display); font-size: 1.875rem; font-weight: 700; line-height: 1.1; }
.spinning .after { display: none; }
.shrug { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.625rem; }

/* The photo the game takes: an instant print. */
.mugs { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; width: 100%; }
.mug {
  position: relative;
  width: min(100%, 16.25rem);
  margin: 0.375rem 0 0.5rem;
  padding: 0.625rem 0.625rem 0.875rem;
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 0.375rem;
  box-shadow: 0 0.875rem 1.875rem var(--shade-strong);
  transform: rotate(-2deg);
  animation: print-in 0.3s ease both;
}
.mugs.many .mug { width: calc(50% - 0.625rem); padding: 0.5rem 0.5rem 0.625rem; }
.mugs.many .mug:nth-child(even) { transform: rotate(2deg); }
.tape { display: none; }
.mug-photo { position: relative; display: grid; place-items: center; aspect-ratio: 1; overflow: hidden; background: var(--bg); border-radius: 2px; line-height: 0; }
/* The picture on a print: live until the game takes the photo, then the photo itself. */
.av.snap { --s: 9.375rem; width: 100%; height: 100%; background: var(--bg); border: 0; border-radius: 0; }
.mugs.many .av.snap { --s: 5.25rem; }
.stamp { right: 0.5rem; bottom: 0.5rem; font-variant-numeric: tabular-nums; }
.stamp.off { color: var(--muted); }
/* The fuse: a line that burns down to the moment the photo is taken. */
.fuse { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 0.375rem; background: var(--coral); transform-origin: left center; animation: fuse var(--left, 0ms) linear both; }
@keyframes fuse { to { transform: scaleX(0); } }
.mug-board { display: flex; flex-direction: column; gap: 0.1875rem; padding-top: 0.625rem; text-align: center; }
.mug-name { font-family: var(--font-display); font-size: 1.875rem; font-weight: 800; line-height: 1; text-transform: uppercase; overflow-wrap: anywhere; }
.mugs.many .mug-name { font-size: 1.375rem; }
.mug-charge { font-size: 0.875rem; font-weight: 500; line-height: 1.3; color: var(--paper-muted); overflow-wrap: anywhere; }
.mugs.many .mug-charge { font-size: 0.8125rem; }
@keyframes print-in { from { opacity: 0; transform: translateY(-0.75rem) rotate(-2deg); } }
/* A small print of whoever wrote the crowd favorite. */
.snapshot { position: relative; display: grid; place-items: center; width: 7.25rem; height: 7.875rem; overflow: hidden; background: var(--bg); border: 0.375rem solid var(--paper); border-bottom-width: 1rem; border-radius: 0.25rem; box-shadow: 0 0.5rem 1.125rem var(--shade-strong); line-height: 0; transform: rotate(-3deg); }
.snapshot .av.snap { --s: 3.875rem; }
.snapshot .stamp { right: 0.25rem; bottom: 0.25rem; font-size: 0.625rem; padding: 0.1875rem 0.3125rem; }
.snapshot > .rec { left: 0.25rem; top: 0.25rem; font-size: 0.625rem; padding: 0.1875rem 0.3125rem; }
.snapshot .fuse { height: 0.25rem; }

.after > * { animation: rise 0.3s ease both; }
.after > *:nth-child(2) { animation-delay: 0.1s; }
.after > *:nth-child(3) { animation-delay: 0.2s; }
.after > *:nth-child(4) { animation-delay: 0.3s; }
.rise { animation: rise 0.3s ease both; animation-delay: var(--d, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(0.5rem); } }

.rows { display: flex; flex-direction: column; gap: 1rem; }
.row { display: flex; flex-direction: column; gap: 0.5rem; }
.row-top { display: flex; align-items: center; justify-content: space-between; gap: 0.625rem; font-weight: 600; }
.row-who { display: flex; align-items: center; gap: 0.5rem; min-width: 0; overflow-wrap: anywhere; }
.row-count { flex: none; font-variant-numeric: tabular-nums; }
.track { height: 0.625rem; overflow: hidden; background: var(--raised); border-radius: 62.4375rem; }
.fill { width: var(--w, 0%); height: 100%; background: var(--mint); border-radius: 62.4375rem; animation: grow 0.5s ease 0.15s both; }
.row.win .fill { background: var(--coral); }
@keyframes grow { from { width: 0; } }
.row-voters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3125rem; }
.voters { font-size: 0.875rem; color: var(--muted); }
.row-voters .voters { margin-left: 0.25rem; }

.fav { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.375rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.fav > .sign { font-size: 1.5rem; }
.fav-quote { font-size: clamp(1.625rem, 7.5vw, 2.125rem); font-weight: 600; line-height: 1.15; text-wrap: balance; overflow-wrap: anywhere; }
.fav-by { display: flex; align-items: center; gap: 1rem; padding-top: 1.125rem; }
.fav-who { display: flex; flex-direction: column; align-items: flex-start; gap: 0.375rem; min-width: 0; }
.fav-name { font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1; overflow-wrap: anywhere; }
.reveal-answer { display: flex; flex-direction: column; gap: 0.5rem; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.9375rem; font-weight: 500; }
.gain { align-self: flex-start; padding: 0.5rem 0.875rem; background: var(--mint); color: var(--mint-ink); border-radius: 0.625rem; font-weight: 700; }
.gain.none { background: transparent; color: var(--muted); border: 1px solid var(--line); font-weight: 500; }

/* ---------- final screen ---------- */
.awards { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1rem; }
.awards .mug { width: calc(50% - 0.625rem); margin: 0.625rem 0 0.5rem; padding: 0.5rem 0.5rem 0.625rem; animation: rise 0.3s ease both; animation-delay: var(--d, 0s); }
.awards .mug:nth-child(even) { transform: rotate(2deg); }
.awards .av.snap, .album .av.snap { --s: 5.25rem; }
.awards .mug-name, .album .mug-name { font-size: 1.375rem; }
.awards .mug-charge, .album .mug-charge { font-size: 0.8125rem; }
.award-title { color: #B23A28; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; line-height: 1.2; text-transform: uppercase; }
.album { display: flex; gap: 0.875rem; margin: 0 -0.25rem; padding: 0.5rem 0.375rem 1rem; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.album .mug { flex: none; width: 10rem; margin: 0; padding: 0.5rem 0.5rem 0.625rem; transform: rotate(-1.5deg); animation: none; scroll-snap-align: start; }
.album .mug:nth-child(even) { transform: rotate(1.5deg); }
.album .mug-charge { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.album .stamp { right: 0.3125rem; bottom: 0.3125rem; font-size: 0.625rem; padding: 0.1875rem 0.3125rem; }
.print-round { color: var(--paper-muted); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; line-height: 1.3; text-transform: uppercase; }

.podium { display: flex; align-items: flex-end; justify-content: center; gap: 0.625rem; padding-top: 1.875rem; }
.step { display: flex; flex: 1 1 0; flex-direction: column; align-items: center; gap: 0.3125rem; min-width: 0; max-width: 9.375rem; text-align: center; animation: rise 0.35s ease both; animation-delay: var(--d, 0s); }
.step-name { max-width: 100%; font-size: 0.9375rem; font-weight: 600; line-height: 1.15; overflow-wrap: anywhere; }
.step-pts { color: var(--muted); font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.step-block { display: grid; place-items: center; width: 100%; height: 2.75rem; background: var(--raised); color: var(--ink); border: 1px solid var(--line); border-bottom: 0; border-radius: 0.75rem 0.75rem 0 0; font-family: var(--font-display); font-size: 1.875rem; font-weight: 800; line-height: 1; }
.step.p0 .step-block { height: 5.5rem; background: var(--coral); color: var(--coral-ink); border-color: var(--coral); }
.step.p1 .step-block { height: 3.875rem; }

/* The final scores. */
.receipt { display: flex; flex-direction: column; gap: 0.875rem; padding: 1.375rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.9375rem; line-height: 1.4; }
.receipt-head { display: flex; flex-direction: column; gap: 2px; color: var(--muted); }
.receipt-logo { color: var(--ink); font-family: var(--font-display); font-size: 1.75rem; font-weight: 800; letter-spacing: 0.03em; line-height: 1; text-transform: uppercase; }
.rule { width: 100%; margin: 0; border: 0; border-top: 1px solid var(--line); }
.receipt-list { display: flex; flex-direction: column; gap: 0.75rem; }
.receipt-row { display: flex; align-items: baseline; gap: 0.5rem; font-size: 1.0625rem; font-weight: 600; }
.receipt-name { min-width: 0; overflow-wrap: anywhere; }
.receipt-dots { flex: 1 1 0.75rem; min-width: 0.75rem; border-bottom: 1px dotted var(--line); transform: translateY(-0.25rem); }
.receipt-score { flex: none; font-variant-numeric: tabular-nums; }
.receipt-line { padding-left: 1.4em; color: var(--muted); overflow-wrap: anywhere; }
.receipt-total { display: flex; justify-content: space-between; gap: 0.625rem; font-family: var(--font-display); font-size: 1.625rem; font-weight: 700; line-height: 1.1; text-transform: uppercase; }
.receipt-total span:last-child { min-width: 0; color: var(--coral); text-align: right; overflow-wrap: anywhere; }
.receipt-foot { color: var(--muted); }

/* ---------- messages and effects ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.125rem + env(safe-area-inset-bottom, 0px));
  z-index: 35;
  max-width: min(27.5rem, calc(100vw - 2rem));
  padding: 0.75rem 1.125rem;
  background: var(--raised);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 0.625rem 1.5rem var(--shade-strong);
  font-size: 0.9375rem;
  font-weight: 600;
  overflow-wrap: anywhere;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.75rem);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.flash { position: fixed; inset: 0; z-index: 40; background: var(--flash); pointer-events: none; animation: flash 0.4s ease-out both; }
@keyframes flash { from { opacity: 0.85; } to { opacity: 0; } }
.confetti { position: fixed; inset: 0; z-index: 30; width: 100%; height: 100%; pointer-events: none; }

/* ---------- wider screens ---------- */
@media (min-width: 700px) {
  :root { --gutter: 2rem; }
  .hero { min-height: 36.25rem; justify-content: center; overflow: hidden; background: var(--surface); border-radius: 1.5rem; }
  .hero-media { position: absolute; inset: 0; height: auto; border-radius: 0; }
  .hero-art { object-position: right center; }
  /* A strong left-to-right scrim keeps the headline readable over the picture. */
  .hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, var(--bg) 0%, rgba(16, 17, 19, 0.94) 30%, rgba(16, 17, 19, 0.55) 56%, rgba(16, 17, 19, 0) 82%); }
  .hero-copy { position: relative; z-index: 2; max-width: max(47.5rem, 58%); padding: 3.5rem 3rem; gap: 1rem; }
  .hero-actions { flex-direction: row; width: auto; }
  .hero-actions .btn { width: auto; min-width: 11.875rem; }
  .hero-panel { position: absolute; right: 1.75rem; bottom: 1.75rem; z-index: 2; display: flex; flex-direction: column; gap: 0.25rem; width: 16.25rem; padding: 1rem 1.125rem; background: var(--scrim); border: 1px solid var(--line); border-radius: 1rem; -webkit-backdrop-filter: blur(0.625rem); backdrop-filter: blur(0.625rem); }
  .hero-panel-name { font-family: var(--font-display); font-size: 1.875rem; font-weight: 800; line-height: 1; text-transform: uppercase; }
  .section { margin-top: 4rem; }
  .feature { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; gap: 3rem; }
  .how { grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
  .how-item { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 0.5rem; padding: 1.75rem 1.75rem 1.75rem 0; border-bottom: 0; }
  .how-item + .how-item { padding-left: 1.75rem; border-left: 1px solid var(--line); }
  .how-no { grid-row: auto; }
  .rooms-cta { flex-direction: row; align-items: center; justify-content: space-between; gap: 2rem; padding: 2.25rem 2.5rem; }
  .rooms-cta-copy { flex: 1 1 auto; min-width: 0; }
  .rooms-cta-actions { flex: none; }
  .rooms-cta-actions .btn { width: auto; min-width: 12.5rem; }
}
/* Tablets: the picture sits closer behind the words, so the words keep to the dark side. */
@media (min-width: 700px) and (max-width: 939px) {
  .hero::before { background: linear-gradient(90deg, var(--bg) 0%, rgba(16, 17, 19, 0.95) 42%, rgba(16, 17, 19, 0.6) 68%, rgba(16, 17, 19, 0.1) 100%); }
  .hero-sub { max-width: 23em; }
}
/* The page links need room beside the name and the Join button. */
@media (min-width: 820px) {
  .site-nav { display: flex; }
}
@media (min-width: 940px) {
  .display { font-size: clamp(4.75rem, 6.6vw, 7.5rem); }
  .rooms-cta-actions { flex-direction: row; }
  .tables-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; gap: 2.5rem; }
  /* A game on a computer uses the whole window: the game on the left, and the room (everyone's
     cameras) filling the rest. The room stays put while the game column scrolls. */
  .wrap.wide { max-width: 140rem; }
  .wrap.wide > .bar, .wrap.wide > .cols { position: relative; z-index: 1; }
  .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(22rem, 44%); align-items: start; gap: 1.5rem; padding-top: 1.5rem; }
  .col-main { display: flex; flex-direction: column; gap: 1.25rem; width: 100%; max-width: 45rem; min-width: 0; justify-self: center; }
  .col-side { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: 0.875rem; height: calc(100vh - 7.5rem); height: calc(100dvh - 7.5rem); min-height: 26.25rem; padding: 1.125rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
  .wide .mugs:not(.many) .mug { width: min(100%, 19rem); }
  .wide .mugs:not(.many) .av.snap { --s: 11.25rem; }
  .wide .stage > .sign { font-size: 6.5rem; }
  .wide .picks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sheet-back { align-items: center; }
  .sheet { max-height: 86vh; border-bottom: 1px solid var(--line); border-radius: 1.5rem; }
}

@media (min-width: 1200px) {
  .cols { grid-template-columns: minmax(26rem, 5fr) minmax(0, 7fr); gap: 2rem; }
}
@media (min-width: 1500px) {
  .hero { min-height: clamp(36.25rem, min(36vw, 62vh), 50rem); }
  .hero-copy { padding: 4rem clamp(3rem, 4.5vw, 6rem); }
  .hero-sub { font-size: 1.375rem; }
  .hero-panel { right: 2.5rem; bottom: 2.5rem; width: 18.75rem; }
  .section { margin-top: 5.5rem; }
  .section-title { font-size: 4rem; }
  .feature { gap: 4.5rem; }
  .feature-name { font-size: 5.5rem; }
  .feature-line { font-size: 1.5rem; }
  .how-item { padding-top: 2.25rem; padding-bottom: 2.25rem; }
}

/* Behind a game on a computer: Codex's picture of the lounge, sharp, under a dark scrim that
   is heaviest on the left where the game's words are. It sits behind the whole page. */
#app { position: relative; z-index: 1; }
.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bg); pointer-events: none; }
.backdrop img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: right center; }
.backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16, 17, 19, 0.84) 0%, rgba(16, 17, 19, 0.7) 42%, rgba(16, 17, 19, 0.58) 100%); }

/* "calm" is set on the page when animations are turned off. It starts out matching the
   device's own less-motion setting, and the player can switch it either way. */
.calm .btn, .calm .toast { transition: none; }
.calm .wrap, .calm .fill, .calm .mon-cell.enter, .calm .mug, .calm .after > *, .calm .rise, .calm .crown, .calm .step,
.calm .av.poked, .calm .sheet-back, .calm .sheet { animation: none; }
.calm .fuse { display: none; }
.side-tools .error, .side-tools .banner { flex-basis: 100%; text-align: right; }
/* On a computer the button that moves the game along stays in reach at the bottom of the
   window, however long the screen above it is. */
@media (min-width: 940px) {
  .wide [data-dyn="next"]:has(.btn) { position: sticky; bottom: 1rem; z-index: 3; }
  .wide [data-dyn="next"]:has(.btn) .btn { box-shadow: 0 0.625rem 1.5rem var(--shade-strong); }
}
/* Small pictures in the gallery keep the name and drop the tags. */
.side-wall .mon-cell { container-type: inline-size; }
@container (max-width: 15rem) {
  .side-wall .tile-tags { display: none; }
  .side-wall .cell-meta, .side-wall .tile-who { padding: 0.25rem 0.4375rem; font-size: 0.75rem; }
  .side-wall .tile-name { font-size: 0.8125rem; }
}

/* ---------- round 2 (Codex's direction): the game as an event ---------- */
/* The room panel lets a little of the lounge through. */
.col-side { background: rgba(25, 26, 29, 0.86); -webkit-backdrop-filter: blur(1rem); backdrop-filter: blur(1rem); }

/* A camera that is off: a seat in the lounge, with the player's initial as a small badge. */
.av > .seat-art { filter: brightness(0.86); }
.av.seated .av-letter { position: relative; z-index: 1; display: grid; place-items: center; width: 1.9em; height: 1.9em; padding-top: 0.04em; background: var(--paper); color: var(--paper-ink); border-radius: 50%; box-shadow: 0 0 0 0.12em var(--coral), 0 0.3em 0.9em var(--shade-strong); font-size: calc(var(--s) * 0.3); }
/* The badge only says who it is. The seat is the picture. */
.av.mon.seated .av-letter { font-size: min(calc(var(--s) * 0.23), 2.375rem); box-shadow: 0 0 0 0.1875rem var(--coral), 0 0.3em 0.9em var(--shade-strong); }
.wall:not(.side-wall) .av.mon.seated .av-letter { font-size: calc(var(--s) * 0.26); box-shadow: 0 0 0 2px var(--coral), 0 0.3em 0.9em var(--shade-strong); }
.rec.off { color: var(--muted); }
.rec.off::before { display: none; }
.wall:not(.side-wall) .rec.off { display: none; }

/* The invite card's picture. */
.poster { height: 9.5rem; margin: -1.5rem -1.5rem 0.25rem; overflow: hidden; background: var(--raised); border-radius: var(--radius) var(--radius) 0 0; }
.poster img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }

/* The question: warm paper, charcoal type, a coral rail, and a big quiet round number. */
.prompt-card { position: relative; overflow: hidden; padding: 1.5rem 1.5rem 1.625rem 2.125rem; background: var(--paper); color: var(--paper-ink); border: 0; }
.prompt-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0.5rem; background: var(--coral); }
.prompt-card .eyebrow { position: relative; padding-right: 5rem; color: #A93421; }
.prompt-card .prompt, .prompt-card .prompt-row { position: relative; }
.prompt-card .av { border-color: rgba(27, 27, 29, 0.3); }
.round-no { position: absolute; right: 1rem; top: 0.375rem; color: rgba(27, 27, 29, 0.13); font-family: var(--font-display); font-size: 4.75rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; pointer-events: none; }

/* A choice that is locked in says so with a check, not just a color. */
.pick { position: relative; }
.pick.picked::after, .answer.picked::after { content: "\2713"; display: grid; place-items: center; flex: none; width: 1.5rem; height: 1.5rem; background: var(--coral); color: var(--coral-ink); border-radius: 50%; font-size: 0.9375rem; font-weight: 700; line-height: 1; }
.pick.picked::after { position: absolute; right: 0.5rem; top: 0.5rem; }
.segs { display: flex; gap: 0.25rem; width: 100%; max-width: 22rem; }
.segs span { flex: 1 1 0; height: 0.4375rem; background: var(--raised); border: 1px solid var(--line); border-radius: 999px; }
.segs span.on { background: var(--ok); border-color: var(--ok); }
.locked { padding: 0.375rem 0.75rem; background: var(--mint); color: var(--mint-ink); border-radius: 0.625rem; font-size: 0.875rem; font-weight: 700; }

/* The verdict: a rubber stamp, set at an angle beside the photo. */
.stage > .sign { padding: 0.07em 0.3em 0; border: 0.075em double var(--coral); border-radius: 0.1em; letter-spacing: 0.03em; transform: rotate(-4deg); }
.track { height: 0.875rem; }
.mug .print-round { padding-top: 0.125rem; }

/* The crowd favorite: the winning line on paper, the rest as quiet rows. */
.fav { background: var(--paper); color: var(--paper-ink); border: 0; }
.fav > .sign.blue { color: #A93421; }
.fav .voters, .fav .tag { color: var(--paper-muted); }
.fav .tag { border-color: rgba(27, 27, 29, 0.22); }
.fav .snapshot { box-shadow: 0 0 0 1px rgba(27, 27, 29, 0.16), 0 0.5rem 1.125rem rgba(0, 0, 0, 0.28); }
.reveal-answer { gap: 0.375rem; padding: 0.875rem 1.25rem; }
.reveal-answer .quote { font-size: 1.125rem; }

@media (min-width: 1500px) {
  .wide .stage { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 2.5rem; }
  .wide .stage > .sign { font-size: 5.25rem; }
  .wide .stage > .mugs:not(.many) { flex: 0 1 auto; width: auto; }
  .wide .stage .mugs:not(.many) .mug { width: 19rem; }
}
@container (max-width: 15rem) {
  .side-wall .rec { padding: 0.1875rem 0.375rem; font-size: 0.625rem; }
}

/* The slow clip of the room, over the still, and the two one-time light effects. */
.backdrop video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: right center; opacity: 0; transition: opacity 0.6s ease; }
.backdrop video.rolling { opacity: 1; }
.stage, .fav, .col-main, .wrap.game { position: relative; }
.fx { position: absolute; z-index: 4; display: block; object-fit: cover; pointer-events: none; }
/* On a phone the effects stay inside the game column, so they can never widen the page. On a
   computer they may spill a little past it. */
.fx-flash { left: 0; top: 0; width: 100%; height: 100%; opacity: 0.45; }
.fx-winner { left: 0; top: 0; width: 100%; aspect-ratio: 16 / 9; }
.wide .fx-flash { left: -8%; top: -6%; width: 116%; height: 112%; }
.wide .fx-winner { left: -6%; width: 112%; }

/* A full room in a small window: the pictures keep a readable size and the gallery scrolls. */
.side-wall.scrolls { align-content: start; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
/* On small pictures each label gets its own corner, so nothing covers the name or the badge:
   the name bottom-left, the score top-right. "Thinking" and "done" are the frame's color there. */
@container (max-width: 15rem) {
  .side-wall .tile-cap { position: static; }
  .side-wall .tile-who, .side-wall .cell-meta { position: absolute; z-index: 2; pointer-events: none; }
  .side-wall .tile-who { left: 0.375rem; bottom: 0.375rem; max-width: calc(100% - 0.75rem); }
  .side-wall .cell-meta { right: 0.375rem; top: 0.375rem; }
  .side-wall .cell-state { display: none; }
  .side-wall .rec { left: 0.375rem; top: 0.375rem; }
}

/* Awards are a side note to the winner: smaller prints, three across where there is room. */
.awards { gap: 0.25rem 0.75rem; }
.awards .mug-name { font-size: 1.125rem; }
.awards .mug-charge { font-size: 0.75rem; }
.wide .awards .mug { width: calc(33.333% - 0.5rem); margin: 0.5rem 0 0.375rem; padding: 0.375rem 0.375rem 0.5rem; }
.awards .rec, .album .rec { left: 0.25rem; top: 0.25rem; padding: 0.1875rem 0.375rem; font-size: 0.625rem; }
