:root {
  --bg: #0e1726;
  --bg-2: #13213a;
  --bg-3: #08101c;
  --card: rgba(10, 20, 38, 0.82);
  --line: rgba(138, 162, 199, 0.18);
  --text: #eef4ff;
  --muted: #9db0cd;
  --accent: #f4b942;
  --danger: #f15b50;
  --ok: #4fd17c;
  --cyan: #7ee7ff;
  --shadow: 0 28px 60px rgba(2, 8, 20, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  transition: background 500ms ease, color 300ms ease;
  background:
    radial-gradient(circle at top left, rgba(244, 185, 66, 0.16), transparent 24rem),
    radial-gradient(circle at bottom right, rgba(79, 209, 124, 0.14), transparent 22rem),
    linear-gradient(160deg, var(--bg), #09111d 55%, #05080f);
  color: var(--text);
  overflow-x: hidden;
}

.steam-sell-fluid-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.62;
  mix-blend-mode: screen;
  filter: saturate(0.92) brightness(0.88);
}

.steam-sell-fluid-background canvas {
  display: block;
  width: 100%;
  height: 100%;
}

body.theme-lobby {
  background:
    radial-gradient(circle at top left, rgba(244, 185, 66, 0.2), transparent 24rem),
    radial-gradient(circle at bottom right, rgba(79, 209, 124, 0.12), transparent 22rem),
    linear-gradient(160deg, #0e1726, #09111d 55%, #05080f);
}

body.theme-day {
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 214, 102, 0.24), transparent 20rem),
    radial-gradient(circle at 84% 26%, rgba(126, 231, 255, 0.14), transparent 22rem),
    linear-gradient(160deg, #172338, #0d1626 55%, #05080f);
}

body.theme-night {
  background:
    radial-gradient(circle at 18% 18%, rgba(99, 133, 255, 0.22), transparent 19rem),
    radial-gradient(circle at 82% 72%, rgba(241, 91, 80, 0.14), transparent 18rem),
    linear-gradient(160deg, #08101d, #070c17 55%, #03050a);
}

body.theme-results {
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 183, 78, 0.22), transparent 18rem),
    radial-gradient(circle at 82% 70%, rgba(255, 122, 94, 0.16), transparent 18rem),
    linear-gradient(160deg, #171116, #0b0d15 55%, #04060c);
}

body.theme-ended-humans {
  background:
    radial-gradient(circle at 20% 20%, rgba(109, 255, 171, 0.22), transparent 20rem),
    radial-gradient(circle at 82% 26%, rgba(126, 231, 255, 0.16), transparent 20rem),
    linear-gradient(160deg, #0d1b1a, #071111 55%, #04070b);
}

body.theme-ended-gnosia {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 120, 108, 0.24), transparent 18rem),
    radial-gradient(circle at 82% 72%, rgba(171, 66, 255, 0.12), transparent 18rem),
    linear-gradient(160deg, #1a1016, #0f0910 55%, #050509);
}

body.theme-ended-neutral {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 214, 102, 0.14), transparent 18rem),
    radial-gradient(circle at 82% 72%, rgba(126, 231, 255, 0.12), transparent 18rem),
    linear-gradient(160deg, #111824, #0b1018 55%, #05080f);
}

.scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.nebula,
.stars,
.gridlines {
  position: absolute;
  inset: 0;
}

.nebula {
  filter: blur(36px);
  opacity: 0.75;
  transition: opacity 400ms ease, transform 500ms ease, filter 500ms ease;
}

.nebula-a {
  background:
    radial-gradient(circle at 18% 22%, rgba(126, 231, 255, 0.16), transparent 20rem),
    radial-gradient(circle at 72% 34%, rgba(244, 185, 66, 0.14), transparent 22rem);
  animation: floatNebulaA 16s ease-in-out infinite;
}

.nebula-b {
  background:
    radial-gradient(circle at 80% 72%, rgba(79, 209, 124, 0.14), transparent 18rem),
    radial-gradient(circle at 30% 80%, rgba(241, 91, 80, 0.14), transparent 20rem);
  animation: floatNebulaB 18s ease-in-out infinite;
}

.stars {
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.75) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 40%, rgba(255,255,255,0.65) 0 1px, transparent 2px),
    radial-gradient(circle at 55% 72%, rgba(255,255,255,0.5) 0 1px, transparent 2px),
    radial-gradient(circle at 85% 20%, rgba(255,255,255,0.4) 0 1px, transparent 2px),
    radial-gradient(circle at 35% 58%, rgba(255,255,255,0.55) 0 1px, transparent 2px);
  animation: twinkle 7s linear infinite;
  opacity: 0.7;
  transition: opacity 400ms ease, transform 500ms ease;
}

.gridlines {
  background-image:
    linear-gradient(rgba(126, 231, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 231, 255, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, transparent, rgba(0,0,0,0.75), transparent);
  opacity: 0.25;
  transform: perspective(640px) rotateX(78deg) translateY(22%);
  transform-origin: center top;
  transition: opacity 400ms ease, transform 500ms ease;
}

body.theme-night .nebula-a {
  opacity: 0.95;
  filter: blur(44px);
}

body.theme-night .nebula-b {
  opacity: 0.88;
  transform: scale(1.08);
}

body.theme-night .stars {
  opacity: 0.95;
  transform: scale(1.02);
}

body.theme-night .gridlines {
  opacity: 0.12;
}

body.theme-results .gridlines,
body.theme-ended-gnosia .gridlines {
  opacity: 0.18;
  transform: perspective(640px) rotateX(78deg) translateY(20%) scale(1.02);
}

body.theme-ended-humans .gridlines {
  opacity: 0.22;
}

body.theme-ended-humans .stars {
  opacity: 0.9;
}

body.theme-ended-gnosia .stars {
  opacity: 0.64;
}

.intro-screen,
.role-reveal {
  position: fixed;
  inset: 0;
  z-index: 24;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle, rgba(8, 16, 28, 0.4), rgba(3, 7, 14, 0.88));
  backdrop-filter: blur(12px);
}

.intro-core,
.role-reveal-card {
  width: min(92vw, 720px);
  padding: 34px 28px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(145deg, rgba(126, 231, 255, 0.09), rgba(244, 185, 66, 0.07)),
    rgba(10, 20, 38, 0.84);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
  text-align: center;
}

.role-reveal-card {
  position: relative;
  overflow: hidden;
}

.intro-core h2,
.role-reveal-card h2 {
  margin-top: 8px;
  font-size: clamp(28px, 5vw, 54px);
  line-height: 1.02;
}

.intro-text,
.role-reveal-card p:last-of-type {
  margin-top: 16px;
  color: #dce8fa;
  line-height: 1.6;
}

.intro-button {
  width: auto;
  min-width: 220px;
  margin-top: 22px;
}

.intro-ring,
.role-reveal-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid rgba(126, 231, 255, 0.38);
  box-shadow: 0 0 34px rgba(126, 231, 255, 0.22);
}

.intro-ring {
  animation: overlayPulse 1.6s ease-in-out infinite;
}

.role-reveal-icon {
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.05);
}

.role-reveal-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.role-reveal-ring,
.role-reveal-glow {
  position: absolute;
}

.role-reveal-ring {
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: slowSpin 20s linear infinite;
}

.role-reveal-ring.ring-a {
  width: 220px;
  height: 220px;
  top: -90px;
  right: -40px;
}

.role-reveal-ring.ring-b {
  width: 320px;
  height: 320px;
  bottom: -180px;
  left: -80px;
  animation-direction: reverse;
}

.role-reveal-glow {
  width: 220px;
  height: 220px;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.14), transparent 68%);
  filter: blur(12px);
}

.role-reveal-icon svg {
  width: 46px;
  height: 46px;
  fill: currentColor;
}

.role-reveal-alias {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  margin-top: 16px;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e6f1ff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

.role-reveal.role-human .role-reveal-glow {
  background: radial-gradient(circle, rgba(219, 232, 251, 0.18), transparent 68%);
}

.role-reveal.role-gnosia .role-reveal-glow {
  background: radial-gradient(circle, rgba(255, 159, 149, 0.22), transparent 68%);
}

.role-reveal.role-engineer .role-reveal-glow {
  background: radial-gradient(circle, rgba(126, 231, 255, 0.22), transparent 68%);
}

.role-reveal.role-doctor .role-reveal-glow {
  background: radial-gradient(circle, rgba(141, 244, 182, 0.22), transparent 68%);
}

.role-reveal.role-angel .role-reveal-glow {
  background: radial-gradient(circle, rgba(255, 216, 123, 0.22), transparent 68%);
}

.role-reveal.role-traitor .role-reveal-glow {
  background: radial-gradient(circle, rgba(255, 207, 156, 0.22), transparent 68%);
}

.shell {
  width: min(1120px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 24px 0 48px;
  position: relative;
  z-index: 2;
}

.lobby-launcher {
  margin-top: 18px;
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 16px 18px;
  border-color: rgba(126, 231, 255, 0.2);
  background:
    linear-gradient(120deg, rgba(126, 231, 255, 0.07), rgba(79, 209, 124, 0.05)),
    var(--card);
}

.stack .card.lobby-launcher h2 {
  margin: 0;
  font-size: 22px;
}

.launcher-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.launcher-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: auto;
  min-height: 48px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  white-space: nowrap;
  letter-spacing: 0.01em;
  transition: transform 180ms ease, box-shadow 240ms ease, border-color 240ms ease, filter 240ms ease;
}

.launcher-button::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -60%;
  bottom: -60%;
  left: -55%;
  width: 34%;
  transform: translateX(-180%) rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.54), transparent);
  transition: transform 620ms ease;
  pointer-events: none;
}

.launcher-button::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 1px;
  border-radius: 12px;
  background: radial-gradient(circle at 25% 10%, rgba(255, 255, 255, 0.25), transparent 46%);
  opacity: 0.7;
  pointer-events: none;
}

.launcher-button span,
.launcher-button svg {
  position: relative;
  z-index: 1;
}

.launcher-button:hover {
  transform: translateY(-3px) scale(1.025);
  filter: saturate(1.08) brightness(1.05);
}

.launcher-button:hover::before {
  transform: translateX(520%) rotate(18deg);
}

.launcher-button:active {
  transform: translateY(0) scale(0.98);
}

.launcher-button:focus-visible,
.sessions-refresh:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.28);
  outline-offset: 3px;
}

.launcher-button svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.24));
  transition: transform 260ms ease;
}

.launcher-button:hover svg {
  transform: rotate(16deg) scale(1.16);
}

