/* the imposter game — Midnight Salon / Wax & Ink design system */
:root {
  --bg: #0a0a0e;
  --surface: #14141b;
  --surface2: #1c1c25;
  --ink: #f3efe6;
  --muted: #9896a3;
  --faint: #62606d;
  --accent: #e85d4a;
  --accent-deep: #b83728;
  --accent-ink: #fff8f5;
  --bone: #d9ccb4;
  --green: #4bd4ae;
  --red: #ff6b6b;
  --fill: rgba(255, 255, 255, .075);
  --fill2: rgba(255, 255, 255, .045);
  --line: rgba(255, 255, 255, .1);
  --sep: rgba(255, 255, 255, .085);
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
  letter-spacing: -.005em;
}
button, input, select {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

/* ── Atmospheric Canvas ─────────────────────────────── */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(105% 65% at 50% -12%, rgba(44, 42, 62, .52) 0%, transparent 62%),
    radial-gradient(110% 75% at 50% 118%, rgba(42, 22, 26, .35) 0%, transparent 58%),
    var(--bg);
  transition: background .6s ease;
}
body.salonbg .bg {
  background:
    radial-gradient(75% 42% at 50% -4%, rgba(232, 93, 74, .11), transparent 68%),
    radial-gradient(125% 90% at 50% 24%, #1a1924 0%, #101017 48%, #0a0a0e 85%, #07070a 100%);
}
body.salonbg .bg::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .38;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .85 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.salonbg .bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 85% at 50% 40%, transparent 54%, rgba(0, 0, 0, .58) 100%);
}
body.revealbg .bg {
  background:
    radial-gradient(95% 65% at 50% 18%, rgba(232, 93, 74, .2) 0%, transparent 62%),
    radial-gradient(110% 80% at 50% 115%, rgba(160, 40, 30, .24) 0%, transparent 60%),
    var(--bg);
}
body.clearedbg .bg {
  background:
    radial-gradient(95% 62% at 50% 16%, rgba(75, 212, 174, .18) 0%, transparent 62%),
    radial-gradient(115% 78% at 50% 114%, rgba(34, 134, 105, .24) 0%, transparent 62%),
    #080d0b;
}

#app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(var(--st) + 14px) 18px calc(var(--sb) + 24px);
}
#app:has(.full-stage) {
  padding-bottom: calc(var(--sb) + 18px);
}

.screen {
  display: flex;
  flex-direction: column;
  animation: fadeUp .38s cubic-bezier(.22, 1, .36, 1) both;
}
.screen.center { align-items: center; text-align: center; }
.full-stage {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--st) - 14px - var(--sb) - 18px);
  min-height: 0;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ── Top Bar & Brand ────────────────────────────────── */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  margin-bottom: 10px;
  flex: none;
}
.icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--fill);
  color: var(--ink);
  line-height: 1;
  transition: transform .15s, background .15s;
}
.icon-btn svg {
  width: 20px;
  height: 20px;
  display: block;
  flex: none;
}
.icon-btn:active { transform: scale(.93); background: rgba(255, 255, 255, .13); }

.round-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--fill2);
  border: 1px solid var(--sep);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
}

.brand-sm {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -.02em;
  color: var(--ink);
}
.brand-sm em {
  font-style: italic;
  color: var(--accent);
}

/* ── Home ───────────────────────────────────────────── */
.home {
  min-height: calc(100dvh - var(--st) - var(--sb) - 42px);
  justify-content: space-between;
}
.logo-wrap {
  padding-top: 11vh;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.logo {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(44px, 12.8vw, 62px);
  letter-spacing: -.035em;
  line-height: 1;
  color: var(--ink);
  text-shadow: 0 2px 18px rgba(0, 0, 0, .4);
}
.logo em {
  font-style: italic;
  color: var(--accent);
}
.home-sub {
  font-size: 15px;
  color: var(--muted);
  max-width: 280px;
  line-height: 1.45;
}

/* ── Living Salon Eye (Central Motif) ───────────────── */
.salon-eye {
  --eye-size: 74px;
  --eye-svg: 42px;
  --eye-rim: var(--bone);
  --eye-iris-a: rgba(243, 239, 230, .96);
  --eye-iris-b: rgba(217, 204, 180, .68);
  --eye-reticle: rgba(217, 204, 180, .38);
  --eye-sclera-a: #171722;
  --eye-sclera-b: #0b0b11;
  --eye-lid: #12121a;
  --eye-glow: rgba(217, 204, 180, .18);
  --eye-ring-c: rgba(217, 204, 180, .2);
  --eye-ring-outer: rgba(217, 204, 180, .13);
  --gx: 0px;
  --gy: 0px;
  --lid-t: -27px;
  --lid-b: 27px;
  --psx: 1;
  --psy: 1;
  --iris-s: 1;
  --rot: 0deg;
  --eye-tilt: 0deg;
  --gaze-ms: 360ms;
  --lid-ms: 150ms;
  --pupil-ms: 320ms;
  --reticle-ms: 700ms;
  position: relative;
  display: inline-grid;
  place-items: center;
  width: var(--eye-size);
  height: var(--eye-size);
  flex: none;
  user-select: none;
  -webkit-user-select: none;
}
.salon-eye.is-interactive { cursor: pointer; }
.salon-eye.is-interactive:active .eye-core { transform: scale(.95); }

.eye-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--eye-ring-c);
  pointer-events: none;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), border-color .4s ease, opacity .4s ease;
}
.eye-ring.inner {
  inset: 0;
  animation: breathe 4.6s ease-in-out infinite;
}
.eye-ring.outer {
  inset: -13px;
  border-style: dashed;
  border-color: var(--eye-ring-outer);
  animation: slowSpin 42s linear infinite;
}
.eye-ring.tick-ring {
  inset: -7px;
  border: 0;
  background:
    linear-gradient(var(--eye-ring-c), var(--eye-ring-c)) 50% 0 / 1px 5px no-repeat,
    linear-gradient(var(--eye-ring-c), var(--eye-ring-c)) 50% 100% / 1px 5px no-repeat,
    linear-gradient(var(--eye-ring-c), var(--eye-ring-c)) 0 50% / 5px 1px no-repeat,
    linear-gradient(var(--eye-ring-c), var(--eye-ring-c)) 100% 50% / 5px 1px no-repeat;
  opacity: .55;
}
.salon-eye.tense .eye-ring.inner {
  transform: scale(.93);
  border-color: var(--eye-rim);
}

