:root {
  color-scheme: dark;
  --ink: #f7f1e8;
  --muted: #b8afc3;
  --surface: #211a2c;
  --surface-2: #2a2037;
  --line: rgba(255, 255, 255, 0.11);
  --accent: #e64756;
  --accent-2: #ffb547;
  --success: #56c596;
  --danger: #ff6674;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #120f18; color: var(--ink); }
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(230, 71, 86, 0.14), transparent 34rem),
    radial-gradient(circle at 85% 85%, rgba(93, 63, 145, 0.18), transparent 38rem),
    #120f18;
}
body.has-stage-atmosphere {
  background: #0b0910;
}
.stage-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #0b0910;
}
.stage-atmosphere-layer {
  position: absolute;
  inset: -2%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity .85s ease, transform 8s ease-out;
  will-change: opacity;
}
.stage-atmosphere-layer.is-active {
  opacity: 1;
  transform: scale(1);
}
.stage-atmosphere-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 6, 12, .42), rgba(8, 6, 12, .58) 42%, rgba(8, 6, 12, .78)),
    radial-gradient(circle at 50% 18%, transparent 18%, rgba(8, 6, 12, .38) 72%);
}
#app, .app-root, body > main, body > #root {
  position: relative;
  z-index: 1;
}
/* Keep screen content above the stage plate. */
body.has-stage-atmosphere #app {
  position: relative;
  z-index: 1;
}
.intro-video-overlay {
  position: fixed;
  inset: 0;
  z-index: 220;
  pointer-events: none;
  visibility: hidden;
  background: #000;
}
.intro-video-overlay.is-active {
  visibility: visible;
  pointer-events: auto;
}
.intro-video-curtain {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #000;
  opacity: 0;
  transition: opacity .72s ease;
  pointer-events: none;
}
.intro-video-curtain.is-black {
  opacity: 1;
}
.intro-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
body.has-intro-lobby-bg .stage-atmosphere-veil {
  background:
    linear-gradient(180deg, rgba(8, 6, 12, .14), rgba(8, 6, 12, .28) 42%, rgba(8, 6, 12, .42)),
    radial-gradient(circle at 50% 18%, transparent 18%, rgba(8, 6, 12, .18) 72%);
}
.screen-intro-splash {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: #0b0910;
}
.screen-intro-splash-inner {
  display: grid;
  gap: 1.4rem;
  justify-items: center;
  max-width: 34rem;
  text-align: center;
}
.screen-intro-start {
  min-width: min(18rem, 100%);
}
button, input, select, textarea { font: inherit; }
button, .button {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  padding: 0.78rem 1rem;
  background: var(--accent);
  color: white;
  font-weight: 750;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}
button:hover { transform: translateY(-1px); }
button:disabled { opacity: 0.42; cursor: not-allowed; transform: none; }
button.secondary, .button.secondary { background: var(--surface-2); border: 1px solid var(--line); }
button.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
button.danger { background: transparent; border: 1px solid rgba(255, 102, 116, 0.48); color: var(--danger); }
a { color: var(--accent-2); }
input, select, textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.055);
  color: var(--ink);
  padding: 0.78rem 0.9rem;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(255, 181, 71, 0.12); }
textarea { min-height: 110px; resize: vertical; }
label { display: grid; gap: 0.45rem; color: var(--muted); font-size: 0.9rem; }

.shell { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; padding: 1rem 0 4rem; }
.topbar { display: flex; justify-content: space-between; align-items: center; min-height: 66px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--ink); text-decoration: none; }
.brand-mark {
  display: block;
  width: 3.85rem;
  height: auto;
  aspect-ratio: 1064 / 780;
  flex: 0 0 auto;
}
.brand-wordmark {
  display: block;
  height: 3.29rem;
  width: auto;
  aspect-ratio: 1244 / 556;
  flex: 0 1 auto;
  max-width: min(52vw, 15.4rem);
}
.home-shell { padding-bottom: 3rem; }
.home-topbar {
  justify-content: flex-end;
  gap: .65rem;
}
.topbar,
.screen-header,
.home-topbar {
  padding-right: 0;
}
.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .65rem;
}
.fullscreen-toggle {
  position: relative;
  z-index: 5;
  width: auto;
  height: auto;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: none;
  font-weight: 750;
  white-space: nowrap;
}
.fullscreen-toggle[hidden] {
  display: none !important;
}
.fullscreen-toggle svg {
  width: 1.2rem;
  height: 1.2rem;
  display: block;
  flex: 0 0 auto;
}
.fullscreen-toggle-label {
  font-size: .86rem;
  letter-spacing: .02em;
}
.fullscreen-toggle.is-fullscreen {
  border-color: rgba(255, 181, 71, 0.55);
  color: var(--accent-2);
}
.loading-bar {
  position: fixed;
  top: clamp(.75rem, 2vw, 1.25rem);
  right: clamp(.75rem, 2vw, 1.25rem);
  z-index: 90;
}
.game-over-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: .5rem;
}
.home {
  display: grid;
  gap: 1.75rem;
  padding: 1.5rem 0 2rem;
}
.home-hero {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 1.15rem;
  padding: clamp(1.5rem, 6vh, 3.5rem) 0 0.5rem;
}
.home-brand {
  gap: 1rem;
  justify-content: center;
}
.home-brand .brand-mark {
  width: 5.4rem;
}
.home-brand .brand-wordmark {
  height: 4.6rem;
  max-width: min(78vw, 21.5rem);
}
.home-tagline {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  max-width: 28ch;
}
.home-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
  width: min(100%, 28rem);
}
.home-actions .button,
.home-actions button {
  flex: 1 1 12rem;
}
.home-hero .home-join {
  width: min(100%, 28rem);
  text-align: left;
  margin-top: .35rem;
}
.home-tabs,
.home-tab-panel {
  width: min(100%, 28rem);
  margin-inline: auto;
}
.home-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .45rem;
  padding: .35rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.03);
}
.home-tab {
  min-height: 44px;
  border-radius: 14px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .78rem;
}
.home-tab.is-active {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink);
}
.home-tab-panel { min-width: 0; }
.home-role-row {
  align-items: flex-start;
  gap: 1rem;
  text-align: left;
}
.home-role-row .dot { margin-top: .45rem; }
.home-rules ol {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: .65rem;
  color: var(--muted);
  line-height: 1.45;
}
.home-rules li { padding-left: .15rem; }
.eyebrow { color: var(--accent-2); text-transform: uppercase; letter-spacing: .16em; font-size: .74rem; font-weight: 800; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.2rem, 7vw, 5.6rem); line-height: .98; letter-spacing: -0.055em; max-width: 13ch; }
h2 { font-size: clamp(1.45rem, 4vw, 2.35rem); letter-spacing: -0.03em; }
.lead { color: var(--muted); font-size: clamp(1rem, 2.2vw, 1.25rem); line-height: 1.6; max-width: 62ch; }
.hero { min-height: calc(100vh - 100px); display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 4rem; padding: 3rem 0; }
.hero-actions, .actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-card, .card {
  background: linear-gradient(145deg, rgba(42,32,55,.94), rgba(27,22,36,.94));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(1rem, 3vw, 1.6rem);
  box-shadow: var(--shadow);
}
.hero-card { transform: rotate(1.4deg); }
.role-stack { display: grid; gap: .7rem; }
.role-row { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: .8rem 0; }
.role-row:last-child { border: 0; }
.dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--accent); }

