/* ==========================================================================
   Doodlebop — sketchbook theme
   ========================================================================== */
/* Color tokens. Light is the default; dark redefines them below. The theme is
   picked by js/theme.js, which sets <html data-theme="light|dark"> from the
   player's choice (Light / Dark / System, saved as db_theme). */
:root,
.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");
}

:root[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");
}

:root {
  --radius: 14px;
  --bw: 2.5px;
  --shadow: 0 3px 0 var(--edge);
  --shadow-lg: 5px 5px 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;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: 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; }
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: 20px;
  box-shadow: var(--shadow-lg);
}

.btn {
  display: block;
  width: 100%;
  border: var(--bw) solid var(--edge);
  border-radius: 14px;
  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(--mint); }
.btn-alt { background: var(--sky); }
.btn-warm { background: var(--sun); }
.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-go, .btn-alt, .btn-warm, .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);
}

.input {
  width: 100%;
  border: var(--bw) solid var(--edge);
  border-radius: 12px;
  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: 11px;
  background: var(--card);
  box-shadow: 0 2px 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(--coral);
  -webkit-text-stroke: 3px var(--edge);
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 var(--edge);
  transform: rotate(-3deg);
  letter-spacing: -1px;
}
.logo-b { color: var(--sun); display: inline-block; transform: rotate(5deg) translateY(-3px); margin-left: 2px; }
.logo-squiggle { width: min(260px, 70vw); height: 22px; margin: 4px auto 0; }
.logo-squiggle path { fill: none; stroke: var(--sky); 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: 12px;
  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: 16px;
}
.av-col { display: flex; flex-direction: column; gap: 6px; }
.arrow {
  width: 40px;
  height: 30px;
  border: 2px solid var(--edge);
  border-radius: 9px;
  background: var(--card);
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
  padding: 0 0 4px;
  box-shadow: 0 2px 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: 2px solid var(--edge);
  border-radius: 9px;
  background: var(--sun);
  box-shadow: 0 2px 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: 2px solid var(--edge);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 3px 3px 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: 2px 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;
  padding: calc(6px + var(--safe-t)) 8px 4px;
}
.g-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  color: var(--coral);
  -webkit-text-stroke: 2px var(--edge);
  paint-order: stroke fill;
  text-shadow: 2px 2px 0 var(--edge);
  transform: rotate(-2deg);
  margin-left: 2px;
}
.g-brand span { color: var(--sun); }
.g-header-right { margin-left: auto; display: flex; gap: 8px; }
.g-header-right { 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: 9px;
  border: 2px 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); }
#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: 12px 12px 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: 12px;
  padding: 8px 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(15px, 4.4vw, 20px);
  box-shadow: 0 3px 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: 10px 10px 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; }
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.set-row { display: flex; flex-direction: column; gap: 3px; }
.set-row label { font-size: 12px; font-weight: 900; color: var(--ink-soft); }
.set-row select {
  -webkit-appearance: none;
  appearance: none;
  border: 2px solid var(--edge);
  border-radius: 10px;
  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: 2px solid var(--edge);
  border-radius: 10px;
  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; }
.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 12px 12px;
  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: 2px solid var(--edge);
  border-radius: 11px;
  background: var(--raised);
  box-shadow: 0 2px 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 mode */