.launcher-create {
  border-color: rgba(121, 255, 167, 0.5);
  background: linear-gradient(135deg, #36c86b, #71e596);
  color: #06150b;
  box-shadow:
    0 10px 30px rgba(79, 209, 124, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.44);
  animation: launcherGreenPulse 3.2s ease-in-out infinite;
}

.launcher-create:hover {
  animation: none;
  border-color: rgba(184, 255, 209, 0.86);
  box-shadow:
    0 16px 42px rgba(79, 209, 124, 0.44),
    0 0 0 1px rgba(121, 255, 167, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.launcher-join {
  border-color: rgba(126, 231, 255, 0.3);
  background:
    linear-gradient(135deg, rgba(126, 231, 255, 0.17), rgba(62, 144, 204, 0.12)),
    rgba(10, 24, 42, 0.88);
  color: #e9faff;
  box-shadow:
    0 10px 28px rgba(40, 164, 215, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: launcherCyanPulse 3.2s ease-in-out infinite 0.7s;
}

.launcher-join:hover {
  animation: none;
  border-color: rgba(159, 239, 255, 0.7);
  box-shadow:
    0 16px 40px rgba(40, 164, 215, 0.28),
    0 0 0 1px rgba(126, 231, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.sessions-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 15px;
  border-color: rgba(126, 231, 255, 0.24);
  background: linear-gradient(135deg, rgba(126, 231, 255, 0.1), rgba(255, 255, 255, 0.035));
  color: #e7f8ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 180ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.sessions-refresh svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.sessions-refresh:hover {
  transform: translateY(-2px);
  border-color: rgba(126, 231, 255, 0.52);
  background: linear-gradient(135deg, rgba(126, 231, 255, 0.17), rgba(255, 255, 255, 0.06));
  box-shadow: 0 10px 24px rgba(40, 164, 215, 0.16);
}

.sessions-refresh:hover svg {
  animation: refreshOrbit 700ms ease;
}

.hero,
.card {
  border: 1px solid var(--line);
  background: var(--card);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  border-radius: 24px;
  transition: transform 220ms ease, border-color 320ms ease, background 320ms ease, box-shadow 320ms ease;
}

.hero {
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -30% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(126, 231, 255, 0.18), transparent 68%);
  pointer-events: none;
  transition: background 400ms ease, transform 500ms ease;
}

body.theme-night .hero::after {
  background: radial-gradient(circle, rgba(143, 183, 255, 0.22), transparent 68%);
  transform: scale(1.08);
}

body.theme-results .hero::after,
body.theme-ended-gnosia .hero::after {
  background: radial-gradient(circle, rgba(255, 132, 100, 0.24), transparent 68%);
}

body.theme-ended-humans .hero::after {
  background: radial-gradient(circle, rgba(141, 244, 182, 0.22), transparent 68%);
}

.eyebrow,
.meta,
.timer {
  margin: 0;
  color: var(--muted);
}

.eyebrow {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 6px;
  font-size: clamp(40px, 8vw, 84px);
  line-height: 0.9;
  letter-spacing: 0.05em;
  text-shadow: 0 0 22px rgba(126, 231, 255, 0.16);
}

.lead {
  margin-top: 14px;
  max-width: 780px;
  color: #d8e3f7;
  line-height: 1.5;
}

.hero-copy,
.hero-side {
  position: relative;
  z-index: 1;
}

.hero-side {
  display: grid;
  justify-items: end;
  gap: 16px;
}

.hero-badges {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-badge,
.status-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  transition: transform 220ms ease, border-color 320ms ease, background 320ms ease, box-shadow 320ms ease;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  color: #dfeafb;
}

.hero-badge:hover,
.status-card:hover,
.session-item:hover,
.action-box:hover,
.player:hover,
.log-item:hover {
  transform: translateY(-2px);
}

.hero-badge svg,
.status-icon svg,
.sound-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

body.session-mode .shell {
  padding-top: 12px;
}

body.session-mode .hero {
  min-height: 64px;
  padding: 10px 14px 10px 18px;
  display: flex;
  align-items: center;
  border-radius: 18px;
  border-color: rgba(126, 231, 255, 0.2);
  background:
    linear-gradient(120deg, rgba(126, 231, 255, 0.06), rgba(79, 209, 124, 0.035)),
    rgba(8, 18, 34, 0.88);
  box-shadow:
    0 14px 34px rgba(2, 8, 20, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

body.session-mode .hero::after {
  width: 110px;
  height: 110px;
  inset: auto -24px -62px auto;
  opacity: 0.72;
}

body.session-mode .hero-copy {
  display: block;
  min-width: 0;
}

body.session-mode .hero-copy .eyebrow,
body.session-mode .hero-copy .lead,
body.session-mode .hero-badges {
  display: none;
}

body.session-mode .hero-copy h1 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1;
  letter-spacing: 0.14em;
  text-shadow: 0 0 18px rgba(126, 231, 255, 0.18);
}

.session-header-meta {
  display: none;
}

body.session-mode .session-header-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  min-width: 0;
}

.header-pill {
  min-width: 0;
  max-width: 180px;
  min-height: 34px;
  padding: 7px 11px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
  color: #dbe8fa;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-status {
  border-color: rgba(79, 209, 124, 0.16);
  background: rgba(79, 209, 124, 0.065);
  color: #c9f4d7;
}

body.session-mode .hero-side {
  width: auto;
  margin-left: 0;
  display: flex;
  align-items: center;
  justify-items: initial;
  gap: 10px;
}

body.session-mode .sound-toggle {
  width: auto;
  min-height: 40px;
  padding: 9px 13px;
  font-size: 14px;
}

body.session-mode .signal {
  width: 40px;
  height: 40px;
  border-width: 4px;
  box-shadow: 0 0 18px rgba(126, 231, 255, 0.14);
}

body.session-mode #leaveButton {
  display: inline-grid;
  place-items: center;
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border-radius: 13px;
}

body.session-mode #leaveButton svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

body:not(.session-mode) #leaveButton {
  display: none !important;
}

body.session-mode #gamePanel {
  margin-top: 12px;
}

.grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.game-grid {
  align-items: start;
}

.status-strip {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.sessions-card {
  display: flex;
  flex-direction: column;
}

.sessions-list {
  flex: 1;
  display: grid;
  gap: 12px;
  align-content: start;
}

.session-item {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(126, 231, 255, 0.16);
  background:
    linear-gradient(140deg, rgba(126, 231, 255, 0.08), rgba(244, 185, 66, 0.05)),
    rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.02);
}

.session-item button {
  margin-top: 12px;
}

body.theme-night .session-item {
  border-color: rgba(143, 183, 255, 0.2);
}

.session-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.session-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #dce8fa;
  font-size: 13px;
}

.session-timer {
  margin-top: 8px;
  color: #f7df9a;
  font-weight: 700;
}

.role-spotlight {
  margin-top: 0;
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 18px;
  align-items: center;
  background:
    linear-gradient(140deg, rgba(126, 231, 255, 0.11), rgba(244, 185, 66, 0.08)),
    rgba(10, 20, 38, 0.82);
}

body.theme-night .role-spotlight,
body.theme-night .status-card,
body.theme-night .system-banner {
  border-color: rgba(143, 183, 255, 0.22);
  box-shadow: 0 24px 56px rgba(2, 8, 24, 0.44);
}

body.theme-night .role-spotlight {
  background:
    linear-gradient(145deg, rgba(69, 102, 189, 0.18), rgba(15, 22, 44, 0.42)),
    rgba(8, 14, 28, 0.86);
}

body.theme-day .status-card,
body.theme-day .role-spotlight {
  border-color: rgba(255, 216, 123, 0.18);
}

body.theme-results .system-banner,
body.theme-ended-gnosia .system-banner {
  border-color: rgba(255, 159, 149, 0.28);
}

body.theme-ended-humans .system-banner {
  border-color: rgba(141, 244, 182, 0.26);
}

.role-crest {
  width: 88px;
  height: 88px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 0 24px rgba(255,255,255,0.04);
}

.role-crest svg {
  width: 44px;
  height: 44px;
  fill: currentColor;
}

.role-copy h2 {
  margin-top: 4px;
  margin-bottom: 8px;
}

.role-line {
  margin-top: 4px;
  margin-bottom: 6px;
}

.role-alias {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #d9e8fd;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.role-copy p:last-child {
  color: #dbe8fb;
  line-height: 1.55;
}

.role-tags,
.role-reveal-tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#roleRevealButton {
  margin-top: 20px;
}

#restoreButton {
  margin-top: 16px;
}

.role-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e7f0ff;
  font-size: 12px;
}

.role-spotlight.role-human {
  border-color: rgba(219, 232, 251, 0.22);
}

.role-spotlight.role-gnosia {
  border-color: rgba(255, 159, 149, 0.28);
  background:
    linear-gradient(140deg, rgba(241, 91, 80, 0.16), rgba(82, 18, 28, 0.1)),
    rgba(10, 20, 38, 0.84);
}

.role-spotlight.role-engineer {
  border-color: rgba(126, 231, 255, 0.28);
}

.role-spotlight.role-doctor {
  border-color: rgba(141, 244, 182, 0.24);
}

.role-spotlight.role-angel {
  border-color: rgba(255, 216, 123, 0.26);
  background:
    linear-gradient(140deg, rgba(255, 216, 123, 0.14), rgba(126, 231, 255, 0.06)),
    rgba(10, 20, 38, 0.84);
}

.role-spotlight.role-traitor {
  border-color: rgba(255, 207, 156, 0.26);
}

.role-spotlight.role-human .role-crest {
  box-shadow: inset 0 0 24px rgba(219, 232, 251, 0.06);
}

.role-spotlight.role-doctor .role-crest {
  box-shadow: inset 0 0 24px rgba(141, 244, 182, 0.08);
}

.role-spotlight.role-traitor .role-crest {
  box-shadow: inset 0 0 24px rgba(255, 207, 156, 0.08);
}

.role-spotlight.role-gnosia .role-crest,
.role-spotlight.role-angel .role-crest,
.role-spotlight.role-engineer .role-crest {
  animation: overlayPulse 2.4s ease-in-out infinite;
}

.phase-stage.stage-lobby {
  border-color: rgba(255, 216, 123, 0.18);
}

.phase-stage.stage-lobby .phase-stage-flare {
  background: radial-gradient(circle, rgba(255, 216, 123, 0.2), transparent 68%);
}

.phase-stage.stage-day,
.phase-stage.stage-revote {
  border-color: rgba(255, 216, 123, 0.26);
  background:
    linear-gradient(140deg, rgba(255, 216, 123, 0.12), rgba(126, 231, 255, 0.05)),
    rgba(10, 20, 38, 0.84);
}

.phase-stage.stage-day .phase-stage-flare,
.phase-stage.stage-revote .phase-stage-flare {
  background: radial-gradient(circle, rgba(255, 216, 123, 0.22), transparent 68%);
}

.phase-stage.stage-night {
  border-color: rgba(143, 183, 255, 0.26);
  background:
    linear-gradient(140deg, rgba(69, 102, 189, 0.18), rgba(15, 22, 44, 0.22)),
    rgba(8, 14, 28, 0.9);
}

.phase-stage.stage-night .phase-stage-orbit {
  border-color: rgba(143, 183, 255, 0.18);
}

.phase-stage.stage-night .phase-stage-flare {
  background: radial-gradient(circle, rgba(143, 183, 255, 0.2), transparent 68%);
}

.phase-stage.stage-results {
  border-color: rgba(255, 159, 149, 0.24);
  background:
    linear-gradient(140deg, rgba(255, 159, 149, 0.14), rgba(255, 216, 123, 0.08)),
    rgba(10, 20, 38, 0.88);
}

.phase-stage.stage-results .phase-stage-flare {
  background: radial-gradient(circle, rgba(255, 159, 149, 0.2), transparent 68%);
}

.phase-stage.stage-ended-humans {
  border-color: rgba(141, 244, 182, 0.28);
}