.eye-pulse {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid var(--eye-rim);
  opacity: 0;
  pointer-events: none;
}
.salon-eye.pulsing .eye-pulse-a {
  animation: eyeEcho 1.45s cubic-bezier(.16, .84, .32, 1) forwards;
}
.salon-eye.pulsing .eye-pulse-b {
  animation: eyeEcho 1.45s cubic-bezier(.16, .84, .32, 1) .24s forwards;
}
@keyframes eyeEcho {
  0% { transform: scale(.86); opacity: .55; }
  100% { transform: scale(1.62); opacity: 0; }
}

.eye-core {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 38% 30%, #23222f 0%, #13131b 68%, #0d0d13 100%);
  border: 1px solid rgba(255, 255, 255, .11);
  box-shadow:
    0 16px 36px -14px rgba(0, 0, 0, .88),
    0 0 28px -10px var(--eye-glow),
    inset 0 1px 0 rgba(255, 255, 255, .1);
  transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .4s ease, border-color .4s ease;
}
.eye-svg {
  width: var(--eye-svg);
  height: var(--eye-svg);
  display: block;
  overflow: visible;
  transform: rotate(var(--eye-tilt));
  transition: transform 420ms cubic-bezier(.22, 1, .36, 1);
}
.eye-gaze {
  transform: translate(var(--gx), var(--gy));
  transition: transform var(--gaze-ms) cubic-bezier(.22, 1, .36, 1);
}
.eye-reticle {
  transform: rotate(var(--rot));
  transition: transform var(--reticle-ms) cubic-bezier(.22, 1, .36, 1);
}
.eye-iris-group {
  transform: scale(var(--iris-s));
  transition: transform var(--pupil-ms) cubic-bezier(.22, 1, .36, 1);
}
.eye-pupil {
  transform: scale(var(--psx), var(--psy));
  transition: transform var(--pupil-ms) cubic-bezier(.22, 1, .36, 1);
}
.eye-lid-top {
  transform: translateY(var(--lid-t));
  transition: transform var(--lid-ms) cubic-bezier(.38, .08, .25, 1);
}
.eye-lid-bot {
  transform: translateY(var(--lid-b));
  transition: transform var(--lid-ms) cubic-bezier(.38, .08, .25, 1);
}

