/* v1.13.0 (2026-11-02, owner: make the active judge unmistakable and show larger waiting players): the chooser
   has a centred avatar and message; waiting players grow until the first answer is submitted.
   v1.12.0 (2026-11-02, owner: controls and status for the host's optional local AI voice): compact host audio
   controls fit beside the round timer, and the first-use cache/download notice is readable from the room.
   v1.11.0 (2026-11-02, owner: topic preference chips on waiting player screens): a compact two-column chooser
   allows a player to like/dislike card topics without interrupting a round.
   v1.10.0 (2026-11-02, owner: show player readiness on the host; add a host sound toggle; make the in-game phone's
   Leave room action smaller and more separated): styles for ready/waiting chips, sound control and compact leave.
   v1.9.0 (2026-11-02, owner: Add Fill the Blank): the round board and scoreboard on the big screen; the in-game
   join card is smaller, unoutlined and faded at top right; Close room fades in after host-screen input.
   v1.7.0 (2026-11-02): .emoji-find, the icon search's matches under the box; the card form's .seg/.check are gone
   with the lobby's Make a card.
   v1.6.0 (2026-11-02): the big screen's header is Close room (.back-link, an arrow and words, no outline) | logo |
   spacer; its footer is the players strip (hint above the count, left-aligned) and the join card, bottom right.
   v1.5.0 (2026-11-02, owner: "The container is too grayed out. Also, gray out the cards on the left for games we
   dont have enough players for", the notice removed): .game-card.short greys more lightly; a short .game-item is
   greyscale too (its "Needs N more" no longer red); .notice is gone with the element.
   v1.4.0 (2026-11-02): the block at the end - player avatars, the emoji/colour pickers, the blue Start, the greyed card.
   v1.3.0 (2026-11-02, owner: "The worst answer wins." and anything else in the red "should have the color changed to
   anything but red, yellow, or green"; the "needs more players" notice red, text, background and border; the title
   "front and center, scaling with screen size"; a look-at-phone icon): --accent is violet now (buttons, the brand's
   dash, the code tiles, the tagline, focus rings). Red survives only as --danger, for the needs-more notice and
   the other "no": a bad code, a kick, an error toast. .logo is the big centred title (vw-scaled with clamp), the
   host header is three columns around it. .phone-icon / .look-phone / .use-phone draw the look-at-your-phone
   icon, its banner and its inline hint; .make-lead is the leader's crown.
   v1.2.0 (2026-11-02): the start screen (.hero, .btn.alt), the game menu shared by both screens (.menu: .game-list
   on the left, .game-card on the right, stacked on a narrow phone; .game-item.short greys a game the room cannot
   play yet), the phone roster (.roster), the legal footer (.site-foot), and the big screen's header join card
   (.join-card: code + small QR, top right at all times) over the menu and a players strip.
   v1.1.0 (2026-11-02): the phone's card form - textarea, the Question/Answer switch (.seg) and the share box (.check).
   v1.0.0 (2026-11-02) - da-party.css: the look of dead-ass.com's party pages - the big screen (host.html) and the
   phone controller (index.html). One dark theme on purpose: the big screen is a TV in a dim room, and the phones
   should read as the same game. Sizes on the big screen are in vw/vh so it reads from the couch at any resolution. */

