/* play/Components/Hud.razor.rz.scp.css */
/* Retro pulp sci-fi HUD: gold art-deco frames, crimson lacquer panels, teal glow accents. */

.hud[b-4pdvr3xyiy] {
    position: fixed;
    inset: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px 16px;
    color: var(--cream);
    font-family: 'Saira Semi Condensed', 'Segoe UI', sans-serif;
    user-select: none;
}

.top[b-4pdvr3xyiy], .bottom[b-4pdvr3xyiy] {
    display: flex;
    gap: 14px;
    align-items: stretch;
    flex-wrap: wrap;
}

.top[b-4pdvr3xyiy] { justify-content: space-between; }
.bottom[b-4pdvr3xyiy] { justify-content: center; align-items: flex-end; }

.panel[b-4pdvr3xyiy] {
    pointer-events: auto;
    position: relative;
    background:
        linear-gradient(180deg, rgba(255, 214, 140, 0.10), rgba(255, 214, 140, 0) 38%),
        linear-gradient(180deg, rgba(74, 12, 34, 0.94), rgba(30, 6, 26, 0.94));
    border: 2px solid var(--gold);
    border-radius: 6px;
    box-shadow:
        0 0 0 3px rgba(12, 4, 18, 0.9),
        0 0 0 4px var(--gold-dark),
        0 10px 30px rgba(0, 0, 0, 0.55),
        inset 0 0 22px rgba(255, 170, 70, 0.10);
    padding: 8px 16px;
}

/* Art-deco side studs. */
.panel[b-4pdvr3xyiy]::before, .panel[b-4pdvr3xyiy]::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 7px;
    height: 7px;
    background: var(--gold-hi);
    transform: translateY(-50%) rotate(45deg);
    box-shadow: 0 0 6px rgba(255, 200, 100, 0.8);
}
.panel[b-4pdvr3xyiy]::before { left: -5px; }
.panel[b-4pdvr3xyiy]::after { right: -5px; }

button[b-4pdvr3xyiy] { font: inherit; }

/* ---- title plate ---- */
.title[b-4pdvr3xyiy] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 26px;
    overflow: hidden;
    background:
        repeating-conic-gradient(from 0deg at 50% 120%, rgba(255, 200, 90, 0.10) 0deg 6deg, transparent 6deg 12deg),
        linear-gradient(180deg, rgba(110, 16, 40, 0.95), rgba(36, 6, 28, 0.95));
}

.title-main[b-4pdvr3xyiy] {
    font-family: 'Limelight', 'Georgia', serif;
    font-size: 28px;
    line-height: 1;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold-hi);
    text-shadow: 0 2px 0 #5a2a00, 0 0 14px rgba(255, 190, 80, 0.55);
}

.title-sub[b-4pdvr3xyiy] {
    margin-top: 3px;
    font-size: 12px;
    letter-spacing: 8px;
    color: var(--teal);
    text-shadow: 0 0 8px rgba(63, 242, 230, 0.8);
}

/* ---- stats ---- */
.stats[b-4pdvr3xyiy] {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 8px 24px;
}

.stat[b-4pdvr3xyiy] {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 58px;
}

.label[b-4pdvr3xyiy] {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--teal);
    opacity: 0.85;
}

.value[b-4pdvr3xyiy] {
    font-family: 'Limelight', 'Georgia', serif;
    font-size: 26px;
    line-height: 1.1;
    color: var(--cream);
    text-shadow: 0 0 10px rgba(255, 230, 190, 0.35);
}

.value small[b-4pdvr3xyiy] {
    font-size: 15px;
    opacity: 0.7;
}