/* Eye Context Variants */
.salon-eye.is-hero {
  --eye-size: 108px;
  --eye-svg: 74px;
  --eye-rim: var(--accent);
  --eye-reticle: rgba(232, 93, 74, .42);
  --eye-glow: rgba(232, 93, 74, .34);
  --eye-ring-c: rgba(232, 93, 74, .32);
  --eye-ring-outer: rgba(217, 204, 180, .16);
  margin: 8px 0 4px;
}
.salon-eye.is-hero .eye-core {
  background: radial-gradient(circle at 38% 30%, rgba(232, 93, 74, .22), #15141d 62%, #0e0e15 100%);
  border-color: rgba(232, 93, 74, .36);
}

.salon-eye.is-seal {
  --eye-size: 92px;
  --eye-svg: 62px;
  --eye-rim: var(--accent);
  --eye-reticle: rgba(232, 93, 74, .38);
  --eye-glow: rgba(232, 93, 74, .28);
  --eye-ring-c: rgba(232, 93, 74, .26);
  --eye-ring-outer: rgba(217, 204, 180, .14);
}
.salon-eye.is-seal .eye-core {
  background: radial-gradient(circle at 38% 30%, rgba(232, 93, 74, .18), #14141d 65%, #0d0d14 100%);
  border-color: rgba(232, 93, 74, .3);
}

/* Card Guardian: strictly bone & obsidian — identical for crew and imposter! */
.salon-eye.is-card {
  --eye-size: clamp(118px, 35vw, 144px);
  --eye-svg: clamp(86px, 25.5vw, 106px);
  --eye-rim: var(--bone);
  --eye-reticle: rgba(217, 204, 180, .4);
  --eye-glow: rgba(217, 204, 180, .2);
  --eye-ring-c: rgba(217, 204, 180, .22);
  --eye-ring-outer: rgba(217, 204, 180, .14);
}
.salon-eye.is-card .eye-ring.inner { inset: -14px; }
.salon-eye.is-card .eye-ring.tick-ring { inset: -23px; }
.salon-eye.is-card .eye-ring.outer { inset: -32px; }

/* Lobby Table Watcher */
.salon-eye.is-table {
  --eye-size: 56px;
  --eye-svg: 38px;
  --eye-rim: rgba(217, 204, 180, .86);
  --eye-reticle: rgba(217, 204, 180, .3);
  --eye-glow: rgba(232, 93, 74, .16);
  --eye-ring-c: rgba(217, 204, 180, .16);
}
.salon-eye.is-table .eye-core {
  background: radial-gradient(circle at 40% 32%, #1d1c28, #101018 76%);
  border-color: rgba(217, 204, 180, .16);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, .65), 0 8px 20px -10px rgba(0, 0, 0, .8);
}

/* Host Veiled Curtain Guardian */
.salon-eye.is-curtain {
  --eye-size: 94px;
  --eye-svg: 64px;
  --eye-rim: var(--bone);
  --eye-glow: rgba(217, 204, 180, .2);
  --eye-ring-c: rgba(217, 204, 180, .24);
  margin-bottom: 6px;
}

/* Mini Dossier Header Eye */
.salon-eye.is-mini {
  --eye-size: 24px;
  --eye-svg: 22px;
  --eye-rim: rgba(217, 204, 180, .72);
  --eye-reticle: rgba(217, 204, 180, .24);
  --eye-lid: #15151e;
}
.salon-eye.is-mini .eye-core {
  background: none;
  border: 0;
  box-shadow: none;
}

/* Reveal Awakened Eye */
.salon-eye.is-reveal {
  --eye-size: 56px;
  --eye-svg: 36px;
  --eye-rim: var(--accent);
  --eye-reticle: rgba(232, 93, 74, .48);
  --eye-glow: rgba(232, 93, 74, .4);
  --eye-ring-c: rgba(232, 93, 74, .34);
  margin-bottom: 2px;
}
.salon-eye.is-reveal .eye-core {
  background: radial-gradient(circle at 40% 32%, rgba(232, 93, 74, .24), #161115 70%);
  border-color: rgba(232, 93, 74, .44);
}

/* Innocent Cleared Verdict Overlay Eye */
.salon-eye.is-verdict {
  --eye-size: 98px;
  --eye-svg: 58px;
  --eye-rim: var(--green);
  --eye-iris-a: rgba(243, 239, 230, .98);
  --eye-iris-b: rgba(75, 212, 174, .7);
  --eye-reticle: rgba(75, 212, 174, .42);
  --eye-glow: rgba(75, 212, 174, .32);
  --eye-ring-c: rgba(75, 212, 174, .38);
  --eye-ring-outer: rgba(217, 204, 180, .2);
}
.salon-eye.is-verdict .eye-core {
  background: radial-gradient(circle at 38% 30%, rgba(75, 212, 174, .18), #12171b 66%, #0c0f13 100%);
  border-color: rgba(75, 212, 174, .42);
}

/* Unmasking Ritual Overlay Eye */
.salon-eye.is-unmask {
  --eye-size: 132px;
  --eye-svg: 78px;
  --eye-rim: var(--accent);
  --eye-iris-a: #fff6f2;
  --eye-iris-b: rgba(232, 93, 74, .82);
  --eye-reticle: rgba(232, 93, 74, .56);
  --eye-glow: rgba(232, 93, 74, .65);
  --eye-ring-c: rgba(232, 93, 74, .58);
  --eye-ring-outer: rgba(217, 204, 180, .34);
}
.salon-eye.is-unmask .eye-core {
  background: radial-gradient(circle at 42% 35%, rgba(232, 93, 74, .32), #1b0e12 65%, #0e090c 100%);
  border-color: rgba(232, 93, 74, .58);
  box-shadow: 0 0 70px -8px rgba(232, 93, 74, .65), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.salon-eye.is-unmask .eye-ring.outer { inset: -20px; animation-duration: 7s; }
.salon-eye.is-unmask .eye-ring.inner { inset: -8px; }
.roles {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding-top: 32px;
  padding-bottom: 8px;
}
.resume {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(232, 93, 74, .14), rgba(255, 255, 255, .04));
  border: 1px solid rgba(232, 93, 74, .28);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  transition: transform .15s, background .15s;
}
.resume:active { transform: scale(.985); }
.resume span { font-size: 20px; color: var(--accent); line-height: 1; }

.how {
  margin-top: 8px;
  text-align: center;
}
.how summary {
  list-style: none;
  display: inline-block;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}
.how summary::-webkit-details-marker { display: none; }
.how p {
  margin-top: 6px;
  padding: 15px 16px;
  border-radius: 18px;
  background: var(--fill2);
  border: 1px solid var(--sep);
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  text-align: left;
}

/* ── Controls & Buttons ─────────────────────────────── */
.cta {
  width: 100%;
  min-height: 54px;
  padding: 14px 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ef6855 0%, var(--accent) 55%, #d64c3a 100%);
  color: var(--accent-ink);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 12px 28px -12px rgba(232, 93, 74, .65), inset 0 1px 0 rgba(255, 255, 255, .24);
  transition: transform .15s, opacity .2s, box-shadow .2s;
}
.cta:active:not(:disabled) { transform: scale(.98); }
.cta:disabled {
  background: var(--fill2);
  color: var(--muted);
  box-shadow: none;
  border: 1px solid var(--sep);
}
.cta.bone {
  background: linear-gradient(180deg, #efe6d4, var(--bone));
  color: #161412;
  box-shadow: 0 12px 28px -14px rgba(217, 204, 180, .45);
}

.ghost {
  width: 100%;
  min-height: 52px;
  padding: 13px 20px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .15s, background .15s;
}
.ghost:active:not(:disabled) { transform: scale(.98); background: rgba(255, 255, 255, .11); }
.ghost:disabled { opacity: .45; }

.link {
  color: var(--bone);
  font-size: 15px;
  font-weight: 600;
  padding: 8px 10px;
  transition: opacity .15s;
}
.link:active { opacity: .65; }
.accent-link { color: var(--accent); }
.danger-link { color: var(--red) !important; }
.muted { color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }

/* ── Player Names ───────────────────────────────────── */
.nt {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: .86em;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c, var(--ink));
  line-height: 1;
  vertical-align: baseline;
  white-space: nowrap;
}

/* ── Forms & Join Screen ────────────────────────────── */
.title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 34px;
  letter-spacing: -.03em;
  margin: 12px 0 22px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .01em;
}
.input {
  width: 100%;
  min-height: 54px;
  padding: 13px 16px;
  border-radius: 16px;
  background: var(--fill2);
  border: 1.5px solid var(--sep);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  transition: border-color .18s, background .18s;
}
.input::placeholder { color: var(--faint); }
.input:focus {
  border-color: var(--accent);
  background: var(--fill);
}
.code-in {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: .28em;
  padding-left: calc(16px + .28em);
  text-align: center;
  text-transform: uppercase;
}
.hint {
  min-height: 20px;
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
}
.hint.ok, .hint.nearby { color: var(--green); }
.hint.bad { color: var(--red); }

.nearby-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}
.nearby-options { display: grid; gap: 8px; }
.nearby-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--fill2);
  border: 1.5px solid var(--sep);
  text-align: left;
  transition: border-color .15s, background .15s;
}
.nearby-choice[aria-pressed="true"] {
  border-color: var(--green);
  background: rgba(75, 212, 174, .1);
}
.nearby-choice b {
  font-family: var(--mono);
  font-size: 20px;
  letter-spacing: .16em;
  color: var(--ink);
}
.nearby-choice span { font-size: 13.5px; color: var(--muted); }

/* ── Lobby: QR, Discovery, Salon Round Table ────────── */
.lobbyv { gap: 10px; }
.code-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0 0;
}
.qr {
  width: 152px;
  height: 152px;
  padding: 10px;
  border-radius: 22px;
  background: #f5f1e8;
  box-shadow: 0 24px 52px -22px rgba(0, 0, 0, .92), 0 0 0 6px rgba(255, 255, 255, .04);
}
.qr svg { width: 100%; height: 100%; display: block; }
.room {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 12px 0 0;
}
.room small {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.room b {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: .2em;
  padding-left: .2em;
  color: var(--ink);
}

.lobby-discovery {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--fill2);
  border: 1px solid var(--sep);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
}

