@font-face {
  font-family: 'Departure Mono';
  src: url('/fonts/departure-mono.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face { font-family: 'Silkscreen'; src: url('/fonts/silkscreen-bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
/* Fallback sized close to Departure Mono to keep layout shift low while it loads */
@font-face { font-family: 'Pixel Fallback'; src: local('Courier New'), local('Courier'); size-adjust: 100%; }

:root {
  --abyss: #140b22;
  --deep: #20113a;
  --mid: #3b2058;
  --panel: rgb(38 18 60 / 0.9);
  --panel-solid: #2a1544;
  --line: rgb(240 190 220 / 0.22);
  --line-strong: rgb(240 190 220 / 0.45);
  --edge: #12081f;
  --rim: #7a3f72;
  --ink: #fff4ea;
  --ink-soft: #dcc3d4;
  --ink-mute: #b596b4;
  --glow: #f7d070;
  --coral: #f2789c;
  --sun: #7fe3d6;
  --pearl: #f3efe6;
  --radius: 0;
  --radius-sm: 0;
  --title: 'Silkscreen', ui-monospace, monospace;
  --display: 'Departure Mono', 'Pixel Fallback', ui-monospace, monospace;
  --body: 'Departure Mono', 'Pixel Fallback', ui-monospace, monospace;
  --mono: 'Departure Mono', 'Pixel Fallback', ui-monospace, monospace;
  /* chunky pixel frame: dark outline, inner rim, hard drop shadow */
  --px-frame: 0 0 0 3px var(--edge), inset 0 0 0 2px rgb(255 255 255 / 0.06), 6px 6px 0 3px rgb(0 0 0 / 0.35);
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

[hidden] { display: none !important; } /* .btn and friends set display, which would beat the attribute */
*, *::before, *::after { box-sizing: border-box; border-radius: 0 !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
body {
  margin: 0;
  background: var(--abyss);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--body);
  -webkit-font-smoothing: none;
  font-synthesis: none;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--glow); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #ffe6a8; }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; letter-spacing: 0; margin: 0 0 0.6em; text-wrap: balance; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 4.4vw, 2.8rem); text-shadow: 3px 3px 0 var(--edge); }
h2 { font-size: clamp(1.3rem, 2.8vw, 1.9rem); text-shadow: 2px 2px 0 var(--edge); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1.1em; text-wrap: pretty; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--glow); color: var(--abyss); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- header / footer ---------- */
.site-header {
  position: absolute; inset: 0 0 auto; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px var(--gutter);
}
.site-header.solid { position: sticky; top: 0; background: #1b0d30; border-bottom: 3px solid var(--edge); box-shadow: 0 3px 0 rgb(255 255 255 / 0.05); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 1rem/1 var(--display); text-shadow: 2px 2px 0 var(--edge); }
.brand svg { width: 30px; height: 30px; shape-rendering: crispEdges; }
.brand b { color: var(--sun); font-weight: 700; }
.nav { display: flex; gap: 8px; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font: 400 0.75rem/1 var(--display); padding: 10px 12px; background: rgb(38 18 60 / 0.85); box-shadow: 0 0 0 2px var(--edge), inset 0 -3px 0 rgb(0 0 0 / 0.3); }
.nav a:hover, .nav a[aria-current='page'] { background: var(--mid); color: var(--ink); }
.nav .cta { background: var(--glow); color: #35190a; font-weight: 700; box-shadow: 0 0 0 2px var(--edge), inset 0 -3px 0 rgb(0 0 0 / 0.25), inset 0 3px 0 rgb(255 255 255 / 0.35); }
.nav .cta:hover { background: #ffe19a; color: #35190a; }
.menu-btn { display: none; }
@media (max-width: 760px) {
  .nav { display: none; position: absolute; top: 64px; right: var(--gutter); left: var(--gutter); flex-direction: column; align-items: stretch; gap: 10px; background: var(--panel-solid); box-shadow: var(--px-frame); padding: 12px; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 12px; }
  .menu-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; box-shadow: 0 0 0 2px var(--edge), inset 0 -3px 0 rgb(0 0 0 / 0.3); background: rgb(38 18 60 / 0.85); color: var(--ink); }
}

.site-footer { border-top: 3px solid var(--edge); padding: 48px var(--gutter) 40px; color: var(--ink-mute); font-size: 0.92rem; background: #150a24; }
.site-footer .cols { max-width: 1100px; margin: 0 auto; display: grid; gap: 28px; grid-template-columns: 1.4fr repeat(3, 1fr); }
.site-footer h2 { font-size: 0.75rem; color: var(--sun); margin-bottom: 12px; text-shadow: none; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer .fine { max-width: 1100px; margin: 32px auto 0; font-size: 0.82rem; }
.site-footer .fine + .fine { margin-top: 8px; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } .site-footer .cols > :first-child { grid-column: 1 / -1; } }

/* ---------- buttons, inputs, chips ---------- */
.btn {
  --b: var(--glow);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px;
  font: 700 1rem/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase;
  border: 0; background: var(--b); color: #35190a;
  box-shadow: 0 0 0 3px var(--edge), inset 0 -4px 0 rgb(0 0 0 / 0.28), inset 0 4px 0 rgb(255 255 255 / 0.35), 4px 4px 0 3px rgb(0 0 0 / 0.35);
  cursor: pointer; text-decoration: none; transition: transform 0.06s, filter 0.12s;
}
.btn:hover { filter: brightness(1.1); color: #35190a; }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 3px var(--edge), inset 0 4px 0 rgb(0 0 0 / 0.28), 1px 1px 0 3px rgb(0 0 0 / 0.35); }
.btn.ghost { background: var(--panel-solid); color: var(--ink); box-shadow: 0 0 0 3px var(--edge), inset 0 0 0 2px var(--rim), inset 0 -4px 0 rgb(0 0 0 / 0.3), 4px 4px 0 3px rgb(0 0 0 / 0.35); }
.btn.ghost:hover { background: var(--mid); color: var(--ink); }
.btn.coral { --b: var(--coral); color: #2a0804; }
.btn.big { min-height: 58px; padding: 0 28px; font-size: 1rem; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; font: 400 0.75rem/1.4 var(--display); border: 2px solid currentColor; }
.field {
  width: 100%; min-height: 54px; padding: 0 16px;
  border: 0; box-shadow: 0 0 0 3px var(--edge), inset 0 0 0 2px var(--rim), inset 3px 3px 0 2px rgb(0 0 0 / 0.35); background: #170a28; color: var(--ink);
  font: 500 1.15rem/1 var(--body);
}
.field::placeholder { color: var(--ink-mute); }
.field:focus { outline: none; box-shadow: 0 0 0 3px var(--edge), inset 0 0 0 2px var(--glow), 0 0 0 6px rgb(247 208 112 / 0.25); }

/* ---------- content sections ---------- */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: 72ch; }
.section { padding: clamp(56px, 8vw, 96px) 0; border-top: 3px solid var(--edge); }
.section.alt { background: #1d0f33; }
.eyebrow { font: 400 0.75rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--glow); margin-bottom: 14px; display: block; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 62ch; }
.grid { display: grid; gap: 16px; }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--panel-solid); box-shadow: var(--px-frame); padding: 22px; margin: 3px; }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card .num { font: 700 0.75rem/1 var(--mono); color: var(--sun); display: block; margin-bottom: 10px; }

.tier-table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.tier-table th, .tier-table td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tier-table th { font: 600 0.75rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); }
.tier-table td:nth-child(2), .tier-table td:nth-child(3) { font-family: var(--mono); white-space: nowrap; }
.tier-name { font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.tier-name { font-family: var(--display); font-size: 0.75rem; }
.tier-name::before { content: ''; width: 10px; height: 10px; background: currentColor; box-shadow: 2px 2px 0 var(--edge); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* phones: each tier becomes a compact stacked row instead of a sideways-scrolling table */
@media (max-width: 599px) {
  .tier-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tier-table, .tier-table tbody, .tier-table td { display: block; }
  .tier-table tr { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 6px 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .tier-table td { padding: 0; border: 0; }
  .tier-table td:nth-child(2)::after { content: ' pts'; color: var(--ink-mute); }
  .tier-table td:nth-child(3) { color: var(--glow); }
  .tier-table td:nth-child(4) { grid-column: 1 / -1; color: var(--ink-soft); font-size: 0.95rem; }
}

.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 36px 16px 0; font: 700 1.15rem/1.35 var(--body); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 12px; font: 400 1.6rem/1 var(--body); color: var(--glow); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); }

.page-hero { padding: 120px 0 56px; background: linear-gradient(180deg, #110b2b 0 16%, #1f1347 16% 30%, #371b62 30% 44%, #5a2473 44% 58%, #883278 58% 72%, #b94671 72% 86%, #e26766 86% 100%); border-bottom: 6px solid #fbb565; box-shadow: 0 3px 0 var(--edge); }
.page-hero h1 { color: #fff3dc; }
.page-hero p { color: #f3dff0; font-size: 1.15rem; max-width: 64ch; }
.crumbs { font-size: 0.85rem; color: var(--ink-mute); margin-bottom: 18px; }
.crumbs a { color: var(--ink-soft); }
.article h2 { margin-top: 1.8em; }
.article ul, .article ol { padding-left: 1.2em; }
.article li { margin-bottom: 0.4em; }
.callout { border-left: 6px solid var(--glow); background: rgb(247 208 112 / 0.08); padding: 16px 20px; margin: 24px 0; box-shadow: 0 0 0 2px var(--edge); }
.callout p:last-child { margin: 0; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--pearl); color: #0b0b24; padding: 12px 18px; font-weight: 600; box-shadow: 0 0 0 3px var(--edge), 4px 4px 0 3px rgb(0 0 0 / 0.4); z-index: 60; transition: 0.25s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%); }
/* Shared game UI: prompt card, answer bar, timer, answer sheet */
  /* play */
  .prompt-card, .reveal-card {
    width: min(720px, 100%); background: rgb(32 14 50 / 0.94); border: 0; margin: 3px;
    padding: clamp(20px, 3.4vw, 34px); box-shadow: var(--px-frame);
  }
  .p-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; font: 400 0.75rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--coral); }
  .p-meta .chip { color: var(--glow); }
  .p-text { font: 600 clamp(1.5rem, 3.6vw, 2.3rem)/1.2 var(--body); letter-spacing: 0; margin: 0 0 12px; text-wrap: balance; }
  .p-hint { font: 400 0.75rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); margin: 0; }
  .p-feedback { margin: 12px 0 0; color: var(--coral); font-weight: 600; }
  .p-feedback:empty { display: none; }
  .answer-bar { width: min(820px, 100%); display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; background: rgb(32 14 50 / 0.94); padding: 12px; margin: 3px; box-shadow: var(--px-frame); }
  .answer-bar .field { min-height: 56px; font-size: 1.15rem; }
  .answer-bar .btn { min-height: 56px; }
  .answer-bar.nope { animation: nope 0.35s; }
  @keyframes nope { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
  .timer { position: relative; width: 58px; height: 58px; }
  .timer svg { width: 58px; height: 58px; transform: rotate(-90deg); }
  .timer svg { shape-rendering: crispEdges; }
  .timer .track { fill: #170a28; stroke: #12081f; stroke-width: 7; }
  .timer .ring { fill: none; stroke: var(--glow); stroke-width: 6; stroke-linecap: butt; stroke-dasharray: 6 2; transition: stroke 0.3s; }
  .timer span { position: absolute; inset: 0; display: grid; place-items: center; font: 700 1rem/1 var(--display); font-variant-numeric: tabular-nums; }
  .hurry .timer .ring { stroke: var(--coral); }
  .hurry .timer span { color: var(--coral); animation: pulse 1s infinite; }
  /* last 5 seconds: a soft red glow breathes in from the page edges, once a second. Never blocks taps. */
  body:has(.hurry)::after {
    content: ''; position: fixed; inset: 0; z-index: 60; pointer-events: none;
    background: radial-gradient(ellipse at center, rgb(255 60 70 / 0.05) 35%, rgb(255 50 60 / 0.34) 100%);
    animation: alarm 1s ease-in-out infinite;
  }
  @keyframes alarm { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
  @media (prefers-reduced-motion: reduce) { body:has(.hurry)::after { animation: none; opacity: 0.6; } }
  @keyframes pulse { 50% { transform: scale(1.12); } }
  @media (max-width: 640px) {
    .answer-bar { grid-template-columns: auto 1fr auto; }
    .skip-btn { grid-column: 1 / -1; min-height: 40px !important; }
    .gauge { min-width: 0; padding: 6px 10px; }
    .gauge b { font-size: 1.1rem; white-space: nowrap; }
    .pips i { width: 10px; height: 10px; }
  }

  .sheet { display: grid; gap: 10px; margin-top: 12px; }
  .sheet-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: baseline; font-size: 0.95rem; }
  .sheet-answers { color: var(--ink-soft); }
  .sheet-answers .mine { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--tc); }
  .sheet-answers em { color: var(--ink-mute); font-style: normal; font-size: 0.85em; }
  @media (max-width: 640px) { .sheet-row { grid-template-columns: 1fr; gap: 4px; } }


  /* ---- touch play: question and answer bar stay together at the top, above the on-screen keyboard ---- */
  @media (pointer: coarse) {
    body:has(.stage:is([data-state='play'], [data-state='reveal'])) .site-header,
    body:has(.mp:is([data-state='round'], [data-state='hose'], [data-state='reveal'])) .site-header { display: none; }
    .prompt-card .p-hint { display: none; }
    .stage .hud { top: max(10px, env(safe-area-inset-top)); }
    /* question at the top, answer bar just above the keyboard (--kb, set in keyboard.ts): open ocean in between */
    .stage .play { justify-content: space-between; gap: 10px; padding-top: calc(max(10px, env(safe-area-inset-top)) + 82px); padding-bottom: calc(var(--kb, 0px) + 14px); }
    .stage .play .prompt-card { padding: 12px 16px; }
    .stage .play .p-text { margin-bottom: 0; }
    .stage .play .p-feedback { margin-top: 6px; font-size: 0.95rem; line-height: 1.3; }
    .stage .play .answer-bar { padding: 10px; }
    body .stage[data-state='play'] .sound-btn { top: 42%; bottom: auto; left: auto; right: 10px; }
    .stage[data-state='play'][data-typing] .sound-btn { display: none; }
    .mp .round-grid .prompt-card { padding: 12px 16px; }
    .mp .round-grid .p-text { font-size: clamp(1.2rem, 2.6vw, 1.6rem); margin-bottom: 0; }
    .mp .hs-event { font-size: 0.9rem; line-height: 1.3; margin-top: 6px; }
    .mp .answer-bar { padding: 10px; }
  }
  /* phone keyboard open: one-row answer bar and no category line, so the ocean still shows in between */
  @media (pointer: coarse) and (max-width: 640px) {
    .stage[data-typing] .play .p-meta { display: none; }
    .stage[data-typing] .play .p-text { font-size: 1.1rem; }
    .stage[data-typing] .play .answer-bar { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 7px; padding: 8px; }
    .stage[data-typing] .play .answer-bar .btn { grid-column: auto; min-height: 46px !important; padding-inline: 9px; font-size: 0.8rem; }
    .stage[data-typing] .play .answer-bar .field { min-width: 0; padding-inline: 9px; font-size: 16px; }
    .stage[data-typing] .play .timer, .stage[data-typing] .play .timer svg { width: 42px; height: 42px; }
  }
  /* small phones: about 290px is left above the keyboard, and a wrong-answer line must fit there too */
  @media (pointer: coarse) and (max-height: 620px) {
    .stage .hud { top: 6px; }
    .stage .play { padding-top: 86px; gap: 8px; }
    .stage .play .prompt-card, .mp .round-grid .prompt-card { padding: 8px 14px; }
    .stage .play .p-meta { display: none; } /* the prompt number is already in the HUD */
    .mp .round-grid .p-meta { margin-bottom: 8px; }
    .stage .play .p-text, .mp .round-grid .p-text { font-size: 1.1rem; }
    .stage .play .answer-bar, .mp .answer-bar { padding: 8px; }
    .mp .answer-bar .field, .mp .answer-bar .btn { min-height: 48px; }
    .mp .hs-event { font-size: 0.8rem; }
  }
  /* landscape phones: barely 150px is left above the keyboard, so only the question and the bar stay */
  @media (pointer: coarse) and (orientation: landscape) and (max-height: 500px) {
    body .stage[data-state='play'] .hud, .mp .hs-event, .mp .round-grid .p-meta { display: none; }
    .stage .play { padding-top: 8px; gap: 6px; }
    .stage .play .prompt-card, .mp .round-grid .prompt-card { padding: 6px 14px; width: min(700px, 100%); }
    .stage .play .p-text, .mp .round-grid .p-text { font-size: 1.05rem; }
    .stage .play .answer-bar, .mp .answer-bar { padding: 6px; }
    body .stage[data-state='play'] .sound-btn { display: none; }
  }

  .mp { position: relative; isolation: isolate; overflow: hidden; min-height: calc(100svh - var(--head, 76px)); background: linear-gradient(180deg, #19143f, #2c1c4e 70%, #140b22); }
  #mp-ocean { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0; transition: opacity 0.6s; }
  .mp.live #mp-ocean { opacity: 1; }
  .mp-depth { position: absolute; right: var(--gutter); top: 16px; background: rgb(32 14 50 / 0.92); padding: 8px 14px; text-align: right; box-shadow: 0 0 0 3px var(--edge), inset 0 0 0 2px var(--rim); }
  .mp-depth span { display: block; font: 600 0.75rem/1 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 4px; }
  .mp-depth b { font: 700 1.5rem/1 var(--display); color: var(--glow); }
  .mp[data-state='menu'] .mp-depth { display: none; }
  .mp-layer { display: none; min-height: calc(100svh - var(--head, 76px)); padding: 80px var(--gutter) 40px; align-items: center; justify-content: center; }
  .mp:is([data-state='menu'], [data-state='lobby'], [data-state='ended'], [data-state='hose']) .mp-depth { display: none; }
  .mp[data-state='hose'] .hose,
  .mp[data-state='joining'] .joining, .mp[data-state='menu'] .menu, .mp[data-state='lobby'] .lobby, .mp[data-state='round'] .round, .mp[data-state='reveal'] .reveal, .mp[data-state='ended'] .ended { display: flex; }
  .mp-card { width: min(680px, 100%); background: rgb(32 14 50 / 0.94); padding: clamp(22px, 4vw, 38px); margin: 3px; box-shadow: var(--px-frame); }
  .mp-card.wide { width: min(820px, 100%); }
  .mp h1 { font-size: clamp(2rem, 5vw, 3rem); }
  /* invited players only see the room, not the guide under it */
  html.invited #mp ~ *, #mp:not([data-state='menu']) ~ * { display: none; }
  body:has(#mp:not([data-state='menu'])) .site-footer { display: none; }
  .mp[data-state='joining'] .mp-depth { display: none; }
  .inv { text-align: center; }
  .inv [hidden] { display: none; }
  .inv .row { justify-content: center; margin-top: 22px; }
  .inv-title { font: 700 clamp(1.4rem, 5vw, 2rem)/1.2 var(--display); color: var(--sun); margin: 0 0 8px; }
  .inv-wait { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
  .inv-wait[hidden] { display: none; }
  .inv-wait i { width: 12px; height: 12px; background: var(--glow); box-shadow: 0 0 0 2px var(--edge); animation: hiss 0.9s steps(2) infinite; }
  .inv-wait i:nth-child(2) { animation-delay: 0.3s; } .inv-wait i:nth-child(3) { animation-delay: 0.6s; }
  .lobby-name { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 16px 0; }
  .lobby-name label { grid-column: 1 / -1; font-size: 0.85rem; color: var(--ink-mute); }
  .lobby-name .field { min-height: 46px; min-width: 0; }
  .mp .sub { color: var(--ink-soft); }
  .mp .lbl { display: block; font-size: 0.85rem; color: var(--ink-mute); margin: 18px 0 6px; }
  .mp-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 10px; }
  .mode-note { color: var(--ink-soft); font-size: 0.92rem; margin: 0 0 24px; }
  .mode-note b { color: var(--sun); }
  .game-pick { display: block; font-size: 0.8rem; color: var(--ink-mute); margin-bottom: 4px; }
  .opts.off { opacity: 0.4; pointer-events: none; }
  .hs-turn { font: 700 0.75rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
  .mp.myturn .hs-turn { color: var(--coral); }
  .hs-event { color: var(--ink-soft); min-height: 1.4em; margin: 10px 0 0; }
  .hs-event b { font-weight: 700; }
  .hose-gauge { display: flex; gap: 4px; align-items: center; padding: 0 8px; }
  .hose-gauge i { width: 10px; height: 26px; background: var(--glow); box-shadow: 0 0 0 2px var(--edge); animation: hiss 0.9s steps(2) infinite; }
  .hose-gauge i:nth-child(2) { animation-delay: 0.3s; } .hose-gauge i:nth-child(3) { animation-delay: 0.6s; }
  .mp.myturn .hose-gauge i { background: var(--coral); animation-duration: 0.45s; }
  @keyframes hiss { 50% { transform: scaleY(0.5); opacity: 0.5; } }
  .mp.myturn #hs-form { box-shadow: 0 0 0 3px var(--coral), 0 0 30px rgb(255 120 100 / 0.35); }
  .hs-used { margin-top: 14px; background: rgb(32 14 50 / 0.9); padding: 14px 16px; box-shadow: var(--px-frame); }
  .hs-used h2 { font-size: 0.9rem; margin: 0 0 10px; color: var(--ink-mute); }
  #hs-used { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
  #hs-used li { padding: 6px 10px; background: rgb(255 255 255 / 0.05); box-shadow: inset 0 -3px 0 var(--tc, var(--edge)); font-size: 0.92rem; }
  #hs-used li small { color: var(--ink-mute); margin-left: 6px; }
  .hs-players li.holder { outline: 2px solid var(--coral); }
  .hs-players li.out { opacity: 0.35; text-decoration: line-through; }
  .hs-players .air { letter-spacing: 2px; }
  .hs-pop { margin-top: 14px; background: rgb(40 10 30 / 0.95); padding: 18px; box-shadow: 0 0 0 3px var(--coral), var(--px-frame); }
  .hs-pop .boom { font: 700 1.3rem/1 var(--display); text-transform: uppercase; color: var(--coral); margin: 0 0 8px; }
  .mp-split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; border-top: 1px solid var(--line); padding-top: 22px; }
  .mp-split h2 { font-size: 1.15rem; }
  .mp-split .field { min-height: 46px; margin-bottom: 10px; }
  .mp-split .btn { width: 100%; }
  .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .opts label { font-size: 0.8rem; color: var(--ink-mute); }
  .field.code { text-transform: uppercase; letter-spacing: 0.4em; font-family: var(--mono); text-align: center; }
  .hint { color: var(--sun); font-size: 0.9rem; margin-top: 8px; }
  .code-wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 10px 0; }
  .code-wrap span { color: var(--ink-mute); font-size: 0.85rem; }
  .code-wrap b { font: 800 2.5rem/1 var(--mono); letter-spacing: 0.2em; color: var(--sun); }
  .mp-players { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 6px; }
  .mp-players li { display: flex; justify-content: space-between; padding: 10px 14px; border-radius: 12px; background: rgb(255 255 255 / 0.04); }
  .mp-players li.me { outline: 1px solid var(--glow); }
  .mp-players li.gone { opacity: 0.4; }
  .mp-players small { color: var(--sun); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; margin-left: 6px; }
  .mp-players .lock { color: var(--glow); font-weight: 600; }
  .mp-players i { color: var(--ink-mute); }
  .status { color: var(--ink-soft); font-family: var(--mono); font-size: 0.9rem; }
  .row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
  .round-grid { width: min(1100px, 100%); display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; }
  .round-grid .prompt-card { width: 100%; margin-bottom: 14px; }
  .mp-bar { width: 100%; grid-template-columns: auto 1fr auto !important; }
  .side { background: rgb(32 14 50 / 0.94); padding: 16px; box-shadow: var(--px-frame); }
  .side h2 { font-size: 1rem; margin: 0; }
  .locked { color: var(--ink-soft); margin-top: 12px; }
  .results { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 6px; }
  .results li { display: grid; grid-template-columns: 1fr 1.5fr auto; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 12px; background: rgb(255 255 255 / 0.04); }
  .results li.me { outline: 1px solid var(--glow); }
  .results small { color: var(--ink-mute); }
  .results .echo { color: var(--coral); font-weight: 700; }
  .results .pg { font: 700 1rem/1 var(--mono); color: var(--glow); }
  .reacts { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
  .reacts button { font-size: 1.3rem; width: 44px; height: 44px; border: 0; box-shadow: 0 0 0 2px var(--edge), inset 0 0 0 2px var(--rim); background: rgb(255 255 255 / 0.04); cursor: pointer; }
  .reacts button:hover { background: rgb(255 255 255 / 0.1); }
  .float-react { position: absolute; bottom: 20px; font-size: 2rem; animation: floatup 2.2s ease-out forwards; pointer-events: none; z-index: 10; }
  @keyframes floatup { to { transform: translateY(-60vh) scale(1.3); opacity: 0; } }
  .podium { list-style: none; padding: 0; display: grid; gap: 8px; margin: 16px 0; }
  .podium li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: rgb(255 255 255 / 0.05); font-size: 1.1rem; }
  .podium li.p1 { background: linear-gradient(90deg, rgb(127 227 214 / 0.18), transparent); border: 1px solid rgb(127 227 214 / 0.4); }
  .podium .medal { font-size: 1.6rem; }
  .podium li.me, .rest li.me { outline: 1px solid var(--glow); }
  .rest { list-style: none; padding: 0; display: grid; gap: 4px; color: var(--ink-soft); }
  .rest li { display: flex; justify-content: space-between; padding: 6px 14px; border-radius: 10px; }
  @media (max-width: 760px) {
    .round-grid { grid-template-columns: 1fr; }
    .mp-split { grid-template-columns: 1fr; }
    .mp-choices { grid-template-columns: 1fr 1fr; }
    #btn-hose { grid-column: 1 / -1; }
    .results li { grid-template-columns: 1fr auto; }
    .results .pa { grid-column: 1 / -1; grid-row: 2; }
  }

  /* ---- compact multiplayer: every screen fits a phone without scrolling ---- */
  .menu-card, .lobby-card { width: min(520px, 100%); padding: 20px; display: grid; gap: 14px; }
  .mp .menu-card h1 { font-size: clamp(1.15rem, 4.6vw, 1.6rem); line-height: 1.25; margin: 0; }
  .name-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; }
  .name-row label { font-size: 0.85rem; color: var(--ink-mute); }
  .mp .name-row .field { min-height: 44px; }
  .mp-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .mp-tabs button { min-height: 44px; padding: 6px 4px; border: 0; cursor: pointer; font: 400 0.8rem/1.1 var(--display); color: var(--ink-soft); background: var(--panel-solid); box-shadow: 0 0 0 2px var(--edge), inset 0 -3px 0 rgb(0 0 0 / 0.35); }
  .mp-tabs button[aria-selected='true'] { color: #0d2b33; background: var(--sun); box-shadow: 0 0 0 2px var(--edge), inset 0 -3px 0 #45a89c; }
  .mp-tabs button:focus-visible, .mode-card:focus-visible { outline: 3px solid var(--glow); outline-offset: 2px; }
  .pane { display: grid; gap: 10px; min-height: 226px; align-content: start; }
  .mode-card { display: grid; gap: 6px; padding: 14px 16px; text-align: left; border: 0; cursor: pointer; color: var(--ink); background: var(--mid); font: inherit; box-shadow: 0 0 0 2px var(--edge), inset 6px 0 0 var(--mc), inset 0 -4px 0 rgb(0 0 0 / 0.3); padding-left: 22px; }
  .mode-card:hover { filter: brightness(1.15); }
  .mode-card:active { transform: translateY(2px); }
  .mode-card b { font: 700 1.05rem/1 var(--display); color: var(--mc); }
  .mode-card span { font-size: 0.85rem; line-height: 1.25; color: var(--ink-soft); }
  .menu-card .game-pick { margin: 0; }
  .menu-card .field { width: 100%; }
  .menu-card .hint { margin: 0; text-align: center; }
  .lobby-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font-size: 0.8rem; color: var(--ink-soft); }
  .lobby-head .eyebrow { margin: 0; flex: none; }
  .lobby-head #lobby-meta { text-align: right; }
  .lobby-card .code-wrap { margin: 0; padding: 14px; justify-content: space-between; flex-wrap: nowrap; background: rgb(255 255 255 / 0.05); box-shadow: 0 0 0 2px var(--edge); }
  .lobby-card .code-wrap span { display: block; margin-bottom: 6px; font-size: 0.75rem; }
  .lobby-card .code-wrap b { font-size: 1.6rem; letter-spacing: 0.1em; }
  .lobby-card .code-wrap .btn { padding: 0 14px; font-size: 0.85rem; }
  .lobby-card .mp-players { margin: 0; max-height: 32svh; overflow-y: auto; padding: 2px; }
  .lobby-card .ps { display: none; }
  .lobby-rename summary { cursor: pointer; padding: 8px 0; font-size: 0.85rem; color: var(--glow); list-style: none; }
  .lobby-card .lobby-name { margin: 4px 0 0; }
  .lobby-card .status { margin: 0; }
  .lobby-actions { margin: 0; flex-wrap: nowrap; }
  .lobby-actions .big { flex: 1; }
  .reacts { display: grid; grid-template-columns: repeat(8, 1fr); max-width: 420px; }
  .reacts button { width: auto; }
  @media (max-width: 760px) {
    .mp .mp-layer { padding: 14px 12px 18px; }
    .mp .mp-layer:is(.reveal, .ended, .joining) { align-items: center; }
    .mp[data-state='reveal'] .mp-depth { display: none; }
    .mp-card { padding: 18px; }
    .mp .mp-card h2 { font-size: 1.15rem; margin-bottom: 4px; }
    /* divers as small tiles instead of a long list */
    .round-grid { gap: 10px; }
    .side { padding: 10px; }
    .side h2 { display: none; }
    .side .mp-players { margin: 0; grid-template-columns: 1fr 1fr; max-height: 30svh; overflow-y: auto; padding: 2px; }
    .side .mp-players li { padding: 7px 9px; font-size: 0.8rem; flex-wrap: wrap; gap: 2px 6px; min-width: 0; }
    .side .pn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
    .hs-used { margin-top: 10px; padding: 10px; max-height: 24svh; overflow-y: auto; }
    #hs-used li { padding: 4px 8px; font-size: 0.8rem; }
    .results { margin: 10px 0; max-height: 46svh; overflow-y: auto; padding: 2px; }
    .results li { padding: 7px 10px; gap: 3px 10px; font-size: 0.9rem; }
    .reacts { gap: 4px; margin-bottom: 8px; }
    .reacts button { height: 38px; font-size: 1.1rem; padding: 0; }
    .podium { margin: 10px 0; } .podium li { padding: 9px 12px; font-size: 0.95rem; }
    .rest { max-height: 26svh; overflow-y: auto; }
    .ended .row .btn { flex: 1; }
  }
  /* touch devices hide the site header during a round (game.css), so the sea fills the whole screen */
  @media (pointer: coarse) { .mp:is([data-state='round'], [data-state='hose'], [data-state='reveal']) { --head: 0px; } }

  /* ---- playing: same layout as the solo game. Question on top, answer bar at the bottom, open sea in between ---- */
  .mp:is([data-state='round'], [data-state='hose'], [data-state='reveal']) { height: calc(100svh - var(--head, 76px)); min-height: 0; }
  .mp .mp-layer:is(.round, .hose) { height: 100%; min-height: 0; padding: 24px var(--gutter) 28px; align-items: stretch; }
  .mp .round-grid { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
  .round-grid > div:first-child { display: contents; }
  .mp .round-grid .prompt-card { width: min(600px, 100%); margin: 3px; padding: clamp(16px, 2.4vw, 24px) clamp(18px, 3vw, 28px); background: rgb(32 14 50 / 0.82); }
  .mp .round-grid .p-text { font-size: clamp(1.2rem, 2.6vw, 1.6rem); margin-bottom: 6px; }
  .mp .round-grid .p-meta { margin-bottom: 10px; }
  .mp .round-grid .answer-bar { order: 5; margin-top: auto; flex: none; width: min(700px, 100%); }
  .mp .round-grid .answer-bar :is(.field, .btn) { min-height: 48px; min-width: 0; }
  .mp .round-grid .timer, .mp .round-grid .timer svg { width: 50px; height: 50px; }
  .mp .hs-used, .mp .hs-pop { width: min(600px, 100%); margin: 0; min-height: 0; overflow-y: auto; }
  .mp .hs-used { max-height: 20svh; flex: 0 1 auto; order: 3; }
  .mp .hs-pop { order: 4; flex: 0 1 auto; }
  .hose-gauge { flex: none; }
  .mp .mp-depth { z-index: 2; }
  .mp .side { order: 2; }
  .mp .hs-pop:not([hidden]) ~ .hs-used, .round-grid:has(.hs-pop:not([hidden])) .hs-used { display: none; }
  @media (min-width: 1101px) {
    .mp .side { position: absolute; top: 24px; left: var(--gutter); width: 210px; max-height: 70%; overflow-y: auto; }
    .side .mp-players { margin: 10px 0 0; }
    .side .mp-players li { padding: 8px 10px; font-size: 0.85rem; flex-wrap: wrap; gap: 2px 6px; }
  }
  /* no room beside the question: divers become one sideways strip under it */
  @media (max-width: 1100px) {
    .mp .side { width: min(600px, 100%); padding: 6px; flex: none; }
    .side h2 { display: none; }
    .mp .side .mp-players { margin: 0; padding: 2px; display: flex; gap: 6px; overflow-x: auto; max-height: none; scrollbar-width: none; }
    .mp .side .mp-players li { flex: 0 0 auto; padding: 5px 9px; font-size: 0.8rem; gap: 6px; flex-wrap: nowrap; }
    .side .pn { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .mp[data-state='round'] .mp-depth { display: none; }
  }
  @media (max-width: 760px) {
    .mp .mp-layer:is(.round, .hose) { padding: max(12px, env(safe-area-inset-top)) 12px 14px; }
    .mp .round-grid { gap: 8px; }
    .mp .round-grid .answer-bar { gap: 7px; padding: 8px; }
    .mp .round-grid .answer-bar .btn { padding-inline: 11px; font-size: 0.85rem; }
    .mp .round-grid .answer-bar .field { padding-inline: 10px; font-size: 16px; }
    .mp .hose-gauge { padding: 0 2px; }
    .mp .hs-used { padding: 8px 10px; max-height: 15svh; }
    .mp .hs-used h2 { margin-bottom: 6px; font-size: 0.75rem; }
  }
  @media (pointer: coarse) {
  }
  @media (pointer: coarse) and (orientation: landscape) and (max-height: 500px) {
    .mp .mp-layer:is(.round, .hose) { padding-top: 8px; }
    .mp .round-grid .prompt-card { width: min(700px, 100%); padding: 6px 14px; }
    .mp .round-grid .side { display: none; }
    .mp .hs-used { max-height: 44px; padding: 4px 8px; } .mp .hs-used h2 { display: none; }
  }

  /* results: the dive plays first with nothing over it, then a bottom sheet keeps the diver in view */
  .mp .mp-layer.reveal { height: 100%; min-height: 0; padding: 14px 12px 18px; align-items: flex-end; }
  .mp .reveal .mp-card { max-height: min(60%, var(--sheet, 60%)); overflow-y: auto; padding: 16px clamp(16px, 3vw, 28px); animation: rise 0.3s ease; }
  .mp .reveal .results { max-height: none; margin: 10px 0; }
  .mp .reveal .results li { padding: 7px 12px; }
  .mp .reveal .mp-card h2 { font-size: 1.15rem; margin-bottom: 4px; }
  .mp.diving .reveal .mp-card { display: none; }
  .mp.diving { cursor: pointer; }
  .mp.diving::after { content: 'Tap to skip'; position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); font: 400 0.75rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: rgb(255 255 255 / 0.5); }
  .mp[data-state='reveal'] .mp-depth { display: block; }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } }

  /* ---- nothing moves while you type: every text slot has a fixed height and the keyboard's space is always reserved ---- */
  .mp .round-grid .p-text { min-height: 1.2em; }
  .mp .slot { height: 2.8em; overflow: hidden; line-height: 1.4; }
  .mp .slot > p { margin: 0; line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .mp .slot > [hidden], .mp .slot > .p-feedback:empty, .mp .slot > .p-feedback:not(:empty) + p { display: none; }
  .mp .answer-bar.nope { animation: wrong 0.6s; }
  @keyframes wrong { 0%, 60% { box-shadow: 0 0 0 4px var(--coral); } }
  .mp .hurry .timer span, .mp.hurry .timer span { animation: none; }
  .mp .hs-used { height: 112px; max-height: none; flex: none; }
  .mp .hs-pop { position: absolute; z-index: 4; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(600px, calc(100% - 24px)); max-height: 52%; }
  .round-grid:has(.hs-pop:not([hidden])) .hs-used { display: block; visibility: hidden; }
  .mp .hs-pop > :last-child { margin-bottom: 0; }
  @media (pointer: coarse) {
    html:has(.mp:is([data-state='round'], [data-state='hose'])) { overflow: hidden; overscroll-behavior: none; }
    .mp .mp-layer:is(.round, .hose) { padding-bottom: 0; }
    /* the space under the bar belongs to the keyboard; the diver list waits there when it is closed */
    .mp .round-grid { gap: 8px; }
    .mp .round-grid .side { order: 6; position: static; flex: none; width: min(700px, 100%); height: calc(var(--kb, 0px) - 8px); padding: 10px 2px; overflow: hidden; background: none; box-shadow: none; max-height: none; }
    .mp .round-grid .side .mp-players li { background: rgb(32 14 50 / 0.85); }
    .mp .round-grid .side .mp-players { display: flex; gap: 6px; overflow-x: auto; }
    .mp .round-grid .side h2 { display: none; }
    .mp .hs-used { height: 46px; padding: 6px 8px; }
    .mp .hs-used h2 { display: none; }
    .mp #hs-used { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .mp #hs-used li { flex: none; }
    .mp .round-grid .p-text { margin-bottom: 4px; }
    .mp .slot { font-size: 0.9rem; }
    .mp .slot .hs-event, .mp .slot .p-feedback, .mp .slot .locked { font-size: inherit; }
  }
  @media (pointer: coarse) and (max-width: 640px) { .mp .round-grid .p-text { min-height: 2.4em; display: flex; align-items: center; } }
  @media (pointer: coarse) and (max-height: 720px) { .mp .round-grid .p-meta { margin-bottom: 4px; } .mp .round-grid .prompt-card { padding: 8px 14px; } .mp .round-grid .p-text { font-size: 1.1rem; } }
  @media (pointer: coarse) and (orientation: landscape) and (max-height: 500px) { .mp .slot { height: 1.4em; } .mp .round-grid .p-meta, .mp .hs-used { display: none; } .mp .round-grid .p-text { margin: 0; } }

  .mp-next { position: absolute; z-index: 6; top: 16px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 8px 14px; background: rgb(32 14 50 / 0.94); box-shadow: 0 0 0 3px var(--edge), inset 0 0 0 2px var(--rim); pointer-events: none; white-space: nowrap; }
  .mp-next[hidden] { display: none; }
  .mp-next span { font: 400 0.8rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
  .mp-next b { font: 700 1.9rem/1 var(--display); color: var(--sun); min-width: 1ch; text-align: center; font-variant-numeric: tabular-nums; }
  .mp-next.soon b { color: var(--coral); }
  @media (max-width: 760px) { .mp-next { left: 14px; transform: none; gap: 8px; padding: 8px 10px; } .mp-next span { font-size: 0.72rem; letter-spacing: 0; } }

  .mp .mp-card .verdict { font: 700 clamp(2rem, 9vw, 3.2rem)/1.05 var(--display); text-transform: uppercase; margin: 8px 0; color: var(--ink); text-shadow: 4px 4px 0 rgb(0 0 0 / 0.5); }
  .mp .verdict[data-kind='win'] { color: var(--sun); }
  .mp .verdict[data-kind='lose'] { color: var(--coral); }
  .mp .verdict[data-kind='draw'] { color: var(--glow); }
  .verdict-text { margin: 0 0 6px; color: var(--ink-soft); }
  .podium small { color: var(--ink-mute); }
  /* Air Hose: the question card stays on screen during a burst, so the countdown sits over the (idle) answer bar */
  .mp[data-state='hose'] .mp-next { top: auto; bottom: 42px; left: 50%; transform: translateX(-50%); }
  .mp .hs-pop { bottom: 116px; }
  @media (pointer: coarse) {
    .mp[data-state='hose'] .mp-next { bottom: calc(var(--kb, 0px) + 14px); }
    .mp .hs-pop { bottom: 12px; max-height: max(150px, calc(var(--kb, 0px) - 20px)); padding: 14px; z-index: 5; }
    /* used answers wait under the bar with the diver list, which leaves the water above the bar free */
    .mp .round-grid .hs-used { order: 6; width: min(700px, 100%); }
    .mp .round-grid .side { order: 7; height: calc(var(--kb, 0px) - 62px); }
    .mp .round .side { height: calc(var(--kb, 0px) - 8px); }
  }
  /* one message line on phones: more open water for the divers */
  @media (pointer: coarse) and (max-width: 640px) { .mp .round .slot { height: 1.5em; } .mp .round .slot > p { -webkit-line-clamp: 1; } .hs-turn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } }

/* ---------- home: title in the sky, menu on the waterline ---------- */
.mp .mp-layer.menu { flex-direction: column; justify-content: flex-start; gap: 24px; padding: 26px var(--gutter) 48px; }
.mp .logo { margin: 0; display: grid; justify-items: center; gap: 0.16em; font: 700 clamp(2.4rem, 11vw, 7.4rem)/0.85 var(--title); text-transform: uppercase; letter-spacing: 0.03em; color: #f7d070; text-shadow: 0.03em 0.03em #a8505f, 0.07em 0.07em #1b1030, 0 0 0.4em #f7d07059; }
.mp .logo > * { margin-right: -0.03em; }
.mp .logo small { font-size: 0.48em; line-height: 1.3; letter-spacing: 0.14em; color: #fff4df; text-shadow: 0.065em 0.065em #e8678c, 0.13em 0.13em #1b1030; }
.mp .tagline { margin: -8px 0 0; padding: 4px 10px; text-align: center; color: #fff3db; background: rgb(27 16 48 / 0.8); font-size: 1rem; }
.mp:not([data-state='menu']) .tagline { display: none; }
.mp .verdict, .mode-card b, .mp-next b, .section h2, .site-header .brand { font-family: var(--title) !important; }
.section h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
/* double frame with clipped corners, where the sister site uses a plain one */
.mp-card, .prompt-card, .answer-bar, .side, .hs-used { border-top: 4px solid var(--coral); }
.mp-players li, .results li, .podium li { box-shadow: inset 4px 0 0 var(--rim); }
.mp-players li.me, .results li.me, .podium li.me { box-shadow: inset 4px 0 0 var(--glow); }
.mp-tabs button { border-bottom: 3px solid transparent; }
.mp-tabs button[aria-selected='true'] { border-bottom-color: #fff4ea; }
.hose-gauge i { width: 6px; }
.brief { width: min(520px, 100%); padding: 16px 20px; background: rgb(32 14 50 / 0.9); box-shadow: var(--px-frame); font-size: 0.95rem; }
.brief p { margin: 0 0 12px; color: var(--ink-soft); } .brief strong { color: var(--glow); font-weight: 400; }
.depth-preview { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; font-size: 0.8rem; line-height: 1.3; }
.depth-preview li { display: grid; align-content: space-between; gap: 2px; text-align: center; padding: 6px 2px; background: rgb(255 255 255 / 0.05); border-bottom: 4px solid var(--tier); }
.depth-preview b { color: var(--tier); font-weight: 400; }
#tierlist { list-style: none; margin: 0; padding: 0; }
#tierlist li { display: grid; grid-template-columns: 150px 80px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tag { color: var(--c); }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; }
.site-footer p { margin: 0; max-width: 80ch; }
:root { --head: 64px; }
.site-header.solid { min-height: 64px; padding-block: 8px; }
@media (max-width: 760px) { .site-header .nav { display: flex; position: static; flex-direction: row; padding: 0; gap: 6px; background: none; box-shadow: none; } .site-header .nav a { padding: 14px 8px; font-size: 0.7rem; } .site-header .brand span { display: none; } .mp .mp-layer.menu { gap: 16px; padding-top: 20px; } .mp .tagline { margin-top: -6px; font-size: 0.85rem; } }
@media (max-width: 599px) { #tierlist li { grid-template-columns: 1fr auto; gap: 4px 10px; } #tierlist li span:last-child { grid-column: 1 / -1; color: var(--ink-soft); } }
/* same colours as shared/tiers.mjs */
.tier-s { color: #ffe08a; } .tier-h { color: #a9e57f; } .tier-o { color: #6fd9e8; } .tier-r { color: #c7a6ff; } .tier-a { color: #ffa066; } .tier-l { color: #ff7fa6; }
@media (pointer: coarse) { .mp .round-grid .side { border-top: 0; } }
#modes .grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }

/* ---------- live rooms ---------- */
.opts-top { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opts-top label { font-size: 0.8rem; color: var(--ink-mute); }
.mp .rooms { width: min(520px, 100%); padding: 16px 20px; background: rgb(32 14 50 / 0.94); box-shadow: var(--px-frame); border-top: 4px solid var(--sun); }
.rooms-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rooms-head h2 { margin: 0; font: 700 1.1rem/1.2 var(--title); }
.rooms-head h2::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 10px; background: var(--sun); animation: hiss 1.4s steps(2) infinite; }
#rooms-count { font-size: 0.8rem; color: var(--ink-soft); }
#rooms-list { list-style: none; margin: 10px 0 0; padding: 2px; display: grid; gap: 8px; max-height: 340px; overflow-y: auto; }
#rooms-list:empty { display: none; }
#rooms-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; background: rgb(255 255 255 / 0.05); box-shadow: inset 4px 0 0 var(--glow); }
#rooms-list li:has(i) { box-shadow: inset 4px 0 0 var(--rim); }
#rooms-list div { min-width: 0; display: grid; gap: 2px; }
#rooms-list b { font-weight: 400; font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; }
#rooms-list span { font-size: 0.78rem; line-height: 1.35; color: var(--ink-soft); }
#rooms-list i { font-style: normal; font-size: 0.8rem; color: var(--ink-mute); }
#rooms-list .join { flex: none; min-height: 44px; padding: 0 16px; font-size: 0.85rem; }
.rooms-empty { margin: 10px 0 0; font-size: 0.9rem; color: var(--ink-soft); }
.rooms-empty button { min-height: 32px; padding: 0; border: 0; background: none; font: inherit; color: var(--glow); text-decoration: underline; cursor: pointer; }
.lobby-listed { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.85rem; line-height: 1.35; color: var(--ink-soft); }
.lobby-listed .btn { flex: none; min-height: 44px; padding: 0 12px; font-size: 0.75rem; }
.kick { display: none; }
.lobby .mp-players .kick { display: inline-grid; place-items: center; width: 32px; height: 32px; margin: -4px -6px -4px 8px; border: 0; background: none; color: var(--coral); font: inherit; cursor: pointer; }
.mp .online-now { margin: -12px 0 0; min-height: 1.9em; padding: 5px 12px; font-size: 0.85rem; line-height: 1.5; color: #d6fff8; background: rgb(27 16 48 / 0.8); }
.online-now::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 9px; background: var(--sun); animation: hiss 1.4s steps(2) infinite; }
.site-footer p a { text-decoration: underline; }
