/* Patent Pending: Late Night ’93. A 3 AM infomercial: deep purple, hot pink,
   cyan and yellow, a chrome logo, starbursts and a TV screen for every pitch.
   Drawings sit on white so they look the way they were drawn. */

@font-face {
  font-family: "Bungee";
  src: url("/bungee.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --page: #170630;
  --page-top: #3b1170;
  --surface: #22093f; /* boxes on the page */
  --chip: #3c1d66; /* small buttons and chips */
  --line: #3c1d66;
  --field: #170630;
  --field-line: #5a2d99;
  --text: #ffffff;
  --muted: #c9b8ec;
  --soft: #b9a4e0;
  --pink: #ff2fb3; /* the main accent: main buttons, the clock, "your move" */
  --pink-deep: #e0158f;
  --pink-text: #ff74cf;
  --pink-glow: rgb(255 47 179 / 0.35);
  --cyan: #22e3ff; /* labels, the TV screen's frame, slogans */
  --cyan-glow: rgb(34 227 255 / 0.45);
  --yellow: #ffe14d; /* starbursts and 1st place */
  --ink: #1a0633; /* dark text on yellow and white */
  --silver: #d9dbe6;
  --bronze: #e59a5b;

  --display: "Bungee", "Arial Black", Impact, sans-serif;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--page);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: inherit; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 400 1rem/1.5 var(--font);
  background: radial-gradient(ellipse 130% 520px at 50% -80px, var(--page-top), transparent 75%), var(--page);
}

.masthead, main {
  width: min(36rem, 100% - 2rem);
  margin-inline: auto;
}
.masthead { display: flex; align-items: center; gap: 0.5rem; padding: 0.9rem 0 0.25rem; }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font: 400 1.15rem/1 var(--display);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.wordmark img { display: block; width: 32px; height: 32px; border-radius: 8px; }

.back {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-left: -0.35rem;
  border-radius: 50%;
  color: var(--text);
  flex: none;
}
.back:hover { background: rgb(255 255 255 / 0.08); }
.back:active { background: rgb(255 255 255 / 0.14); }
.chevron {
  width: 0.7rem;
  height: 0.7rem;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  border-radius: 2px;
  transform: translateX(2px) rotate(45deg);
}

main { display: flex; flex-direction: column; gap: 1.1rem; padding: 1.25rem 0 4rem; }

h1, h2 { margin: 0; font-weight: 400; }
h2 { font: 700 1.05rem/1.3 var(--font); }
p { margin: 0; }

/* Big headings: Bungee with a pink drop shadow */
.print {
  font: 400 clamp(1.7rem, 7.5vw, 2.3rem)/1.08 var(--display);
  color: var(--text);
  text-transform: uppercase;
  text-shadow: 3px 3px 0 var(--pink);
  overflow-wrap: anywhere;
}
.print.giant { font-size: clamp(1.9rem, 9vw, 2.6rem); }
.card .print { font-size: clamp(1.5rem, 6.5vw, 1.9rem); }

.intro { display: flex; flex-direction: column; gap: 0.6rem; }
.intro p { font-size: 1.05rem; color: var(--muted); max-width: 31rem; }
.hint, .note { color: var(--muted); font-size: 0.92rem; }
.center { text-align: center; }
.room-label { font: 600 0.95rem/1.3 var(--font); color: var(--muted); overflow-wrap: anywhere; }

/* Small headings: the round in cyan, section names too */
.kicker { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; }
.kicker-label, .section-label {
  align-self: flex-start;
  font: 400 0.82rem/1.3 var(--display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 10px rgb(34 227 255 / 0.5);
}
.dots { display: flex; gap: 5px; align-items: center; flex: none; }
.dots i { width: 20px; height: 4px; border-radius: 2px; background: var(--line); }
.dots i.on { background: var(--pink); }
.eyebrow { font: 700 0.75rem/1.3 var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); }

/* Boxes on the page */
.card, .game {
  position: relative;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  padding: 1.1rem;
}

