*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  color-scheme: dark;

  /* SpecOps design tokens — neon palette */
  --bg: #0A0A0F;
  --bg-deep: #05050A;
  --card: #12121A;
  --elevated: #1A1A25;
  --elevated-2: #22222E;
  --hairline: rgba(255,255,255,0.06);
  --hairline-strong: rgba(255,255,255,0.12);

  --alive: #00FF88;
  --alive-dim: #00CC6A;
  --alive-glow: rgba(0,255,136,0.18);
  --danger: #FF3344;
  --danger-dim: #CC2233;
  --danger-glow: rgba(255,51,68,0.22);
  --warning: #FFB800;
  --henchman: #B98CFF;
  --henchman-dim: #8A65C9;
  --henchman-glow: rgba(185,140,255,0.20);

  --text: #F0F0F5;
  --text-2: #8888A0;
  --text-3: #7A7A98; /* lifted from #55556A (2.7:1 on --bg) — now ~4.76:1, AA-compliant for small mono labels, still visibly dimmer than --text-2's ~5.71:1 */

  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-ser: 'Instrument Serif', Georgia, serif;

  /* Back-compat aliases — keep existing CSS working while we port screens */
  --bg-card: var(--card);
  --bg-elevated: var(--elevated);
  --bg-danger: #2A0A0A;
  --accent: var(--alive);
  --accent-dim: var(--alive-dim);
  --text-primary: var(--text);
  --text-secondary: var(--text-2);
  --text-muted: var(--text-3);
  --border: var(--hairline-strong);
  --border-active: rgba(0,255,136,0.27);

  /* Radius language: this app is sharp/military, not soft-rounded.
     All three tokens resolve to the same 2px on purpose — kept as
     three names (not one) so any future deliberate divergence has
     somewhere to live, without inviting raw-px radii on new chrome. */
  --radius-sm: 2px;
  --radius-md: 2px;
  --radius-lg: 2px;

  /* Type scale */
  --text-2xs: 9px;
  --text-xs: 10px;
  --text-sm: 11px;
  --text-base: 13px;
  --text-md: 14px;
  --text-lg: 16px;
  --text-xl: 20px;

  /* Spacing scale — 4px steps */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
}

/* ── Design tokens: how to use ────────────────────────────────────
   Type scale (--text-2xs … --text-xl) — reach for these on any new
   UI text instead of a raw px font-size:
     2xs  9px   nav labels, tiniest meta
     xs   10px  mono tags, chips, badges
     sm   11px  topbar sub, secondary mono labels
     base 13px  button labels, default body copy
     md   14px  secondary body copy
     lg   16px  inputs, larger body copy
     xl   20px  Mission-tier text — the non-negotiable ≥20px floor
   Sizes above --text-xl (hero numerals, victory headline, the
   spectator counter) are intentionally bespoke/art-directed — don't
   force those onto this scale.

   Spacing scale (--space-1 … --space-8, 4px steps up to 40px) —
   use for padding/margin/gap on new rules. Some existing values sit
   at odd, non-scale numbers (3/6/10/14/18/22/28/60px etc.); those
   were left alone rather than nudged to the nearest token, since
   that would shift layout. Snap new code to the scale.

   Radius — --radius-sm/md/lg are all 2px. This app's identity is
   the sharp military-stencil corner, not soft rounding: don't reach
   for a raw px radius on new buttons/inputs/cards/modals, use one
   of the tokens (any of them — they're deliberately identical).
   Avatars are the one deliberate exception (they read as photo
   tiles, not UI chrome) and keep their own hand-picked rounding.
   ──────────────────────────────────────────────────────────────── */

/* Henchman chrome — swap alive → henchman purple */
[data-henchman] {
  --alive: var(--henchman);
  --alive-dim: var(--henchman-dim);
  --alive-glow: var(--henchman-glow);
  --accent: var(--henchman);
  --accent-dim: var(--henchman-dim);
  --border-active: rgba(185,140,255,0.27);
}

