/* ==========================================================================
   Doodlebop — Sketchbook, the default skin
   ========================================================================== */
/* Color tokens. Light is the default; dark redefines them below. js/theme.js sets
   <html data-skin="…" data-theme="light|dark"> from the player's choice (Studio page:
   skin saved as db_skin, Light / Dark / System as db_theme, shape tweaks as db_shape).
   Other skins live in css/skins.css and redefine these same tokens.
   The blocks also match any [data-skin] element, so a preview tile in the Studio can
   show a skin of its own whatever the page is wearing. */
:root,
[data-skin],
.mafia-stage,
.bomb-stage {
  color-scheme: light;
  --ink: #221d33;          /* text and icons */
  --ink-soft: #4a4360;
  --muted: #635b78;
  --edge: #221d33;         /* outlines and offset shadows */
  --on-accent: #221d33;    /* text/icons on the bright fills below, both themes */
  --paper: #fff4dd;        /* page background */
  --paper-2: #ffe9c2;
  --card: #fffdf8;
  --field: #fff;           /* inputs */
  --raised: #fff;          /* small buttons: tools, pills */
  --line: #e9dcc0;
  --dots: rgba(34, 29, 51, 0.13);
  --zebra: rgba(34, 29, 51, 0.04);
  --chip: rgba(34, 29, 51, 0.12);
  --inverse: #221d33;      /* toast */
  --on-inverse: #fff;
  /* bright fills (same in both themes) */
  --coral: #ff6a55;
  --coral-d: #e2483a;
  --sun: #ffc83a;
  --mint: #29c999;
  --sky: #4d8dff;
  --grape: #8e5cff;
  /* tints behind text */
  --mint-l: #d6f7ea;
  --sky-l: #e2ecff;
  --rose-l: #ffe1dc;
  --sun-l: #fff1c4;
  --rose-l2: #ffd6cf;
  --grape-l: #ece3ff;
  --ink-l: #e8e4f2;
  /* accent colors used as text */
  --coral-t: #b52f25;
  --mint-t: #0f7a5a;
  --sky-t: #2563d9;
  --grape-t: #7140e0;
  --sun-t: #7a5800;
  /* Clue Crew cards */
  --k-coral: #ffd9d2;
  --k-mint: #d3f6e8;
  --k-neutral: #f4ead6;
  --k-neutral-edge: #c9b48a;
  --k-neutral-rev: #dccaa5;
  --k-neutral-rev-ink: #352f48;
  --k-trap: #3a334d;
  --k-trap-edge: #000;
  --k-trap-rev: #221d33;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23221d33' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Every skin's dark block must set every token this one sets (test/skins.test.js checks),
   or these Sketchbook values would show through. */
:root[data-theme='dark'],
[data-skin][data-theme='dark'] {
  color-scheme: dark;
  --ink: #f3eefe;
  --ink-soft: #cfc6e4;
  --muted: #a69cc0;
  --edge: #07050c;
  --paper: #17141f;
  --paper-2: #2a2438;
  --card: #221d30;
  --field: #15121d;
  --raised: #2e2842;
  --line: #3a3350;
  --dots: rgba(255, 255, 255, 0.07);
  --zebra: rgba(255, 255, 255, 0.04);
  --chip: rgba(255, 255, 255, 0.12);
  --inverse: #f3eefe;
  --on-inverse: #221d33;
  --mint-l: #173d33;
  --sky-l: #1c2a4a;
  --rose-l: #45211f;
  --sun-l: #3d3218;
  --rose-l2: #4a2420;
  --grape-l: #2e2350;
  --ink-l: #2c2740;
  --coral-t: #ff8f7f;
  --mint-t: #4fe0b0;
  --sky-t: #8fb6ff;
  --grape-t: #b99bff;
  --sun-t: #ffd36b;
  --k-coral: #4a2420;
  --k-mint: #173d33;
  --k-neutral: #332c22;
  --k-neutral-edge: #8a7a58;
  --k-neutral-rev: #5a4f3b;
  --k-neutral-rev-ink: #f1e6cc;
  --k-trap: #050308;
  --k-trap-edge: #a69cc0;
  --k-trap-rev: #050308;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23f3eefe' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Shape and the few colour roles a skin may move around. Declared on every [data-skin]
   element too, so tokens built from other tokens (var(--mint), var(--pop)) work out
   inside a preview tile from that tile's own skin. */
:root,
[data-skin] {
  /* Shape: multipliers on the corner radii, outline widths and "sticker" shadows written
     throughout this file, e.g. border-radius: calc(12px * var(--round)). */
  --round: 1;
  --lw: 1;
  --pop: 1;
  --radius: calc(14px * var(--round));
  --bw: calc(2.5px * var(--lw));
  --shadow: 0 calc(3px * var(--pop)) 0 var(--edge);
  --shadow-lg: calc(5px * var(--pop)) calc(5px * var(--pop)) 0 var(--edge);
  --font-display: 'Fredoka', 'Baloo 2', 'Trebuchet MS', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* Buttons: Play / main action, the second action, the warm one. */
  --go: var(--mint);
  --on-go: var(--on-accent);
  --alt: var(--sky);
  --on-alt: var(--on-accent);
  --warm: var(--sun);
  --on-warm: var(--on-accent);
  /* The logo: its two colours, the squiggle under it, and how much sticker it gets. */
  --logo-1: var(--coral);
  --logo-2: var(--sun);
  --logo-line: var(--sky);
  --logo-stroke: 3px;
  --logo-shadow: 4px;
  --logo-tilt: -3deg;
  --logo-tilt-b: 5deg;
  --logo-lift-b: -3px;
  --logo-track: -1px;
  --squiggle: block;
}

:root {
  /* Inside Discord's mobile app, Discord gives the safe areas around its own controls. */
  --safe-b: var(--discord-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --safe-t: var(--discord-safe-area-inset-top, env(safe-area-inset-top, 0px));
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  overflow: hidden;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 1px 1px, var(--dots) 1.2px, transparent 1.6px);
  background-size: 22px 22px;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-user-select: none; user-select: none; }
/* Game screens are for tapping, not reading: a quick double tap on a card, a seat or a title
   mustn't select text, because selected text opens the browser's own look-up / search panel
   (which can fail with "tap to retry" and push the page around). Chat and text boxes stay
   selectable. */
#screen-game { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#screen-game input, #screen-game textarea, #screen-game [contenteditable], #screen-game .chat-log { -webkit-user-select: text; user-select: text; }
#screen-game .chat-log { -webkit-touch-callout: default; }
svg { display: block; }
.hidden { display: none !important; }

#app {
  position: relative;
  width: 100%;
  height: var(--app-h, 100dvh);
  overflow: hidden;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
}
.screen.active { display: flex; flex-direction: column; }

/* ------------------------------------------------------------ shared bits */
.card {
  background: var(--card);
  border: var(--bw) solid var(--edge);
  border-radius: calc(20px * var(--round));
  box-shadow: var(--shadow-lg);
}

.btn {
  display: block;
  width: 100%;
  border: var(--bw) solid var(--edge);
  border-radius: calc(14px * var(--round));
  padding: 12px 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.3px;
  box-shadow: var(--shadow);
  transition: transform 0.06s, box-shadow 0.06s, filter 0.15s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--edge); }
.btn:disabled { filter: grayscale(0.8); opacity: 0.6; cursor: not-allowed; }
.btn-go { background: var(--go); }
.btn-alt { background: var(--alt); }
.btn-warm { background: var(--warm); }
.btn-plain { background: var(--card); }
.btn-danger { background: var(--coral); }
.btn-big { font-size: 26px; padding: 12px 16px; }