/* Forms */
.stack { display: flex; flex-direction: column; gap: 1.1rem; }
.stack.tight { gap: 0.6rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.field > label, legend, .label { font-weight: 650; font-size: 0.98rem; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 0.55rem; }

input[type="text"], input[type="number"], input[type="time"], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--field);
  border: 2px solid var(--field-line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
}
/* What players write: bigger and bolder */
#invention, #slogan { font-size: 1.15rem; font-weight: 700; }
::placeholder { color: #8a76b3; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-glow); }

.inline { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.inline input[type="number"] { width: 5.5rem; }
.inline select { width: auto; flex: 1; }

.counter-row { display: flex; justify-content: flex-end; margin-top: -0.7rem; }
.stack.tight > .counter-row { margin-top: -0.4rem; }
.counter { font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--pink-text); font-weight: 700; }

/* On/off settings are toggle switches: the setup page's checkboxes, and
   switchButton() everywhere else. */
.check { display: flex; flex-direction: row-reverse; justify-content: space-between; gap: 0.8rem; align-items: center; font-weight: 650; cursor: pointer; }
.check input[type="checkbox"], .switch {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 48px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: radial-gradient(circle at 14px 50%, #ffffff 0 10px, transparent 10.5px), #4a2a7a;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.15s;
}
.check input[type="checkbox"]:checked, .switch[aria-checked="true"] {
  background: radial-gradient(circle at calc(100% - 14px) 50%, #ffffff 0 10px, transparent 10.5px), var(--pink);
}
.check input[type="checkbox"]:focus-visible, .switch:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.switch:active:not(:disabled) { transform: none; }
.hours-text { font-weight: 500; color: var(--muted); }
.hours input[type="time"] { width: auto; flex: 1; min-width: 7rem; }
.hours label { font-weight: 600; font-size: 0.92rem; }
.notify-row { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; font-weight: 650; padding: 0.9rem 1.1rem; }

/* Buttons. The main action on a screen is a big pink Bungee button. Text is
   always centered, so two buttons side by side line up even when one wraps. */
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font: 650 1rem/1.2 var(--font);
  color: var(--text);
  background: var(--chip);
  border: 0;
  border-radius: 12px;
  padding: 0.8rem 1.25rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: transform 0.08s, filter 0.15s;
}
button:active:not(:disabled), .button:active { transform: scale(0.98); }
button:hover:not(:disabled), .button:hover { filter: brightness(1.12); }
.icon { width: 1.2em; height: 1.2em; flex: none; }
.primary {
  width: 100%;
  background: linear-gradient(180deg, #ff5cc6, var(--pink-deep));
  color: #ffffff;
  font: 400 1.1rem/1.2 var(--display);
  text-transform: uppercase;
  padding: 1rem 1.25rem;
  box-shadow: 0 6px 18px var(--pink-glow);
}
a.button.primary { width: auto; align-self: stretch; }
.danger { background: var(--pink); color: #ffffff; align-self: flex-start; }
button:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; filter: none; }
button:focus-visible, .button:focus-visible, a:focus-visible, [role="button"]:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.button-row { display: flex; gap: 0.8rem; align-items: stretch; }
.button-row > * { flex: 1 1 0; width: auto; min-width: 0; }

/* Rarely used actions (Manage, Rename, Delete, Change hours…) are underlined
   text, so the screens stay light. They're still real buttons. */
.link-btn {
  display: inline;
  align-self: center;
  flex: none;
  padding: 0.2rem 0;
  border-radius: 2px;
  background: none;
  color: var(--text);
  font: 600 0.92rem/1.3 var(--font);
  text-decoration: underline;
  text-decoration-color: var(--pink);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.link-btn:hover:not(:disabled) { filter: none; color: #ffffff; }
.link-btn:active:not(:disabled) { transform: none; }
.link-btn.red { color: var(--pink-text); text-decoration-color: currentColor; }
.link-btn.delete { margin-top: 0.4rem; }

/* Avatars */
.avatar {
  --size: 2.6rem;
  width: var(--size);
  height: var(--size);
  flex: none;
  display: inline-block;
  border: 2px solid #0d0320;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}
.avatar.small { --size: 1.6rem; border-width: 1.5px; border-radius: 5px; }
.px {
  display: block;
  width: 100%;
  height: 100%;
  background-image: url("/avatars.png");
  background-size: 500% 500%;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.55rem; }
.pick { position: relative; cursor: pointer; display: block; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.pick .avatar { width: 100%; height: auto; aspect-ratio: 1; display: block; transition: transform 0.12s, box-shadow 0.12s; }
.pick:hover .avatar { transform: translateY(-2px); }
.pick:has(input:checked) .avatar { transform: translateY(-3px); box-shadow: 0 0 0 3px var(--pink); }
.pick:has(input:focus-visible) .avatar { outline: 3px solid var(--cyan); outline-offset: 2px; }
.pick:has(input:disabled) { cursor: not-allowed; }
.pick:has(input:disabled) .avatar { opacity: 0.3; filter: grayscale(1); }

.seats { display: flex; flex-wrap: wrap; padding-left: 0.4rem; }
.seats .avatar { margin-left: -0.4rem; box-shadow: 0 0 0 3px var(--page); }
.card .seats .avatar { box-shadow: 0 0 0 3px var(--surface); }
.small-seats .avatar { --size: 1.9rem; }

/* People */
.players { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.players li { display: flex; flex-wrap: wrap; gap: 0.4rem 0.65rem; align-items: center; padding: 0.45rem 0.4rem; border-radius: 10px; }
.pname { font-weight: 650; overflow-wrap: anywhere; min-width: 3.5rem; }
.tag { font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.55rem; border-radius: 999px; background: var(--chip); color: var(--muted); white-space: nowrap; }
.tag.done { background: rgb(34 227 255 / 0.14); color: var(--cyan); margin-left: auto; }
.players li.kick-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  align-items: start;
  margin: -0.1rem 0 0.4rem;
  padding: 0.75rem;
  border: 1.5px dashed var(--field-line);
}
.kick-option { display: flex; flex-direction: column; gap: 0.35rem; }
.kick-option button { width: 100%; padding: 0.6rem 0.8rem; font-size: 0.92rem; }
.kick-option .hint { font-size: 0.8rem; }

.invite input { font-size: 0.9rem; }

.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 0; }
.settings dt { font-size: 0.8rem; color: var(--muted); }
.settings dd { margin: 0.1rem 0 0; font-weight: 650; font-size: 0.95rem; line-height: 1.3; }

/* Chips: the clock, waiting notes */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--pink);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}
.pill .dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #ffffff; animation: pulse 1.6s ease-in-out infinite; }
.pill.wait { align-self: stretch; justify-content: center; background: var(--chip); }
.pill.wait .dot { background: var(--pink); }
.pill.on { background: rgb(34 227 255 / 0.14); color: var(--cyan); }
.pill.paused { background: rgb(34 227 255 / 0.14); color: var(--cyan); }
@keyframes pulse { 50% { transform: scale(0.55); opacity: 0.5; } }

/* Your move */
.hero { display: flex; flex-direction: column; gap: 0.8rem; padding: 0.25rem 0; }
.hero-label { font-weight: 650; color: var(--muted); }
.pause-row { padding: 0.7rem 1rem; font-size: 0.95rem; }
.quote { font-weight: 700; color: var(--text); }

/* --- Starbursts ----------------------------------------------------------- */
.burst {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--yellow);
  color: var(--ink);
  font: 400 13px/1.05 var(--display);
  text-transform: uppercase;
  clip-path: polygon(50% 0%, 57.8% 10.3%, 69.1% 3.8%, 72.2% 16.4%, 85.4% 14.6%, 83.6% 27.8%, 96.2% 30.9%, 89.7% 42.2%, 100% 50%, 89.7% 57.8%, 96.2% 69.1%, 83.6% 72.2%, 85.4% 85.4%, 72.2% 83.6%, 69.1% 96.2%, 57.8% 89.7%, 50% 100%, 42.2% 89.7%, 30.9% 96.2%, 27.8% 83.6%, 14.6% 85.4%, 16.4% 72.2%, 3.8% 69.1%, 10.3% 57.8%, 0% 50%, 10.3% 42.2%, 3.8% 30.9%, 16.4% 27.8%, 14.6% 14.6%, 27.8% 16.4%, 30.9% 3.8%, 42.2% 10.3%);
  pointer-events: none;
}
.burst > span { display: flex; flex-direction: column; }
.burst-hero { width: 96px; height: 96px; right: -4px; top: 0; transform: rotate(12deg); font-size: 12px; }
.burst-slide { width: 72px; height: 72px; right: -8px; top: -14px; transform: rotate(-10deg); font-size: 18px; }
.burst-win { width: 82px; height: 82px; right: -26px; top: -22px; transform: rotate(-12deg); font-size: 12px; }

/* --- The home page -------------------------------------------------------- */
.home { position: relative; align-items: center; text-align: center; padding-top: 0.5rem; }
.home p { margin-inline: auto; }
.onair {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  background: var(--yellow);
  color: var(--ink);
  font: 400 0.85rem/1 var(--display);
  text-transform: uppercase;
  transform: skew(-8deg);
  border-radius: 4px;
}
.intro .onair { color: var(--ink); font-size: 0.85rem; }
.logo { margin: 0.3rem 0 0.2rem; line-height: 0.92; }
.logo span {
  display: block;
  font: 400 clamp(2.3rem, 12vw, 3.4rem)/0.95 var(--display);
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, #c7d2ff 45%, #6f5bd6 50%, #ffffff 75%, #b6a8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 var(--pink)) drop-shadow(0 0 14px rgb(255 47 179 / 0.6));
}
.logo span + span { font-size: clamp(2.1rem, 10.5vw, 3rem); }
.intro .tagline { font-size: 1.1rem; color: var(--text); font-weight: 600; }
.demo { width: min(100%, 22rem); align-self: center; }

/* --- Drawings and the drawing pad ----------------------------------------- */
.drawing { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; background: #ffffff; }
.canvas-frame { border-radius: 10px; overflow: hidden; border: 3px solid #ffffff; background: #ffffff; }
.pad-wrap { display: flex; flex-direction: column; gap: 0.7rem; }
.pad { touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.palette { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.4rem; }
.swatch {
  aspect-ratio: 1;
  width: 100%;
  min-width: 0;
  padding: 0;
  border-radius: 50%;
  border: 2px solid #0d0320;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.25);
}
.swatch.eraser { background: #ffffff; position: relative; }
/* A little pink-and-white eraser, tilted like it's mid-rub */
.swatch.eraser::before {
  content: "";
  position: absolute;
  left: 18%;
  top: 33%;
  width: 64%;
  height: 34%;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: linear-gradient(90deg, var(--pink) 0 42%, var(--ink) 42% calc(42% + 1.5px), #ffffff calc(42% + 1.5px));
  transform: rotate(-35deg);
}
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--pink); transform: none; }
.toolrow { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.sizes { display: flex; gap: 0.4rem; }
.size { width: 2.7rem; height: 2.7rem; padding: 0; display: grid; place-items: center; border-radius: 10px; }
.size .dot { display: block; border-radius: 50%; background: #ffffff; }
.size[aria-pressed="true"] { background: var(--pink); }
.bucket .icon { width: 1.35rem; height: 1.35rem; }
.tool { width: 2.7rem; height: 2.7rem; padding: 0; border-radius: 10px; }
.ink { display: flex; align-items: center; gap: 0.6rem; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.ink-bar { flex: 1; height: 0.5rem; border-radius: 999px; background: var(--chip); overflow: hidden; }
.ink-bar span { display: block; height: 100%; background: var(--cyan); }
.ink.low .ink-bar span { background: var(--pink); }

.stage .product { margin-bottom: 0.3rem; }
.backup-banner {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 0.9rem;
  border: 2px dashed var(--cyan);
  border-radius: 12px;
  background: rgb(34 227 255 / 0.1);
  color: #c8f7ff;
  font-size: 0.92rem;
  line-height: 1.4;
}
.backup-title { display: flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1rem; color: var(--cyan); }

/* --- The pitch deck ------------------------------------------------------- */
.product {
  font: 400 clamp(1.35rem, 6vw, 1.65rem)/1.08 var(--display);
  text-transform: uppercase;
  color: var(--text);
  text-shadow: 3px 3px 0 var(--pink);
  overflow-wrap: anywhere;
}
.slide .tv {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.9rem;
  border: 4px solid var(--cyan);
  border-radius: 14px;
  background: #0d0320;
  box-shadow: 0 0 24px var(--cyan-glow);
  overflow: hidden;
}
/* TV scan lines */
.slide .tv::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgb(255 255 255 / 0.05) 0 2px, transparent 2px 4px); pointer-events: none; }
.slide-top { display: flex; justify-content: space-between; gap: 0.6rem; font: 700 0.72rem/1.2 var(--font); letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); }
.live { color: #ff4d6d; white-space: nowrap; }
.slide .product { color: var(--yellow); }
.slide-art { position: relative; }
.slide-art .drawing, .mini-art .drawing { border-radius: 10px; }
.slide .slide-art { overflow: visible; }
.slogan { font: italic 800 1.25rem/1.25 var(--font); color: var(--cyan); overflow-wrap: anywhere; }
.slogan.missing { font-style: normal; font-weight: 650; color: var(--soft); }
.lost {
  display: grid;
  place-items: center;
  gap: 0.4rem;
  aspect-ratio: 4 / 3;
  padding: 1rem;
  border: 3px dashed var(--field-line);
  border-radius: 10px;
  background: repeating-linear-gradient(-45deg, rgb(255 255 255 / 0.03) 0 12px, transparent 12px 24px), #170630;
  text-align: center;
}
.lost p { font: 400 1rem/1.2 var(--display); text-transform: uppercase; color: var(--soft); }
.lost.named { align-content: center; }
.lost .lost-name { font: 700 1.1rem/1.3 var(--font); text-transform: none; color: var(--text); }

.deck { display: flex; flex-direction: column; gap: 0.8rem; }
.deck > .link-btn { align-self: center; }
.deck-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.round { width: 2.9rem; height: 2.9rem; padding: 0; border-radius: 50%; flex: none; }
.deck-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.deck-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--soft); opacity: 0.4; }
.deck-dots i.on { width: 22px; border-radius: 4px; background: var(--pink); opacity: 1; }
/* Full screen: the deck covers the page */
.deck.full {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow-y: auto;
  padding: calc(env(safe-area-inset-top, 0px) + 3.6rem) max(1rem, calc((100% - 44rem) / 2)) calc(env(safe-area-inset-bottom, 0px) + 1.5rem);
  background: #0d0320;
}
.deck.full .close { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 0.6rem); right: 1rem; }

/* Votes */
.vote-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.vote { padding: 0.75rem 0.4rem; gap: 0.45rem; }
.vote[aria-pressed="true"] { color: var(--ink); }
.vote.v1[aria-pressed="true"] { background: var(--yellow); box-shadow: 0 0 18px rgb(255 225 77 / 0.6); }
.vote.v2[aria-pressed="true"] { background: var(--silver); }
.vote.v3[aria-pressed="true"] { background: var(--bronze); }
.medal {
  display: inline-grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font: 400 0.7rem/1 var(--display);
}
.medal.m1 { background: var(--yellow); }
.medal.m2 { background: var(--silver); }
.medal.m3 { background: var(--bronze); }
.vote-note { text-align: center; font-weight: 650; color: var(--muted); padding: 0.6rem; border-radius: 12px; background: var(--surface); }
.my-votes ol { list-style: none; margin: 0.4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.my-votes li { display: flex; align-items: center; gap: 0.6rem; }
.my-votes .voted { font-weight: 700; overflow-wrap: anywhere; }
.my-votes .open { color: var(--muted); }

/* Results */
.winner { display: flex; flex-direction: column; gap: 0.7rem; border: 3px solid var(--yellow); box-shadow: 0 0 30px rgb(255 225 77 / 0.25); }
.winner.none { border-color: var(--line); box-shadow: none; }
.winner .eyebrow { color: var(--yellow); }
.winner-one { display: flex; flex-direction: column; gap: 0.6rem; }
.winner-one + .winner-one { padding-top: 0.9rem; border-top: 1.5px dashed var(--line); }
.mini-art { position: relative; width: min(100%, 17rem); align-self: center; }
.credits { font-size: 0.9rem; color: var(--muted); line-height: 1.45; }
.credits b, .extra-by b { color: var(--text); }
.points { font-size: 0.9rem; color: var(--muted); }
.points b { color: var(--yellow); }
.slide-credits { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.8rem 1rem; }
.board { display: flex; flex-direction: column; padding: 0.4rem 1rem; }
.board .row { display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0; }
.board .row + .row { border-top: 1px solid var(--line); }
.rank { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; flex: none; border-radius: 50%; background: var(--cyan); color: var(--ink); font: 400 0.85rem/1 var(--display); }
.who { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.pts { font-weight: 800; white-space: nowrap; }
.more {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.1rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--pink), #7a2cff);
  text-align: center;
}
.more-title { font: 400 clamp(1.6rem, 7vw, 2rem)/1 var(--display); text-transform: uppercase; color: var(--yellow); text-shadow: 3px 3px 0 #4a0f7a; }
.extras { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.8rem; margin-top: 0.3rem; text-align: left; }
.extra { display: flex; flex-direction: column; gap: 0.45rem; padding: 0.7rem; border-radius: 12px; background: rgb(13 3 32 / 0.55); }
.extra .mini-art { width: 100%; }
.extra .slogan { font-size: 1.02rem; color: var(--cyan); }
.extra-by { font-size: 0.85rem; color: #f2e6ff; overflow-wrap: anywhere; }

/* Room codes */
.code-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
  padding: 0.9rem 1rem;
  border: 2px dashed var(--field-line);
  border-radius: 14px;
}
.code-card .label { flex-basis: 100%; font-size: 0.85rem; color: var(--muted); }
.code {
  font: 400 clamp(1.5rem, 7.5vw, 2rem)/1 var(--display);
  letter-spacing: 0.04em;
  color: var(--yellow);
  white-space: nowrap;
  user-select: all;
  -webkit-user-select: all;
}
.code-card button { margin-left: auto; }

.join-row { display: flex; gap: 0.6rem; }
.join-row input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 0.04em; }
.join-row input::placeholder { text-transform: none; letter-spacing: 0; }

.steps { margin: 0; padding-left: 1.4rem; display: flex; flex-direction: column; gap: 0.55rem; }
.steps li { padding-left: 0.25rem; }
.steps li::marker { font-weight: 800; color: var(--cyan); }

/* Your games */
.game {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  text-decoration: none;
  transition: transform 0.08s;
}
.game:active { transform: scale(0.99); }
.game.mine { box-shadow: 0 0 0 2px var(--pink); }
.game-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 0.6rem; }
.game-title { flex: 1 1 9rem; min-width: 0; font: 700 1.1rem/1.25 var(--font); overflow-wrap: break-word; }
.game-status { color: var(--muted); font-size: 0.92rem; font-weight: 500; }
.game-status.hot { color: var(--pink-text); font-weight: 700; font-size: 1rem; }
.game .pill { padding: 0.2rem 0.6rem; font-size: 0.8rem; flex: 0 1 auto; max-width: 100%; }

.notify:empty { display: none; }
.notify { display: flex; flex-direction: column; gap: 0.4rem; }

.message { display: flex; flex-direction: column; gap: 1rem; }
.message p { color: var(--muted); font-size: 1.05rem; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 1rem);
  width: max-content;
  max-width: calc(100% - 2rem);
  background: var(--text);
  color: var(--ink);
  padding: 0.75rem 1.15rem;
  border-radius: 14px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 30;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast:empty { display: none; }

.noscript { padding: 2rem; text-align: center; }
[hidden] { display: none !important; }

@media (max-width: 380px) {
  .settings, .players li.kick-choices { grid-template-columns: 1fr; }
  .burst-hero { width: 76px; height: 76px; right: -12px; top: -12px; font-size: 9.5px; }
}
/* While the deck is full screen, the page behind it stays put. */
body:has(.deck.full) { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.countdown-me { font-size: clamp(1.6rem, 7.5vw, 2.2rem); }
.manage .recovery { grid-column: 1 / -1; }
.manage .code { font-size: clamp(1.3rem, 6.5vw, 1.7rem); }

/* Finished games fold away under their heading on "Your games". */
.finished > summary { display: inline-flex; width: max-content; align-items: center; gap: 0.45rem; padding: 0.5rem 0; cursor: pointer; list-style: none; }
.finished > summary::-webkit-details-marker { display: none; }
.finished > summary::after { content: '▸'; display: inline-block; color: var(--muted); transition: transform 0.15s; }
.finished[open] > summary::after { transform: rotate(90deg); }

/* A recovery code typed into the home page's room-code box gets a quiet nod. */
#join-code.found { border-color: var(--cyan); box-shadow: 0 0 0 2px var(--cyan-glow); }
.code-detected { font-size: 0.88rem; font-weight: 600; color: var(--cyan); }

/* The room page while waiting: a status box, the players, the creator's tools
   and your settings, each as a box with a small heading. */
.status-card { gap: 0.75rem; }
.status-card .pill.clock { align-self: stretch; }
.status-count { font-weight: 650; }
.status-foot { display: flex; flex-direction: column; gap: 0.35rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.status-foot p { margin: 0; font-size: 0.92rem; color: var(--muted); }
.group-label { margin: 0.5rem 0 -0.45rem 0.2rem; }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin: 0.5rem 0.2rem -0.45rem; }
.group-head .group-label { margin: 0; }
.only-you { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.players-card { padding: 0.5rem 0.75rem; }
.rows { padding: 0.2rem 1.1rem; display: flex; flex-direction: column; }
.mrow { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.85rem 0; }
.mrow[hidden] { display: none; }
.mrow + .mrow { border-top: 1px solid var(--line); }
.mrow-text { min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.mrow-title { margin: 0; font-weight: 650; }
.mrow-icon { display: none; }
.mrow-sub { margin: 0; font-size: 0.85rem; color: var(--muted); }
.mrow-control:empty { display: none; }
.danger-row .mrow-title { color: var(--pink-text); }

/* The lobby: game settings as label/value rows, and the rename form opens
   across the whole Creator tools row. */
.lobby-status .seats { margin: 0.2rem 0 0.4rem; }
.settings-card { padding: 0.2rem 1.1rem 0.9rem; }
.settings-card .settings { display: flex; flex-direction: column; gap: 0; }
.settings-card .settings div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.75rem 0; }
.settings-card .settings div + div { border-top: 1px solid var(--line); }
.settings-card .settings dt { font-size: 0.9rem; flex: none; }
.settings-card .settings dd { margin: 0; text-align: right; }
.votes-note { padding-top: 0.75rem; border-top: 1px solid var(--line); }
.mrow.editing { flex-wrap: wrap; }
.mrow.editing > :last-child { flex-basis: 100%; display: flex; flex-direction: column; gap: 0.4rem; }

.players .remove { margin-left: auto; }
.players li .tag.done + .remove { margin-left: 0.7rem; }
.quiet .link-btn { align-self: flex-start; }

/* "The creator changed the time limit…" under the clock. */
.limit-note { margin: 0; font-size: 0.9rem; color: var(--muted); }