.phase-stage.stage-ended-humans,
.phase-stage.stage-ended-gnosia,
.phase-stage.stage-ended {
  padding: 26px;
}

.phase-stage.stage-ended-humans .phase-stage-head,
.phase-stage.stage-ended-gnosia .phase-stage-head,
.phase-stage.stage-ended .phase-stage-head {
  align-items: center;
}

.phase-stage.stage-ended-humans .phase-stage-copy h2,
.phase-stage.stage-ended-gnosia .phase-stage-copy h2,
.phase-stage.stage-ended .phase-stage-copy h2 {
  margin-top: 6px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
}

.phase-stage.stage-ended-humans .phase-stage-mood,
.phase-stage.stage-ended-gnosia .phase-stage-mood,
.phase-stage.stage-ended .phase-stage-mood {
  margin: 16px 0 10px;
}

.phase-stage.stage-ended-humans .phase-stage-text,
.phase-stage.stage-ended-gnosia .phase-stage-text,
.phase-stage.stage-ended .phase-stage-text {
  max-width: 680px;
  font-size: 17px;
}

.phase-stage.stage-ended-humans .phase-stage-icon,
.phase-stage.stage-ended-gnosia .phase-stage-icon,
.phase-stage.stage-ended .phase-stage-icon {
  width: 54px;
  min-width: 54px;
  height: 54px;
  min-height: 54px;
  border-radius: 18px;
  font-size: 26px;
  animation-duration: 3.2s;
}

.phase-stage.stage-ended-humans .phase-metrics,
.phase-stage.stage-ended-gnosia .phase-metrics,
.phase-stage.stage-ended .phase-metrics {
  margin-top: 22px;
}

.phase-stage.stage-ended-humans .status-card,
.phase-stage.stage-ended-gnosia .status-card,
.phase-stage.stage-ended .status-card {
  min-height: 82px;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(10px);
}

.phase-stage.stage-ended-humans .phase-stage-flare {
  background: radial-gradient(circle, rgba(141, 244, 182, 0.22), transparent 68%);
}

.phase-stage.stage-ended-gnosia {
  border-color: rgba(255, 159, 149, 0.3);
}

.phase-stage.stage-ended-gnosia .phase-stage-flare {
  background: radial-gradient(circle, rgba(255, 159, 149, 0.24), transparent 68%);
}

.stack {
  margin-top: 20px;
}

.card {
  padding: 20px;
}

.phase-stage {
  margin-top: 18px;
  position: relative;
  overflow: hidden;
}

.phase-stage-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.phase-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 34%);
  pointer-events: none;
}

.phase-stage-head {
  position: relative;
  z-index: 1;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 0;
}

.phase-stage-copy {
  min-width: 0;
}

.phase-stage-copy h2 {
  margin-top: 3px;
  font-size: clamp(30px, 3.8vw, 44px);
  line-height: 1.04;
}

.phase-stage-mood {
  position: relative;
  z-index: 1;
  margin: 8px 0 10px;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #eef6ff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

.phase-stage-orbit,
.phase-stage-flare,
.phase-stage-grid {
  position: absolute;
}

.phase-stage-orbit {
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: slowSpin 18s linear infinite;
}

.phase-stage-orbit.orbit-a {
  width: 220px;
  height: 220px;
  top: -70px;
  right: -30px;
}

.phase-stage-orbit.orbit-b {
  width: 320px;
  height: 320px;
  bottom: -180px;
  left: -70px;
  animation-direction: reverse;
  animation-duration: 26s;
}

.phase-stage-flare {
  width: 220px;
  height: 220px;
  top: -40px;
  right: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.14), transparent 68%);
  filter: blur(10px);
}

.phase-stage-grid {
  inset: auto 0 0 0;
  height: 120px;
  background-image:
    linear-gradient(rgba(126, 231, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 231, 255, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  opacity: 0.45;
}

.phase-stage-icon {
  width: 86px;
  min-width: 86px;
  min-height: 86px;
  height: 86px;
  padding: 0;
  border-radius: 26px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--cyan);
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.04);
}

.phase-stage-tools {
  display: flex;
  align-items: flex-start;
  flex: 0 0 auto;
}

.phase-help-trigger {
  border-color: rgba(126, 231, 255, 0.34);
  background:
    radial-gradient(circle at 38% 30%, rgba(126, 231, 255, 0.2), transparent 58%),
    rgba(126, 231, 255, 0.08);
  color: #bff4ff;
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 12px 30px rgba(40, 164, 215, 0.2), 0 0 0 0 rgba(126, 231, 255, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: phaseHelpPulse 2.2s ease-in-out infinite;
}

.phase-help-trigger:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.045) rotate(3deg);
  border-color: rgba(126, 231, 255, 0.68);
  background:
    radial-gradient(circle at 38% 30%, rgba(126, 231, 255, 0.3), transparent 58%),
    rgba(126, 231, 255, 0.14);
  box-shadow: 0 18px 38px rgba(40, 164, 215, 0.3), 0 0 30px rgba(126, 231, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

@keyframes phaseHelpPulse {
  0%, 100% {
    box-shadow: 0 12px 30px rgba(40, 164, 215, 0.18), 0 0 0 0 rgba(126, 231, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }
  50% {
    box-shadow: 0 16px 36px rgba(40, 164, 215, 0.28), 0 0 0 8px rgba(126, 231, 255, 0), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  }
}

.phase-stage-text {
  position: relative;
  z-index: 1;
  max-width: 820px;
  color: #e2ecfb;
  line-height: 1.5;
}

.timer-block {
  margin-top: 18px;
  position: relative;
  z-index: 1;
}

.timer-track {
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.timer-progress {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--accent));
  box-shadow: 0 0 24px rgba(126, 231, 255, 0.34);
  transition: width 900ms linear;
}

.timer-caption,
.timer-value {
  color: #d5e2f7;
}

.timer-value {
  font-weight: 700;
}

.phase-metrics {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.priority-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
  gap: 18px;
  align-items: start;
}

#gamePanel.phase-layout-day .priority-grid,
#gamePanel.phase-layout-night .priority-grid,
#gamePanel.phase-layout-results .priority-grid,
#gamePanel.phase-layout-lobby .priority-grid,
#gamePanel.phase-layout-ended .priority-grid {
  grid-template-columns: 1fr;
}

#gamePanel.phase-layout-day .actions-card,
#gamePanel.phase-layout-night .actions-card,
#gamePanel.phase-layout-lobby .actions-card,
#gamePanel.phase-layout-ended .actions-card {
  order: -1;
}

#gamePanel.phase-layout-day .role-spotlight,
#gamePanel.phase-layout-night .role-spotlight,
#gamePanel.phase-layout-results .role-spotlight,
#gamePanel.phase-layout-lobby .role-spotlight,
#gamePanel.phase-layout-ended .role-spotlight {
  opacity: 0.96;
}

#gamePanel.phase-layout-ended .actions-card {
  border-color: rgba(255, 216, 123, 0.28);
  background:
    linear-gradient(145deg, rgba(255, 216, 123, 0.14), rgba(141, 244, 182, 0.06)),
    rgba(10, 20, 38, 0.9);
}

.phase-cinematic {
  margin-top: 18px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 20px;
  align-items: stretch;
}

.phase-cinematic-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.phase-cinematic-main,
.phase-cinematic-side {
  position: relative;
  z-index: 1;
}

.phase-cinematic-title,
#phaseCinematicTitle {
  margin: 8px 0 12px;
  font-size: clamp(28px, 4.8vw, 52px);
  line-height: 0.98;
}

.phase-cinematic-text {
  max-width: 54ch;
  color: #e2ecfb;
  line-height: 1.65;
}

.phase-cinematic-accent {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f4f8ff;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.03);
}