/* Switches */
[role="switch"] > i {
  display: block;
  flex: none;
  width: 44px;
  height: 26px;
  padding: 3px;
  border-radius: 16px;
  background: #2f2e39;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  transition: background .18s;
}
[role="switch"] > i::after {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .4);
  transition: transform .18s cubic-bezier(.22, 1, .36, 1);
}
[role="switch"][aria-checked="true"] > i { background: var(--accent); }
[role="switch"][aria-checked="true"] > i::after { transform: translateX(18px); }

/* Salon Round Table */
.round {
  position: relative;
  width: min(100%, 336px);
  aspect-ratio: 1;
  margin: 22px auto 0;
}
.salon-table {
  position: absolute;
  inset: 21%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 35%, #22212d 0%, #14141c 64%, #0f0f15 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .09),
    inset 0 0 0 10px rgba(255, 255, 255, .015),
    inset 0 16px 36px rgba(0, 0, 0, .55),
    0 26px 60px -24px rgba(0, 0, 0, .92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  padding: 11%;
}
.salon-table .dir {
  position: absolute;
  inset: -19%;
  width: 138%;
  height: 138%;
  color: rgba(217, 204, 180, .2);
  pointer-events: none;
}
.salon-table .hint {
  position: relative;
  min-height: 0;
  max-width: 132px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.32;
}
.seat3 {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: left .55s cubic-bezier(.3, 1.25, .45, 1), top .55s cubic-bezier(.3, 1.25, .45, 1), transform .22s;
}
.plate {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 13px;
  background: rgba(16, 16, 23, .92);
  border: 1px solid rgba(255, 255, 255, .11);
  box-shadow: 0 14px 28px -14px rgba(0, 0, 0, .88);
  backdrop-filter: blur(8px);
  font-size: 13px;
  max-width: 112px;
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.plate .nt {
  display: block;
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.seat3.sel .plate {
  transform: scale(1.1);
  border-color: var(--c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 26%, transparent), 0 0 26px -4px var(--c);
}
.seat3.new { animation: seatIn .5s cubic-bezier(.3, 1.45, .5, 1) both; }
@keyframes seatIn { from { opacity: 0; transform: translate(-50%, -50%) scale(.45); } }
.seat3 .first {
  position: absolute;
  top: -17px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--bone);
}
.seat-acts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 14px;
  margin-top: 6px;
  min-height: 38px;
}

.settings {
  border-radius: 18px;
  background: var(--fill2);
  border: 1px solid var(--sep);
  padding: 4px 16px;
  margin-top: 4px;
}
.settings summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.settings summary::-webkit-details-marker { display: none; }
.settings summary span { font-size: 13.5px; font-weight: 500; color: var(--muted); }
.setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--sep);
  font-size: 14.5px;
}
.count-picker select {
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.sticky-cta {
  position: sticky;
  bottom: calc(var(--sb) + 8px);
  padding-top: 12px;
  margin-top: 6px;
  background: linear-gradient(180deg, transparent, var(--bg) 36%);
}

/* ── Host Compose Screen (Setup) ────────────────────── */
.compose-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
  padding: 4px 0 14px;
}
.dossier-form {
  position: relative;
  border-radius: 26px;
  padding: 22px 20px 20px;
  background: linear-gradient(180deg, #171720 0%, #111118 100%);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 28px 60px -28px rgba(0, 0, 0, .92), inset 0 1px 0 rgba(255, 255, 255, .07);
}
.dossier-form::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .045);
  pointer-events: none;
}
.dossier-kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dossier-field {
  margin-bottom: 16px;
}
.dossier-field label {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bone);
  margin-bottom: 7px;
}
.dossier-field.hint-field label { color: var(--accent); }
.dossier-input {
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(8, 8, 12, .65);
  border: 1px solid rgba(255, 255, 255, .1);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  color: var(--ink);
  transition: border-color .18s, box-shadow .18s;
}
.dossier-input.hint-in { font-style: italic; font-size: 21px; }
.dossier-input::placeholder { color: var(--faint); font-style: italic; }
.dossier-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 93, 74, .16);
}