body {
  background: var(--bg);
  min-height: 100dvh;
  font-family: var(--font-display);
  color: var(--text-primary);
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes breathe { 0%,100% { box-shadow: 0 0 20px rgba(0,255,136,.08); } 50% { box-shadow: 0 0 44px rgba(0,255,136,.22); } }
@keyframes scanLine { 0% { top: 0; } 100% { top: 100%; } }
@keyframes glitchShake { 0%,100%{transform:translate(0)} 20%{transform:translate(-2px,2px)} 40%{transform:translate(2px,-2px)} 60%{transform:translate(-1px,-1px)} 80%{transform:translate(1px,1px)} }
@keyframes countPop { from { opacity:0; transform:scale(.5); } to { opacity:1; transform:scale(1); } }
@keyframes slideDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
@keyframes killFlash { 0% { background: rgba(255,51,68,.12); } 100% { background: rgba(255,51,68,.03); } }
@keyframes so-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.85); } }
@keyframes so-breathe { 0%,100% { opacity: .85; } 50% { opacity: 1; } }
@keyframes so-slide-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes so-glitch {
  0%,100% { transform: translate(0); }
  20% { transform: translate(-1px,1px); }
  40% { transform: translate(1px,-1px); }
  60% { transform: translate(-1px,-1px); }
  80% { transform: translate(1px,1px); }
}

.anim-fadeInUp { animation: fadeInUp .45s ease both; }
.anim-fadeIn   { animation: fadeIn .4s ease both; }

/* --- SPECOPS SCREEN BASE (applies to every screen container) --- */
.so-screen {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.so-screen::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 120% 60% at 50% -10%, rgba(255,255,255,0.04), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(255,255,255,0.008) 2px 3px);
  pointer-events: none;
  z-index: 0;
}
/* Henchman purple diagonal stripes over every screen */
[data-henchman] .so-screen::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    135deg,
    transparent 0 22px,
    rgba(185,140,255,0.035) 22px 23px
  );
  pointer-events: none;
  z-index: 1;
}
.so-screen > * { position: relative; z-index: 2; }

/* --- ATOMS --- */
.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.mono-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-3);
}
.display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hairline { border-top: 1px solid var(--hairline); }

.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--alive);
  box-shadow: 0 0 12px var(--alive-glow);
  display: inline-block;
}
.dot.pulse { animation: so-pulse 1.6s ease-in-out infinite; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: var(--space-1) var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs); font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  border: 1px solid var(--hairline-strong);
  color: var(--text-2);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
}
.chip--alive, .chip.alive { color: var(--alive); border-color: var(--alive); }
.chip--danger, .chip.danger { color: var(--danger); border-color: var(--danger); }
.chip--henchman { color: var(--henchman); border-color: var(--henchman); }

/* --- PHONE SHELL (per design: no bezel, just the screen) --- */
.phone {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  flex: 1;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column;
}
/* Host screens (lobby, dashboard, create) often run on a laptop or TV-mirror
   off a phone. Allow the shell to grow on wider viewports — mobile is
   unaffected since 430px > the typical phone viewport. */
.phone--host-wide {
  max-width: min(820px, 100vw);
}
.phone {
  /* Always reserve space at the edges so content doesn't slide under the
     notch, status-bar, gesture bar, or home indicator. iOS reports real
     insets via env(); Android Chrome usually reports 0 even when the gesture
     bar is overlapping the bottom, so the floor of 18px guarantees primary
     buttons never sit flush against a system-bar edge. */
  padding-top: max(env(safe-area-inset-top, 0px), var(--space-2));
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 18px);
}
.phone__content {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column;
  position: relative; z-index: 2;
}
/* Hide scrollbars inside the mobile phone frame — overlay scroll only. */
.phone, .phone * { scrollbar-width: none; }
.phone::-webkit-scrollbar, .phone *::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* Identity badge — top-center chip on player screens for multi-phone testing */
.identity-badge {
  position: fixed;
  top: env(safe-area-inset-top, 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--alive);
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--alive);
  pointer-events: none;
  z-index: 100;
}
[data-henchman] .identity-badge { color: var(--henchman); border-color: var(--henchman); }