.cinematic-restart-button {
  margin-top: 16px;
  min-height: 50px;
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(119, 246, 180, 0.48);
  border-radius: 16px;
  background:
    radial-gradient(circle at 22% 15%, rgba(212, 255, 232, 0.28), transparent 42%),
    linear-gradient(135deg, #39c979, #72e3a7);
  color: #071b12;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(39, 207, 126, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.cinematic-restart-button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  transition: transform 240ms ease;
}

.cinematic-restart-button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(190, 255, 220, 0.86);
  box-shadow: 0 18px 42px rgba(39, 207, 126, 0.32), 0 0 28px rgba(103, 241, 171, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.cinematic-restart-button:hover:not(:disabled) svg {
  transform: rotate(-40deg);
}

.cinematic-restart-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.phase-cinematic-meta {
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d9e6fb;
  line-height: 1.55;
}

.phase-cinematic-meta-icon,
.phase-cast-icon {
  display: grid;
  place-items: center;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.055);
  color: var(--cyan);
}

.phase-cinematic-meta-icon {
  width: 40px;
  height: 40px;
}

.phase-cinematic-meta-icon svg,
.phase-cast-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.phase-cinematic-cast {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.phase-cast-item {
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 220ms ease, border-color 260ms ease, background 260ms ease;
}

.phase-cast-icon {
  width: 46px;
  height: 46px;
  color: #dbe8fb;
}

.phase-cast-item.role-gnosia .phase-cast-icon {
  color: #ff9f95;
  background: rgba(255, 159, 149, 0.09);
}

.phase-cast-item.role-engineer .phase-cast-icon {
  color: #7ee7ff;
  background: rgba(126, 231, 255, 0.09);
}

.phase-cast-item.role-doctor .phase-cast-icon {
  color: #8df4b6;
  background: rgba(141, 244, 182, 0.09);
}

.phase-cast-item.role-angel .phase-cast-icon {
  color: #ffd87b;
  background: rgba(255, 216, 123, 0.09);
}

.phase-cast-item.role-traitor .phase-cast-icon {
  color: #ffcf9c;
  background: rgba(255, 207, 156, 0.09);
}

.phase-cast-item strong,
.phase-cast-item span {
  display: block;
}

.phase-cast-item strong {
  margin-bottom: 6px;
  font-size: 15px;
  color: #fff5df;
}

.phase-cast-item span {
  color: #d4e0f5;
  line-height: 1.45;
}

.phase-cast-item.tone-pending {
  border-color: rgba(255, 216, 123, 0.24);
  background:
    linear-gradient(145deg, rgba(255, 216, 123, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
}

.phase-cast-item.tone-confirmed,
.phase-cast-item.tone-victory {
  border-color: rgba(141, 244, 182, 0.24);
  background:
    linear-gradient(145deg, rgba(141, 244, 182, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
}

.phase-cast-item.tone-ally {
  border-color: rgba(143, 183, 255, 0.26);
  background:
    linear-gradient(145deg, rgba(143, 183, 255, 0.14), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
}

.phase-cast-item.tone-danger {
  border-color: rgba(255, 159, 149, 0.28);
  background:
    linear-gradient(145deg, rgba(255, 159, 149, 0.15), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
}

.phase-cinematic-ring,
.phase-cinematic-glow,
.phase-cinematic-grid {
  position: absolute;
}

.phase-cinematic-ring {
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: slowSpin 22s linear infinite;
}

.phase-cinematic-ring.ring-a {
  width: 260px;
  height: 260px;
  top: -120px;
  left: -80px;
}

.phase-cinematic-ring.ring-b {
  width: 360px;
  height: 360px;
  right: -120px;
  bottom: -220px;
  animation-direction: reverse;
  animation-duration: 30s;
}

.phase-cinematic-glow {
  width: 280px;
  height: 280px;
  top: 50%;
  left: 40%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 68%);
  filter: blur(20px);
}

.phase-cinematic-grid {
  inset: auto 0 0 0;
  height: 140px;
  background-image:
    linear-gradient(rgba(126, 231, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 231, 255, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.78), transparent);
  opacity: 0.38;
}

.phase-cinematic.cinematic-night {
  border-color: rgba(143, 183, 255, 0.24);
  background:
    linear-gradient(135deg, rgba(25, 39, 82, 0.56), rgba(8, 14, 30, 0.92)),
    rgba(8, 14, 28, 0.94);
  box-shadow:
    0 28px 80px rgba(3, 8, 18, 0.54),
    inset 0 0 48px rgba(82, 121, 225, 0.06);
}

.phase-cinematic.cinematic-night .phase-cinematic-glow {
  background: radial-gradient(circle, rgba(143, 183, 255, 0.2), transparent 68%);
}

.phase-cinematic.cinematic-night .phase-cinematic-accent {
  border-color: rgba(143, 183, 255, 0.22);
  background: rgba(143, 183, 255, 0.08);
}

.phase-cinematic.cinematic-ended-humans {
  border-color: rgba(141, 244, 182, 0.28);
  background:
    linear-gradient(135deg, rgba(24, 73, 52, 0.5), rgba(7, 18, 18, 0.92)),
    rgba(8, 16, 24, 0.94);
}

.phase-cinematic.cinematic-ended-humans .phase-cinematic-glow {
  background: radial-gradient(circle, rgba(141, 244, 182, 0.2), transparent 68%);
}

.phase-cinematic.cinematic-ended-humans .phase-cinematic-accent {
  border-color: rgba(141, 244, 182, 0.22);
  background: rgba(141, 244, 182, 0.08);
}

.phase-cinematic.cinematic-ended-gnosia {
  border-color: rgba(255, 159, 149, 0.28);
  background:
    linear-gradient(135deg, rgba(86, 24, 34, 0.56), rgba(17, 8, 16, 0.94)),
    rgba(8, 12, 20, 0.94);
}

.phase-cinematic.cinematic-ended-gnosia .phase-cinematic-glow {
  background: radial-gradient(circle, rgba(255, 159, 149, 0.22), transparent 68%);
}

.phase-cinematic.cinematic-ended-gnosia .phase-cinematic-accent {
  border-color: rgba(255, 159, 149, 0.24);
  background: rgba(255, 159, 149, 0.08);
}

.night-report {
  margin-top: 18px;
  position: relative;
  overflow: hidden;
}

.night-report-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.night-report-head,
.night-report-text,
.night-report-highlight,
.night-report-cards {
  position: relative;
  z-index: 1;
}

.night-report-ring,
.night-report-glow {
  position: absolute;
}

.night-report-ring {
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: slowSpin 20s linear infinite;
}

.night-report-ring.ring-a {
  width: 180px;
  height: 180px;
  top: -68px;
  right: -42px;
}

.night-report-ring.ring-b {
  width: 260px;
  height: 260px;
  bottom: -150px;
  left: -70px;
  animation-direction: reverse;
  animation-duration: 28s;
}

.night-report-glow {
  width: 220px;
  height: 220px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.12), transparent 70%);
  filter: blur(16px);
}

.night-report-head {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 16px;
  align-items: center;
}

.night-report-icon {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.night-report-icon svg {
  width: 36px;
  height: 36px;
  fill: currentColor;
}

.night-report-text {
  margin-top: 14px;
  color: #e2ecfb;
  line-height: 1.6;
}

.night-report-highlight {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f7ff;
}

.night-report-cards {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.night-report-card {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.night-report-card strong,
.night-report-card span {
  display: block;
}

.night-report-card strong {
  margin-bottom: 6px;
  color: #fff5df;
}

.night-report-card span {
  color: #d6e3f7;
  line-height: 1.45;
}

.night-report.report-danger {
  border-color: rgba(255, 159, 149, 0.28);
  background:
    linear-gradient(145deg, rgba(255, 159, 149, 0.18), rgba(74, 18, 26, 0.12)),
    rgba(255, 255, 255, 0.03);
}

.night-report.report-danger .night-report-glow,
.night-report-card.tone-danger {
  background:
    linear-gradient(145deg, rgba(255, 159, 149, 0.14), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
}

.night-report.report-danger .night-report-icon {
  color: #ff9f95;
}

.night-report.report-saved {
  border-color: rgba(141, 244, 182, 0.28);
  background:
    linear-gradient(145deg, rgba(141, 244, 182, 0.16), rgba(30, 78, 56, 0.1)),
    rgba(255, 255, 255, 0.03);
}

.night-report.report-saved .night-report-glow,
.night-report-card.tone-saved {
  background:
    linear-gradient(145deg, rgba(141, 244, 182, 0.14), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
}

.night-report.report-saved .night-report-icon {
  color: #8df4b6;
}

.night-report.report-mismatch,
.night-report.report-incomplete,
.night-report.report-idle {
  border-color: rgba(126, 231, 255, 0.22);
  background:
    linear-gradient(145deg, rgba(126, 231, 255, 0.12), rgba(255, 216, 123, 0.05)),
    rgba(255, 255, 255, 0.03);
}

.night-report.report-mismatch .night-report-icon,
.night-report.report-idle .night-report-icon {
  color: #7ee7ff;
}

.night-report.report-incomplete .night-report-icon {
  color: #ffd87b;
}

.night-report-card.tone-neutral {
  background:
    linear-gradient(145deg, rgba(126, 231, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
}

.actions-card {
  min-height: 100%;
}

.actions-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.actions-card-head h2 {
  margin: 0;
}

.actions-ready-button {
  width: 100%;
  margin-top: 14px;
}

.intelligence-card {
  margin-top: 18px;
}

.personal-report {
  margin-top: 18px;
  position: relative;
  overflow: hidden;
}

.personal-report-head,
.personal-report-text,
.personal-report-detail {
  position: relative;
  z-index: 1;
}

.personal-report-head {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 16px;
  align-items: center;
}

.personal-report-icon {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.personal-report-icon svg {
  width: 36px;
  height: 36px;
  fill: currentColor;
}

.personal-report-text {
  margin-top: 14px;
  color: #eff7ff;
  line-height: 1.6;
  font-size: clamp(18px, 2.1vw, 24px);
}

.personal-report-detail {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d8e5f8;
  line-height: 1.5;
}

.personal-report.report-alert {
  border-color: rgba(255, 159, 149, 0.28);
  background:
    linear-gradient(145deg, rgba(255, 159, 149, 0.18), rgba(80, 22, 34, 0.12)),
    rgba(255, 255, 255, 0.03);
}

.personal-report.report-alert .personal-report-icon {
  color: #ff9f95;
}

.personal-report.report-clear {
  border-color: rgba(141, 244, 182, 0.26);
  background:
    linear-gradient(145deg, rgba(141, 244, 182, 0.15), rgba(18, 78, 58, 0.1)),
    rgba(255, 255, 255, 0.03);
}

.personal-report.report-clear .personal-report-icon {
  color: #8df4b6;
}

.personal-report.report-neutral {
  border-color: rgba(126, 231, 255, 0.24);
  background:
    linear-gradient(145deg, rgba(126, 231, 255, 0.12), rgba(255, 216, 123, 0.05)),
    rgba(255, 255, 255, 0.03);
}

.personal-report.report-neutral .personal-report-icon {
  color: #7ee7ff;
}

.tab-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.tab-button {
  width: auto;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

.tab-button.active {
  background: linear-gradient(135deg, rgba(126, 231, 255, 0.2), rgba(244, 185, 66, 0.18));
  border-color: rgba(126, 231, 255, 0.28);
  color: #fff7ea;
}

.tab-panel {
  display: none;
  margin-top: 8px;
}

.tab-panel.active {
  display: block;
}

.system-banner {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 16px;
  align-items: center;
  background:
    linear-gradient(145deg, rgba(241, 91, 80, 0.18), rgba(244, 185, 66, 0.12)),
    rgba(10, 20, 38, 0.9);
  border-color: rgba(255, 182, 115, 0.28);
  box-shadow:
    0 18px 48px rgba(4, 8, 16, 0.34),
    inset 0 0 28px rgba(255, 180, 90, 0.05);
  animation: systemBannerPulse 3.4s ease-in-out infinite;
}

.system-banner.invite-banner {
  border-color: rgba(126, 231, 255, 0.25);
  background:
    linear-gradient(145deg, rgba(126, 231, 255, 0.12), rgba(79, 209, 124, 0.075)),
    rgba(8, 24, 36, 0.9);
  box-shadow:
    0 18px 48px rgba(4, 15, 24, 0.34),
    inset 0 0 28px rgba(126, 231, 255, 0.045);
}

.system-banner.invite-banner strong {
  color: #e6faff;
}

.system-banner.restart-banner {
  border-color: rgba(100, 238, 166, 0.34);
  background:
    linear-gradient(145deg, rgba(67, 210, 132, 0.16), rgba(126, 231, 255, 0.07)),
    rgba(8, 25, 31, 0.92);
  box-shadow:
    0 18px 48px rgba(4, 15, 20, 0.36),
    inset 0 0 32px rgba(83, 232, 158, 0.055);
}

.system-banner.restart-banner strong {
  color: #e9fff4;
}

.system-banner strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.35;
  color: #fff4dd;
}

.system-banner-icon {
  position: relative;
  width: 74px;
  min-width: 74px;
  min-height: 74px;
  height: 74px;
  padding: 0;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(255, 216, 123, 0.24), rgba(241, 91, 80, 0.08));
  border: 1px solid rgba(255, 216, 123, 0.28);
  box-shadow: 0 0 30px rgba(255, 176, 80, 0.18);
  color: #ffd87b;
}

.system-banner-icon:not(.system-invite-button):not(.system-restart-button) {
  pointer-events: none;
  cursor: default;
}

.system-banner-icon.system-invite-button {
  border-color: rgba(126, 231, 255, 0.4);
  background:
    radial-gradient(circle at 35% 28%, rgba(126, 231, 255, 0.25), transparent 55%),
    linear-gradient(145deg, rgba(126, 231, 255, 0.17), rgba(79, 209, 124, 0.08)),
    rgba(9, 29, 43, 0.92);
  color: #dffaff;
  box-shadow: 0 12px 30px rgba(40, 164, 215, 0.24), 0 0 24px rgba(126, 231, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.system-banner-icon.system-invite-button:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.045);
  border-color: rgba(126, 231, 255, 0.68);
  box-shadow: 0 17px 38px rgba(40, 164, 215, 0.34), 0 0 30px rgba(126, 231, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.17);
}

.system-banner-icon.system-restart-button {
  cursor: pointer;
  border-color: rgba(103, 241, 171, 0.48);
  background:
    radial-gradient(circle at 34% 28%, rgba(145, 255, 199, 0.3), transparent 52%),
    linear-gradient(145deg, rgba(70, 220, 144, 0.24), rgba(42, 154, 180, 0.13)),
    rgba(7, 35, 36, 0.94);
  color: #dffff0;
  box-shadow:
    0 14px 34px rgba(39, 207, 126, 0.24),
    0 0 28px rgba(103, 241, 171, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  animation: restartButtonGlow 2.4s ease-in-out infinite;
}

.system-banner-icon.system-restart-button:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.055);
  border-color: rgba(154, 255, 205, 0.82);
  box-shadow:
    0 18px 42px rgba(39, 207, 126, 0.34),
    0 0 34px rgba(103, 241, 171, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.system-banner-icon.system-restart-button:hover:not(:disabled) svg {
  transform: rotate(-36deg);
}

.system-banner-icon.system-restart-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.system-banner-icon svg {
  width: 36px;
  height: 36px;
  fill: currentColor;
  transition: transform 220ms ease;
}

label,
.stack .card h2 {
  display: block;
  margin-bottom: 14px;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

input,
select,
button {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(170, 186, 216, 0.18);
  padding: 14px 16px;
  font: inherit;
}

input,
select {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

select:invalid {
  color: var(--muted);
}

select option {
  color: #eef4ff;
  background: #12213a;
}

select option[disabled] {
  color: var(--muted);
}

button {
  --button-hover-border: rgba(255, 224, 143, 0.62);
  --button-hover-shadow:
    0 14px 34px rgba(244, 185, 66, 0.3),
    0 0 0 1px rgba(255, 218, 103, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  cursor: pointer;
  background: linear-gradient(135deg, #f0a82f, #ffe078 58%, #f5bd49);
  color: #111723;
  font-weight: 700;
  box-shadow:
    0 9px 24px rgba(244, 185, 66, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 0 -1px 0 rgba(104, 62, 5, 0.14);
  transition: transform 180ms ease, opacity 160ms ease, filter 220ms ease, border-color 220ms ease, box-shadow 240ms ease, background 240ms ease;
}

button:not(.launcher-button)::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -75%;
  bottom: -75%;
  left: -42%;
  width: 25%;
  transform: translateX(-220%) rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.48), transparent);
  transition: transform 560ms ease;
  pointer-events: none;
}

button:not(.launcher-button) > * {
  position: relative;
  z-index: 1;
}

button:not(.launcher-button):hover:not(:disabled) {
  transform: translateY(-2px) scale(1.012);
  filter: saturate(1.07) brightness(1.045);
  border-color: var(--button-hover-border);
  box-shadow: var(--button-hover-shadow);
}

button:not(.launcher-button):hover:not(:disabled)::before {
  transform: translateX(650%) rotate(18deg);
}

button:not(.launcher-button):active:not(:disabled) {
  transform: translateY(0) scale(0.975);
  transition-duration: 80ms;
}

button:focus-visible {
  outline: 3px solid rgba(126, 231, 255, 0.34);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  filter: saturate(0.55);
  box-shadow: none;
}

.ghost {
  --button-hover-border: rgba(126, 231, 255, 0.52);
  --button-hover-shadow:
    0 13px 30px rgba(40, 164, 215, 0.18),
    0 0 18px rgba(126, 231, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  width: auto;
  border-color: rgba(126, 231, 255, 0.2);
  background:
    linear-gradient(135deg, rgba(126, 231, 255, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(9, 20, 36, 0.82);
  color: var(--text);
  box-shadow:
    0 8px 22px rgba(3, 10, 22, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ghost:hover:not(:disabled) {
  border-color: rgba(126, 231, 255, 0.52);
  box-shadow:
    0 13px 30px rgba(40, 164, 215, 0.18),
    0 0 18px rgba(126, 231, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.button-success {
  --button-hover-border: rgba(184, 255, 209, 0.82);
  --button-hover-shadow:
    0 15px 38px rgba(79, 209, 124, 0.38),
    0 0 20px rgba(79, 209, 124, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  border-color: rgba(121, 255, 167, 0.46);
  background: linear-gradient(135deg, #32bd64, #73e79a 58%, #45cf76);
  color: #06150b;
  box-shadow:
    0 10px 28px rgba(79, 209, 124, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.button-success:hover:not(:disabled) {
  border-color: rgba(184, 255, 209, 0.82);
  box-shadow:
    0 15px 38px rgba(79, 209, 124, 0.38),
    0 0 20px rgba(79, 209, 124, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.button-success.is-ready {
  --button-hover-border: rgba(255, 224, 143, 0.7);
  --button-hover-shadow:
    0 14px 34px rgba(244, 185, 66, 0.32),
    0 0 18px rgba(255, 216, 123, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.54);
  border-color: rgba(255, 216, 123, 0.46);
  background: linear-gradient(135deg, #db8f26, #ffd86e 58%, #eead36);
  color: #231503;
  box-shadow:
    0 9px 26px rgba(244, 185, 66, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.button-cyan {
  --button-hover-border: rgba(190, 247, 255, 0.84);
  --button-hover-shadow:
    0 15px 38px rgba(40, 164, 215, 0.36),
    0 0 20px rgba(126, 231, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  border-color: rgba(126, 231, 255, 0.42);
  background: linear-gradient(135deg, #45bcd5, #94efff 58%, #5bcfe7);
  color: #07161c;
  box-shadow:
    0 10px 28px rgba(40, 164, 215, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.button-cyan:hover:not(:disabled) {
  border-color: rgba(190, 247, 255, 0.84);
  box-shadow:
    0 15px 38px rgba(40, 164, 215, 0.36),
    0 0 20px rgba(126, 231, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.button-danger,
#leaveButton {
  --button-hover-border: rgba(255, 177, 160, 0.68);
  --button-hover-shadow:
    0 14px 34px rgba(241, 91, 80, 0.28),
    0 0 18px rgba(241, 91, 80, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 159, 149, 0.36);
  background:
    linear-gradient(135deg, rgba(241, 91, 80, 0.28), rgba(244, 128, 86, 0.2)),
    rgba(45, 15, 24, 0.84);
  color: #fff0e9;
  box-shadow:
    0 8px 24px rgba(241, 91, 80, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.button-danger:hover:not(:disabled),
#leaveButton:hover:not(:disabled) {
  border-color: rgba(255, 177, 160, 0.68);
  box-shadow:
    0 14px 34px rgba(241, 91, 80, 0.28),
    0 0 18px rgba(241, 91, 80, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.ghost.compact {
  padding: 10px 14px;
  min-height: 40px;
}

#leaveButton {
  width: auto;
  margin-left: auto;
}

button.tab-button {
  --button-hover-border: rgba(126, 231, 255, 0.46);
  --button-hover-shadow:
    0 9px 22px rgba(40, 164, 215, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

button.tab-button:hover:not(:disabled) {
  border-color: rgba(126, 231, 255, 0.46);
  box-shadow:
    0 9px 22px rgba(40, 164, 215, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

button.tab-button.active {
  border-color: rgba(126, 231, 255, 0.42);
  box-shadow:
    0 9px 24px rgba(40, 164, 215, 0.17),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.sound-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: auto;
  line-height: 1;
  white-space: nowrap;
}

.sound-toggle svg {
  display: block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  overflow: visible;
}

.primary.stretch {
  margin-bottom: 14px;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.row-space {
  justify-content: space-between;
  margin-bottom: 14px;
}

.row-wrap {
  flex-wrap: wrap;
  margin-top: 16px;
}

.right {
  text-align: right;
}

.timer-row {
  margin-bottom: 0;
}

.highlight {
  background:
    linear-gradient(140deg, rgba(244, 185, 66, 0.16), rgba(244, 185, 66, 0.04)),
    var(--card);
}

.session-summary {
  --hud-accent: #7ee7ff;
  --hud-accent-soft: rgba(126, 231, 255, 0.12);
  position: relative;
  overflow: hidden;
  padding: 10px;
  border-color: rgba(126, 231, 255, 0.2);
  background:
    linear-gradient(110deg, rgba(126, 231, 255, 0.065), rgba(255, 255, 255, 0.018) 48%, rgba(79, 209, 124, 0.045)),
    rgba(8, 17, 32, 0.91);
  box-shadow:
    0 16px 40px rgba(2, 8, 20, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.theme-day .session-summary,
body.theme-results .session-summary {
  --hud-accent: #ffd87b;
  --hud-accent-soft: rgba(255, 216, 123, 0.13);
  border-color: rgba(255, 216, 123, 0.22);
  background:
    linear-gradient(110deg, rgba(255, 216, 123, 0.075), rgba(255, 255, 255, 0.018) 48%, rgba(126, 231, 255, 0.04)),
    rgba(11, 18, 31, 0.92);
}

body.theme-night .session-summary,
body.theme-ended-gnosia .session-summary {
  --hud-accent: #9dafff;
  --hud-accent-soft: rgba(157, 175, 255, 0.13);
  border-color: rgba(157, 175, 255, 0.22);
  background:
    linear-gradient(110deg, rgba(91, 112, 208, 0.1), rgba(255, 255, 255, 0.015) 48%, rgba(241, 91, 80, 0.05)),
    rgba(7, 13, 27, 0.94);
}

body.theme-ended-humans .session-summary {
  --hud-accent: #8df4b6;
  --hud-accent-soft: rgba(141, 244, 182, 0.13);
  border-color: rgba(141, 244, 182, 0.22);
}

.session-hud-scene,
.session-hud-glow,
.session-hud-gridline {
  position: absolute;
  pointer-events: none;
}

.session-hud-scene {
  inset: 0;
  overflow: hidden;
}

.session-hud-glow {
  width: 260px;
  height: 160px;
  top: -90px;
  left: 34%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--hud-accent-soft), transparent 68%);
  filter: blur(12px);
}

.session-hud-gridline {
  inset: 0;
  opacity: 0.18;
  background-image: linear-gradient(90deg, transparent 0 49.8%, var(--hud-accent-soft) 50%, transparent 50.2%);
}

.session-hud-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(190px, 0.82fr) minmax(260px, 1.18fr) minmax(220px, 1fr);
  gap: 8px;
}

.session-hud-cell {
  min-width: 0;
  min-height: 72px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 17px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.032);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  transition: border-color 220ms ease, background 220ms ease, transform 220ms ease;
}

.session-hud-cell:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--hud-accent) 34%, transparent);
  background: rgba(255, 255, 255, 0.048);
}

.session-hud-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--hud-accent) 25%, transparent);
  background: var(--hud-accent-soft);
  color: var(--hud-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 20px rgba(2, 8, 20, 0.16);
}

.session-hud-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.session-hud-copy {
  min-width: 0;
}

.session-hud-copy > span {
  display: block;
  margin-bottom: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-hud-copy h3,
.session-hud-copy > strong {
  overflow: hidden;
  color: var(--text);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-code-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

.session-code-button::before {
  display: none;
}

.session-code-button strong {
  font-size: clamp(20px, 2.3vw, 25px);
  line-height: 1;
  letter-spacing: 0.08em;
}

.session-code-button svg {
  width: 16px;
  height: 16px;
  fill: var(--hud-accent);
  opacity: 0.7;
  transition: opacity 180ms ease, transform 180ms ease;
}

.session-code-button:hover:not(:disabled) {
  transform: none;
  filter: none;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.session-code-button:hover svg {
  opacity: 1;
  transform: scale(1.12);
}

.session-timer-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.session-hud-progress {
  position: absolute;
  z-index: 2;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 3px;
  overflow: hidden;
  border-radius: 999px 999px 0 0;
  background: rgba(255, 255, 255, 0.05);
}

.session-hud-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--hud-accent), #7cf0bd);
  box-shadow: 0 0 14px var(--hud-accent);
  transition: width 900ms linear;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.status-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.status-card.compact {
  padding: 14px 16px;
}

.status-card strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.status-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(126, 231, 255, 0.18), rgba(244, 185, 66, 0.14));
  color: var(--cyan);
}

.players,
.actions,
.log {
  display: grid;
  gap: 12px;
}

.player,
.action-box,
.log-item {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  transition: transform 180ms ease, border-color 280ms ease, background 280ms ease, box-shadow 280ms ease;
}

.action-box {
  position: relative;
  overflow: hidden;
  padding: 18px;
}

.action-box-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.action-box-ring,
.action-box-glow {
  position: absolute;
}

.action-box-ring {
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: slowSpin 18s linear infinite;
}

.action-box-ring.ring-a {
  width: 140px;
  height: 140px;
  top: -48px;
  right: -24px;
}

.action-box-ring.ring-b {
  width: 220px;
  height: 220px;
  bottom: -128px;
  left: -52px;
  animation-direction: reverse;
  animation-duration: 24s;
}

.action-box-glow {
  width: 180px;
  height: 180px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
  filter: blur(14px);
}

.action-box-head,
.action-box form,
.action-hint,
.action-state,
.action-empty,
.action-box > strong,
.action-box > p {
  position: relative;
  z-index: 1;
}

.action-box-head {
  display: grid;
  grid-template-columns: 1fr 64px;
  gap: 14px;
  align-items: start;
}

.action-box-copy strong {
  display: block;
  margin: 8px 0 0;
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.15;
}

.action-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: #e4eefc;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.action-subtitle {
  margin: 10px 0 0;
  color: #dbe7fb;
  line-height: 1.5;
}

.action-box-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e8f2ff;
}

.action-box-icon svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.action-hint {
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d5e2f7;
  font-size: 14px;
  line-height: 1.45;
}

.action-empty {
  margin-top: 14px;
  color: var(--muted);
}

.action-theme-vote {
  border-color: rgba(255, 216, 123, 0.28);
  background:
    linear-gradient(145deg, rgba(255, 216, 123, 0.16), rgba(126, 231, 255, 0.05)),
    rgba(255, 255, 255, 0.03);
}

.action-theme-vote .action-box-glow,
.action-theme-revote .action-box-glow {
  background: radial-gradient(circle, rgba(255, 216, 123, 0.14), transparent 70%);
}

.action-theme-vote .action-box-icon,
.action-theme-revote .action-box-icon {
  color: #ffd87b;
}

.action-theme-revote {
  border-color: rgba(255, 170, 123, 0.3);
  background:
    linear-gradient(145deg, rgba(255, 170, 123, 0.17), rgba(241, 91, 80, 0.07)),
    rgba(255, 255, 255, 0.03);
}

.action-theme-gnosia {
  border-color: rgba(255, 159, 149, 0.3);
  background:
    linear-gradient(145deg, rgba(255, 159, 149, 0.18), rgba(66, 14, 28, 0.14)),
    rgba(255, 255, 255, 0.03);
}

.action-theme-gnosia .action-box-glow {
  background: radial-gradient(circle, rgba(255, 159, 149, 0.16), transparent 70%);
}

.action-theme-gnosia .action-box-icon {
  color: #ff9f95;
}

.action-theme-engineer {
  border-color: rgba(126, 231, 255, 0.28);
  background:
    linear-gradient(145deg, rgba(126, 231, 255, 0.16), rgba(58, 104, 150, 0.08)),
    rgba(255, 255, 255, 0.03);
}

.action-theme-engineer .action-box-glow {
  background: radial-gradient(circle, rgba(126, 231, 255, 0.16), transparent 70%);
}

.action-theme-engineer .action-box-icon {
  color: #7ee7ff;
}

.action-theme-doctor {
  border-color: rgba(141, 244, 182, 0.28);
  background:
    linear-gradient(145deg, rgba(141, 244, 182, 0.16), rgba(20, 78, 56, 0.08)),
    rgba(255, 255, 255, 0.03);
}

.action-theme-doctor .action-box-glow {
  background: radial-gradient(circle, rgba(141, 244, 182, 0.16), transparent 70%);
}

.action-theme-doctor .action-box-icon {
  color: #8df4b6;
}

.action-theme-angel {
  border-color: rgba(255, 216, 123, 0.3);
  background:
    linear-gradient(145deg, rgba(255, 216, 123, 0.17), rgba(255, 255, 255, 0.05)),
    rgba(255, 255, 255, 0.03);
}

.action-theme-angel .action-box-glow {
  background: radial-gradient(circle, rgba(255, 216, 123, 0.18), transparent 70%);
}

.action-theme-angel .action-box-icon {
  color: #ffd87b;
}

.action-theme-observer,
.action-theme-disabled {
  border-color: rgba(157, 176, 205, 0.18);
  background:
    linear-gradient(145deg, rgba(157, 176, 205, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.03);
}

.action-theme-observer .action-box-icon,
.action-theme-disabled .action-box-icon {
  color: #b7c7df;
}

.cta-focus {
  border-color: rgba(255, 216, 123, 0.38) !important;
  box-shadow:
    0 0 0 2px rgba(255, 216, 123, 0.12),
    0 0 28px rgba(255, 216, 123, 0.16) !important;
}

.cta-pulse {
  animation: ctaPulse 1.3s ease-in-out infinite;
}

#eventsList .log-item:first-child {
  border-color: rgba(255, 216, 123, 0.26);
  background:
    linear-gradient(140deg, rgba(255, 216, 123, 0.12), rgba(241, 91, 80, 0.06)),
    rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 18px rgba(255, 216, 123, 0.05);
}

.player.dead {
  opacity: 0.6;
}

.player-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.player-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-role-icon {
  width: 46px;
  min-width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
  color: #aebed5;
}

.player-role-icon svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.player.role-human .player-role-icon {
  color: #dbe8fb;
  background: rgba(219, 232, 251, 0.07);
}

.player.role-gnosia .player-role-icon {
  color: #ff9f95;
  border-color: rgba(255, 159, 149, 0.18);
  background: rgba(255, 159, 149, 0.08);
}

.player.role-engineer .player-role-icon {
  color: #7ee7ff;
  border-color: rgba(126, 231, 255, 0.18);
  background: rgba(126, 231, 255, 0.08);
}

.player.role-doctor .player-role-icon {
  color: #8df4b6;
  border-color: rgba(141, 244, 182, 0.18);
  background: rgba(141, 244, 182, 0.08);
}

.player.role-angel .player-role-icon {
  color: #ffd87b;
  border-color: rgba(255, 216, 123, 0.18);
  background: rgba(255, 216, 123, 0.08);
}

.player.role-traitor .player-role-icon {
  color: #ffcf9c;
  border-color: rgba(255, 207, 156, 0.18);
  background: rgba(255, 207, 156, 0.08);
}

.player-copy {
  min-width: 0;
}

.player-tags,
.player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lobby-roster-card {
  position: relative;
  z-index: 1;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(126, 231, 255, 0.15);
  background:
    linear-gradient(145deg, rgba(126, 231, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.025);
}

.lobby-roster-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.lobby-roster-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lobby-roster-head h3 {
  font-size: clamp(18px, 2.5vw, 22px);
}

.lobby-help-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(126, 231, 255, 0.3);
  background: rgba(126, 231, 255, 0.08);
  color: #bff4ff;
  font-size: 21px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(40, 164, 215, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.lobby-help-button:hover {
  transform: translateY(-2px) rotate(4deg);
  border-color: rgba(126, 231, 255, 0.56);
  background: rgba(126, 231, 255, 0.15);
  box-shadow: 0 13px 28px rgba(40, 164, 215, 0.22), 0 0 16px rgba(126, 231, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.lobby-roster-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.lobby-roster-stats > div {
  min-width: 0;
  padding: 11px 12px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.04);
}

.lobby-roster-stats span,
.lobby-roster-stats strong {
  display: block;
}

.lobby-roster-stats span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.lobby-roster-stats strong {
  color: var(--text);
  font-size: 21px;
}

.lobby-roster-stats small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.lobby-bot-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.7fr);
  gap: 12px;
  align-items: end;
  margin-top: 14px;
}

.lobby-preset-control,
.lobby-bot-stepper {
  margin: 0;
}

.lobby-preset-control > span,
.lobby-bot-stepper > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
}

.lobby-preset-control select {
  min-height: 48px;
}

.lobby-bot-stepper > div {
  display: grid;
  grid-template-columns: 48px minmax(54px, 1fr) 48px;
  align-items: center;
  min-height: 48px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.lobby-bot-stepper strong {
  text-align: center;
  font-size: 20px;
}

.lobby-step-button {
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(126, 231, 255, 0.08);
  color: var(--cyan);
  font-size: 25px;
  box-shadow: none;
}

.lobby-step-button:hover:not(:disabled) {
  transform: none;
  background: rgba(126, 231, 255, 0.17);
  box-shadow: inset 0 0 16px rgba(126, 231, 255, 0.08);
}

.lobby-fill-minimum {
  width: 100%;
  margin-top: 10px;
  min-height: 44px;
}

.lobby-confirmation {
  margin-top: 10px;
}

.lobby-confirmation button {
  width: 100%;
  min-height: 48px;
}

.lobby-confirmed,
.lobby-confirmation-note,
.lobby-guest-note {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 14px;
  text-align: center;
}

.lobby-confirmed {
  border: 1px solid rgba(79, 209, 124, 0.24);
  background: rgba(79, 209, 124, 0.1);
  color: #bff7d1;
  font-weight: 700;
}

.lobby-confirmation-note,
.lobby-guest-note {
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 13px;
}

.lobby-guest-note {
  margin-top: 12px;
}

.lobby-advanced {
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.lobby-advanced summary {
  padding: 12px 2px 2px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.lobby-advanced summary:hover {
  color: var(--text);
}

.lobby-advanced-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
}

.player-tags {
  justify-content: flex-end;
}

.player-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #dce8fa;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.player-tag.bot {
  border-color: rgba(126, 231, 255, 0.24);
  background: linear-gradient(140deg, rgba(126, 231, 255, 0.12), rgba(244, 185, 66, 0.08));
  color: #eef8ff;
}

.player .status {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.player-note {
  margin-top: 10px;
  color: #d8e3f7;
  line-height: 1.45;
  font-size: 14px;
}

.player-actions {
  margin-top: 12px;
}

.player-remove {
  margin-left: auto;
}

.bot-report-item {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-color: rgba(126, 231, 255, 0.16);
  background:
    radial-gradient(circle at 92% 0%, rgba(126, 231, 255, 0.09), transparent 30%),
    linear-gradient(145deg, rgba(126, 231, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(10, 20, 38, 0.72);
}

.bot-report-item.bot-report-gnosia {
  border-color: rgba(255, 159, 149, 0.2);
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 110, 105, 0.1), transparent 30%),
    linear-gradient(145deg, rgba(255, 110, 105, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(17, 15, 29, 0.76);
}

#botReportCard {
  margin-top: 18px;
}

#botReportList {
  margin-top: 14px;
}

.bot-report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.bot-report-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.bot-report-avatar {
  width: 48px;
  min-width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid rgba(126, 231, 255, 0.2);
  background: linear-gradient(145deg, rgba(126, 231, 255, 0.16), rgba(79, 209, 124, 0.07));
  color: var(--cyan);
}

.bot-report-avatar svg,
.bot-decision-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.bot-report-identity h4 {
  margin: 0 0 3px;
  font-size: 19px;
}

.bot-report-identity p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.bot-report-tags {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.bot-report-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(126, 231, 255, 0.16);
  background: rgba(126, 231, 255, 0.07);
  color: #dcecff;
  font-size: 12px;
  font-weight: 700;
}

.bot-report-decisions {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bot-decision-card {
  min-width: 0;
  padding: 13px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.bot-decision-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(126, 231, 255, 0.09);
  color: var(--cyan);
}

.bot-decision-card span,
.bot-decision-card strong,
.bot-decision-card p {
  display: block;
}

.bot-decision-card span {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 12px;
}

.bot-decision-card strong {
  color: #f4f8ff;
  font-size: 16px;
}

.bot-decision-card p {
  margin-top: 5px;
  color: #c9d7eb;
  font-size: 13px;
  line-height: 1.35;
}

.bot-suspicion-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
}

.bot-suspicion-head,
.bot-suspicion-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bot-suspicion-head h5 {
  margin: 0;
  font-size: 15px;
}

.bot-suspicion-head > span,
.bot-suspicion-top span {
  color: var(--muted);
  font-size: 12px;
}

.bot-suspicion-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.bot-suspicion-item {
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.bot-suspicion-top strong {
  font-size: 14px;
}

.bot-suspicion-meter {
  height: 4px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.bot-suspicion-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f4b942, #ff8d77);
}

.bot-suspicion-item p,
.bot-suspicion-empty {
  margin-top: 7px;
  color: #cbd8eb;
  font-size: 13px;
  line-height: 1.35;
}

.action-box form {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.action-box form select,
.action-box form button[type="submit"] {
  animation: none !important;
}

.action-box p {
  color: #d8e3f7;
  line-height: 1.5;
}

.restart-room-button {
  margin-top: 16px;
}

.action-state {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(126, 231, 255, 0.08);
  border: 1px solid rgba(126, 231, 255, 0.16);
  color: #dff7ff;
  font-size: 14px;
}

.result-summary {
  background:
    linear-gradient(140deg, rgba(244, 185, 66, 0.12), rgba(244, 185, 66, 0.03)),
    rgba(255, 255, 255, 0.03);
}

.result-badge {
  margin-top: 10px;
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(241, 91, 80, 0.18);
  border: 1px solid rgba(241, 91, 80, 0.28);
  color: #ffd9d6;
}

.result-entry {
  font-size: 15px;
}

.vote-results-hero {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(145deg, rgba(126, 231, 255, 0.1), rgba(244, 185, 66, 0.08)),
    rgba(255, 255, 255, 0.03);
}

.vote-results-frozen {
  border-color: rgba(255, 159, 149, 0.26);
  background:
    linear-gradient(145deg, rgba(255, 159, 149, 0.18), rgba(244, 185, 66, 0.08)),
    rgba(255, 255, 255, 0.03);
}

.vote-results-tie {
  border-color: rgba(255, 216, 123, 0.26);
  background:
    linear-gradient(145deg, rgba(255, 216, 123, 0.18), rgba(126, 231, 255, 0.08)),
    rgba(255, 255, 255, 0.03);
}

.vote-results-icon {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffd87b;
}

.vote-results-icon svg {
  width: 38px;
  height: 38px;
  fill: currentColor;
}

.vote-results-copy h3 {
  margin: 4px 0 8px;
}

.vote-results-copy p:last-child {
  color: #e2ecfb;
  line-height: 1.5;
}

.vote-results-empty {
  margin-top: 16px;
}

.vote-results-spotlight {
  margin-top: 14px;
  margin-bottom: 14px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.03);
}

.vote-results-spotlight strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(20px, 3vw, 30px);
  color: #fff5df;
}

.vote-spotlight-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #d6e5fb;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-entry {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  align-items: center;
  gap: 10px;
}

.result-voter,
.result-target {
  font-weight: 700;
}

.result-arrow {
  text-align: center;
  color: #ffd87b;
  font-weight: 700;
}

.phase-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(8, 16, 28, 0.48), rgba(4, 8, 15, 0.78));
  backdrop-filter: blur(10px);
  animation: overlayFade 1.6s ease forwards;
  pointer-events: none;
}

.phase-overlay-inner {
  position: relative;
  min-width: min(86vw, 420px);
  padding: 32px 24px;
  border-radius: 28px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(140deg, rgba(126, 231, 255, 0.1), rgba(244, 185, 66, 0.08)),
    rgba(10, 20, 38, 0.74);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  animation: overlayRise 1.2s ease;
}

.phase-overlay-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.phase-overlay-icon svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.phase-overlay-ring {
  width: 86px;
  height: 86px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 2px solid rgba(126, 231, 255, 0.45);
  box-shadow: 0 0 32px rgba(126, 231, 255, 0.25);
  animation: overlayPulse 1.4s ease-in-out infinite;
}

.phase-overlay-label {
  font-size: clamp(28px, 6vw, 54px);
  font-weight: 800;
  letter-spacing: 0.06em;
}

.phase-overlay-sub {
  margin-top: 10px;
  color: #dbe8fb;
}

.phase-overlay.phase-night .phase-overlay-inner {
  background:
    linear-gradient(140deg, rgba(55, 94, 183, 0.22), rgba(18, 28, 58, 0.62)),
    rgba(10, 20, 38, 0.86);
}

.phase-overlay.phase-night .phase-overlay-icon,
.phase-overlay.phase-night .phase-overlay-ring {
  color: #8fb7ff;
  border-color: rgba(143, 183, 255, 0.45);
  box-shadow: 0 0 28px rgba(143, 183, 255, 0.24);
}

.phase-overlay.phase-dawn .phase-overlay-inner {
  background:
    linear-gradient(140deg, rgba(255, 209, 115, 0.22), rgba(85, 140, 255, 0.22)),
    rgba(10, 20, 38, 0.88);
}

.phase-overlay.phase-dawn .phase-overlay-icon,
.phase-overlay.phase-dawn .phase-overlay-ring {
  color: #ffd87b;
  border-color: rgba(255, 216, 123, 0.48);
  box-shadow: 0 0 30px rgba(255, 216, 123, 0.24);
}

.phase-overlay.phase-results .phase-overlay-inner {
  background:
    linear-gradient(140deg, rgba(244, 185, 66, 0.2), rgba(88, 42, 16, 0.45)),
    rgba(10, 20, 38, 0.86);
}

.phase-overlay.phase-results .phase-overlay-icon,
.phase-overlay.phase-results .phase-overlay-ring {
  color: #ffd87b;
  border-color: rgba(255, 216, 123, 0.45);
  box-shadow: 0 0 28px rgba(255, 216, 123, 0.22);
}

.phase-overlay.phase-humans .phase-overlay-inner {
  background:
    linear-gradient(140deg, rgba(79, 209, 124, 0.24), rgba(18, 62, 38, 0.64)),
    rgba(10, 20, 38, 0.86);
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.46),
    inset 0 0 44px rgba(141, 244, 182, 0.08);
}

.phase-overlay.phase-humans .phase-overlay-icon,
.phase-overlay.phase-humans .phase-overlay-ring {
  color: #8df4b6;
  border-color: rgba(141, 244, 182, 0.45);
  box-shadow: 0 0 28px rgba(141, 244, 182, 0.22);
}

.phase-overlay.phase-gnosia .phase-overlay-inner {
  background:
    linear-gradient(140deg, rgba(241, 91, 80, 0.28), rgba(74, 18, 26, 0.66)),
    rgba(10, 20, 38, 0.86);
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.48),
    inset 0 0 44px rgba(255, 159, 149, 0.08);
}

.phase-overlay.phase-gnosia .phase-overlay-icon,
.phase-overlay.phase-gnosia .phase-overlay-ring {
  color: #ff9f95;
  border-color: rgba(255, 159, 149, 0.45);
  box-shadow: 0 0 28px rgba(255, 159, 149, 0.25);
}

.signal {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 8px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 36px rgba(255, 255, 255, 0.12);
}

.signal-neutral {
  background: #71839e;
}

.signal-red {
  background: var(--danger);
  box-shadow: 0 0 48px rgba(241, 91, 80, 0.7);
  animation: pulseRed 1.6s ease-in-out infinite;
}

.signal-green {
  background: var(--ok);
  box-shadow: 0 0 48px rgba(79, 209, 124, 0.7);
  animation: pulseGreen 2s ease-in-out infinite;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  max-width: min(92vw, 520px);
  padding: 16px 20px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(241, 91, 80, 0.16), rgba(244, 185, 66, 0.12)),
    rgba(12, 18, 30, 0.96);
  border: 1px solid rgba(255, 198, 123, 0.28);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  color: #fff1d7;
  font-weight: 700;
  z-index: 30;
}

.toast-visible {
  animation: toastPulse 0.42s ease;
}

.phase-overlay.phase-humans .phase-overlay-label,
.phase-overlay.phase-gnosia .phase-overlay-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hidden {
  display: none !important;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 26;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 18, 0.72);
  backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(92vw, 720px);
  max-height: min(88vh, 920px);
  overflow: auto;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(145deg, rgba(126, 231, 255, 0.08), rgba(244, 185, 66, 0.06)),
    rgba(10, 20, 38, 0.94);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.46);
}

.modal-card-compact {
  width: min(92vw, 480px);
}

.qr-invite-modal-card {
  width: min(94vw, 560px);
  border-color: rgba(126, 231, 255, 0.24);
  background:
    radial-gradient(circle at 50% 36%, rgba(126, 231, 255, 0.13), transparent 19rem),
    linear-gradient(145deg, rgba(126, 231, 255, 0.08), rgba(79, 209, 124, 0.05)),
    rgba(7, 17, 32, 0.97);
}

.qr-invite-head {
  align-items: flex-start;
}

.qr-invite-body {
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.qr-image-shell {
  width: min(72vw, 330px);
  aspect-ratio: 1;
  padding: 14px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 22px 56px rgba(2, 8, 20, 0.5), 0 0 36px rgba(126, 231, 255, 0.14);
}

.qr-image-shell img {
  display: block;
  width: 100%;
  height: 100%;
}

.qr-invite-code {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(126, 231, 255, 0.2);
  background: rgba(126, 231, 255, 0.07);
  color: var(--muted);
}

.qr-invite-code strong {
  color: var(--text);
  font-size: 22px;
  letter-spacing: 0.1em;
}

.qr-invite-body p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.phase-help-modal-card {
  width: min(94vw, 650px);
  border-color: rgba(126, 231, 255, 0.22);
  background:
    radial-gradient(circle at 12% 10%, rgba(126, 231, 255, 0.12), transparent 18rem),
    linear-gradient(145deg, rgba(126, 231, 255, 0.07), rgba(244, 185, 66, 0.04)),
    rgba(7, 17, 32, 0.97);
}

.phase-help-head {
  align-items: flex-start;
}

.phase-help-intro {
  margin: 4px 0 18px;
  color: #dce8fa;
  line-height: 1.55;
}

.phase-help-grid {
  display: grid;
  gap: 12px;
}

.phase-help-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
}

.phase-help-primary {
  border-color: rgba(79, 209, 124, 0.22);
  background: linear-gradient(135deg, rgba(79, 209, 124, 0.1), rgba(255, 255, 255, 0.035));
}

.phase-help-secondary {
  border-color: rgba(244, 185, 66, 0.22);
  background: linear-gradient(135deg, rgba(244, 185, 66, 0.09), rgba(255, 255, 255, 0.035));
}

.phase-help-number {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: rgba(126, 231, 255, 0.1);
  color: var(--cyan);
  font-size: 20px;
  font-weight: 800;
}

.phase-help-item span,
.phase-help-item strong {
  display: block;
}

.phase-help-item span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
}

.phase-help-item strong {
  color: var(--text);
  line-height: 1.42;
}

.qr-copy-button {
  width: min(100%, 330px);
}

.qr-invite-actions {
  width: min(100%, 380px);
  display: grid;
  gap: 10px;
}

.qr-invite-actions .qr-copy-button,
.telegram-invite-button {
  width: 100%;
}

.telegram-invite-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.telegram-invite-button svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

html.telegram-mini-app body {
  min-height: var(--tg-viewport-stable-height, 100vh);
  overscroll-behavior-y: none;
}

html.telegram-mini-app .shell {
  width: min(1120px, calc(100vw - 20px));
  padding-top: max(12px, var(--tg-content-safe-area-inset-top, 0px));
  padding-bottom: max(28px, var(--tg-content-safe-area-inset-bottom, 0px));
}

html.telegram-mini-app .steam-sell-fluid-background {
  opacity: 0.34;
  filter: saturate(0.82) brightness(0.72);
}

html.telegram-mini-app .modal-shell {
  padding:
    max(12px, var(--tg-content-safe-area-inset-top, 0px))
    max(12px, var(--tg-content-safe-area-inset-right, 0px))
    max(12px, var(--tg-content-safe-area-inset-bottom, 0px))
    max(12px, var(--tg-content-safe-area-inset-left, 0px));
}

html.telegram-mini-app input,
html.telegram-mini-app select,
html.telegram-mini-app textarea {
  font-size: 16px;
}

#createForm .create-name-field {
  margin-bottom: 16px;
}

.create-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  margin-bottom: 18px;
}

.create-settings-grid label {
  min-width: 0;
  margin-bottom: 0;
}

.join-submit {
  border-color: rgba(126, 231, 255, 0.3);
  background: linear-gradient(135deg, #61d7ee, #95efff);
  color: #07161c;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

@keyframes floatNebulaA {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(2%, -2%, 0) scale(1.06); }
}

@keyframes floatNebulaB {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-2%, 2%, 0) scale(1.05); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

@keyframes pulseRed {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes pulseGreen {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@keyframes overlayPulse {
  0%, 100% { transform: scale(0.96); opacity: 0.75; }
  50% { transform: scale(1.04); opacity: 1; }
}

@keyframes overlayFade {
  0% { opacity: 0; }
  12% { opacity: 1; }
  82% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes overlayRise {
  0% { transform: translateY(20px) scale(0.97); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes toastPulse {
  0% { transform: translateX(-50%) translateY(12px) scale(0.98); opacity: 0; }
  100% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}

@keyframes systemBannerPulse {
  0%, 100% { box-shadow: 0 18px 48px rgba(4, 8, 16, 0.34), inset 0 0 28px rgba(255, 180, 90, 0.05); }
  50% { box-shadow: 0 22px 56px rgba(4, 8, 16, 0.42), inset 0 0 34px rgba(255, 180, 90, 0.08); }
}

@keyframes restartButtonGlow {
  0%, 100% { box-shadow: 0 14px 34px rgba(39, 207, 126, 0.2), 0 0 22px rgba(103, 241, 171, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.14); }
  50% { box-shadow: 0 16px 40px rgba(39, 207, 126, 0.3), 0 0 34px rgba(103, 241, 171, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
}

@keyframes ctaPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@keyframes slowSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes launcherGreenPulse {
  0%, 100% {
    box-shadow: 0 10px 28px rgba(79, 209, 124, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }
  50% {
    box-shadow: 0 13px 36px rgba(79, 209, 124, 0.4), 0 0 18px rgba(79, 209, 124, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  }
}

@keyframes launcherCyanPulse {
  0%, 100% {
    box-shadow: 0 10px 26px rgba(40, 164, 215, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  50% {
    box-shadow: 0 13px 34px rgba(40, 164, 215, 0.26), 0 0 16px rgba(126, 231, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  }
}

@keyframes refreshOrbit {
  0% { transform: rotate(0deg) scale(1); }
  55% { transform: rotate(240deg) scale(1.16); }
  100% { transform: rotate(360deg) scale(1); }
}

@media (max-width: 860px) {
  .steam-sell-fluid-background {
    display: none;
  }

  .hero,
  .grid,
  .status-strip,
  .phase-metrics,
  .priority-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .lobby-launcher {
    grid-template-columns: 1fr;
  }

  .launcher-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .launcher-button {
    width: 100%;
  }

  .hero {
    padding: 14px 16px;
    justify-items: start;
  }

  .hero-side {
    width: 100%;
    grid-template-columns: 1fr auto;
    display: grid;
    align-items: center;
    justify-items: stretch;
    gap: 12px;
  }

  .hero-copy {
    display: none;
  }

  .hero::after {
    display: none;
  }

  .sound-toggle {
    width: 100%;
    justify-content: center;
  }

  .sound-toggle span {
    white-space: nowrap;
  }

  .signal {
    width: 56px;
    height: 56px;
    border-width: 5px;
    justify-self: end;
  }

  .right {
    text-align: left;
  }

  .card {
    padding: 16px;
  }

  input,
  select,
  button {
    min-height: 52px;
    font-size: 16px;
  }

  .action-box form {
    gap: 12px;
  }

  .player-head {
    flex-direction: column;
  }

  .player-tags {
    justify-content: flex-start;
  }

  .player-actions {
    display: grid;
  }

  .action-box-head {
    grid-template-columns: 1fr;
  }

  .action-box-icon {
    width: 56px;
    height: 56px;
  }

  .pill {
    width: 100%;
    justify-content: center;
  }

  #leaveButton {
    width: 100%;
    justify-content: center;
    order: 4;
    margin-left: 0;
    margin-top: 4px;
  }

  .hero-badges {
    flex-direction: column;
  }

  .role-spotlight {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .role-crest {
    margin: 0 auto;
  }

  .timer-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .phase-stage-head {
    align-items: flex-start;
  }

  .phase-stage-icon {
    width: 72px;
    min-width: 72px;
    min-height: 72px;
    height: 72px;
  }

  .tab-switcher {
    justify-content: flex-start;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
  }

  .tab-switcher::-webkit-scrollbar {
    display: none;
  }

  .tab-button {
    flex: 0 0 auto;
    width: auto;
  }

  .intelligence-card > .row-space {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .phase-cinematic {
    grid-template-columns: 1fr;
  }

  .night-report-head {
    grid-template-columns: 1fr;
  }

  .personal-report-head {
    grid-template-columns: 1fr;
  }

  .bot-report-head {
    flex-direction: column;
  }

  .bot-report-tags {
    justify-content: flex-start;
  }

  .bot-report-decisions {
    grid-template-columns: 1fr;
  }

  .system-banner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .system-banner-icon {
    margin: 0 auto;
  }

  .session-item-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .shell,
  html.telegram-mini-app .shell {
    width: calc(100vw - 16px);
    padding-top: max(8px, var(--tg-content-safe-area-inset-top, 0px));
  }

  .intro-screen,
  .role-reveal {
    padding:
      max(12px, var(--tg-content-safe-area-inset-top, 0px))
      max(12px, var(--tg-content-safe-area-inset-right, 0px))
      max(12px, var(--tg-content-safe-area-inset-bottom, 0px))
      max(12px, var(--tg-content-safe-area-inset-left, 0px));
  }

  .intro-core,
  .role-reveal-card {
    width: 100%;
    padding: 28px 18px;
    border-radius: 24px;
  }

  body.session-mode .hero {
    flex-wrap: wrap;
    gap: 9px;
    padding: 10px 12px;
  }

  body.session-mode .hero-copy {
    order: 1;
  }

  body.session-mode .hero-side {
    order: 2;
    margin-left: auto;
    gap: 7px;
  }

  body.session-mode .sound-toggle {
    width: 40px;
    min-width: 40px;
    padding: 0;
    justify-content: center;
  }

  body.session-mode .sound-toggle svg {
    width: 19px;
    height: 19px;
    flex-basis: 19px;
  }

  body.session-mode .sound-toggle span {
    display: none;
  }

  body.session-mode .session-header-meta {
    order: 3;
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
  }

  .header-pill {
    flex: 1 1 0;
    max-width: none;
    padding-inline: 8px;
    text-align: center;
    font-size: 12px;
  }

  .header-status {
    flex-basis: 100%;
  }

  .session-summary {
    padding: 8px;
  }

  .session-hud-grid {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: 7px;
  }

  .session-hud-timer {
    grid-column: 1 / -1;
  }

  .session-hud-cell {
    min-height: 66px;
    padding: 9px 10px;
    gap: 9px;
    border-radius: 15px;
  }

  .session-hud-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .session-hud-icon svg {
    width: 19px;
    height: 19px;
  }

  .session-hud-copy h3 {
    font-size: 16px;
    white-space: normal;
  }

  .session-hud-copy > strong {
    font-size: 18px;
  }

  .session-code-button {
    gap: 5px;
  }

  .session-code-button strong {
    font-size: 18px;
  }

  .session-code-button svg {
    display: none;
  }

  .launcher-actions {
    grid-template-columns: 1fr;
  }

  .create-settings-grid {
    grid-template-columns: 1fr;
  }

  .qr-invite-modal-card {
    padding: 18px;
    border-radius: 24px;
  }

  .qr-invite-head {
    gap: 12px;
  }

  .qr-invite-head .compact {
    min-height: 44px;
    padding: 8px 12px;
  }

  .phase-help-trigger {
    width: 64px;
    min-width: 64px;
    min-height: 64px;
    height: 64px;
    border-radius: 20px;
    font-size: 30px;
  }

  .phase-help-modal-card {
    padding: 18px;
    border-radius: 24px;
  }

  .phase-help-item {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 14px;
  }

  .phase-help-number {
    width: 40px;
    height: 40px;
  }

  .lobby-roster-card {
    padding: 14px;
    border-radius: 18px;
  }

  .lobby-roster-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lobby-bot-editor {
    grid-template-columns: 1fr;
  }

  .lobby-advanced-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .session-hud-grid {
    grid-template-columns: 1fr;
  }

  .session-hud-timer {
    grid-column: auto;
  }

  .modal-card {
    width: 100%;
    padding: 18px 14px;
    border-radius: 22px;
  }

  .qr-invite-code {
    flex-direction: column;
    gap: 3px;
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .steam-sell-fluid-background {
    display: none;
  }

  .launcher-create,
  .launcher-join,
  .sessions-refresh:hover svg {
    animation: none;
  }

  .launcher-button::before,
  .launcher-button svg,
  .sessions-refresh {
    transition: none;
  }

  .phase-help-trigger {
    animation: none;
  }
}