/* Bright fills (sun, mint, sky, coral) keep dark text and icons in both themes. */
.btn-danger, .dice-btn, .how-num, .call-count, body.in-voice #btn-call,
.choice-btn:nth-child(3n+1), .pod-block, .tool.active, .size-cell.active, .cat-chip, .cc-team.won,
.cc-card.rev.k-coral, .cc-card.rev.k-mint, .crew-go, #btn-crew-pass.picked, .m.guessed, .m.q-msg.selected,
.bomb-banner, .bomb-letters span.got, .bomb-go, .send-btn, .conn-banner, .mf-skip.picked,
.relay-dice, .relay-go, .relay-done, .rl-next, .rl-react.mine, .rl-chip.mine {
  --ink: var(--on-accent);
  color: var(--on-accent);
}
/* The three main buttons take their text colour from the skin (dark on bright, light on deep). */
.btn-go { --ink: var(--on-go); color: var(--on-go); }
.btn-alt { --ink: var(--on-alt); color: var(--on-alt); }
.btn-warm { --ink: var(--on-warm); color: var(--on-warm); }

.input {
  width: 100%;
  border: var(--bw) solid var(--edge);
  border-radius: calc(12px * var(--round));
  padding: 11px 14px;
  font-size: 17px;
  font-weight: 800;
  background: var(--field);
  outline: none;
  -webkit-user-select: text;
  user-select: text;
}
.input:focus { box-shadow: 0 0 0 4px rgba(77, 141, 255, 0.28); }

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: var(--bw) solid var(--edge);
  border-radius: calc(11px * var(--round));
  background: var(--card);
  box-shadow: 0 calc(2px * var(--pop)) 0 var(--edge);
  padding: 0;
}
.icon-btn:active { transform: translateY(2px); box-shadow: none; }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* =================================================================== HOME */
.home-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(18px + var(--safe-t)) 16px calc(28px + var(--safe-b));
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-wrap { text-align: center; margin: 6px 0 16px; }
.logo {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 15vw, 76px);
  line-height: 1;
  color: var(--logo-1);
  -webkit-text-stroke: var(--logo-stroke) var(--edge);
  paint-order: stroke fill;
  text-shadow: var(--logo-shadow) var(--logo-shadow) 0 var(--edge);
  transform: rotate(var(--logo-tilt));
  letter-spacing: var(--logo-track);
}
.logo-b { color: var(--logo-2); display: inline-block; transform: rotate(var(--logo-tilt-b)) translateY(var(--logo-lift-b)); margin-left: 2px; }
.logo-squiggle { display: var(--squiggle); width: min(260px, 70vw); height: 22px; margin: 4px auto 0; }
.logo-squiggle path { fill: none; stroke: var(--logo-line); stroke-width: 5; stroke-linecap: round; }
.tagline { margin: 6px 0 0; font-size: 15px; color: var(--ink-soft); font-weight: 800; }

.home-card {
  width: 100%;
  max-width: 400px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.install-btn { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 17px; }
.install-btn.hidden { display: none; }
.install-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ios-steps { list-style: none; margin: 4px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ios-steps li { display: flex; align-items: center; gap: 12px; font-size: 15px; line-height: 1.35; }
.ios-steps .how-num { width: 30px; height: 30px; font-size: 16px; }
.ios-steps svg { display: inline-block; width: 20px; height: 20px; vertical-align: -4px; fill: none; stroke: var(--sky); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.field-label { font-family: var(--font-display); font-weight: 600; font-size: 15px; margin-bottom: -6px; }

.room-banner {
  background: var(--sun-l);
  border: 2px dashed var(--edge);
  border-radius: calc(12px * var(--round));
  padding: 8px 12px;
  text-align: center;
  font-weight: 900;
  font-size: 14px;
}

.avatar-editor {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 0 4px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: calc(16px * var(--round));
}
.av-col { display: flex; flex-direction: column; gap: 6px; }
.arrow {
  width: 40px;
  height: 30px;
  border: calc(2px * var(--lw)) solid var(--edge);
  border-radius: calc(9px * var(--round));
  background: var(--card);
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
  padding: 0 0 4px;
  box-shadow: 0 calc(2px * var(--pop)) 0 var(--edge);
}
.arrow:active { transform: translateY(2px); box-shadow: none; }
.av-preview { width: 132px; height: 132px; }
.av-preview svg { width: 100%; height: 100%; }
.av-mid { position: relative; }
.dice-btn {
  position: absolute;
  bottom: 0;
  right: -4px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: calc(2px * var(--lw)) solid var(--edge);
  border-radius: calc(9px * var(--round));
  background: var(--sun);
  box-shadow: 0 calc(2px * var(--pop)) 0 var(--edge);
  display: grid;
  place-items: center;
}
.dice-btn:active { transform: translateY(2px) rotate(20deg); box-shadow: none; }
.dice-btn svg { width: 22px; height: 22px; }
.dice-btn rect { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.dice-btn circle { fill: var(--ink); }

.how { width: 100%; max-width: 400px; margin-top: 22px; }
.how h2 { font-family: var(--font-display); font-weight: 600; font-size: 22px; margin: 0 0 10px; text-align: center; }
.how-steps { display: flex; flex-direction: column; gap: 10px; }
.how-step {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: calc(2px * var(--lw)) solid var(--edge);
  border-radius: calc(14px * var(--round));
  padding: 10px 12px;
  box-shadow: calc(3px * var(--pop)) calc(3px * var(--pop)) 0 var(--edge);
}
.how-step:nth-child(2) { transform: rotate(0.6deg); }
.how-step:nth-child(3) { transform: rotate(-0.5deg); }
.how-step p { margin: 0; font-size: 14px; line-height: 1.35; }
.how-num {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: calc(2px * var(--lw)) solid var(--edge);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  background: var(--sun);
}
.how-step:nth-child(2) .how-num { background: var(--mint); }
.how-step:nth-child(3) .how-num { background: var(--coral); }
.footnote { font-size: 12px; color: var(--muted); margin: 18px 0 0; text-align: center; }

/* =================================================================== GAME */
.g-header {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: calc(48px + var(--safe-t));
  padding: calc(6px + var(--safe-t)) 8px 4px;
  max-width: 100%;
}
.g-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
  color: var(--logo-1);
  -webkit-text-stroke: calc(var(--logo-stroke) * 2 / 3) var(--edge);
  paint-order: stroke fill;
  text-shadow: calc(var(--logo-shadow) / 2) calc(var(--logo-shadow) / 2) 0 var(--edge);
  transform: rotate(calc(var(--logo-tilt) * 2 / 3));
  letter-spacing: var(--logo-track);
  margin-left: 2px;
}
.g-brand span { color: var(--logo-2); }
.g-header-right { flex: none; margin-left: auto; display: flex; gap: 6px; }
/* Small phones: the buttons (leave, invite, voice, mic, speaker) always fit at full size;
   the logo shrinks, and clips at worst, to make room. */
.g-header .icon-btn { flex: none; }
.g-brand { min-width: 0; overflow: hidden; white-space: nowrap; padding: 2px 3px 4px 0; font-size: clamp(17px, 6vw, 24px); }
@media (max-width: 360px) {
  .g-header { gap: 6px; }
  .g-header-right { gap: 4px; }
  .g-brand { font-size: 17px; }
}
#btn-call { position: relative; }
body.in-voice #btn-call { background: var(--mint); }
.call-count {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: calc(9px * var(--round));
  border: calc(2px * var(--lw)) solid var(--edge);
  background: var(--mint);
  font-size: 11px;
  font-weight: 900;
  line-height: 14px;
  text-align: center;
}
#btn-mic .mic-off { display: none; }
body.mic-muted #btn-mic { background: var(--rose-l); }
body.mic-muted #btn-mic .mic-on { display: none; }
body.mic-muted #btn-mic .mic-off { display: block; stroke: var(--coral-t); }
/* Night in Mafia, for everyone but the Mafia and a Detective team: voice is off, whatever the mic says. */
body.voice-silent #btn-mic { background: var(--grape-l); opacity: 0.75; }
body.voice-silent #btn-mic .mic-on { display: none; }
body.voice-silent #btn-mic .mic-off { display: block; stroke: var(--grape); }
/* Clue Crew: talking to their team only */
.pl-vteam { font-size: 11px; line-height: 1; }
/* Clue Crew: 🎙️ Talk to Everyone / My team */
.cc-voice { flex: none; display: flex; align-items: center; justify-content: center; gap: 6px; margin: 2px auto 4px; padding: 3px; border: calc(2px * var(--lw)) solid var(--edge); border-radius: 999px; background: var(--card); box-shadow: 0 calc(2px * var(--pop)) 0 var(--edge); }
.cc-voice-lbl { padding: 0 4px 0 8px; font-size: 12px; font-weight: 900; color: var(--muted); white-space: nowrap; }
.cc-voice button { padding: 4px 11px; border: 0; border-radius: 999px; background: none; color: var(--ink-soft); font: 800 12.5px/1.2 var(--font-body, inherit); white-space: nowrap; cursor: pointer; }
.cc-voice button.on { background: var(--sky-l); color: var(--ink); box-shadow: inset 0 0 0 2px var(--edge); }
.cc-voice.coral button.on[data-ccv="team"] { background: var(--rose-l); }
.cc-voice.mint button.on[data-ccv="team"] { background: var(--mint-l); }
#btn-sound .snd-off { display: none; }
body.muted #btn-sound .snd-on { display: none; }
body.muted #btn-sound .snd-off { display: block; }

.g-main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 41%) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "center center" "players chat";
  gap: 6px;
  padding: 0 6px calc(6px + var(--safe-b));
}
.g-center { grid-area: center; display: flex; flex-direction: column; min-width: 0; position: relative; }
.g-players { grid-area: players; }
.g-chat { grid-area: chat; }

/* -------------------------------------------------------------- top bar */
.g-topbar {
  flex: none;
  height: 46px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 4px;
  background: var(--card);
  border: var(--bw) solid var(--edge);
  border-radius: calc(12px * var(--round)) calc(12px * var(--round)) 0 0;
  border-bottom: none;
}
.timer { position: relative; width: 40px; height: 40px; }
.timer svg { width: 40px; height: 40px; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 5; }
.t-bg { stroke: var(--paper-2); fill: var(--field) !important; }
.t-fg { stroke: var(--sky); stroke-linecap: round; stroke-dasharray: 100.53; stroke-dashoffset: 0; transition: stroke-dashoffset 0.25s linear; }
#timer-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
}
.timer.urgent .t-fg { stroke: var(--coral); }
.timer.urgent #timer-num { color: var(--coral-t); animation: pulse 1s infinite; }
.timer.idle .t-fg { stroke: transparent; }
.timer.idle { opacity: 0.35; }
@keyframes pulse { 50% { transform: scale(1.18); } }

