@charset "UTF-8";

:root {
    --bg: #090a0f;
    --bg-soft: #10121a;
    --panel: rgba(22, 24, 35, .88);
    --panel-strong: #181b27;
    --line: rgba(255, 255, 255, .1);
    --text: #f6f7fb;
    --muted: #959cad;
    --brand: #7c5cff;
    --accent: #24e1b7;
    --danger: #ff5d73;
    --warning: #ffc857;
    --radius: 22px;
    --shadow: 0 30px 80px rgba(0, 0, 0, .34);
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 12% -10%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 34rem),
        radial-gradient(circle at 95% 100%, rgba(36, 225, 183, .08), transparent 32rem),
        var(--bg);
    -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

.topbar {
    width: min(1180px, calc(100% - 40px));
    min-height: 82px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .18em;
}
.brand-mark {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, rgba(124,92,255,.4), rgba(124,92,255,.08));
    letter-spacing: -.08em;
}
.brand-mark span { color: var(--accent); }
.text-link {
    color: #c6cbd7;
    text-underline-offset: 4px;
    text-decoration-color: rgba(255,255,255,.28);
    font-size: 14px;
}
.text-link:hover { color: #fff; }
.break-link { word-break: break-all; }
.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(150deg, rgba(29,32,46,.94), rgba(16,18,26,.94));
    box-shadow: var(--shadow);
}
.eyebrow, .section-label {
    margin-bottom: 14px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 5px rgba(36,225,183,.1), 0 0 20px rgba(36,225,183,.6);
    animation: pulse 1.8s infinite;
}

.button {
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 800;
    transition: transform .16s ease, filter .16s ease, opacity .16s ease, border-color .16s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); }