.picker-group { margin-top: 16px; }
.picker-group.is-divider {
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--sep);
}
.picker-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 9px;
}
.picker-label span:last-child {
  font-size: 10px;
  color: var(--faint);
}
.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.pick-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 35px;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--fill2);
  border: 1px solid var(--sep);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  color: var(--muted);
  transition: background .15s, border-color .15s, transform .12s, color .15s, box-shadow .15s;
}
.pick-pill:active { transform: scale(.96); }
.pick-pill.on {
  background: rgba(232, 93, 74, .18);
  border-color: rgba(232, 93, 74, .65);
  color: var(--ink);
  box-shadow: 0 0 18px -6px rgba(232, 93, 74, .65);
}
.pick-pill.on-bone {
  background: rgba(217, 204, 180, .14);
  border-color: rgba(217, 204, 180, .58);
  color: var(--ink);
  box-shadow: 0 0 18px -6px rgba(217, 204, 180, .42);
}
.pick-pill.random-pill { letter-spacing: .01em; }
.pick-pill .nt { font-size: 12px; }

/* ── Host Active Round (Dossier + Order Strip) ──────── */
.stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-bottom: 12px;
}
.host-dossier {
  position: relative;
  width: 100%;
  border-radius: 28px;
  padding: 22px 22px 24px;
  background: linear-gradient(170deg, #191923 0%, #121219 100%);
  border: 1px solid rgba(255, 255, 255, .11);
  box-shadow: 0 30px 64px -26px rgba(0, 0, 0, .92), inset 0 1px 0 rgba(255, 255, 255, .08);
  overflow: hidden;
}
.host-dossier::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 21px;
  border: 1px solid rgba(255, 255, 255, .05);
  pointer-events: none;
}
.hd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  position: relative;
  z-index: 2;
}
.hd-head-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hd-head-left > span {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.veil-toggle {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--fill);
  border: 1px solid var(--sep);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}
.hd-body {
  display: grid;
  gap: 16px;
  transition: filter .24s ease, opacity .24s ease;
}
.host-dossier.veiled .hd-body {
  filter: blur(22px);
  opacity: .14;
  user-select: none;
  pointer-events: none;
}
.hd-curtain {
  display: none;
  position: absolute;
  inset: 56px 0 0;
  z-index: 2;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  cursor: pointer;
}
.host-dossier.veiled .hd-curtain { display: flex; }
.hd-curtain b {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
}
.hd-curtain small {
  font-size: 13px;
  color: var(--muted);
}

.hd-block small {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--bone);
  margin-bottom: 4px;
}
.hd-block.is-hint small { color: var(--accent); }
.hd-word {
  font-family: var(--serif);
  font-size: clamp(32px, 9vw, 42px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.025em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.hd-hint {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 6vw, 28px);
  line-height: 1.2;
  color: rgba(243, 239, 230, .9);
  overflow-wrap: anywhere;
}
.hd-sep { height: 1px; background: var(--sep); }
.hd-imposter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hd-imposter .imp-name { font-size: 20px; }
.hd-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(232, 93, 74, .14);
  border: 1px solid rgba(232, 93, 74, .34);
  color: var(--accent);
}
.hd-warn {
  margin-top: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255, 107, 107, .12);
  border: 1px solid rgba(255, 107, 107, .28);
  font-size: 13px;
  color: #ff9c9c;
}

/* First-to-speak cue (shared cleanly across host & player play screens, auto-hides after 15s) */
.starter-slot {
  display: flex;
  justify-content: center;
  max-height: 44px;
  overflow: hidden;
  transition: opacity .5s ease, max-height .5s ease, margin .5s ease, transform .5s ease;
}
.starter-slot:empty,
.starter-slot.gone {
  opacity: 0;
  max-height: 0;
  margin-top: -14px;
  transform: translateY(-4px);
  pointer-events: none;
}
#clearedSlot:empty,
#hostClearedSlot:empty {
  display: none;
}
.starter-cue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--fill2);
  border: 1px solid var(--sep);
  font-size: 13.5px;
  line-height: 1;
}
.starter-cue-lbl {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
}
.starter-cue-sep {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, .14);
  flex: none;
}