/* Logo badge — persistent brand mark + tap-to-home affordance, top-left
   on every screen except the about/landing (it IS the home) and the
   spectator/TV view (which has its own giant SpecOps header). */
.logo-badge {
  position: fixed;
  top: max(env(safe-area-inset-top, 0px), 8px);
  left: max(env(safe-area-inset-left, 0px), 10px);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--alive);
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--alive);
  border-radius: 0;
  cursor: pointer;
  z-index: 100;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.logo-badge:active { transform: scale(0.96); }
[data-henchman] .logo-badge { color: var(--henchman); border-color: var(--henchman); }

/* --- SHARED COMPONENTS --- */
.topbar {
  padding: var(--space-2) var(--space-5) var(--space-3);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.topbar__left { display: flex; align-items: center; gap: var(--space-3); }
.topbar__back {
  background: none; border: none; color: var(--text-secondary);
  font-size: 20px; cursor: pointer; padding: 4px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: opacity .15s, transform .15s;
}
.topbar__back:active { opacity: .6; transform: scale(0.92); }
.topbar__title { font-size: 18px; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.topbar__sub { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--text-muted); letter-spacing: .05em; }

.btn {
  width: 100%; padding: 18px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--alive); color: #000;
  font-family: var(--font-mono);
  font-size: var(--text-base); font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer; transition: all .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:not(:disabled):active { transform: scale(0.97); filter: brightness(0.9); }
.btn--primary { background: var(--alive); color: #000; }
.btn--secondary,
.btn--ghost,
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--hairline-strong); }
.btn--danger,
.btn.danger { background: var(--danger); color: var(--bg); }
.btn--henchman { background: var(--henchman); color: #0A0A0F; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn--lg { height: 56px; font-size: var(--text-lg); }

.input {
  width: 100%; padding: var(--space-4) 18px;
  border-radius: var(--radius-sm);
  background: var(--elevated); border: 1px solid var(--hairline-strong);
  color: var(--text); font-family: var(--font-display); font-size: var(--text-lg);
  outline: none; transition: border-color .15s;
}
.input:focus { border-color: var(--alive); }
.input--mono { font-family: var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; }

/* --- ACCESSIBILITY: keyboard focus --- */
/* .input sets outline:none above for the mouse/touch case (the border-color
   swap on :focus is the visible cue there); this restores a real outline
   whenever focus arrives via keyboard (or any non-pointer means), on inputs
   and everything else alike. Higher specificity than `.input { outline:
   none }` so it wins regardless of source order. */
:focus-visible {
  outline: 2px solid var(--alive);
  outline-offset: 2px;
}
.input:focus-visible {
  outline: 2px solid var(--alive);
  outline-offset: 2px;
}

.label {
  font-family: var(--font-mono); font-size: var(--text-sm); color: var(--text-3);
  text-transform: uppercase; letter-spacing: .12em;
}

.badge {
  display: inline-flex; align-items: center; padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  border: 1px solid transparent;
}
.badge--accent  { color: var(--alive);    border-color: var(--alive);    background: rgba(0,255,136,.04); }
.badge--danger  { color: var(--danger);   border-color: var(--danger);   background: rgba(255,51,68,.04); }
.badge--warning { color: var(--warning);  border-color: var(--warning);  background: rgba(255,184,0,.04); }
.badge--muted   { color: var(--text-2);   border-color: var(--hairline-strong); background: rgba(255,255,255,.02); }
.badge--henchman{ color: var(--henchman); border-color: var(--henchman); background: rgba(185,140,255,.04); }

/* --- BOTTOM NAV --- */
.bottomnav,
.nav {
  display: flex;
  border-top: 1px solid var(--hairline-strong);
  background: var(--bg);
  padding: var(--space-2) 0 28px;
  position: relative; z-index: 2;
  flex-shrink: 0;
}
.bottomnav__item,
.nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: var(--space-2) var(--space-1);
  background: none; border: none;
  font-family: var(--font-mono);
  font-size: var(--text-2xs); font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-3);
  cursor: pointer; position: relative;
  transition: color .15s, opacity .15s, transform .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.bottomnav__item:active,