.value.lives[b-4pdvr3xyiy] { color: #ff8a7a; }
.value.minerals[b-4pdvr3xyiy] { color: #5aeb78; text-shadow: 0 0 10px rgba(90, 235, 120, 0.45); } /* same green as the money spots */

.cap[b-4pdvr3xyiy] {
    font-size: 10px;
    letter-spacing: 1px;
    opacity: 0.6;
}

/* ---- wave panel ---- */
.wave[b-4pdvr3xyiy] {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    min-width: 250px;
}

.phase[b-4pdvr3xyiy] {
    font-family: 'Limelight', 'Georgia', serif;
    font-size: 15px;
    color: var(--gold-hi);
}

.wave-row[b-4pdvr3xyiy] {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.speed[b-4pdvr3xyiy] { display: flex; gap: 4px; margin-left: auto; }

.perf[b-4pdvr3xyiy] {
    font-size: 11px;
    opacity: 0.55;
}

.sound-row[b-4pdvr3xyiy] {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 12px;
}
.volume[b-4pdvr3xyiy] {
    flex: 1;
    min-width: 70px;
    height: 14px;
    accent-color: var(--teal);
    cursor: pointer;
}
.volume:disabled[b-4pdvr3xyiy] { opacity: 0.35; cursor: default; }
.volume-value[b-4pdvr3xyiy] { min-width: 38px; text-align: right; opacity: 0.75; font-variant-numeric: tabular-nums; }

.go[b-4pdvr3xyiy] {
    font-weight: 700;
    letter-spacing: 1px;
    color: #071c1c;
    background: linear-gradient(180deg, #8ffff6, var(--teal));
    border: none;
    border-radius: 4px;
    padding: 4px 14px;
    cursor: pointer;
    box-shadow: 0 0 14px rgba(63, 242, 230, 0.5);
}
.go:hover[b-4pdvr3xyiy] { filter: brightness(1.1); }

.mini[b-4pdvr3xyiy] {
    font-size: 12px;
    color: var(--cream);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--gold-dark);
    border-radius: 3px;
    padding: 1px 8px;
    cursor: pointer;
}
.mini:hover[b-4pdvr3xyiy] { border-color: var(--gold-hi); color: var(--gold-hi); }
.mini.on[b-4pdvr3xyiy] { border-color: var(--teal); color: var(--teal); box-shadow: 0 0 8px rgba(63, 242, 230, 0.4); }

/* ---- messages ---- */
.toast[b-4pdvr3xyiy] {
    align-self: center;
    margin-top: 12px;
    padding: 6px 18px;
    font-size: 15px;
    color: var(--cream);
    background: rgba(10, 30, 36, 0.88);
    border: 1px solid var(--teal);
    border-radius: 4px;
    box-shadow: 0 0 16px rgba(63, 242, 230, 0.25);
}

.toast.error[b-4pdvr3xyiy] {
    background: rgba(60, 8, 18, 0.9);
    border-color: #ff5a6a;
    box-shadow: 0 0 16px rgba(255, 70, 90, 0.3);
}

.gameover[b-4pdvr3xyiy] {
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 22px 46px;
}

.go-title[b-4pdvr3xyiy] {
    font-family: 'Limelight', 'Georgia', serif;
    font-size: 44px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold-hi);
    text-shadow: 0 3px 0 #5a2a00, 0 0 24px rgba(255, 190, 80, 0.6);
}

.go-text[b-4pdvr3xyiy] { font-size: 16px; }

/* ---- build palette ---- */
.build[b-4pdvr3xyiy] {
    display: flex;
    gap: 10px;
    padding: 10px 14px;
}

.card[b-4pdvr3xyiy] {
    position: relative;
    width: 104px;
    padding: 6px 6px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--cream);
    cursor: pointer;
    background: linear-gradient(180deg, rgba(20, 10, 40, 0.9), rgba(8, 4, 18, 0.9));
    border: 1px solid var(--gold-dark);
    border-radius: 5px;
    transition: transform 80ms ease, border-color 80ms ease, box-shadow 80ms ease;
}

.card:hover[b-4pdvr3xyiy] {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.card.selected[b-4pdvr3xyiy] {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 0 18px color-mix(in srgb, var(--accent) 60%, transparent);
}

.card.poor[b-4pdvr3xyiy] { opacity: 0.55; }

.hotkey[b-4pdvr3xyiy], .footprint[b-4pdvr3xyiy] {
    position: absolute;
    top: 4px;
    font-size: 11px;
    color: var(--gold);
}
.hotkey[b-4pdvr3xyiy] { left: 6px; }
.footprint[b-4pdvr3xyiy] { right: 6px; opacity: 0.7; }

.icon[b-4pdvr3xyiy] { width: 52px; height: 52px; }
.icon .metal[b-4pdvr3xyiy] { fill: #3a3550; }
.icon .chrome[b-4pdvr3xyiy] { fill: #c9cbd8; }
.icon .gold[b-4pdvr3xyiy] { fill: var(--gold); }
.icon .copper[b-4pdvr3xyiy] { fill: #d9703a; }
.icon .red[b-4pdvr3xyiy] { fill: #b3122a; }
.icon .violet[b-4pdvr3xyiy] { fill: #4d3a8c; }
.icon .glow[b-4pdvr3xyiy] { fill: var(--accent); filter: drop-shadow(0 0 4px var(--accent)); }

.name[b-4pdvr3xyiy] {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
}

.cost[b-4pdvr3xyiy] {
    font-size: 13px;
    color: var(--gold-hi);
}

/* ---- info / selection ---- */
.info[b-4pdvr3xyiy] {
    width: 420px;
    min-height: 118px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}

.info-title[b-4pdvr3xyiy] {
    font-family: 'Limelight', 'Georgia', serif;
    font-size: 19px;
    color: var(--gold-hi);
}

.info-sub[b-4pdvr3xyiy] {
    font-size: 12px;
    color: var(--teal);
    opacity: 0.9;
    font-family: 'Saira Semi Condensed', 'Segoe UI', sans-serif;
}

.info-text[b-4pdvr3xyiy] { font-size: 14px; }

.hint[b-4pdvr3xyiy] {
    font-size: 12px;
    color: var(--teal);
    opacity: 0.85;
}

.actions[b-4pdvr3xyiy] {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.action[b-4pdvr3xyiy] {
    display: flex;
    gap: 8px;
    align-items: baseline;
    padding: 3px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cream);
    background: linear-gradient(180deg, rgba(40, 20, 70, 0.95), rgba(16, 8, 30, 0.95));
    border: 1px solid var(--gold);
    border-radius: 4px;
    cursor: pointer;
}

.action:hover:not(:disabled)[b-4pdvr3xyiy] {
    border-color: var(--teal);
    box-shadow: 0 0 10px rgba(63, 242, 230, 0.35);
}

.action:disabled[b-4pdvr3xyiy] {
    opacity: 0.45;
    cursor: default;
}

.action .price[b-4pdvr3xyiy] { color: var(--gold-hi); font-weight: 400; }

.action.danger[b-4pdvr3xyiy] { border-color: #ff6a6a; }
.action.danger .price[b-4pdvr3xyiy] { color: #ffb0a0; }

.value.ok[b-4pdvr3xyiy] { color: #7dffb0; }
.value small.up[b-4pdvr3xyiy] { color: #7dffb0; margin-left: 4px; }
.value small.down[b-4pdvr3xyiy] { color: #ff8a7a; margin-left: 4px; }
.upgrade .key[b-4pdvr3xyiy], .action .key[b-4pdvr3xyiy] {
    display: inline-block;
    min-width: 14px;
    margin-right: 6px;
    padding: 0 3px;
    font-size: 11px;
    text-align: center;
    color: #071c1c;
    background: var(--gold);
    border-radius: 2px;
}

/* ---- countdown ---- */
.countdown[b-4pdvr3xyiy] {
    height: 5px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--gold-dark);
    border-radius: 3px;
    overflow: hidden;
}
.countdown-fill[b-4pdvr3xyiy] {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--teal));
    box-shadow: 0 0 8px rgba(63, 242, 230, 0.6);
}

/* ---- wave rotation (opens under the wave panel) ---- */
.right-col[b-4pdvr3xyiy] {
    position: relative;
    display: flex;
}
.right-col > .wave[b-4pdvr3xyiy] { flex: 1; }
.rotation[b-4pdvr3xyiy]::before, .rotation[b-4pdvr3xyiy]::after { display: none; } /* the side studs would poke out and make it scroll sideways */
.rotation[b-4pdvr3xyiy] {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 440px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 160px);
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 16px;
    z-index: 4;
}
.wave-entry[b-4pdvr3xyiy] {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    column-gap: 8px;
    align-items: baseline;
    padding: 4px 6px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 13px;
}
.wave-entry.next[b-4pdvr3xyiy] {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 35%, transparent);
}
.wave-entry .dot[b-4pdvr3xyiy] {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
}
.wave-name[b-4pdvr3xyiy] { font-weight: 700; }
.wave-meta[b-4pdvr3xyiy] { color: var(--gold-hi); font-size: 12px; white-space: nowrap; }
.wave-name[b-4pdvr3xyiy] { min-width: 0; overflow-wrap: anywhere; }
.wave-tags[b-4pdvr3xyiy] { grid-column: 2 / 4; font-size: 11px; color: var(--teal); }
.wave-desc[b-4pdvr3xyiy] { grid-column: 2 / 4; font-size: 11px; opacity: 0.75; }
/* Armour for that wave, steel blue; negative armour (extra damage) in red. */
.wave-armor[b-4pdvr3xyiy] { grid-column: 2 / 4; font-size: 11px; font-weight: 700; color: #a9c7ff; }
.wave-armor.negative[b-4pdvr3xyiy] { color: #ff8a7a; }
.seed-facts[b-4pdvr3xyiy] { margin: 4px 0 8px; grid-template-columns: repeat(3, 1fr); }
.cell.none[b-4pdvr3xyiy] { opacity: 0.38; }

/* ---- key bindings (info panel) ---- */
.keys[b-4pdvr3xyiy] {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    row-gap: 3px;
    margin-top: 4px;
    align-items: baseline;
}
.keys-group[b-4pdvr3xyiy] {
    font-size: 10px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--tone);
    border-left: 3px solid var(--tone);
    padding-left: 5px;
    white-space: nowrap;
}
.keys-list[b-4pdvr3xyiy] { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; color: var(--cream); }
.kb[b-4pdvr3xyiy] { white-space: nowrap; }
.kb kbd[b-4pdvr3xyiy] {
    display: inline-block;
    margin-right: 4px;
    padding: 0 4px;
    font-family: inherit;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 15px;
    color: #071c1c;
    background: var(--gold);
    border-radius: 2px;
    box-shadow: 0 1px 0 var(--gold-dark);
}

/* ---- command deck (global upgrades) ---- */
.upgrades[b-4pdvr3xyiy] {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px;
    min-width: 190px;
}
.upgrade[b-4pdvr3xyiy] {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 8px;
    padding: 3px 8px;
    text-align: left;
    color: var(--cream);
    background: linear-gradient(180deg, rgba(40, 20, 70, 0.95), rgba(16, 8, 30, 0.95));
    border: 1px solid var(--gold-dark);
    border-radius: 4px;
    cursor: pointer;
}
.upgrade:hover:not(:disabled)[b-4pdvr3xyiy] { border-color: var(--teal); box-shadow: 0 0 10px rgba(63, 242, 230, 0.35); }
.upgrade:disabled[b-4pdvr3xyiy] { opacity: 0.5; cursor: default; }
.upgrade-name[b-4pdvr3xyiy] { font-size: 13px; font-weight: 700; }
.upgrade-level[b-4pdvr3xyiy] { font-size: 13px; color: var(--teal); text-align: right; }
.upgrade-level small[b-4pdvr3xyiy] { opacity: 0.6; }
.upgrade .price[b-4pdvr3xyiy] { font-size: 12px; color: var(--gold-hi); }
/* Bottom-right corner of a card (Bonus income: what the wave end pays), in the minerals green. */
.upgrade-note[b-4pdvr3xyiy] {
    font-size: 12px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
    color: #5aeb78;
    text-shadow: 0 0 8px rgba(90, 235, 120, 0.35);
}
.upgrade-note small[b-4pdvr3xyiy] { font-weight: 400; font-size: 10px; opacity: 0.75; margin-right: 2px; color: var(--cream); text-shadow: none; }

/* ---- tower types ---- */
.info.wide[b-4pdvr3xyiy] { width: 620px; }
.type-groups[b-4pdvr3xyiy] {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}
.type-group[b-4pdvr3xyiy] { flex: 1; }
.type-grid[b-4pdvr3xyiy] {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    margin-top: 2px;
}
.type-card[b-4pdvr3xyiy] {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    padding: 2px 7px;
    font-size: 12px;
    color: var(--cream);
    background: linear-gradient(180deg, rgba(30, 14, 52, 0.95), rgba(12, 6, 24, 0.95));
    border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
    border-left: 3px solid var(--accent);
    border-radius: 3px;
    cursor: pointer;
    text-align: left;
}
.type-card:hover:not(:disabled)[b-4pdvr3xyiy] { box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 50%, transparent); }
.type-card:disabled[b-4pdvr3xyiy] { opacity: 0.4; cursor: default; }
.type-name[b-4pdvr3xyiy] { font-weight: 600; white-space: nowrap; }
.type-card .price[b-4pdvr3xyiy] { color: var(--gold-hi); white-space: nowrap; }

/* ---- map picker ---- */
/* Docked on the left, in the page flow right under the header (so it never overlaps the title plate), with the
   previewed map visible beside it. It shrinks and scrolls if the window is short. */
.picker[b-4pdvr3xyiy] {
    align-self: flex-start;
    margin: 14px 0 auto;
    flex: 0 1 auto;
    min-height: 0;
    width: min(540px, calc(100vw - 32px));
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 22px;
    z-index: 5;
}
.picker > *[b-4pdvr3xyiy] { flex-shrink: 0; } /* the panel scrolls; its sections keep their height */
.picker[b-4pdvr3xyiy]::before, .picker[b-4pdvr3xyiy]::after { display: none; }
.picker-title[b-4pdvr3xyiy] {
    font-family: 'Limelight', 'Georgia', serif;
    font-size: 30px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold-hi);
    text-shadow: 0 2px 0 #5a2a00, 0 0 18px rgba(255, 190, 80, 0.55);
}
.picker-row[b-4pdvr3xyiy] { display: flex; gap: 8px; align-items: center; }
.seed-input[b-4pdvr3xyiy] {
    flex: 1;
    font: inherit;
    font-size: 16px;
    color: var(--cream);
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--gold);
    border-radius: 4px;
    padding: 4px 10px;
}
.seed-input:focus[b-4pdvr3xyiy] { outline: none; border-color: var(--teal); box-shadow: 0 0 10px rgba(63, 242, 230, 0.35); }
.picker-label-row[b-4pdvr3xyiy] { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.mini.small[b-4pdvr3xyiy] { font-size: 12px; padding: 1px 8px; }
.presets[b-4pdvr3xyiy] { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.presets .mini[b-4pdvr3xyiy] { white-space: nowrap; }
.presets .mini small[b-4pdvr3xyiy] { margin-left: 4px; opacity: 0.6; font-size: 11px; }
.preview[b-4pdvr3xyiy] {
    min-height: 110px;
    padding: 10px 12px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--gold-dark);
    border-radius: 4px;
}
.preview-head[b-4pdvr3xyiy] { display: flex; align-items: baseline; gap: 12px; }
.preview-name[b-4pdvr3xyiy] {
    font-family: 'Limelight', 'Georgia', serif;
    font-size: 24px;
    letter-spacing: 2px;
    color: var(--gold-hi);
    text-shadow: 0 0 12px rgba(255, 190, 80, 0.45);
}
.preview-size[b-4pdvr3xyiy] { font-size: 16px; font-weight: 700; color: var(--teal); }
.preview-section[b-4pdvr3xyiy] {
    margin: 10px 0 4px;
    font-size: 11px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--gold);
}
.preview-section small[b-4pdvr3xyiy] { letter-spacing: 0.4px; text-transform: none; font-size: 12px; color: var(--cream); opacity: 0.7; }
.seed-grid[b-4pdvr3xyiy] { display: grid; gap: 6px; }
.seed-grid.cols-3[b-4pdvr3xyiy] { grid-template-columns: repeat(3, 1fr); }
.seed-grid.cols-5[b-4pdvr3xyiy] { grid-template-columns: repeat(5, 1fr); }
.seed-grid .cell.none[b-4pdvr3xyiy] { opacity: 0.35; }
.seed-waves[b-4pdvr3xyiy] { display: flex; flex-wrap: wrap; gap: 5px; }
.seed-wave[b-4pdvr3xyiy] {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 9px 2px 7px;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
    border-radius: 10px;
    white-space: nowrap;
}
.seed-wave .dot[b-4pdvr3xyiy] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
}
.go:disabled[b-4pdvr3xyiy] { opacity: 0.45; cursor: default; filter: none; }

/* ---- selection stat grid ---- */
.stat-grid[b-4pdvr3xyiy] {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(122px, 1fr));
    gap: 6px 8px;
    margin: 6px 0 2px;
}
.cell[b-4pdvr3xyiy] {
    display: flex;
    flex-direction: column;
    padding: 3px 8px 4px;
    background: rgba(0, 0, 0, 0.28);
    border-left: 3px solid var(--tone);
    border-radius: 3px;
    min-width: 0;
}
.cell-label[b-4pdvr3xyiy] {
    font-size: 10px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--cream);
    opacity: 0.65;
}
.cell-value[b-4pdvr3xyiy] {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--tone);
    white-space: nowrap;
}
.cell-sub[b-4pdvr3xyiy] {
    font-size: 11px;
    color: var(--tone);
    opacity: 0.8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Tones follow the board: yellow damage spots, purple range spots, blue slow and red speed spots, green money,
   gold checkpoints and prices, cyan teleports. */
.tone-damage[b-4pdvr3xyiy] { --tone: #ffd25e; }
.tone-range[b-4pdvr3xyiy] { --tone: #c9a0ff; }
.tone-slow[b-4pdvr3xyiy] { --tone: #7fb0ff; }
.tone-haste[b-4pdvr3xyiy] { --tone: #ff7f72; }
.tone-gold[b-4pdvr3xyiy] { --tone: var(--gold-hi); }
.tone-teleport[b-4pdvr3xyiy] { --tone: #50e6ff; }
.tone-speed[b-4pdvr3xyiy] { --tone: #7fe3ff; }
.tone-money[b-4pdvr3xyiy] { --tone: #5aeb78; }
.tone-kills[b-4pdvr3xyiy] { --tone: #ff8fb3; }
.tone-neutral[b-4pdvr3xyiy] { --tone: #f3e6c8; }
.info-text.note[b-4pdvr3xyiy] {
    font-size: 13px;
    color: var(--teal);
}

/* ---- sell confirmation ---- */
.confirm[b-4pdvr3xyiy] {
    position: absolute;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    z-index: 6;
}
.confirm-text[b-4pdvr3xyiy] {
    font-size: 17px;
    color: var(--gold-hi);
    text-align: center;
    max-width: 420px;
}
.confirm-row[b-4pdvr3xyiy] { display: flex; gap: 10px; }

@media (max-width: 1000px) {
    .stats[b-4pdvr3xyiy] { gap: 12px; padding: 6px 12px; }
    .value[b-4pdvr3xyiy] { font-size: 20px; }
    .info[b-4pdvr3xyiy], .info.wide[b-4pdvr3xyiy] { width: 100%; }
    .rotation[b-4pdvr3xyiy] { width: min(440px, calc(100vw - 32px)); max-height: 50vh; }
    .wave[b-4pdvr3xyiy] { min-width: 0; }
}

/* ---- title card and main menu ---- */
/* Full-screen over the slowly orbiting city: a vignette keeps the menu readable. */
.splash[b-4pdvr3xyiy], .main-menu[b-4pdvr3xyiy] {
    position: fixed;
    inset: 0;
    z-index: 20;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 26px;
    padding: 16px;
    background: radial-gradient(ellipse at 50% 45%, rgba(12, 4, 22, 0.1) 0%, rgba(8, 3, 16, 0.62) 62%, rgba(4, 2, 10, 0.9) 100%);
}
.splash[b-4pdvr3xyiy] {
    cursor: pointer;
    gap: 0;
    background: radial-gradient(ellipse at 50% 45%, rgba(12, 4, 22, 0.45) 0%, rgba(6, 2, 12, 0.92) 75%);
}
.menu-logo[b-4pdvr3xyiy] { display: flex; flex-direction: column; align-items: center; text-align: center; }
.menu-title[b-4pdvr3xyiy] {
    font-family: 'Limelight', 'Georgia', serif;
    font-size: clamp(46px, 8.5vw, 108px);
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold-hi);
    text-shadow: 0 4px 0 #5a2a00, 0 0 42px rgba(255, 190, 80, 0.6);
}
.menu-sub[b-4pdvr3xyiy] {
    margin-top: 8px;
    font-size: clamp(15px, 2.1vw, 26px);
    letter-spacing: 0.7em;
    color: var(--teal);
    text-shadow: 0 0 12px rgba(63, 242, 230, 0.8);
}
.menu-tag[b-4pdvr3xyiy] { margin-top: 14px; font-size: 15px; letter-spacing: 1px; color: var(--cream); opacity: 0.8; }
.splash-hint[b-4pdvr3xyiy] {
    margin-top: 48px;
    font-size: 17px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--cream);
    animation: splash-blink-b-4pdvr3xyiy 1.6s ease-in-out infinite;
}
@keyframes splash-blink-b-4pdvr3xyiy { 50% { opacity: 0.3; } }
.menu-panel[b-4pdvr3xyiy] {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(440px, calc(100vw - 32px));
    box-sizing: border-box;
    padding: 18px 22px;
}
.menu-user[b-4pdvr3xyiy] { text-align: center; font-size: 14px; color: var(--teal); }
.menu-user b[b-4pdvr3xyiy] { color: var(--gold-hi); }
.menu-item[b-4pdvr3xyiy] {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 10px;
    padding: 8px 14px 9px;
    text-align: left;
    color: var(--cream);
    background: linear-gradient(180deg, rgba(40, 20, 70, 0.95), rgba(16, 8, 30, 0.95));
    border: 1px solid var(--gold-dark);
    border-radius: 4px;
    cursor: pointer;
}
.menu-item.primary[b-4pdvr3xyiy] { border-color: var(--gold); box-shadow: inset 0 0 18px rgba(255, 170, 70, 0.14); }
.menu-item:hover:not(:disabled)[b-4pdvr3xyiy] { border-color: var(--teal); box-shadow: 0 0 14px rgba(63, 242, 230, 0.35); }
.menu-item:disabled[b-4pdvr3xyiy] { opacity: 0.45; cursor: default; }
.menu-name[b-4pdvr3xyiy] {
    grid-column: 1;
    font-family: 'Limelight', 'Georgia', serif;
    font-size: 21px;
    letter-spacing: 1px;
    color: var(--gold-hi);
}
.menu-desc[b-4pdvr3xyiy] { grid-column: 1; font-size: 12px; opacity: 0.78; }
.menu-item .badge[b-4pdvr3xyiy] {
    grid-column: 2;
    grid-row: 1 / 3;
    padding: 2px 9px;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid var(--gold-dark);
    border-radius: 10px;
}
.menu-item .badge.lock[b-4pdvr3xyiy] { color: #ff9b8a; border-color: #b0503f; }
.menu-note[b-4pdvr3xyiy] { margin-top: 2px; font-size: 12px; text-align: center; color: var(--teal); }
.title-user[b-4pdvr3xyiy] { margin-top: 4px; font-size: 12px; letter-spacing: 1px; color: var(--cream); opacity: 0.85; }
.go-status[b-4pdvr3xyiy] { font-size: 15px; color: var(--teal); text-align: center; max-width: 460px; }

/* ---- replay bar (watching a stored game) ---- */
.replay-bar[b-4pdvr3xyiy] {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: min(620px, 92vw);
    padding: 10px 16px 12px;
}
.replay-head[b-4pdvr3xyiy] { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.replay-label[b-4pdvr3xyiy] {
    font-family: 'Limelight', 'Georgia', serif;
    font-size: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold-hi);
    text-shadow: 0 2px 0 #5a2a00, 0 0 12px rgba(255, 190, 80, 0.45);
}
.replay-title[b-4pdvr3xyiy] { font-weight: 700; }
.replay-result[b-4pdvr3xyiy] { margin-left: auto; font-size: 13px; opacity: 0.9; }
.replay-result.status-verified[b-4pdvr3xyiy] { color: #7dffb0; }
.replay-result.status-mismatch[b-4pdvr3xyiy] { color: #ffd25e; }
.replay-result.status-rejected[b-4pdvr3xyiy] { color: #ff9b8a; }
.replay-row[b-4pdvr3xyiy] { display: flex; align-items: center; gap: 10px; }
.replay-play[b-4pdvr3xyiy] { min-width: 46px; padding: 4px 10px; }
.replay-time[b-4pdvr3xyiy] { font-variant-numeric: tabular-nums; font-size: 14px; min-width: 42px; text-align: center; }
.replay-scrub[b-4pdvr3xyiy] { flex: 1; min-width: 160px; accent-color: var(--teal); cursor: pointer; }
.replay-note[b-4pdvr3xyiy] { font-size: 13px; color: var(--teal); }
.replay-note.warn[b-4pdvr3xyiy] { color: #ffd25e; }

/* ---- tutorials ---- */
/* The goal bar: under the title plate, on the left, above the board. */
.tutorial-bar[b-4pdvr3xyiy] {
    align-self: flex-start;
    margin: 12px 0 auto;
    width: min(360px, calc(100vw - 32px));
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 16px 12px;
}
.tutorial-head[b-4pdvr3xyiy] { display: flex; flex-direction: column; }
.tutorial-label[b-4pdvr3xyiy] { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--teal); }
.tutorial-title[b-4pdvr3xyiy] {
    font-family: 'Limelight', 'Georgia', serif;
    font-size: 22px;
    letter-spacing: 1px;
    color: var(--gold-hi);
    text-shadow: 0 0 12px rgba(255, 190, 80, 0.45);
}
.tutorial-goal[b-4pdvr3xyiy] { font-size: 14px; }
.tutorial-meter[b-4pdvr3xyiy] {
    height: 7px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--gold-dark);
    border-radius: 3px;
    overflow: hidden;
}
.tutorial-meter-fill[b-4pdvr3xyiy] {
    height: 100%;
    background: linear-gradient(90deg, #ff8fb3, var(--gold-hi));
    box-shadow: 0 0 8px rgba(255, 143, 179, 0.6);
    transition: width 0.3s;
}
.tutorial-meter-fill.full[b-4pdvr3xyiy] { background: linear-gradient(90deg, #5aeb78, var(--teal)); box-shadow: 0 0 10px rgba(90, 235, 120, 0.7); }
.tutorial-brief[b-4pdvr3xyiy] { font-size: 13px; line-height: 1.35; max-height: 40vh; overflow-y: auto; }
.tutorial-brief p[b-4pdvr3xyiy] { margin: 4px 0; }
.tutorial-bar .wave-row[b-4pdvr3xyiy] { justify-content: flex-start; flex-wrap: wrap; gap: 6px; }

/* The browser: over the orbiting city like the main menu, a list on the left and the chosen tutorial's brief on the right. */
.tutorials-screen[b-4pdvr3xyiy] {
    position: fixed;
    inset: 0;
    z-index: 20;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: radial-gradient(ellipse at 50% 45%, rgba(12, 4, 22, 0.2) 0%, rgba(8, 3, 16, 0.66) 62%, rgba(4, 2, 10, 0.9) 100%);
}
.tutorials[b-4pdvr3xyiy] {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(980px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    box-sizing: border-box;
    padding: 16px 22px;
}
.tutorials[b-4pdvr3xyiy]::before, .tutorials[b-4pdvr3xyiy]::after { display: none; }
.tutorials-head[b-4pdvr3xyiy] { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tutorials-count[b-4pdvr3xyiy] { font-size: 14px; color: var(--teal); }
.tutorials-tabs[b-4pdvr3xyiy] { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tutorials-tabs .mini[b-4pdvr3xyiy] { font-size: 14px; padding: 3px 12px; }
.tutorials-tabs .mini small[b-4pdvr3xyiy] { margin-left: 4px; opacity: 0.65; }
.tutorials-search[b-4pdvr3xyiy] { flex: 1; min-width: 180px; font-size: 14px; }
.tutorials-body[b-4pdvr3xyiy] { display: grid; grid-template-columns: minmax(250px, 2fr) 3fr; gap: 14px; min-height: 0; flex: 1; }
.tutorials-list[b-4pdvr3xyiy] {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    max-height: min(62vh, 640px);
    padding-right: 4px;
}
.tutorial-entry[b-4pdvr3xyiy] {
    display: grid;
    grid-template-columns: 26px 1fr auto;
    align-items: baseline;
    column-gap: 8px;
    padding: 5px 10px 6px;
    text-align: left;
    color: var(--cream);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--gold-dark);
    border-left: 3px solid var(--accent);
    border-radius: 3px;
    cursor: pointer;
}
.tutorial-entry:hover[b-4pdvr3xyiy] { border-color: var(--gold-hi); border-left-color: var(--accent); }
.tutorial-entry.on[b-4pdvr3xyiy] { border-color: var(--teal); border-left-color: var(--accent); box-shadow: 0 0 10px rgba(63, 242, 230, 0.3); }
.tutorial-number[b-4pdvr3xyiy] { font-size: 12px; opacity: 0.6; text-align: right; font-variant-numeric: tabular-nums; }
.tutorial-name[b-4pdvr3xyiy] { font-weight: 700; color: var(--gold-hi); }
.tutorial-check[b-4pdvr3xyiy] { color: #5aeb78; font-weight: 700; }
.tutorial-summary[b-4pdvr3xyiy] { grid-column: 2 / 4; font-size: 12px; opacity: 0.75; }
.tutorial-entry.done .tutorial-name[b-4pdvr3xyiy] { color: #b6f5c4; }
.tutorial-detail[b-4pdvr3xyiy] {
    overflow-y: auto;
    max-height: min(62vh, 640px);
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--gold-dark);
    border-top: 3px solid var(--accent);
    border-radius: 4px;
}
.tutorial-detail-label[b-4pdvr3xyiy] { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--teal); }
.tutorial-text[b-4pdvr3xyiy] { margin: 8px 0; font-size: 14px; line-height: 1.4; }
.tutorial-detail .seed-grid[b-4pdvr3xyiy] { margin-top: 10px; }
.tutorial-start[b-4pdvr3xyiy] { margin-top: 12px; justify-content: flex-start; }
.tutorial-start .go[b-4pdvr3xyiy] { font-size: 16px; padding: 6px 22px; }
.menu-item .badge.done[b-4pdvr3xyiy] { color: #5aeb78; border-color: #2f8a46; }
.tutorial-result[b-4pdvr3xyiy] { max-width: min(620px, calc(100vw - 32px)); text-align: center; }
.tutorial-result .wave-row[b-4pdvr3xyiy] { flex-wrap: wrap; justify-content: center; }
.tutorial-result .go-title[b-4pdvr3xyiy] { font-size: 36px; }

@media (max-width: 720px) {
    .tutorials-body[b-4pdvr3xyiy] { grid-template-columns: 1fr; }
    .tutorials-list[b-4pdvr3xyiy] { max-height: 32vh; }
}