/* ── Player: Hold-to-Reveal Sealed Dossier Card ─────── */
.pcard-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.peek-card {
  position: relative;
  width: min(100%, 356px);
  aspect-ratio: 3 / 4;
  max-height: min(468px, calc(100dvh - var(--st) - var(--sb) - 205px));
  border-radius: 30px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
  cursor: pointer;
  background: linear-gradient(170deg, #16161f 0%, #0f0f15 100%);
  border: 1px solid rgba(255, 255, 255, .11);
  box-shadow:
    0 34px 72px -28px rgba(0, 0, 0, .95),
    inset 0 1px 0 rgba(255, 255, 255, .09);
  transition: transform .22s cubic-bezier(.22, 1, .36, 1), border-color .22s ease, box-shadow .22s ease, background .22s ease;
}
.peek-card:focus-visible {
  outline: 2px solid var(--bone);
  outline-offset: 4px;
}
.peek-card.open {
  transform: scale(1.018);
  background: radial-gradient(120% 85% at 50% 18%, #1e202b 0%, #13151d 65%, #0f1017 100%);
  border-color: rgba(217, 204, 180, .34);
  box-shadow:
    0 34px 72px -28px rgba(0, 0, 0, .95),
    0 0 38px -18px rgba(217, 204, 180, .24);
}
.peek-card.open .peek-frame {
  border-color: rgba(217, 204, 180, .22);
}

/* Cleared Innocent Card — calm smoked emerald glass, Eye removed */
.peek-card.is-cleared {
  background: linear-gradient(170deg, #12241f 0%, #0d1916 62%, #0a1210 100%);
  border-color: rgba(75, 212, 174, .34);
  box-shadow:
    0 34px 72px -28px rgba(0, 0, 0, .95),
    0 0 50px -18px rgba(75, 212, 174, .24),
    inset 0 1px 0 rgba(75, 212, 174, .16);
}
.peek-card.is-cleared .peek-frame {
  border-color: rgba(75, 212, 174, .2);
}
.peek-card.is-cleared.open {
  background: radial-gradient(120% 85% at 50% 18%, #162a24 0%, #0f1c18 65%, #0b1412 100%);
  border-color: rgba(75, 212, 174, .42);
  box-shadow:
    0 34px 72px -28px rgba(0, 0, 0, .95),
    0 0 46px -18px rgba(75, 212, 174, .28);
}
.cleared-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: popIn .55s cubic-bezier(.22, 1.25, .4, 1) both;
}
.cleared-emblem {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 40% 32%, rgba(75, 212, 174, .2), #101d19 70%);
  border: 1px solid rgba(75, 212, 174, .42);
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .82), 0 0 36px -10px rgba(75, 212, 174, .32);
}
.cleared-emblem::after {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid rgba(75, 212, 174, .16);
}
.cleared-emblem svg {
  width: 40px;
  height: 40px;
  color: var(--green);
}
.cleared-title {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.05;
  color: var(--ink);
}
.cleared-sub {
  font-size: 13.5px;
  color: rgba(182, 224, 211, .76);
}

.peek-face {
  position: absolute;
  inset: 0;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  transition: opacity .18s ease, transform .24s cubic-bezier(.22, 1, .36, 1);
}
.peek-frame {
  position: absolute;
  inset: 10px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .065);
  pointer-events: none;
  transition: border-color .2s ease;
}

/* Sealed (Closed) Face — 100% identical for crew & imposter */
.peek-closed {
  opacity: 1;
  transform: scale(1);
}
.peek-card.open .peek-closed {
  opacity: 0;
  transform: scale(.94);
  pointer-events: none;
}
.peek-owner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  opacity: .88;
}
.owner-cleared {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(75, 212, 174, .12);
  border: 1px solid rgba(75, 212, 174, .34);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green);
}
.seal-emblem {
  position: relative;
  width: clamp(174px, 50vw, 214px);
  height: clamp(174px, 50vw, 214px);
  display: grid;
  place-items: center;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: .7; }
  50% { transform: scale(1.06); opacity: 1; }
}
@keyframes slowSpin {
  to { transform: rotate(360deg); }
}

.hold-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.hold-cue b {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
}
.hold-cue span {
  font-size: 12.5px;
  color: var(--faint);
}