.nav-item:active { opacity: .6; transform: scale(0.94); }
.bottomnav__item--active,
.nav-item.active { color: var(--alive); }
.bottomnav__item--active::before,
.nav-item.active::before {
  content: '';
  position: absolute; top: -8px; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 2px;
  background: var(--alive);
}
.bottomnav__icon { display: flex; align-items: center; justify-content: center; }
.bottomnav__label { font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: 0.18em; }

/* --- HELPER CLASSES --- */
.screen-pad { padding: 0 24px; }
.flex-col    { display: flex; flex-direction: column; }
.flex-1      { flex: 1; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-center { text-align: center; }
.gap-8  { gap: 8px;  } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; }
.gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.mt-auto  { margin-top: auto; }
.shrink-0 { flex-shrink: 0; }

/* --- SCREEN-SPECIFIC --- */

/* Only surviving piece of the old .dossier* block — still live, used by
   the henchman intel card (features/henchman/henchman.js). The rest of
   the block (.dossier, .dossier__corner, .dossier__header, .dossier__a)
   was an unreferenced fossil and has been removed. */
.dossier__q {
  font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted);
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: 5px;
}

.stats-row {
  margin: 12px 20px 0; padding: 14px var(--space-5); border-radius: var(--radius-md);
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; justify-content: space-around;
}
.stats-row__item { text-align: center; }
.stats-row__value { font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.stats-row__label {
  font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--text-muted);
  letter-spacing: .08em; text-transform: uppercase;
}

.avatar {
  /* 12px is a deliberate exception to the sharp radius language — avatars
     read as rounded photo/initials tiles, not UI chrome. */
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.avatar--sm { width: 36px; height: 36px; border-radius: 10px; font-size: var(--text-md); }

/* --- HOST SHELL --- */
.host-shell {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: var(--space-6) 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Warn box */
.warn-box {
  font-family: var(--font-display); font-size: var(--text-md); color: var(--text-secondary);
  line-height: 1.5; padding: var(--space-3) var(--space-4); border-radius: 12px;
  background: rgba(0,255,136,.03); border: 1px solid rgba(0,255,136,.06);
}

/* Link button */
.link-btn {
  background: none; border: none; color: var(--text-secondary);
  font-family: var(--font-display); font-size: var(--text-md); cursor: pointer;
  margin-top: 16px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: opacity .15s;
}
.link-btn:active { opacity: .6; }

/* Card */
.card {
  padding: 16px 20px; border-radius: var(--radius-md);
  background: var(--bg-card); border: 1px solid var(--border);
}

/* QR modal */
.qr-modal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, .75); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-6); animation: fadeIn .18s ease-out;
}
.qr-modal__card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-6);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  max-width: 400px; width: 100%;
}
.qr-modal__label {
  font-family: var(--font-mono); font-size: var(--text-sm); color: var(--text-muted);
  letter-spacing: .15em; text-transform: uppercase;
}
.qr-modal__canvas {
  background: #fff; border-radius: var(--radius-md); padding: var(--space-3);
  width: 100%; max-width: 320px; height: auto;
}
.qr-modal__code {
  font-family: var(--font-mono); font-size: 28px; font-weight: 700;
  color: var(--accent); letter-spacing: .2em;
}
.qr-modal__url {
  font-family: var(--font-mono); font-size: var(--text-sm); color: var(--text-muted);
  word-break: break-all; text-align: center;
}
.qr-modal__close {
  margin-top: 6px; width: 100%; height: 48px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-family: var(--font-display); font-size: var(--text-md); letter-spacing: .1em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: filter .15s, transform .15s;
}
.qr-modal__close:active { transform: scale(0.97); filter: brightness(0.92); }
.qr-modal__error {
  color: var(--danger); font-size: var(--text-base); text-align: center; padding: 20px;
}