.page { max-width: 780px; margin: 0 auto; padding: 1rem 0 4rem; }
.page.wide { max-width: 1080px; }
.stack { display: grid; gap: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .8rem; }
.form { display: grid; gap: 1rem; }
.meta { display: flex; flex-wrap: wrap; gap: .55rem; color: var(--muted); font-size: .9rem; }
.pill { padding: .35rem .65rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.045); }
.callout { border-left: 4px solid var(--accent-2); padding: .8rem 1rem; background: rgba(255,181,71,.08); border-radius: 0 12px 12px 0; color: #f5dfba; }
.error-box { border-left-color: var(--danger); background: rgba(255,102,116,.08); color: #ffd2d6; }
.status { display: inline-flex; gap: .45rem; align-items: center; color: var(--muted); }
.status::before { content: ""; width: .58rem; height: .58rem; background: var(--success); border-radius: 50%; box-shadow: 0 0 0 4px rgba(86,197,150,.12); }

.player-list { display: grid; gap: .6rem; }
.player {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-height: 58px;
  padding: .65rem .8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}
.player.dead { opacity: .52; filter: grayscale(.65); }
.player.dead.is-posthumous { opacity: .78; filter: grayscale(.25); }
.player.dead.is-gone .player-name { text-decoration: line-through; text-decoration-thickness: .12em; }
.color-choice.is-taken { opacity: .35; cursor: not-allowed; }
.player-color { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); }
.player-main { flex: 1; min-width: 0; }
.player-name { font-weight: 750; overflow: hidden; text-overflow: ellipsis; }
.player-live-pick {
  display: block;
  margin-top: .2rem;
  font-size: clamp(.78rem, 1.4vw, .92rem);
  font-weight: 800;
  color: var(--accent-2);
  letter-spacing: -.01em;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player.is-live-pick {
  border-color: rgba(255, 181, 71, .55);
  box-shadow: 0 0 0 1px rgba(255, 181, 71, .22);
}
.player-sub { color: var(--muted); font-size: .82rem; margin-top: .15rem; }
.room-list { display: grid; gap: .5rem; }
.room-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.room-row:last-child { border-bottom: 0; }
.room-pin { flex: 0 0 auto; min-width: 5ch; font-weight: 850; letter-spacing: .12em; color: var(--accent-2); }
.room-status {
  margin-right: auto;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .28rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.room-status.is-active { color: #9be7c4; border-color: rgba(155, 231, 196, .35); }
.room-status.is-paused { color: #f0c674; border-color: rgba(240, 198, 116, .4); }
.room-status.is-finished { color: #f0a0a8; border-color: rgba(230, 71, 86, .45); }
.timeline { display: grid; gap: 1rem; }
.timeline-item { display: grid; grid-template-columns: 5.5rem 1fr; gap: .85rem; padding-bottom: .85rem; border-bottom: 1px solid var(--line); }
.timeline-item:last-child { border-bottom: 0; padding-bottom: 0; }
.timeline-time { color: var(--muted); font-size: .85rem; padding-top: .15rem; }
.timeline-ballots { margin: .55rem 0; padding-left: 1.1rem; display: grid; gap: .25rem; }
.timeline-outcome { color: var(--muted); margin: .35rem 0 0; }
.timeline-item.is-winner { border-color: rgba(155, 231, 196, .35); }
.finale-winner h3 { margin: .2rem 0 0; font-size: clamp(1.6rem, 4vw, 2.4rem); }
.game-over-splash {
  min-height: 100vh;
  width: min(720px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) 0 3rem;
  display: grid;
  align-content: center;
  gap: 2rem;
}
body.has-host-dock .game-over-splash {
  padding-bottom: clamp(12rem, 26vh, 16rem);
}
.game-over-hero {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 1.1rem;
}
.game-over-logo {
  width: min(42vw, 11rem);
  height: auto;
  aspect-ratio: 1064 / 780;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,.35));
}
.game-over-title {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(1.8rem, 7vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -.04em;
  font-weight: 950;
  text-wrap: balance;
}
.game-over-note { margin: 0; text-align: center; }
.game-over-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: .4rem; }
.game-over-player .game-over-hero,
.game-over-host .game-over-hero {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 1rem;
}
.game-over-player .game-over-title,
.game-over-host .game-over-title {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(1.6rem, 7vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -.04em;
  font-weight: 950;
  text-wrap: balance;
}
.game-over-player .game-over-logo,
.game-over-host .game-over-logo {
  width: min(38vw, 9rem);
  height: auto;
  aspect-ratio: 1064 / 780;
}
.allies-card { width: min(100%, 28rem); text-align: left; }
.allies-list { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; }
.game-review { margin-top: .25rem; }
.game-review .screen-chronicle {
  margin: 0;
  box-shadow: none;
}
.game-review .chronicle-track {
  grid-auto-columns: minmax(220px, 280px);
}
.review-stats h3 { margin: .2rem 0 0; font-size: clamp(1.25rem, 3vw, 1.8rem); }
.review-roster { display: grid; gap: .55rem; margin-top: .55rem; }
.review-player {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .7rem;
  align-items: center;
  padding: .55rem .65rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.03);
}
.review-player .player-sub { margin: .2rem 0 0; }
.game-over-rooms .running-games,
.game-over-host .running-games {
  background: linear-gradient(145deg, rgba(42,32,55,.94), rgba(27,22,36,.94));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(1rem, 3vw, 1.4rem);
  box-shadow: var(--shadow);
}
.home-join {
  margin-top: 1.4rem;
  display: grid;
  gap: .85rem;
  max-width: 28rem;
  transform: none;
}
.home-join h3 { margin: 0; }
.home-join-form { gap: .75rem; }
.home-join .secondary { width: 100%; }
.qr-scanner {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(8, 6, 12, 0.82);
  backdrop-filter: blur(8px);
}
.qr-scanner-panel {
  width: min(420px, 100%);
  display: grid;
  gap: .85rem;
  padding: 1.1rem;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(42,32,55,.98), rgba(27,22,36,.98));
  box-shadow: var(--shadow);
}
.qr-scanner-panel h2 { margin: 0; font-size: 1.35rem; max-width: none; }
.qr-scanner-panel video {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  background: #000;
  border: 1px solid var(--line);
}
.running-games { display: grid; gap: .35rem; text-align: left; }
.danger-zone { border-color: rgba(230,71,86,.55); }
.player.is-thinking { border-color: var(--accent); background: rgba(255,255,255,.06); }
.thinking { display: inline-flex; gap: .22em; margin-left: .45em; vertical-align: baseline; }
.thinking i { width: .3em; height: .3em; border-radius: 50%; background: var(--accent); animation: thinking-dot 1.2s ease-in-out infinite; }
.thinking i:nth-child(2) { animation-delay: .2s; }
.thinking i:nth-child(3) { animation-delay: .4s; }
@keyframes thinking-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .thinking i { animation: none; opacity: .8; } }
.ruby { background: #e64756; } .amber { background: #f5a623; } .lime { background: #94c83d; }
.emerald { background: #35b77a; } .cyan { background: #36a9c9; } .blue { background: #4f79df; }
.violet { background: #8d63da; } .fuchsia { background: #cc5fc8; } .rose { background: #e86c96; }
.slate { background: #778397; } .orange { background: #e87939; } .teal { background: #35a99f; }
.color-options { display: grid; grid-template-columns: repeat(6, 1fr); gap: .65rem; }
.color-choice {
  position: relative;
  min-height: 52px;
  padding: 0;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: rgba(255,255,255,.06);
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  line-height: 1;
}
.color-choice-emoji { pointer-events: none; }
.color-choice.selected {
  border-color: var(--accent-2);
  background: rgba(255,181,71,.14);
  box-shadow: 0 0 0 3px rgba(255,181,71,.18);
}
.player-avatar {
  width: 2.1rem;
  height: 2.1rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  line-height: 1;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.target .player-avatar { width: 1.7rem; height: 1.7rem; font-size: 1.15rem; display: inline-grid; margin-right: .2rem; }

.phase-card { text-align: center; padding: clamp(1.4rem, 5vw, 3rem); }
.phase-name { color: var(--accent-2); text-transform: uppercase; letter-spacing: .13em; font-weight: 900; font-size: .78rem; }
.timer { font-size: clamp(3rem, 14vw, 7rem); line-height: 1; font-variant-numeric: tabular-nums; font-weight: 900; letter-spacing: -.06em; margin: .8rem 0; }
.role-card { position: relative; overflow: hidden; text-align: center; border-color: rgba(230,71,86,.42); }
.role-card::after { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; background: rgba(230,71,86,.12); right: -55px; top: -75px; }
.role-title { font-size: clamp(2rem, 10vw, 4.5rem); font-weight: 950; letter-spacing: -.05em; margin: .4rem 0; }
.role-secret { position: relative; z-index: 1; }
.role-peek-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.role-secret.is-blurred .role-title,
.role-secret.is-blurred .role-allies {
  filter: blur(16px);
  user-select: none;
  pointer-events: none;
}
.role-secret.is-peeking .role-title,
.role-secret.is-peeking .role-allies {
  filter: none;
  user-select: text;
}
.role-peek {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  padding: .55rem .85rem;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--line);
  color: var(--ink);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.role-peek svg { width: 1.35rem; height: 1.35rem; display: block; }
.role-peek span { font-size: .85rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.role-peek:active,
.role-secret.is-peeking .role-peek {
  background: rgba(255,181,71,.18);
  border-color: rgba(255,181,71,.55);
  color: var(--accent-2);
}
.role-peek-hint { color: var(--muted); font-size: .92rem; margin: .35rem 0 1rem; }
.role-goal {
  position: relative;
  z-index: 1;
  font-size: clamp(1.15rem, 3.8vw, 1.55rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.02em;
  margin: 0 0 .75rem;
}
.player-tip {
  display: grid;
  gap: .75rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(255,181,71,.35);
  background: linear-gradient(145deg, rgba(255,181,71,.14), rgba(42,32,55,.88));
}
.player-tip.is-collapsed {
  background: transparent;
  border-style: dashed;
  border-color: var(--line);
  padding: .65rem .85rem;
}
.player-tip-text {
  margin: 0;
  font-size: clamp(1.35rem, 5.8vw, 2.05rem);
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: -.03em;
}
.tip-toggle { justify-self: start; min-height: 40px; }
.player-view { gap: 1rem; }
.target-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: .7rem; }
.target {
  min-height: 66px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  text-align: left;
  display: grid;
  gap: .35rem;
  align-content: center;
}
.target-main { display: flex; align-items: center; flex-wrap: wrap; gap: .15rem .25rem; }
.target-ally { margin-left: .15rem; }
.mafia-picks { display: flex; flex-wrap: wrap; gap: .25rem; }
.mafia-pick {
  display: inline-flex;
  align-items: center;
  gap: .15rem;
  padding: .12rem .4rem;
  border-radius: 999px;
  border: 1px solid rgba(230, 71, 86, .45);
  background: rgba(230, 71, 86, .16);
  color: #ffb4bc;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .02em;
}
.target.is-mafia-picked { border-color: rgba(230, 71, 86, .55); }
.target.selected { outline: 3px solid var(--accent-2); background: rgba(255,181,71,.12); }
.private-result { border: 1px solid rgba(255,181,71,.4); background: rgba(255,181,71,.08); padding: 1rem; border-radius: 14px; }
.separator { height: 1px; background: var(--line); margin: .5rem 0; }

.screen {
  min-height: 100vh;
  width: 100%;
  padding: clamp(1.5rem, 4vw, 4rem);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 1.25rem;
  background: transparent;
}
.screen-chronicle {
  position: relative;
  z-index: 30;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(.85rem, 1.8vw, 1.15rem);
  background: linear-gradient(145deg, rgba(28, 22, 38, .4), rgba(12, 9, 18, .4));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  min-width: 0;
}
body.has-stage-atmosphere .screen .phase-card,
body.has-stage-atmosphere .screen .screen-chronicle,
body.has-stage-atmosphere .screen .screen-roster-top,
body.has-stage-atmosphere .game-over-splash .game-over-hero {
  background: linear-gradient(145deg, rgba(28, 22, 38, .4), rgba(12, 9, 18, .4));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.screen-chronicle.is-empty {
  color: var(--muted);
  display: grid;
  gap: .35rem;
}
.screen-chronicle-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .7rem;
}
.screen-chronicle-head h2 {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  max-width: none;
  letter-spacing: -.02em;
}
.chronicle-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 320px);
  gap: .75rem;
  overflow-x: auto;
  padding-bottom: .25rem;
  scroll-snap-type: x proximity;
}
.chronicle-card {
  scroll-snap-align: start;
  display: grid;
  gap: .65rem;
  padding: .85rem;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.035);
  min-height: 100%;
}
.chronicle-card.is-finale {
  border-color: rgba(255, 181, 71, .4);
  background: rgba(255, 181, 71, .08);
}
.chronicle-card.is-live {
  border-color: rgba(255, 181, 71, .55);
  background: rgba(255, 181, 71, .1);
  box-shadow: 0 0 0 1px rgba(255, 181, 71, .18);
}
.chronicle-round-title {
  margin: 0;
  font-weight: 900;
  letter-spacing: -.02em;
  font-size: 1.05rem;
}
.chronicle-block {
  display: grid;
  gap: .45rem;
  padding: .65rem .7rem;
  border-radius: 14px;
  background: rgba(0,0,0,.18);
}
.chronicle-day { border-left: 3px solid var(--accent-2); }
.chronicle-suspicion { border-left: 3px solid #8fd493; }
.chronicle-nomination { border-left: 3px solid #ffb547; }
.chronicle-night { border-left: 3px solid #6d7cff; }
.chronicle-label {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .68rem;
  font-weight: 800;
}
.chronicle-flow {
  display: grid;
  gap: .28rem;
  max-height: none;
  overflow: visible;
  padding: .15rem .1rem .15rem 0;
  min-height: 1.5rem;
}
.chronicle-edge {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: .35rem;
  align-items: center;
  font-size: .92rem;
  line-height: 1.2;
  padding: .22rem .35rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
}
.chronicle-edge.is-abstain { opacity: .72; }
.chronicle-from {
  font-weight: 750;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chronicle-arrow { color: var(--accent-2); font-weight: 900; font-size: .78rem; }
.chronicle-to {
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chronicle-result {
  margin: 0;
  font-weight: 800;
  font-size: .95rem;
  line-height: 1.25;
}
.chronicle-result.is-kill { color: var(--danger); }
.chronicle-result.is-safe { color: var(--success); }
.chronicle-result.is-tie { color: var(--accent-2); }
.chronicle-result.is-neutral { color: var(--muted); font-weight: 650; }
.chronicle-empty {
  margin: 0;
  color: var(--muted);
  font-size: .85rem;
}
.chronicle-tally {
  display: grid;
  gap: .35rem;
  margin-top: .15rem;
}
.chronicle-tally-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(3rem, 42%) auto;
  gap: .4rem;
  align-items: center;
  font-size: .84rem;
}
.chronicle-tally-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}
.chronicle-tally-bar {
  display: block;
  height: .55rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 181, 71, .85), rgba(230, 71, 86, .9));
  min-width: .55rem;
}
.chronicle-tally-count {
  font-weight: 850;
  color: var(--accent-2);
  text-align: right;
}
.chronicle-night.is-pending { opacity: .7; }
.vote-reveal-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2.5rem);
  background: rgba(8, 6, 12, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: vote-reveal-in .35s ease;
}
.vote-reveal-panel {
  width: min(920px, 100%);
  display: grid;
  gap: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: 28px;
  border: 1px solid rgba(255, 181, 71, .45);
  background: linear-gradient(160deg, rgba(42, 32, 55, .45), rgba(18, 14, 24, .45));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .45);
}
.vote-reveal-title {
  margin: 0;
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -.03em;
  max-width: none;
}
.vote-reveal-flow {
  display: grid;
  gap: .45rem;
  max-height: min(42vh, 360px);
  overflow: auto;
}
.vote-reveal-flow .chronicle-edge {
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  padding: .45rem .65rem;
}
.vote-reveal-tally .chronicle-tally-row {
  font-size: clamp(.95rem, 2vw, 1.2rem);
}
.vote-reveal-tally .chronicle-tally-bar {
  height: .85rem;
}
.vote-reveal-subtitle {
  margin: 0;
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  color: var(--muted);
  line-height: 1.35;
  max-width: 42ch;
}
.vote-reveal-overlay.is-dark .vote-reveal-panel {
  border-color: rgba(109, 124, 255, .5);
}
.vote-reveal-overlay.is-dark .vote-reveal-title {
  color: #ffb4bc;
}
@keyframes vote-reveal-in {
  from { opacity: 0; transform: scale(.98); }
  to { opacity: 1; transform: scale(1); }
}
.screen-header { display: flex; justify-content: space-between; align-items: center; gap: 2rem; }
.screen-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .75rem; }
.screen-actions .button[disabled],
.screen-actions .secondary[disabled] { opacity: .45; cursor: not-allowed; }
.music-controls {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
  padding: .2rem .35rem .2rem .2rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .03);
}
.music-controls .ghost {
  min-height: 40px;
  padding: .45rem .75rem;
}
.music-volume {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.music-volume.is-disabled { opacity: .45; }
.music-volume-label { white-space: nowrap; }
.music-volume input[type="range"] {
  width: clamp(72px, 10vw, 120px);
  accent-color: var(--accent-2);
  cursor: pointer;
}
.music-volume-value {
  min-width: 2.6rem;
  text-align: right;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.game-over-top .music-controls {
  margin-right: .25rem;
}
.bot-picker {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(8, 6, 12, 0.78);
  backdrop-filter: blur(8px);
}
.bot-picker-panel {
  width: min(520px, 100%);
  display: grid;
  gap: .9rem;
  padding: 1.25rem;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(42,32,55,.98), rgba(27,22,36,.98));
  box-shadow: var(--shadow);
}
.bot-picker-panel h2 { margin: 0; max-width: none; font-size: clamp(1.4rem, 3vw, 2rem); }
.bot-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(4.2rem, 1fr));
  gap: .55rem;
}
.bot-picker-grid button {
  min-height: 3.2rem;
  font-size: 1.25rem;
  font-weight: 800;
}
.player.is-speaking {
  border-color: rgba(255, 181, 71, .7);
  box-shadow: 0 0 0 1px rgba(255, 181, 71, .35);
}
.player.is-defense-questions {
  border-color: rgba(109, 124, 255, .7);
  box-shadow: 0 0 0 1px rgba(109, 124, 255, .35);
}
.player.is-defense-done {
  border-color: rgba(230, 71, 86, .55);
}
.screen-main { display: grid; grid-template-columns: minmax(240px, .68fr) minmax(0, 1.32fr); gap: clamp(1.25rem, 3vw, 3rem); align-items: start; }
.screen-roster-top {
  position: relative;
  z-index: 20;
  display: grid;
  gap: .85rem;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(.85rem, 1.8vw, 1.15rem);
  background: linear-gradient(145deg, rgba(28, 22, 38, .4), rgba(12, 9, 18, .4));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
.screen .phase-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(28, 22, 38, .4), rgba(12, 9, 18, .4));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
.screen .player {
  background: rgba(18, 14, 24, .4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.screen .chronicle-card {
  background: rgba(18, 14, 24, .4);
}
.screen .chronicle-card.is-finale {
  background: rgba(255, 181, 71, .14);
}
.screen .chronicle-card.is-live {
  background: rgba(255, 181, 71, .16);
}
.screen .chronicle-block {
  background: rgba(0, 0, 0, .35);
}
.screen .chronicle-edge {
  background: rgba(255, 255, 255, .05);
}
.screen .screen-actions .ghost,
.screen .screen-actions .secondary,
.screen .screen-actions .fullscreen-toggle,
.screen .music-controls {
  background: rgba(18, 14, 24, .4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.screen .screen-actions .button:not(.secondary):not(.ghost) {
  background: rgba(230, 71, 86, .72);
}
.screen-roster-top .player-list {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.screen-main .screen-chronicle {
  max-height: min(56vh, 560px);
  display: flex;
  flex-direction: column;
}
.screen-main .chronicle-track {
  flex: 1;
  min-height: 0;
}
.screen-pin { font-size: clamp(3rem, 8vw, 7rem); font-weight: 950; letter-spacing: .12em; line-height: 1; }
.qr { width: min(38vh, 330px); aspect-ratio: 1; background: #fffaf0; padding: 10px; border-radius: 20px; }
.screen-roster {
  display: grid;
  gap: .85rem;
  min-width: 0;
  align-content: start;
}
.screen .player-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.screen-footer { display: flex; justify-content: space-between; align-items: end; gap: 1rem; color: var(--muted); }
.screen-announcement { font-size: clamp(1.05rem, 2vw, 1.55rem); max-width: 44ch; color: var(--ink); }
#host-subtitle-layer {
  position: fixed;
  z-index: 100;
  left: clamp(1rem, 3vw, 2.5rem);
  bottom: clamp(1rem, 2.4vh, 1.75rem);
  width: min(620px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  height: auto;
  max-height: none;
  pointer-events: none;
  overflow: visible;
}
#host-subtitle-layer.is-placed {
  bottom: auto;
  right: auto;
}
#host-subtitle-layer.is-dragging {
  z-index: 110;
}
#host-subtitle-layer[hidden] { display: none !important; }
/* Keep a modest reserve only when the dock sits in its default corner. */
body.has-host-dock:not(:has(#host-subtitle-layer.is-placed)) .screen {
  padding-bottom: clamp(11rem, 22vh, 14.5rem);
}
.screen-header,
.screen-chronicle,
.screen-roster,
.screen-footer {
  position: relative;
  z-index: 20;
}
.screen-chronicle {
  z-index: 30;
}
.host-bubble {
  position: relative;
  z-index: 1;
  left: auto;
  bottom: auto;
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: clamp(96px, 12vw, 148px) minmax(0, 1fr);
  align-items: end;
  gap: clamp(.3rem, 1vw, .7rem);
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  user-select: none;
  transform: none;
  animation: host-bubble-breathe 6.5s ease-in-out infinite;
  overflow: visible;
}
.host-bubble.is-dragging {
  cursor: grabbing;
  animation: none;
}
.host-dialogue {
  position: relative;
  align-self: end;
  min-width: 0;
  max-width: none;
}
.host-character {
  position: relative;
  align-self: end;
  width: 100%;
  height: clamp(148px, 20vh, 220px);
  margin: 0;
  overflow: visible;
}
.host-character-visual {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: end center;
  overflow: visible;
}
.host-character-image {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  opacity: 0;
  transition: opacity .55s ease;
  pointer-events: none;
}
.host-character-image.is-active {
  opacity: 1;
}
.host-voice-bars {
  position: absolute;
  z-index: 2;
  right: .1rem;
  top: 24%;
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 31px;
  height: 27px;
  padding: 5px 6px;
  border: 1px solid rgba(255, 181, 71, .5);
  border-radius: 999px;
  background: rgba(23, 18, 31, .9);
  opacity: 0;
  transform: translateY(5px) scale(.86);
  transition: opacity .18s ease, transform .18s ease;
}
.host-voice-bars i {
  display: block;
  width: 3px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent-2);
}
.host-bubble.is-speaking .host-voice-bars {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.host-bubble.is-speaking .host-voice-bars i {
  animation: host-voice-bar .66s ease-in-out infinite alternate;
}
.host-bubble.is-speaking .host-voice-bars i:nth-child(2) { animation-delay: -.38s; }
.host-bubble.is-speaking .host-voice-bars i:nth-child(3) { animation-delay: -.18s; }
.host-character--quiet {
  opacity: .72;
  filter: grayscale(.34);
}
.host-bubble:has(.host-character--quiet) {
  animation-play-state: paused;
}
.host-bubble:has(.host-character--quiet) .host-dialogue {
  animation-play-state: paused;
}
.host-bubble-plate {
  position: relative;
  background: #fffdf8;
  color: #1a1520;
  border: 3px solid #17131f;
  border-radius: 22px 22px 22px 8px;
  padding: .8rem 1rem .95rem;
  opacity: 1;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow:
    4px 4px 0 #17131f,
    0 14px 28px rgba(0, 0, 0, .28);
}
.host-bubble-label {
  margin: 0 0 .3rem;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #8a3140;
}
.host-bubble-text {
  margin: 0;
  font-family: "Segoe Print", "Comic Sans MS", "Chalkboard SE", "Comic Neue", cursive, system-ui;
  font-size: clamp(.95rem, 1.55vw, 1.28rem);
  line-height: 1.35;
  font-weight: 700;
  color: #17131f;
  white-space: pre-wrap;
  overflow: visible;
  display: block;
}
.host-bubble-tail {
  display: block;
  width: 0;
  height: 0;
  margin: -2px 0 0 1.1rem;
  border-left: 16px solid transparent;
  border-right: 10px solid transparent;
  border-top: 22px solid #17131f;
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, .15));
  position: relative;
}
.host-bubble-tail::after {
  content: "";
  position: absolute;
  left: -13px;
  top: -22px;
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 8px solid transparent;
  border-top: 18px solid #fffdf8;
}
@keyframes host-bubble-breathe {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -4px, 0); }
}
@keyframes host-voice-bar {
  from { height: 5px; opacity: .66; }
  to { height: 15px; opacity: 1; }
}
.host-bubble.is-speaking .host-bubble-plate {
  border-color: #8a3140;
  box-shadow:
    4px 4px 0 #8a3140,
    0 18px 40px rgba(0, 0, 0, .28);
}
.host-bubble-muted {
  margin: .55rem 0 0;
  font-size: .78rem;
  color: #6b6573;
  font-weight: 650;
}
.screen .timer { font-size: clamp(3rem, 8vw, 7rem); margin: 0; }
.screen-rejoin {
  position: fixed;
  z-index: 300;
  right: clamp(.9rem, 2vw, 2rem);
  bottom: clamp(.9rem, 2vw, 2rem);
  width: clamp(132px, 11vw, 176px);
  display: grid;
  gap: .55rem;
  padding: .65rem;
  border: 1px solid rgba(255, 181, 71, .38);
  border-radius: 18px;
  background: rgba(23, 18, 31, .4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  text-align: center;
  transform-origin: bottom right;
  transition:
    transform .42s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow .42s ease,
    border-color .22s ease;
  pointer-events: auto;
}
.screen-rejoin.is-lobby {
  cursor: pointer;
}
.screen-rejoin.is-lobby:hover {
  border-color: rgba(255, 181, 71, .62);
}
.screen-rejoin.is-expanded {
  transform: scale(3);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .58);
  border-color: rgba(255, 181, 71, .72);
}
.screen-rejoin-qr { width: 100%; aspect-ratio: 1; display: block; padding: 6px; border-radius: 12px; background: #fffaf0; }
.screen-rejoin-copy { display: grid; gap: .2rem; font-size: clamp(.72rem, .9vw, .9rem); line-height: 1.15; }
.screen-rejoin-copy strong { color: var(--ink); }
.screen-rejoin-copy span { color: var(--accent-2); font-weight: 850; letter-spacing: .08em; }
.screen-footer { padding-right: clamp(148px, 13vw, 198px); }

.toast { position: fixed; z-index: 30; left: 50%; bottom: 1.25rem; transform: translate(-50%, 140%); background: #fff; color: #17131f; padding: .8rem 1rem; border-radius: 12px; box-shadow: var(--shadow); transition: transform .22s ease; max-width: min(520px, calc(100% - 2rem)); }
.toast.visible { transform: translate(-50%, 0); }
.loading { min-height: 60vh; display: grid; place-items: center; color: var(--muted); }
.spinner { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-card { transform: none; }
  .screen-main { grid-template-columns: 1fr; }
  .screen { padding: 1.1rem; }
  .screen .player-list { grid-template-columns: 1fr; }
  .screen-header { align-items: flex-start; }
  .screen-footer { align-items: flex-start; flex-direction: column; }
  .screen-footer { min-height: 118px; padding-right: 118px; }
  .screen-rejoin { width: 106px; right: .65rem; bottom: .65rem; padding: .45rem; border-radius: 14px; }
  .screen-rejoin-copy strong { display: none; }
  .screen-rejoin-copy { font-size: .68rem; }
  body.has-host-dock:not(:has(#host-subtitle-layer.is-placed)) .screen {
    padding-bottom: clamp(12rem, 30vh, 16rem);
  }
  #host-subtitle-layer {
    left: .65rem;
    bottom: clamp(7.2rem, 18vh, 9rem);
    width: calc(100% - 1.3rem);
    max-width: none;
  }
  .host-bubble {
    grid-template-columns: clamp(88px, 24vw, 120px) minmax(0, 1fr);
    gap: .2rem;
  }
  .host-character { height: clamp(140px, 24vh, 190px); }
  .host-dialogue { max-width: none; }
  .host-voice-bars { right: -.15rem; top: 22%; transform: scale(.76); }
  .host-bubble.is-speaking .host-voice-bars { transform: scale(.82); }
  .host-bubble-plate { padding: .7rem .8rem .82rem; border-width: 2px; }
  .host-bubble-text { font-size: .95rem; }
  .color-options { grid-template-columns: repeat(6, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .stage-atmosphere-layer {
    transform: none !important;
    transition: opacity .2s ease !important;
  }
  .host-bubble,
  .host-voice-bars i {
    animation: none !important;
  }
  .host-bubble {
    transform: none;
  }
  .host-character-image {
    transition: none !important;
  }
}

/* ============================================================
   ВЛАСТЬ 2.0 — тёмный navy + золото (дизайн-система POWER)
   ============================================================ */
.vl-body {
  --vl-ink: #07080c;
  --vl-panel: #10131d;
  --vl-panel-2: #171b28;
  --vl-line: rgba(255, 255, 255, 0.09);
  --vl-text: #eef1f7;
  --vl-dim: #a8b0c2;
  --vl-gold: #f2c14e;
  --vl-gold-deep: #d99b1f;
  --vl-crimson: #e8474b;
  --vl-mint: #3fd5a4;
  --vl-violet: #8b7cf6;
  background: radial-gradient(circle at 20% 0%, rgba(242, 193, 78, 0.07), transparent 40rem), #07080c;
  color: var(--vl-text);
}
.vl-brand { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--vl-text); }
.vl-brand-name { font-size: 1.5rem; font-weight: 800; letter-spacing: 0.14em; }
.vl-brand-name em, .vl-home-brand em { font-style: normal; color: var(--vl-gold); }
.vl-brand-sub { font-size: 0.7rem; color: var(--vl-dim); letter-spacing: 0.08em; text-transform: uppercase; }
.vl-home-brand h1 { font-size: clamp(2.6rem, 8vw, 4.4rem); letter-spacing: 0.16em; margin: 0; }
.vl-home-brand p { color: var(--vl-gold); letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.9rem; margin: 4px 0 0; }

.vl-screen { display: flex; flex-direction: column; height: 100vh; overflow: hidden; gap: 12px; padding: 14px 22px 10px; box-sizing: border-box; }
.vl-topline { display: flex; align-items: center; gap: 10px; }
.vl-year { background: linear-gradient(135deg, #ffe08a, #d99b1f); color: #221a04; font-weight: 800; }
.vl-grid { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 16px; flex: 1; min-height: 0; }
.vl-panel { background: var(--vl-panel); border: 1px solid var(--vl-line); border-radius: 16px; padding: 14px 16px; }
.vl-left { display: flex; flex-direction: column; gap: 14px; min-width: 0; overflow-y: auto; scrollbar-width: thin; }

.vl-metric { margin-bottom: 10px; }
.vl-metric-head { display: flex; justify-content: space-between; font-size: 0.95rem; color: var(--vl-dim); }
.vl-metric-head strong { color: var(--vl-text); font-size: 1.1rem; }
.vl-metric-track { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; margin-top: 4px; }
.vl-metric-fill { height: 100%; border-radius: 999px; transition: width 0.8s cubic-bezier(0.22, 0.61, 0.36, 1); }
.vl-tone-gold .vl-metric-fill { background: linear-gradient(90deg, #ffe08a, #d99b1f); }
.vl-tone-mint .vl-metric-fill { background: linear-gradient(90deg, #7ce8c5, #23a87c); }
.vl-tone-violet .vl-metric-fill { background: linear-gradient(90deg, #b3a7ff, #6f5ce8); }
.vl-tone-crimson .vl-metric-fill { background: linear-gradient(90deg, #ff8a8d, #c22f33); }
.vl-sys-toggle { font-size: 0.85rem; padding: 4px 0; }
.vl-sys-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin-top: 8px; }
.vl-sys { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--vl-dim); border-bottom: 1px dashed var(--vl-line); padding: 3px 0; }
.vl-sys strong { color: var(--vl-text); }

.vl-inst-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.vl-inst { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--vl-dim); padding: 6px 9px; border-radius: 10px; border: 1px solid var(--vl-line); background: rgba(255, 255, 255, 0.02); }
.vl-inst-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); flex: none; }
.vl-inst.is-active { color: var(--vl-text); border-color: rgba(242, 193, 78, 0.55); background: rgba(242, 193, 78, 0.1); box-shadow: 0 0 18px rgba(242, 193, 78, 0.12); }
.vl-inst.is-active .vl-inst-dot { background: var(--vl-gold); box-shadow: 0 0 8px rgba(242, 193, 78, 0.8); }

.vl-center { min-width: 0; display: flex; }
.vl-boardwrap { position: relative; flex: 1; border-radius: 20px; overflow: hidden; border: 1px solid var(--vl-line); background: #0a0c12; display: flex; align-items: center; justify-content: center; }
.vl-board-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; filter: saturate(0.9); }
.vl-event { position: relative; z-index: 1; max-width: 620px; margin: 20px; padding: 22px 26px; border-radius: 18px; background: rgba(10, 12, 18, 0.88); border: 1px solid rgba(242, 193, 78, 0.35); box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45); backdrop-filter: blur(4px); }
.vl-event-title { margin: 4px 0 10px; font-size: clamp(1.3rem, 2.4vw, 2rem); }
.vl-event-text { font-size: clamp(1rem, 1.6vw, 1.25rem); line-height: 1.5; color: var(--vl-text); white-space: normal; }
.vl-lobby-card { text-align: center; }
.vl-lobby-qr { width: min(46vh, 320px); max-width: 80%; border-radius: 14px; background: #fffaf0; padding: 10px; margin: 12px auto 6px; display: block; }
.vl-progress { display: flex; justify-content: space-between; gap: 10px; font-size: 0.92rem; color: var(--vl-dim); border-top: 1px dashed var(--vl-line); padding-top: 8px; margin-top: 10px; }
.vl-progress strong { color: var(--vl-gold); }

.vl-players { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 6px; }
.vl-player { flex: 1 1 0; min-width: 120px; background: var(--vl-panel); border: 1px solid var(--vl-line); border-radius: 14px; padding: 9px 12px; }
.vl-player.is-away { opacity: 0.55; }
.vl-player-name { font-weight: 700; font-size: 0.95rem; display: flex; gap: 6px; align-items: baseline; }
.vl-bot { font-size: 0.65rem; color: var(--vl-dim); border: 1px solid var(--vl-line); padding: 0 5px; border-radius: 6px; }
.vl-player-role { color: var(--vl-gold); font-size: 0.78rem; margin: 1px 0 4px; }
.vl-player-stats { display: flex; gap: 8px; font-size: 0.85rem; color: var(--vl-dim); flex-wrap: wrap; }

.vl-finale { align-items: center; text-align: center; }
.vl-finale-hero { max-width: 900px; margin: 4vh auto 0; }
.vl-finale-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: 0.04em; margin: 8px 0 14px; color: var(--vl-gold); }
.vl-final-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 18px; }
.vl-boards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; width: min(960px, 94vw); margin: 22px auto 0; }
.vl-board-card { background: var(--vl-panel); border: 1px solid var(--vl-line); border-radius: 16px; padding: 14px 18px; text-align: left; }
.vl-table { width: 100%; border-collapse: collapse; }
.vl-table td { padding: 6px 8px; border-bottom: 1px solid var(--vl-line); font-size: 0.95rem; }
.vl-table td:last-child { text-align: right; color: var(--vl-gold); }
.vl-final-note { color: var(--vl-dim); margin: 16px 0 6px; }

/* Телефон игрока */
.vl-play { padding: 14px 16px 28px; max-width: 560px; margin: 0 auto; }
.vl-play-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.vl-play-id { text-align: right; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.vl-role-pill { background: rgba(242, 193, 78, 0.14); color: var(--vl-gold); border: 1px solid rgba(242, 193, 78, 0.4); }
.vl-res-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.vl-res { flex: 1 1 0; min-width: 72px; background: var(--vl-panel); border: 1px solid var(--vl-line); border-radius: 12px; padding: 7px 6px; text-align: center; font-size: 0.95rem; }
.vl-res strong { font-size: 1.15rem; margin-left: 2px; }
.vl-res i { display: block; font-style: normal; font-size: 0.68rem; color: var(--vl-dim); margin-top: 1px; }
.vl-res-trace { border-color: rgba(232, 71, 75, 0.5); }
.vl-mission { background: rgba(139, 124, 246, 0.08); border: 1px solid rgba(139, 124, 246, 0.35); border-radius: 12px; padding: 9px 12px; margin-bottom: 12px; }
.vl-mission summary { cursor: pointer; font-weight: 600; color: #cfc6ff; }
.vl-mission p { margin: 8px 0 0; }
.vl-decision h3 { margin-top: 0; }
.vl-decision-text { color: var(--vl-dim); line-height: 1.45; }
.vl-private { border: 1px solid rgba(232, 71, 75, 0.45); }
.vl-private-tag { color: var(--vl-crimson); font-size: 0.7rem; letter-spacing: 0.22em; font-weight: 800; margin: 0 0 6px; }
.vl-choices { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.vl-choice { text-align: left; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--vl-line); background: var(--vl-panel-2); color: var(--vl-text); font-size: 1rem; line-height: 1.35; min-height: 52px; cursor: pointer; transition: border-color 0.15s ease, transform 0.12s ease; }
.vl-choice:not(.is-disabled):hover { border-color: var(--vl-gold); transform: translateY(-1px); }
.vl-choice.is-disabled { opacity: 0.45; cursor: not-allowed; }
.vl-choice.is-armed { border-color: var(--vl-gold); background: rgba(242, 193, 78, 0.16); box-shadow: 0 0 0 2px rgba(242, 193, 78, 0.35); }
.vl-choice.is-armed { animation: vl-armed-pulse 1.2s ease-in-out infinite; }
@keyframes vl-armed-pulse { 50% { box-shadow: 0 0 0 4px rgba(242, 193, 78, 0.2); } }
@media (prefers-reduced-motion: reduce) { .vl-choice.is-armed { animation: none; } }
.vl-choice-note { display: block; color: var(--vl-crimson); font-size: 0.78rem; margin-top: 4px; }
.vl-choice-hint { display: block; color: var(--vl-dim); font-size: 0.82rem; margin-top: 4px; }
.vl-secret-tag { color: var(--vl-violet); }
.vl-wait { text-align: center; padding: 40px 12px; }
.vl-wait-icon { font-size: 2.6rem; margin-bottom: 8px; }
.vl-report-scores { display: flex; gap: 14px; margin: 10px 0; }
.vl-report-scores > div { flex: 1; background: var(--vl-panel-2); border-radius: 12px; padding: 12px; text-align: center; }
.vl-report-scores strong { font-size: 1.8rem; color: var(--vl-gold); display: block; }
.vl-report-scores span { color: var(--vl-dim); font-size: 0.8rem; }
.vl-report-list { margin: 8px 0 0; padding-left: 18px; color: var(--vl-dim); }
.vl-report-list li { margin-bottom: 4px; }
.vl-report-mission { font-weight: 600; }

/* Панель ведущего */
.vl-host-players { display: flex; flex-direction: column; gap: 6px; }
.vl-host-player { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--vl-line); padding: 6px 2px; }
.vl-host-waiting { margin-top: 10px; }

@media (max-width: 980px) {
  .vl-screen { height: auto; overflow: visible; }
  .vl-grid { grid-template-columns: 1fr; }
  .vl-left { order: 2; }
  .vl-boards { grid-template-columns: 1fr; }
  .vl-final-metrics { grid-template-columns: repeat(2, 1fr); }
  .vl-inst-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .vl-screen { padding: 12px 10px; }
  .vl-inst-grid { grid-template-columns: 1fr 1fr; }
  .vl-event { margin: 10px; padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .vl-metric-fill, .vl-choice { transition: none; }
}

.vl-demo-restart { margin: 18px 0 26px; }

/* --- Демо-витрина: телефоны слева, большой экран справа --- */
.vl-demo-stage { display: flex; flex-direction: column; height: 100vh; overflow: hidden; padding: 10px 14px; box-sizing: border-box; gap: 10px; }
.vl-demo-banner { display: flex; align-items: center; gap: 12px; color: var(--vl-dim); font-size: 0.88rem; flex-wrap: wrap; }
.vl-demo-banner a.ghost { padding: 4px 10px; }
.vl-demo-pill { background: linear-gradient(135deg, #ffe08a, #d99b1f); color: #221a04; font-weight: 800; border-radius: 8px; padding: 2px 10px; letter-spacing: 0.12em; }
.vl-demo-cols { display: grid; grid-template-columns: minmax(340px, 30%) 1fr; gap: 14px; flex: 1; min-height: 0; }
.vl-demo-phones { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; min-height: 0; }
.vl-demo-screenwrap { min-width: 0; min-height: 0; border: 1px solid var(--vl-line); border-radius: 18px; overflow: hidden; }
.vl-demo-screenwrap .vl-screen { height: 100%; padding: 10px 14px 8px; }
.vl-demo-screenwrap .screen-header .screen-actions .ghost { display: none; }
.vl-demo-screenwrap .vl-sys-toggle { display: none; }

.vl-phone { position: relative; background: #05060a; border: 2px solid #262b3d; border-radius: 22px; padding: 12px 8px 8px; display: flex; min-height: 0; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5); }
.vl-phone-notch { position: absolute; top: 5px; left: 50%; transform: translateX(-50%); width: 34%; height: 5px; border-radius: 4px; background: #262b3d; }
.vl-phone-screen { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; border-radius: 12px; background: #0b0d15; padding: 8px 9px; font-size: 11.5px; line-height: 1.35; display: flex; flex-direction: column; gap: 6px; }
.vl-ph-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.vl-ph-head strong { font-size: 12.5px; }
.vl-ph-role { color: var(--vl-gold); font-size: 10px; text-align: right; }
.vl-ph-res { color: var(--vl-dim); font-size: 10.5px; }
.vl-ph-card { background: #131624; border: 1px solid var(--vl-line); border-radius: 10px; padding: 7px 8px; display: flex; flex-direction: column; gap: 5px; }
.vl-ph-card h4 { margin: 0; font-size: 12.5px; }
.vl-ph-card h4 small { color: var(--vl-dim); font-weight: 400; }
.vl-ph-private { border-color: rgba(232, 71, 75, 0.45); }
.vl-ph-secret { color: var(--vl-crimson); font-size: 8.5px; letter-spacing: 0.18em; font-weight: 800; margin: 0; }
.vl-ph-eyebrow { color: var(--vl-dim); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; margin: 0; }
.vl-ph-btn { background: var(--accent, #e64756); border-radius: 8px; text-align: center; padding: 6px; font-weight: 600; font-size: 11px; }
.vl-ph-options { display: flex; flex-direction: column; gap: 4px; }
.vl-ph-option { position: relative; border: 1px solid var(--vl-line); border-radius: 8px; padding: 5px 26px 5px 7px; color: var(--vl-text); background: #171b28; }
.vl-ph-option.is-off { opacity: 0.4; }
.vl-ph-option.is-chosen { border-color: var(--vl-gold); background: rgba(242, 193, 78, 0.14); }
.vl-ph-tap { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 13px; }
.vl-ph-tap i { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border: 2px solid var(--vl-gold); border-radius: 50%; animation: vl-tap-ring 1.1s ease-out infinite; }
@keyframes vl-tap-ring { 0% { transform: scale(0.4); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
.vl-ph-status { color: var(--vl-dim); font-size: 10.5px; }
.vl-ph-status.is-done { color: var(--vl-mint); font-weight: 600; }
.vl-ph-dots { animation: vl-dots 1.4s steps(3, end) infinite; }
@keyframes vl-dots { 0% { opacity: 0.2; } 50% { opacity: 1; } 100% { opacity: 0.2; } }
.vl-ph-wait { text-align: center; color: var(--vl-dim); margin: auto 0; display: flex; flex-direction: column; gap: 4px; }
.vl-ph-eyes { font-size: 20px; }
.vl-ph-wait em { font-style: normal; font-size: 10px; }
.vl-ph-mission { margin: 0; font-size: 10.5px; }

@media (max-width: 1100px) {
  .vl-demo-stage { height: auto; overflow: visible; }
  .vl-demo-cols { grid-template-columns: 1fr; }
  .vl-demo-phones { order: 2; grid-template-columns: repeat(4, minmax(150px, 1fr)); grid-template-rows: 260px; overflow-x: auto; }
  .vl-demo-screenwrap .vl-screen { height: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .vl-ph-tap i, .vl-ph-dots { animation: none; }
}

.vl-ph-sticky { opacity: 0.78; }

/* --- Игровое поле демо: трек, фишки, кобра, 3D-кубик --- */
.vl-board-img { object-fit: contain; opacity: 0.85; } /* поле по умолчанию вписывается в экран */
.vl-demo-screenwrap .vl-event { max-width: 46%; padding: 14px 18px; }
.vl-demo-screenwrap .vl-event-text { font-size: 0.95rem; }
.vl-demo-screenwrap .vl-event-title { font-size: 1.25rem; }

.vl-track { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.vl-stop { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  border: 2px solid rgba(242, 193, 78, 0.75); background: rgba(10, 12, 18, 0.72);
  box-shadow: 0 0 8px rgba(242, 193, 78, 0.35); }
.vl-stop-cobra { width: 30px; height: 30px; margin: -15px 0 0 -15px;
  border-color: #3fd5a4; background: rgba(10, 24, 18, 0.9); box-shadow: 0 0 14px rgba(63, 213, 164, 0.6);
  display: flex; align-items: center; justify-content: center; }
.vl-cobra { font-size: 16px; line-height: 1; }
.vl-stop-cobra em { position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  font-style: normal; font-size: 8px; letter-spacing: 0.2em; color: #3fd5a4; margin-top: 3px; }

.vl-token { position: absolute; z-index: 5; transform: translate(-50%, -100%);
  display: flex; flex-direction: column; align-items: center;
  transition: left 0.22s ease, top 0.22s ease; }
.vl-token-icon { font-size: 20px; line-height: 1; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7)); }
.vl-token-name { font-size: 8.5px; font-weight: 700; color: #fff; background: rgba(7, 8, 12, 0.8);
  border: 1px solid rgba(242, 193, 78, 0.5); border-radius: 6px; padding: 0 4px; margin-top: 1px;
  white-space: nowrap; }
.vl-token.is-hopping .vl-token-icon { animation: vl-hop 0.2s ease; }
@keyframes vl-hop { 50% { transform: translateY(-9px) scale(1.15); } }

/* 3D-кубик (классический CSS-куб) */
.vl-dice-arena { position: absolute; left: 50%; top: 50%; margin: -28px 0 0 -28px; z-index: 6;
  width: 56px; height: 56px; perspective: 420px; opacity: 0; visibility: hidden; }
.vl-dice-arena.is-rolling { opacity: 1; visibility: visible; }
.vl-die { position: absolute; inset: 0; transform-style: preserve-3d; }
.vl-die-face { position: absolute; inset: 0; background: linear-gradient(145deg, #fffdf5, #e8e0c8);
  border: 1px solid #b9a86a; border-radius: 10px; display: grid; place-items: center;
  grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 7px;
  backface-visibility: hidden; }
.vl-pip { width: 9px; height: 9px; border-radius: 50%; background: #17131f; align-self: center; justify-self: center; }
.vl-die-face-1 .vl-pip:nth-child(1) { grid-area: 2 / 2; }
.vl-die-face-2 .vl-pip:nth-child(1) { grid-area: 1 / 1; }
.vl-die-face-2 .vl-pip:nth-child(2) { grid-area: 3 / 3; }
.vl-die-face-3 .vl-pip:nth-child(1) { grid-area: 1 / 1; }
.vl-die-face-3 .vl-pip:nth-child(2) { grid-area: 2 / 2; }
.vl-die-face-3 .vl-pip:nth-child(3) { grid-area: 3 / 3; }
.vl-die-face-4 .vl-pip:nth-child(1) { grid-area: 1 / 1; }
.vl-die-face-4 .vl-pip:nth-child(2) { grid-area: 1 / 3; }
.vl-die-face-4 .vl-pip:nth-child(3) { grid-area: 3 / 1; }
.vl-die-face-4 .vl-pip:nth-child(4) { grid-area: 3 / 3; }
.vl-die-face-5 .vl-pip:nth-child(1) { grid-area: 1 / 1; }
.vl-die-face-5 .vl-pip:nth-child(2) { grid-area: 1 / 3; }
.vl-die-face-5 .vl-pip:nth-child(3) { grid-area: 2 / 2; }
.vl-die-face-5 .vl-pip:nth-child(4) { grid-area: 3 / 1; }
.vl-die-face-5 .vl-pip:nth-child(5) { grid-area: 3 / 3; }
.vl-die-face-6 .vl-pip:nth-child(1) { grid-area: 1 / 1; }
.vl-die-face-6 .vl-pip:nth-child(2) { grid-area: 1 / 3; }
.vl-die-face-6 .vl-pip:nth-child(3) { grid-area: 2 / 1; }
.vl-die-face-6 .vl-pip:nth-child(4) { grid-area: 2 / 3; }
.vl-die-face-6 .vl-pip:nth-child(5) { grid-area: 3 / 1; }
.vl-die-face-6 .vl-pip:nth-child(6) { grid-area: 3 / 3; }
.vl-die-face-1 { transform: translateZ(28px); }
.vl-die-face-2 { transform: rotateY(180deg) translateZ(28px); }
.vl-die-face-3 { transform: rotateY(90deg) translateZ(28px); }
.vl-die-face-4 { transform: rotateY(-90deg) translateZ(28px); }
.vl-die-face-5 { transform: rotateX(90deg) translateZ(28px); }
.vl-die-face-6 { transform: rotateX(-90deg) translateZ(28px); }
.vl-dice-result { position: absolute; left: 50%; top: -30px; transform: translateX(-50%) scale(0);
  background: linear-gradient(135deg, #ffe08a, #d99b1f); color: #221a04; font-weight: 800;
  font-size: 18px; width: 30px; height: 30px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
.vl-dice-result.is-shown { transform: translateX(-50%) scale(1); }
@media (prefers-reduced-motion: reduce) {
  .vl-token.is-hopping .vl-token-icon { animation: none; }
}

/* --- Поле v2: фишки на напечатанных кружках, змея, реплей кубика --- */
.vl-track { position: absolute; z-index: 4; pointer-events: none; }
.vl-snake { position: absolute; transform: translate(-50%, -58%); display: flex; flex-direction: column; align-items: center; z-index: 5; }
.vl-snake span { font-size: 22px; line-height: 1; filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.8)); }
.vl-snake em { font-style: normal; font-size: 8px; font-weight: 800; letter-spacing: 0.18em; color: #3fd5a4;
  background: rgba(7, 8, 12, 0.75); border-radius: 5px; padding: 0 4px; margin-top: 1px; }
.vl-dice-arena { position: absolute; width: 0; height: 0; z-index: 7; opacity: 0; visibility: hidden; }
.vl-dice-arena.is-rolling { opacity: 1; visibility: visible; }
.vl-dice-arena .vl-die { position: absolute; left: -24px; top: -24px; width: 48px; height: 48px; transform-style: preserve-3d; }
.vl-dice-arena .vl-die-face { border-radius: 8px; padding: 5px; }
.vl-dice-arena .vl-die-face-1 { transform: translateZ(24px); }
.vl-dice-arena .vl-die-face-2 { transform: rotateY(180deg) translateZ(24px); }
.vl-dice-arena .vl-die-face-3 { transform: rotateY(90deg) translateZ(24px); }
.vl-dice-arena .vl-die-face-4 { transform: rotateY(-90deg) translateZ(24px); }
.vl-dice-arena .vl-die-face-5 { transform: rotateX(90deg) translateZ(24px); }
.vl-dice-arena .vl-die-face-6 { transform: rotateX(-90deg) translateZ(24px); }
.vl-dice-arena .vl-pip { width: 7px; height: 7px; }
.vl-dice-arena { perspective: 380px; }
.vl-dice-arena .vl-dice-result { position: absolute; left: -15px; top: -58px; }

/* Кубик на телефоне игрока */
.vl-roll-card h3 { margin: 4px 0 6px; }
.vl-roll-zone { position: relative; height: 46vh; min-height: 260px; border-radius: 16px;
  border: 1px dashed rgba(242, 193, 78, 0.5); background:
  radial-gradient(circle at 50% 40%, rgba(242, 193, 78, 0.06), transparent 60%), #0a0c12;
  overflow: hidden; touch-action: none; margin-top: 10px; }
.vl-phone-die { position: absolute; left: 18%; top: 72%; width: 0; height: 0; perspective: 460px; cursor: grab; }
.vl-phone-die.is-grabbed { cursor: grabbing; }
.vl-phone-die .vl-die { position: absolute; left: -28px; top: -28px; width: 56px; height: 56px; transform-style: preserve-3d; }
.vl-phone-die::after { content: ""; position: absolute; left: -40px; top: -40px; width: 80px; height: 80px; }
.vl-roll-result { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; margin: 0;
  color: var(--vl-gold); font-weight: 700; opacity: 0; transition: opacity 0.3s ease; }
.vl-roll-result.is-shown { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .vl-dice-arena .vl-die, .vl-phone-die .vl-die { transition: none !important; }
}
