/* Unjinx — « Abysse » : the rarer the answer, the deeper it sinks.
   Phone: one column (≤ 700px). Tablet: 640px column. Desktop (≥ 900px): full-width layout up to 1200px.
   One font, five colours. Motion is driven by GSAP on transform/opacity only. */
:root {
  --surf: #0A3346;
  --mid: #05192A;
  --deep: #010811;
  --glow: #5FF2D6;
  --gold: #FFD27A;
  --coral: #FF7A8A;
  --text: #DDF5F2;
  --muted: #7FA3B2;
  --ink: #02141C;          /* text on turquoise capsules */
  --card: #ffffff0a;
  --line: #ffffff18;
  --track: #ffffff14;
  --fx-rare: #6EC8FF;      /* tier effects only */
  --fx-epic: #B58CFF;
  --font: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--deep); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
  color: var(--text);
  background: transparent; /* the gradient lives on body::before, the fallback on html */
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
/* Whole-screen water: surface → abyss */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, var(--surf) 0%, var(--mid) 38%, var(--deep) 100%);
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }

/* ---------- Ocean layer: light rays + the particle canvas ---------- */
.ocean { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#ocean { position: absolute; inset: 0; width: 100%; height: 100%; }
.rays { position: absolute; left: -10%; right: -10%; top: -12%; height: 125%; mix-blend-mode: screen; }
.rays i {
  position: absolute; top: 0; width: 15%; height: 100%; transform-origin: 50% 0;
  background: linear-gradient(180deg, #5ff2d624 0%, #5ff2d60d 40%, transparent 72%);
  filter: blur(12px); opacity: .8;
}
.rays i:nth-child(1) { left: 6%;  transform: rotate(14deg); }
.rays i:nth-child(2) { left: 24%; transform: rotate(6deg); width: 10%; }
.rays i:nth-child(3) { left: 44%; transform: rotate(-2deg); width: 18%; }
.rays i:nth-child(4) { left: 64%; transform: rotate(-9deg); width: 9%; }
.rays i:nth-child(5) { left: 80%; transform: rotate(-16deg); }

.app {
  position: relative; z-index: 1;
  max-width: 420px;
  margin: 0 auto;
  padding-top: calc(18px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  overflow-x: hidden;
  overflow-x: clip;
}

/* ---------- Top bar ---------- */
.top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; }
.logo {
  background: none; border: 0; padding: 0; min-height: 44px;
  font-weight: 800; font-size: 22px; letter-spacing: -.5px; color: var(--text);
}
.logo b, .home-logo b { color: var(--glow); font-weight: 800; }
.top-right { display: flex; align-items: center; gap: 4px; }
.round { color: var(--muted); font-size: 14px; margin-right: 4px; white-space: nowrap; }
.icon-btn {
  width: 44px; height: 44px; padding: 0; display: grid; place-items: center;
  background: none; border: 0; border-radius: 999px; color: var(--muted);
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { color: var(--text); }
body:not([data-screen="game"]):not([data-screen="party"]) .round { display: none; }

/* ---------- Shared type ---------- */
.title { font-weight: 800; font-size: 30px; line-height: 1.08; letter-spacing: -.8px; margin: 26px 0 8px; text-wrap: balance; }
.subtitle { color: var(--muted); margin: 0 0 20px; font-size: 16px; }
.block-title { font-weight: 600; font-size: 15px; color: var(--muted); margin: 28px 0 10px; }
.label { font-weight: 600; font-size: 14px; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.footnote { color: var(--muted); font-size: 13px; text-align: center; margin: 20px 0 0; }
.notice {
  margin: 0 0 16px; padding: 12px 14px; border-radius: 14px;
  background: #ffd27a12; border: 1px solid #ffd27a66; color: var(--text); font-size: 15px;
}

/* ---------- Buttons, fields, cards ---------- */
.btn {
  display: block; width: 100%; min-height: 56px; margin-top: 6px; padding: 17px;
  border: 0; border-radius: 999px;
  background: var(--glow); color: var(--ink);
  font: 800 18px var(--font);
  box-shadow: 0 0 30px #5ff2d655;
  touch-action: manipulation;
}
.btn:active { filter: brightness(.92); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); box-shadow: none; font-weight: 600; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; min-width: 0; font-size: 16px; }
.link-btn {
  display: block; margin: 14px auto 0; min-height: 44px; padding: 10px 16px;
  background: none; border: 0; color: var(--muted); font-weight: 600; font-size: 15px;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #7fa3b266;
}
.field {
  width: 100%; height: 56px; padding: 0 16px;
  border-radius: 14px; border: 1px solid var(--line);
  background: transparent; color: var(--text);
  font: 600 20px var(--font); outline: none;
}
.field::placeholder { color: var(--muted); opacity: .8; }
.field:focus { border-color: var(--glow); box-shadow: 0 0 0 1px var(--glow); }
.field:disabled { opacity: .55; }
.card { padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }

/* hover glow lives on a pseudo-element so only its opacity changes */
.mode, .theme-tile { position: relative; }
.mode::after, .theme-tile::after {
  content: ""; position: absolute; inset: -1px; border-radius: 14px; pointer-events: none;
  box-shadow: 0 0 0 1px #5ff2d6aa, 0 0 30px #5ff2d633; opacity: 0; transition: opacity .25s ease;
}
.mode:hover::after, .theme-tile:hover::after, .mode:focus-visible::after { opacity: 1; }

/* ---------- Home ---------- */
.home-logo { margin: 40px 0 0; font-weight: 800; font-size: 64px; line-height: .95; letter-spacing: -2px; }
.home-logo .ch { display: inline-block; }
.tagline { margin: 10px 0 28px; font-size: 18px; color: var(--muted); }
.modes { display: flex; flex-direction: column; gap: 10px; }
.mode {
  display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 14px;
  width: 100%; min-height: 72px; padding: 14px 16px; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; color: var(--text);
}
.mode:disabled { opacity: .45; }
/* home: one big way in, two smaller ones */
.mode-hero {
  min-height: 112px; padding: 20px; gap: 16px; grid-template-columns: 48px 1fr;
  border-color: #5ff2d699;
  background: linear-gradient(135deg, #5ff2d62b, #5ff2d608 60%), var(--card);
  box-shadow: 0 0 40px #5ff2d61f;
}
.mode-hero .mode-icon, .mode-hero .mode-icon svg { width: 40px; height: 40px; }
.mode-hero .mode-title { font-size: 26px; letter-spacing: -.6px; }
.mode-hero .mode-sub { font-size: 15px; }
.modes-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.mode-mini { grid-template-columns: 1fr; align-content: start; gap: 8px; min-height: 104px; }
.mode-mini .mode-icon { width: 30px; height: 30px; place-items: start; }
.mode-mini .mode-icon svg { width: 26px; height: 26px; }
.home-count { margin: 4px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.home-side .link-btn { margin-top: 18px; }

/* first-run tutorial */
.tutorial { padding-top: 6px; }
.tut-top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-top: 6px; }
.tut-dots { display: flex; gap: 8px; }
.tut-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--track); transition: width .25s ease; }
.tut-dots i.on { width: 24px; border-radius: 8px; background: var(--glow); box-shadow: 0 0 10px var(--glow); }
.tut-skip { margin: 0; }
.tut-stage {
  position: relative; height: 300px; margin-top: 10px; overflow: hidden;
  border-radius: 18px; border: 1px solid var(--line);
  background: linear-gradient(180deg, #0a334680, #01081199);
}
.tut-title { margin-top: 22px; }
.tut-text { min-height: 66px; }
#tut-rules { margin-top: 6px; }
.tut-card { position: absolute; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 9px 14px; border-radius: 12px; background: #0e2b3be6; border: 1px solid var(--line); }
.tut-card b { font-weight: 800; font-size: 18px; letter-spacing: -.3px; }
.tut-m { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tut-card.gold { border-color: #ffd27a99; background: linear-gradient(90deg, #ffd27a33, #0e2b3be6); box-shadow: 0 0 26px #ffd27a40; }
.tut-card.gold b { color: var(--gold); }
.tut-cat { position: absolute; left: 16px; right: 16px; top: 14px; font-weight: 800; font-size: 18px; text-align: center; }
.tut-pool { position: absolute; left: 70px; right: 16px; top: 58px; bottom: 16px; border-left: 1px dashed #5ff2d640; }
.tut-pool .tut-card { left: 14px; right: 0; }
.tut-mark { position: absolute; left: -62px; width: 52px; margin-top: -7px; color: var(--muted); font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }
.tut-s2 .tut-card { top: 36%; width: 40%; flex-direction: column; align-items: center; gap: 0; }
.tut-s2 .tut-l { right: 50%; margin-right: -1px; }
.tut-s2 .tut-r { left: 50%; margin-left: -1px; }
.tut-jinx { position: absolute; left: 0; right: 0; top: 8%; text-align: center; color: var(--glow); font-weight: 800; font-size: 56px; letter-spacing: -.04em; text-shadow: 0 0 30px #5ff2d688; }
.tut-sub { position: absolute; left: 0; right: 0; bottom: 14%; text-align: center; color: var(--coral); font-weight: 800; font-size: 18px; }
.tut-room { position: absolute; inset: 18px; display: grid; grid-template-columns: minmax(0, 1fr) 118px; gap: 16px; align-items: center; }
.tut-room-l { min-width: 0; }
.tut-code { display: flex; gap: 2px; margin: 2px 0 12px; color: var(--glow); font-weight: 800; font-size: 46px; line-height: 1; letter-spacing: .04em; text-shadow: 0 0 18px #5ff2d655; }
.tut-code span { display: inline-block; }
.tut-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tut-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid #5ff2d666; font-size: 13px; font-weight: 600; }
.tut-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 6px var(--glow); }
.tut-room-r { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tut-qr { width: 100%; padding: 6px; border-radius: 12px; background: #fff; line-height: 0; }
.tut-qr svg { display: block; width: 100%; height: auto; }
.tut-scan { color: var(--muted); font-size: 12px; font-weight: 600; }
.mode-icon { width: 40px; height: 40px; display: grid; place-items: center; color: var(--glow); }
.mode-icon svg { width: 28px; height: 28px; }
.mode-text { display: flex; flex-direction: column; min-width: 0; }
.mode-title { font-weight: 800; font-size: 19px; letter-spacing: -.3px; line-height: 1.2; }
.mode-sub { font-size: 14px; color: var(--muted); }
.daily-num { font-weight: 600; font-size: 14px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 12px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  font-weight: 600; font-size: 14px; color: var(--text); white-space: nowrap;
}
.chip-btn:hover { border-color: #5ff2d688; }
.chip-btn svg { width: 18px; height: 18px; color: var(--glow); flex-shrink: 0; }
.chip-btn small { color: var(--muted); font-weight: 400; font-size: 13px; }

/* ---------- How to play ---------- */
.rules { padding-left: 20px; margin: 4px 0 18px; }
.rules li { margin-bottom: 10px; }
.rules b { font-weight: 800; }
.tier-legend { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 8px; }
.tier-legend li { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.ldot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--glow); box-shadow: 0 0 8px var(--glow); }
.ldot.gold { background: var(--gold); box-shadow: 0 0 14px 2px var(--gold); }
.ldot.none { background: transparent; border: 1px solid var(--muted); box-shadow: none; }
.tier-legend li span { color: var(--muted); font-size: 13px; margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; }
.example { margin-bottom: 18px; }
.example-title { margin: 0 0 4px; font-weight: 800; font-size: 17px; }
.example p { margin: 0; color: var(--text); }

/* ---------- Nickname & themes ---------- */
.name-avatar { width: 56px; height: 56px; margin-top: 30px; color: var(--glow); }
.name-avatar:empty { display: none; }
.name-avatar svg { width: 100%; height: 100%; }
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  min-height: 104px; padding: 14px; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; color: var(--text);
}
.theme-tile svg { width: 26px; height: 26px; color: var(--glow); }
.theme-tile b { font-weight: 800; font-size: 18px; letter-spacing: -.3px; line-height: 1.15; }
.theme-tile small { color: var(--muted); font-size: 13px; }
.theme-tile.mix { grid-column: 1 / -1; min-height: 64px; flex-direction: row; align-items: center; gap: 14px; border-color: #5ff2d655; }

/* ---------- Game: HUD ---------- */
.game { position: relative; }
.hud { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.p { min-width: 0; }
.p .name { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 15px; }
.p .f-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.p .f-hp { font-variant-numeric: tabular-nums; color: var(--muted); flex-shrink: 0; }
.op .f-hp { color: var(--coral); }
.bar { position: relative; height: 6px; border-radius: 6px; background: var(--track); margin-top: 7px; overflow: hidden; }
.bar i { position: absolute; inset: 0; border-radius: 6px; transform-origin: 0 50%; }
.bar-ghost { background: #ff7a8a99; }
.op .bar-ghost { background: #ffffff55; }
.bar-flash { background: #fff; opacity: 0; }
.me .bar-fill { background: var(--glow); box-shadow: 0 0 12px var(--glow); }
.op .bar-fill { background: var(--coral); box-shadow: 0 0 12px var(--coral); }
/* live duel: the friend has locked their answer */
.p .f-tag { margin-right: auto; padding: 0 8px; border-radius: 999px; border: 1px solid #5ff2d666; color: var(--glow); font-size: 12px; font-weight: 600; line-height: 20px; white-space: nowrap; }
.p .f-tag:empty { display: none; }
.p.unknown .f-hp { color: var(--muted); }
.p.unknown .bar-fill, .p.unknown .bar-ghost { background: var(--track); box-shadow: none; }

/* timer ring: beside the question on a phone, in the middle of the HUD on desktop */
.clock { position: absolute; right: 0; top: 84px; width: 44px; height: 44px; z-index: 2; }
.clock svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--track); stroke-width: 2; }
.ring { fill: none; stroke: var(--glow); stroke-width: 2; stroke-linecap: round; }
.clock-num { position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.clock.danger .ring { stroke: var(--coral); }
.clock.danger .clock-num { color: var(--coral); }

/* ---------- Game: question & answer ---------- */
.prompt-block { margin-top: 30px; padding-right: 56px; }
.prompt { margin: 0 0 4px; font-size: 30px; line-height: 1.08; font-weight: 800; letter-spacing: -.8px; max-width: 14ch; }
.prompt.long { font-size: 25px; max-width: 18ch; letter-spacing: -.5px; }
.prompt.xlong { font-size: 21px; max-width: none; letter-spacing: -.3px; line-height: 1.15; }
.prompt .wd { display: inline-block; }
.theme { color: var(--muted); font-size: 14px; }
.play-zone { margin-top: 26px; }
.answer-form { display: flex; flex-direction: column; gap: 4px; }
.power-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 44px; margin-top: 10px; padding: 8px 14px;
  border-radius: 999px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); font-weight: 600; font-size: 14px;
}
.power-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.power-btn[aria-pressed="true"] { color: var(--gold); border-color: #ffd27a99; background: #ffd27a12; }
.power-btn:disabled { opacity: .45; cursor: default; }
.feedback { min-height: 22px; margin-top: 10px; text-align: center; font-size: 15px; color: var(--muted); }
.feedback.bad { color: var(--coral); }
.field.nope { border-color: var(--coral); box-shadow: 0 0 0 1px var(--coral); }

/* ---------- Game: the dive (depth scale) ---------- */
.dive { position: relative; margin-top: 18px; height: 430px; border-left: 1px dashed #5ff2d640; margin-left: 52px; }
.mark { position: absolute; left: -54px; width: 46px; text-align: right; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mark::after { content: ""; position: absolute; right: -11px; top: 7px; width: 6px; height: 1px; background: #5ff2d660; }
.ans { position: absolute; left: 18px; right: 0; display: flex; align-items: center; gap: 12px; will-change: transform; }
.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; margin-left: -25px; }
.ans .card { flex: 1; min-width: 0; }
.ans .who { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ans .w { font-size: 22px; font-weight: 800; letter-spacing: -.4px; line-height: 1.15; overflow-wrap: anywhere; }
.ans .w.miss { color: var(--muted); font-weight: 600; }
.ans .t { font-size: 13px; font-weight: 600; margin-top: 2px; color: var(--muted); }
.ans .t.rare { color: var(--text); }
.ans .note { font-size: 13px; color: var(--muted); margin-top: 6px; }
.ans.me .dot { background: var(--glow); box-shadow: 0 0 10px var(--glow); }
.ans.op .dot { background: var(--coral); box-shadow: 0 0 10px var(--coral); }
.ans.gold .dot { background: var(--gold); box-shadow: 0 0 22px 4px var(--gold); }
.ans.gold .card { border-color: #ffd27a66; background: linear-gradient(90deg, #ffd27a1f, #ffd27a05); }
.ans.gold .t { color: var(--gold); }
.ans.legend .dot { box-shadow: 0 0 30px 8px var(--gold); }
.ans.legend .card { border-color: #ffd27a99; box-shadow: 0 0 24px #ffd27a26; }
.hit { position: absolute; right: 0; font-size: 44px; font-weight: 800; color: var(--coral); letter-spacing: -1px; line-height: 1; text-align: right; text-shadow: 0 0 24px #ff7a8a88; }
.hit small { display: block; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; text-shadow: none; }
.hit.zero { color: var(--muted); text-shadow: none; }
#btn-next { margin-top: 18px; }

.feedback.wait { color: var(--text); animation: livepulse 1.4s ease-in-out infinite; }

/* ---------- Live duel lobby ---------- */
.live-status { display: flex; align-items: center; gap: 12px; margin-top: 18px; min-height: 56px; font-weight: 600; }
.live-status.ok { border-color: #5ff2d666; background: #5ff2d60f; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted); animation: livepulse 1.4s ease-in-out infinite; }
.live-status.ok .live-dot { background: var(--glow); box-shadow: 0 0 10px var(--glow); animation: none; }
#live-start { margin-top: 14px; }
@keyframes livepulse { 50% { opacity: .35; } }

/* ---------- Practice: the Obvious crew (stronger = deeper and brighter) ---------- */
.bot-levels { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bot-lv {
  --lv: var(--muted);
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  min-height: 112px; padding: 14px; text-align: left; color: var(--text);
  border-radius: 14px; border: 1px solid var(--line);
  background: var(--card);
  background: linear-gradient(180deg, var(--card), color-mix(in srgb, var(--lv) 9%, transparent));
}
.bot-lv[data-lv="1"] { --lv: #9FC4CF; }
.bot-lv[data-lv="2"] { --lv: var(--glow); }
.bot-lv[data-lv="3"] { --lv: var(--fx-epic); background: linear-gradient(180deg, var(--card), color-mix(in srgb, var(--lv) 14%, #010811)); }
.bot-lv[data-lv="4"] { --lv: var(--gold); background: linear-gradient(180deg, var(--card), color-mix(in srgb, var(--lv) 16%, #010811)); }
.bot-lv-icon { width: 28px; height: 28px; color: var(--lv); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--lv) 60%, transparent)); }
.bot-lv-icon svg { width: 100%; height: 100%; }
.bot-lv-depth { position: absolute; top: 14px; right: 14px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.bot-lv-name { font-weight: 800; font-size: 17px; line-height: 1.15; letter-spacing: -.3px; }
.bot-lv-sub { color: var(--muted); font-size: 13px; line-height: 1.3; }
.bot-lv.on { border-color: var(--lv); box-shadow: 0 0 0 1px var(--lv), 0 0 26px color-mix(in srgb, var(--lv) 30%, transparent); }
.bot-lv.locked { cursor: not-allowed; background: var(--card); }
.bot-lv.locked .bot-lv-icon { color: var(--muted); filter: none; }
.bot-lv.locked .bot-lv-name { color: var(--muted); }
.p.op[data-lv="1"] .f-name { color: #9FC4CF; }
.p.op[data-lv="2"] .f-name { color: var(--glow); }
.p.op[data-lv="3"] .f-name { color: var(--fx-epic); }
.p.op[data-lv="4"] .f-name { color: var(--gold); }

/* ---------- Party ---------- */
.chip-btn.on { border-color: var(--glow); background: var(--glow); color: var(--ink); }
.pt-or { display: flex; align-items: center; gap: 12px; margin: 24px 0 10px; color: var(--muted); font-size: 14px; }
.pt-or::before, .pt-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pt-code-row { display: flex; gap: 10px; }
.pt-code-row .field { flex: 1; min-width: 0; text-align: center; text-transform: uppercase; letter-spacing: .3em; font-weight: 800; }
.pt-code-row .btn { flex: none; width: auto; min-height: 56px; margin-top: 0; padding: 0 24px; }
.pt-rejoin { margin: 0 0 18px; }
.pt-head { margin-top: 22px; text-align: center; }
.pt-code { font-weight: 800; font-size: clamp(64px, 20vw, 120px); line-height: 1; letter-spacing: .08em; color: var(--glow); text-shadow: 0 0 40px #5ff2d666; }
.pt-players { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.pt-player { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-weight: 600; }
.pt-player.off { opacity: .5; }
.pt-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--glow); box-shadow: 0 0 8px var(--glow); }
.off .pt-dot { background: var(--muted); box-shadow: none; }
.pt-pname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-tag { padding: 0 8px; border-radius: 999px; border: 1px solid #ffd27a66; color: var(--gold); font-size: 12px; font-weight: 600; line-height: 20px; white-space: nowrap; }
.pt-tag.ghost { border-color: var(--line); color: var(--muted); }
.pt-rounds .chip-btn { min-width: 64px; justify-content: center; font-size: 16px; font-weight: 800; }
.pt-hint { margin: 10px 0 14px; color: var(--muted); font-size: 14px; }
.pt-hint.center { text-align: center; }
.pt-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.pt-step { color: var(--muted); font-size: 14px; font-weight: 600; }
.pt-clock { position: relative; flex: none; width: 44px; height: 44px; }
.pt-clock svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pt-clock.danger .ring { stroke: var(--coral); }
.pt-clock.danger .clock-num { color: var(--coral); }
.party .prompt { margin-top: 10px; max-width: 20ch; }
.party .prompt.small { max-width: none; font-size: 22px; letter-spacing: -.4px; }
.pt-by { margin-top: 12px; }
.party .answer-form { margin-top: 20px; }
.pt-mine { margin-top: 18px; }
.pt-mine-text { margin-top: 4px; font-weight: 800; font-size: 20px; overflow-wrap: anywhere; }
.pt-chips { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pt-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 14px; font-weight: 600; }
.pt-chip .pt-dot { background: var(--muted); box-shadow: none; }
.pt-chip.ok { border-color: #5ff2d666; color: var(--text); }
.pt-chip.ok .pt-dot { background: var(--glow); box-shadow: 0 0 8px var(--glow); }
.pt-chip b { color: var(--glow); }
.pt-chip.off { opacity: .5; }
/* reveal: the deeper the card, the rarer the answer */
.pt-groups { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.pt-g { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.pt-g-ans { font-weight: 800; font-size: 20px; line-height: 1.15; letter-spacing: -.3px; overflow-wrap: anywhere; }
.pt-g-who { margin-top: 2px; color: var(--muted); font-size: 13px; }
.pt-g-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.pt-g-depth { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pt-g-pts { color: var(--glow); font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pt-g-pts.zero { color: var(--muted); font-size: 15px; }
.pt-g-tools { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
.pt-g-tools:empty { display: none; }
.pt-jinx { padding: 1px 9px; border-radius: 999px; background: var(--glow); color: var(--ink); font-weight: 800; font-size: 13px; }
.pt-g.uniq { border-color: #5ff2d666; background: linear-gradient(90deg, #5ff2d61a, #5ff2d605); }
.pt-g.best { border-color: #ffd27a99; background: linear-gradient(90deg, #ffd27a24, #ffd27a05); box-shadow: 0 0 24px #ffd27a26; }
.pt-g.best .pt-g-pts { color: var(--gold); }
.pt-g.jx .pt-g-pts { color: var(--text); }
.pt-g.vetoed { opacity: .55; }
.pt-g.vetoed .pt-g-ans { text-decoration: line-through; text-decoration-color: var(--coral); }
.pt-veto { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); font-size: 15px; }
.pt-veto.on { border-color: var(--coral); background: #ff7a8a1f; }
.pt-veto.ro { min-height: 0; padding: 0; border: 0; color: var(--muted); font-size: 13px; }
.pt-veto b { font-size: 13px; }
.pt-g.pickable { cursor: pointer; }
.pt-g.pickable:hover { border-color: #5ff2d6aa; }
.pt-g.picked { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.pt-unmerge { margin: 0; min-height: 36px; padding: 0 8px; font-size: 13px; }
.pt-none { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.pt-bonus { margin-top: 12px; color: var(--gold); font-weight: 600; }
.pt-none:empty, .pt-bonus:empty { display: none; }
.pt-merge-btn { margin-top: 14px; }
.pt-merge-on { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; color: var(--gold); font-size: 14px; font-weight: 600; }
.pt-merge-on .link-btn { margin: 0; }
#pt-next-box .btn, #pt-next-box .card { margin-top: 14px; }
.pt-board { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.pt-board li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 15px; }
.pt-board li.me { color: var(--glow); }
.pt-board b { font-variant-numeric: tabular-nums; }
/* final */
.pt-standings { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 8px; }
.pt-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.pt-rank { color: var(--muted); font-weight: 800; font-size: 18px; }
.pt-rname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; font-size: 19px; }
.pt-rpts { color: var(--glow); font-weight: 800; font-size: 26px; font-variant-numeric: tabular-nums; }
.pt-row.top { border-color: #ffd27a99; background: linear-gradient(90deg, #ffd27a24, #ffd27a05); }
.pt-row.top .pt-rank, .pt-row.top .pt-rpts { color: var(--gold); }
.pt-row.me .pt-rname::after { content: " · you"; color: var(--muted); font-weight: 600; font-size: 14px; }
/* idea button, QR, awards */
.pt-cat-row { display: flex; flex-direction: column; gap: 8px; }
.pt-idea { min-height: 44px; margin-top: 0; padding: 10px 16px; font-size: 15px; }
.pt-qr-open { min-height: 48px; margin-top: 10px; }
.pt-qr-card { display: none; }
.pt-qr { padding: 6px; border-radius: 16px; background: #F2FFFC; line-height: 0; box-shadow: 0 0 30px #5ff2d633; }
.pt-qr svg { display: block; width: 100%; height: auto; }
.pt-qr-label { color: var(--text); font-weight: 800; font-size: 16px; }
.pt-qr-label.big { font-size: 24px; letter-spacing: -.4px; }
.pt-qr-code { color: var(--glow); font-weight: 800; letter-spacing: .2em; }
.pt-qr-full { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: #010811ee; }
.pt-qr-sheet { width: min(100%, 380px); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.pt-qr-big { width: 100%; }
.pt-qr-sheet .btn { width: 100%; margin-top: 8px; }
.pt-awards { display: flex; flex-direction: column; gap: 10px; }
.pt-award {
  --aw: var(--glow);
  display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--card);
  border-color: color-mix(in srgb, var(--aw) 45%, transparent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--aw) 12%, transparent), transparent);
}
.pt-award[data-award="mind"] { --aw: var(--fx-epic); }
.pt-award[data-award="magnet"] { --aw: var(--fx-rare); }
.pt-award[data-award="deepest"] { --aw: var(--gold); }
.pt-award-title { color: var(--aw); font-size: 13px; font-weight: 800; }
.pt-award-who { font-weight: 800; font-size: 22px; letter-spacing: -.4px; overflow-wrap: anywhere; }
.pt-award[data-award="deepest"] .pt-award-who { color: var(--gold); }
.pt-award-quote { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.pt-award-detail { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
#pt-copy-box .btn { margin-top: 16px; }
.pt-award[data-award="crowd"] { --aw: var(--coral); }
/* reactions under every answer card */
.pt-g-react { grid-column: 1 / -1; display: flex; gap: 6px; margin-top: 2px; }
.pt-r { display: inline-flex; align-items: center; justify-content: center; gap: 4px; flex: 1; min-width: 0; min-height: 40px; padding: 0 6px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); }
.pt-r-e { font-size: 18px; line-height: 1; }
.pt-r-n { font-size: 13px; font-variant-numeric: tabular-nums; }
.pt-r-n:empty { display: none; }
.pt-r.has { border-color: #ffffff30; }
.pt-r.on { border-color: var(--glow); background: #5ff2d61f; box-shadow: 0 0 12px #5ff2d633; }
.pt-r:disabled { cursor: default; opacity: .55; }
.pt-g-react.own .pt-r.has { opacity: .9; }
.pt-float { position: absolute; z-index: 1; margin: -18px 0 0 -18px; font-size: 34px; line-height: 1; pointer-events: none; will-change: transform; }

/* ---------- Effects (moved by GSAP) ---------- */
.fx-layer { position: fixed; inset: 0; z-index: 55; pointer-events: none; overflow: hidden; }
.fx-ring { position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; border: 2px solid var(--muted); }
.fx-glow { position: absolute; width: 280px; height: 280px; margin: -140px 0 0 -140px; border-radius: 50%; }
.fx-rays {
  position: absolute; width: 460px; height: 460px; margin: -230px 0 0 -230px; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, #ffd27acc 0deg 5deg, transparent 5deg 20deg);
  -webkit-mask-image: radial-gradient(circle, #000 14%, transparent 66%);
  mask-image: radial-gradient(circle, #000 14%, transparent 66%);
}
.fx-beam {
  position: absolute; height: 4px; margin-top: -2px; border-radius: 4px; transform-origin: 0 50%;
  background: linear-gradient(90deg, transparent, currentColor 35%, #ffffff);
  box-shadow: 0 0 16px currentColor;
}
.fx-flash { position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0; background: var(--coral); }
.fx-flash.glow { background: var(--glow); }
.banner { position: fixed; inset: 0; z-index: 65; display: flex; align-items: center; justify-content: center; pointer-events: none; opacity: 0; }
.banner span { font-weight: 800; font-size: clamp(56px, 12vw, 168px); letter-spacing: -.04em; color: var(--glow); text-shadow: 0 0 40px #5ff2d688; white-space: nowrap; }
.fx-overlay {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px;
}
.fx-jinx { background: #010811b8; }
.fx-ko { background: transparent; z-index: 62; }
.chroma { display: grid; place-items: center; }
.chroma span { grid-area: 1 / 1; font-weight: 800; font-size: clamp(72px, 22vw, 180px); line-height: 1; letter-spacing: -.04em; }
.chroma .c-main { color: var(--glow); text-shadow: 0 0 40px #5ff2d6aa; }
.chroma .c-r { color: #ff3b5c; opacity: 0; mix-blend-mode: screen; }
.chroma .c-b { color: #3b7bff; opacity: 0; mix-blend-mode: screen; }
.chroma.ko span { font-size: clamp(96px, 30vw, 230px); }
.jinx-sub { font-weight: 600; font-size: 16px; color: var(--muted); }
.vignette {
  position: fixed; inset: 0; z-index: 58; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at center, transparent 28%, #000000eb 88%);
}
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 80;
  transform: translateX(-50%); opacity: 0; visibility: hidden;
  max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 999px;
  background: #05192Af2; border: 1px solid var(--line); color: var(--text);
  font-weight: 600; text-align: center; pointer-events: none;
}
.toast.show { opacity: 1; visibility: visible; }

/* ---------- Result ---------- */
.result-head { margin-top: 26px; }
.result-title { margin: 0; font-weight: 800; font-size: 44px; line-height: 1; letter-spacing: -1.2px; }
.result-title.win { color: var(--glow); }
.result-title.lose { color: var(--coral); }
.result-title.draw { color: var(--text); }
.result-title.small { font-size: 32px; letter-spacing: -.8px; }
.result-sub { margin: 8px 0 0; color: var(--muted); }
.score-line { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 12px; margin: 22px 0 0; }
.score-line .side { min-width: 0; }
.score-line .side:last-child { text-align: right; }
.score-line .nm { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-line .sc-hp { font-weight: 800; font-size: 28px; letter-spacing: -.8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.score-line .me .sc-hp { color: var(--glow); }
.score-line .op .sc-hp { color: var(--coral); }
.score-line .sc-hp.ko { color: var(--muted); }
.score-line .mid { color: var(--muted); font-size: 14px; padding-bottom: 8px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.stat b { display: block; font-weight: 800; font-size: 26px; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
.recap { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.rc-cat { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.rc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: start; }
.rc-row.solo { grid-template-columns: minmax(0, 1fr) auto; }
.rc-side { min-width: 0; }
.rc-side.r { text-align: right; }
.rc-ans { display: block; font-weight: 800; font-size: 17px; letter-spacing: -.3px; line-height: 1.2; overflow-wrap: anywhere; }
.rc-ans.miss { color: var(--muted); font-weight: 600; }
.rc-tier { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.rc-tier.rare { color: var(--text); }
.rc-tier.gold { color: var(--gold); }
.rc-mid { text-align: center; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.rc-mid small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.rc-mid.dmg { color: var(--coral); }
.rc-mid.jx { color: var(--glow); }
.ticket { margin: 0 0 10px; white-space: pre-wrap; word-break: normal; overflow-wrap: anywhere; font-size: 15px; line-height: 1.5; }
.link-field { height: 50px; font-size: 14px; font-weight: 400; color: var(--muted); }

/* ---------- Tablet: a wider column ---------- */
@media (min-width: 701px) and (max-width: 899px) {
  .app { max-width: 640px; }
  .dive { height: 480px; }
}

/* ---------- Desktop: full-width layout ---------- */
@media (min-width: 900px) {
  .app {
    max-width: 1200px;
    padding-left: max(clamp(24px, 4vw, 56px), env(safe-area-inset-left, 0px));
    padding-right: max(clamp(24px, 4vw, 56px), env(safe-area-inset-right, 0px));
  }
  .top { min-height: 56px; }
  .logo { font-size: clamp(22px, 1.7vw, 28px); }
  .round { font-size: clamp(14px, 1.1vw, 17px); }

  .title { font-size: clamp(36px, 3.2vw, 54px); }
  .subtitle { font-size: clamp(16px, 1.25vw, 20px); }
  .narrow { max-width: 780px; margin: 0 auto; }
  .theme-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .theme-tile { min-height: 132px; padding: 18px; }
  .bot-levels { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .home .mode.mode-hero { min-height: clamp(130px, 11vw, 168px); padding: 26px 28px; grid-template-columns: 56px 1fr; }
  .mode-hero .mode-icon, .mode-hero .mode-icon svg { width: 48px; height: 48px; }
  .mode-hero .mode-title { font-size: clamp(28px, 2.4vw, 38px); }
  .mode-hero .mode-sub { font-size: clamp(15px, 1.15vw, 18px); }
  .modes-mini { gap: 14px; margin-top: 14px; }
  .home .mode.mode-mini { min-height: clamp(110px, 8.5vw, 136px); padding: 18px 20px; grid-template-columns: 1fr; }
  .tut-stage { height: 340px; }
  .bot-lv { min-height: 150px; padding: 18px; }

  /* home: big logo left, modes right */
  .home {
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(40px, 6vw, 120px); align-items: center;
    min-height: calc(100dvh - 130px);
  }
  .home-logo { margin: 0; font-size: clamp(110px, 11vw, 196px); letter-spacing: -.05em; }
  .tagline { font-size: clamp(20px, 1.7vw, 30px); margin-bottom: 0; }
  .home-side .block-title { margin-top: clamp(22px, 2.4vw, 34px); }
  .mode { min-height: clamp(84px, 7vw, 108px); padding: 18px 22px; gap: 18px; grid-template-columns: 48px 1fr; }
  .mode-icon, .mode-icon svg { width: 36px; height: 36px; }
  .mode-title { font-size: clamp(21px, 1.6vw, 27px); }
  .mode-sub { font-size: clamp(14px, 1.05vw, 17px); }

  /* game: HUD across the top, question left, deep scale right */
  .game {
    --clock: clamp(64px, 5.6vw, 88px);
    display: grid; grid-template-columns: minmax(0, 1fr) var(--clock) minmax(0, 1fr);
    grid-template-areas: "me clock op" "stage stage stage";
    column-gap: clamp(24px, 3.4vw, 56px); align-items: center;
    padding-top: clamp(8px, 1.4vw, 20px);
  }
  .hud { display: contents; }
  .game .me { grid-area: me; }
  .game .op { grid-area: op; }
  .game .op .name { flex-direction: row-reverse; }
  .game .op .f-tag { margin-right: 0; margin-left: auto; }
  .p .name { font-size: clamp(16px, 1.35vw, 22px); }
  .bar { height: clamp(6px, .6vw, 10px); margin-top: 10px; }
  .clock { position: relative; top: auto; right: auto; grid-area: clock; width: var(--clock); height: var(--clock); justify-self: center; }
  .clock-num { font-size: clamp(18px, 1.6vw, 26px); }
  .stage {
    grid-area: stage; align-self: start;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    grid-template-areas: "prompt dive" "play dive" "fb dive" "next dive" ". dive";
    grid-template-rows: auto auto auto auto 1fr;
    column-gap: clamp(32px, 5vw, 96px);
    margin-top: clamp(20px, 2.6vw, 40px);
  }
  .prompt-block { grid-area: prompt; margin-top: clamp(16px, 3vw, 56px); padding-right: 0; }
  .prompt { font-size: clamp(42px, 3.8vw, 68px); max-width: 15ch; letter-spacing: -.035em; }
  .prompt.long { font-size: clamp(36px, 3.1vw, 56px); max-width: 19ch; }
  .prompt.xlong { font-size: clamp(30px, 2.5vw, 44px); max-width: 24ch; }
  .theme { font-size: clamp(15px, 1.15vw, 19px); margin-top: 6px; }
  .play-zone { grid-area: play; margin-top: clamp(26px, 3vw, 48px); }
  .field { height: clamp(64px, 5.2vw, 82px); font-size: clamp(22px, 1.9vw, 32px); padding: 0 22px; border-radius: 16px; }
  .btn { min-height: clamp(56px, 4.6vw, 72px); font-size: clamp(18px, 1.35vw, 22px); }
  .power-btn { min-height: 48px; font-size: clamp(14px, 1.05vw, 16px); }
  .feedback { grid-area: fb; text-align: left; font-size: clamp(15px, 1.1vw, 18px); }
  #btn-next { grid-area: next; align-self: start; max-width: 520px; }
  .dive-wrap { grid-area: dive; }
  .dive { margin-top: 0; height: max(440px, calc(100dvh - 265px)); }
  .mark { font-size: 12px; }
  .ans .who { font-size: clamp(12px, .95vw, 14px); }
  .ans .w { font-size: clamp(22px, 1.9vw, 32px); }
  .ans .t { font-size: clamp(13px, 1vw, 16px); }
  .ans .card { padding: 14px 18px; }
  .hit { font-size: clamp(48px, 4.4vw, 80px); }
  .hit small { font-size: clamp(13px, 1vw, 16px); }

  /* result: big centered score, rounds in a grid */
  .result .result-head { text-align: center; margin-top: clamp(24px, 3vw, 48px); }
  .result-title { font-size: clamp(56px, 6vw, 104px); letter-spacing: -.04em; }
  .result-title.small { font-size: clamp(40px, 4vw, 68px); }
  .result-sub { font-size: clamp(16px, 1.3vw, 21px); }
  .score-line { max-width: 860px; margin: clamp(26px, 3vw, 44px) auto 0; }
  .score-line .nm { font-size: clamp(16px, 1.35vw, 22px); }
  .score-line .sc-hp { font-size: clamp(52px, 5.6vw, 100px); letter-spacing: -.04em; }
  .score-line .mid { font-size: clamp(15px, 1.2vw, 19px); padding-bottom: 16px; }
  .stats { max-width: 720px; margin: 28px auto 0; text-align: center; }
  .stat b { font-size: clamp(30px, 3vw, 52px); }
  .recap { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
  .result-tail { max-width: 640px; margin: 0 auto; }

  /* party: one comfortable column in the middle */
  .party { max-width: 780px; margin: 0 auto; }
  .party .result-head { text-align: center; }
  .party .result-tail { max-width: none; }
  .party .prompt { font-size: clamp(36px, 3.2vw, 56px); }
  .party .prompt.small { font-size: clamp(26px, 2.2vw, 36px); }
  .pt-g-ans { font-size: 24px; }
  .pt-clock { width: 56px; height: 56px; }
  .pt-qr-open { display: none; }
  .pt-lobby-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; align-items: start; }
  .pt-qr-card { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 28px; padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
  .pt-qr-card .pt-qr { width: 100%; }
  .pt-cat-row { flex-direction: row; }
  .pt-cat-row .field { flex: 1; min-width: 0; }
  .pt-idea { flex: none; width: auto; min-height: 0; }
  .pt-awards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-award[data-award="deepest"] { grid-column: 1 / -1; }
  .pt-r { flex: none; min-width: 64px; }
  .result .block-title { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  #ocean { display: none; }
  .live-dot, .feedback.wait { animation: none; }
  .mode::after, .theme-tile::after { transition: none; }
}
.clock.idle .ring { stroke: var(--muted); filter: none; opacity: .5; }
.clock.idle .clock-num { color: var(--muted); }

/* ---------- Lite mode (1.8): no particles, no light rays, fewer effects ---------- */
body.lite #ocean, body.lite .rays { display: none !important; }
body.lite .fx-glow, body.lite .fx-rays { display: none; }
#btn-lite[aria-pressed="true"] { color: var(--glow); }
#btn-lite[data-pref="off"] { opacity: .55; }
.debug-panel {
  position: fixed; left: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); z-index: 90; pointer-events: none;
  max-width: calc(100vw - 16px); padding: 6px 10px; border-radius: 10px; background: #000000c0; color: #9ff;
  font: 600 11px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Party Classic (1.8) ---------- */
.pt-switch {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 60px; margin-top: 6px;
  padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--text); text-align: left;
}
.pt-switch-text { display: flex; flex-direction: column; min-width: 0; }
.pt-switch-text b { font-weight: 800; font-size: 16px; }
.pt-switch-text small { color: var(--muted); font-size: 13px; }
.pt-switch-knob { position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--track); transition: background .2s ease; }
.pt-switch-knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--muted); transition: transform .2s ease, background .2s ease; }
.pt-switch[aria-checked="true"] .pt-switch-knob { background: #5ff2d655; }
.pt-switch[aria-checked="true"] .pt-switch-knob::after { transform: translateX(18px); background: var(--glow); }
.pt-themes .chip-btn svg { width: 16px; height: 16px; }
.pt-themes .chip-btn.on svg { color: var(--ink); }
.pt-summary { margin: 14px 0 10px; text-align: center; color: var(--text); font-weight: 600; }
.pt-g-tier { margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 600; }
.pt-g.best .pt-g-tier { color: var(--gold); }
.pt-g.miss { border-style: dashed; }
.pt-g.miss .pt-g-ans { color: var(--muted); font-weight: 600; }
.pt-g.miss.ok { border-style: solid; border-color: #6ec8ff88; }
.pt-g.miss.ok .pt-g-ans { color: var(--text); font-weight: 800; }
.pt-g.miss.ok .pt-g-tier { color: var(--fx-rare); }
.pt-ok { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); font-size: 14px; font-weight: 600; }
.pt-ok-i { display: inline-flex; width: 16px; height: 16px; }
.pt-ok-i svg { width: 16px; height: 16px; }
.pt-ok b { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.pt-ok.on { border-color: var(--glow); background: #5ff2d61f; }
.pt-ok.done { border-color: var(--fx-rare); }
.pt-ok:disabled { opacity: .55; cursor: default; }
body.lite .pt-g.best { box-shadow: none; }

/* ---------- Profile & friends (1.9) ---------- */
.me-btn { position: relative; color: var(--text); }
.me-btn .av.mini { width: 30px; height: 30px; }
.me-btn.has-new::after { content: ""; position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 2px var(--mid); }
body[data-screen="game"] .me-btn, body[data-screen="tutorial"] .me-btn { display: none; }
.av { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; color: var(--glow); background: radial-gradient(circle at 35% 30%, #5ff2d633, #5ff2d60a 70%); border: 1px solid #5ff2d644; }
.av svg { width: 62%; height: 62%; }
.av.big { width: 64px; height: 64px; }
.av.mini { width: 26px; height: 26px; }
.av-1, .av-5, .av-9 { color: var(--fx-rare); border-color: #6ec8ff44; background: radial-gradient(circle at 35% 30%, #6ec8ff33, #6ec8ff0a 70%); }
.av-2, .av-6, .av-10 { color: var(--fx-epic); border-color: #b58cff44; background: radial-gradient(circle at 35% 30%, #b58cff33, #b58cff0a 70%); }
.av-3, .av-7, .av-11 { color: var(--gold); border-color: #ffd27a44; background: radial-gradient(circle at 35% 30%, #ffd27a33, #ffd27a0a 70%); }
.acc-avatars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 6px 0 18px; }
.acc-av { display: grid; place-items: center; min-height: 52px; padding: 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.acc-av .av { width: 40px; height: 40px; }
.acc-av.on { border-color: var(--glow); box-shadow: 0 0 0 1px var(--glow), 0 0 16px #5ff2d633; }
.acc-preview { margin: 0; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.acc-privacy { margin: 18px 0 4px; color: var(--muted); font-size: 13px; text-align: center; }
.account .link-btn { display: block; margin: 8px auto 0; }
.acc-head { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.acc-head .title { margin: 0; }
.acc-fid { color: var(--glow); font-weight: 700; letter-spacing: .06em; font-size: 14px; }
.acc-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 20px 0 4px; padding: 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.acc-tab { position: relative; min-height: 40px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-weight: 700; font-size: 15px; }
.acc-tab.on { background: var(--glow); color: var(--ink); }
.acc-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 999px; background: var(--coral); color: var(--ink); font-size: 11px; font-weight: 800; vertical-align: 1px; }
.acc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 18px; }
.acc-row .label { width: 100%; }
.acc-fid-big { font-size: 24px; font-weight: 800; letter-spacing: .04em; margin-right: auto; overflow-wrap: anywhere; }
.acc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.acc-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-align: center; min-width: 0; }
.acc-stat b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.acc-stat span { color: var(--muted); font-size: 12px; line-height: 1.25; }
.acc-lv { margin: 8px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.acc-best { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.acc-best b { font-size: 20px; font-weight: 800; overflow-wrap: anywhere; }
.acc-best-sub { color: var(--muted); font-size: 13px; }
.acc-warn p { margin: 0 0 12px; color: var(--text); }
.acc-warn { border-color: #ffd27a66; }
.acc-saved { display: flex; align-items: center; gap: 10px; color: var(--text); }
.acc-saved span { display: inline-flex; color: var(--glow); }
.acc-saved svg { width: 20px; height: 20px; }
.acc-del { margin-top: 22px; border-color: #ff7a8a66; }
.acc-del p { margin: 0 0 12px; }
.acc-danger { background: var(--coral); }
.acc-del-link { margin-top: 26px !important; color: var(--coral); }
.acc-addrow { display: flex; gap: 8px; }
.acc-addrow .field { flex: 1; min-width: 0; text-transform: uppercase; }
.acc-addrow .btn { flex: none; width: auto; min-width: 96px; margin-top: 0; padding: 0 22px; }
.acc-addrow .field::placeholder { text-transform: none; }
.acc-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.acc-list + .acc-list { margin-top: 8px; }
.acc-person { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); flex-wrap: wrap; }
.acc-person-main { display: flex; flex-direction: column; flex: 1; min-width: 110px; }
.acc-person-main b { font-weight: 800; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-sub { color: var(--muted); font-size: 13px; }
.acc-person.is-on .acc-sub { color: var(--glow); }
.acc-person.is-on .av { box-shadow: 0 0 0 2px var(--mid), 0 0 0 4px var(--glow); }
.acc-person-tools { display: flex; gap: 6px; margin-left: auto; }
.acc-person-tools .chip-btn { min-height: 38px; padding: 0 12px; }
.acc-week { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.acc-week li { display: grid; grid-template-columns: 22px auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.acc-week li.me { border-color: #5ff2d666; }
.acc-week .acc-rank { color: var(--muted); font-weight: 800; text-align: center; }
.acc-week li:first-child .acc-rank { color: var(--gold); }
.acc-wname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.acc-week b { font-variant-numeric: tabular-nums; }
.acc-weekbest { margin: 10px 0 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.acc-addc { text-align: center; }
.acc-addc .btn { width: 100%; }
/* Add friend next to an opponent */
.acc-slot:empty { display: none; }
.acc-add { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin-top: 6px; padding: 0 12px; border-radius: 999px; border: 1px solid #5ff2d666; background: #5ff2d614; color: var(--text); font-size: 14px; font-weight: 700; white-space: nowrap; }
.acc-add span { color: var(--glow); font-size: 18px; line-height: 1; }
.acc-add:disabled { opacity: .7; }
.acc-tag { display: inline-block; margin-top: 6px; color: var(--glow); font-size: 13px; font-weight: 700; }
.acc-tag.ghost { color: var(--muted); }
.pt-row .acc-slot { grid-column: 2; grid-row: 2; }
.pt-row .acc-add, .pt-row .acc-tag { margin-top: 0; }
/* a friend's invite, on top of whatever is on screen */
.inv-pop { position: fixed; z-index: 80; top: max(12px, env(safe-area-inset-top, 0px)); left: 16px; right: 16px; margin: 0 auto; max-width: 420px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px 12px; padding: 14px; border-radius: 18px; background: #0b2d3df5; border: 1px solid #5ff2d666; box-shadow: 0 18px 50px #0009, 0 0 30px #5ff2d622; }
.inv-pop .av.big { width: 48px; height: 48px; }
.inv-pop-text b { font-weight: 800; font-size: 16px; line-height: 1.25; }
.inv-pop .btn-row { grid-column: 1 / -1; }
@media (max-width: 420px) {
  .acc-avatars { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .acc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acc-person-tools { width: 100%; margin-left: 50px; }
}
body.lite .acc-av.on, body.lite .inv-pop { box-shadow: none; }

/* ---------- 2.0: language button, time per answer ---------- */
.lang-btn { font: 800 13px var(--font); letter-spacing: .06em; color: var(--muted); }
.lang-btn:hover { color: var(--glow); }
.round { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.top-right { min-width: 0; }
.time-pick { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 14px 0 4px; }
.time-pick .chips { gap: 6px; }
.time-chip { min-width: 64px; justify-content: center; padding: 0 14px; }
.time-chip.on { border-color: var(--glow); background: var(--glow); color: var(--ink); }
#solo-time { margin-top: 6px; }
.live-time { margin-top: 10px; }

/* Questions : pas de sélection ni de copie (anti « copier-coller dans une IA ») */
.prompt, .prompt-block, .pt-prompt {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}

/* =====================  2.2: unique name, leaderboard, 👀, strict mode  ===================== */
.lb-home { display: inline-flex; align-items: center; gap: 2px; }
.acc-claim { margin-top: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.acc-claim form { width: 100%; }
.acc-claim .acc-addrow .field { text-transform: none; }
.acc-claim [data-state="free"], #acc-pick [data-state="free"] { color: var(--glow); }
.acc-claim [data-state="taken"], .acc-claim [data-state="bad"], #acc-pick [data-state="taken"] { color: #ff8f8f; }
.acc-lb-link { margin-top: 16px; }
.lb-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lb-tabs .acc-tab { font-size: 13px; padding: 0 4px; line-height: 1.15; overflow-wrap: anywhere; }
@media (max-width: 420px) {
  .lb-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 22px; }
}
#lb-box { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.lb-list li b { white-space: nowrap; }
.lb-outside { padding: 10px 12px; border-radius: 12px; border: 1px dashed #5ff2d666; font-weight: 700; }
.lb-how li { margin-bottom: 8px; }
#lb-hide { align-self: center; }
.ans .away, .pt-g-away { font-size: 12px; font-weight: 700; color: #ffb86b; margin-top: 4px; overflow-wrap: anywhere; }
.rc-away { display: block; font-size: 12px; font-weight: 700; color: #ffb86b; margin-top: 2px; }
.pt-strict { margin-top: 10px; }
#acc-addid { text-transform: none; }
.acc-tabs .acc-tab { min-width: 0; padding: 0 4px; line-height: 1.15; overflow-wrap: anywhere; }
html[lang="ru"] .acc-tabs .acc-tab { font-size: 13px; }

/* 2.5 — glows follow the shape: a round halo for the timer (no SVG filter, which drew a square on some PCs),
   only the outline for the answer field, a tighter halo for the main button */
.clock svg, .pt-clock svg { overflow: visible; }
.clock::before, .pt-clock::before { content: ""; position: absolute; inset: 2px; border-radius: 50%; pointer-events: none; box-shadow: 0 0 10px #5ff2d64d; transition: box-shadow .3s; }
.clock.danger::before, .pt-clock.danger::before { box-shadow: 0 0 12px #ff7a8a73; }
.btn { box-shadow: 0 0 18px #5ff2d640; }
.btn-ghost { box-shadow: none; }
.btn:focus { outline: none; }
.btn:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }
.ico-inline { display: inline-flex; width: 1.15em; height: 1.15em; margin-right: .4em; vertical-align: -.2em; }
.ico-inline svg { width: 100%; height: 100%; }
body.lite .clock::before, body.lite .pt-clock::before { box-shadow: none; }

/* 2.6 — Daily fight banner on Home + friends' daily scores */
.daily-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; margin: 0 0 12px; padding: 14px 16px; min-height: 64px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--card);
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.daily-banner.todo { border-color: #5ff2d6aa; box-shadow: 0 0 0 1px #5ff2d633; }
.daily-banner.done { opacity: .85; }
.dbh-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dbh-title { font-weight: 800; font-size: 17px; letter-spacing: -.2px; }
.dbh-sub { color: var(--muted); font-size: 14px; }
.daily-banner.todo .dbh-sub { color: var(--glow); }
.dbh-right { flex: none; font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.daily-banner:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }
.daily-friends { display: flex; flex-direction: column; gap: 6px; }
.df-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 52px; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.df-row.me { border-color: #5ff2d6aa; }
.df-rank { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.df-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.df-emo { letter-spacing: 1px; font-size: 14px; }
.df-dmg { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.daily-next { margin: 12px 0 0; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