.mafia-stage { position: absolute; inset: 0; z-index: 2; display: none; flex-direction: column; overflow: hidden; color: #fff; transition: background 0.6s; }
.mafia-stage.show { display: flex; }
.mafia-stage.night { background: linear-gradient(180deg, #0f1430 0%, #231c4a 70%, #3a2a5c 100%); }
.mafia-stage.day { background: linear-gradient(180deg, #ffe2a1 0%, #ffc98a 60%, #ffab86 100%); color: var(--ink); }
.mf-sky { position: absolute; inset: 0; pointer-events: none; }
.night .mf-sky {
  background-image:
    radial-gradient(1.5px 1.5px at 8% 14%, #fff, transparent), radial-gradient(1px 1px at 22% 32%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 35% 9%, #fff, transparent), radial-gradient(1px 1px at 48% 26%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 63% 12%, #fff, transparent), radial-gradient(1px 1px at 74% 38%, #fff, transparent),
    radial-gradient(1px 1px at 88% 22%, #fff, transparent), radial-gradient(1.5px 1.5px at 15% 58%, #fff, transparent),
    radial-gradient(1px 1px at 92% 64%, #fff, transparent), radial-gradient(1px 1px at 55% 72%, #fff, transparent);
  animation: twinkle 3s ease-in-out infinite alternate;
}
@keyframes twinkle { to { opacity: 0.55; } }
.night .mf-sky::after {
  content: '';
  position: absolute;
  top: 7%;
  right: 6%;
  width: clamp(22px, 7vw, 38px);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset -8px -3px 0 0 #fff3c4;
  transform: rotate(-20deg);
  filter: drop-shadow(0 0 8px rgba(255, 243, 196, 0.6));
}
.day .mf-sky::after {
  content: '';
  position: absolute;
  top: -18px;
  right: -14px;
  width: clamp(56px, 16vw, 90px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff6c9;
  box-shadow: 0 0 30px 12px rgba(255, 246, 201, 0.75);
}
.mf-head { position: relative; text-align: center; padding: 8px 12px 2px; }
.mf-title-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 10px; }
.mf-head .mf-skip { margin: 0; padding: 3px 12px; font-size: 12px; }
.mf-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(16px, 5vw, 22px); }
.mf-sub { font-size: clamp(11px, 3.2vw, 13px); font-weight: 800; opacity: 0.85; }
.mf-body { position: relative; flex: 1; min-height: 0; overflow-y: auto; padding: 4px 8px 6px; display: flex; flex-direction: column; align-items: center; }
/* Centre vertically when there is room, but scroll from the top instead of clipping when there isn’t. */
.mf-body > :first-child { margin-top: auto; }
.mf-body > :last-child { margin-bottom: auto; }
.mf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(52px, 15vw, 92px), 1fr)); gap: 5px; width: 100%; align-self: stretch; }
.mf-p {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  padding: 4px 2px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: inherit;
  cursor: default;
  transition: transform 0.12s, box-shadow 0.15s, background 0.15s;
}
.day .mf-p { background: rgba(255, 255, 255, 0.55); border-color: rgba(34, 29, 51, 0.18); }
.mf-p .pl-av { width: clamp(26px, 7.5vw, 40px); height: clamp(26px, 7.5vw, 40px); border-radius: 50%; }
.mf-name { font-size: clamp(10px, 2.8vw, 12px); font-weight: 900; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-badges { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; min-height: 14px; font-size: 11px; }
/* Votes on a player (by day) or team picks (at night): a bold number in the card's top-right corner. */
.mf-bubble { position: absolute; top: 3px; right: 3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #221d33; color: #fff; font-size: 12px; font-weight: 900; line-height: 20px; text-align: center; white-space: nowrap; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); animation: mfpop 0.3s cubic-bezier(.2,1.6,.4,1); }
.night .mf-bubble { background: #ffc83a; color: #221d33; } /* fixed colours: the Mafia stage keeps its own palette in any theme */
/* A player the Detective found to be Mafia. */
.mf-grid .mf-p.sus, .day .mf-grid .mf-p.sus { border-color: #c0392b; background: rgba(192, 57, 43, 0.14); box-shadow: inset 0 0 0 1px #c0392b; }
.mf-grid .mf-p.sus.picked, .day .mf-grid .mf-p.sus.picked { box-shadow: 0 0 0 2px var(--sun), inset 0 0 0 1px #c0392b; }
.mf-p.can { cursor: pointer; border-color: rgba(255, 200, 58, 0.55); }
.day .mf-p.can { border-color: rgba(255, 106, 85, 0.5); }
.mf-p.can:active { transform: scale(0.95); }
.mf-p.picked { border-color: var(--sun); background: rgba(255, 200, 58, 0.22); box-shadow: 0 0 0 2px var(--sun); }
.day .mf-p.picked { background: var(--sun-l); border-color: var(--coral); box-shadow: 0 0 0 2px var(--coral); }
.mf-p.dead { opacity: 0.42; filter: grayscale(1); }
.mf-p.me .mf-name { color: var(--sun); }
.day .mf-p.me .mf-name { color: #1a48a8; }
.mf-tag { font-size: 10px; font-weight: 900; border-radius: 6px; padding: 0 4px; background: rgba(255, 255, 255, 0.2); white-space: nowrap; color: #fff; }
.mf-tag.role-mafia { background: #c0392b; }
.mf-tag.role-doctor { background: var(--mint-t); }
.mf-tag.role-detective { background: var(--sky-t); }
.mf-tag.role-sheriff { background: #94591c; }
.mf-tag.role-villager { background: #8f5e2c; }
.mf-tag.clear { background: var(--mint-t); }
.mf-count { font-size: 10px; font-weight: 900; background: rgba(20, 16, 32, 0.75); color: #fff; border-radius: 6px; padding: 0 4px; }
.mf-skip { margin: 8px 0 6px; border: 2px solid var(--edge); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 900; font-size: 13px; padding: 5px 14px; box-shadow: 0 2px 0 var(--edge); }
.mf-skip.picked { background: var(--sun); }
.mf-voters { display: flex; flex-wrap: wrap; justify-content: center; gap: 1px; min-height: 16px; max-width: 100%; }
.mf-p .mf-voters .pl-av { width: 16px; height: 16px; border-radius: 50%; animation: mfpop 0.3s cubic-bezier(.2,1.6,.4,1); }
.mf-voters .more { font-size: 10px; font-weight: 900; line-height: 16px; }
.mf-hard { font-size: 12px; font-weight: 800; background: rgba(255, 120, 40, 0.18); border-radius: 8px; padding: 4px 8px; }
.mf-votes { width: 100%; margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.mf-votes-title { font-size: 11px; font-weight: 900; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.5px; }
.mf-vote-row { display: flex; align-items: baseline; gap: 6px; padding: 3px 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.12); font-size: clamp(11px, 3.2vw, 13px); text-align: left; }
.day .mf-vote-row { background: rgba(255, 255, 255, 0.6); }
.mf-vote-target { font-weight: 900; white-space: nowrap; }
.mf-vote-n { font-weight: 900; font-size: 10px; background: rgba(20, 16, 32, 0.75); color: #fff; border-radius: 6px; padding: 0 5px; }
.mf-vote-by { opacity: 0.85; min-width: 0; }
.mf-skip:active { transform: translateY(2px); box-shadow: none; }
.mf-me { position: relative; align-self: center; margin: 0 0 6px; font-size: 12px; font-weight: 900; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); border: 1.5px solid rgba(255, 255, 255, 0.35); }
.day .mf-me { background: rgba(255, 255, 255, 0.6); border-color: rgba(34, 29, 51, 0.25); }
/* Phones: the panel is short, so fit a whole town of cards in it. Your role and the hint
   are already shown above and below the board, and the vote list says who voted for whom. */
@media (max-width: 640px) {
  .mafia-stage.with-status .mf-sub,
  .mafia-stage .mf-me,
  .mf-p .mf-voters { display: none; }
  .mf-head { padding: 4px 8px 0; }
  .mf-grid { gap: 4px; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); }
  .mf-p { padding: 3px 2px; gap: 1px; border-radius: 10px; }
  .mf-p .pl-av { width: 26px; height: 26px; }
  .mf-tag .lbl, .mf-bubble .ico { display: none; } /* dead players' roles: icon only; bubbles: number only */
  .mf-bubble { top: 2px; right: 2px; min-width: 18px; height: 18px; line-height: 18px; font-size: 11px; padding: 0 4px; }
}
.mf-card-role { text-align: center; background: rgba(255, 255, 255, 0.1); border: 2px solid rgba(255, 255, 255, 0.25); border-radius: 18px; padding: 12px 16px; max-width: 320px; animation: rolein 0.7s cubic-bezier(.2,1.4,.4,1); }
/* Entrance animations only move and scale, never hide, so a paused animation can’t leave a card invisible. */
@keyframes rolein { from { transform: rotateY(65deg) scale(0.85); } }
@keyframes mfpop { from { transform: scale(0.8); } }
.mf-role-icon { font-size: clamp(34px, 11vw, 54px); line-height: 1; }
.mf-role-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(18px, 5.6vw, 26px); margin: 4px 0; }
.mf-card-role.role-mafia .mf-role-name { color: #ff8a7a; }
.mf-card-role.role-doctor .mf-role-name { color: #7ff0c8; }
.mf-card-role.role-detective .mf-role-name { color: #9cc2ff; }
.mf-card-role.role-sheriff .mf-role-name { color: #ffc27a; }
.mf-card-role.role-villager .mf-role-name { color: var(--sun); }
.mf-card-role p { margin: 4px 0 0; font-size: clamp(12px, 3.4vw, 14px); opacity: 0.9; }
.mf-event { text-align: center; max-width: 340px; animation: mfpop 0.4s cubic-bezier(.2,1.6,.4,1); }
.mf-deaths { display: flex; justify-content: center; gap: 16px; margin-bottom: 6px; }
.mf-death { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mf-death .pl-av { margin: 0 !important; }
.mf-event .pl-av { width: clamp(52px, 15vw, 76px); height: clamp(52px, 15vw, 76px); display: block; margin: 0 auto 6px; filter: grayscale(0.4); }
.mf-event-icon { font-size: clamp(40px, 12vw, 60px); line-height: 1; }
.mf-event-text { font-family: var(--font-display); font-weight: 600; font-size: clamp(15px, 4.6vw, 20px); margin: 6px 0; }
.mf-end { list-style: none; padding: 0; margin: 6px auto 0; max-width: 320px; text-align: left; display: flex; flex-direction: column; gap: 3px; }
.mf-end li { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.mf-end li .pl-av { width: 24px; height: 24px; flex: none; }
.mf-end li .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-end li.win .nm { color: var(--sun); font-weight: 900; }
.mf-end li.dead .nm { opacity: 0.6; text-decoration: line-through; }

/* ------------------------------------------------------- kaboom mode */
.bomb-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  overflow: hidden;
  background: #2a2342 radial-gradient(circle at 50% 50%, #3b3160 0%, #2a2342 60%, #1d1830 100%);
  color: #fff;
}
.bomb-stage.show { display: block; }
.bomb-stage.shake { animation: bombshake 0.55s; }
@keyframes bombshake {
  10% { transform: translate(-8px, 4px) rotate(-1deg); }
  25% { transform: translate(7px, -6px) rotate(1deg); }
  40% { transform: translate(-6px, -3px); }
  60% { transform: translate(5px, 5px) rotate(-0.5deg); }
  80% { transform: translate(-3px, 2px); }
}
.bomb-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 50%, #fff6c9 0%, #ffb02e 35%, rgba(255, 106, 85, 0.6) 60%, transparent 80%); }
.bomb-stage.boom .bomb-flash { animation: bombflash 0.9s ease-out; }
@keyframes bombflash { 0% { opacity: 1; transform: scale(0.4); } 100% { opacity: 0; transform: scale(1.6); } }
.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-name { font-weight: 900; font-size: clamp(10px, 2.8vw, 13px); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-lives { font-size: clamp(9px, 2.4vw, 12px); line-height: 1; letter-spacing: -1px; min-height: 1em; }
.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%); } }
.float-word {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(14px, 4.4vw, 22px);
  color: var(--mint);
  text-shadow: 0 2px 0 #000;
  pointer-events: none;
  animation: floatup 1.3s ease-out forwards;
  white-space: nowrap;
  z-index: 3;
}
.float-word.bad { color: var(--coral); }
@keyframes floatup { 0% { opacity: 0; margin-top: 0; } 15% { opacity: 1; } 100% { opacity: 0; margin-top: -60px; } }
.bomb-core { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.bomb-arrow {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 18px solid var(--sun);
  transform-origin: 0 50%;
  transition: transform 0.35s cubic-bezier(.3,1.6,.5,1);
  filter: drop-shadow(0 2px 0 #000);
  margin-top: -9px;
}
.bomb-body { position: absolute; left: 0; top: 0; width: clamp(84px, 25vw, 130px); height: clamp(84px, 25vw, 130px); transform: translate(-50%, -50%); }
.bomb-body svg { width: 100%; height: 100%; animation: bombwobble 1.2s ease-in-out infinite; }
.bomb-stage.hot .bomb-body svg { animation-duration: 0.45s; }
.bomb-stage.idle .bomb-body svg { animation: none; opacity: 0.5; }
@keyframes bombwobble { 25% { transform: rotate(-6deg) scale(1.03); } 75% { transform: rotate(6deg) scale(0.98); } }
.bomb-shell { fill: #15121f; stroke: #000; stroke-width: 3; }
.bomb-shine { fill: #fff; opacity: 0.25; }
.bomb-cap { fill: #4a4360; stroke: #000; stroke-width: 3; }
.bomb-fuse { fill: none; stroke: #c9a46b; stroke-width: 5; stroke-linecap: round; }
.bomb-spark circle { fill: var(--sun); }
.bomb-spark path { stroke: #ff8a3c; stroke-width: 3; stroke-linecap: round; }
.bomb-spark { transform-origin: 100px 12px; animation: spark 0.25s infinite alternate; }
.bomb-stage.idle .bomb-spark { display: none; }
@keyframes spark { to { transform: scale(1.35) rotate(25deg); } }
.bomb-prompt {
  position: absolute;
  left: 46%;
  top: 58%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 7vw, 34px);
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 2px 0 #000;
}
.bomb-banner {
  position: absolute;
  left: 50%;
  top: 8%;
  transform: translate(-50%, -30px);
  opacity: 0;
  background: var(--sun);
  color: var(--ink);
  border: 2px solid #000;
  border-radius: 999px;
  padding: 4px 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(12px, 3.6vw, 16px);
  white-space: nowrap;
  pointer-events: none;
  z-index: 4;
}
.bomb-banner.show { animation: banner 2.4s ease-out forwards; }
@keyframes banner {
  0% { opacity: 0; transform: translate(-50%, -30px) scale(0.6) rotate(-6deg); }
  12% { opacity: 1; transform: translate(-50%, 0) scale(1.15) rotate(3deg); }
  20% { transform: translate(-50%, 0) scale(1) rotate(0); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 0) scale(0.95); }
}
.bomb-letters { position: absolute; left: 6px; right: 6px; bottom: 5px; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.bomb-letters span { font-size: clamp(8px, 2.3vw, 11px); font-weight: 900; width: 1.4em; text-align: center; border-radius: 3px; color: rgba(255, 255, 255, 0.6); text-transform: uppercase; }
.bomb-letters span.got { color: var(--ink); background: var(--mint); }
.bomb-form { display: none; gap: 6px; width: 100%; }
.toolbar.mode-bomb .bomb-form { display: flex; }
.bomb-input {
  flex: 1;
  min-width: 0;
  border: 2.5px solid var(--edge);
  border-radius: 12px;
  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); }
.bomb-go { flex: none; width: 46px; border: 2.5px solid var(--edge); border-radius: 12px; background: var(--coral); font-size: 20px; box-shadow: 0 2px 0 var(--edge); }
.bomb-go:active { transform: translateY(2px); box-shadow: none; }

/* --------------------------------------------- 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: 2px 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: 2px solid var(--edge);
  border-radius: 10px;
  padding: 4px 8px;
  text-align: left;
  font-size: clamp(12px, 3.5vw, 15px);
}
.clue-feed li:first-child { box-shadow: 0 2px 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: 2px solid var(--edge);
  border-radius: 11px;
  background: var(--raised);
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: 0 2px 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: 2px 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: 2px solid var(--edge);
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--raised);
  font-weight: 900;
  font-size: 14px;
  box-shadow: 0 2px 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: 14px;
  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: 8px; border: 2px 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: 2px solid var(--edge);
  border-radius: 11px;
  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: 12px;
  padding: 4px;
}
.pl {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 4px;
  border-radius: 9px;
  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: 12px;
  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; }
.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; }
/* ------------------------------------------------------------ clue crew */
.crew-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  flex-direction: column;
  gap: clamp(4px, 1.2vw, 8px);
  padding: clamp(4px, 1.2vw, 8px);
  background-color: var(--paper);
  background-image: radial-gradient(var(--dots) 1px, transparent 1.2px);
  background-size: 14px 14px;
}
.crew-stage.show { display: flex; }
.cc-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px; }
.cc-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
  max-width: 96px;
  padding: 2px 8px 3px;
  border: 2px solid var(--edge);
  border-radius: 12px;
  box-shadow: 0 2px 0 var(--edge);
  line-height: 1.1;
  transition: transform 0.2s;
}
.cc-team.coral { background: var(--rose-l); }
.cc-team.mint { background: var(--mint-l); }
.cc-team b { font-family: var(--font-display); font-weight: 700; font-size: clamp(16px, 5vw, 22px); }
.cc-team span { max-width: 100%; font-size: clamp(9px, 2.6vw, 11px); font-weight: 800; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-team.turn { transform: translateY(-1px) rotate(-2deg); animation: ccturn 1.1s ease-in-out infinite alternate; }
.cc-team.coral.turn { --glow: rgba(255, 106, 85, 0.55); }
.cc-team.mint.turn { --glow: rgba(41, 201, 153, 0.55); }
.cc-team.won { background: var(--sun); }
@keyframes ccturn { from { box-shadow: 0 2px 0 var(--edge), 0 0 0 0 var(--glow); } to { box-shadow: 0 2px 0 var(--edge), 0 0 0 5px var(--glow); } }
.cc-mid { min-width: 0; text-align: center; }
.cc-sub { font-size: clamp(10px, 2.9vw, 12px); font-weight: 800; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-big { font-family: var(--font-display); font-weight: 700; font-size: clamp(15px, 4.6vw, 21px); }
.cc-wait { font-family: var(--font-display); font-weight: 600; font-size: clamp(14px, 4.2vw, 18px); color: var(--ink-soft); }
.cc-wait .dots::after { content: '…'; animation: ccdots 1.2s steps(4) infinite; display: inline-block; width: 1.2em; text-align: left; overflow: hidden; vertical-align: bottom; }
@keyframes ccdots { from { width: 0; } to { width: 1.2em; } }
.cc-clue-row { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; animation: mfpop 0.35s cubic-bezier(.2,1.6,.4,1); }
.cc-word {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(16px, 5vw, 24px);
  letter-spacing: 1px;
  padding: 0 10px;
  border: 2px solid var(--edge);
  border-radius: 10px;
  background: var(--sun-l);
  box-shadow: 0 2px 0 var(--edge);
  transform: rotate(-1.5deg);
}
.cc-word.coral { background: var(--k-coral); }
.cc-word.mint { background: var(--k-mint); }
.cc-n { flex: none; display: grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--ink); color: var(--card); font-family: var(--font-display); font-weight: 700; font-size: clamp(14px, 4vw, 18px); }

.cc-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(5, minmax(0, 1fr)); gap: clamp(3px, 1vw, 6px); perspective: 600px; }
.cc-card {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--edge);
  border-radius: 9px;
  background: var(--raised);
  box-shadow: 0 2px 0 var(--edge);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(9px, 2.6vw, 15px);
  line-height: 1.05;
  text-transform: uppercase;
  overflow: hidden;
  cursor: default;
  transition: transform 0.12s, box-shadow 0.12s;
}
.cc-card:nth-child(3n) { transform: rotate(0.6deg); }
.cc-card:nth-child(4n + 1) { transform: rotate(-0.6deg); }
.cc-card.long { font-size: clamp(8px, 2.2vw, 13px); }
.cc-card.xlong { font-size: clamp(7px, 1.9vw, 11px); }
.cc-w { max-width: 100%; text-align: center; overflow-wrap: anywhere; }
.cc-card.can { cursor: pointer; }
.cc-card.can:hover { box-shadow: 0 3px 0 var(--edge); transform: translateY(-1px); }
.cc-card.can:active { transform: translateY(2px); box-shadow: none; }
.cc-card.picked { background: var(--sun-l); box-shadow: 0 0 0 3px var(--sun), 0 2px 0 var(--edge); }
/* The captain's key: a tint and a colored edge on every unflipped card. */
.cc-card.key { border-left-width: 6px; }
.cc-card.key.k-coral { background: var(--k-coral); border-left-color: var(--coral); }
.cc-card.key.k-mint { background: var(--k-mint); border-left-color: var(--mint); }
.cc-card.key.k-neutral { background: var(--k-neutral); border-left-color: var(--k-neutral-edge); }
.cc-card.key.k-trap { background: var(--k-trap); border-left-color: var(--k-trap-edge); color: #fff; }
.cc-card.key.picked { box-shadow: 0 0 0 3px var(--sun), 0 2px 0 var(--edge); }
.cc-card.ghost { opacity: 0.75; }
/* Flipped cards: the team color with a big icon, the word tucked underneath. */
.cc-card.rev { color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18); }
.cc-card.rev.k-coral { background: var(--coral); }
.cc-card.rev.k-mint { background: var(--mint); }
.cc-card.rev.k-neutral { background: var(--k-neutral-rev); color: var(--k-neutral-rev-ink); }
.cc-card.rev.k-trap { background: var(--k-trap-rev); }
.cc-card.rev .cc-w { position: absolute; left: 2px; right: 2px; bottom: 1px; font-size: clamp(6px, 1.7vw, 9px); opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-ico { font-size: clamp(15px, 4.6vw, 26px); line-height: 1; margin-bottom: 0.4em; }
.cc-card.flip { animation: ccflip 0.55s cubic-bezier(.2,1.4,.4,1); }
@keyframes ccflip { from { transform: rotateY(90deg) scale(0.9); } }
.cc-faces { position: absolute; top: 1px; right: 1px; display: flex; }
.cc-faces .pl-av { width: clamp(11px, 3.2vw, 16px); height: clamp(11px, 3.2vw, 16px); border-radius: 50%; margin-left: -4px; animation: mfpop 0.3s cubic-bezier(.2,1.6,.4,1); }

/* Clue box and guess bar in the toolbar. */
.crew-form, .crew-tools { display: none; gap: 6px; width: 100%; align-items: center; }
.toolbar.mode-crew-clue .crew-form { display: flex; }
.toolbar.mode-crew-guess .crew-tools { display: flex; }
.crew-input {
  flex: 1;
  min-width: 0;
  border: 2.5px solid var(--edge);
  border-radius: 12px;
  padding: 7px 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--sun-l);
  outline: none;
}
.crew-input:focus { box-shadow: 0 0 0 3px rgba(41, 201, 153, 0.35); }
.crew-input.bad { animation: seatbad 0.4s; border-color: var(--coral-t); }
.crew-n { flex: none; width: 52px; border: 2.5px solid var(--edge); border-radius: 12px; padding: 6px 2px; font-family: var(--font-display); font-weight: 700; font-size: 17px; text-align: center; color: var(--ink); background: var(--field); }
.crew-go { flex: none; border: 2.5px solid var(--edge); border-radius: 12px; padding: 8px 12px; background: var(--mint); font-weight: 900; font-size: 14px; box-shadow: 0 2px 0 var(--edge); white-space: nowrap; }
.crew-go:active { transform: translateY(2px); box-shadow: none; }
.crew-status { flex: 1; min-width: 0; font-size: 13px; font-weight: 800; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#btn-crew-pass.picked { background: var(--sun); }

/* Teams box in the lobby. */
.cc-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cc-col { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 2px solid var(--edge); border-radius: 12px; }
.cc-col.coral { background: var(--rose-l); }
.cc-col.mint { background: var(--mint-l); }
.cc-col-h { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.cc-col-h small { font-family: var(--font-body); font-size: 11px; font-weight: 900; background: var(--chip); border-radius: 6px; padding: 0 5px; vertical-align: middle; }
.cc-mem { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 13px; font-weight: 800; }
.cc-mem .pl-av { flex: none; width: 22px; height: 22px; border-radius: 50%; }
.cc-mem > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-mem.me > span:last-child { color: var(--sky-t); }
.cc-empty { font-size: 12px; color: var(--muted); }
.cc-col .pill-btn { align-self: flex-start; font-size: 12px; padding: 3px 10px; margin-top: 2px; }
.cc-random { margin-top: 5px; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.cc-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cc-actions .pill-btn { font-size: 12px; padding: 4px 10px; }

/* End-of-game teams. */
.cc-end { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 420px; margin: 6px auto 0; text-align: left; }
.cc-end-col { min-width: 0; padding: 6px; border: 2px solid var(--edge); border-radius: 12px; color: var(--ink); }
.cc-end-col.coral { background: var(--rose-l); }
.cc-end-col.mint { background: var(--mint-l); }
.cc-end .mf-end { margin: 4px 0 0; }
.cc-end .mf-end li.win .nm { color: var(--ink); }
.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: 2px solid var(--edge);
  border-radius: 10px;
  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: 2px solid var(--edge);
  border-radius: 10px;
  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: 2px 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%; 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: 22px 22px 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: 3px; 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: 4px; background: var(--chip); overflow: hidden; }
.vol-meter i { display: block; height: 100%; width: 0; background: var(--mint); border-radius: 4px; 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: 12px;
  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; }
}
/* ---------------------------------------------------- home: game cards */
.play-note { margin: -6px 0 0; text-align: center; font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.play-note.hidden { display: none; }
.games { width: 100%; max-width: 720px; margin-top: 24px; }
.games h2 { font-family: var(--font-display); font-weight: 600; font-size: 24px; margin: 0; text-align: center; }
.games-sub { margin: 4px 0 12px; text-align: center; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.game-card {
  --gc: var(--coral);
  --gc-l: var(--rose-l);
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-areas: 'icon name' 'icon blurb' 'icon players';
  column-gap: 12px;
  row-gap: 2px;
  align-items: start;
  text-align: left;
  padding: 12px 14px 12px 12px;
  border: var(--bw) solid var(--edge);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 3px 0 var(--edge);
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.game-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  border-radius: calc(var(--radius) - 3px) 0 0 calc(var(--radius) - 3px);
  background: var(--gc);
}
.game-card:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--edge); }
.game-card:active { transform: translateY(3px); box-shadow: 0 0 0 var(--edge); }
.game-card:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.game-card:disabled { opacity: 0.6; cursor: wait; }
.gc-icon {
  grid-area: icon;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 26px;
  border: 2px solid var(--edge);
  border-radius: 12px;
  background: var(--gc-l);
}
.gc-name { grid-area: name; font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 1.2; }
.gc-blurb { grid-area: blurb; font-size: 13px; line-height: 1.35; color: var(--ink-soft); font-weight: 700; }
.gc-players {
  grid-area: players;
  justify-self: start;
  margin-top: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1.5px solid var(--edge);
  background: var(--gc-l);
  font-size: 12px;
  font-weight: 800;
}
.gc-coral { --gc: var(--coral); --gc-l: var(--rose-l); }
.gc-sky { --gc: var(--sky); --gc-l: var(--sky-l); }
.gc-sun { --gc: var(--sun); --gc-l: var(--sun-l); }
.gc-rose { --gc: var(--coral-d); --gc-l: var(--rose-l2); }
.gc-grape { --gc: var(--grape); --gc-l: var(--grape-l); }
.gc-mint { --gc: var(--mint); --gc-l: var(--mint-l); }
.gc-ink { --gc: var(--ink); --gc-l: var(--ink-l); }
/* Doodle Relay: a stripe of every color, passed down the line. */
.gc-relay { --gc: linear-gradient(180deg, var(--coral), var(--sun), var(--mint), var(--sky), var(--grape)); --gc-l: var(--sun-l); }
@media (max-width: 460px) {
  .games-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ theme picker */
.theme-btn { position: absolute; top: calc(10px + var(--safe-t)); right: 12px; z-index: 5; }
.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: 2px solid var(--edge);
  border-radius: 12px;
  background: var(--raised);
  box-shadow: 0 2px 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; }
.sheet .theme-label { display: block; margin: 8px 0 0; font-weight: 900; font-size: 14px; color: var(--ink-soft); text-align: center; }

/* ----------------------------------------------------------- doodle relay */
.relay-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  flex-direction: column;
  overflow: hidden;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(var(--dots) 1px, transparent 1.2px);
  background-size: 14px 14px;
}
.relay-stage.show { display: flex; }
.rl-center {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(4px, 1.4vw, 8px);
  padding: 10px 12px;
  text-align: center;
}
.rl-center > :first-child { margin-top: auto; }
.rl-center > :last-child { margin-bottom: auto; }
.rl-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 6vw, 30px); line-height: 1.1; margin: 0; }
.rl-sub { margin: 0; max-width: 420px; font-size: clamp(12px, 3.5vw, 15px); font-weight: 800; color: var(--ink-soft); }
.rl-step { margin: 2px 0 0; font-size: 12px; font-weight: 900; color: var(--muted); }
.rl-h { font-family: var(--font-display); font-weight: 600; font-size: 17px; margin: 6px 0 0; }
.rl-big { font-size: clamp(34px, 11vw, 54px); line-height: 1; animation: pop 0.4s cubic-bezier(.2,1.6,.4,1); }
.rl-wobble { animation: rlwobble 1.6s ease-in-out infinite; }
@keyframes rlwobble { 25% { transform: rotate(-8deg) scale(1.05); } 75% { transform: rotate(6deg); } }

/* intro: a little stack of bouncing sketchbooks */
.rl-books { display: flex; gap: 2px; font-size: clamp(30px, 10vw, 46px); line-height: 1; }
.rl-books span { display: inline-block; animation: rlbob 1.3s ease-in-out infinite; }
.rl-books span:nth-child(2) { animation-delay: 0.12s; }
.rl-books span:nth-child(3) { animation-delay: 0.24s; }
.rl-books span:nth-child(4) { animation-delay: 0.36s; }
@keyframes rlbob { 50% { transform: translateY(-9px) rotate(-7deg); } }
.rl-how { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 460px; margin: 2px 0; padding: 0; }
.rl-how li {
  padding: 3px 10px;
  border: 2px solid var(--edge);
  border-radius: 999px;
  box-shadow: 0 2px 0 var(--edge);
  font-size: clamp(12px, 3.4vw, 14px);
  font-weight: 900;
  animation: rlin 0.45s cubic-bezier(.2,1.5,.4,1) backwards;
}
.rl-how li:nth-child(1) { background: var(--sun-l); }
.rl-how li:nth-child(2) { background: var(--mint-l); animation-delay: 0.15s; }
.rl-how li:nth-child(3) { background: var(--sky-l); animation-delay: 0.3s; }
.rl-how li:nth-child(4) { background: var(--rose-l); animation-delay: 0.45s; }

/* passing the books on */
.rl-pass { position: relative; width: 190px; height: 64px; }
.rl-pass span { position: absolute; left: 0; bottom: 0; font-size: 40px; line-height: 1; animation: rlpass 1.3s ease-in-out infinite; }
.rl-pass span:nth-child(2) { animation-delay: 0.43s; }
.rl-pass span:nth-child(3) { animation-delay: 0.86s; }
@keyframes rlpass {
  0% { left: 0; transform: rotate(-12deg); opacity: 0; }
  20% { opacity: 1; }
  50% { transform: translateY(-20px) rotate(12deg); }
  80% { opacity: 1; }
  100% { left: calc(100% - 44px); transform: rotate(-12deg); opacity: 0; }
}

/* who's still working on their page */
.rl-progress { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 4px; max-width: 540px; }
.rl-seat { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; width: clamp(50px, 15vw, 66px); font-size: 11px; font-weight: 800; }
.rl-seat .pl-av { width: clamp(34px, 10vw, 44px); height: clamp(34px, 10vw, 44px); border: 2px solid var(--edge); background: var(--card); }
.rl-seat .nm { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-seat.me .nm { color: var(--sky-t); }
.rl-st { position: absolute; top: -5px; right: 2px; font-size: 15px; line-height: 1; }
.rl-seat.working .rl-st { animation: rlwobble 0.9s ease-in-out infinite; }
.rl-seat.done .pl-av { box-shadow: 0 0 0 3px var(--mint); }
.rl-seat.done .rl-st { animation: pop 0.35s cubic-bezier(.2,1.6,.4,1); }
.rl-seat.away, .rl-seat.gone { opacity: 0.5; }
.rl-idea { margin-top: 2px; }

/* the reveal: one sketchbook at a time, page by page */
.rl-reveal { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rl-rhead { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--card); border-bottom: 2px solid var(--line); }
.rl-rhead .pl-av { width: 34px; height: 34px; }
.rl-rhead b { display: block; font-family: var(--font-display); font-weight: 600; font-size: clamp(15px, 4.4vw, 19px); line-height: 1.1; }
.rl-rhead small { font-size: 11px; font-weight: 800; color: var(--muted); }
.rl-feed { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 12px; padding: 10px 10px 14px; }
.rl-page { width: 100%; max-width: 440px; margin: 0 auto; }
.rl-page.fresh { animation: rlin 0.5s cubic-bezier(.2,1.5,.4,1); }
@keyframes rlin { from { transform: translateY(16px) scale(0.92); opacity: 0; } }
.rl-by { display: flex; align-items: center; gap: 5px; margin-bottom: 3px; font-size: 12px; font-weight: 800; color: var(--ink-soft); min-width: 0; }
.rl-by .pl-av { width: 22px; height: 22px; }
.rl-by .nm { font-weight: 900; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.rl-by .vb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-bubble {
  position: relative;
  padding: 8px 12px;
  border: var(--bw) solid var(--edge);
  border-radius: 4px 16px 16px 16px;
  background: var(--card);
  box-shadow: 0 3px 0 var(--edge);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(16px, 4.8vw, 22px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.rl-page.first .rl-bubble { background: var(--sun-l); }
.rl-page.k-text:not(.first) .rl-bubble { background: var(--sky-l); }
.rl-pic {
  position: relative;
  aspect-ratio: 4 / 3;
  border: var(--bw) solid var(--edge);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 3px 0 var(--edge);
}
.rl-pic img { display: block; width: 100%; height: 100%; }
.rl-pic.loading::after { content: '🎨'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; animation: rlwobble 0.9s infinite; }
.rl-save { position: absolute; right: 6px; bottom: 6px; width: 34px; height: 34px; border: 2px solid var(--edge); border-radius: 10px; background: var(--raised); box-shadow: 0 2px 0 var(--edge); font-size: 16px; padding: 0; }
.rl-blank { padding: 10px; border: 2px dashed var(--line); border-radius: 12px; text-align: center; font-weight: 800; color: var(--muted); }
.rl-page.gone .rl-by { opacity: 0.6; font-style: italic; }
.rl-late { font-size: 12px; }
.rl-reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; min-height: 0; }
.rl-reacts:empty { display: none; }
.rl-reacts.bump { animation: mfpop 0.3s cubic-bezier(.2,1.6,.4,1); }
.rl-chip { padding: 0 8px; border: 1.5px solid var(--edge); border-radius: 999px; background: var(--raised); font-size: 13px; font-weight: 900; line-height: 22px; animation: mfpop 0.3s cubic-bezier(.2,1.6,.4,1); }
.rl-chip.mine { background: var(--sun); }
.rl-cover {
  margin: auto;
  min-width: 210px;
  padding: 18px 22px 16px 30px;
  text-align: center;
  border: var(--bw) solid var(--edge);
  border-radius: 6px 18px 18px 6px;
  background: linear-gradient(90deg, var(--coral) 0 12px, var(--edge) 12px 14.5px, var(--sun-l) 14.5px);
  box-shadow: var(--shadow-lg);
  transform: rotate(-2deg);
  animation: rlcover 0.6s cubic-bezier(.2,1.4,.4,1);
}
@keyframes rlcover { from { transform: perspective(600px) rotateY(70deg) rotate(-2deg); opacity: 0; } }
.rl-cover .pl-av { display: block; width: 66px; height: 66px; margin: 0 auto 6px; animation: bob 1.4s ease-in-out infinite; }
.rl-cover b { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(18px, 5.5vw, 24px); }
.rl-cover small { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.rl-fin { margin: 0 auto; padding: 4px 12px; border: 2px solid var(--edge); border-radius: 999px; background: var(--card); font-weight: 900; font-size: 13px; animation: rlin 0.5s cubic-bezier(.2,1.5,.4,1); }
.rl-float { position: absolute; bottom: 10px; z-index: 3; font-size: 30px; pointer-events: none; animation: rlfloat 1.6s ease-out forwards; }
@keyframes rlfloat {
  0% { transform: translateY(0) scale(0.5); opacity: 0; }
  15% { transform: translateY(-14px) scale(1.25); opacity: 1; }
  100% { transform: translateY(-170px) scale(1) rotate(-12deg); opacity: 0; }
}

/* the final screen */
.rl-end { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 10px 16px; text-align: center; }
.rl-awards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; width: 100%; max-width: 620px; }
.rl-award {
  padding: 8px 10px;
  border: var(--bw) solid var(--edge);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 3px 0 var(--edge);
  text-align: left;
  animation: rlin 0.5s cubic-bezier(.2,1.5,.4,1) backwards;
}
.rl-award:nth-child(2) { animation-delay: 0.15s; }
.rl-award:nth-child(3) { animation-delay: 0.3s; }
.rl-award h4 { margin: 0 0 6px; font-size: 12px; font-weight: 900; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); }
.rl-award p { margin: 6px 0 0; font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.rl-award .rl-bubble { font-size: clamp(15px, 4.4vw, 19px); }
.rl-loved { display: flex; flex-wrap: wrap; gap: 6px; }
.rl-loved > span { display: flex; align-items: center; gap: 5px; font-weight: 900; }
.rl-loved .pl-av { width: 30px; height: 30px; }
.rl-shelf { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 620px; }
.rl-shelf-book {
  --bk: var(--coral);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 76px;
  padding: 6px 4px 5px 10px;
  border: 2px solid var(--edge);
  border-radius: 4px 12px 12px 4px;
  background: linear-gradient(90deg, var(--bk) 0 7px, var(--card) 7px);
  box-shadow: 0 3px 0 var(--edge);
  font-size: 11px;
  font-weight: 900;
  transition: transform 0.1s;
}
.rl-shelf-book:nth-child(5n + 2) { --bk: var(--sun); }
.rl-shelf-book:nth-child(5n + 3) { --bk: var(--mint); }
.rl-shelf-book:nth-child(5n + 4) { --bk: var(--sky); }
.rl-shelf-book:nth-child(5n + 5) { --bk: var(--grape); }
.rl-shelf-book:hover { transform: translateY(-2px) rotate(-2deg); }
.rl-shelf-book:active { transform: translateY(2px); box-shadow: none; }
.rl-shelf-book .pl-av { width: 34px; height: 34px; }
.rl-shelf-book .nm { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-lobby { width: auto; margin-top: 6px; font-size: 17px; padding: 9px 18px; }
.sheet.tall { max-height: 88%; max-height: 88dvh; overflow-y: auto; }
.rl-album { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 4px; }

/* toolbar: the text box, reactions, and the Done button for drawings */
.relay-form, .relay-tools { display: none; gap: 6px; width: 100%; align-items: center; justify-content: center; }
.toolbar.mode-relay-text .relay-form { display: flex; }
.toolbar.mode-relay-react .relay-tools { display: flex; }
.relay-input {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border: 2.5px solid var(--edge);
  border-radius: 12px;
  background: var(--field);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  outline: none;
  -webkit-user-select: text;
  user-select: text;
}
.relay-input:focus { box-shadow: 0 0 0 3px rgba(77, 141, 255, 0.3); }
.relay-input.bad { animation: seatbad 0.4s; border-color: var(--coral-t); }
.relay-dice, .relay-go, .rl-next, .rl-react {
  flex: none;
  border: 2.5px solid var(--edge);
  border-radius: 12px;
  box-shadow: 0 2px 0 var(--edge);
  font-weight: 900;
}
.relay-dice { width: 40px; height: 40px; padding: 0; background: var(--sun); font-size: 20px; }
.relay-go { padding: 8px 14px; background: var(--mint); font-size: 14px; }
.rl-react { width: clamp(36px, 10vw, 44px); height: 40px; padding: 0; background: var(--raised); font-size: 20px; }
.rl-react.mine { background: var(--sun); }
.rl-react:disabled { opacity: 0.4; }
.rl-next { margin-left: 4px; padding: 8px 12px; background: var(--mint); font-size: 14px; white-space: nowrap; }
.relay-dice:active, .relay-go:active, .rl-next:active, .rl-react:active { transform: translateY(2px); box-shadow: none; }
.relay-done {
  justify-self: end;
  padding: 5px 12px;
  border: 2px solid var(--edge);
  border-radius: 10px;
  background: var(--mint);
  box-shadow: 0 2px 0 var(--edge);
  font-weight: 900;
  font-size: 14px;
  white-space: nowrap;
  animation: pop 0.35s cubic-bezier(.2,1.6,.4,1);
}
.relay-done: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. */
.gc-fuse { --gc: linear-gradient(180deg, var(--sun), var(--coral)); --gc-l: var(--sun-l); }
.fuse-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  overflow: hidden;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(var(--dots) 1px, transparent 1.2px);
  background-size: 14px 14px;
  --cw: clamp(44px, 12.4vw, 64px); /* card width */
}
.fuse-stage.show { display: block; }
body.wide .fuse-stage { --cw: 70px; }
body.wide .fz-seat .pl-av { width: 36px; height: 36px; }
.fuse-stage.shake { animation: fzshake 0.55s; }
@keyframes fzshake {
  10%, 50%, 90% { transform: translate(-5px, 2px) rotate(-0.6deg); }
  30%, 70% { transform: translate(5px, -2px) rotate(0.6deg); }
}
.fz-root { position: absolute; inset: 0; display: flex; flex-direction: column; gap: clamp(3px, 1vw, 6px); padding: 6px 6px 4px; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; }
.fz-fx { position: absolute; inset: 0; pointer-events: none; display: grid; place-items: center; overflow: hidden; }

/* cards */
.fz-card {
  --ink: var(--on-accent);
  position: relative;
  flex: none;
  width: var(--cw);
  height: calc(var(--cw) * 1.36);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 3px 2px;
  border: 2px solid var(--edge);
  border-radius: 9px;
  background: var(--sun);
  color: var(--on-accent);
  box-shadow: 0 2px 0 var(--edge);
  font: inherit;
  text-align: center;
}
.fz-card::before { /* an inner frame, like a printed card */
  content: '';
  position: absolute;
  inset: 3px;
  border: 1.5px solid rgba(34, 29, 51, 0.28);
  border-radius: 6px;
  pointer-events: none;
}
.fz-ci { font-size: calc(var(--cw) * 0.44); line-height: 1; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.15)); }
.fz-cn { font-size: clamp(8px, calc(var(--cw) * 0.15), 10.5px); font-weight: 900; line-height: 1.05; letter-spacing: -0.1px; }
.fz-card.c-bucket { background: var(--mint); }
.fz-card.c-veto { background: var(--coral); }
.fz-card.c-potato { background: var(--sun); }
.fz-card.c-lunch { background: var(--sky); }
.fz-card.c-spy { background: #b896ff; }
.fz-card.c-shake { background: #6fd3e6; }
.fz-card.c-please { background: #ffa2c6; }
.fz-card.junk {
  --ink: var(--ink-soft);
  color: var(--ink);
  background: var(--k-neutral);
  background-image: repeating-linear-gradient(-45deg, transparent 0 6px, var(--zebra) 6px 9px);
}
.fz-card.junk::before { border-style: dashed; border-color: var(--k-neutral-edge); }
.fz-card.c-fuse {
  color: #ffd36b;
  background: radial-gradient(circle at 50% 38%, #ff8a3d 0, #7a2414 34%, #24141e 70%);
}
.fz-card.c-fuse::before { border-color: rgba(255, 211, 107, 0.4); }
.fz-card.c-fuse .fz-ci { animation: fzflicker 0.5s infinite alternate; }
@keyframes fzflicker { to { transform: scale(1.08) rotate(-4deg); filter: drop-shadow(0 0 6px #ffb347); } }
.fz-card.empty { background: var(--card); border-style: dashed; box-shadow: none; color: var(--muted); }
.fz-card.small { --cw: clamp(36px, 10vw, 50px); }

/* 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: 2px solid var(--edge);
  border-radius: 10px;
  background: var(--card);
  box-shadow: 0 2px 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: 2px; background: var(--sun-l); }
.fz-sb {
  position: absolute;
  top: -7px;
  right: -6px;
  min-width: 20px;
  padding: 0 4px;
  border: 1.5px 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 3px 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 4px 0 var(--edge); } }
.fz-seat:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

/* the table: box, what just happened, discard pile */
.fz-table { flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 2px 2px 0; }
.fz-box, .fz-discard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; width: clamp(62px, 18vw, 92px); }
.fz-crate { width: clamp(48px, 14vw, 72px); height: auto; overflow: visible; }
.fz-crate-lid { fill: #b3713a; stroke: var(--edge); stroke-width: 2.5; stroke-linejoin: round; }
.fz-crate-body { fill: #d9944f; stroke: var(--edge); stroke-width: 2.5; }
.fz-crate-slat { fill: none; stroke: #8a5326; stroke-width: 2; }
.fz-crate-fuse { fill: none; stroke: var(--edge); stroke-width: 2.5; stroke-linecap: round; }
.fz-crate-spark { fill: #ffb347; stroke: #ff6a2b; stroke-width: 1.5; animation: fzspark 0.9s ease-in-out infinite; transform-origin: 50px 6px; }
.fuse-stage.danger .fz-crate-spark { animation-duration: 0.35s; }
@keyframes fzspark { 50% { transform: scale(1.6); opacity: 0.7; } }
.fz-bn {
  position: absolute;
  top: clamp(18px, 5.6vw, 30px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 26px;
  padding: 0 5px;
  border: 2px solid var(--edge);
  border-radius: 999px;
  background: var(--card);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(13px, 3.8vw, 17px);
  line-height: 1.2;
  text-align: center;
}
.fz-bl { font-size: clamp(9px, 2.5vw, 11px); font-weight: 800; color: var(--muted); white-space: nowrap; }
.fz-box.bump { animation: fzbump 0.4s; }
.fz-box.wobble { animation: fzwobble 0.6s; }
@keyframes fzbump { 40% { transform: translateY(-6px) scale(1.06); } }
@keyframes fzwobble { 20% { transform: rotate(-10deg); } 40% { transform: rotate(9deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(4deg); } }
.fz-mid { min-width: 0; display: flex; justify-content: center; }
.fz-news {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 9px;
  border: 2px solid var(--edge);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 2px 0 var(--edge);
  font-size: clamp(11px, 3.2vw, 14px);
  font-weight: 800;
  line-height: 1.25;
  animation: pop 0.3s cubic-bezier(.2,1.6,.4,1);
}
.fz-news:empty { display: none; }
.fz-ni { font-size: 1.5em; line-height: 1; }
.fz-news.k-boom { background: var(--rose-l); }
.fz-news.k-tuck { background: var(--sky-l); }
.fz-news.k-vetoed, .fz-news.k-veto { background: var(--rose-l2); }
.fz-news.k-defuse { background: var(--mint-l); }
.fz-news.k-steal, .fz-news.k-give { background: var(--grape-l); }

/* an action waiting out its Veto countdown */
.fz-pend { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; }
.fz-pcards { position: relative; display: flex; justify-content: center; padding: 0 10px; }
.fz-pcards .fz-card { --cw: clamp(40px, 11vw, 56px); margin-left: calc(var(--cw) * -0.55 * min(var(--i), 1)); transform: rotate(calc((var(--i) - 1) * 7deg)); animation: fzslap 0.35s cubic-bezier(.2,1.6,.4,1) backwards; animation-delay: calc(var(--i) * 0.06s); }
@keyframes fzslap { from { transform: translateY(-30px) scale(1.4) rotate(-12deg); opacity: 0; } }
.fz-pend.vetoed .fz-pcards .fz-card { filter: grayscale(0.7) brightness(0.9); }
.fz-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-14deg);
  padding: 1px 7px;
  border: 3px solid var(--coral-d);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.85);
  color: #c4291c;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(12px, 3.6vw, 16px);
  white-space: nowrap;
  animation: fzstamp 0.3s cubic-bezier(.2,1.6,.4,1);
}
.fz-pend:not(.vetoed) .fz-stamp { border-color: var(--mint-t); color: #0f7a5a; }
@keyframes fzstamp { from { transform: translate(-50%, -50%) rotate(-14deg) scale(2.2); opacity: 0; } }
.fz-pby { font-size: clamp(11px, 3.2vw, 13px); font-weight: 800; text-align: center; line-height: 1.2; }
.fz-pby small { display: block; font-size: 11px; color: var(--ink-soft); }
.fz-count { width: min(160px, 90%); height: 7px; border: 1.5px solid var(--edge); border-radius: 999px; background: var(--card); overflow: hidden; }
.fz-count i { display: block; height: 100%; background: var(--coral); transform-origin: left; animation: fzcount linear forwards; }
@keyframes fzcount { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* your private peek */
.fz-peek { flex: none; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; font-size: 12px; font-weight: 900; animation: pop 0.3s; }
.fz-pk { padding: 1px 6px; border: 1.5px solid var(--edge); border-radius: 7px; background: var(--sun); color: var(--on-accent); font-size: 13px; }
.fz-pk.c-fuse { background: #2a1720; color: #ffd36b; }
.fz-pk.junk { background: var(--k-neutral); color: var(--ink); }
.fz-pk.c-bucket { background: var(--mint); }
.fz-pk.c-veto { background: var(--coral); }
.fz-pk.c-lunch { background: var(--sky); }

.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; }

/* what you can do right now */
.fz-panel {
  flex: none;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 46px;
  padding: 2px 2px 0;
  animation: pop 0.25s;
}
.fz-say { margin: 0; flex: 1 1 100%; text-align: center; font-size: clamp(12px, 3.4vw, 14px); font-weight: 800; line-height: 1.3; }
.fz-info { flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; font-size: clamp(11px, 3.1vw, 13px); line-height: 1.25; }
.fz-info b { font-family: var(--font-display); font-weight: 600; font-size: clamp(14px, 4vw, 17px); }
.fz-info span { color: var(--ink-soft); font-weight: 700; }
.fz-btns { display: flex; gap: 6px; flex: none; }
.fz-panel .btn { width: auto; padding: 6px 12px; font-size: clamp(15px, 4.2vw, 18px); line-height: 1.1; display: flex; flex-direction: column; align-items: center; }
.fz-panel .btn small { font-family: var(--font-body); font-size: 10.5px; font-weight: 800; opacity: 0.8; }
.fuse-stage.my-turn .fz-draw { animation: fzdraw 1.4s ease-in-out infinite; }
@keyframes fzdraw { 50% { transform: translateY(-2px) scale(1.03); } }
.fz-veto { flex: 1 1 100%; max-width: 360px; font-size: clamp(19px, 5.6vw, 24px) !important; padding: 8px 12px !important; animation: fzveto 0.6s ease-in-out infinite; }
@keyframes fzveto { 50% { transform: scale(1.04) rotate(-1deg); } }
.fz-tucks { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.fz-tucks .pill-btn { font-size: 12.5px; padding: 4px 9px; }
.fz-range { display: flex; align-items: center; gap: 8px; flex: 1 1 100%; justify-content: center; }
.fz-range input { flex: 1; max-width: 220px; accent-color: var(--coral); }
.fz-range .fz-go { font-size: 12.5px; padding: 4px 9px; background: var(--sun-l); white-space: nowrap; }
.fz-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 4px; flex: 1 1 100%; }
.fz-name {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 5px;
  border: 2px solid var(--edge);
  border-radius: 9px;
  background: var(--sun);
  color: var(--on-accent);
  font-size: 15px;
  box-shadow: 0 2px 0 var(--edge);
}
.fz-name span { font-size: 10px; font-weight: 900; line-height: 1.05; text-align: left; }
.fz-name.c-bucket { background: var(--mint); }
.fz-name.c-veto { background: var(--coral); }
.fz-name.c-lunch { background: var(--sky); }
.fz-name.c-spy { background: #b896ff; }
.fz-name.c-shake { background: #6fd3e6; }
.fz-name.c-please { background: #ffa2c6; }
.fz-name.junk { background: var(--k-neutral); color: var(--ink); }
.fz-name:active { transform: translateY(2px); box-shadow: none; }

/* your hand: fans out, overlapping when there are lots of cards */
.fz-hand {
  flex: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px 6px 4px;
  margin: 0 -6px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  --gap: clamp(calc(var(--cw) * -0.58), calc((100% - 12px - var(--n) * var(--cw)) / max(1, var(--n) - 1)), 5px);
}
.fz-hand::-webkit-scrollbar { display: none; }
.fz-hand .fz-card { cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; animation: fzdeal 0.35s cubic-bezier(.2,1.4,.4,1) backwards; }
.fz-hand .fz-card + .fz-card { margin-left: var(--gap); }
.fz-hand .fz-card:hover { transform: translateY(-4px); z-index: 1; }
.fz-hand .fz-card.sel { transform: translateY(-11px); box-shadow: 0 0 0 3px var(--sun-t), 0 4px 0 var(--edge); z-index: 2; }
.fz-hand.giving .fz-card { animation: fzgive 1.1s ease-in-out infinite; }
.fz-hand.giving .fz-card.sel { animation: none; }
.fz-hand.empty { min-height: 40px; align-items: center; font-size: 13px; font-weight: 800; color: var(--muted); }
@keyframes fzdeal { from { transform: translateY(40px) rotate(8deg); opacity: 0; } }
@keyframes fzgive { 50% { transform: translateY(-4px); } }

/* splashes */
.fz-splash { grid-area: 1 / 1; font-size: clamp(64px, 22vw, 130px); line-height: 1; animation: fzsplash 1.3s ease-out forwards; }
.fz-splash.card { font-size: clamp(48px, 15vw, 90px); animation-duration: 0.9s; }
.fz-splash.boom { animation: fzboom 1.3s ease-out forwards; }
@keyframes fzsplash { 0% { transform: scale(0.3); opacity: 0; } 20% { transform: scale(1.15); opacity: 1; } 70% { opacity: 1; } 100% { transform: scale(1.4) translateY(-30px); opacity: 0; } }
@keyframes fzboom { 0% { transform: scale(0.2) rotate(-20deg); opacity: 0; } 15% { transform: scale(1.6) rotate(8deg); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }

/* 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-crate-big .fz-crate { width: clamp(70px, 22vw, 110px); animation: fzwobble 1.6s ease-in-out infinite; }
.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: 2px solid var(--edge);
  border-radius: 999px;
  box-shadow: 0 2px 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: 2px solid var(--edge); border-radius: 10px; 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: 2px; 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) {
  .fz-seat.turn .pl-av, .fz-seat.can, .fz-crate-spark, .fz-crate-big .fz-crate, .fuse-stage.my-turn .fz-draw, .fz-veto, .fz-hand.giving .fz-card, .fz-confetti i, .fz-card.c-fuse .fz-ci { animation: none; }
}

/* ========================================================== playing cards */
/* Shared by every card game (public/js/cards.js). Size: set --pc-w on any parent. Faces are
   cream with ink in both themes, like a real card on the table; the outline and hard shadow
   match Doodlebop's buttons. */
.pc {
  --pc-ink: #221d33;
  --pc-red: #dc3d2e;
  position: relative;
  flex: none;
  display: block;
  width: var(--pc-w, 64px);
  aspect-ratio: 5 / 7;
  padding: 0;
  font: 700 calc(var(--pc-w, 64px) * 0.25) / 1 var(--font-display);
  color: var(--pc-ink);
  background: #fffdf8;
  border: 0.16em solid var(--edge);
  border-radius: 0.68em;
  box-shadow: 0 0.19em 0 var(--edge);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s cubic-bezier(0.3, 1.5, 0.5, 1), box-shadow 0.18s, outline-color 0.18s;
}
.pc.pc-red { color: var(--pc-red); }
.pc-pip { display: block; fill: currentColor; }
.pc-ix {
  position: absolute;
  top: 0.3em;
  left: 0.36em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.08em;
  font-size: 1.12em;
  line-height: 0.88;
}
.pc-ix .pc-pip { width: 0.62em; height: 0.62em; }
.pc-ix.pc-ten { letter-spacing: -0.07em; }
.pc-ix-b { top: auto; left: auto; bottom: 0.3em; right: 0.36em; transform: rotate(180deg); }
.pc-mid { position: absolute; inset: 0; display: grid; place-items: center; }
.pc-big { width: 1.9em; height: 1.9em; }
.pc-ace { width: 2.5em; height: 2.5em; }
.pc-court { display: flex; flex-direction: column; align-items: center; gap: 0.06em; font-size: 2.05em; line-height: 0.85; }
.pc-court .pc-pip { width: 0.42em; height: 0.42em; }

/* The back: the title logo on ink, the same in both themes. */
.pc-back { background: #221d33; }
.pc-logo { position: absolute; inset: 0; width: 100%; height: 100%; }
.pc-frame { fill: none; stroke: #ffc83a; stroke-width: 1.3; stroke-dasharray: 3 2.6; opacity: 0.85; }
.pc-l1, .pc-l2 { font-family: var(--font-display); font-weight: 700; }
.pc-l1 { font-size: 12.5px; fill: #ff6a55; }
.pc-l2 { font-size: 14px; fill: #ffc83a; }
.pc-wave { fill: none; stroke: #4d8dff; stroke-width: 2.2; stroke-linecap: round; }

/* Tappable cards (rendered as <button>). */
button.pc { cursor: pointer; }
button.pc:focus-visible { outline: 0.19em solid var(--sky); outline-offset: 0.12em; }
.pc.is-sel { transform: translateY(-1.25em); outline: 0.19em solid var(--sun); outline-offset: 0.1em; box-shadow: 0 0.38em 0 var(--edge); }
.pc.is-dim { filter: saturate(0.5) brightness(0.92); }
@media (hover: hover) { button.pc:not(.is-sel):hover { transform: translateY(-0.3em); } }

/* A hand: overlapping cards on a gentle arc (PlayingCards.fan sets each card's tilt). */
.pc-hand { display: flex; justify-content: center; align-items: flex-end; padding: 1.1em 0.6em 1em; }
.pc-hand > .pc + .pc { margin-left: calc(var(--pc-w, 64px) * var(--pc-overlap, -0.42)); }
.pc-hand.my-turn { animation: pc-nudge 0.5s ease-out; }

/* A face-down deck: three backs stacked a couple of pixels apart. */
.pc-deck { position: relative; width: var(--pc-w, 64px); aspect-ratio: 5 / 7; }
.pc-deck > .pc { position: absolute; inset: 0; }
.pc-deck > .pc:nth-child(1) { translate: 4px 4px; }
.pc-deck > .pc:nth-child(2) { translate: 2px 2px; }
.pc-count { position: absolute; right: -0.5em; bottom: -0.55em; z-index: 5; min-width: 1.7em; padding: 0.1em 0.35em; border: 0.13em solid var(--edge); border-radius: 999px; background: var(--sun); color: var(--on-accent); font: 700 calc(var(--pc-w, 64px) * 0.2) / 1.2 var(--font-display); text-align: center; }

/* A pile: cards dropped on top of each other at small random tilts. */
.pc-pile { position: relative; width: var(--pc-w, 64px); aspect-ratio: 5 / 7; }
.pc-pile > .pc { position: absolute; inset: 0; }
.pc-slot { position: absolute; inset: 0; border: 0.16em dashed var(--line); border-radius: 0.68em; font-size: calc(var(--pc-w, 64px) * 0.25); }

/* Motion: deal in from the deck, land on the pile, flip, and a nudge when it's your turn. */
.pc-dealing { animation: pc-deal 0.42s cubic-bezier(0.25, 1.35, 0.5, 1) both; }
.pc-landing { animation: pc-land 0.34s cubic-bezier(0.25, 1.3, 0.5, 1) both; }
.pc-flip-out { animation: pc-flip-out 0.13s ease-in forwards; }
.pc-flip-in { animation: pc-flip-in 0.2s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes pc-deal { from { transform: translate(var(--pc-fx, 0), var(--pc-fy, -120px)) rotate(-18deg) scale(0.8); opacity: 0; } 30% { opacity: 1; } }
@keyframes pc-land { from { transform: translate(var(--pc-fx, 0), var(--pc-fy, 80px)) scale(1.12); } 70% { transform: scale(0.97); } }
@keyframes pc-flip-out { to { transform: scaleX(0.04); } }
@keyframes pc-flip-in { from { transform: scaleX(0.04); } }
@keyframes pc-nudge { 30% { transform: translateY(-6px); } 60% { transform: translateY(1px); } }
@media (prefers-reduced-motion: reduce) {
  .pc, .pc-dealing, .pc-landing, .pc-flip-out, .pc-flip-in, .pc-hand.my-turn { animation: none !important; transition: none; }
}

/* ============================================================ least count */
/* The table: seats, the deck / open pile / wild card, a short log, your total and your hand.
   Cards come from the shared playing-card styles above. */
.gc-least { --gc: linear-gradient(180deg, var(--sky), var(--grape)); --gc-l: var(--sky-l); }
.least-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  overflow: hidden;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(var(--dots) 1px, transparent 1.2px);
  background-size: 14px 14px;
  --pc-w: clamp(46px, 13.4vw, 66px);
  --pc-s: calc(var(--pc-w) * 0.74);
}
.least-stage.show { display: block; }
body.wide .least-stage { --pc-w: 72px; }
.least-stage.shake { animation: fzshake 0.55s; }
.lc-root { position: absolute; inset: 0; display: flex; flex-direction: column; gap: clamp(3px, 1vw, 6px); padding: 6px 6px 4px; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; }

.lc-seats .fz-sc { gap: 3px; }
.lc-pts { margin-left: 3px; padding: 0 4px; border-radius: 6px; background: var(--ink-l); color: var(--ink); font-weight: 900; }
.lc-pts.hot { background: var(--rose-l); color: var(--coral-t); }

.lc-table { flex: 1 0 auto; min-height: calc(var(--pc-w) * 1.4 + 30px); display: flex; align-items: center; justify-content: center; gap: calc(var(--pc-w) * 0.42); }
.lc-spot { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 4px; border: 0; background: none; font: inherit; color: inherit; border-radius: 12px; -webkit-tap-highlight-color: transparent; }
button.lc-spot { cursor: default; }
.least-stage.my-turn button.lc-spot { cursor: pointer; }
.lc-spot.ready .pc-deck, .lc-spot.ready .pc-pile { animation: lcready 1.1s ease-in-out infinite; }
.lc-spot.ready .lc-lbl { color: var(--sky-t); }
.lc-lbl { max-width: calc(var(--pc-w) * 1.7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 900; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); }
.lc-wild-card { position: relative; display: block; }
.lc-wild-card .pc { --pc-w: var(--pc-s); rotate: 6deg; }
.lc-ribbon { position: absolute; left: 50%; bottom: -7px; z-index: 2; translate: -50% 0; padding: 1px 7px; border: 2px solid var(--edge); border-radius: 999px; background: var(--grape); color: #fff; font: 700 10px/1.2 var(--font-display); letter-spacing: 1px; }
@keyframes lcready { 50% { transform: translateY(-4px); } }

.lc-log { flex: none; }
.lc-me { flex: none; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 34px; }
.lc-total { font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.lc-total b { margin-left: 3px; font-family: var(--font-display); font-size: 20px; color: var(--ink); }
.lc-show { width: auto; margin: 0; padding: 5px 16px; font-size: 16px; }
.lc-show.locked { font-size: 13px; color: var(--muted); }
.least-stage.my-turn .lc-show:not(.locked) { animation: lcready 1.1s ease-in-out infinite; }
.lc-hand { flex: none; padding-top: 1.3em; }
.lc-hand .pc.is-idle { cursor: default; }
.lc-watch { flex: none; padding: 10px; text-align: center; font-weight: 800; color: var(--muted); }
.lc-intro { flex: none; padding: 2px 8px; }
.lc-intro > :first-child { margin-top: 0; }

.lc-reveal { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 2px; }
.lc-verdict { padding: 6px 14px; border: var(--bw) solid var(--edge); border-radius: 12px; box-shadow: 0 3px 0 var(--edge); font-family: var(--font-display); font-weight: 700; font-size: clamp(16px, 4.6vw, 22px); text-align: center; animation: pop 0.4s cubic-bezier(0.2, 1.6, 0.4, 1); }
.lc-verdict.good { background: var(--mint-l); }
.lc-verdict.bad { background: var(--rose-l); }
.lc-rows { list-style: none; margin: 0; padding: 0; width: min(580px, 100%); display: flex; flex-direction: column; gap: 4px; --pc-w: 26px; }
.lc-rows li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto 26px 34px 34px; align-items: center; gap: 6px; padding: 4px 6px; border: 2px solid var(--edge); border-radius: 10px; background: var(--card); font-size: 13px; font-weight: 800; }
.lc-rows li.me { background: var(--sky-l); }
.lc-rows .lc-head { padding: 0 8px; border: 0; background: none; font-size: 10px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); }
.lc-rows .pl-av { width: 24px; height: 24px; }
.lc-rn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-mini { display: flex; }
.lc-mini .pc { border-width: 1.5px; box-shadow: none; }
.lc-mini .pc + .pc { margin-left: -10px; }
.lc-rt, .lc-ra, .lc-rp { font-family: var(--font-display); font-weight: 700; text-align: right; }
.lc-ra.plus { color: var(--coral-t); }
.lc-ra.zero { color: var(--mint-t); }
.lc-tag { margin-left: 5px; padding: 0 5px; border-radius: 6px; font-size: 10px; }
.lc-tag.good { background: var(--mint-l); color: var(--mint-t); }
.lc-tag.bad { background: var(--rose-l); color: var(--coral-t); }
@media (max-width: 380px) {
  .lc-rows li { grid-template-columns: 22px minmax(0, 1fr) auto 24px 30px 30px; gap: 4px; font-size: 12px; }
  .lc-rows { --pc-w: 22px; }
  .lc-mini .pc + .pc { margin-left: -9px; }
}
@media (prefers-reduced-motion: reduce) {
  .lc-spot.ready .pc-deck, .lc-spot.ready .pc-pile, .least-stage.my-turn .lc-show, .least-stage.shake, .lc-verdict { animation: none; }
}
/* 7+ players: the seats take two rows, so the rest of the table tightens up. */
.least-stage.crowd .fz-seat .pl-av { width: 20px; height: 20px; }
.least-stage.crowd .lc-table { min-height: calc(var(--pc-s) * 1.4 + 22px); }
.least-stage.crowd .lc-table .pc-deck, .least-stage.crowd .lc-table .pc-pile { --pc-w: var(--pc-s); }
.least-stage.crowd .lc-wild-card .pc { --pc-w: calc(var(--pc-s) * 0.85); }
.least-stage.crowd .lc-spot { gap: 5px; }
.least-stage.crowd .lc-log li + li { display: none; }
.least-stage.crowd .lc-hand { padding-top: 1em; }
/* Short screens: the hand matters most, so the log goes and the seats lose their faces. */
.least-stage { container-type: size; }
@container (max-height: 360px) {
  .lc-log { display: none; }
  .lc-me { min-height: 28px; }
  .lc-hand { padding-top: 0.8em; }
  .least-stage.crowd .fz-seat .pl-av { display: none; }
}
.lc-wild .lc-lbl { text-transform: none; letter-spacing: 0.3px; }
/* Phones: fan the revealed hands tighter so names keep their room. */
.lc-rows li { grid-template-columns: 24px minmax(52px, 1fr) auto 26px 34px 34px; }
@media (max-width: 480px) {
  .lc-rows { --pc-w: 22px; }
  .lc-mini .pc + .pc { margin-left: -15px; }
}

/* ============================================================== accounts */
.acct { margin-top: 12px; padding: 10px 10px 12px; border: 2px dashed var(--line); border-radius: 14px; text-align: center; }
.acct-why, .acct-who { margin: 0 0 8px; font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.acct-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.acct-btn { flex: 1 1 0; min-width: 120px; max-width: 200px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 12px; border: var(--bw) solid var(--edge); border-radius: 12px; background: var(--card); color: var(--ink); box-shadow: 0 3px 0 var(--edge); font: 700 15px/1 var(--font-display); cursor: pointer; transition: transform 0.12s, box-shadow 0.12s; }
.acct-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--edge); }
.acct-btn svg { width: 18px; height: 18px; flex: none; }
.acct-apple { background: #000; color: #fff; }
.acct-btn.hidden { display: none; }

/* My stats sheet */
.st-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 12px; }
.st-tile { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border: 2px solid var(--edge); border-radius: 12px; background: var(--sun-l); }
.st-tile b { font-family: var(--font-display); font-size: 24px; line-height: 1.1; }
.st-tile span { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.st-tile:nth-child(2) { background: var(--mint-l); }
.st-tile:nth-child(3) { background: var(--sky-l); }
.st-table { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.st-table li { display: grid; grid-template-columns: minmax(0, 1fr) 54px 46px 46px; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 9px; background: var(--paper); font-size: 13px; font-weight: 800; }
.st-table li > span:not(:first-child) { text-align: right; }
.st-table .st-head { background: none; padding: 0 8px; font-size: 10px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); }
.st-recent li { grid-template-columns: minmax(0, 1fr) auto 60px 56px; }
.st-mode { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-place.won { color: var(--mint-t); }
.st-ago { color: var(--muted); font-size: 12px; }
.st-sub { margin: 8px 0 6px; font-family: var(--font-display); font-weight: 600; font-size: 16px; text-align: center; }
.lc-hand .pc.is-match::after { content: "\26A1"; position: absolute; top: -0.6em; right: -0.5em; z-index: 2; display: grid; place-items: center; width: 1.45em; height: 1.45em; border: 0.12em solid var(--edge); border-radius: 50%; background: var(--sun); font-size: 0.8em; line-height: 1; }
.lc-open.match .lc-lbl { color: var(--sun-t); }
.lc-open.match .pc-pile { animation: lcready 0.8s ease-in-out infinite; filter: drop-shadow(0 0 6px var(--sun)); }
@media (prefers-reduced-motion: reduce) { .lc-open.match .pc-pile { animation: none; } }

/* ================================================================== poker */
/* The table: seats (stack, bet, dealer button), the board and pot, your two cards, and the
   Fold / Check-or-Call / Raise bar. Cards come from the shared playing-card styles. */
.gc-poker { --gc: linear-gradient(180deg, var(--mint), var(--sky)); --gc-l: var(--mint-l); }
.poker-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  overflow: hidden;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(var(--dots) 1px, transparent 1.2px);
  background-size: 14px 14px;
  --pc-w: clamp(44px, 12.6vw, 62px);
  container-type: size;
}
.poker-stage.show { display: block; }
body.wide .poker-stage { --pc-w: 68px; }
.pk-root { position: absolute; inset: 0; display: flex; flex-direction: column; gap: clamp(3px, 1vw, 6px); padding: 6px 6px 4px; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; }

.pk-seats { row-gap: 14px; padding-bottom: 6px; }
.pk-seat { position: relative; padding-bottom: 8px; }
.pk-seat .fz-sn { max-width: 100%; }
.pk-stack { font-family: var(--font-display); font-weight: 700; font-size: clamp(10px, 2.8vw, 12px); line-height: 1.1; color: var(--ink-soft); }
.pk-bet { position: absolute; left: 50%; bottom: -9px; z-index: 2; translate: -50% 0; padding: 0 6px; border: 2px solid var(--edge); border-radius: 999px; background: var(--sun); color: var(--on-accent); font: 700 11px/1.35 var(--font-display); white-space: nowrap; }
.pk-tag { position: absolute; top: -8px; left: -4px; padding: 0 5px; border-radius: 6px; background: var(--ink-l); color: var(--ink-soft); font-size: 9.5px; font-weight: 900; line-height: 1.5; text-transform: uppercase; }
.pk-dealer { position: absolute; top: -7px; right: -6px; z-index: 2; display: grid; place-items: center; width: 18px; height: 18px; border: 2px solid var(--edge); border-radius: 50%; background: #fffdf8; color: #221d33; font: 700 10px/1 var(--font-display); }
.pk-seat.won { background: var(--mint-l); box-shadow: 0 0 0 2.5px var(--mint), 0 3px 0 var(--edge); }
.pk-shown { display: flex; justify-content: center; margin-top: 2px; --pc-w: 20px; }
.pk-shown .pc { border-width: 1.5px; box-shadow: none; }
.pk-shown .pc + .pc { margin-left: -6px; }

.pk-table { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px 0 4px; }
.pk-board { display: flex; gap: calc(var(--pc-w) * 0.1); }
.pk-slot { width: var(--pc-w); aspect-ratio: 5 / 7; border: 2px dashed var(--line); border-radius: calc(var(--pc-w) * 0.17); }
.pk-pot { padding: 2px 12px; border: 2px solid var(--edge); border-radius: 999px; background: var(--card); font-size: 13px; font-weight: 800; color: var(--ink-soft); text-transform: capitalize; }
.pk-pot b { font-family: var(--font-display); font-size: 16px; color: var(--ink); }
.pk-win { max-width: 94%; padding: 5px 12px; border: 2px solid var(--edge); border-radius: 12px; background: var(--mint-l); box-shadow: 0 3px 0 var(--edge); font-weight: 800; font-size: 13px; text-align: center; animation: pop 0.4s cubic-bezier(0.2, 1.6, 0.4, 1); }

.pk-me { flex: none; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 2px 0; }
.pk-hole { display: flex; --pc-w: clamp(54px, 15vw, 74px); }
.pk-hole .pc + .pc { margin-left: calc(var(--pc-w) * -0.25); }
.pk-mine { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pk-mystack { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.pk-mystack i { display: block; font-family: var(--font-body, inherit); font-style: normal; font-size: 11px; font-weight: 800; color: var(--muted); }
.pk-best { align-self: flex-start; padding: 1px 8px; border-radius: 8px; background: var(--sky-l); color: var(--sky-t); font-size: 12px; font-weight: 900; }

.pk-acts { flex: none; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; padding: 2px 4px 6px; }
.pk-acts .btn { width: auto; flex: 1 1 0; max-width: 150px; margin: 0; padding: 9px 8px; font-size: 16px; }
.pk-acts.pk-quiet { padding-top: 0; }
.pk-raise { flex-direction: column; align-items: stretch; }
.pk-presets { display: flex; gap: 5px; justify-content: center; }
.pk-presets button { flex: 1; max-width: 90px; padding: 5px 4px; border: 2px solid var(--edge); border-radius: 10px; background: var(--card); color: var(--ink); font: 700 12px/1 var(--font-display); cursor: pointer; }
.pk-range { width: 100%; accent-color: var(--sun); }
.pk-row { display: flex; gap: 6px; justify-content: center; }
.pk-end { margin-left: auto; padding: 4px 10px; border: 2px solid var(--line); border-radius: 10px; background: none; color: var(--muted); font: 800 12px/1 var(--font-body, inherit); cursor: pointer; }
.pk-net { font-family: var(--font-display); font-weight: 700; }
.pk-net.up { color: var(--mint-t); }
.pk-net.down { color: var(--coral-t); }
.pk-intro { flex: 1 1 auto; }

/* Big tables (8+): the seats take two rows, so everything else tightens. */
.poker-stage.crowd .fz-seat .pl-av { width: 20px; height: 20px; }
.poker-stage.crowd .pk-table { gap: 6px; padding-top: 12px; }
.poker-stage.crowd { --pc-w: clamp(40px, 11.4vw, 58px); }
@container (max-height: 400px) {
  .pk-table { padding-top: 8px; gap: 5px; }
  .pk-hole { --pc-w: clamp(46px, 13vw, 60px); }
  .poker-stage.crowd .pk-seat .pl-av { display: none; }
}
@media (prefers-reduced-motion: reduce) { .pk-win { animation: none; } }

/* Coins on the home page */
.wallet { margin-top: 10px; padding-top: 10px; border-top: 2px dashed var(--line); }
.wallet-coins { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 800; color: var(--ink-soft); }
.wallet-coins b { font-family: var(--font-display); font-size: 22px; color: var(--ink); }
.wallet-note { margin: 6px 0 0; font-size: 11px; font-weight: 700; color: var(--muted); }
.home-foot { margin: 18px 0 6px; text-align: center; font-size: 12px; font-weight: 800; }
.home-foot a { color: var(--muted); }
/* The action bar stays in view, even when a crowded table has to scroll. */
.pk-acts { position: sticky; bottom: 0; z-index: 3; margin-top: auto; background: var(--paper); box-shadow: 0 -6px 8px -6px rgba(0, 0, 0, 0.08); }
.pk-raise { gap: 6px; }
.pk-raise .pk-row { align-items: center; }
.pk-raise .pk-row .pk-range { flex: 1; min-width: 0; }
.pk-raise .pk-row .btn { flex: none; max-width: none; min-width: 120px; }
.pk-presets .pk-x { flex: none; width: 34px; background: var(--paper); }
.poker-stage.crowd .pk-hole { --pc-w: clamp(42px, 12vw, 56px); }
@container (max-height: 400px) { .poker-stage.crowd .pk-hole { --pc-w: clamp(38px, 10.5vw, 48px); } .poker-stage.crowd .pk-mystack { font-size: 15px; } }

/* Poker hand rankings pop-up */
.pk-potrow { display: flex; align-items: center; gap: 6px; }
.pk-help { padding: 3px 9px; border: 2px solid var(--edge); border-radius: 999px; background: var(--sky-l); color: var(--sky-t); font: 800 12px/1.3 var(--font-body, inherit); cursor: pointer; }
.pk-help-big { width: auto; margin: 2px auto 0; padding: 7px 16px; font-size: 15px; }
button.pk-best { border: 0; font-family: inherit; cursor: pointer; }
.ph-pop { position: fixed; inset: 0; z-index: 60; display: none; place-items: center; padding: 14px; background: rgba(20, 16, 32, 0.5); }
.ph-pop.open { display: grid; animation: phfade 0.15s ease-out; }
.ph-card { width: min(440px, 100%); max-height: min(86dvh, 720px); overflow-y: auto; padding: 12px 14px 14px; border: var(--bw) solid var(--edge); border-radius: 18px; background: var(--card); color: var(--ink); box-shadow: 0 5px 0 var(--edge); animation: pop 0.22s cubic-bezier(0.2, 1.5, 0.4, 1); --pc-w: 28px; }
.ph-head { position: sticky; top: -12px; z-index: 2; margin: -12px -14px 6px; padding: 10px 14px 4px; background: var(--card); border-bottom: 2px solid var(--line); }
.ph-row { display: flex; align-items: center; justify-content: space-between; }
.ph-head h3 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.ph-x { width: 34px; height: 34px; border: 2px solid var(--edge); border-radius: 50%; background: var(--paper); color: var(--ink); font-size: 15px; font-weight: 900; cursor: pointer; }
.ph-now { margin: 2px 0 4px; font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.ph-now b { color: var(--sky-t); }
.ph-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.ph-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 8px; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); }
.ph-list li.mine { border-color: var(--edge); background: var(--sun-l); box-shadow: 0 3px 0 var(--edge); }
.ph-rank { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--muted); text-align: center; }
.ph-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.ph-text b { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.ph-text i { align-self: flex-start; margin: 1px 0; padding: 0 6px; border-radius: 6px; background: var(--sun); color: var(--on-accent); font-size: 10px; font-style: normal; font-weight: 900; text-transform: uppercase; letter-spacing: 0.5px; }
.ph-text span { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.ph-cards { display: flex; }
.ph-cards .pc { border-width: 1.5px; box-shadow: none; }
.ph-cards .pc + .pc { margin-left: -9px; }
.ph-cards .pc.is-dim { opacity: 0.4; filter: grayscale(0.6); }
.ph-tips { margin: 10px 0 0; font-size: 12px; font-weight: 700; color: var(--ink-soft); line-height: 1.45; }
@keyframes phfade { from { opacity: 0; } }
@media (max-width: 370px) {
  .ph-card { --pc-w: 24px; }
  .ph-cards .pc + .pc { margin-left: -9px; }
  .ph-text span { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) { .ph-pop.open, .ph-card { animation: none; } }

/* The Broke Bench (home page wallet) */
.wallet-bench { margin: 8px 0 0; padding: 8px 10px; border: 2px solid var(--edge); border-radius: 12px; background: var(--rose-l); color: var(--ink); font-size: 12.5px; font-weight: 700; line-height: 1.4; text-align: left; }
.wallet-bench b { font-weight: 900; }