/* Open (Revealed) Face — identical dark-room slate & bone palette for crew and imposter */
.peek-open {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
  justify-content: center;
  gap: 14px;
}
.peek-card.open .peek-open {
  opacity: 1;
  transform: scale(1);
}
.peek-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--bone);
}
.peek-secret {
  font-family: var(--serif);
  font-size: clamp(34px, 10.5vw, 50px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.03em;
  color: var(--ink);
  overflow-wrap: anywhere;
  padding: 0 6px;
}
.peek-imp-word {
  font-family: var(--serif);
  font-size: clamp(38px, 11.5vw, 52px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -.03em;
  color: var(--ink);
}
.peek-rule {
  width: 40px;
  height: 1px;
  background: rgba(217, 204, 180, .32);
  margin: 4px auto 2px;
}
.peek-hint-kicker {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.peek-hint-copy {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 7.2vw, 32px);
  font-weight: 500;
  line-height: 1.15;
  color: var(--bone);
  overflow-wrap: anywhere;
  padding: 0 8px;
}
.peek-note {
  font-size: 13px;
  color: var(--muted);
  opacity: .85;
}

.spectator-card {
  width: min(100%, 340px);
  padding: 36px 24px;
  border-radius: 28px;
  background: var(--fill2);
  border: 1px solid var(--sep);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.spectator-card h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
}
.spectator-card p { font-size: 15px; color: var(--muted); line-height: 1.45; }

.cleared-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 356px;
}
.cleared-lbl {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-right: 2px;
}
.cleared-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(75, 212, 174, .08);
  border: 1px solid rgba(75, 212, 174, .26);
  font-size: 11.5px;
}
.cleared-chip i {
  font-style: normal;
  font-size: 10.5px;
  color: var(--green);
  line-height: 1;
}
.pfoot {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding-top: 6px;
  flex: none;
}
.pfoot .link { color: var(--muted); font-size: 14px; font-weight: 500; }

/* ── Player Waiting / Lobby ─────────────────────────── */
.wait {
  min-height: calc(100dvh - var(--st) - var(--sb) - 42px);
  text-align: center;
}
.wait-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 8vh;
}
.bigname {
  font-size: 40px;
  margin-bottom: 14px;
  animation: popIn .55s cubic-bezier(.3, 1.45, .5, 1) both;
}
@keyframes popIn { from { opacity: 0; transform: scale(.86); } }
.wait h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -.02em;
  margin-bottom: 6px;
}
.names {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
  max-width: 340px;
}
.names span {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--fill2);
  border: 1px solid var(--sep);
  font-size: 13px;
  animation: fadeUp .35s ease both;
}
.waiting-dots span {
  display: inline-block;
  animation: dotPulse 1.4s infinite both;
}
.waiting-dots span:nth-child(2) { animation-delay: .2s; }
.waiting-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes dotPulse { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ── Round Reveal & Unmasking Animation ─────────────── */
.reveal-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 22px;
  padding-bottom: 10px;
}
.reveal-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.reveal-glow {
  position: absolute;
  width: 240px;
  height: 140px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c, var(--accent)) 36%, transparent), transparent 70%);
  filter: blur(18px);
  pointer-events: none;
}
.reveal-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
}
.reveal-name {
  position: relative;
  font-size: clamp(38px, 12vw, 54px);
  animation: unmaskPop .7s cubic-bezier(.22, 1.35, .4, 1) both;
}
@keyframes unmaskPop {
  from { opacity: 0; transform: scale(.8) translateY(14px); }
  to { opacity: 1; transform: none; }
}
.reveal-dossier {
  width: 100%;
  border-radius: 26px;
  padding: 22px 20px;
  background: linear-gradient(175deg, rgba(26, 25, 34, .95), rgba(16, 16, 22, .95));
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 26px 56px -26px rgba(0, 0, 0, .92);
  display: grid;
  gap: 16px;
  text-align: center;
}
.reveal-dossier small {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--bone);
  margin-bottom: 4px;
}
.reveal-dossier .is-hint small { color: var(--accent); }
.reveal-dossier .val {
  font-family: var(--serif);
  font-size: clamp(28px, 8vw, 38px);
  font-weight: 500;
  line-height: 1.1;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.reveal-dossier .is-hint .val {
  font-style: italic;
  font-size: clamp(22px, 6vw, 28px);
  color: rgba(243, 239, 230, .88);
}

.dock {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
}
.dock-split {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.dock-split > * {
  flex: 1;
  min-width: 0;
  padding: 13px 12px;
  font-size: clamp(13.5px, 3.8vw, 15.5px);
  white-space: nowrap;
}
.dock-split .innocent-btn {
  border: 1px solid rgba(217, 204, 180, .2);
  background: linear-gradient(180deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .045));
}
.dock-split .innocent-btn:disabled {
  border-color: var(--sep);
  color: var(--muted);
}
.dock-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 36px;
}

/* Unmasking & Innocent Verdict Overlay Curtains */
.unmask-fx, .verdict-fx {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  animation: fxFadeIn .24s ease both;
}
.unmask-fx {
  background: radial-gradient(circle at 50% 44%, #251116 0%, #0b0a0f 72%);
}
.verdict-fx {
  background: radial-gradient(circle at 50% 44%, #101e1c 0%, #0a0a0e 72%);
}
.unmask-fx.out, .verdict-fx.out {
  opacity: 0;
  transition: opacity .36s ease;
}
.unmask-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  animation: sealRise .5s cubic-bezier(.22, 1, .36, 1) both;
}
.unmask-txt {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
}
.verdict-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: unmaskPop .55s cubic-bezier(.22, 1.25, .4, 1) .12s both;
}
.verdict-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--green);
}
.verdict-name {
  font-size: clamp(36px, 11vw, 50px);
}
.verdict-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 21px;
  color: var(--ink);
  opacity: .9;
}
@keyframes fxFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sealRise {
  from { opacity: 0; transform: scale(.86); }
  to { opacity: 1; transform: scale(1); }
}

