/* AVA Scam Hunter — DOM-based static SPA (DEC-120 v2 iteration 2026-05-10).
   Brand register per CLAUDE.md rules 24-26: institutional trust on the chrome
   (HUD, title-box, end-box) — dark + silver, rounded chrome per DEC-154
   (soft 8px corner token scale), thin borders. The play-area is the game
   canvas: it gets per-round colour and SVG scenery; pure pixel-art / play-field
   art stays unrounded. Risk colours (green/yellow/orange/red) only for game
   feedback states. */

:root {
    /* AVA palette — 2026-05-15 dual-tone (Proton Monokai accents
       on AVA neutral backgrounds).
       Aligned with src/ava/ui/static/style.css (see that file's
       :root for full rationale). Coral = action; mint = trust/active. */
    --bg: #0A0A0A;                /* true black, neutral */
    --surface: #1F1F1F;
    --border: #2E2E2E;
    --border-strong: #3A3A3A;
    --text-primary: #EBEEF2;
    --text-secondary: #9C9C9C;
    --text-muted: #67627A;        /* Mauve Slate plumbing */
    --silver: #67627A;            /* legacy alias */
    --accent: #e53265;            /* Coral — primary brand voice / CTAs */
    --accent-light: #f04a7a;
    --accent-2: #2fd6b5;          /* Mint — active state / trust pin (no CTAs) */
    --accent-2-light: #4fe0c5;
    --interaction-weak: #2E2E2E;  /* Secondary-button fill (neutral grey) */
    --hit: #00E676;               /* RAG safe — electric mint-green */
    --warn: #FFEC00;              /* RAG caution — electric yellow */
    --miss: #FF2A45;              /* RAG danger — vivid red */
    --powerup: #e53265;           /* Brand coral — was magenta, originally blue */
    /* Legacy `--orange` alias — preserved so older rules referencing it
       render the new brand coral. Phase out by switching to `--accent`. */
    --orange: #e53265;
    /* Radius token scale (DEC-154, 2026-06-08) — soft rounded chrome.
       Mirrors src/ava/ui/static/style.css :root. */
    --radius: 8px;        /* default: cards, boxes, buttons, HUD panels, inputs */
    --radius-sm: 5px;     /* small chips / tiny badges */
    --radius-pill: 999px; /* status pills, health/combo chips that read as status */
    --radius-lg: 12px;    /* large overlays: modal/dialog/end-screen panels */
}

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

html, body {
    background: var(--bg);
    color: var(--text-secondary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    min-height: 100vh;
}

#app { width: 100%; min-height: 100vh; display: flex; flex-direction: column; }

.screen { display: none; }
.screen.visible { display: flex; flex-direction: column; flex: 1; }

/* -- Title screen ------------------------------------------------------- */

#title-screen {
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(ellipse at top, #1a2440 0%, #0a0f1c 60%, #0A0A0A 100%);
    position: relative;
    overflow: hidden;
}

/* CRT scanlines for arcade feel */
#title-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(255,255,255,0.025) 0px,
        rgba(255,255,255,0.025) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
}

.title-box {
    max-width: 820px;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(20, 23, 28, 0.85);
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.banner {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--hit);
    margin-bottom: 0.6rem;
    font-family: monospace;
}

.title {
    font-weight: 700;
    font-size: 2.8rem;
    letter-spacing: 0.06em;
    color: var(--text-primary);
    margin-bottom: 0.85rem;
    /* neon glow */
    text-shadow:
        0 0 6px rgba(74, 222, 128, 0.6),
        0 0 16px rgba(74, 222, 128, 0.3);
    font-family: monospace;
}

.subtitle {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.target-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

/* Each target card is now an <a> link to the academy stub for that
   target type — the cards double as a quick-reference index. */
.target-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    /* Larger padding for 44×44 tap target on mobile. Audit 2026-05-14
       found that 0.7rem×0.5rem padding produced cards ~32px tall, below
       the WCAG / Apple HIG minimum. Cards double as both the title-
       screen visual index and as tap targets, so they need to be
       comfortably tappable. */
    padding: 0.9rem 0.55rem;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.target-card:hover {
    border-color: var(--silver);
    background: var(--surface);
    transform: translateY(-2px);
}

.target-card .t-icon { font-size: 1.4rem; line-height: 1; }
.target-card .t-name { color: var(--text-primary); font-weight: 500; }
.target-card .t-pts { color: var(--text-muted); font-size: 0.7rem; }

.target-card.r2 { border-color: var(--border); opacity: 0.9; }
.target-card.r3 { opacity: 0.8; }
.target-card.r4 { opacity: 0.7; }
.target-card.r5 { opacity: 0.6; }
.target-card:hover { opacity: 1; }

.academy-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: -0.5rem 0 1.25rem;
    letter-spacing: 0.02em;
}
.academy-hint a {
    color: var(--hit);
    text-decoration: none;
}
.academy-hint a:hover { text-decoration: underline; }