.button:active:not(:disabled) { transform: translateY(1px); }
.button:disabled { cursor: not-allowed; opacity: .5; }
.button.primary { color: #fff; background: linear-gradient(135deg, var(--brand), #5f42e8); box-shadow: 0 14px 32px color-mix(in srgb, var(--brand) 25%, transparent); }
.button.secondary { color: #ecedf5; border-color: var(--line); background: rgba(255,255,255,.045); }
.button.danger-button { color: #fff; background: linear-gradient(135deg, var(--danger), #d93857); }
.button.wide { width: 100%; }
.button.small { min-height: 40px; padding: 0 14px; font-size: 12px; }
.button.loading { color: transparent; position: relative; }
.button.loading::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
.text-button, .icon-button {
    min-height: 44px;
    border: 0;
    background: none;
    cursor: pointer;
    color: var(--muted);
}
.text-button:hover, .icon-button:hover { color: #fff; }
.danger-text:hover { color: var(--danger); }

/* Join */
.join-shell { min-height: 100vh; }
.hero-grid {
    width: min(1120px, calc(100% - 40px));
    min-height: calc(100vh - 120px);
    margin: 0 auto;
    padding: 60px 0 90px;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: clamp(50px, 8vw, 120px);
    align-items: center;
}
.hero-copy h1 {
    margin: 0 0 24px;
    font-size: clamp(68px, 9vw, 126px);
    line-height: .78;
    letter-spacing: -.075em;
    font-weight: 950;
}
.hero-copy h1 span {
    color: transparent;
    -webkit-text-stroke: 2px var(--brand);
    filter: drop-shadow(0 0 28px color-mix(in srgb, var(--brand) 25%, transparent));
}
.hero-lead { max-width: 560px; color: #c7cbd5; font-size: clamp(19px, 2vw, 25px); line-height: 1.45; }
.process-ribbon { margin-top: 40px; display: flex; align-items: center; gap: 11px; color: var(--muted); }
.process-ribbon span { padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.025); font-size: 12px; font-weight: 800; }
.process-ribbon b { color: var(--danger); }
.join-card { padding: clamp(24px, 4vw, 40px); }
.manuel-badge { margin-bottom: 32px; display: flex; align-items: center; gap: 12px; }
.manuel-badge > span {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--danger);
    border: 1px solid rgba(255,93,115,.3);
    background: rgba(255,93,115,.08);
    font-weight: 950;
}
.manuel-badge small, .manuel-badge strong { display: block; }
.manuel-badge small { margin-bottom: 3px; color: var(--danger); font-size: 8px; letter-spacing: .18em; font-weight: 900; }
.manuel-badge strong { font-size: 14px; }
.join-card h2 { margin-bottom: 8px; font-size: 30px; letter-spacing: -.035em; }
.join-card > p { color: var(--muted); line-height: 1.5; }
label { display: block; margin: 20px 0 8px; color: #bec3cf; font-size: 12px; font-weight: 800; }
input[type="text"], input[type="number"], input:not([type]) {
    width: 100%;
    min-height: 55px;
    padding: 0 15px;
    color: #fff;
    border: 1px solid rgba(255,255,255,.13);
    outline: 0;
    border-radius: 12px;
    background: rgba(0,0,0,.22);
    font-size: 16px;
    transition: border .15s, box-shadow .15s;
}
input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
#room-code { font-size: 24px; font-weight: 900; letter-spacing: .25em; }
.join-card form .button { margin-top: 24px; }
.form-message { min-height: 20px; margin: 12px 0 0; color: var(--danger); font-size: 13px; }
.privacy-note { margin: 18px 0 0 !important; color: #717887 !important; font-size: 11px; line-height: 1.5; }

/* Player app */
.player-page { background-attachment: fixed; }
.mobile-app { width: min(100%, 560px); min-height: 100vh; margin: auto; border-left: 1px solid rgba(255,255,255,.04); border-right: 1px solid rgba(255,255,255,.04); background: rgba(8,9,14,.55); }
.game-header {
    height: 70px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(9,10,15,.9);
    backdrop-filter: blur(16px);
}
.game-header .brand > span:last-child { display: none; }
.player-meta { display: flex; align-items: center; gap: 12px; }
.player-meta > strong { min-width: 56px; text-align: right; font-size: 18px; }
.connection { color: var(--accent); font-size: 9px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.connection::before { content: ""; width: 6px; height: 6px; margin-right: 5px; display: inline-block; border-radius: 50%; background: currentColor; }
.connection.offline { color: var(--warning); }
.round-progress { height: 3px; position: sticky; top: 70px; z-index: 21; background: rgba(255,255,255,.06); }
.round-progress span { height: 100%; width: 3%; display: block; background: linear-gradient(90deg, var(--brand), var(--accent)); box-shadow: 0 0 14px var(--brand); transition: width .7s ease; }
.player-stage { min-height: calc(100vh - 73px); padding: 25px 18px calc(115px + env(safe-area-inset-bottom)); }
.round-view > h1, .state-card h1, .referral-view h1, .mobile-leaderboard h1 {
    margin: 0 0 10px;
    font-size: clamp(31px, 9vw, 44px);
    line-height: 1.02;
    letter-spacing: -.045em;
}
.round-view > p, .state-card > p, .referral-view > p { color: var(--muted); line-height: 1.5; }
.round-kicker { margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; }
.round-kicker > span { color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .17em; }
.round-kicker > strong {
    width: 54px;
    height: 54px;
    border: 1px solid var(--line);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 20px;
    font-variant-numeric: tabular-nums;
}
.round-kicker > strong.urgent, .host-timer.urgent, .giant-timer.urgent { color: var(--danger); border-color: rgba(255,93,115,.5); animation: timerPulse .8s infinite; }
.mobile-process { margin: 28px 0; }
.process-node { min-height: 58px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; justify-content: center; background: rgba(255,255,255,.035); }
.process-node small { margin-bottom: 3px; color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.process-node strong { font-size: 14px; }
.transition-button { width: 100%; height: 55px; padding: 0; position: relative; border: 0; background: transparent; cursor: pointer; }
.transition-button b { position: absolute; right: 18px; top: 17px; color: #727989; }
.transition-line { width: 2px; height: 100%; margin: auto; display: block; background: linear-gradient(var(--line), rgba(255,255,255,.25), var(--line)); }
.transition-target {
    min-height: 31px;
    padding: 0 12px;
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 99px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    color: #7f8797;
    background: #0e1017;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    transition: .15s ease;
}
.transition-button.selected .transition-target { color: #fff; border-color: var(--danger); background: rgba(255,93,115,.16); box-shadow: 0 0 22px rgba(255,93,115,.16); }
.transition-button.selected .transition-target::before { content: "!"; margin-right: 7px; color: var(--danger); }
.sticky-submit {
    width: min(calc(100% - 36px), 524px);
    min-height: 78px;
    padding: 12px 13px 12px 18px;
    position: fixed;
    left: 50%;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 30;
    transform: translateX(-50%);
    border: 1px solid var(--line);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(20,22,31,.95);
    box-shadow: 0 20px 50px rgba(0,0,0,.45);
    backdrop-filter: blur(18px);
}
.sticky-submit > span { color: var(--muted); font-size: 12px; }
.sticky-submit > span b { color: #fff; }
.sticky-submit .button { min-width: 150px; }

.budget-meter { margin: 24px 0 18px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.03); display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.budget-meter > span { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.budget-meter > strong { font-size: 13px; }
.budget-meter > i { height: 5px; grid-column: 1 / -1; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,.07); }
.budget-meter > i u { width: 0; height: 100%; display: block; background: linear-gradient(90deg, var(--accent), var(--brand)); transition: width .25s ease; }
.solution-grid { display: grid; gap: 10px; }
.solution-card { min-height: 132px; padding: 18px 70px 16px 17px; position: relative; border: 1px solid var(--line); border-radius: 16px; text-align: left; background: rgba(255,255,255,.028); cursor: pointer; transition: border .15s, background .15s, transform .15s; }
.solution-card:hover { background: rgba(255,255,255,.045); }
.solution-card.selected { border-color: var(--accent); background: rgba(36,225,183,.075); transform: translateX(3px); }
.solution-card.risky.selected { border-color: var(--warning); background: rgba(255,200,87,.07); }
.solution-card > strong, .solution-card > span { display: block; }
.solution-card > strong { margin-bottom: 7px; font-size: 15px; }
.card-description { color: var(--muted); font-size: 12px; line-height: 1.45; }
.solution-card em { margin-top: 9px; display: block; color: var(--warning); font-size: 10px; font-style: normal; font-weight: 800; }
.card-cost { position: absolute; top: 17px; right: 15px; color: var(--accent); font-size: 18px; font-weight: 900; }
.card-cost small { font-size: 8px; }
.card-check { width: 25px; height: 25px; position: absolute; right: 17px; bottom: 16px; border: 1px solid var(--line); border-radius: 50%; display: grid !important; place-items: center; color: transparent; font-size: 11px; }
.solution-card.selected .card-check { color: #06130f; border-color: var(--accent); background: var(--accent); }
.shake { animation: shake .35s ease; }

.state-card { min-height: calc(100vh - 150px); padding: 30px 8px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.state-card h1 span { color: var(--accent); }
.pulse-orbit { width: 110px; height: 110px; margin-bottom: 34px; border: 1px solid rgba(124,92,255,.4); border-radius: 50%; display: grid; place-items: center; position: relative; box-shadow: 0 0 55px rgba(124,92,255,.12); }
.pulse-orbit::before, .pulse-orbit::after { content: ""; position: absolute; inset: -14px; border: 1px solid rgba(124,92,255,.15); border-radius: inherit; animation: orbit 6s linear infinite; }
.pulse-orbit::after { inset: 14px; border-color: rgba(36,225,183,.22); animation-direction: reverse; }
.pulse-orbit span { font-size: 36px; font-weight: 950; color: var(--danger); }
.waiting-line { margin-top: 30px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 99px; display: flex; align-items: center; gap: 10px; color: #b5bac6; background: rgba(255,255,255,.025); font-size: 12px; }
.waiting-line i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s infinite; }
.state-icon { min-width: 88px; height: 88px; margin-bottom: 30px; padding: 0 15px; border: 1px solid rgba(124,92,255,.38); border-radius: 25px; display: grid; place-items: center; color: var(--brand); background: rgba(124,92,255,.08); font-size: 30px; font-weight: 950; }
.state-icon.success { color: var(--accent); border-color: rgba(36,225,183,.35); background: rgba(36,225,183,.08); }
.state-icon.danger { color: var(--danger); border-color: rgba(255,93,115,.35); }
.state-icon small { font-size: 13px; }
.score-callout { width: 100%; margin-top: 25px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; display: flex; justify-content: space-between; align-items: center; }
.score-callout small { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.score-callout strong { font-size: 28px; }
.warning-strip { width: 100%; margin-top: 28px; padding: 18px; border: 1px solid rgba(255,200,87,.25); border-radius: 14px; color: var(--warning); background: rgba(255,200,87,.06); display: flex; align-items: center; gap: 12px; }

.chaos-card { min-height: calc(100vh - 135px); padding: 25px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.alarm { padding: 9px 14px; border: 1px solid rgba(255,93,115,.4); border-radius: 99px; color: var(--danger); background: rgba(255,93,115,.08); font-size: 9px; font-weight: 950; letter-spacing: .15em; }
.alarm span { width: 7px; height: 7px; margin-right: 7px; display: inline-block; border-radius: 50%; background: var(--danger); animation: pulse .6s infinite; }
.chaos-symbol { width: 110px; height: 110px; margin: 35px 0; border: 2px solid var(--danger); border-radius: 50%; display: grid; place-items: center; color: var(--danger); font-size: 58px; font-weight: 950; box-shadow: 0 0 50px rgba(255,93,115,.2); animation: glitch 2.2s infinite; }
.chaos-card h1 { max-width: 470px; margin-bottom: 24px; font-size: clamp(28px, 8vw, 42px); line-height: 1.08; letter-spacing: -.04em; }
.event-outcome { width: 100%; padding: 16px; border-radius: 14px; display: flex; flex-direction: column; gap: 3px; }
.event-outcome.protected { color: var(--accent); border: 1px solid rgba(36,225,183,.3); background: rgba(36,225,183,.07); }
.event-outcome.failed { color: var(--danger); border: 1px solid rgba(255,93,115,.3); background: rgba(255,93,115,.07); }
.event-outcome span { color: #c3c7d1; font-size: 12px; }
.event-dots { margin-top: 26px; display: flex; gap: 8px; }
.event-dots i { width: 28px; height: 4px; border-radius: 99px; background: rgba(255,255,255,.1); }
.event-dots i.active { background: var(--danger); }

.final-result { padding-top: 12px; }
.saved-status { margin: 16px 0 14px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; display: flex; align-items: center; justify-content: space-between; }
.saved-status span { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.saved-status strong { font-size: 30px; }
.saved-status.success strong { color: var(--accent); }
.saved-status.warning strong { color: var(--warning); }
.saved-status.danger strong { color: var(--danger); }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric-grid > div { min-height: 112px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.025); display: flex; flex-direction: column; justify-content: space-between; }
.metric-grid small { color: var(--muted); font-size: 10px; }
.metric-grid strong { font-size: 29px; }
.metric-grid strong span { color: var(--muted); font-size: 12px; }
.business-score { margin-top: 11px; padding: 24px; border-radius: 18px; text-align: center; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 90%, #10121a), #4f36c9); box-shadow: 0 20px 45px color-mix(in srgb, var(--brand) 20%, transparent); }
.business-score span, .business-score small { display: block; font-size: 9px; font-weight: 900; letter-spacing: .15em; }
.business-score strong { display: block; margin: 5px 0; font-size: 54px; letter-spacing: -.05em; }
.business-score small { opacity: .7; }

.mobile-leaderboard { padding-top: 10px; }
.ranking-list { margin-top: 25px; display: grid; gap: 7px; }
.ranking-row { min-height: 57px; padding: 0 15px; border: 1px solid var(--line); border-radius: 13px; display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; background: rgba(255,255,255,.025); }
.ranking-row > span { color: var(--muted); font-weight: 900; }
.ranking-row > b { font-size: 13px; }
.ranking-row.winner { border-color: rgba(255,200,87,.35); background: rgba(255,200,87,.06); }
.ranking-row.winner > span { color: var(--warning); }
.ranking-row.is-me { border-color: var(--brand); box-shadow: inset 3px 0 var(--brand); }

.referral-view { padding-top: 8px; }
.referral-options { margin: 24px 0 16px; display: grid; gap: 9px; }
.referral-options label { min-height: 64px; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; cursor: pointer; background: rgba(255,255,255,.025); }
.referral-options input { position: absolute; opacity: 0; }
.fake-check { width: 26px; height: 26px; border: 1px solid rgba(255,255,255,.18); border-radius: 7px; display: grid; place-items: center; color: transparent; }
.referral-options label:has(input:checked) { border-color: var(--accent); background: rgba(36,225,183,.06); }
.referral-options input:checked + .fake-check { color: #07140f; border-color: var(--accent); background: var(--accent); }
.referral-options strong { font-size: 13px; line-height: 1.35; }
.referral-match { margin: 16px 0; padding: 17px; border: 1px solid rgba(36,225,183,.25); border-radius: 14px; background: rgba(36,225,183,.06); }
.referral-match strong, .referral-match span { display: block; }
.referral-match strong { margin-bottom: 5px; color: var(--accent); }
.referral-match span { color: var(--muted); font-size: 12px; }
.referral-view > .button { margin-top: 9px; }

.loading-state { min-height: 60vh; display: grid; place-items: center; align-content: center; gap: 15px; color: var(--muted); }
.spinner { width: 30px; height: 30px; border: 2px solid rgba(255,255,255,.1); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }

/* Host */
.dashboard-shell { min-height: 100vh; padding-bottom: 50px; }
.host-label { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.empty-room { width: min(650px, calc(100% - 40px)); margin: 70px auto; padding: clamp(35px, 7vw, 70px); text-align: center; }
.empty-room h1 { margin-bottom: 18px; font-size: clamp(42px, 6vw, 70px); line-height: .98; letter-spacing: -.055em; }
.empty-room > p:not(.eyebrow) { max-width: 450px; margin: 0 auto 28px; color: var(--muted); line-height: 1.55; }
.host-grid { width: min(1260px, calc(100% - 40px)); margin: 25px auto; display: grid; grid-template-columns: 315px 1fr; gap: 18px; align-items: start; }
.room-panel { padding: 25px; text-align: center; position: sticky; top: 20px; }
.room-code { margin: 5px 0 20px; font-size: 44px; font-weight: 950; letter-spacing: .14em; }
.host-qr { width: 100%; aspect-ratio: 1; margin-bottom: 15px; padding: 9px; border-radius: 16px; background: #fff; object-fit: contain; }
.room-panel > .text-link { margin-bottom: 22px; display: block; font-size: 11px; }
.room-actions { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.room-actions button { font-size: 11px; }
.dashboard-main { display: grid; gap: 18px; }
.control-panel { min-height: 230px; padding: 30px; display: grid; grid-template-columns: 1fr 100px; gap: 15px 30px; align-items: center; }
.control-panel h1 { margin-bottom: 8px; font-size: clamp(34px, 5vw, 58px); letter-spacing: -.045em; }
.control-panel p:not(.section-label) { margin: 0; color: var(--muted); }
.host-timer { width: 100px; height: 100px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; font-size: 37px; font-weight: 950; font-variant-numeric: tabular-nums; }
.primary-controls { grid-column: 1 / 2; max-width: 430px; }
.control-panel > .text-button { grid-column: 2; grid-row: 2; }
.players-panel { padding: 27px 30px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-heading h2 { margin: 0; font-size: 25px; }
.player-list { margin-top: 22px; max-height: 470px; overflow: auto; }
.host-player-row { min-height: 54px; padding: 0 5px; border-bottom: 1px solid rgba(255,255,255,.065); display: grid; grid-template-columns: 12px minmax(120px, 1fr) auto auto 65px 35px; align-items: center; gap: 9px; }
.host-player-row > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.host-player-row > em { padding: 3px 6px; border-radius: 5px; color: var(--brand); background: rgba(124,92,255,.1); font-size: 8px; font-style: normal; font-weight: 900; }
.host-player-row > b { text-align: right; font-size: 12px; }
.presence { width: 7px; height: 7px; border-radius: 50%; background: #4b4f5b; }
.presence.online { background: var(--accent); box-shadow: 0 0 10px rgba(36,225,183,.4); }
.answer-state { color: var(--muted); font-size: 10px; }
.answer-state.done { color: var(--accent); }
.remove-player { width: 32px; height: 32px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; font-size: 18px; }
.remove-player:hover { color: var(--danger); background: rgba(255,93,115,.08); }
.toast { max-width: 370px; padding: 14px 19px; position: fixed; right: 24px; bottom: 24px; z-index: 50; border: 1px solid rgba(36,225,183,.3); border-radius: 12px; color: var(--accent); background: #151922; box-shadow: var(--shadow); transform: translateY(20px); opacity: 0; pointer-events: none; transition: .2s; }
.toast.visible { transform: translateY(0); opacity: 1; }
.toast.error { color: var(--danger); border-color: rgba(255,93,115,.3); }

/* Projector */
.screen-page { width: 100vw; height: 100vh; overflow: hidden; }
.screen-shell { width: 100vw; height: 100vh; padding: 0 clamp(35px, 5vw, 90px); display: grid; grid-template-rows: 86px 1fr 58px; }
.screen-header { border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.screen-room { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.screen-room strong { margin-left: 10px; color: #fff; font-size: 17px; letter-spacing: .18em; }
.screen-stage { min-height: 0; display: grid; }
.screen-footer { border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .13em; }
.screen-lobby { display: grid; grid-template-columns: 1.3fr .7fr; align-items: center; gap: 7vw; }
.screen-hero-copy h1 { margin: 0 0 28px; font-size: clamp(80px, 10vw, 150px); line-height: .75; letter-spacing: -.075em; font-weight: 950; }
.screen-hero-copy h1 span { color: transparent; -webkit-text-stroke: 2px var(--brand); }
.screen-hero-copy > p:not(.eyebrow) { max-width: 700px; color: #c2c7d2; font-size: clamp(20px, 2vw, 30px); line-height: 1.4; }
.joined-names { min-height: 35px; margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px; }
.joined-names span { padding: 7px 11px; border: 1px solid var(--line); border-radius: 99px; color: #b8bdc9; font-size: 10px; }
.screen-join-card { justify-self: end; width: min(31vw, 430px); padding: 20px 20px 28px; border: 1px solid var(--line); border-radius: 25px; text-align: center; background: linear-gradient(150deg, rgba(29,32,46,.9), rgba(14,16,23,.9)); box-shadow: var(--shadow); }
.screen-join-card img { width: 100%; aspect-ratio: 1; padding: 8px; border-radius: 16px; background: #fff; }
.screen-join-card p { margin: 17px 0 6px; color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .17em; }
.screen-join-card strong { display: block; font-size: clamp(34px, 4vw, 60px); letter-spacing: .16em; }
.screen-join-card > span { color: var(--muted); font-size: 12px; }

.screen-round { padding: 4vh 0; display: flex; flex-direction: column; justify-content: center; }
.screen-round-heading { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px; }
.screen-round-heading h1, .result-screen > h1 { margin-bottom: 10px; font-size: clamp(45px, 5.5vw, 80px); line-height: .95; letter-spacing: -.055em; }
.screen-round-heading > div > p:not(.eyebrow) { color: var(--muted); font-size: clamp(16px, 1.5vw, 23px); }
.giant-timer { width: clamp(120px, 12vw, 180px); height: clamp(120px, 12vw, 180px); border: 2px solid var(--line); border-radius: 50%; display: grid; place-items: center; font-size: clamp(48px, 5vw, 75px); font-weight: 950; font-variant-numeric: tabular-nums; }
.desktop-process { margin-top: 8vh; display: flex; align-items: center; justify-content: center; }
.desktop-node { min-width: 9vw; min-height: 85px; padding: 16px 12px; border: 1px solid var(--line); border-radius: 13px; display: grid; place-items: center; text-align: center; background: rgba(255,255,255,.03); font-size: clamp(10px, 1vw, 15px); font-weight: 800; }
.desktop-transition { width: 3.3vw; position: relative; text-align: center; color: #666e7e; font-size: 19px; }
.desktop-transition.problem { color: var(--danger); }
.desktop-transition.problem::before { content: ""; position: absolute; left: 5%; right: 5%; bottom: -30px; height: 2px; background: var(--danger); box-shadow: 0 0 15px var(--danger); }
.desktop-transition b { width: 22px; height: 22px; position: absolute; left: 50%; top: -31px; transform: translateX(-50%); border-radius: 50%; display: grid; place-items: center; color: #12060a; background: var(--danger); font-size: 13px; }
.desktop-process.compact { margin-top: 4vh; transform: scale(.86); transform-origin: center; }
.screen-instruction { margin-top: 6vh; align-self: center; display: flex; align-items: center; gap: 15px; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.screen-instruction b { color: var(--accent); }
.bar-grid { width: min(100%, 1150px); margin: 5vh auto 0; display: grid; gap: 15px; }
.bar-grid.two-columns { grid-template-columns: 1fr 1fr; column-gap: 55px; }
.result-bar > div { margin-bottom: 7px; display: flex; align-items: end; justify-content: space-between; gap: 15px; }
.result-bar strong { font-size: clamp(11px, 1.1vw, 16px); }
.result-bar b { color: var(--muted); font-size: 18px; }
.result-bar > span { height: 8px; display: block; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.07); }
.result-bar > span i { height: 100%; display: block; border-radius: inherit; background: var(--brand); animation: growBar .7s both; }
.result-bar.highlight > span i { background: linear-gradient(90deg, var(--danger), #ff8a6c); box-shadow: 0 0 18px rgba(255,93,115,.35); }
.result-bar.highlight b { color: var(--danger); }
.screen-solutions { margin-top: 5vh; display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.screen-solution { min-height: 155px; padding: 22px; position: relative; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.028); }
.screen-solution > span { position: absolute; right: 18px; top: 18px; color: var(--accent); font-size: 12px; font-weight: 900; }
.screen-solution > strong, .screen-solution > small { display: block; }
.screen-solution > strong { width: 75%; margin-bottom: 15px; font-size: clamp(14px, 1.4vw, 21px); line-height: 1.1; }
.screen-solution > small { color: var(--muted); font-size: clamp(9px, .9vw, 13px); line-height: 1.4; }
.screen-solution.risky { border-color: rgba(255,200,87,.22); }
.chaos-coming { margin-top: 6vh; padding: 20px; border: 1px solid rgba(255,93,115,.3); border-radius: 15px; display: flex; justify-content: center; gap: 15px; color: var(--danger); background: rgba(255,93,115,.06); }

.screen-chaos { text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.alarm.big { padding: 12px 20px; font-size: 12px; }
.chaos-number { margin: 3vh 0 -1vh; color: rgba(255,93,115,.12); font-size: clamp(100px, 15vw, 220px); line-height: .85; font-weight: 950; letter-spacing: -.08em; }
.screen-chaos > p { margin-bottom: 13px; color: var(--danger); font-size: 12px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.screen-chaos h1 { max-width: 1100px; margin-bottom: 5vh; font-size: clamp(42px, 5.5vw, 84px); line-height: 1.02; letter-spacing: -.055em; }
.chaos-timeline { display: flex; gap: 6vw; }
.chaos-timeline span { min-width: 55px; color: #555c6b; font-size: 10px; font-weight: 900; }
.chaos-timeline i { height: 4px; margin-bottom: 7px; display: block; border-radius: 99px; background: rgba(255,255,255,.1); }
.chaos-timeline span.active { color: var(--danger); }
.chaos-timeline span.active i { background: var(--danger); box-shadow: 0 0 12px rgba(255,93,115,.5); }

.screen-message { text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.screen-message h1 { max-width: 1050px; margin-bottom: 20px; font-size: clamp(48px, 6vw, 90px); line-height: .98; letter-spacing: -.06em; }
.screen-message > p:not(.eyebrow) { color: var(--muted); font-size: 20px; }
.result-orbit { width: 115px; height: 115px; margin-bottom: 35px; border: 1px solid rgba(36,225,183,.4); border-radius: 50%; display: grid; place-items: center; color: var(--accent); box-shadow: 0 0 50px rgba(36,225,183,.14); font-size: 45px; }
.leading-score { margin-top: 25px; padding: 12px 20px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); }
.leading-score strong { margin-left: 12px; color: #fff; }
.leaderboard-screen { padding: 4vh 0; display: grid; grid-template-columns: .78fr 1.22fr; gap: 6vw; align-items: center; }
.leaderboard-screen h1 { font-size: clamp(45px, 5vw, 78px); line-height: .95; letter-spacing: -.06em; }
.leaderboard-screen > div:first-child > p:not(.eyebrow) { color: var(--muted); }
.screen-ranking { display: grid; gap: 7px; }
.screen-rank { min-height: clamp(47px, 5.2vh, 67px); padding: 0 20px; border: 1px solid var(--line); border-radius: 12px; display: grid; grid-template-columns: 45px 1fr auto; align-items: center; gap: 10px; background: rgba(255,255,255,.025); }
.screen-rank > span { color: var(--muted); font-size: 17px; font-weight: 950; }
.screen-rank > strong { font-size: clamp(13px, 1.3vw, 20px); }
.screen-rank > b { font-size: clamp(12px, 1.2vw, 18px); }
.screen-rank small { color: var(--muted); font-size: 8px; }
.screen-rank.winner { min-height: clamp(60px, 6.5vh, 82px); border-color: rgba(255,200,87,.45); background: linear-gradient(90deg, rgba(255,200,87,.12), rgba(255,200,87,.02)); box-shadow: 0 0 35px rgba(255,200,87,.08); }
.screen-rank.winner > span, .screen-rank.winner > b { color: var(--warning); }
.insight-screen { display: grid; grid-template-columns: 1.15fr .85fr; gap: 7vw; align-items: center; }
.insight-main h1 { font-size: clamp(50px, 6.5vw, 100px); line-height: .92; letter-spacing: -.065em; }
.insight-main h1 span { color: var(--accent); }
.insight-main > p:not(.eyebrow) { max-width: 750px; color: #bec3cf; font-size: clamp(17px, 1.7vw, 25px); line-height: 1.5; }
.insight-side { padding: clamp(25px, 3vw, 45px); border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.03); }
.insight-side > strong { color: var(--accent); font-size: 21px; }
.insight-side ul { margin: 25px 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.insight-side li { padding-left: 25px; position: relative; color: #c3c7d1; line-height: 1.4; }
.insight-side li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); }
.insight-side > p { margin-bottom: 0; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); line-height: 1.5; }
.insight-side b { color: #fff; }

/* Installer */
.narrow-shell { min-height: 100vh; }
.install-card { width: min(650px, calc(100% - 40px)); margin: 50px auto; padding: clamp(25px, 5vw, 45px); }
.install-card h1 { font-size: clamp(34px, 5vw, 48px); letter-spacing: -.045em; }
.check-list { margin: 28px 0; display: grid; gap: 8px; }
.check-row { min-height: 48px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; display: flex; align-items: center; gap: 12px; }
.check-row span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.check-row strong { font-size: 13px; }
.check-row.passed span { color: #06130f; background: var(--accent); }
.check-row.failed span { color: #fff; background: var(--danger); }
.install-message { padding: 14px; border-radius: 10px; color: var(--warning); background: rgba(255,200,87,.08); }
.install-message.success { color: var(--accent); background: rgba(36,225,183,.08); }
.install-message.error { color: var(--danger); background: rgba(255,93,115,.08); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; transform: scale(.86); } }
@keyframes timerPulse { 50% { box-shadow: 0 0 30px rgba(255,93,115,.22); transform: scale(1.04); } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes shake { 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
@keyframes glitch { 0%, 92%, 100% { transform: translate(0); } 94% { transform: translate(-3px, 1px); } 96% { transform: translate(3px, -1px); } }
@keyframes growBar { from { width: 0 !important; } }

@media (max-width: 850px) {
    .hero-grid { grid-template-columns: 1fr; padding-top: 35px; }
    .hero-copy { text-align: center; }
    .hero-copy .eyebrow, .hero-lead { margin-left: auto; margin-right: auto; }
    .process-ribbon { justify-content: center; }
    .join-card { width: min(100%, 520px); margin: auto; }
    .host-grid { grid-template-columns: 1fr; }
    .room-panel { position: static; }
    .host-qr { width: min(100%, 360px); }
    .host-player-row { grid-template-columns: 12px minmax(100px, 1fr) auto 60px 35px; }
    .host-player-row .answer-state { display: none; }
}

@media (max-width: 520px) {
    .topbar { width: calc(100% - 30px); }
    .hero-grid { width: calc(100% - 30px); padding-bottom: 55px; gap: 45px; }
    .hero-copy h1 { font-size: 19vw; }
    .process-ribbon { gap: 5px; }
    .process-ribbon span { padding: 7px; font-size: 10px; }
    .join-card { padding: 23px 18px; }
    .dashboard-shell .topbar { min-height: 65px; }
    .host-grid { width: calc(100% - 20px); margin-top: 10px; }
    .control-panel { padding: 22px; grid-template-columns: 1fr 70px; }
    .host-timer { width: 70px; height: 70px; font-size: 26px; }
    .control-panel > .text-button { grid-column: 1 / -1; grid-row: auto; }
    .players-panel { padding: 22px 15px; }
    .panel-heading { align-items: flex-start; }
    .panel-heading h2 { font-size: 20px; }
    .panel-heading .button { font-size: 9px; }
    .host-player-row { grid-template-columns: 10px minmax(85px, 1fr) auto 48px 30px; }
    .host-player-row > b { font-size: 10px; }
}

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

/* --------------------------------------------------------------------------
   ARCADE EDITION
   -------------------------------------------------------------------------- */
:root {
    --bg: #05070b;
    --bg-soft: #0a0e15;
    --panel: rgba(13, 18, 27, .94);
    --panel-strong: #0e1420;
    --line: rgba(151, 170, 202, .16);
    --text: #f7f8fc;
    --muted: #8995a8;
    --brand: #7557ff;
    --accent: #00e6b8;
    --danger: #ff5270;
    --warning: #ffce59;
    --radius: 15px;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .2;
    background-image: linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px);
    background-size: 100% 4px;
    mask-image: linear-gradient(to bottom, #000, transparent 90%);
}

.panel {
    border-color: rgba(131, 151, 184, .2);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(17,23,35,.97), rgba(8,11,18,.97));
    box-shadow: 0 25px 90px rgba(0,0,0,.48), inset 0 1px rgba(255,255,255,.035);
}

.brand-mark {
    border-radius: 5px;
    border-color: rgba(0,230,184,.4);
    background: #0d1720;
    box-shadow: 0 0 24px rgba(0,230,184,.12);
}

.button { border-radius: 7px; letter-spacing: .015em; }
.button.primary {
    color: #03110d;
    background: var(--accent);
    box-shadow: 0 12px 35px rgba(0,230,184,.2);
}
.button.primary:hover:not(:disabled) { filter: brightness(1.1); }
.button.secondary { background: rgba(126,145,177,.07); }

/* Entry mission */
.host-entry { text-decoration: none; text-transform: uppercase; font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.host-entry span { color: var(--accent); }
.hero-grid {
    width: min(1220px, calc(100% - 48px));
    min-height: calc(100vh - 86px);
    padding: clamp(35px, 6vh, 80px) 0 clamp(55px, 8vh, 105px);
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, .72fr);
    gap: clamp(45px, 8vw, 115px);
}
.mission-status {
    width: fit-content;
    margin-bottom: clamp(28px, 5vh, 52px);
    padding: 8px 12px;
    border: 1px solid rgba(0,230,184,.22);
    display: flex;
    align-items: center;
    gap: 12px;
    color: #a6b2c3;
    background: rgba(0,230,184,.035);
    font-size: 9px;
    letter-spacing: .14em;
}
.mission-status b { color: var(--accent); }
.mission-status .live-dot { margin-right: 0; }
.hero-overline { margin-bottom: 10px; color: var(--danger); font-size: 11px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.hero-copy h1 {
    margin-bottom: 24px;
    font-size: clamp(65px, 8.6vw, 126px);
    line-height: .75;
    letter-spacing: -.075em;
    text-transform: uppercase;
}
.hero-copy h1 span {
    color: var(--text);
    -webkit-text-stroke: 0;
    filter: none;
}
.hero-copy h1 br + * { color: var(--brand); }
.hero-lead { max-width: 630px; margin-bottom: 30px; font-size: clamp(19px, 2vw, 27px); }
.hero-lead strong { color: var(--warning); }
.case-file {
    max-width: 660px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: .85fr 1fr 1.35fr;
}
.case-file > div { min-width: 0; padding: 15px 16px 16px 0; }
.case-file > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.case-file small, .case-file strong { display: block; }
.case-file small { margin-bottom: 6px; color: #66748a; font-size: 8px; font-weight: 900; letter-spacing: .15em; }
.case-file strong { font-size: 12px; line-height: 1.3; }
.process-ribbon { margin-top: 25px; }
.process-ribbon span { border-radius: 4px; border-color: rgba(134,153,185,.16); background: #0a0e15; }
.process-ribbon b { color: var(--accent); }

.join-card { padding: 0; overflow: hidden; }
.join-card::before { content: ""; height: 3px; display: block; background: linear-gradient(90deg, var(--accent), var(--brand), var(--danger)); }
.join-card-head { padding: 21px 25px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 13px; background: rgba(255,255,255,.018); }
.join-card-head > span { width: 34px; height: 34px; display: grid; place-items: center; color: var(--accent); border: 1px solid rgba(0,230,184,.3); font-size: 10px; font-weight: 900; }
.join-card-head small, .join-card-head strong { display: block; }
.join-card-head small { margin-bottom: 3px; color: var(--accent); font-size: 8px; font-weight: 900; letter-spacing: .17em; }
.join-card-head strong { font-size: 13px; }
.join-card h2, .join-card > p, .join-card form, .join-card .privacy-note { margin-left: 26px; margin-right: 26px; }
.join-card h2 { margin-top: 27px; margin-bottom: 7px; font-size: 33px; }
.join-card > p { margin-bottom: 25px; }
.join-card label { margin-top: 17px; color: #aab5c6; letter-spacing: .08em; text-transform: uppercase; }
.join-card input { border-radius: 6px; border-color: rgba(153,171,201,.2); background: #070a10; }
.mission-button { min-height: 56px; justify-content: space-between; padding-inline: 19px; text-transform: uppercase; font-size: 12px; letter-spacing: .09em; }
.mission-button span:last-child { font-size: 20px; }
.join-card-foot { margin-top: 22px; padding: 15px 25px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 9px; color: #788599; background: rgba(255,255,255,.017); font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.join-card-foot span:first-child { color: var(--accent); }
.join-card-foot i { width: 5px; height: 5px; margin-right: 4px; display: inline-block; border-radius: 50%; background: currentColor; }
.join-card .privacy-note { margin-top: 13px !important; margin-bottom: 21px !important; }

/* Host mission control */
.empty-room { width: min(820px, calc(100% - 40px)); margin-top: clamp(35px, 7vh, 90px); position: relative; overflow: hidden; }
.empty-room::after { content: "25K"; position: absolute; right: -10px; bottom: -55px; color: rgba(117,87,255,.07); font-size: 210px; line-height: 1; font-weight: 950; pointer-events: none; }
.empty-room h1 { position: relative; z-index: 1; }
.empty-room h1 span { color: var(--accent); }
.director-chip { width: fit-content; margin: 0 auto 24px; padding: 8px 12px; border: 1px solid rgba(0,230,184,.22); color: var(--accent); font-size: 8px; font-weight: 900; letter-spacing: .15em; }
.host-facts { max-width: 610px; margin: 30px auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); }
.host-facts span { padding: 15px 8px; color: #a9b3c2; font-size: 10px; font-weight: 800; }
.host-facts span + span { border-left: 1px solid var(--line); }
.host-facts b { margin-right: 6px; color: var(--accent); }
.host-runway { min-height: 46px; padding: 0 16px; border: 1px solid var(--line); display: grid; grid-template-columns: repeat(6, 1fr); align-items: center; background: rgba(11,15,23,.88); }
.host-runway span { position: relative; color: #556176; text-align: center; font-size: 8px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.host-runway span::before { content: ""; width: 5px; height: 5px; margin-right: 6px; border-radius: 50%; display: inline-block; background: currentColor; }
.host-runway span.done { color: #8e9caf; }
.host-runway span.active { color: var(--accent); }
.host-runway span.active::before { box-shadow: 0 0 10px var(--accent); }

/* Process Snake */
.snake-round { padding-bottom: 36px; }
.snake-round > h1, .budget-view > h1 { margin-bottom: 9px; }
.snake-round > h1 span, .budget-view > h1 span { color: var(--accent); }
.round-command { margin-bottom: 8px !important; color: var(--danger) !important; font-size: 8px !important; font-weight: 900; letter-spacing: .17em; }
.snake-hud {
    min-height: 39px;
    margin-top: 18px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #7f8ca0;
    background: #080c13;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .1em;
}
.snake-hud > span { color: var(--accent); }
.snake-hud i { width: 5px; height: 5px; margin-right: 5px; display: inline-block; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.snake-hud strong { color: #fff; font-size: 13px; }
.snake-frame { border: 1px solid rgba(117,87,255,.34); position: relative; overflow: hidden; background: #070b12; box-shadow: 0 20px 60px rgba(0,0,0,.35), 0 0 45px rgba(117,87,255,.07); }
.snake-frame::before, .snake-frame::after { content: ""; width: 18px; height: 18px; position: absolute; z-index: 3; pointer-events: none; }
.snake-frame::before { top: 7px; left: 7px; border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.snake-frame::after { right: 7px; bottom: 28px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); }
.snake-game { width: 100%; height: min(500px, 64vh); min-height: 450px; touch-action: none; }
.snake-game canvas { width: 100% !important; height: 100% !important; display: block; object-fit: contain; }
.snake-controls { min-height: 27px; padding: 0 9px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 5px; color: #627087; background: #080c13; font-size: 7px; font-weight: 900; letter-spacing: .08em; }
.snake-controls span:nth-child(2) { color: var(--accent); }
.snake-status { min-height: 20px; margin: 9px 0 88px !important; color: #7d899d !important; text-align: center; font-size: 10px !important; }
.snake-submit > span { max-width: 47%; line-height: 1.3; }
.game-load-error { padding: 40px 20px; color: var(--danger); text-align: center; }

/* Upgrade / result screens */
.solution-card { border-radius: 8px; background: linear-gradient(130deg, rgba(16,22,33,.98), rgba(10,14,21,.98)); }
.solution-card::before { content: "MODULE"; margin-bottom: 8px; display: block; color: #59677d; font-size: 7px; font-weight: 900; letter-spacing: .15em; }
.solution-card.selected { border-color: var(--accent); background: linear-gradient(130deg, rgba(0,230,184,.12), rgba(8,17,19,.98)); box-shadow: inset 3px 0 var(--accent); }
.budget-meter { border-radius: 7px; background: #080c13; }
.saved-status, .metric-grid > div, .business-score, .ranking-row, .referral-options label, .referral-match { border-radius: 8px; }

.defence-scene { width: 100%; height: 170px; margin: 24px 0 30px; position: relative; display: grid; place-items: center; overflow: hidden; }
.defence-scene::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px dashed rgba(255,82,112,.35); }
.incoming-threat { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); animation: threatDrop 1.3s ease-in-out infinite; }
.incoming-threat span { width: 38px; height: 38px; border: 1px solid var(--danger); display: grid; place-items: center; color: var(--danger); background: rgba(255,82,112,.12); font-weight: 950; transform: rotate(45deg); }
.incoming-threat span::first-letter { transform: rotate(-45deg); }
.incoming-threat i { width: 1px; height: 45px; margin: 8px auto 0; display: block; background: linear-gradient(var(--danger), transparent); }
.defence-shield { width: 130px; height: 64px; position: absolute; bottom: 30px; border: 2px solid var(--accent); border-bottom: 0; border-radius: 100px 100px 0 0; box-shadow: 0 -8px 30px rgba(0,230,184,.16), inset 0 12px 30px rgba(0,230,184,.06); }
.breached .defence-shield { border-color: var(--danger); opacity: .38; transform: skew(-8deg); }
.mini-jet { width: 43px; height: 30px; position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); color: #03110d; background: var(--accent); clip-path: polygon(50% 0, 64% 60%, 100% 88%, 58% 78%, 50% 100%, 42% 78%, 0 88%, 36% 60%); display: grid; place-items: center; }
.mini-jet b { font-size: 7px; }

/* Projector arcade field */
.screen-round-heading h1 span { color: var(--accent); }
.screen-battlefield { height: min(44vh, 420px); margin-top: 3vh; border: 1px solid rgba(117,87,255,.25); position: relative; overflow: hidden; background: #070b12; }
.battle-grid { position: absolute; inset: 0; opacity: .28; background-image: linear-gradient(rgba(104,121,149,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(104,121,149,.2) 1px, transparent 1px); background-size: 28px 28px; }
.screen-threat { min-width: 145px; min-height: 47px; padding: 8px 11px 8px 35px; position: absolute; border: 1px solid rgba(145,165,197,.36); background: rgba(15,21,31,.96); animation: targetHover 2.4s ease-in-out infinite alternate; }
.screen-threat i { width: 7px; height: 7px; position: absolute; left: 13px; top: 20px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 12px var(--danger); }
.screen-threat small, .screen-threat strong { display: block; }
.screen-threat small { color: #65738a; font-size: 7px; }
.screen-threat strong { margin-top: 4px; font-size: 10px; }
.threat-1 { left: 5%; top: 14%; }.threat-2 { left: 36%; top: 7%; animation-delay: -.5s; }.threat-3 { right: 7%; top: 18%; animation-delay: -1s; }
.threat-4 { left: 12%; bottom: 12%; animation-delay: -.8s; }.threat-5 { left: 44%; bottom: 20%; animation-delay: -1.5s; }.threat-6 { right: 4%; bottom: 8%; animation-delay: -.3s; }
.screen-jet { width: 28px; height: 28px; position: absolute; left: 51%; top: 51%; border-radius: 5px; color: #03110d; background: var(--accent); box-shadow: -26px 12px 0 -7px var(--brand), -50px 20px 0 -9px rgba(117,87,255,.7), -72px 25px 0 -10px rgba(117,87,255,.45); display: grid; place-items: center; animation: snakeCruise 6s ease-in-out infinite; }
.screen-jet b { font-size: 7px; }

@keyframes targetHover { to { transform: translateY(9px); border-color: rgba(0,230,184,.45); } }
@keyframes snakeCruise { 0% { transform: translate(-80px, 50px); } 30% { transform: translate(80px, -40px); } 60% { transform: translate(170px, 60px); } 100% { transform: translate(-80px, 50px); } }
@keyframes threatDrop { 50% { transform: translate(-50%, 13px); filter: drop-shadow(0 0 12px rgba(255,82,112,.6)); } }

@media (max-width: 850px) {
    .hero-grid { grid-template-columns: 1fr; min-height: auto; padding-top: 26px; }
    .hero-copy { text-align: left; }
    .mission-status, .hero-copy .eyebrow, .hero-lead { margin-left: 0; margin-right: 0; }
    .process-ribbon { justify-content: flex-start; }
    .join-card { width: 100%; }
    .room-ready .join-card { order: -1; }
    .room-ready .hero-grid { padding-top: 10px; }
}

@media (max-width: 520px) {
    .topbar { min-height: 62px; }
    .hero-grid { gap: 34px; width: calc(100% - 28px); padding-bottom: 34px; }
    .mission-status { margin-bottom: 28px; }
    .hero-overline { font-size: 8px; }
    .hero-copy h1 { font-size: clamp(58px, 20vw, 82px); line-height: .77; }
    .hero-lead { margin-bottom: 22px; font-size: 18px; }
    .case-file { grid-template-columns: 1fr 1fr; }
    .case-file > div:last-child { display: none; }
    .process-ribbon span { padding-inline: 6px; font-size: 8px; }
    .join-card h2, .join-card > p, .join-card form, .join-card .privacy-note { margin-left: 19px; margin-right: 19px; }
    .join-card h2 { font-size: 28px; }
    .join-card-head, .join-card-foot { padding-left: 19px; padding-right: 19px; }
    .join-card-foot { font-size: 7px; }
    .player-stage { padding: 18px 12px calc(104px + env(safe-area-inset-bottom)); }
    .round-view > h1 { font-size: 35px; }
    .round-kicker { margin-bottom: 14px; }
    .snake-game { height: min(500px, 59vh); min-height: 410px; }
    .snake-controls { font-size: 6px; }
    .sticky-submit { width: calc(100% - 20px); min-height: 72px; }
    .sticky-submit .button { min-width: 132px; }
    .host-facts { grid-template-columns: 1fr; }
    .host-facts span + span { border-left: 0; border-top: 1px solid var(--line); }
    .host-runway { padding: 0 5px; }
    .host-runway span { font-size: 6px; }
    .host-runway span::before { display: none; }
}