/* ── Game Over / Session Recap ──────────────────────── */
.over-head {
  text-align: center;
  padding: 16px 0 22px;
}
.over-head small {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}
.over-head h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 11vw, 48px);
  font-weight: 500;
  letter-spacing: -.03em;
  margin: 6px 0;
}
.recap-list {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}
.recap-card {
  position: relative;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(175deg, #171721, #12121a);
  border: 1px solid var(--sep);
}
.recap-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.recap-num {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.recap-imp {
  font-size: 13px;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  color: var(--muted);
}
.recap-imp-lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}
.recap-word {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
}
.recap-hint {
  margin-top: 4px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--muted);
}
.recap-hint span {
  font-family: var(--mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-right: 6px;
}

/* ── Bottom Sheets & Modals ─────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, .52);
  overscroll-behavior: contain;
  touch-action: none;
  animation: fxFadeIn .2s ease both;
}
.modal[hidden] { display: none; }
.sheet {
  width: 100%;
  max-width: 520px;
  max-height: calc(100dvh - var(--st) - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  background: rgba(22, 22, 30, .97);
  backdrop-filter: blur(40px) saturate(1.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
  border-top: .5px solid rgba(255, 255, 255, .14);
  border-radius: 32px 32px 0 0;
  padding: 0 18px calc(var(--sb) + 20px);
  box-shadow: 0 -24px 64px -20px rgba(0, 0, 0, .75);
  will-change: transform;
  animation: sheetIn .34s cubic-bezier(.22, 1, .36, 1) both;
}
.sheet.dragging { user-select: none; -webkit-user-select: none; }
@keyframes sheetIn { from { transform: translateY(100%); } to { transform: none; } }

.grab-zone {
  display: flex;
  justify-content: center;
  margin: 0 -18px 8px;
  padding: 8px 0 12px;
  touch-action: none;
  cursor: grab;
}
.grab {
  width: 36px;
  height: 5px;
  border-radius: 3px;
  background: rgba(243, 239, 230, .28);
}
.sheet h2 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.01em;
  text-align: center;
  margin-bottom: 10px;
}
.sheet > p {
  font-size: 14.5px;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
  margin-bottom: 16px;
}
.menu-code {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 2px 2px 14px;
}
.menu-code .qr.sm {
  width: 86px;
  height: 86px;
  padding: 7px;
  border-radius: 14px;
  flex: none;
}
.menu-code small {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.menu-code b {
  display: block;
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: .18em;
  line-height: 1.15;
  margin: 2px 0;
}
.menu-code .link { padding: 4px 0; font-size: 14px; }

.sheet .menu {
  background: var(--fill2);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 6px;
}
.sheet .menu button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  font-size: 16.5px;
  font-weight: 500;
  text-align: left;
  position: relative;
}
.sheet .menu button + button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 0;
  height: .5px;
  background: var(--sep);
}
.sheet .menu button:active:not(:disabled) { background: rgba(255, 255, 255, .06); }
.sheet .menu button:disabled { opacity: .45; }
.sheet .menu .r { font-size: 14.5px; font-weight: 400; color: var(--muted); }
.sheet-group { margin-top: 14px; }
.sheet-group:first-of-type { margin-top: 4px; }
.sheet-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 4px 6px;
}
.sheet-note {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--faint);
  text-align: center;
  line-height: 1.4;
}
.quiet {
  display: block;
  margin: 18px auto 2px;
  padding: 10px 16px;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--red);
}

/* Swap Host & Clear Innocent Sheets */
.swap-list {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
.swap-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  border-radius: 15px;
  background: var(--fill2);
  border: 1.5px solid transparent;
  transition: border-color .15s, background .15s, opacity .15s;
}
.swap-item.on {
  border-color: var(--accent);
  background: rgba(232, 93, 74, .12);
}
.swap-item.is-innocent.on {
  border-color: var(--green);
  background: rgba(75, 212, 174, .11);
}
.swap-item.is-cleared {
  opacity: .56;
  border-color: rgba(75, 212, 174, .2);
}
.swap-item .check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--faint);
  display: grid;
  place-items: center;
  font-size: 12px;
}
.swap-item.on .check {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.swap-item.is-innocent.on .check {
  background: var(--green);
  border-color: var(--green);
  color: #0b1814;
}
.cleared-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
}

/* ── Toasts, Network Pill, Spinner ──────────────────── */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--sb) + 22px);
  transform: translate(-50%, 140%);
  z-index: 60;
  max-width: calc(100vw - 36px);
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(28, 28, 38, .94);
  color: var(--ink);
  border: .5px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: 0 18px 36px -14px rgba(0, 0, 0, .85);
  transition: transform .32s cubic-bezier(.22, 1.2, .36, 1), opacity .25s;
  opacity: 0;
  pointer-events: none;
  text-align: center;
}
#toast.on { transform: translate(-50%, 0); opacity: 1; }

#net {
  position: fixed;
  left: 50%;
  top: calc(var(--st) + 12px);
  transform: translate(-50%, -180%);
  z-index: 55;
  padding: 8px 15px;
  border-radius: 999px;
  background: rgba(232, 93, 74, .18);
  border: 1px solid rgba(232, 93, 74, .45);
  color: #ffa296;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(12px);
  transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}
#net.on { transform: translate(-50%, 0); }

.sound-nudge {
  position: fixed;
  left: 50%;
  top: calc(var(--st) + 12px);
  transform: translateX(-50%);
  z-index: 40;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(28, 28, 38, .9);
  border: 1px solid var(--sep);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.spin {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .22);
  border-top-color: currentColor;
  animation: slowSpin .7s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
