:root {
  --bg: #08050d;
  --panel: rgba(21, 14, 28, 0.78);
  --panel-strong: rgba(28, 18, 38, 0.94);
  --text: #f8f5fb;
  --muted: #bcb2c7;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #d95bff;
  --accent-2: #ff477e;
  --success: #4ed68a;
  --warning: #ffb84d;
  --danger: #ff4f65;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  background: radial-gradient(circle at 50% -20%, #2c1538 0%, var(--bg) 45%, #040207 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

button, input, textarea { font: inherit; }
button { color: inherit; }

#ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.68;
}

.ambient-glow {
  position: fixed;
  width: 42vw;
  height: 42vw;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: 0.13;
  animation: drift 12s ease-in-out infinite alternate;
}

.ambient-glow--one { background: #d95bff; top: 10%; left: -12%; }
.ambient-glow--two { background: #ff477e; right: -14%; bottom: 2%; animation-delay: -5s; }

@keyframes drift {
  from { transform: translate3d(-2%, -2%, 0) scale(0.95); }
  to { transform: translate3d(8%, 5%, 0) scale(1.12); }
}

.app-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  width: min(100%, 620px);
  margin: 0 auto;
  padding:
    calc(18px + env(safe-area-inset-top))
    calc(18px + env(safe-area-inset-right))
    calc(22px + env(safe-area-inset-bottom))
    calc(18px + env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen {
  width: 100%;
  animation: screenIn 420ms cubic-bezier(.2,.8,.2,1) both;
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(18px) scale(.985); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.logo-lockup { text-align: center; margin-bottom: 34px; }
.logo-mark {
  width: 82px;
  height: 82px;
  margin: 0 auto 18px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(217,91,255,.9), rgba(255,71,126,.85));
  box-shadow: 0 18px 55px rgba(217, 91, 255, .28), inset 0 1px 0 rgba(255,255,255,.35);
  font-size: 34px;
  transform: rotate(-4deg);
}

.eyebrow {
  margin: 0 0 8px;
  color: #e2b7ef;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(34px, 9vw, 54px); line-height: .98; letter-spacing: -.045em; margin-bottom: 14px; }
h2 { font-size: clamp(28px, 7vw, 40px); letter-spacing: -.035em; margin-bottom: 10px; }
h3 { font-size: 20px; margin-bottom: 6px; }
.lead { color: var(--muted); font-size: 17px; line-height: 1.55; }

.panel {
  background: linear-gradient(180deg, rgba(35,23,46,.84), rgba(17,11,24,.82));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 22px;
}

.stack { display: grid; gap: 14px; }
.row { display: flex; gap: 12px; align-items: center; }
.row--between { justify-content: space-between; }

.btn {
  border: 0;
  border-radius: 17px;
  min-height: 56px;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: -.01em;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease, background 160ms ease;
}
.btn:active { transform: scale(.975); }
.btn:disabled { opacity: .42; cursor: not-allowed; }
.btn:focus-visible, .mode-card:focus-visible, .icon-btn:focus-visible, input:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 35px rgba(217,91,255,.24);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 18px 42px rgba(217,91,255,.32); }
.btn--ghost { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.btn--danger { background: rgba(255,79,101,.14); border: 1px solid rgba(255,79,101,.25); color: #ff9eaa; }
.btn--block { width: 100%; }

.input {
  width: 100%;
  min-height: 56px;
  border-radius: 17px;
  border: 1px solid rgba(255,255,255,.11);
  background: rgba(255,255,255,.055);
  color: var(--text);
  padding: 0 16px;
  outline: none;
  transition: border 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.input:focus { border-color: rgba(217,91,255,.7); box-shadow: 0 0 0 4px rgba(217,91,255,.12); background: rgba(255,255,255,.075); }

.player-list { display: grid; gap: 10px; }
.player-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 15px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.07);
}
.player-chip__index {
  width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(217,91,255,.16); color: #f1c7ff; font-weight: 900;
}
.icon-btn { border: 0; background: transparent; color: #c9bfce; cursor: pointer; font-size: 22px; }

.mode-grid { display: grid; gap: 13px; }
.mode-card {
  position: relative;
  text-align: left;
  width: 100%;
  padding: 20px;
  border-radius: 21px;
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(135deg, rgba(255,255,255,.075), rgba(255,255,255,.035));
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
  overflow: hidden;
}
.mode-card::after {
  content: "";
  position: absolute;
  width: 120px; height: 120px; border-radius: 50%;
  right: -46px; bottom: -60px;
  background: radial-gradient(circle, rgba(217,91,255,.28), transparent 68%);
}
.mode-card:hover, .mode-card.is-selected { transform: translateY(-2px); border-color: rgba(217,91,255,.62); background: linear-gradient(135deg, rgba(217,91,255,.14), rgba(255,71,126,.08)); }
.mode-card.is-coming-soon { cursor: default; opacity: .76; }
.mode-card.is-coming-soon:hover { transform: none; border-color: rgba(255,255,255,.08); }
.mode-card p { margin: 6px 0 0; color: var(--muted); line-height: 1.45; }
.mode-meta { margin-top: 12px; font-size: 12px; color: #d8cde0; }
.mode-status {
  position: absolute;
  right: 16px;
  top: 15px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.mode-status--available { color: #9cf0bf; background: rgba(78,214,138,.1); }
.mode-status--soon { color: #d8cde0; background: rgba(255,255,255,.055); }

.intensity-wrap { padding: 30px 4px 8px; }
.intensity-name { text-align: center; font-size: 35px; font-weight: 900; margin: 18px 0 28px; letter-spacing: -.04em; }
.range {
  width: 100%;
  appearance: none;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #35d07f 0%, #f0d447 34%, #ff9348 67%, #ff405f 100%);
  outline: none;
  box-shadow: 0 0 30px rgba(255,64,95,.16);
}
.range::-webkit-slider-thumb {
  appearance: none;
  width: 30px; height: 30px; border-radius: 50%;
  background: #fff;
  border: 6px solid rgba(19,12,26,.92);
  box-shadow: 0 6px 22px rgba(0,0,0,.45);
}
.range-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; color: #bfb3c7; font-size: 11px; text-align: center; }

.check-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px;
  border-radius: 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.075);
  cursor: pointer;
}
.check-card input { width: 20px; height: 20px; accent-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  #ambient-canvas, .ambient-glow { display: none; }
  .screen { animation: none; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 18px; }
.summary-item { padding: 12px 10px; text-align: center; border-radius: 15px; background: rgba(255,255,255,.05); }
.summary-item strong { display: block; font-size: 14px; }
.summary-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }

.pass-card, .challenge-card { text-align: center; padding: 34px 22px; }
.pass-name { font-size: clamp(46px, 14vw, 76px); font-weight: 950; letter-spacing: -.06em; margin: 20px 0; text-transform: uppercase; }
.challenge-type { color: #f0b8ff; font-size: 12px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.challenge-text { font-size: clamp(25px, 7vw, 38px); line-height: 1.18; letter-spacing: -.035em; margin: 26px 0 32px; }
.challenge-block {
  min-height: 38px;
  padding: 7px 12px;
  border: 0;
  background: transparent;
  color: #918799;
  font-size: 12px;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}
.challenge-block:hover { color: #d7cbdc; background: rgba(255,255,255,.035); border-radius: 12px; }
.round-indicator { color: var(--muted); font-size: 13px; }
.round-indicator b { color: #dca8ec; margin: 0 4px; }

.round-intro {
  position: relative;
  isolation: isolate;
}
.round-intro__halo {
  position: absolute;
  z-index: -1;
  width: min(84vw, 490px);
  height: min(84vw, 490px);
  inset: 50% auto auto 50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217,91,255,.25), rgba(255,71,126,.08) 42%, transparent 70%);
  filter: blur(24px);
  transform: translate(-50%, -50%);
  animation: roundHalo 3.8s ease-in-out infinite alternate;
}
.round-intro__card {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 8vw, 48px) 24px;
  border-color: rgba(217,91,255,.24);
  background:
    radial-gradient(circle at 50% -15%, rgba(217,91,255,.2), transparent 43%),
    linear-gradient(180deg, rgba(31,20,42,.94), rgba(15,9,22,.92));
}
.round-intro__card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 28%, rgba(255,255,255,.055) 48%, transparent 68%);
  transform: translateX(-120%);
  animation: roundSweep 3.4s ease-in-out infinite;
}
.round-intro__mark {
  width: 64px;
  height: 64px;
  margin: 12px auto 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 22px;
  color: #f4c8ff;
  background: rgba(217,91,255,.13);
  box-shadow: 0 14px 42px rgba(217,91,255,.18);
  font-size: 25px;
}
.round-intro__card h1 {
  margin-bottom: 22px;
  font-size: clamp(34px, 9vw, 52px);
}
.round-intro__message {
  max-width: 450px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}
.round-intro__message p { margin-bottom: 8px; }
.round-intro--intensify .round-intro__halo { background: radial-gradient(circle, rgba(255,71,126,.3), rgba(255,137,71,.09) 45%, transparent 70%); }
.round-intro--intensify .round-intro__mark { color: #ffc1d4; background: rgba(255,71,126,.14); }
.round-intro--remix .round-intro__halo { background: radial-gradient(circle, rgba(100,118,255,.27), rgba(217,91,255,.08) 45%, transparent 70%); }
.round-intro--remix .round-intro__mark { color: #cdd2ff; background: rgba(100,118,255,.14); }
.round-intro--cooldown .round-intro__halo { background: radial-gradient(circle, rgba(78,214,138,.22), rgba(61,160,214,.07) 45%, transparent 70%); }
.round-intro--cooldown .round-intro__mark { color: #bdf5d5; background: rgba(78,214,138,.11); }
@keyframes roundHalo {
  from { opacity: .72; transform: translate(-50%, -50%) scale(.92); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}
@keyframes roundSweep {
  0%, 35% { transform: translateX(-120%); }
  70%, 100% { transform: translateX(120%); }
}

.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.kebab { width: 46px; height: 46px; border-radius: 15px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.05); cursor: pointer; }

.screen--game { align-self: center; }

.scoreboard-compact { margin-bottom: 14px; }
.current-intensity {
  --intensity-color: #77dfa4;
  --intensity-rgb: 119, 223, 164;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(var(--intensity-rgb), .28);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(var(--intensity-rgb), .14), rgba(20, 14, 27, .84));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 8px 24px rgba(0,0,0,.14);
  transition: border-color 220ms ease, background 220ms ease, color 220ms ease;
}
.current-intensity--animated { --intensity-color: #ffd166; --intensity-rgb: 255, 209, 102; }
.current-intensity--shameless { --intensity-color: #ef72ff; --intensity-rgb: 239, 114, 255; }
.current-intensity--no-limits { --intensity-color: #ff704f; --intensity-rgb: 255, 112, 79; }
.current-intensity__label {
  color: #aa9daf;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .15em;
}
.current-intensity__value {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--intensity-color);
  font-size: 13px;
  letter-spacing: .055em;
  white-space: nowrap;
}
.current-intensity__value > span { font-size: 17px; line-height: 1; }
.active-mission {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(217, 91, 255, .24);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(108, 40, 137, .22), rgba(31, 18, 43, .8));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 8px 24px rgba(0,0,0,.16);
}
.active-mission__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: #f2bdff;
  background: rgba(217, 91, 255, .14);
  box-shadow: 0 0 18px rgba(217, 91, 255, .14);
}
.active-mission__copy { display: flex; min-width: 0; flex-direction: column; gap: 1px; }
.active-mission__copy strong { color: #eecdf7; font-size: 9px; letter-spacing: .14em; }
.active-mission__copy small { color: #a99aae; font-size: 11px; }
.active-mission__count { color: #f7eafa; font-size: 11px; font-weight: 800; white-space: nowrap; }
.active-rule {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 190, 79, .26);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(142, 87, 20, .22), rgba(42, 27, 17, .82));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 8px 24px rgba(0,0,0,.16);
}
.active-rule__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: #ffd88d;
  background: rgba(255, 190, 79, .13);
  box-shadow: 0 0 18px rgba(255, 190, 79, .12);
}
.active-rule__copy { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.active-rule__copy strong { color: #ffe2ac; font-size: 9px; letter-spacing: .13em; }
.active-rule__copy small { color: #cbbba7; font-size: 11px; line-height: 1.35; }
.mission-card { border-color: rgba(217, 91, 255, .24); }
.mission-card--active { box-shadow: 0 18px 52px rgba(129, 43, 159, .2); }
.mission-card--reveal { border-color: rgba(255, 191, 94, .3); }
.mission-card--complete { border-color: rgba(116, 229, 169, .28); }
.rule-card { border-color: rgba(255, 190, 79, .26); }
.rule-card--active { box-shadow: 0 18px 52px rgba(142, 87, 20, .2); }
.rule-card--resolution { border-color: rgba(255, 190, 79, .34); }
.rule-card--complete { border-color: rgba(116, 229, 169, .28); }
.rule-card--ended { border-color: rgba(255, 190, 79, .34); }
.rule-player-options { margin: 18px 0; }
.rule-choice { width: 100%; cursor: pointer; color: var(--text); text-align: left; }
.rule-choice.is-selected {
  border-color: rgba(255, 190, 79, .56);
  background: rgba(255, 190, 79, .13);
  box-shadow: 0 0 0 1px rgba(255, 190, 79, .1) inset;
}
.rule-penalties { margin: 18px 0 22px; text-align: left; }
.rule-penalties ul { margin: 10px 0 0; padding-left: 20px; color: #dbcfc4; }
.rule-penalties li + li { margin-top: 7px; }
.scoreboard-mini {
  width: 100%;
  display: grid;
  gap: 11px;
  padding: 13px 14px 14px;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 0%, rgba(217,91,255,.13), transparent 42%),
    linear-gradient(135deg, rgba(28,18,37,.9), rgba(16,10,23,.86));
  box-shadow: 0 14px 38px rgba(0,0,0,.26);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.scoreboard-mini:hover { transform: translateY(-1px); border-color: rgba(217,91,255,.34); }
.scoreboard-mini:active { transform: scale(.99); }
.scoreboard-mini__header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.scoreboard-mini__title { color: #cdbed5; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.scoreboard-mini__expand { color: #dca8ec; font-size: 11px; font-weight: 800; }
.scoreboard-mini__podium {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(var(--scoreboard-count), minmax(0, 1fr));
  gap: 8px;
}
.scoreboard-mini__player {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 13px;
  background: rgba(255,255,255,.038);
}
.scoreboard-mini__player--1 {
  border-color: rgba(255,206,88,.18);
  background: linear-gradient(135deg, rgba(255,206,88,.09), rgba(255,255,255,.035));
}
.scoreboard-mini__medal { font-size: 20px; line-height: 1; filter: drop-shadow(0 3px 7px rgba(0,0,0,.32)); }
.scoreboard-mini__details { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.scoreboard-mini__name {
  min-width: 0;
  overflow: hidden;
  color: #e6dfe9;
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scoreboard-mini__score { flex: 0 0 auto; font-size: 12px; }

.is-positive { color: var(--success); }
.is-negative { color: #ff8292; }

.modal-backdrop.scoreboard-backdrop { place-items: center; }
.scoreboard-modal {
  width: min(100%, 560px);
  max-height: min(86vh, 680px);
  display: grid;
  gap: 20px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% -10%, rgba(217,91,255,.18), transparent 38%),
    linear-gradient(180deg, #1c1225, #120c19);
}
.scoreboard-modal__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.scoreboard-modal__header h3 { margin: 0; font-size: 26px; }
.scoreboard-modal__close {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
}

.scoreboard-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  padding-top: 10px;
}
.scoreboard-podium__player {
  min-width: 0;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  padding: 14px 9px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 18px;
  background: rgba(255,255,255,.045);
}
.scoreboard-podium__player--1 {
  order: 2;
  min-height: 142px;
  border-color: rgba(255,205,79,.27);
  background: linear-gradient(180deg, rgba(255,205,79,.13), rgba(255,255,255,.045));
  box-shadow: 0 16px 38px rgba(255,187,44,.08);
}
.scoreboard-podium__player--2 {
  order: 1;
  border-color: rgba(208,218,231,.18);
  background: linear-gradient(180deg, rgba(208,218,231,.09), rgba(255,255,255,.04));
}
.scoreboard-podium__player--3 {
  order: 3;
  border-color: rgba(222,143,90,.2);
  background: linear-gradient(180deg, rgba(222,143,90,.1), rgba(255,255,255,.04));
}
.scoreboard-podium__medal { font-size: 32px; line-height: 1; filter: drop-shadow(0 5px 9px rgba(0,0,0,.35)); }
.scoreboard-podium__player--1 .scoreboard-podium__medal { font-size: 39px; }
.scoreboard-podium__name {
  max-width: 100%;
  overflow: hidden;
  color: #f4eef6;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scoreboard-podium__score { font-size: 24px; font-weight: 950; }

.scoreboard-rest { display: grid; gap: 9px; }
.scoreboard-rest__title { margin: 0; color: #a99db1; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.scoreboard-list { min-height: 0; display: grid; gap: 8px; }
.scoreboard-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}
.scoreboard-row__rank {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #cdbed5;
  background: rgba(255,255,255,.055);
  font-size: 12px;
  font-weight: 900;
}
.scoreboard-row__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scoreboard-row__score { min-width: 42px; text-align: right; font-size: 18px; font-weight: 950; }
.scoreboard-modal__hint { margin: 0; }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 20; background: rgba(3,2,5,.72); backdrop-filter: blur(10px);
  display: grid; place-items: end center;
  padding:
    calc(18px + env(safe-area-inset-top))
    calc(18px + env(safe-area-inset-right))
    calc(18px + env(safe-area-inset-bottom))
    calc(18px + env(safe-area-inset-left));
  animation: fadeIn 180ms ease both;
}
.modal { width: min(100%, 620px); background: #17101f; border: 1px solid var(--line); border-radius: 26px; padding: 22px; box-shadow: var(--shadow); animation: sheetIn 260ms cubic-bezier(.2,.8,.2,1) both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetIn { from { transform: translateY(35px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.countdown { font-size: min(40vw, 180px); font-weight: 950; text-align: center; text-shadow: 0 0 50px rgba(217,91,255,.55); animation: pulseCount 800ms ease both; }
@keyframes pulseCount { 0% { transform: scale(.5); opacity: 0; } 45% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }

.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 30;
  transform: translateX(-50%); background: rgba(30,20,39,.96); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow); animation: toastIn 240ms ease both;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }

.local-save-note { margin: 22px 0 0; }
.interrupted-session {
  margin-top: 20px;
  text-align: left;
  border-color: rgba(217,91,255,.24);
  background:
    radial-gradient(circle at 100% 0%, rgba(217,91,255,.15), transparent 42%),
    linear-gradient(180deg, rgba(35,23,46,.9), rgba(17,11,24,.86));
}
.interrupted-session h3 { font-size: 23px; }
.interrupted-session .lead { margin-bottom: 16px; }
.interrupted-session--warning {
  border-color: rgba(255,184,77,.22);
  background: linear-gradient(180deg, rgba(50,34,24,.86), rgba(24,16,15,.82));
}

.night-report {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  text-align: left;
}
.night-report__metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}
.night-report__metrics div,
.night-report__section {
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 15px;
  background: rgba(255,255,255,.04);
}
.night-report__metrics div {
  min-width: 0;
  padding: 11px 5px;
  text-align: center;
}
.night-report__metrics strong { display: block; font-size: 19px; }
.night-report__metrics span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.night-report__section { padding: 13px 15px; }
.night-report__section > span {
  color: #a99db1;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .16em;
}
.night-report__section strong { display: block; margin-top: 6px; font-size: 23px; }
.night-report__section p { margin: 6px 0 0; color: #e1d8e6; line-height: 1.45; }

.small { font-size: 13px; color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }

@media (min-width: 720px) {
  .app-shell { padding-inline: 0; }
  .panel { padding: 28px; }
  .mode-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .night-report__metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .current-intensity { padding: 8px 10px; }
  .current-intensity__label { font-size: 8px; }
  .current-intensity__value { font-size: 11px; }
  .scoreboard-mini { padding: 11px; }
  .scoreboard-mini__podium { gap: 5px; }
  .scoreboard-mini__player { grid-template-columns: 1fr; justify-items: center; gap: 4px; padding: 7px 5px; }
  .scoreboard-mini__medal { font-size: 18px; }
  .scoreboard-mini__details { width: 100%; flex-direction: column; gap: 2px; }
  .scoreboard-mini__name { font-size: 10px; }
  .scoreboard-mini__score { font-size: 11px; }
  .scoreboard-modal { gap: 16px; padding: 19px; }
  .scoreboard-podium { gap: 6px; }
  .scoreboard-podium__player { min-height: 106px; padding: 12px 6px; }
  .scoreboard-podium__player--1 { min-height: 128px; }
  .scoreboard-podium__medal { font-size: 27px; }
  .scoreboard-podium__player--1 .scoreboard-podium__medal { font-size: 33px; }
  .scoreboard-podium__name { font-size: 12px; }
  .scoreboard-podium__score { font-size: 20px; }
}

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

.dev-test-badge {
  position: fixed;
  z-index: 30;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 12px;
  border: 1px solid rgba(255, 183, 72, .35);
  border-radius: 999px;
  background: rgba(31, 19, 12, .92);
  color: #ffd18a;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
  box-shadow: 0 10px 35px rgba(0, 0, 0, .35);
}

.content-update-banner {
  position: fixed;
  z-index: 28;
  top: calc(14px + env(safe-area-inset-top));
  right: calc(14px + env(safe-area-inset-right));
  width: min(520px, calc(100vw - 28px));
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(214, 114, 255, .35);
  border-radius: 14px;
  background: rgba(24, 14, 30, .96);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .45);
}

.content-update-banner div { display: grid; gap: 3px; }
.content-update-banner span { color: var(--muted); font-size: 12px; }

@media (max-width: 720px) {
  .content-update-banner { grid-template-columns: 1fr; }
}

.pwa-update-note {
  position: fixed;
  z-index: 19;
  top: calc(12px + env(safe-area-inset-top));
  left: calc(12px + env(safe-area-inset-left));
  right: calc(12px + env(safe-area-inset-right));
  width: min(560px, calc(100% - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  margin: 0 auto;
  padding: 10px 14px;
  border: 1px solid rgba(217, 91, 255, .24);
  border-radius: 14px;
  background: rgba(24, 14, 30, .94);
  color: #ded5e3;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .32);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.pwa-update-modal h2 { margin-bottom: 22px; }

.is-standalone body { overscroll-behavior-y: none; }

.about-hero {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 26px;
  text-align: center;
}

.about-hero h1 { margin: 0; letter-spacing: .16em; }
.about-hero .logo-mark { width: 58px; height: 58px; font-size: 30px; }
.about-section { display: grid; gap: 14px; margin-top: 28px; }
.about-summary h2 { margin: 4px 0 18px; }

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

.about-facts div,
.about-credits dl div { min-width: 0; }
.about-facts dt,
.about-credits dt { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.about-facts dd,
.about-credits dd { margin: 4px 0 0; overflow-wrap: anywhere; }

.technical-details {
  margin: 8px 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .025);
}

.technical-details summary { cursor: pointer; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.about-facts--technical { grid-template-columns: 1fr; margin: 18px 0 0; }
.release-list { display: grid; gap: 12px; }

.release-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .035);
}

.release-card__heading { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.release-card__heading strong { color: #f0d7ff; }
.release-card h3 { margin: 10px 0; }
.release-card ul { display: grid; gap: 6px; margin: 0; padding-left: 20px; color: #d9d0dd; }
.about-credits dl { display: grid; gap: 16px; margin: 16px 0 22px; }
.about-comparison { padding: 18px; border: 1px solid rgba(214, 114, 255, .24); border-radius: 18px; }
.about-status { margin: 6px 0 0; color: #f0d7ff; font-weight: 800; }

@media (max-width: 420px) {
  .about-facts { grid-template-columns: 1fr; }
  .release-card__heading { align-items: flex-start; flex-direction: column; gap: 4px; }
}

.consent-card,
.flow-card,
.flow-timer-card,
.flow-countdown-card,
.flow-time-up,
.consequence-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(205, 130, 255, .28);
  box-shadow: 0 22px 70px rgba(81, 20, 111, .24), inset 0 1px rgba(255, 255, 255, .035);
}

.consent-card::before,
.flow-card::before,
.consequence-card::before {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  top: -115px;
  right: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 114, 255, .2), transparent 70%);
  pointer-events: none;
}

.consent-category {
  margin: 18px 0 10px;
  padding: 11px 14px;
  border: 1px solid rgba(214, 114, 255, .25);
  border-radius: 12px;
  background: rgba(214, 114, 255, .07);
  color: #f3dcff;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.flow-timer {
  margin: 14px 0;
  font-size: clamp(84px, 28vw, 150px);
  font-weight: 900;
  line-height: .9;
  color: #fff;
  text-shadow: 0 0 42px rgba(214, 114, 255, .48);
  font-variant-numeric: tabular-nums;
}

.flow-timer-bar {
  height: 8px;
  margin: 24px 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}

.flow-timer-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #53d69a, #ffc04a, #ff557c);
  box-shadow: 0 0 18px rgba(255, 92, 141, .35);
  transition: width .1s linear;
}

.flow-options { margin: 20px 0; }

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

.consequence-card h2 { margin: 16px 0 24px; }

@media (max-width: 520px) {
  .player-choice-grid { grid-template-columns: 1fr; }
}