.hint {
  text-align: center;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  line-height: 1.05;
}
.hint .hint-label { display: block; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.hint .hint-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 3px;
  white-space: pre;
}
.hint .hint-word.reveal { color: var(--mint-t); letter-spacing: 1px; }
.hint .hint-word.draw { color: var(--sky-t); letter-spacing: 1px; }
.hint .hint-len { font-size: 11px; font-weight: 900; color: var(--muted); vertical-align: super; margin-left: 2px; letter-spacing: 0; }
.hint.small .hint-word { font-size: 16px; letter-spacing: 2px; }
.hint.tiny .hint-word { font-size: 13px; letter-spacing: 1px; }
.round { font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--ink-soft); white-space: nowrap; text-align: right; }

/* ---------------------------------------------------------------- stage */
.stage-wrap {
  flex: none;
  display: flex;
  justify-content: center;
  background: var(--card);
  border-left: var(--bw) solid var(--edge);
  border-right: var(--bw) solid var(--edge);
}
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #fff;
  overflow: hidden;
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
}
#board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
body.can-draw #board { cursor: crosshair; }
body.can-draw.tool-fill #board { cursor: cell; }

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(34, 29, 51, 0.85);
  color: #fff;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 3;
}
.overlay.show { opacity: 1; pointer-events: auto; }
.ov-body { width: 100%; max-height: 100%; overflow-y: auto; animation: pop 0.35s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(0.7); opacity: 0; } }
.ov-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 6vw, 34px);
  margin: 0 0 4px;
  text-shadow: 0 3px 0 rgba(0,0,0,.35);
}
.ov-sub { font-size: clamp(13px, 3.6vw, 16px); opacity: 0.9; margin: 0 0 10px; }
.ov-word { color: var(--sun); }
.ov-choices { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 6px; }
.choice-btn {
  border: var(--bw) solid var(--edge);
  background: var(--raised);
  color: var(--ink);
  border-radius: calc(12px * var(--round));
  padding: 8px 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(15px, 4.4vw, 20px);
  box-shadow: 0 calc(3px * var(--pop)) 0 var(--edge);
}
.choice-btn:active { transform: translateY(3px); box-shadow: none; }
.choice-btn:nth-child(3n+1) { background: var(--sun); }
.choice-btn:nth-child(3n+2) { background: var(--mint-l); }
.choice-btn:nth-child(3n) { background: var(--sky-l); }
.ov-avatar { width: clamp(56px, 18vw, 90px); height: clamp(56px, 18vw, 90px); margin: 0 auto 4px; }
.ov-avatar svg { width: 100%; height: 100%; }
.ov-scores { list-style: none; margin: 6px auto 0; padding: 0; max-width: 280px; text-align: left; font-size: clamp(13px, 3.6vw, 16px); }
.ov-scores li { display: flex; justify-content: space-between; gap: 10px; padding: 1px 0; }
.ov-scores .pos { color: var(--mint); }
.ov-scores .zero { color: #ff9f93; }
.ov-scores .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.podium { display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin: 8px 0 6px; }
.pod { width: 30%; max-width: 110px; display: flex; flex-direction: column; align-items: center; }
.pod .ov-avatar { width: clamp(42px, 13vw, 70px); height: clamp(42px, 13vw, 70px); margin: 0; }
.pod-name { font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-block {
  width: 100%;
  margin-top: 4px;
  border: var(--bw) solid var(--edge);
  border-radius: calc(10px * var(--round)) calc(10px * var(--round)) 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
}
.pod-block b { font-size: clamp(18px, 6vw, 28px); line-height: 1; }
.pod-block small { font-size: 11px; font-family: var(--font-body); }
.pod.p1 .pod-block { height: clamp(56px, 17vw, 96px); background: var(--sun); }
.pod.p2 .pod-block { height: clamp(42px, 12vw, 72px); background: #dfe3ee; }
.pod.p3 .pod-block { height: clamp(32px, 9vw, 54px); background: #f3b98a; }
.pod.p1 .ov-avatar { animation: bob 1.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-4deg); } }
.ov-rest { font-size: 13px; opacity: 0.85; }

/* --------------------------------------------------------------- lobby */
.lobby {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: var(--card);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
  display: none;
}
.lobby.show { display: block; }
.lobby h3 { font-family: var(--font-display); font-weight: 600; font-size: 20px; margin: 0 0 8px; }
/* minmax(0, …): a long option (Spades, Least Count) can't push the lobby wider than a phone. */
.set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.set-row { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.set-row select { min-width: 0; max-width: 100%; text-overflow: ellipsis; }
.set-row label { font-size: 12px; font-weight: 900; color: var(--ink-soft); }
.set-row select {
  -webkit-appearance: none;
  appearance: none;
  border: calc(2px * var(--lw)) solid var(--edge);
  border-radius: calc(10px * var(--round));
  padding: 7px 28px 7px 10px;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  background: var(--field) var(--select-arrow) no-repeat right 10px center / 12px;
}
.set-row select:disabled { opacity: 0.75; background-color: var(--paper); }
.set-full { grid-column: 1 / -1; }
.set-row textarea {
  border: calc(2px * var(--lw)) solid var(--edge);
  border-radius: calc(10px * var(--round));
  padding: 8px 10px;
  font-weight: 700;
  font-size: 14px;
  min-height: 64px;
  resize: vertical;
  background: var(--field);
  -webkit-user-select: text;
  user-select: text;
}
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; }
.check input { width: 20px; height: 20px; accent-color: var(--mint); }
.invite-box { display: flex; gap: 6px; margin: 12px 0 10px; }
.invite-box .input { font-size: 13px; padding: 8px 10px; background: var(--paper); }
.invite-box .btn { width: auto; flex: none; font-size: 15px; padding: 8px 12px; }
.room-code-line { margin: 12px 0 0; text-align: center; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.room-code-line b, .code-share b { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: 0.14em; color: var(--ink); }
.code-share { margin: 10px 0 0 !important; }
.code-input { text-align: center; font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; padding: 10px 8px 10px calc(8px + 0.3em); }
.code-input::placeholder { color: var(--line); letter-spacing: 0.3em; }
.code-error { margin: 8px 0 0 !important; color: var(--coral-t) !important; font-weight: 800; }
/* The room code as a tap-to-copy chip (lobby and the invite sheet). */
.code-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0 0; }
.code-label { font-size: 14px; font-weight: 800; color: var(--ink-soft); }
.code-chip { display: inline-flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; border: calc(2.5px * var(--lw)) solid var(--edge); border-radius: calc(14px * var(--round)); background: var(--sun-l, var(--card)); box-shadow: 0 calc(3px * var(--pop)) 0 var(--edge); color: var(--ink); cursor: pointer; transition: transform 0.1s, box-shadow 0.1s; }
.code-chip:active { transform: translateY(2px); box-shadow: 0 calc(1px * var(--pop)) 0 var(--edge); }
.code-chip b { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: 0.16em; }
.code-chip-do { padding: 4px 9px; border-radius: calc(9px * var(--round)); background: var(--card); font-size: 13px; font-weight: 900; color: var(--ink-soft); white-space: nowrap; }
.code-chip.copied { background: var(--mint-l); }
.code-chip.copied .code-chip-do { color: var(--mint-t); }
.code-chip-big { display: flex; justify-content: space-between; width: 100%; margin: 4px 0 10px; padding: 10px 10px 10px 18px; }
.code-chip-big b { font-size: 30px; }
.code-hint { margin: 8px 0 0 !important; text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.sheet .code-hint { margin: 0 0 8px !important; }
.code-entry { display: flex; gap: 8px; align-items: stretch; }
.code-entry .code-input { flex: 1; min-width: 0; }
.code-paste { flex: none; padding: 0 12px; border: calc(2.5px * var(--lw)) solid var(--edge); border-radius: calc(14px * var(--round)); background: var(--sky-l); color: var(--sky-t); box-shadow: 0 calc(3px * var(--pop)) 0 var(--edge); font: 900 14px/1 var(--font-body, inherit); cursor: pointer; }
.code-paste:active { transform: translateY(2px); box-shadow: 0 calc(1px * var(--pop)) 0 var(--edge); }
.lobby-note { font-size: 12px; color: var(--muted); text-align: center; margin: 8px 0 0; }

/* -------------------------------------------------------------- toolbar */
.toolbar {
  flex: none;
  position: relative;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: var(--bw) solid var(--edge);
  border-top: none;
  border-radius: 0 0 calc(12px * var(--round)) calc(12px * var(--round));
  padding: 0 6px;
}
.tools, .guess-tools, .status-line, .answer-tools { display: none; }
.toolbar.mode-draw .tools { display: flex; }
.toolbar.mode-answer .answer-tools { display: flex; }
.spectate-bar { display: none; align-items: center; gap: 10px; font-weight: 900; font-size: 14px; color: var(--ink-soft); }
.toolbar.mode-spectate .spectate-bar { display: flex; }
.pl-section { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); padding: 8px 6px 2px; }
.pl.spectator { min-height: 36px; background: transparent !important; }
.pl.spectator .pl-av { width: 26px; height: 26px; }
.pl.spectator .pl-name { font-size: 12px; }
.answer-tools { gap: 5px; width: 100%; justify-content: center; }
.answer-btn {
  flex: 1 1 0;
  max-width: 92px;
  min-width: 0;
  height: 44px;
  border: calc(2px * var(--lw)) solid var(--edge);
  border-radius: calc(11px * var(--round));
  background: var(--raised);
  box-shadow: 0 calc(2px * var(--pop)) 0 var(--edge);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0 2px;
  font-size: 16px;
  line-height: 1;
}
.answer-btn span { font-size: 11px; font-weight: 900; white-space: nowrap; }
.answer-btn.yes { background: var(--mint-l); }
.answer-btn.no { background: var(--rose-l); }
.answer-btn:active { transform: translateY(2px); box-shadow: none; }
#btn-leak { display: none; }
body.describe-turn #btn-leak { display: flex; }
body.describe-turn #btn-dislike { display: none; }

/* Mafia's end-screen faces (Clue Crew's too) stay here: on wide screens the bigger body.wide .pl-av
   further down wins over them. */
.mf-end li .pl-av { width: 24px; height: 24px; flex: none; }

.bomb-ring { position: absolute; inset: 0; }
.seat {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 22%;
  max-width: 110px;
  text-align: center;
  transition: transform 0.2s;
}
.seat .pl-av { width: clamp(30px, 9vw, 46px); height: clamp(30px, 9vw, 46px); border-radius: 50%; }
.seat-text {
  margin-top: 2px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(12px, 3.6vw, 17px);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--sun);
  min-height: 1.1em;
  max-width: 140%;
  white-space: nowrap;
}
.seat-text mark { background: none; color: var(--mint); }
.seat.holder .pl-av { box-shadow: 0 0 0 3px var(--sun), 0 0 14px 4px rgba(255, 200, 58, 0.7); animation: holderpulse 0.8s infinite; }
@keyframes holderpulse { 50% { transform: scale(1.12); } }
.seat.dead { opacity: 0.35; filter: grayscale(1); }
.seat.watching { opacity: 0.55; }
.seat.ok .pl-av { animation: seatok 0.45s; }
@keyframes seatok { 40% { transform: scale(1.3) rotate(8deg); box-shadow: 0 0 0 4px var(--mint); } }
.seat.bad { animation: seatbad 0.4s; }
@keyframes seatbad { 20%, 60% { transform: translate(-58%, -50%); } 40%, 80% { transform: translate(-42%, -50%); } }
@keyframes spark { to { transform: scale(1.35) rotate(25deg); } }
.bomb-input {
  flex: 1;
  min-width: 0;
  border: calc(2.5px * var(--lw)) solid var(--edge);
  border-radius: calc(12px * var(--round));
  padding: 8px 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--sun-l);
  outline: none;
}
.bomb-input:focus { box-shadow: 0 0 0 3px rgba(255, 106, 85, 0.35); }
.bomb-input.bad { animation: seatbad 0.4s; border-color: var(--coral-t); }
/* --------------------------------------------- describe-mode clue card */
.clue-card {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: var(--paper) radial-gradient(circle at 1px 1px, var(--dots) 1.2px, transparent 1.6px) 0 0 / 18px 18px;
  text-align: center;
  overflow-y: auto;
}
.clue-card.show { display: flex; }
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: calc(2px * var(--lw)) solid var(--edge);
  border-radius: 999px;
  padding: 2px 12px;
  background: var(--sun);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(13px, 3.6vw, 16px);
}
.clue-answer {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 8vw, 40px);
  line-height: 1.05;
  color: var(--coral);
  -webkit-text-stroke: 1.5px var(--edge);
  paint-order: stroke fill;
  margin: 2px 0 0;
}
.clue-note { font-size: clamp(12px, 3.4vw, 14px); color: var(--ink-soft); margin: 0; }
.clue-tip { font-size: 12px; color: var(--muted); margin: 0; }
.clue-tip b { color: var(--ink); }
.clue-who { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: clamp(13px, 3.6vw, 16px); }
.clue-who .pl-av { width: 34px; height: 34px; }
.clue-feed { list-style: none; margin: 2px 0 0; padding: 0; width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 4px; }
.clue-feed li {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: calc(2px * var(--lw)) solid var(--edge);
  border-radius: calc(10px * var(--round));
  padding: 4px 8px;
  text-align: left;
  font-size: clamp(12px, 3.5vw, 15px);
}
.clue-feed li:first-child { box-shadow: 0 calc(2px * var(--pop)) 0 var(--edge); }
.clue-feed li:not(:first-child) { opacity: 0.75; }
.clue-feed .ans { flex: none; font-weight: 900; }
.clue-feed .q { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clue-empty { font-size: 13px; color: var(--muted); }
.voice-nudge { width: auto; font-size: 14px; padding: 6px 12px; margin-top: 2px; }
.ov-choices .choice-btn small { display: block; font-family: var(--font-body); font-size: 11px; font-weight: 800; opacity: 0.75; margin-top: 2px; }
.toolbar.mode-guess .guess-tools { display: flex; }
.toolbar.mode-status .status-line { display: block; }
.tools { gap: 5px; width: 100%; justify-content: center; }
.tool {
  width: 42px;
  height: 42px;
  flex: 0 1 42px;
  min-width: 36px;
  border: calc(2px * var(--lw)) solid var(--edge);
  border-radius: calc(11px * var(--round));
  background: var(--raised);
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: 0 calc(2px * var(--pop)) 0 var(--edge);
}
.tool:active { transform: translateY(2px); box-shadow: none; }
.tool.active { background: var(--sun); }
.tool svg { width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tool svg .fillme { fill: var(--sky); stroke-width: 1.6; }
.tool-danger { background: var(--rose-l); }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: calc(2px * var(--lw)) solid var(--edge); background: #000; box-shadow: 0 0 0 1.5px var(--line); }
.size-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }

.guess-tools { gap: 8px; }
.pill-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  border: calc(2px * var(--lw)) solid var(--edge);
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--raised);
  font-weight: 900;
  font-size: 14px;
  box-shadow: 0 calc(2px * var(--pop)) 0 var(--edge);
}
.pill-btn:active { transform: translateY(2px); box-shadow: none; }
.pill-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pill-btn:disabled { opacity: 0.45; }
.pill-danger { background: var(--rose-l); }
.status-line { font-size: 14px; font-weight: 800; color: var(--ink-soft); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.popover {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  transform-origin: bottom center;
  background: var(--card);
  border: var(--bw) solid var(--edge);
  border-radius: calc(14px * var(--round));
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s, transform 0.12s;
}
.popover.open { opacity: 1; pointer-events: auto; transform: translateX(-50%) scale(1); }
#pop-color { display: grid; grid-template-columns: repeat(9, 30px); gap: 5px; }
.color-cell { width: 30px; height: 30px; border-radius: calc(8px * var(--round)); border: calc(2px * var(--lw)) solid var(--edge); padding: 0; }
.color-cell.active { box-shadow: 0 0 0 3px var(--sun), 0 0 0 5px var(--edge); }
#pop-size { display: flex; gap: 8px; }
.size-cell {
  width: 46px;
  height: 46px;
  border: calc(2px * var(--lw)) solid var(--edge);
  border-radius: calc(11px * var(--round));
  background: var(--raised);
  display: grid;
  place-items: center;
  padding: 0;
}
.size-cell.active { background: var(--sun); }
.size-cell span { display: block; border-radius: 50%; background: var(--ink); }

/* -------------------------------------------------------------- players */
.g-players {
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--card);
  border: var(--bw) solid var(--edge);
  border-radius: calc(12px * var(--round));
  padding: 4px;
}
.pl {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 4px;
  border-radius: calc(9px * var(--round));
  min-height: 44px;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
}
.pl:nth-child(even) { background: var(--zebra); }
.pl.guessed { background: var(--mint-l); }
.pl.drawing { background: var(--sun-l); }
.pl.away { opacity: 0.5; }
.pl-rank { flex: none; width: 16px; margin-right: -2px; text-align: center; font-size: 12px; font-weight: 900; color: var(--muted); }
.pl-av { flex: none; width: 34px; height: 34px; }
.pl-av svg { width: 100%; height: 100%; }
.pl-info { flex: 1; min-width: 0; line-height: 1.15; }
.pl-name { font-size: 13px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl.me .pl-name { color: var(--sky-t); }
.pl-score { font-size: 12px; color: var(--ink-soft); font-weight: 800; }
.pl-badges { position: absolute; left: 14px; top: 1px; display: flex; flex-direction: column; gap: 1px; }
.pl-badges svg { width: 15px; height: 15px; filter: drop-shadow(0 1px 0 var(--card)); }
body.wide .pl-badges { position: static; flex-direction: row; }
body.wide .pl-badges svg { width: 18px; height: 18px; }
.badge-host path { fill: var(--sun); stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.badge-pen path { fill: var(--sky); stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.badge-mic path, .badge-mic rect { fill: var(--raised); stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.badge-mic.off path, .badge-mic.off rect { fill: var(--rose-l); stroke: var(--coral-t); }
.pl-av { border-radius: 50%; transition: box-shadow 0.12s; }
.pl.speaking .pl-av { box-shadow: 0 0 0 3px var(--mint), 0 0 10px 2px rgba(41, 201, 153, 0.6); }
.pl.pop .pl-score { animation: scorepop 0.6s; }
@keyframes scorepop { 40% { transform: scale(1.35); color: var(--mint); } }

/* ----------------------------------------------------------------- chat */
.g-chat {
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: var(--bw) solid var(--edge);
  border-radius: calc(12px * var(--round));
  overflow: hidden;
}
.chat-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
  font-size: 13.5px;
  -webkit-user-select: text;
  user-select: text;
}
.m { padding: 3px 9px; line-height: 1.3; word-wrap: break-word; overflow-wrap: anywhere; }
.m:nth-child(even) { background: var(--zebra); }
.m b { font-weight: 900; }
.m.system { color: var(--sky-t); font-weight: 900; }
.m.join { color: var(--mint-t); font-weight: 900; }
.m.leave { color: var(--coral-t); font-weight: 900; }
.m.guessed { background: var(--mint) !important; font-weight: 900; }
.m.guessChat { color: var(--mint-t); background: var(--mint-l) !important; }
.m.close { color: var(--sun-t); background: var(--sun-l) !important; font-weight: 900; }
.m.reveal { color: var(--grape-t); font-weight: 900; }
.m.like { color: var(--mint-t); font-weight: 900; }
.m.voice { color: var(--grape-t); font-weight: 900; }
/* Poker: one folded-up record per hand (result on top, the betting round by round inside). */
.m.pokerHand { color: var(--sun-t); font-weight: 900; }
.pk-hl summary { cursor: pointer; list-style: none; }
.pk-hl summary::-webkit-details-marker { display: none; }
.pk-hl summary::after { content: ' ▸'; color: var(--muted); font-size: 11px; }
.pk-hl[open] summary::after { content: ' ▾'; }
.pk-hl summary:focus-visible { outline: 2px solid var(--sky); outline-offset: 1px; border-radius: calc(4px * var(--round)); }
.pk-hl dl { margin: 4px 0 2px; padding: 4px 0 2px 8px; border-left: 3px solid var(--line); color: var(--ink); font-weight: 700; font-size: 12.5px; }
.pk-hl dl > div { display: grid; grid-template-columns: minmax(68px, auto) 1fr; gap: 0 8px; padding: 1px 0; }
.pk-hl dt { color: var(--ink-soft); font-weight: 900; white-space: nowrap; }
.pk-hl dd { margin: 0; }
.m.answer { background: var(--sky-l) !important; }
.m.mafiaChat { background: #3a1a22 !important; color: #ffb4a8; }
.m.mafiaChat b { color: #ff8a7a; }
.m.detChat { background: #17264a !important; color: #b9d0ff; }
.m.detChat b { color: #8fb4ff; }
.m.crewClue { font-weight: 900; background: var(--sun-l) !important; }
.m.ghostChat { color: var(--muted); font-style: italic; background: var(--zebra) !important; }
.m.spectatorChat { color: var(--ink-soft); background: var(--paper-2) !important; }
.m.answer .q { color: var(--ink-soft); font-weight: 700; }
body.explaining .m.q-msg { cursor: pointer; }
body.explaining .m.q-msg:hover { background: var(--sun-l); }
.m.q-msg.selected { background: var(--sun) !important; box-shadow: inset 4px 0 0 var(--edge); }
.m.admin { color: var(--ink); background: var(--sun-l) !important; font-weight: 900; border-left: 4px solid var(--sun); }
.m.dislike { color: var(--coral-t); font-weight: 900; }
.m.me b { color: var(--sky-t); }

.chat-form {
  flex: none;
  display: flex;
  gap: 4px;
  padding: 4px;
  border-top: 2px solid var(--line);
  background: var(--card);
}
.chat-input {
  flex: 1;
  min-width: 0;
  border: calc(2px * var(--lw)) solid var(--edge);
  border-radius: calc(10px * var(--round));
  padding: 8px 10px;
  font-size: 16px; /* 16px stops iOS from zooming on focus */
  font-weight: 800;
  background: var(--field);
  outline: none;
  -webkit-user-select: text;
  user-select: text;
}
.chat-input:focus { box-shadow: 0 0 0 3px rgba(77, 141, 255, 0.3); }
.chat-input:disabled { background: var(--paper); }
.send-btn {
  flex: none;
  width: 42px;
  border: calc(2px * var(--lw)) solid var(--edge);
  border-radius: calc(10px * var(--round));
  background: var(--sky);
  display: grid;
  place-items: center;
  padding: 0;
}
.send-btn svg { width: 20px; height: 20px; fill: #fff; stroke: var(--on-accent); stroke-width: 1.8; stroke-linejoin: round; }
.send-btn:active { transform: scale(0.94); }
.send-btn:disabled { opacity: 0.4; }

.conn-banner {
  position: absolute;
  top: calc(52px + var(--safe-t));
  left: 50%;
  transform: translateX(-50%);
  background: var(--coral);
  border: calc(2px * var(--lw)) solid var(--edge);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 900;
  z-index: 30;
  box-shadow: var(--shadow);
}

/* --------------------------------------------- keyboard open (mobile) */
body.kb-open .g-header { display: none; }
body.kb-open .g-main { padding-top: calc(4px + var(--safe-t)); padding-bottom: 4px; }

/* ----------------------------------------------- wide / desktop layout */
body.wide .g-main {
  grid-template-columns: 220px minmax(0, 1fr) 300px;
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "players center chat";
  gap: 10px;
  padding: 0 12px 12px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}
body.wide .g-header { max-width: 1400px; width: 100%; height: calc(56px + var(--safe-t)); margin: 0 auto; padding: 10px 12px 8px; }
body.wide .g-brand { font-size: 30px; }
body.wide .g-players { padding: 6px; align-self: start; max-height: 100%; }
body.wide .pl { min-height: 52px; }
body.wide .pl-av { width: 42px; height: 42px; }
body.wide .pl-name { font-size: 15px; }
body.wide .pl-score { font-size: 13px; }
body.wide .chat-log { font-size: 14.5px; }
body.wide .hint .hint-word { font-size: 26px; }
body.wide .g-topbar { height: 54px; }
body.wide .round { font-size: 16px; }
body.wide #pop-color { grid-template-columns: repeat(13, 30px); }
body.wide .tool { width: 46px; height: 46px; flex-basis: 46px; }
body.wide .toolbar { height: 60px; }

/* ================================================================ SHEET */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(34, 29, 51, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 40;
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: 460px;
  transform: translate(-50%, 105%);
  transition: transform 0.25s cubic-bezier(.2,.9,.3,1);
  background: var(--card);
  border: var(--bw) solid var(--edge);
  border-bottom: none;
  border-radius: calc(22px * var(--round)) calc(22px * var(--round)) 0 0;
  padding: 10px 16px calc(18px + var(--safe-b));
  z-index: 41;
}
.sheet.open { transform: translate(-50%, 0); }
.sheet::before { content: ''; display: block; width: 44px; height: 5px; border-radius: calc(3px * var(--round)); background: var(--line); margin: 0 auto 12px; }
.sheet h3 { font-family: var(--font-display); font-weight: 600; font-size: 21px; margin: 0 0 4px; text-align: center; }
.sheet p { margin: 0 0 12px; text-align: center; color: var(--ink-soft); font-size: 14px; }
.sheet .btn { margin-top: 8px; font-size: 17px; }
.sheet-head { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 8px; }
.sheet-head .pl-av { width: 56px; height: 56px; }
.sheet-head h3 { margin: 0; text-align: left; }
.sheet-head small { display: block; color: var(--muted); font-size: 13px; }

/* voice volume slider in the player sheet */
.vol { margin: 6px 0 4px; padding: 10px 12px; border: var(--bw) solid var(--edge); border-radius: var(--radius); background: var(--sky-l); }
.vol-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-weight: 900; font-size: 15px; }
.vol-top output { font-family: var(--font-display); font-size: 17px; min-width: 4ch; text-align: right; }
.vol input[type='range'] { display: block; width: 100%; margin: 8px 0 2px; accent-color: var(--sky); height: 28px; }
.vol small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.vol-meter { height: 8px; margin: 4px 0 6px; border-radius: calc(4px * var(--round)); background: var(--chip); overflow: hidden; }
.vol-meter i { display: block; height: 100%; width: 0; background: var(--mint); border-radius: calc(4px * var(--round)); transition: width 0.08s linear; }
.vol-meter i.hot { background: var(--coral); }

.toast {
  position: fixed;
  top: calc(14px + var(--safe-t));
  left: 50%;
  transform: translate(-50%, -150%);
  background: var(--inverse);
  color: var(--on-inverse);
  padding: 10px 16px;
  border-radius: calc(12px * var(--round));
  font-weight: 800;
  font-size: 14px;
  max-width: calc(100% - 32px);
  text-align: center;
  z-index: 60;
  transition: transform 0.25s cubic-bezier(.2,1.4,.4,1);
}
.toast.show { transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* The joker's face (js/cards.js) and seats you can tap or target: shared by the card games. */
.pc-joker { color: var(--grape-t, #7140e0); }
.pc-jk { display: flex; flex-direction: column; align-items: center; gap: 0.1em; font-size: 2em; line-height: 0.9; }
.pc-jk small { font-size: 0.24em; font-weight: 900; letter-spacing: 0.06em; }
button.fz-seat { font: inherit; color: inherit; cursor: default; }
.fz-seat.can { cursor: pointer; outline: 2px dashed var(--sky); outline-offset: 1px; }
.fz-seat.target { box-shadow: 0 0 0 2.5px var(--sky), 0 0 0 transparent; background: var(--sky-l); }

/* Jack Row's hand padding stays here: the shared .pc-row and .pc-hand below must still win where they set it. */
.jk-hand { padding: 0.8em 0.4em 0.6em; }

/* Hands laid out straight and upright, the same clean cards as Bank (Spades, Jack Row). They
   only overlap as much as they need to fit (--n cards). */
.pc-row { padding-left: 4px; padding-right: 4px; }
.pc-hand.pc-row > .pc + .pc { margin-left: min(6px, calc((100cqw - 22px - var(--n) * var(--pc-w)) / (var(--n) - 1))); }
.pc-row > .pc.is-sel { z-index: 2; }
.pc-q { display: inline-block; margin: 0 -0.07em; transform: scaleX(0.84); }

/* ------------------------------------------------------------ theme picker */
.theme-btn { position: absolute; top: calc(10px + var(--safe-t)); right: 12px; z-index: 5; }
.studio-btn { color: var(--ink); text-decoration: none; }
.studio-btn .dot { fill: var(--ink); stroke: none; }
.theme-ico .th-half { fill: var(--ink); stroke: none; }
.theme-ico svg { display: none; }
:root:not([data-theme-pref='light']):not([data-theme-pref='dark']) .theme-ico .th-system,
:root[data-theme-pref='light'] .theme-ico .th-light,
:root[data-theme-pref='dark'] .theme-ico .th-dark { display: block; }
.theme-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 6px; }
.theme-pick button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border: calc(2px * var(--lw)) solid var(--edge);
  border-radius: calc(12px * var(--round));
  background: var(--raised);
  box-shadow: 0 calc(2px * var(--pop)) 0 var(--edge);
  font-weight: 900;
  font-size: 14px;
}
.theme-pick button span { font-size: 20px; line-height: 1.1; }
.theme-pick button[aria-checked='true'] { --ink: var(--on-accent); color: var(--on-accent); background: var(--sun); }
.theme-pick button:active { transform: translateY(2px); box-shadow: none; }
.theme-pick button:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
/* Skin row in the Settings sheet: each swatch is its own [data-skin] element, in that skin's colours. */
.skin-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 4px 0 6px; }
@media (min-width: 440px) { .skin-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.skin-pick button { min-width: 0; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: calc(2px * var(--lw)) solid var(--edge); border-radius: calc(12px * var(--round)); background: var(--raised); box-shadow: 0 calc(2px * var(--pop)) 0 var(--edge); color: var(--ink); font-weight: 900; font-size: 13px; text-align: left; }
.skin-pick button[aria-checked='true'] { --ink: var(--on-accent); color: var(--on-accent); background: var(--sun); }
.skin-pick button:active { transform: translateY(2px); box-shadow: none; }
.skin-pick button:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.skin-sw { flex: none; display: flex; gap: 2px; padding: 4px; border: var(--bw) solid var(--edge); border-radius: calc(9px * var(--round)); background: var(--paper); }
.skin-sw i { width: 8px; height: 14px; border-radius: calc(3px * var(--round)); background: var(--logo-1); }
.skin-sw i:nth-child(2) { background: var(--go); }
.skin-sw i:nth-child(3) { background: var(--alt); }
.sheet .theme-label { display: block; margin: 8px 0 0; font-weight: 900; font-size: 14px; color: var(--ink-soft); text-align: center; }

.sheet.tall { max-height: 88%; max-height: 88dvh; overflow-y: auto; }
.relay-dice, .relay-go, .rl-next, .rl-react {
  flex: none;
  border: calc(2.5px * var(--lw)) solid var(--edge);
  border-radius: calc(12px * var(--round));
  box-shadow: 0 calc(2px * var(--pop)) 0 var(--edge);
  font-weight: 900;
}
.relay-dice { width: 40px; height: 40px; padding: 0; background: var(--sun); font-size: 20px; }
.relay-dice:active, .relay-go:active, .rl-next:active, .rl-react:active { transform: translateY(2px); box-shadow: none; }
/* A long prompt to draw wraps onto two lines in the top bar. */
.hint.wrap { white-space: normal; }
.hint.wrap .hint-word { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; font-size: 14px; letter-spacing: 0; line-height: 1.12; }
body.wide .hint.wrap .hint-word { font-size: 18px; }
/* --------------------------------------------------------------- fuse box */
/* A lit fuse burning down the game card: spark yellow to flame coral. */
body.wide .fz-seat .pl-av { width: 36px; height: 36px; }

/* who's playing */
.fz-seats { flex: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; --cols: 6; width: 100%; max-width: calc(var(--cols) * 84px); margin: 0 auto; }
.fz-seat {
  position: relative;
  width: min(80px, calc((100% - (var(--cols) - 1) * 4px) / var(--cols)));
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 3px 2px 2px;
  border: calc(2px * var(--lw)) solid var(--edge);
  border-radius: calc(10px * var(--round));
  background: var(--card);
  box-shadow: 0 calc(2px * var(--pop)) 0 var(--edge);
  transition: transform 0.15s, opacity 0.2s, background 0.2s;
}
.fz-seat .pl-av { width: clamp(22px, 6.6vw, 32px); height: clamp(22px, 6.6vw, 32px); border-radius: 50%; }
.fz-sn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(9.5px, 2.8vw, 12px); font-weight: 900; line-height: 1.15; }
.fz-sc { display: flex; align-items: center; gap: 3px; font-size: clamp(9px, 2.6vw, 11px); font-weight: 800; color: var(--muted); line-height: 1.1; }
.fz-mini { display: inline-block; width: 7px; height: 10px; border: 1.5px solid currentColor; border-radius: calc(2px * var(--round)); background: var(--sun-l); }
.fz-sb {
  position: absolute;
  top: -7px;
  right: -6px;
  min-width: 20px;
  padding: 0 4px;
  border: calc(1.5px * var(--lw)) solid var(--edge);
  border-radius: 999px;
  background: var(--sun);
  color: var(--on-accent);
  font-size: 11px;
  font-weight: 900;
  line-height: 16px;
}
.fz-seat.me .fz-sn { color: var(--sky-t); }
.fz-seat.turn { background: var(--sun-l); transform: translateY(-2px); box-shadow: 0 0 0 2.5px var(--sun), 0 calc(3px * var(--pop)) 0 var(--edge); }
.fz-seat.turn .pl-av { animation: bob 1.2s ease-in-out infinite; }
.fz-seat.out { opacity: 0.5; filter: grayscale(0.9); box-shadow: none; }
.fz-seat.out .fz-sb { background: var(--rose-l); color: var(--ink); }
.fz-seat.away { opacity: 0.7; }
.fz-seat.can { cursor: pointer; animation: fzcan 0.9s ease-in-out infinite; border-color: var(--coral-t); }
.fz-seat.dim { opacity: 0.35; }
.fz-seat.picked { background: var(--rose-l); }
@keyframes fzcan { 50% { transform: translateY(-3px); box-shadow: 0 0 0 3px var(--coral), 0 calc(4px * var(--pop)) 0 var(--edge); } }
.fz-seat:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

.fz-log { flex: 0 1 auto; min-height: 0; overflow: hidden; list-style: none; margin: 4px 0 0; padding: 0; font-size: clamp(11px, 3vw, 12.5px); font-weight: 700; color: var(--ink-soft); text-align: center; }
.fz-log li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0.85; }
.fz-log li + li { opacity: 0.6; }
.fz-log li + li + li { opacity: 0.4; }
.fz-btns { display: flex; gap: 6px; flex: none; }

/* intro and the winner screen */
.fz-center {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(4px, 1.4vw, 8px);
  padding: 6px 8px;
  text-align: center;
}
.fz-center > :first-child { margin-top: auto; }
.fz-center > :last-child { margin-bottom: auto; }
.fz-title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 6vw, 30px); line-height: 1.1; }
.fz-sub { margin: 0; max-width: 440px; font-size: clamp(12px, 3.4vw, 15px); font-weight: 800; color: var(--ink-soft); }
.fz-how { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; max-width: 480px; margin: 0; padding: 0; }
.fz-how li {
  padding: 2px 9px;
  border: calc(2px * var(--lw)) solid var(--edge);
  border-radius: 999px;
  box-shadow: 0 calc(2px * var(--pop)) 0 var(--edge);
  font-size: clamp(11px, 3.2vw, 13px);
  font-weight: 900;
  animation: rlin 0.45s cubic-bezier(.2,1.5,.4,1) backwards;
}
.fz-how li:nth-child(1) { background: var(--sun-l); }
.fz-how li:nth-child(2) { background: var(--rose-l); animation-delay: 0.12s; }
.fz-how li:nth-child(3) { background: var(--sky-l); animation-delay: 0.24s; }
.fz-how li:nth-child(4) { background: var(--rose-l2); animation-delay: 0.36s; }
.fz-how li:nth-child(5) { background: var(--mint-l); animation-delay: 0.48s; }
.fz-champ { position: relative; animation: pop 0.5s cubic-bezier(.2,1.6,.4,1); }
.fz-champ .pl-av { display: block; width: clamp(64px, 19vw, 92px); height: clamp(64px, 19vw, 92px); border-radius: 50%; box-shadow: 0 0 0 4px var(--sun), 0 0 24px 6px rgba(255, 200, 58, 0.55); }
.fz-crown { position: absolute; top: -26px; left: 50%; transform: translateX(-50%) rotate(-8deg); font-size: 34px; animation: bob 1.4s ease-in-out infinite; }
.fz-places { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; width: min(320px, 100%); }
.fz-places li { display: flex; align-items: center; gap: 6px; padding: 3px 8px; border: calc(2px * var(--lw)) solid var(--edge); border-radius: calc(10px * var(--round)); background: var(--card); font-size: 13px; font-weight: 800; text-align: left; }
.fz-places .pl-av { width: 22px; height: 22px; flex: none; }
.fz-places .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fz-place { font-family: var(--font-display); color: var(--muted); }
.fz-why { font-size: 11px; color: var(--muted); }
.fz-end .fz-btns .btn { width: auto; padding: 8px 16px; font-size: 18px; }
.fz-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; margin: 0 !important; }
.fz-confetti i { position: absolute; top: -12px; left: var(--x); width: 8px; height: 13px; border-radius: calc(2px * var(--round)); background: var(--c); animation: fzfall 2.6s linear infinite; animation-delay: var(--d); }
@keyframes fzfall { to { transform: translateY(560px) rotate(540deg); } }

@media (prefers-reduced-motion: reduce) {
  /* (Fuse Box's own animations stop in css/games/fuse.css, after the rules that start them.) */
  .fz-seat.turn .pl-av, .fz-seat.can, .fz-confetti i { animation: none; }
}

/* ================================================================= spades */
/* Four seats around the table (you at the bottom, your partner across), the trick in the middle
   with each card in front of whoever played it, the scoreboard on top and your hand below.
   ☀️ Suns use the sun tints, 🌙 Moons the grape ones. Cards come from the shared playing cards. */
/* Spades' footer row stays here: sponsor.html has an .sp-foot too, and this rule lays it out. */
.sp-foot { flex: none; display: flex; align-items: center; gap: 6px; min-height: 18px; }
.fz-places li.sun { background: var(--sun-l); }
.fz-places li.moon { background: var(--grape-l); }

/* Spades teams beyond the first two (6-12 players): each team brings its own colour trio. */
:is(.sp-team, .sp-seat, .sp-rcard, .sp-col, .sp-rv, .spades-stage .fz-places li):is(.sun, .p0, .p6) { --tm: var(--sun); --tm-l: var(--sun-l); --tm-t: var(--sun-t); }
:is(.sp-team, .sp-seat, .sp-rcard, .sp-col, .sp-rv, .spades-stage .fz-places li):is(.moon, .p1, .p7) { --tm: var(--grape); --tm-l: var(--grape-l); --tm-t: var(--grape-t); }
:is(.sp-team, .sp-seat, .sp-rcard, .sp-col, .sp-rv, .spades-stage .fz-places li):is(.wave, .p2, .p8) { --tm: var(--sky); --tm-l: var(--sky-l); --tm-t: var(--sky-t); }
:is(.sp-team, .sp-seat, .sp-rcard, .sp-col, .sp-rv, .spades-stage .fz-places li):is(.leaf, .p3, .p9) { --tm: var(--mint); --tm-l: var(--mint-l); --tm-t: var(--mint-t); }
:is(.sp-team, .sp-seat, .sp-rcard, .sp-col, .sp-rv, .spades-stage .fz-places li):is(.fire, .p4, .p10) { --tm: var(--coral); --tm-l: var(--rose-l); --tm-t: var(--coral-t); }
:is(.sp-team, .sp-seat, .sp-rcard, .sp-col, .sp-rv, .spades-stage .fz-places li):is(.cloud, .p5, .p11) { --tm: var(--muted); --tm-l: var(--ink-l); --tm-t: var(--ink-soft); }
.sp-team:is(.wave, .leaf, .fire, .cloud) { background: var(--tm-l); }
.sp-team:is(.wave, .leaf, .fire, .cloud) .sp-tn { color: var(--tm-t); }
.sp-seat:is(.wave, .leaf, .fire, .cloud) { border-top-color: var(--tm); }
.cc-col.sp-col:is(.wave, .leaf, .fire, .cloud) { background: var(--tm-l); }
.spades-stage .fz-places li:is(.wave, .leaf, .fire, .cloud) { background: var(--tm-l); }
/* =================================================================== dice */
/* js/dice.js: the shared die. Size it with the width of its box. */
.die { display: block; width: 100%; overflow: visible; }
.die-face { fill: #fffdf8; stroke: var(--edge); stroke-width: 6; }
.die-shadow { fill: var(--edge); }
.die-shine { fill: none; stroke: #e9dcc0; stroke-width: 6; stroke-linecap: round; }
.die-pip { fill: #221d33; }
.die-one { fill: #ff6a55; stroke: #221d33; stroke-width: 5; }
.die-idle :is(.die-one, .die-pip) { opacity: 0.35; }
.die-box.rolling { animation: dietumble 0.7s cubic-bezier(0.3, 0.7, 0.3, 1); }
@keyframes dietumble {
  20% { transform: translateY(-38%) rotate(-130deg) scale(1.08); }
  45% { transform: translateY(0) rotate(-250deg) scale(1.1, 0.86); }
  62% { transform: translateY(-14%) rotate(-325deg); }
  82% { transform: translateY(0) rotate(-360deg) scale(1.1, 0.88); }
  100% { transform: rotate(-360deg); }
}

/* ================================================================= pieces */
/* js/pieces.js: pawns on a board. Each .pw box is exactly one square. */
.pw-track { position: absolute; inset: 0; pointer-events: none; }
.pw, .pw-count { position: absolute; left: 0; top: 0; width: var(--pw-w); height: var(--pw-h); }
.pw.moving { will-change: transform; }
.pw-fan { position: absolute; inset: 0; transform-origin: 50% 100%; transition: transform 0.22s cubic-bezier(0.2, 1.4, 0.4, 1), opacity 0.2s; }
.pw-hop { position: absolute; inset: 0; transform-origin: 50% 95%; }
.pw-art { position: absolute; left: 12%; right: 12%; bottom: 3%; display: block; }
.pw-peg { display: block; width: 100%; overflow: visible; }
.pw-head { position: absolute; left: 10%; right: 10%; top: -14%; display: block; aspect-ratio: 1; }
.pw-head svg { display: block; width: 100%; height: 100%; overflow: visible; }
.pw.ghost { opacity: 0.45; filter: grayscale(0.8); }
.pw.me .pw-art::before { content: ""; position: absolute; left: -10%; right: -10%; bottom: -7%; height: 34%; border-radius: 50%; border: 3px solid var(--sun); background: rgba(255, 200, 58, 0.45); box-shadow: 0 0 0 1.5px var(--edge); }
.pw.me:not(.moving) .pw-art::before { animation: pwme 1.5s ease-in-out infinite; }
@keyframes pwme { 50% { transform: scale(1.14); } }
.pw-count { z-index: 50; }
.pw-count b { position: absolute; right: -4%; top: -6%; min-width: 1.5em; padding: 0 0.3em; border: calc(1.5px * var(--lw)) solid var(--edge); border-radius: 999px; background: var(--sun); color: var(--on-accent); font: 700 clamp(9px, 2.5cqmin, 13px)/1.4 var(--font-display); text-align: center; animation: pop 0.25s cubic-bezier(0.2, 1.6, 0.4, 1); }