/* ============================================================
   F5 motion & haptics — additive only. The design-tokens slice
   owns the layout/token rules above; nothing above this line is
   touched. This block wires the pre-existing killFlash /
   glitchShake / countPop keyframes (see the animations block
   near the top of this file) into the elimination moment, the
   phone-side counters/kill-feeds, and the guess-confirm trigger,
   plus adds a couple of small new keyframes for the victory beat
   and the trigger's armed/transmitting states. JS gates each of
   these behind prefers-reduced-motion before adding the class;
   the media query below is a defense-in-depth fallback.
   ============================================================ */

/* Elimination overlay: impact beat before the staggered reveal. */
.so-elim-flash {
  position: absolute; inset: 0; pointer-events: none; z-index: 5;
  animation: killFlash 0.5s ease-out both;
}
.so-elim-shake { animation: glitchShake 0.35s ease-out; }

/* Victory: headline gets its own beat, ahead of the stats/leaderboard reveal. */
@keyframes so-victory-title {
  from { opacity: 0; transform: scale(.9) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.so-victory-title { animation: so-victory-title 0.65s cubic-bezier(.19,1,.22,1) both; }

/* Counters: pop when the displayed value changes (field.js, host-dashboard.js). */
.so-count-pop { animation: countPop 0.3s ease-out; }

/* Kill feed: the newest row gets a red wash + slide as it lands. */
.so-feed-row-in { animation: killFlash 0.6s ease-out both, so-slide-in 0.3s ease both; }

/* Guess-confirm THE-moment trigger. */
.so-trigger-armed {
  box-shadow: 0 0 30px var(--danger), inset 0 0 24px rgba(255,51,68,.35);
}
.so-trigger-armed-handle {
  box-shadow: 0 0 44px var(--danger), 0 0 14px #fff inset !important;
}
.so-trigger-armed-pulse { animation: so-glitch 0.16s ease-in-out 2; }
.so-trigger-transmitting { animation: so-breathe 0.7s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .so-elim-flash,
  .so-elim-shake,
  .so-victory-title,
  .so-count-pop,
  .so-feed-row-in,
  .so-trigger-armed-pulse,
  .so-trigger-transmitting {
    animation: fadeIn 0.2s ease both !important;
  }
}

/* ============================================================
   F7 detail sweep — additive only, same rule as the F5 block above.
   ============================================================ */

/* CloseCall toast (components/close-call-toast.js). Sits above the bottom
   nav on every in-game screen; JS decides in/out animation classes itself
   (skips both under prefers-reduced-motion) rather than relying on the
   media-query override above, so there's nothing to list in it here. */
.so-toast {
  position: fixed;
  left: 50%;
  bottom: max(96px, calc(env(safe-area-inset-bottom, 0px) + 88px));
  transform: translateX(-50%);
  z-index: 500;
  width: min(92vw, 380px);
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--card);
  border: 1px solid var(--warning);
  box-shadow: 0 8px 28px rgba(0,0,0,0.45);
  opacity: 1;
}
.so-toast__mark {
  flex-shrink: 0;
  color: var(--warning);
  font-size: var(--text-sm);
  line-height: 1.4;
}
.so-toast__text {
  font-size: var(--text-base);
  color: var(--text);
  line-height: 1.4;
}
@keyframes so-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes so-toast-out {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(10px); }
}
.so-toast--in  { animation: so-toast-in 0.3s ease both; }
.so-toast--out { animation: so-toast-out 0.25s ease both; }