.rules {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

.hero-input {
    display: block;
    margin-bottom: 1.25rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.hero-input input {
    margin-left: 0.5rem;
    background: var(--bg);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.45rem 0.7rem;
    font-family: inherit;
    font-size: 0.85rem;
    width: 220px;
}

/* Primary CTA — orange-on-black-with-grey-border treatment matching
   the landing-page entry-point CTAs for cross-surface brand consistency. */
.cta {
    background: var(--bg);
    color: var(--orange);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: monospace;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.85rem 2rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.cta:hover {
    border-color: var(--accent);
    background: rgba(229, 50, 101, 0.10);
}

.cta-secondary {
    background: transparent;
    color: var(--silver);
    border: 1px solid var(--silver);
    border-radius: var(--radius);
    font-family: inherit;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.7rem 1.5rem;
    cursor: pointer;
}

.cta-secondary:hover { background: var(--surface); }

/* Persistent "back to AVA" home link — top-left on every game surface
   so navigation back to the main site is always one click away. Matches
   the academy back-to-ava treatment. */
.back-to-ava {
    display: inline-block;
    font-family: monospace;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid var(--border);
    /* WCAG 2.1 / Apple HIG minimum tap target = 44×44 logical pixels.
       Previously 0.4rem (6.4px) vertical padding + 0.78rem text ≈ 25px
       tall — failed mobile accessibility. (Touch-target audit 2026-05-14.)
       0.7rem padding + 0.78rem text + 2px border = ~36px tall; combined
       with the text height we land at ~44px effective. */
    padding: 0.7rem 1rem;
    min-height: 44px;
    min-width: 44px;
    box-sizing: border-box;
    border-radius: var(--radius);
    transition: border-color 0.15s, color 0.15s;
}
.back-to-ava:hover {
    border-color: var(--orange);
    color: var(--orange);
}

.meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 1.25rem;
    letter-spacing: 0.04em;
}

.audio-toggles {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    margin-top: 0.85rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.audio-toggles input { margin-right: 0.4rem; }

/* -- HUD --------------------------------------------------------------- */

.hud {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 0.75rem;
    z-index: 5;
}

.hud-left, .hud-right { min-width: 200px; }
.hud-row { font-size: 0.74rem; line-height: 1.5; color: var(--text-muted); }
.hud-centre { text-align: center; flex: 1; }
.hud-score-label { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.1em; }
.hud-score { font-size: 1.85rem; color: var(--warn); font-weight: 700; line-height: 1.05; font-family: monospace; }
.hud-best { font-size: 0.72rem; color: var(--silver); margin-top: 0.2rem; }

/* Powerup stack — one badge per active powerup, stacked vertically so
   multiple can show at once (e.g. Decoy Shield + Sanctions Freeze). */
.powerup-stack {
    display: flex;
    flex-direction: column;
    gap: 1px;
    z-index: 4;
}

.powerup-stack.hidden { display: none; }

.powerup-badge {
    color: var(--bg);
    text-align: center;
    padding: 0.45rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: monospace;
}

.powerup-badge.pb-scanner { background: #60a5fa; }   /* blue */
.powerup-badge.pb-shield  { background: #a855f7; }   /* purple */
.powerup-badge.pb-freeze  { background: #38bdf8; color: #0d2a3a; } /* cyan-ice */
.powerup-badge.pb-intel   { background: #4ade80; color: #052e16; } /* green */

/* -- Play area --------------------------------------------------------- */

.play-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    cursor: none;            /* hide system cursor; we render a crosshair */
    min-height: 520px;
    background: linear-gradient(180deg, #0a1020 0%, #1a2440 70%, #0a1a0e 100%);
}

.play-area[data-round="2"] { background: linear-gradient(180deg, #1a1530 0%, #5a2a3a 60%, #1a0a0a 100%); }
.play-area[data-round="3"] { background: linear-gradient(180deg, #0a1a25 0%, #0c2535 60%, #0a1a0e 100%); }
.play-area[data-round="4"] { background: linear-gradient(180deg, #0a0e1a 0%, #1a1f3a 60%, #0a0d12 100%); }
.play-area[data-round="5"] { background: linear-gradient(180deg, #2a0a0a 0%, #1a0a0a 60%, #0A0A0A 100%); }

/* SVG scenery — sits behind everything in play-area */
.scenery {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.scenery svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Player anchored on the right */
.player-anchor {
    position: absolute;
    right: 24px;
    bottom: 8px;
    width: 96px;
    height: auto;
    z-index: 3;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

.player-anchor svg { width: 100%; height: auto; display: block; }

.player-callout {
    position: absolute;
    right: 24px;
    bottom: 0;
    background: var(--surface);
    border: 1px solid var(--silver);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0.2rem 0.55rem;
    font-size: 0.68rem;
    font-family: monospace;
    letter-spacing: 0.08em;
    z-index: 4;
    pointer-events: none;
    text-transform: uppercase;
}

/* Crosshair overlay (follows mouse via JS) */
.crosshair {
    position: absolute;
    width: 60px;
    height: 60px;
    z-index: 6;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: transform 0.05s;
}

.crosshair svg { width: 100%; height: 100%; display: block; }

/* Play-area centred overlay (round-intro / round-cleared) */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 10;
}

.play-overlay.hidden { display: none; }

/* Round-intro splash card */
.round-intro {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20, 23, 28, 0.92);
    border: 2px solid var(--hit);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    padding: 1.5rem 2.5rem;
    text-align: center;
    z-index: 12;
    min-width: 280px;
    /* Hard ceiling — never overflow the viewport on iPhone-sized screens.
       Previously the modal could push past the right edge when player
       anchored on the right + 280px min-width didn't leave room.
       (Mobile-rendering audit 2026-05-14.) */
    max-width: calc(100vw - 2rem);
    box-sizing: border-box;
    animation: round-intro 0.4s ease-out;
}

.round-intro .ri-round {
    font-family: monospace;
    color: var(--hit);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    margin-bottom: 0.4rem;
}

.round-intro .ri-name {
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    font-family: monospace;
    text-shadow: 0 0 6px rgba(74, 222, 128, 0.4);
}

.round-intro .ri-prompt {
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
}

.round-intro.hidden { display: none; }

@keyframes round-intro {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Round-cleared modal (between rounds) */
.round-cleared {
    position: absolute;
    inset: 0;
    background: rgba(13, 14, 16, 0.85);
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
}

.round-cleared.hidden { display: none; }

.rc-card {
    background: var(--surface);
    border: 2px solid var(--hit);
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    text-align: center;
    max-width: 520px;
    width: 100%;
}

.rc-headline {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--hit);
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
    font-family: monospace;
}

.rc-stats {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}

.rc-flavour {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* -- Targets (sprite-based) -------------------------------------------- */

/* Outer .target = positioning + horizontal motion via CSS keyframe animation
   (the keyframe reads --move-distance set inline by JS). Inner .t-sprite =
   idle bob via separate CSS keyframe. Two transforms on two elements means
   they don't conflict. We use animations rather than transitions because
   transitions require a committed "before" state which is unreliable when
   the element was just appended (rAF can be throttled in some contexts). */
.target {
    position: absolute;
    width: 88px;
    height: auto;
    cursor: none;            /* we render the crosshair */
    user-select: none;
    z-index: 2;
    will-change: transform, opacity;
    opacity: 0;
    /* The animation property is set inline by JS per movement profile,
       e.g. `animation: move-target var(--move-duration) linear forwards`. */
}

@keyframes move-target {
    0% {
        transform: translateX(0);
        opacity: 0;
    }
    8% {
        opacity: 1;
    }
    100% {
        transform: translateX(var(--move-distance, 0px));
        opacity: 1;
    }
}

.target .t-sprite {
    width: 100%;
    display: block;
    will-change: transform;
}

.target .t-sprite svg {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

.target:hover .t-sprite svg { filter: drop-shadow(0 0 8px var(--warn)); }

/* Label extends beyond the 88px sprite when the type name is longer
   ("Phishing Domain", "Brand Impostor", etc.) — no more ellipsis truncation.
   Position absolute + translateX(-50%) keeps it centred under the sprite
   regardless of width. */
.target .t-label-box {
    position: absolute;
    left: 50%;
    bottom: -22px;
    transform: translateX(-50%);
    background: var(--miss);
    color: #fff;
    font-size: 0.62rem;
    font-family: monospace;
    letter-spacing: 0.05em;
    padding: 0.18rem 0.5rem;
    border-radius: var(--radius-sm);
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;       /* clicks pass through to the sprite */
}

@keyframes target-hit {
    0%   { transform: scale(1) rotate(0); opacity: 1; }
    50%  { transform: scale(1.3) rotate(-8deg); opacity: 1; }
    100% { transform: scale(0.4) rotate(20deg) translateY(60px); opacity: 0; }
}

@keyframes target-escape {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}

/* The hit animation needs to override the inline transform from the
   movement transition. Setting `transition: none !important` and giving
   the keyframe explicit transform values does that. */
.target.hit {
    animation: target-hit 0.55s ease-out forwards;
    transition: none !important;
    pointer-events: none;
}
.target.escape {
    animation: target-escape 0.6s ease-in forwards;
    pointer-events: none;
}

/* Idle bob lives on the inner sprite so it doesn't fight the parent's
   horizontal transform. */
@keyframes sprite-idle {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

.target:not(.hit):not(.escape) .t-sprite {
    animation: sprite-idle 1.4s ease-in-out infinite;
}

/* -- Combat text ------------------------------------------------------- */

.combat-text {
    position: absolute;
    color: var(--hit);
    font-weight: 700;
    font-size: 1.15rem;
    pointer-events: none;
    animation: combat-rise 1.1s ease-out forwards;
    z-index: 20;
    text-shadow:
        -1px -1px 0 #000,
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000,
         0 0 6px rgba(0,0,0,0.5);
    font-family: monospace;
    transform: translateX(-50%);
    white-space: nowrap;
}

.combat-text.miss { color: var(--miss); }
.combat-text.flavour { color: var(--warn); font-size: 0.95rem; }
.combat-text.boss { color: var(--miss); font-size: 1.4rem; }

@keyframes combat-rise {
    0%   { transform: translateX(-50%) translateY(0); opacity: 1; }
    20%  { transform: translateX(-50%) translateY(-8px); opacity: 1; }
    100% { transform: translateX(-50%) translateY(-60px); opacity: 0; }
}

/* -- Powerup pickup ---------------------------------------------------- */

/* Powerup pickup: the floating prize the player clicks to activate.
   Per-type border + glow so players can tell which powerup they're
   about to grab from a distance. */
.powerup-pickup {
    position: absolute;
    width: 56px;
    height: 56px;
    border: 2px solid var(--powerup);
    border-radius: var(--radius);
    background: var(--surface);
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: none;
    animation: powerup-pulse 1s infinite ease-in-out;
    z-index: 4;
}

.powerup-pickup.pp-scanner { border-color: #60a5fa; box-shadow: 0 0 12px rgba(96, 165, 250, 0.7); }
.powerup-pickup.pp-shield  { border-color: #a855f7; box-shadow: 0 0 12px rgba(168, 85, 247, 0.7); }
.powerup-pickup.pp-freeze  { border-color: #38bdf8; box-shadow: 0 0 12px rgba(56, 189, 248, 0.7); }
.powerup-pickup.pp-intel   { border-color: #4ade80; box-shadow: 0 0 12px rgba(74, 222, 128, 0.7); }

@keyframes powerup-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.18); }
}

/* -- Ticker ------------------------------------------------------------ */

.ticker {
    display: flex;
    align-items: center;
    background: var(--bg);
    border-top: 1px solid var(--border);
    overflow: hidden;
    font-size: 0.82rem;
    color: var(--warn);
    height: 36px;
    flex-shrink: 0;
    z-index: 5;
}

.ticker-label {
    background: var(--miss);
    color: #fff;
    padding: 0.4rem 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    flex-shrink: 0;
    font-family: monospace;
}

.ticker-text {
    padding-left: 1rem;
    white-space: nowrap;
    animation: ticker-scroll 60s linear infinite;
}

@keyframes ticker-scroll {
    from { transform: translateX(100vw); }
    to   { transform: translateX(-100%); }
}

/* -- End screen --------------------------------------------------------- */

#end-screen { align-items: center; justify-content: center; padding: 2rem 1rem; background: radial-gradient(ellipse at top, #1a1530 0%, #0a0f1c 60%, #0A0A0A 100%); }

.end-box {
    max-width: 640px;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    padding: 2.5rem 2rem;
    text-align: center;
}

.end-headline {
    font-size: 1.8rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    font-family: monospace;
}

.end-headline.fail { color: var(--miss); text-shadow: 0 0 8px rgba(248, 113, 113, 0.4); }
.end-headline.win  { color: var(--hit);  text-shadow: 0 0 8px rgba(74, 222, 128, 0.4); }

.end-flavour {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
    line-height: 1.6;
    font-style: italic;
}

.end-score-label {
    font-size: 0.74rem;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.end-score {
    font-size: 3.2rem;
    color: var(--warn);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 0.5rem;
    font-family: monospace;
}

.end-stats {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    letter-spacing: 0.04em;
}

.end-actions { display: flex; gap: 0.75rem; justify-content: center; margin-bottom: 2rem; flex-wrap: wrap; }

.end-funnel {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    text-align: left;
}

.funnel-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

#end-academy-links { list-style: none; margin: 0; padding: 0; }
#end-academy-links li { padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
#end-academy-links li:last-child { border-bottom: none; }
#end-academy-links a { color: var(--silver); text-decoration: none; font-size: 0.88rem; }
#end-academy-links a:hover { color: var(--text-primary); }

.end-cta {
    margin-top: 1.75rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.end-cta a { color: var(--silver); }
.end-cta a:hover { color: var(--text-primary); }

/* =====================================================================
   ARCADE UPLIFT (2026-06-08)
   Agent select · global threat map · HP/combo/super HUD · boss · ranks
   ===================================================================== */

.blink { animation: cta-blink 1.1s steps(2, start) infinite; }
@keyframes cta-blink { 50% { opacity: 0.35; } }

.rank-line {
    font-family: monospace;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    color: var(--accent-2);
    margin-bottom: 1.25rem;
    text-transform: uppercase;
}
.rank-line span { color: var(--text-primary); font-weight: 700; }

/* -- High-score board (title + end) ----------------------------------- */
.hiscore-board {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    padding: 1rem 1.1rem;
    margin: 1.25rem auto;
    max-width: 420px;
    text-align: left;
}
.hiscore-title {
    font-family: monospace;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    color: var(--warn);
    text-align: center;
    margin-bottom: 0.6rem;
}
.hiscore-list { list-style: none; margin: 0; padding: 0; counter-reset: hs; }
.hiscore-list li {
    display: grid;
    grid-template-columns: 1.6rem 3ch 1fr auto;
    gap: 0.5rem;
    align-items: baseline;
    font-family: monospace;
    font-size: 0.82rem;
    padding: 0.22rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}
.hiscore-list li:last-child { border-bottom: none; }
.hiscore-list li::before {
    counter-increment: hs; content: counter(hs) ".";
    color: var(--text-muted); text-align: right;
}
.hiscore-list .hs-who { color: var(--accent); font-weight: 700; letter-spacing: 0.1em; }
.hiscore-list .hs-score { color: var(--warn); text-align: left; }
.hiscore-list .hs-meta { color: var(--text-muted); font-size: 0.68rem; text-align: right; }
.hiscore-list .hiscore-empty {
    grid-template-columns: 1fr; display: block; color: var(--text-muted);
    text-align: center; font-style: italic;
}
.hiscore-list .hiscore-empty::before { content: ''; counter-increment: none; }

/* -- Field guide (collapsible target index) --------------------------- */
.field-guide { margin-top: 1.5rem; text-align: left; }
.field-guide > summary {
    cursor: pointer;
    font-family: monospace;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 0.6rem 0;
    text-align: center;
    list-style: none;
}
.field-guide > summary:hover { color: var(--text-primary); }
.field-guide[open] > summary { color: var(--accent-2); margin-bottom: 0.75rem; }

/* -- Select screen ---------------------------------------------------- */
#select-screen, #map-screen {
    align-items: center; justify-content: center; padding: 2rem 1rem;
    background: radial-gradient(ellipse at top, #1a2440 0%, #0a0f1c 60%, #0A0A0A 100%);
    position: relative; overflow-y: auto;
}
.select-box, .map-box {
    max-width: 860px; width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(20, 23, 28, 0.9);
    padding: 2rem; text-align: center; position: relative; z-index: 1;
}
.select-title {
    font-family: monospace; font-size: 1.9rem; font-weight: 700;
    letter-spacing: 0.06em; color: var(--text-primary); margin-bottom: 1.5rem;
    text-shadow: 0 0 8px rgba(229, 50, 101, 0.35);
}
.select-sub {
    font-family: monospace; font-size: 0.78rem; letter-spacing: 0.18em;
    color: var(--text-muted); margin: 1.5rem 0 0.6rem; text-transform: uppercase;
}

.agent-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.agent-card {
    border: 1px solid var(--border); background: var(--bg);
    border-radius: var(--radius);
    padding: 0.85rem 0.5rem; cursor: pointer; color: inherit;
    display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.agent-card:hover { transform: translateY(-3px); border-color: var(--silver); }
.agent-card.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 0 16px rgba(229, 50, 101, 0.35);
}
.agent-card .agent-sprite { width: 64px; height: 96px; }
.agent-card .agent-sprite svg { width: 100%; height: 100%; }
.agent-card .agent-name {
    font-family: monospace; font-weight: 700; font-size: 0.85rem;
    letter-spacing: 0.08em; color: var(--text-primary);
}
.agent-card .agent-role { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

.agent-detail {
    border: 1px solid var(--border); background: var(--bg);
    border-radius: var(--radius);
    padding: 1rem 1.25rem; margin-bottom: 0.5rem; text-align: left;
}
.ad-name { font-family: monospace; font-weight: 700; color: var(--accent); letter-spacing: 0.06em; }
.ad-blurb { font-size: 0.82rem; color: var(--text-secondary); margin: 0.35rem 0 0.75rem; }
.ad-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.3rem 1.5rem; }
.stat-row { display: flex; align-items: center; gap: 0.6rem; }
.stat-label { font-family: monospace; font-size: 0.66rem; color: var(--text-muted); width: 4.5rem; letter-spacing: 0.06em; }
.stat-bar { display: flex; gap: 3px; }
.stat-pip { width: 14px; height: 8px; background: var(--border-strong); }
.stat-pip.on { background: var(--accent-2); }

.difficulty-row { display: flex; gap: 0.6rem; justify-content: center; margin-bottom: 1.25rem; }
.diff-btn {
    background: var(--bg); color: var(--text-secondary);
    border: 1px solid var(--border); border-radius: var(--radius);
    font-family: monospace; font-weight: 700;
    letter-spacing: 0.08em; padding: 0.6rem 1.4rem; cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.diff-btn:hover { border-color: var(--silver); color: var(--text-primary); }
.diff-btn.selected { border-color: var(--accent-2); color: var(--accent-2); box-shadow: 0 0 12px rgba(47, 214, 181, 0.3); }

.select-actions { display: flex; gap: 0.75rem; justify-content: center; margin-top: 1.25rem; flex-wrap: wrap; }

/* -- Global threat map ------------------------------------------------- */
.map-container {
    position: relative; width: 100%; aspect-ratio: 2 / 1; max-height: 52vh;
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    margin: 0 auto 1rem; overflow: hidden;
    background: #070d18;
}
.world-map { position: absolute; inset: 0; z-index: 0; }
.world-map svg { width: 100%; height: 100%; display: block; }

/* Rotating radar sweep over the ocean (oversized + circular so its corners
   stay outside the clipped container). */
.radar-sweep {
    position: absolute; left: -25%; top: -25%; width: 150%; height: 150%;
    border-radius: 50%; z-index: 1; pointer-events: none; mix-blend-mode: screen;
    background: conic-gradient(from 0deg,
        rgba(47, 214, 181, 0.18) 0deg,
        rgba(47, 214, 181, 0.05) 24deg,
        transparent 58deg, transparent 360deg);
    animation: radar-spin 9s linear infinite;
}
@keyframes radar-spin { to { transform: rotate(360deg); } }

/* Animated "syndicate routes" connecting the hotspots (built in renderMap). */
.map-routes { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.map-routes svg { width: 100%; height: 100%; display: block; }
.map-routes .route { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.map-routes .route.cleared { stroke: var(--accent-2); opacity: 0.5; }
.map-routes .route.active { stroke: var(--accent); opacity: 0.85; stroke-dasharray: 5 6; animation: route-flow 0.9s linear infinite; }
.map-routes .route.locked { stroke: var(--border-strong); opacity: 0.4; stroke-dasharray: 2 7; }
@keyframes route-flow { to { stroke-dashoffset: -22; } }

.map-nodes { position: absolute; inset: 0; z-index: 3; }
.map-node {
    position: absolute; transform: translate(-50%, -50%);
    background: transparent; border: none; cursor: pointer;
    display: flex; flex-direction: column; align-items: center;
    color: var(--text-muted); padding: 0;
}
.node-pin { position: relative; width: 30px; height: 30px; display: block; }
.node-pin svg { width: 100%; height: 100%; }
.node-label {
    font-family: monospace; font-size: 0.6rem; letter-spacing: 0.04em;
    white-space: nowrap; margin-top: 3px; color: var(--text-primary);
    background: rgba(7, 13, 24, 0.82); padding: 1px 5px; border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-sm);
}
.node-status { font-family: monospace; font-size: 0.55rem; letter-spacing: 0.04em; margin-top: 2px; }
.map-node.cleared { color: var(--accent-2); }
.map-node.cleared .node-status { color: var(--accent-2); }
.map-node.cleared .node-pin { filter: drop-shadow(0 0 4px var(--accent-2)); }
.map-node.available { color: var(--accent); }
.map-node.available .node-status { color: var(--accent); }
.map-node.available .node-pin { filter: drop-shadow(0 0 8px var(--accent)); }
/* expanding radar ping ring on the deployable node */
.map-node.available .node-pin::after {
    content: ''; position: absolute; left: 50%; top: 50%; width: 30px; height: 30px;
    margin: -15px 0 0 -15px; border: 2px solid currentColor; border-radius: 50%;
    animation: node-ping 1.5s ease-out infinite;
}
@keyframes node-ping { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(2.8); opacity: 0; } }
.map-node.locked { color: var(--text-muted); opacity: 0.5; cursor: not-allowed; }
.map-node.locked .node-status { color: var(--text-muted); }
.map-node.boss.available { color: var(--miss); }
.map-node.boss.available .node-status { color: var(--miss); }
.map-node.boss.available .node-pin { filter: drop-shadow(0 0 9px var(--miss)); }
.map-stage-info {
    font-family: monospace; font-size: 0.8rem; color: var(--text-secondary);
    min-height: 1.4em; margin-bottom: 0.5rem; letter-spacing: 0.02em;
}

/* -- Arcade meters row (HP / combo / super) --------------------------- */
.hud-meters {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    padding: 0.45rem 1.25rem; background: var(--bg);
    border-bottom: 1px solid var(--border); z-index: 5;
}
.meter { display: flex; align-items: center; gap: 0.5rem; }
.meter-label { font-family: monospace; font-size: 0.66rem; letter-spacing: 0.1em; color: var(--text-muted); }
.meter-bar {
    display: inline-block; width: 140px; height: 12px;
    background: #1a1a1a; border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
    position: relative; overflow: hidden;
}
.meter-fill { display: block; height: 100%; width: 100%; transition: width 0.2s ease; }
.hp-fill { background: linear-gradient(90deg, var(--hit), var(--accent-2)); }
.hp-fill.low { background: linear-gradient(90deg, var(--miss), var(--warn)); animation: hp-pulse 0.8s ease-in-out infinite; }
@keyframes hp-pulse { 50% { opacity: 0.6; } }
.super-fill { background: linear-gradient(90deg, var(--accent), var(--warn)); }
.meter-num { font-family: monospace; font-size: 0.78rem; color: var(--text-primary); min-width: 2.5ch; }
.meter-combo .combo-num {
    font-family: monospace; font-weight: 700; font-size: 0.95rem; color: var(--text-secondary);
    transition: color 0.15s;
}
.meter-combo .combo-num.hot { color: var(--warn); text-shadow: 0 0 8px rgba(255, 236, 0, 0.5); }
.super-button {
    font-family: monospace; font-weight: 700; font-size: 0.66rem; letter-spacing: 0.08em;
    background: var(--bg); color: var(--text-muted); border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.6rem; cursor: not-allowed;
}
.super-button.ready {
    color: #fff; background: var(--accent); border-color: var(--accent); cursor: pointer;
    animation: super-ready 0.7s ease-in-out infinite;
}
@keyframes super-ready { 50% { box-shadow: 0 0 12px var(--accent); } }

/* -- Boss bar --------------------------------------------------------- */
.boss-bar {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.4rem 1.25rem; background: #2a0a0a;
    border-bottom: 1px solid var(--miss); z-index: 5;
}
.boss-bar.hidden { display: none; }
.boss-name {
    font-family: monospace; font-weight: 700; font-size: 0.74rem; letter-spacing: 0.1em;
    color: var(--miss); text-transform: uppercase; white-space: nowrap;
}
.boss-track { flex: 1; height: 14px; background: #1a0606; border: 1px solid var(--miss); border-radius: var(--radius-pill); overflow: hidden; }
.boss-fill { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--miss), var(--warn)); transition: width 0.2s ease; }

/* -- Boss target ------------------------------------------------------ */
/* Outer = position + slow "prowl" drift across the arena (so it never just
   stands still). Inner = breathing idle, attack lunge, and hit flinch — on
   a separate element so those transforms don't fight the outer's drift. */
.boss-target {
    position: absolute; left: 40%; top: 46%;
    width: 160px; cursor: none; z-index: 3;
    animation: boss-prowl 7s ease-in-out infinite;
    filter: drop-shadow(0 6px 14px rgba(220, 38, 38, 0.55));
}
@keyframes boss-prowl {
    0%   { transform: translate(-50%, -50%); }
    25%  { transform: translate(calc(-50% - 80px), calc(-50% + 16px)); }
    50%  { transform: translate(-50%, calc(-50% - 10px)); }
    75%  { transform: translate(calc(-50% + 80px), calc(-50% + 16px)); }
    100% { transform: translate(-50%, -50%); }
}
.boss-inner { width: 100%; transform-origin: center bottom; animation: boss-breathe 2.4s ease-in-out infinite; }
.boss-inner svg { width: 100%; height: auto; display: block; }
@keyframes boss-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.04, 0.96); } }
.boss-target:hover .boss-inner svg { filter: drop-shadow(0 0 12px var(--warn)); }
.boss-inner.attacking { animation: boss-lunge 0.6s ease-out; }
@keyframes boss-lunge {
    0%   { transform: scale(1) translate(0, 0) rotate(0); }
    28%  { transform: scale(1.12) translate(-10px, -16px) rotate(-4deg); }  /* wind up */
    55%  { transform: scale(1.06) translate(28px, 24px) rotate(5deg); }     /* lunge at player */
    100% { transform: scale(1) translate(0, 0) rotate(0); }
}
.boss-inner.flinch { animation: boss-flinch 0.26s linear; }
@keyframes boss-flinch {
    0% { transform: translate(0, 0); } 25% { transform: translate(-7px, 2px); }
    50% { transform: translate(6px, -2px); } 75% { transform: translate(-3px, 1px); }
    100% { transform: translate(0, 0); }
}
.boss-target.blocking .boss-inner { filter: drop-shadow(0 0 16px var(--accent-2)); }
.boss-target.blocking::after {
    content: '🛡 BLOCK'; position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
    font-family: monospace; font-size: 0.7rem; color: var(--accent-2);
}
.boss-target.enraged { animation: boss-prowl 3.6s ease-in-out infinite, boss-enrage 0.7s ease-in-out infinite; }
@keyframes boss-enrage { 0%, 100% { filter: drop-shadow(0 6px 14px rgba(220,38,38,0.6)); } 50% { filter: drop-shadow(0 0 26px var(--miss)); } }
.boss-target.defeated .boss-inner { animation: target-hit 0.7s ease-out forwards; }

/* Boss projectile — flies from the boss to the player on each strike. */
.boss-projectile {
    position: absolute; width: 22px; height: 22px; border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, var(--miss) 45%, rgba(220,38,38,0) 75%);
    box-shadow: 0 0 12px var(--miss); transform: translate(0, 0); z-index: 14; pointer-events: none;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.6, 1), opacity 0.5s ease-in;
}
.boss-projectile.enraged {
    background: radial-gradient(circle, #fff 0%, var(--warn) 45%, rgba(255,236,0,0) 75%);
    box-shadow: 0 0 14px var(--warn);
}

/* Boss minions ("adds") — fly out from the boss, sit, and (if not cleared)
   fly back to heal it. Outer handles fly via left/top; inner handles the
   spawn pop + idle bob via transform (so they don't conflict). */
.boss-inner.summoning { animation: boss-summon 0.5s ease-out; }
@keyframes boss-summon {
    0% { transform: scale(1); } 40% { transform: scale(1.12) translateY(-8px); } 100% { transform: scale(1); }
}
.minion {
    position: absolute; width: 54px; z-index: 4; cursor: none;
    transition: left 0.45s ease-out, top 0.45s ease-out, opacity 0.3s ease;
    will-change: left, top, opacity;
    filter: drop-shadow(0 0 6px rgba(220, 38, 38, 0.7));
}
.minion-sprite { width: 100%; animation: minion-spawn 0.3s ease-out, sprite-idle 1.3s ease-in-out infinite 0.3s; }
.minion-sprite svg { width: 100%; height: auto; display: block; }
@keyframes minion-spawn { 0% { transform: scale(0) rotate(-30deg); } 100% { transform: scale(1) rotate(0); } }
.minion:hover .minion-sprite svg { filter: drop-shadow(0 0 7px var(--warn)); }
.minion.dead { pointer-events: none; }
.minion.dead .minion-sprite { animation: target-hit 0.3s ease-out forwards; }

/* -- Legit (verified) target styling ---------------------------------- */
.target .t-label-box.legit { background: var(--accent-2); color: #04211b; }
.target.kind-legit:hover .t-sprite svg { filter: drop-shadow(0 0 8px var(--accent-2)); }
.target.spared .t-sprite svg { filter: drop-shadow(0 0 10px var(--accent-2)); }
.target.false-positive .t-sprite svg { filter: drop-shadow(0 0 10px var(--miss)); }

/* -- Combat-text extra kinds + combo flair ---------------------------- */
.combat-text.privacy { color: var(--accent-2); font-size: 1.05rem; }
.combo-flair {
    position: absolute; top: 22%; left: 50%; transform: translateX(-50%);
    font-family: monospace; font-weight: 700; font-size: 1.5rem; letter-spacing: 0.06em;
    color: var(--warn); text-shadow: 0 0 10px rgba(255, 236, 0, 0.6), 2px 2px 0 #000;
    pointer-events: none; z-index: 18; white-space: nowrap;
    animation: flair-pop 1.1s ease-out forwards;
}
@keyframes flair-pop {
    0% { opacity: 0; transform: translateX(-50%) scale(0.6); }
    20% { opacity: 1; transform: translateX(-50%) scale(1.1); }
    80% { opacity: 1; transform: translateX(-50%) scale(1); }
    100% { opacity: 0; transform: translateX(-50%) scale(1) translateY(-30px); }
}

/* -- Damage flash + super flash --------------------------------------- */
.play-area.damage-flash::after {
    content: ''; position: absolute; inset: 0; z-index: 16; pointer-events: none;
    box-shadow: inset 0 0 80px 20px rgba(255, 42, 69, 0.55);
    animation: dmg-fade 0.28s ease-out forwards;
}
@keyframes dmg-fade { from { opacity: 1; } to { opacity: 0; } }

.super-flash {
    position: absolute; inset: 0; z-index: 19; display: flex;
    align-items: center; justify-content: center; pointer-events: none;
    background: radial-gradient(circle, rgba(229, 50, 101, 0.4) 0%, rgba(10, 10, 10, 0.1) 70%);
}
.super-flash.hidden { display: none; }
.super-flash #super-flash-text {
    font-family: monospace; font-weight: 700; font-size: 2.6rem; letter-spacing: 0.08em;
    color: #fff; text-shadow: 0 0 16px var(--accent), 0 0 32px var(--warn);
}
.super-flash.active #super-flash-text { animation: super-zoom 0.9s ease-out; }
@keyframes super-zoom {
    0% { transform: scale(0.4) rotate(-6deg); opacity: 0; }
    30% { transform: scale(1.2) rotate(2deg); opacity: 1; }
    100% { transform: scale(1) rotate(0); opacity: 0; }
}

.play-overlay.privacy-lesson {
    font-size: 0.92rem; text-transform: none; letter-spacing: 0.01em;
    color: var(--accent-2); max-width: 80%; line-height: 1.45;
    background: rgba(7, 13, 24, 0.85); border: 1px solid var(--accent-2);
    border-radius: var(--radius); padding: 0.85rem 1.1rem; top: 30%;
}

/* -- End screen rank + initials entry --------------------------------- */
.end-rank {
    font-family: monospace; font-size: 0.95rem; letter-spacing: 0.1em;
    color: var(--accent-2); margin-bottom: 0.5rem; text-transform: uppercase;
}
.end-initials { border: 1px solid var(--warn); border-radius: var(--radius); background: var(--bg); padding: 1rem; margin: 0 auto 1.25rem; max-width: 420px; }
.end-initials.hidden { display: none; }
.ei-label { font-family: monospace; font-size: 0.78rem; color: var(--warn); letter-spacing: 0.08em; margin-bottom: 0.6rem; }
.ei-row { display: flex; gap: 0.5rem; justify-content: center; }
.end-initials input, #select-initials {
    background: var(--bg); color: var(--text-primary); border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    font-family: monospace; font-size: 1.1rem; letter-spacing: 0.3em; text-align: center;
    text-transform: uppercase; width: 6ch; padding: 0.4rem;
}

@media (max-width: 720px) {
    .agent-grid { grid-template-columns: repeat(2, 1fr); }
    .ad-stats { grid-template-columns: 1fr; }
    .select-title { font-size: 1.4rem; }
    .hud-meters { gap: 0.5rem; padding: 0.4rem 0.6rem; }
    .meter-bar { width: 84px; }
    .meter-label { font-size: 0.58rem; }
    .super-flash #super-flash-text { font-size: 1.6rem; }
    .boss-target { width: 110px; }
    .node-label { font-size: 0.52rem; }
    .map-container { max-height: 44vh; }
}

@media (max-width: 720px) {
    .hud { font-size: 0.68rem; }
    .hud-score { font-size: 1.4rem; }
    .title { font-size: 2rem; }
    .target-grid { grid-template-columns: repeat(2, 1fr); }
    .target { width: 70px; }
    .player-anchor { width: 72px; right: 12px; }
    .player-callout { right: 12px; }
    .end-score { font-size: 2.4rem; }
    .rc-card { padding: 1.5rem 1.25rem; }
    .rc-headline { font-size: 1.4rem; }
    .round-intro { padding: 1rem 1.5rem; min-width: 220px; max-width: calc(100vw - 1.5rem); }
    .round-intro .ri-name { font-size: 1.3rem; }
    /* Drop the desktop 520px floor on mobile so the play-area is sized
       by `flex: 1` against the available viewport. Without this, the
       game-area total height (HUD ~150 + play 520 + ticker 36 = 706px)
       exceeded viewport on iPhone-class phones (~568-700px tall in
       portrait), forcing the page to scroll and pushing the HUD off
       the top of the screen during play. The HUD shows critical state
       (round / shots / hits / score) so losing it mid-round is a
       real-game failure mode. Carried as "game oversized on mobile"
       in the 2026-05-15 backlog. */
    .play-area { min-height: 0; }
}

/* iPhone SE / iPhone 6/7/8 / smaller Android (≤375px viewport).
   Tightens the game UI so nothing overflows the 375px safe area.
   Added 2026-05-14 — previously the only breakpoint was 720px,
   leaving a real gap for the most common small phone sizes. */
@media (max-width: 375px) {
    .hud { font-size: 0.62rem; gap: 0.4rem; }
    .hud-score { font-size: 1.2rem; }
    .title { font-size: 1.6rem; }
    .player-anchor { width: 60px; right: 8px; }
    .target { width: 60px; }
    .round-intro {
        padding: 0.85rem 1rem;
        min-width: 0;
        max-width: calc(100vw - 1rem);
    }
    .round-intro .ri-round { font-size: 0.65rem; letter-spacing: 0.15em; }
    .round-intro .ri-name { font-size: 1.1rem; }
    .round-intro .ri-prompt { font-size: 0.8rem; }
    .rc-card { padding: 1.2rem 1rem; }
    .rc-headline { font-size: 1.2rem; }
}