:root {
  color-scheme: dark;
  --bg: #0d0b14;
  --bg-2: #171425;
  --panel: #1f1b30;
  --line: #2f2947;
  --fg: #f5f3ff;
  --muted: #a49cc2;
  --accent: #8b5cf6;
  --accent-shadow: #5b21b6;
  --danger: #ff4d6d;
  --accent-2: #ffb703;
  --good: #06d6a0;
  --radius: 18px;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(1200px 700px at 15% -10%, #2a1740 0%, transparent 60%),
              radial-gradient(900px 600px at 110% 110%, #102a4a 0%, transparent 55%), var(--bg);
  background-attachment: fixed;
  color: var(--fg);
  font: 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.brand { font-weight: 900; letter-spacing: -0.03em; }
.brand b { color: var(--accent); }

.btn {
  appearance: none; border: 0; cursor: pointer;
  background: var(--accent); color: #fff;
  font-weight: 800; letter-spacing: 0.01em;
  padding: 0.9em 1.4em; border-radius: 999px;
  box-shadow: 0 6px 0 var(--accent-shadow);
  transition: transform .08s ease, box-shadow .08s ease, opacity .15s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--accent-shadow); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: 0 6px 0 var(--accent-shadow); }
.btn.ghost { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:active { transform: none; }
.btn.block { display: block; width: 100%; text-align: center; text-decoration: none; }
.btn.alt { background: var(--fg); color: var(--bg); box-shadow: 0 6px 0 #8e86b0; }
.btn.alt:active { box-shadow: 0 2px 0 #8e86b0; }
a.btn { display: inline-block; text-decoration: none; }

.status-dot { display: inline-block; width: .6em; height: .6em; border-radius: 50%; background: var(--muted); margin-right: .45em; vertical-align: middle; }
.status-dot.live { background: var(--good); }
.status-dot.off { background: var(--accent-2); }

/* ---------------------------------------------------------------- phone */

.phone { max-width: 28rem; margin: 0 auto; padding: 20px 16px 40px; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.phone header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.phone header .brand { font-size: 1.35rem; }
.phone header .conn { font-size: .85rem; color: var(--muted); }
.phone main { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.field { display: block; margin-bottom: 18px; }
.field span { display: block; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; background: var(--panel); border: 2px solid var(--line); border-radius: 14px;
  padding: 14px 16px; font-size: 1.25rem; font-weight: 700; outline: none;
}
.field input:focus { border-color: var(--accent); }
.field input.code { font-family: var(--mono); font-size: 2.2rem; letter-spacing: .35em; text-align: center; text-transform: uppercase; padding: 10px 0 10px .35em; }
.field textarea {
  width: 100%; background: var(--panel); border: 2px solid var(--line); border-radius: 14px;
  padding: 14px 16px; font-size: 1.15rem; font-weight: 700; outline: none; resize: vertical; min-height: 6.5em;
}
.field textarea:focus { border-color: var(--accent); }
.hint { min-height: 1.4em; font-size: .9rem; color: var(--muted); margin: -8px 0 16px; }
.hint.ok { color: var(--good); }
.hint.bad { color: var(--danger); }

.card {
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; text-align: center;
}
.you-name { font-size: 2.2rem; font-weight: 900; line-height: 1.1; margin: 8px 0 4px; word-break: break-word; }
.you-sub { color: var(--muted); }
.big-emoji { font-size: 3rem; line-height: 1; }
.stack > * + * { margin-top: 14px; }
.small { font-size: .85rem; color: var(--muted); }
.center { text-align: center; }
.hero { text-align: center; margin-bottom: 20px; }
.logo { font-weight: 900; letter-spacing: -0.04em; line-height: .9; margin: 0; }
.logo b { color: var(--accent); }
.hero .logo { font-size: clamp(3.5rem, 21vw, 11rem); }
.hero-sub { color: var(--muted); margin-top: 12px; font-size: clamp(1.1rem, 5vw, 1.8rem); font-weight: 800; }
#start .btn { font-size: 1.2rem; padding: 1em 1.4em; }

.me { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.me .swatch { width: 14px; height: 14px; border-radius: 50%; background: var(--muted); flex: none; }
.tag { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: .25em .6em; border-radius: 999px; background: var(--accent-2); color: #1a1200; white-space: nowrap; }
.tag.muted { background: var(--line); color: var(--muted); }
.me .tag { margin-left: auto; }

/* the game menu - both screens */
.menu { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 12px; align-items: start; }
.game-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.game-item {
  width: 100%; text-align: left; cursor: pointer; appearance: none;
  background: var(--panel); border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 2px;
}
.game-item .gi-name { font-weight: 900; }
.game-item .gi-meta { font-size: .8rem; color: var(--muted); }
.game-item.on { border-color: var(--fg); background: var(--bg-2); }
.game-item.picked { box-shadow: inset 4px 0 0 var(--accent); }
.game-item.short { opacity: .55; filter: grayscale(1); }
.game-item.short .gi-meta { color: var(--muted); }
.game-item.short.on { opacity: .75; }
.game-card { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.game-name { font-size: 1.4rem; font-weight: 900; letter-spacing: -0.02em; line-height: 1.15; }
.game-tag { color: var(--accent); font-weight: 800; }
.game-blurb { margin: 0; color: var(--fg); font-size: .95rem; }
.game-meta { font-size: .85rem; color: var(--muted); font-weight: 700; }
@media (max-width: 420px) { .phone .menu { grid-template-columns: 1fr; } }

h2.sub { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 22px 0 8px; }
.roster { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.roster-row { display: flex; align-items: center; gap: 10px; background: var(--panel); border-radius: 12px; padding: 8px 10px; font-weight: 700; }
.roster-row.away { opacity: .5; }
.roster-row .swatch { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.roster-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-row .kick { appearance: none; border: 0; background: var(--bg-2); color: var(--muted); cursor: pointer; border-radius: 8px; width: 34px; height: 34px; font-weight: 800; flex: none; }
.roster-row .kick:hover, .roster-row .kick:focus-visible { color: var(--danger); }
.make-lead { appearance: none; border: 0; background: var(--bg-2); cursor: pointer; border-radius: 8px; width: 34px; height: 34px; flex: none; font-size: 1rem; line-height: 1; filter: grayscale(.6); }
.make-lead:hover, .make-lead:focus-visible { filter: none; outline: 2px solid var(--accent); }

/* the look-at-your-phone icon (host.html #phoneIcon), its banner, its inline hint */
.phone-icon { width: 1em; height: 1em; display: inline-block; vertical-align: middle; flex: none; }
.phone-icon .buzz { animation: buzz 1.2s ease-in-out infinite; transform-origin: 50% 50%; }
@keyframes buzz { 0%, 60%, 100% { opacity: .25; } 20%, 40% { opacity: 1; } }
.use-phone { display: inline-flex; align-items: center; gap: .5em; color: var(--fg); }
.use-phone .phone-icon { width: 1.6em; height: 1.6em; color: var(--accent); }
.look-phone {
  position: fixed; left: 50%; bottom: 12vh; transform: translateX(-50%); z-index: 5;
  display: flex; align-items: center; gap: 1.2vw; padding: 1.6vh 2.6vw;
  background: var(--accent); color: #fff; border-radius: 999px; box-shadow: 0 1vh 0 var(--accent-shadow);
  font-weight: 900; font-size: max(1.4rem, 2.6vw); letter-spacing: -0.02em; white-space: nowrap;
  animation: pop .35s cubic-bezier(.3, 1.6, .5, 1);
}
.look-phone .phone-icon { width: 1.6em; height: 1.6em; animation: wiggle 1.2s ease-in-out infinite; }
@keyframes wiggle { 0%, 60%, 100% { transform: rotate(0); } 15% { transform: rotate(-10deg); } 30% { transform: rotate(10deg); } 45% { transform: rotate(-6deg); } }

.site-foot { margin-top: 28px; text-align: center; font-size: .8rem; color: var(--muted); }
.site-foot p { margin: 6px 0; }
.site-foot a { color: var(--fg); }

.toast {
  position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 28rem; margin: 0 auto;
  background: #3a0d18; border: 2px solid var(--danger); color: #fff; border-radius: 14px;
  padding: 12px 16px; font-weight: 700; text-align: center;
}

/* ---------------------------------------------------------------- big screen */

.host { height: 100vh; display: grid; grid-template-rows: auto 1fr auto; padding: 3vh 4vw 2vh; gap: 2.4vh; overflow: hidden; }
.host header { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 2vw; }
.host header .logo { font-size: clamp(2.6rem, 7.5vw, 10rem); text-align: center; }
.host header .conn { color: var(--muted); font-size: max(.9rem, 1vw); }
.head-left { justify-self: start; display: flex; flex-direction: column; gap: .6vh; }
.back-link {
  appearance: none; border: 0; background: none; padding: .2em 0; cursor: pointer;
  color: var(--muted); font-weight: 800; font-size: max(1rem, 1.3vw); display: inline-flex; align-items: center; gap: .45em;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, color .2s ease;
}
.back-link .arrow { font-size: 1.4em; line-height: 1; }
.back-link.visible, .back-link:focus-visible { opacity: .82; pointer-events: auto; }
.back-link:hover, .back-link:focus-visible { color: var(--fg); }

/* the join card: top right, in the menu and during a game */
.join-card {
  display: flex; align-items: center; gap: 1.4vw;
  background: var(--panel); border: 2px solid var(--line); border-radius: calc(var(--radius) * 1.2); padding: 1.2vh 1.2vw;
}
.join-card .jc-text { display: flex; flex-direction: column; align-items: flex-end; gap: 1vh; }
.join-card .how { font-size: max(.9rem, 1.2vw); color: var(--muted); font-weight: 700; }
.join-card .how b { color: var(--fg); }
.room-code { display: flex; gap: .5vw; }
.room-code span {
  font-family: var(--mono); font-weight: 900; font-size: max(1.8rem, 3.6vw); line-height: 1;
  background: var(--bg); border: 3px solid var(--accent); color: var(--fg);
  border-radius: 12px; padding: .1em .2em;
}
.qr { background: #fff; border-radius: 12px; padding: 6px; line-height: 0; }
.qr svg { width: min(13vh, 9vw); height: auto; display: block; }

.menu-stage { display: grid; grid-template-rows: minmax(0, 1fr); gap: 2.4vh; min-height: 0; }
.host-menu { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 2.4vw; align-content: start; min-height: 0; font-size: max(1rem, 1.4vw); }
.host-menu .game-item { padding: 1.4vh 1.2vw; border-radius: 16px; }
.host-menu .game-item .gi-meta { font-size: .7em; }
.host-menu .game-card { padding: 3vh 2.4vw; gap: 1.6vh; min-height: 0; overflow: auto; }
.host-menu .game-name { font-size: 2.2em; }
.host-menu .game-tag { font-size: 1.15em; }
.host-menu .game-blurb { font-size: 1em; line-height: 1.5; }
.host-menu .game-meta { font-size: .8em; }
.host-menu .btn { align-self: flex-start; font-size: 1em; margin-top: 1vh; }

.players-strip { display: flex; flex-direction: column; gap: 1vh; }
.players-strip { flex: 1; min-width: 0; align-self: flex-end; }
.strip-count { color: var(--muted); font-weight: 700; font-size: max(.9rem, 1.1vw); }
.players-strip .use-phone { font-weight: 700; font-size: max(.9rem, 1.1vw); }
.players { display: flex; flex-wrap: wrap; gap: 1vh 1vw; }
.slot {
  border-radius: 999px; display: flex; align-items: center; gap: .6vw; padding: .5vh 1vw;
  font-size: max(.95rem, 1.3vw); font-weight: 800; border: 3px dashed var(--line); color: var(--muted); position: relative;
}
.slot.filled { border-style: solid; color: var(--fg); background: var(--bg-2); animation: pop .35s cubic-bezier(.3, 1.6, .5, 1); }
.slot .swatch { flex: none; width: 1em; height: 1em; border-radius: 50%; }
.slot .nm { white-space: nowrap; max-width: 14em; overflow: hidden; text-overflow: ellipsis; }
.slot .tag { font-size: .55em; }
.slot.away { opacity: .45; }
.slot .kick {
  appearance: none; border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font-size: .8em; padding: .1em .35em; border-radius: 8px; opacity: .35; transition: opacity .15s;
}
.slot:hover .kick, .slot .kick:focus { opacity: 1; }
.slot .kick:hover { color: var(--danger); background: var(--panel); }
.slot .make-lead { width: auto; height: auto; padding: .1em .3em; font-size: .7em; background: transparent; opacity: .45; }
.slot:hover .make-lead, .slot .make-lead:focus { opacity: 1; }

.host footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 2vw; }
.host footer .join-card { margin-left: auto; flex: none; }
.host footer a { color: var(--fg); }
.host footer .btn { font-size: max(.9rem, 1.1vw); padding: .6em 1.2em; }

.stage { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 3vh; }
.stage h2 { font-size: max(2rem, 5vw); margin: 0; font-weight: 900; letter-spacing: -0.03em; }
.stage p { font-size: max(1rem, 1.8vw); color: var(--muted); margin: 0; }

/* v1.8.0: live Fill the Blank round, readable across the room. */
#game { align-items: stretch; justify-content: flex-start; gap: 1.4vh; min-height: 0; overflow: auto; padding: 0 2vw .8vh; }
.round-head { display: flex; justify-content: space-between; align-items: center; gap: 1em; color: var(--muted); font-size: max(1rem, 1.3vw); font-weight: 800; }
.round-timer { font-family: var(--mono); color: var(--accent-2); font-size: 1.1em; white-space: nowrap; }
#game h2 { font-size: clamp(1.8rem, 4vw, 5rem); }
.round-question { margin: 0 auto; width: min(100%, 46em); background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 1.5vh 2vw; font-size: clamp(1.35rem, 3.1vw, 4rem); line-height: 1.2; font-weight: 900; }
.round-question.choosing-question { display: grid; place-items: center; min-height: min(30vh, 18rem); background: transparent; border-color: transparent; padding: 1.5vh 2vw; text-align: center; }
.judge-chooser { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5vh; }
.judge-avatar { width: clamp(4.5rem, 10vw, 8rem); height: clamp(4.5rem, 10vw, 8rem); font-size: clamp(2.8rem, 7vw, 5rem); box-shadow: 0 0 0 5px rgba(139, 92, 246, .25), 0 12px 36px rgba(0, 0, 0, .35); }
.judge-chooser-text { max-width: 16ch; color: var(--fg); font-size: clamp(1.8rem, 4vw, 4rem); line-height: 1.12; font-weight: 900; text-wrap: balance; }
.round-content { width: min(100%, 50em); margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1vh; }
.round-note { color: var(--muted); font-size: max(1rem, 1.5vw); }
.round-waiting { color: var(--accent-2); font-size: max(1rem, 1.5vw); }
.round-readiness { display: flex; flex-wrap: wrap; justify-content: center; gap: .6vh .6vw; width: 100%; }
.readiness-chip { display: flex; align-items: center; gap: .55em; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); padding: .45em .8em; font-size: max(.9rem, 1.05vw); }
.readiness-name { font-weight: 900; }
.readiness-avatar { width: 1.9em; height: 1.9em; font-size: 1em; transition: width .2s ease, height .2s ease, font-size .2s ease; }
.round-readiness.waiting-for-answers .readiness-chip.waiting { gap: .7em; padding: .62em 1em; font-size: clamp(1.1rem, 1.65vw, 1.8rem); }
.round-readiness.waiting-for-answers .readiness-chip.waiting .readiness-avatar { width: 2.45em; height: 2.45em; font-size: 1.2em; }
.round-readiness.has-submission .readiness-chip { gap: .5em; padding: .4em .72em; font-size: max(.85rem, .98vw); }
.round-readiness.has-submission .readiness-avatar { width: 1.65em; height: 1.65em; font-size: .9em; }
.readiness-chip.ready { color: #86efac; border-color: rgba(34, 197, 94, .5); }
.readiness-chip.waiting { color: #fcd34d; border-style: dashed; border-color: rgba(245, 158, 11, .55); }
.readiness-chip.judge { color: var(--accent-2); }
.readiness-state { font-size: .75em; text-transform: uppercase; letter-spacing: .06em; }
.sound-toggle { appearance: none; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); color: var(--muted); cursor: pointer; padding: .45em .8em; font-size: max(.75rem, .9vw); font-weight: 800; white-space: nowrap; }
.sound-toggle[aria-pressed="true"] { color: var(--fg); border-color: var(--accent-2); }
.host-audio-controls { display: flex; align-items: center; gap: .55em; }
.voice-status { width: min(100%, 52em); margin: 0 auto; color: var(--muted); text-align: center; font-size: max(.8rem, .9vw); }
.readout { display: flex; flex-direction: column; gap: 1vh; align-items: center; width: 100%; }
.read-label { color: var(--accent); font-size: max(.9rem, 1.1vw); font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }
.answer-tile { background: var(--bg-2); border: 2px solid var(--line); border-radius: 16px; padding: 1.2vh 1.8vw; font-size: clamp(1.2rem, 2.5vw, 3rem); line-height: 1.2; font-weight: 900; max-width: 100%; }
@media (max-width: 720px) {
  .round-head { flex-wrap: wrap; }
  .host-audio-controls { order: 3; width: 100%; justify-content: center; }
}
.round-scores { display: flex; flex-wrap: wrap; justify-content: center; gap: .7vh .7vw; width: 100%; }
.score-chip { display: flex; align-items: center; gap: .45em; border: 1px solid var(--line); background: var(--bg-2); border-radius: 999px; padding: .35em .7em; font-size: max(.85rem, 1vw); }
.score-chip .avatar { width: 1.5em; height: 1.5em; font-size: .85em; }
.score-name { color: var(--fg); }
.score-value { color: var(--accent-2); font-family: var(--mono); }
.host.in-game .join-card { position: fixed; z-index: 6; top: 1.2rem; right: 1.2rem; transform: scale(.68); transform-origin: top right; opacity: .62; background: transparent; border: 0; box-shadow: none; padding: .2rem; gap: .8vw; }
.host.in-game .join-card .how { font-size: max(.75rem, .85vw); }
.host.in-game .room-code { gap: .25vw; }
.host.in-game .room-code span { font-size: max(1.2rem, 2.1vw); border-width: 2px; border-radius: 8px; }
.host.in-game .qr { padding: 3px; border-radius: 7px; }
.host.in-game .qr svg { width: min(8vh, 5.5vw); }

@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 800px) {
  .host { height: auto; min-height: 100vh; overflow: visible; padding: 16px; }
  .host header { grid-template-columns: 1fr auto; }
  .host header .logo { grid-column: 1 / -1; grid-row: 1; }
  .look-phone { font-size: 1.2rem; padding: 10px 18px; gap: 10px; }
  .host-menu { grid-template-columns: 1fr; }
  .qr svg { width: 96px; }
  .host footer { flex-direction: column; align-items: flex-start; }
  .host.in-game .join-card { top: 10px; right: 10px; transform: scale(.58); }
  #game { padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .slot.filled, .look-phone, .look-phone .phone-icon, .phone-icon .buzz { animation: none; }
  .btn { transition: none; }
}

/* ---------------------------------------------------------------- v1.4.0 (2026-11-02)
   An emoji + one of 16 colours per player (.avatar, the join form's .picker grids); the Start button blue
   (.btn.go), grey when the room is short; the whole game card greyed (.game-card.short) except its red notice;
   Close room as a red ghost button (.btn.ghost.danger). */
:root { --go: #3b82f6; --go-shadow: #1d4ed8; }
.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 1.9em; height: 1.9em; border-radius: 50%;
  font-size: 1em; line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25);
}
.avatar.big { width: 64px; height: 64px; font-size: 34px; }
.me .avatar { width: 34px; height: 34px; font-size: 18px; }
.roster-row .avatar { width: 30px; height: 30px; font-size: 16px; }
.slot .avatar { width: 1.6em; height: 1.6em; font-size: .9em; }

.picker { margin-bottom: 18px; }
.picker-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.picker-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.emoji-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.emoji-opt {
  appearance: none; cursor: pointer; aspect-ratio: 1; border-radius: 12px; padding: 0;
  background: var(--panel); border: 2px solid var(--line); font-size: 1.35rem; line-height: 1;
}
.emoji-opt[aria-checked="true"] { border-color: var(--fg); background: var(--bg-2); }
.emoji-in {
  width: 100%; margin-top: 8px; background: var(--panel); border: 2px solid var(--line); border-radius: 12px;
  padding: 10px 12px; font-size: 1rem; outline: none;
}
.emoji-in:focus { border-color: var(--accent); }
.emoji-in.bad { border-color: var(--danger); }
.emoji-find { margin-top: 8px; }   /* v1.7.0: the search's matches, under the box */
.color-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.color-opt { appearance: none; cursor: pointer; aspect-ratio: 1; border-radius: 50%; border: 3px solid transparent; padding: 0; position: relative; }
.color-opt[aria-checked="true"] { border-color: var(--fg); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--fg); }
.color-opt.taken { opacity: .2; cursor: not-allowed; }
.color-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.btn.go { background: var(--go); box-shadow: 0 6px 0 var(--go-shadow); }
.btn.go:active { box-shadow: 0 2px 0 var(--go-shadow); }
.btn.go:disabled { background: #4b5563; color: #cbd5e1; box-shadow: 0 6px 0 #374151; opacity: 1; }
.btn.ghost.danger { color: #ffb3c1; box-shadow: inset 0 0 0 2px var(--danger); }

.game-card.short { border-color: #33333d; }
.game-card.short > :not(.btn) { filter: grayscale(1); opacity: .75; }

/* v1.9.0: Fill the Blank phone controller. */
.phone #game { width: 100%; align-self: stretch; justify-content: flex-start; gap: 12px; padding-bottom: 24px; }
.phone #game .leave-room { align-self: center; width: auto; min-width: 0; margin-top: 18px; padding: .48em 1em; font-size: .82rem; opacity: .82; }
.phone-round-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; background: var(--bg); color: var(--muted); font-weight: 800; }
#roundClock { color: var(--accent-2); font-family: var(--mono); white-space: nowrap; }
.phone-scores { display: flex; flex-wrap: wrap; gap: 6px; }
.phone-score { display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px 4px 4px; background: var(--bg-2); font-size: .78rem; }
.phone-score .avatar { width: 1.55em; height: 1.55em; font-size: .8em; }
.phone-score.mine { border-color: var(--accent); }
.score-player { max-width: 8em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-total { color: var(--accent-2); font-family: var(--mono); }
.phone-question { padding: 16px; border: 2px solid var(--line); border-radius: 16px; background: var(--panel); font-size: 1.2rem; font-weight: 900; line-height: 1.3; overflow-wrap: anywhere; }
.phone-game-note { margin: 0; color: var(--muted); font-weight: 700; }
.phone-game-action, .phone-game-extra { display: flex; flex-direction: column; gap: 10px; }
.question-choice, .hand-card { appearance: none; width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; background: var(--panel); border: 2px solid var(--line); border-radius: 14px; padding: 14px; }
.question-choice.selected, .hand-card.selected { border-color: var(--accent); background: var(--bg-2); box-shadow: inset 4px 0 0 var(--accent); }
.choice-text, .hand-text { flex: 1; font-weight: 800; overflow-wrap: anywhere; }
.choice-tag { color: var(--accent-2); font-size: .72rem; font-weight: 900; text-transform: uppercase; }
.hand-number { display: grid; place-items: center; width: 1.8em; height: 1.8em; flex: none; background: var(--bg); border-radius: 50%; color: var(--accent-2); font-weight: 900; }
.game-write { display: flex; flex-direction: column; gap: 8px; }
.game-write > span { color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.game-write textarea { width: 100%; min-height: 5.4em; resize: vertical; background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 12px; outline: none; }
.game-write textarea:focus { border-color: var(--accent); }
.share-option { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: .82rem; }
.share-option input { accent-color: var(--accent); margin-top: .25em; }
.answer-option { display: flex; flex-direction: column; gap: 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.answer-label { color: var(--accent-2); font-size: .75rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.phone-answer { min-width: 0; background: var(--panel); border-radius: 12px; padding: 12px; }
.phone-card-text { overflow-wrap: anywhere; font-weight: 800; }
.vote-buttons { display: flex; gap: 8px; margin-top: 10px; }
.vote { appearance: none; flex: 1; cursor: pointer; background: var(--bg-2); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 8px 10px; font-size: .85rem; font-weight: 800; }
.vote.on { color: var(--fg); border-color: var(--accent); background: #35245c; }
.winning-card { border: 2px solid var(--accent-2); }
.phone #gameLobby { margin-top: 10px; }

.interest-panel { width: 100%; align-self: stretch; margin: 4px 0 20px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); }
.interest-panel h2 { margin: 0; font-size: 1rem; }
.interest-panel > p { margin: 5px 0 12px; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.interest-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.interest-topic { display: flex; align-items: center; min-width: 0; gap: 5px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.interest-name { flex: 1; min-width: 0; font-size: .72rem; line-height: 1.2; font-weight: 750; overflow-wrap: anywhere; }
.interest-toggle { appearance: none; flex: none; width: 31px; height: 31px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); color: var(--muted); cursor: pointer; }
.interest-toggle.on.like { color: #041b15; border-color: var(--good); background: var(--good); }
.interest-toggle.on.dislike { color: #2b0710; border-color: var(--danger); background: var(--danger); }
@media (max-width: 420px) {
  .interest-grid { grid-template-columns: 1fr; }
}
