/* Stage Rush — game-specific styles. Composes with games.css Nyza Games theme. */
@import url('https://fonts.googleapis.com/css2?family=Bagel+Fat+One&family=Fredoka:wght@400;500;600;700&family=Orbitron:wght@600;700;800;900&display=swap');

:root {
    --sr-gold: #ffd700;
    --sr-gold-deep: #d4a017;
    --sr-pink: #ff3b85;
    --sr-purple: #6a5acd;
    --sr-bg: #07050a;
    --sr-glass: rgba(20, 14, 26, 0.65);
    --sr-glass-border: rgba(212, 160, 23, 0.32);
}

/* Native does not load the hub's games.css reset. Keep identical sizing on
   web and both wrappers: declared widths include borders and padding. */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    width: 100%; height: 100%; margin: 0; padding: 0;
    background: var(--sr-bg); color: #f3e6c4;
    font-family: 'Fredoka', 'Poppins', system-ui, sans-serif;
    overflow: hidden;
    /* Stop iOS Safari pull-to-refresh / URL-bar peek and Android system
       overscroll glow from intercepting in-game vertical swipes (slide). */
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none; user-select: none; -webkit-user-select: none;
}

.sr-app {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 8px;
    background: radial-gradient(ellipse at 50% 0%, rgba(28,18,40,0.8) 0%, #07050a 60%);
    /* Block native gestures (pan / zoom / back-swipe) anywhere inside the
       app shell, not only on the canvas — guards against swipes that
       graze the rounded edges or HUD letter-box. */
    touch-action: none;
    overscroll-behavior: contain;
}

/* ---- Back link + audio button (top corners) ---- */
.sr-back {
    position: fixed; top: 12px; left: 12px;
    color: rgba(243, 230, 196, 0.7);
    text-decoration: none;
    font-family: 'Orbitron', monospace;
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.15em;
    padding: 6px 12px;
    background: rgba(20,14,26,0.6);
    border: 1px solid rgba(212,160,23,0.25);
    border-radius: 99px;
    backdrop-filter: blur(10px);
    z-index: 100;
    transition: all 0.2s;
}
.sr-back:hover { color: var(--sr-gold); border-color: var(--sr-gold); }
.sr-back-2 { left: 122px; }
@media (max-width: 480px) {
    .sr-back { font-size: 0.65rem; padding: 5px 10px; letter-spacing: 0.1em; }
    .sr-back-2 { left: 98px; }
}

.sr-audio-btn {
    position: fixed; top: 12px; right: 12px;
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    background: rgba(20,14,26,0.6);
    border: 1px solid rgba(212,160,23,0.25);
    border-radius: 99px;
    backdrop-filter: blur(10px);
    color: rgba(243, 230, 196, 0.85);
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
    cursor: pointer;
    z-index: 100;
}
.sr-audio-btn svg { width: 14px; height: 14px; }
.sr-audio-btn.sr-audio-muted { opacity: 0.55; text-decoration: line-through; }

/* ---- Stage (canvas + overlays) ---- */
.sr-stage {
    width: 100%; height: 100%;
    max-width: 540px;
    max-height: calc(100dvh - 16px);
    aspect-ratio: 9 / 16;
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    box-shadow:
        0 30px 80px rgba(0,0,0,0.7),
        0 0 0 1px rgba(212,160,23,0.3),
        inset 0 0 100px rgba(212,160,23,0.04);
    background: #0a0610;
    touch-action: none;
}

/* On mobile portrait, fill the screen edge-to-edge */
@media (max-width: 540px) {
    .sr-app { padding: 0; }
    .sr-stage {
        max-width: 100vw;
        max-height: 100dvh;
        border-radius: 0;
        box-shadow: none;
    }
    /* On mobile, .sr-back + .sr-audio-btn are position:fixed at top:12px and
       sit ABOVE the menu's headbar (z-index 100 vs 5). They cover the coin
       button and icon buttons → taps are intercepted by the fixed pills.
       Push the menu's first row of content below the fixed band. */
    .sr-menu { padding-top: 56px !important; }
    /* Also nudge the headbar so its sticky position parks below the band. */
    .sr-menu-headbar { top: 52px !important; }
}
#sr-canvas { width: 100% !important; height: 100% !important; display: block; touch-action: none; }

/* iOS Safari adds a 300ms delay to clicks on tap unless touch-action
   short-circuits it. Apply to every interactive element so taps register
   instantly and users don't think the game is dead. */
button, a, .sr-tile, .sr-featured, .sr-diff-pill, .sr-icon-btn,
.sr-menu-coinbtn, .sr-daily-host, .sr-shop-item, .sr-modal-card,
.sr-tut-next, .sr-play-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.sr-overlay {
    position: absolute; inset: 0;
    pointer-events: none;
}
.sr-overlay > * { pointer-events: auto; }

/* ===========================================================
   MENU
   =========================================================== */
.sr-overlay-menu {
    overflow-y: auto;
    pointer-events: auto;
    -webkit-overflow-scrolling: touch;
}
.sr-menu {
    /* Block layout so children keep their natural heights and the
       overlay scrolls. Avoid flex column — it was squeezing the
       featured card to fit inside a fixed-height container. */
    min-height: 100%;
    padding: 20px 14px;
    background: linear-gradient(180deg,
        rgba(7,5,10,0.45) 0%,
        rgba(7,5,10,0.65) 60%,
        rgba(7,5,10,0.85) 100%);
}
.sr-menu-header { text-align: center; padding: 28px 0 8px; }

/* Difficulty selector */
.sr-difficulty {
    display: flex; align-items: center; justify-content: center;
    gap: 10px;
    margin: 6px 0 16px;
}
.sr-diff-label {
    font-family: 'Orbitron', monospace;
    font-size: 0.6rem; font-weight: 700; letter-spacing: 0.2em;
    color: var(--sr-gold);
}
.sr-diff-pills {
    display: flex; gap: 4px;
    background: rgba(20,14,26,0.55);
    border: 1px solid rgba(212,160,23,0.3);
    border-radius: 99px; padding: 2px;
}
.sr-diff-pill {
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.12em;
    color: rgba(243,230,196,0.55);
    background: transparent;
    border: none; padding: 5px 11px; border-radius: 99px;
    cursor: pointer;
    transition: all 0.18s;
}
.sr-diff-pill:hover { color: var(--sr-gold); }
.sr-diff-pill.active {
    background: linear-gradient(135deg, var(--sr-gold), var(--sr-gold-deep));
    color: #0a0610;
    box-shadow: 0 2px 8px rgba(212,160,23,0.5);
}
.sr-menu-title {
    font-family: 'Bagel Fat One', 'Orbitron', monospace;
    font-size: clamp(28px, 7vw, 38px);
    line-height: 0.95;
    background: linear-gradient(135deg, var(--sr-gold) 0%, var(--sr-gold-deep) 60%, #8b6914 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.02em;
    text-shadow: 0 8px 30px rgba(212,160,23,0.4);
}
.sr-menu-sub {
    margin-top: 6px;
    font-size: 0.85rem;
    color: rgba(243,230,196,0.65);
    font-weight: 400;
}

/* Featured card */
.sr-featured {
    margin: 0 0 18px;
    background: linear-gradient(135deg, rgba(255,59,133,0.12), rgba(212,160,23,0.06) 50%, rgba(106,90,205,0.12));
    border-radius: 18px;
    padding: 14px;
    display: flex; gap: 12px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--sr-pink);
    box-shadow: 0 12px 32px rgba(255,59,133,0.18);
    transition: transform 0.2s ease;
}
.sr-featured:hover { transform: translateY(-2px); }
.sr-featured-cover {
    width: 110px; height: 110px;
    flex-shrink: 0;
    background-size: cover; background-position: center;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08);
}
.sr-featured-meta { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.sr-featured-ribbon {
    align-self: flex-start;
    font-family: 'Orbitron', monospace;
    font-size: 0.55rem; font-weight: 800; letter-spacing: 0.18em;
    color: #fff;
    background: linear-gradient(135deg, var(--sr-pink), var(--sr-gold-deep));
    padding: 3px 9px; border-radius: 99px;
    margin-bottom: 4px;
    box-shadow: 0 2px 8px rgba(255,59,133,0.4);
}
.sr-featured-title {
    font-family: 'Bagel Fat One', sans-serif;
    font-size: 1.5rem; line-height: 1; color: #fff;
    margin-bottom: 4px;
}
.sr-featured-stage {
    font-size: 0.78rem; color: rgba(255,255,255,0.78);
    line-height: 1.25; margin-bottom: 6px;
}
.sr-featured-bpm {
    font-family: 'Orbitron', monospace;
    font-size: 0.62rem; font-weight: 700; letter-spacing: 0.18em;
    color: var(--sr-gold);
    margin-bottom: 8px;
}
.sr-play-btn {
    align-self: flex-start;
    background: linear-gradient(135deg, var(--sr-gold), var(--sr-gold-deep));
    color: #0a0610;
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem; font-weight: 800; letter-spacing: 0.1em;
    border: none; cursor: pointer;
    padding: 8px 16px; border-radius: 99px;
    box-shadow: 0 6px 18px rgba(212,160,23,0.5);
    transition: all 0.15s;
}
.sr-play-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(212,160,23,0.65); }

/* "More stages" label */
.sr-section-label {
    text-align: center;
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.3em;
    color: var(--sr-gold);
    margin: 6px 0 12px;
    opacity: 0.85;
}

/* Tile grid */
.sr-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}
.sr-tile {
    background: rgba(20,14,26,0.5);
    border: 1px solid rgba(212,160,23,0.18);
    border-radius: 14px;
    padding: 8px;
    cursor: pointer;
    position: relative;
    transition: all 0.18s;
}
.sr-tile:hover {
    background: rgba(28,20,38,0.7);
    border-color: var(--sr-gold);
    transform: translateY(-2px);
}
.sr-tile-cover {
    width: 100%; aspect-ratio: 1;
    background-size: cover; background-position: center;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}
.sr-tile-title {
    font-size: 0.78rem; font-weight: 600;
    margin-top: 6px;
    color: #f3e6c4;
    text-align: center;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sr-tile-bpm {
    font-family: 'Orbitron', monospace;
    font-size: 0.55rem; font-weight: 700; letter-spacing: 0.15em;
    color: var(--sr-gold-deep);
    text-align: center;
    margin-top: 1px;
}
.sr-hs-badge {
    position: absolute; top: 4px; right: 4px;
    background: linear-gradient(135deg, var(--sr-gold), var(--sr-gold-deep));
    color: #0a0610;
    font-family: 'Orbitron', monospace;
    font-size: 0.55rem; font-weight: 800;
    padding: 2px 6px; border-radius: 99px;
    z-index: 2;
}

/* Locked tile (stages not yet enhanced) */
.sr-tile-locked {
    cursor: not-allowed;
    opacity: 0.55;
    filter: grayscale(0.6);
    pointer-events: none;
}
.sr-tile-locked:hover {
    transform: none;
    border-color: rgba(212,160,23,0.18);
    background: rgba(20,14,26,0.5);
}
.sr-tile-lock {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 1.6rem;
    background: rgba(7,5,10,0.7);
    border-radius: 50%;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

.sr-menu-footer {
    text-align: center;
    font-size: 0.65rem;
    color: rgba(243,230,196,0.4);
    padding: 16px 0 8px;
    line-height: 1.5;
}

/* Official "Get it on Google Play" badge — web build only (see menu.js).
   Unmodified artwork per Google brand guidelines. */
.sr-playstore-badge {
    display: block;
    width: max-content;
    max-width: 80%;
    margin: 18px auto 0;
    text-decoration: none;
    transition: transform 0.2s ease, filter 0.2s ease;
}
.sr-playstore-badge img {
    height: 52px;
    width: auto;
    display: block;
}
.sr-playstore-badge:hover {
    transform: translateY(-1px);
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.5));
}

/* ===========================================================
   HUD (in-game)
   =========================================================== */
.sr-hud {
    position: absolute; inset: 0;
    pointer-events: none;
}
/* Navigation belongs to the menu; it must never cover the live score. */
body.sr-playing .sr-back { display: none; }
.sr-hud-top {
    position: absolute; top: 12px; left: 12px; right: 12px;
    display: flex; justify-content: space-between; align-items: flex-start;
}
.sr-score-wrap { text-align: left; }
.sr-label {
    font-family: 'Orbitron', monospace;
    font-size: 0.55rem; font-weight: 700; letter-spacing: 0.3em;
    color: var(--sr-gold);
    text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}
.sr-score {
    font-family: 'Bagel Fat One', sans-serif;
    font-size: 2.4rem; line-height: 0.95;
    color: #fff;
    text-shadow:
        0 3px 0 #000,
        0 6px 16px rgba(0,0,0,0.85),
        0 0 30px rgba(212,160,23,0.4);
}
.sr-combo {
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem; font-weight: 800;
    color: var(--sr-gold);
    margin-top: 2px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.85);
}
.sr-song-wrap { text-align: right; padding-right: 60px; }   /* reserve the pause-button corner so title/BPM never run under it */
.sr-song-title {
    font-family: 'Bagel Fat One', sans-serif;
    font-size: 1rem; color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.85);
}
.sr-song-bpm {
    font-family: 'Orbitron', monospace;
    font-size: 0.55rem; font-weight: 700; letter-spacing: 0.18em;
    color: var(--sr-gold);
    margin-top: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.85);
    max-width: 180px;
    line-height: 1.4;
}

.sr-hud-progress {
    position: absolute; top: 78px; left: 50%; transform: translateX(-50%);
    width: 70%;
    height: 4px;
    background: rgba(255,255,255,0.18);
    border-radius: 99px;
    overflow: hidden;
}
.sr-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--sr-gold), var(--sr-pink));
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(212,160,23,0.6);
}

.sr-hud-hearts {
    position: absolute; top: 96px; right: 12px;
    display: flex; gap: 4px;
}

/* In-HUD pause button — mirrors the sr-audio-btn glass pill so the two
   read as a matched pair at the top of the play area. Sits LEFT of the
   audio button (which lives in the launcher chrome at right:12px). The
   HUD overlay is hidden on menu/end so the button auto-hides outside
   gameplay — exactly the behaviour we want. */
.sr-pause-icon-btn {
    /* Top-right corner. (Was right:100px, which sat in the path of the
       right-aligned song title/BPM and overlapped it on narrow layouts.) */
    position: absolute; top: 12px; right: 12px;
    /* Touch-target ≥ 44×44px per WCAG; visual chip a bit smaller. */
    min-width: 44px; min-height: 32px;
    padding: 6px 12px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(20,14,26,0.6);
    border: 1px solid rgba(212,160,23,0.25);
    border-radius: 99px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(243, 230, 196, 0.95);
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem; font-weight: 900; letter-spacing: 0.12em;
    cursor: pointer;
    z-index: 100;
    /* Block pointer events from leaking through to the canvas underneath
       (would otherwise trigger a swipe / lane-change). */
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto;
}
.sr-pause-icon-btn:hover,
.sr-pause-icon-btn:active {
    border-color: rgba(212,160,23,0.6);
    color: var(--sr-gold);
    background: rgba(20,14,26,0.8);
}
.sr-pause-glyph {
    display: inline-block;
    transform: scaleY(1.15);
    letter-spacing: 0.02em;
}

/* Mobile / full-screen HUD fix (F5): on a phone the stage fills the screen, so
   the page-chrome SOUND pill (position:fixed, right:12) and the HUD PAUSE button
   (position:absolute, right:12) collapse onto the same top-right corner and the
   right-aligned song title runs under both. On desktop the stage is centred &
   narrower than the window so they never collided. Here we shrink SOUND to an
   icon, sit PAUSE just left of it, and drop the song title below the button band. */
@media (max-width: 540px) {
    .sr-audio-btn { font-size: 0; gap: 0; padding: 8px 9px; }   /* icon-only */
    .sr-pause-icon-btn { right: 52px; }                          /* left of SOUND */
    .sr-song-wrap { padding-right: 0; margin-top: 42px; max-width: 56%; }
    .sr-song-title { font-size: 0.85rem; }
    .sr-song-bpm { display: none; }   /* BPM·stage is on the menu; declutter in-play */
}
.sr-heart {
    color: var(--sr-pink);
    font-size: 1.4rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.85);
    animation: sr-heart-pulse 1.6s ease-in-out infinite;
}
.sr-heart-empty { color: rgba(255,255,255,0.18); animation: none; }
@keyframes sr-heart-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.12); }
}

/* Drop banner */
.sr-drop-banner {
    position: absolute; top: 35%; left: 0; right: 0;
    text-align: center;
    pointer-events: none;
    opacity: 0; transform: scale(0.5);
}
.sr-drop-banner.sr-drop-active {
    animation: sr-drop-anim 1.2s ease-out forwards;
}
@keyframes sr-drop-anim {
    0%  { opacity: 0; transform: scale(0.4); }
    20% { opacity: 1; transform: scale(1.4); }
    50% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.6); }
}
.sr-drop-text {
    display: inline-block;
    font-family: 'Bagel Fat One', sans-serif;
    font-size: 4rem;
    color: var(--sr-gold);
    text-shadow:
        0 0 30px var(--sr-pink),
        0 0 60px var(--sr-gold),
        0 6px 0 #000,
        0 12px 30px rgba(0,0,0,0.8);
    -webkit-text-stroke: 3px #000;
}

/* Countdown */
.sr-countdown {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.5);
    font-family: 'Bagel Fat One', sans-serif;
    font-size: 7rem;
    color: var(--sr-gold);
    text-shadow:
        0 0 50px var(--sr-pink),
        0 6px 0 #000,
        0 16px 50px rgba(0,0,0,0.85);
    -webkit-text-stroke: 4px #000;
    opacity: 0;
    pointer-events: none;
}
.sr-countdown.sr-countdown-active {
    animation: sr-countdown-anim 600ms ease-out;
}
@keyframes sr-countdown-anim {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
    20%  { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
}

/* Toast (score popup) */
.sr-toast {
    position: absolute; top: 38%; left: 0; right: 0;
    text-align: center;
    pointer-events: none;
}
.sr-toast-item {
    display: inline-block;
    font-family: 'Bagel Fat One', sans-serif;
    font-size: 1.6rem;
    color: var(--sr-gold);
    text-shadow: 0 4px 0 #000, 0 8px 16px rgba(0,0,0,0.7);
    animation: sr-toast-anim 0.85s ease-out forwards;
}
@keyframes sr-toast-anim {
    0%   { opacity: 0; transform: translateY(0) scale(0.6); }
    20%  { opacity: 1; transform: translateY(-10px) scale(1.2); }
    80%  { opacity: 1; transform: translateY(-50px) scale(1); }
    100% { opacity: 0; transform: translateY(-80px) scale(0.9); }
}

/* ===========================================================
   END CARD
   =========================================================== */
.sr-overlay-end {
    pointer-events: auto;
    overflow-y: auto;
}
.sr-end {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    display: flex; flex-direction: column;
    padding: 20px 14px;
}
.sr-end-inner {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: flex-start;
    gap: 4px;
    text-align: center;
}
.sr-end-headline {
    font-family: 'Bagel Fat One', sans-serif;
    font-size: 1.7rem;
    margin-top: 28px;
    text-shadow: 0 4px 0 #000, 0 12px 30px rgba(0,0,0,0.7);
    -webkit-text-stroke: 1.5px #000;
}
.sr-end-title {
    font-family: 'Bagel Fat One', sans-serif;
    font-size: 1.4rem; color: #fff;
    text-shadow: 0 4px 0 #000;
    margin-top: 2px;
}
.sr-end-stage {
    font-size: 0.8rem; color: rgba(255,255,255,0.75);
    margin-top: -2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.7);
}
.sr-end-score-label {
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.3em;
    color: var(--sr-gold);
    margin-top: 26px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.85);
}
.sr-end-score {
    font-family: 'Bagel Fat One', sans-serif;
    font-size: 4.6rem;
    line-height: 0.9;
    color: #fff;
    text-shadow:
        0 6px 0 #000,
        0 12px 30px rgba(0,0,0,0.85),
        0 0 60px rgba(212,160,23,0.5);
    -webkit-text-stroke: 2px #000;
    margin: 4px 0 6px;
}
.sr-newbest {
    font-family: 'Orbitron', monospace;
    font-size: 0.78rem; font-weight: 800; letter-spacing: 0.18em;
    color: var(--sr-gold);
    margin: 8px 0 6px;
    text-shadow: 0 2px 8px rgba(212,160,23,0.7);
    animation: sr-newbest-pulse 1s ease-in-out infinite;
}
.sr-end-rank {
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem; font-weight: 800; letter-spacing: 0.15em;
    color: #16d4ff;
    margin: 6px 0 -8px;
    text-shadow: 0 2px 6px rgba(22,212,255,0.5);
}
@keyframes sr-newbest-pulse {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50%      { transform: scale(1.07); opacity: 1; }
}
.sr-end-stats {
    display: flex; gap: 24px;
    margin-top: 18px;
}
.sr-stat-label {
    font-family: 'Orbitron', monospace;
    font-size: 0.55rem; font-weight: 700; letter-spacing: 0.2em;
    color: var(--sr-gold-deep);
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.sr-stat-value {
    font-family: 'Bagel Fat One', sans-serif;
    font-size: 1.2rem; color: #fff;
    text-shadow: 0 2px 0 #000, 0 4px 10px rgba(0,0,0,0.8);
}
.sr-end-primary {
    margin-top: 32px;
    background: linear-gradient(135deg, var(--sr-gold), var(--sr-gold-deep));
    color: #0a0610;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem; font-weight: 800; letter-spacing: 0.15em;
    border: none; cursor: pointer;
    padding: 11px 28px; border-radius: 99px;
    box-shadow: 0 8px 22px rgba(212,160,23,0.55);
}
.sr-end-secondary {
    margin-top: 12px;
    background: transparent;
    color: var(--sr-gold);
    font-family: 'Orbitron', monospace;
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.15em;
    border: 1px solid rgba(212,160,23,0.5);
    cursor: pointer;
    padding: 8px 22px; border-radius: 99px;
    backdrop-filter: blur(10px);
}
.sr-end-coins-earned {
    margin-top: 8px;
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem; font-weight: 800; letter-spacing: 0.05em;
    color: var(--sr-gold);
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.sr-end-cta-row {
    display: flex; gap: 10px;
    margin-top: 18px;
}
.sr-end-cta {
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em;
    border: none; cursor: pointer;
    padding: 12px 18px; border-radius: 99px;
    color: #fff;
    flex: 1;                     /* single full-width SHARE button now */
}
.sr-end-cta-share {
    background: rgba(20,14,26,0.7);
    border: 1px solid rgba(212,160,23,0.4);
}

/* Scrollbar suppression */
.sr-overlay-menu::-webkit-scrollbar,
.sr-overlay-end::-webkit-scrollbar { width: 0; }

@media (max-width: 420px) {
    .sr-grid { grid-template-columns: repeat(2, 1fr); }
    .sr-featured-title { font-size: 1.25rem; }
    .sr-featured-cover { width: 90px; height: 90px; }
    .sr-end-score { font-size: 3.8rem; }
}

/* ===== Pause overlay ===== */
/* ===== Ad-revive overlay (native rewarded-video "continue?") ===== */
.sr-revive-overlay {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(7,5,10,0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 6000;
    animation: sr-pause-fade 0.2s ease-out;
}
.sr-revive-card {
    background: linear-gradient(180deg, rgba(28,18,40,0.96) 0%, rgba(7,5,10,0.96) 100%);
    border: 1.5px solid rgba(6,214,160,0.5);
    border-radius: 24px;
    padding: 30px 30px 26px;
    width: min(360px, 88vw);
    text-align: center;
    box-shadow: 0 30px 80px rgba(0,0,0,0.7);
}
.sr-revive-title {
    font-family: 'Bagel Fat One', 'Orbitron', sans-serif;
    font-size: 2.3rem; line-height: 1;
    background: linear-gradient(135deg, #06d6a0, #16d4ff);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px; letter-spacing: 0.04em;
}
.sr-revive-sub {
    font-family: 'Orbitron', monospace;
    font-size: 0.72rem; color: rgba(243,230,196,0.7);
    letter-spacing: 0.06em; line-height: 1.5; margin-bottom: 14px;
}
.sr-revive-count {
    font-family: 'Bagel Fat One', 'Orbitron', sans-serif;
    font-size: 2.4rem; color: #06d6a0; margin-bottom: 14px;
    text-shadow: 0 0 24px rgba(6,214,160,0.5);
}
.sr-revive-btn {
    display: block; width: 100%;
    padding: 13px 20px; margin-bottom: 10px;
    border: none; border-radius: 99px;
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem; font-weight: 800; letter-spacing: 0.12em;
    cursor: pointer; transition: all 0.18s;
}
.sr-revive-watch {
    background: linear-gradient(135deg, #06d6a0, #16d4ff);
    color: #06121a; box-shadow: 0 8px 22px rgba(6,214,160,0.45);
}
.sr-revive-watch:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(6,214,160,0.6); }
.sr-revive-no {
    background: transparent; color: rgba(243,230,196,0.7);
    border: 1px solid rgba(212,160,23,0.3); margin-bottom: 0;
}
.sr-revive-no:hover { color: var(--sr-gold); border-color: rgba(212,160,23,0.6); }

.sr-pause-overlay {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(7,5,10,0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 5000;
    animation: sr-pause-fade 0.18s ease-out;
}
@keyframes sr-pause-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.sr-pause-card {
    background: linear-gradient(180deg, rgba(28,18,40,0.95) 0%, rgba(7,5,10,0.95) 100%);
    border: 1.5px solid rgba(212,160,23,0.5);
    border-radius: 24px;
    padding: 32px 32px 28px;
    width: min(360px, 88vw);
    text-align: center;
    box-shadow: 0 30px 80px rgba(0,0,0,0.7);
}
.sr-pause-title {
    font-family: 'Bagel Fat One', 'Orbitron', sans-serif;
    font-size: 2.6rem; line-height: 1;
    background: linear-gradient(135deg, var(--sr-gold), var(--sr-gold-deep));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
    letter-spacing: 0.05em;
}
.sr-pause-sub {
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem;
    color: rgba(243,230,196,0.65);
    letter-spacing: 0.18em;
    margin-bottom: 22px;
}
.sr-pause-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    margin-bottom: 10px;
    border: 1px solid rgba(212,160,23,0.4);
    border-radius: 99px;
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    cursor: pointer;
    background: rgba(20,14,26,0.65);
    color: var(--sr-gold);
    transition: all 0.18s;
}
.sr-pause-btn:hover {
    background: rgba(212,160,23,0.2);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(212,160,23,0.25);
}
.sr-pause-resume {
    background: linear-gradient(135deg, var(--sr-gold), var(--sr-gold-deep));
    color: #0a0610;
    border-color: transparent;
}
.sr-pause-resume:hover {
    background: linear-gradient(135deg, #ffec80, var(--sr-gold));
    color: #0a0610;
}
.sr-pause-quit {
    color: rgba(243,230,196,0.7);
    border-color: rgba(212,160,23,0.25);
}
.sr-pause-hint {
    margin-top: 12px;
    font-size: 0.62rem;
    color: rgba(243,230,196,0.45);
    letter-spacing: 0.1em;
}
.sr-pause-hint kbd {
    background: rgba(212,160,23,0.2);
    border: 1px solid rgba(212,160,23,0.4);
    border-radius: 4px;
    padding: 1px 6px;
    font-family: monospace;
    font-size: 0.65rem;
    color: var(--sr-gold);
    margin: 0 2px;
}

/* ===========================================================
   HUD — Combo cascade (center-screen big tier flashes)
   =========================================================== */
.sr-combo-flash {
    position: absolute; top: 22%; left: 0; right: 0;
    text-align: center;
    pointer-events: none;
    z-index: 6;
}
.sr-combo-flash-item {
    display: inline-block;
    font-family: 'Bagel Fat One', 'Orbitron', sans-serif;
    font-size: 3.6rem;
    line-height: 1;
    color: var(--sr-gold);
    text-shadow: 0 4px 0 #000, 0 10px 26px rgba(0,0,0,0.7);
    -webkit-text-stroke: 2.5px #000;
    animation: sr-combo-punch 800ms ease-out forwards;
}
@keyframes sr-combo-punch {
    0%   { opacity: 0; transform: scale(1.2); }
    18%  { opacity: 1; transform: scale(0.9); }
    35%  { transform: scale(1.0); }
    75%  { opacity: 1; transform: scale(1.0); }
    100% { opacity: 0; transform: scale(1.05); }
}
.sr-combo-flash-hot {
    text-shadow: 0 0 22px #ff20a0, 0 4px 0 #000, 0 10px 26px rgba(255,32,160,0.45);
}
.sr-combo-flash-rainbow {
    -webkit-text-stroke: 2.5px transparent;
    background:
        linear-gradient(90deg, #22d3ee, #ff20a0, #ffd700, #22d3ee) text,
        linear-gradient(90deg, #22d3ee, #ff20a0, #ffd700, #22d3ee);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 100%;
    animation: sr-combo-rainbow 800ms ease-out forwards, sr-combo-rainbow-shift 1.4s linear infinite;
    filter: drop-shadow(0 0 18px rgba(34,211,238,0.6)) drop-shadow(0 4px 0 #000);
}
@keyframes sr-combo-rainbow {
    0%   { opacity: 0; transform: scale(1.2); }
    18%  { opacity: 1; transform: scale(0.9); }
    35%  { transform: scale(1.0); }
    75%  { opacity: 1; transform: scale(1.0); }
    100% { opacity: 0; transform: scale(1.05); }
}
@keyframes sr-combo-rainbow-shift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ===========================================================
   HUD — Power-up indicator cluster (top right under song meta)
   =========================================================== */
.sr-powerups {
    position: absolute; top: 100px; right: 12px;
    display: flex; gap: 6px;
    pointer-events: none;
}
.sr-powerup {
    position: relative;
    width: 36px; height: 36px;
    background: rgba(20,14,26,0.72);
    border: 1px solid rgba(212,160,23,0.45);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5), inset 0 0 8px rgba(212,160,23,0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: sr-powerup-enter 280ms ease-out;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
@keyframes sr-powerup-enter {
    0%   { opacity: 0; transform: scale(0.4); }
    60%  { opacity: 1; transform: scale(1.15); }
    100% { opacity: 1; transform: scale(1); }
}
.sr-powerup-icon {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    font-family: 'Orbitron', monospace;
    font-weight: 800;
    color: var(--sr-gold);
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    z-index: 2;
}
.sr-powerup-ring {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    transform: rotate(-90deg); /* start at 12 o'clock */
}
.sr-powerup-ring-bg {
    fill: none;
    stroke: rgba(212,160,23,0.15);
    stroke-width: 2.5;
}
.sr-powerup-ring-fg {
    fill: none;
    stroke: var(--sr-gold);
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
    filter: drop-shadow(0 0 4px rgba(255,215,0,0.7));
}
.sr-powerup-expiring {
    animation: sr-powerup-pulse 0.7s ease-in-out infinite;
}
@keyframes sr-powerup-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.12); }
}
.sr-powerup-leaving {
    animation: sr-powerup-leave 0.45s ease-in forwards;
}
@keyframes sr-powerup-leave {
    0%   { opacity: 1; transform: scale(1) rotate(0deg); }
    100% { opacity: 0; transform: scale(0.5) rotate(180deg); }
}

/* ===========================================================
   HUD — Mini-challenge banner (top center, below progress)
   =========================================================== */
.sr-challenge {
    position: absolute;
    top: 92px;
    left: 50%; transform: translateX(-50%) translateY(-10px);
    width: min(74%, 320px);
    background: rgba(20,14,26,0.82);
    border: 1px solid rgba(212,160,23,0.5);
    border-radius: 12px;
    padding: 8px 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.2s ease, background 0.2s ease;
    z-index: 5;
}
.sr-challenge-active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.sr-challenge-text {
    font-family: 'Orbitron', monospace;
    font-size: 0.72rem; font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--sr-gold);
    text-align: center;
    margin-bottom: 6px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}
.sr-challenge-meta {
    display: flex; align-items: center; gap: 8px;
}
.sr-challenge-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.14);
    border-radius: 99px;
    overflow: hidden;
}
.sr-challenge-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--sr-gold), var(--sr-pink));
    box-shadow: 0 0 6px rgba(255,215,0,0.5);
    transition: width 0.15s linear;
}
.sr-challenge-time {
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem; font-weight: 800; letter-spacing: 0.05em;
    color: rgba(243,230,196,0.85);
    min-width: 32px;
    text-align: right;
}
.sr-challenge-success {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    border-color: #4ade80;
    background: rgba(34, 197, 94, 0.32);
    animation: sr-challenge-success-flash 0.6s ease-out;
}
.sr-challenge-success .sr-challenge-text { color: #4ade80; }
.sr-challenge-fail {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    border-color: #f87171;
    background: rgba(220, 38, 38, 0.32);
    animation: sr-challenge-fail-flash 0.6s ease-out;
}
.sr-challenge-fail .sr-challenge-text { color: #fca5a5; }
@keyframes sr-challenge-success-flash {
    0%   { transform: translateX(-50%) translateY(0) scale(1); }
    35%  { transform: translateX(-50%) translateY(0) scale(1.08); box-shadow: 0 0 20px rgba(74,222,128,0.7); }
    100% { transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes sr-challenge-fail-flash {
    0%   { transform: translateX(-50%) translateY(0) scale(1); }
    35%  { transform: translateX(-50%) translateY(0) scale(0.96); box-shadow: 0 0 20px rgba(248,113,113,0.7); }
    100% { transform: translateX(-50%) translateY(0) scale(1); }
}

/* ===========================================================
   HUD — Hoverboard ready + Shield overlay
   =========================================================== */
.sr-hover-ready {
    position: absolute;
    bottom: 16px; right: 14px;
    background: rgba(20,14,26,0.85);
    border: 1.5px solid rgba(255,215,0,0.65);
    border-radius: 99px;
    padding: 7px 13px 7px 10px;
    display: flex; align-items: center; gap: 7px;
    font-family: 'Orbitron', monospace;
    font-size: 0.72rem; font-weight: 800;
    letter-spacing: 0.14em;
    color: var(--sr-gold);
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    box-shadow: 0 6px 18px rgba(212,160,23,0.35);
    pointer-events: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.sr-hover-ready.sr-hover-show {
    opacity: 1;
    transform: translateY(0);
    animation: sr-hover-pulse 1.4s ease-in-out infinite;
}
.sr-hover-icon { font-size: 1.3rem; }
.sr-hover-count {
    background: linear-gradient(135deg,#ffd700,#d4a017);
    color: #0a0610;
    border-radius: 99px;
    padding: 1px 7px;
    font-size: 0.7rem; font-weight: 800;
    letter-spacing: 0;
}
@keyframes sr-hover-pulse {
    0%, 100% { box-shadow: 0 6px 18px rgba(212,160,23,0.35); }
    50%      { box-shadow: 0 6px 22px rgba(255,215,0,0.8), 0 0 26px rgba(255,215,0,0.4); }
}

.sr-shield-overlay {
    position: absolute; inset: 0;
    pointer-events: none;
    border: 4px solid transparent;
    border-radius: 22px;
    box-sizing: border-box;
    transition: opacity 0.18s ease;
    opacity: 0;
}
.sr-shield-overlay.sr-shield-on {
    opacity: 1;
    border-color: var(--sr-gold);
    box-shadow:
        inset 0 0 60px rgba(255,215,0,0.35),
        inset 0 0 140px rgba(255,215,0,0.15);
    animation: sr-shield-pulse 0.4s alternate infinite;
}
@keyframes sr-shield-pulse {
    0%   { border-color: #ffd700; box-shadow: inset 0 0 50px rgba(255,215,0,0.3); }
    100% { border-color: #ffec80; box-shadow: inset 0 0 80px rgba(255,236,128,0.55); }
}
@media (max-width: 540px) {
    .sr-shield-overlay { border-radius: 0; }
}

/* ===========================================================
   HUD — Letter collection strip (top left, below score)
   =========================================================== */
.sr-letters {
    position: absolute;
    top: 96px; left: 12px;
    display: flex; gap: 4px;
    pointer-events: none;
}
.sr-letter {
    width: 22px; height: 22px;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem; font-weight: 800;
    border-radius: 5px;
    color: rgba(243,230,196,0.32);
    border: 1px solid rgba(243,230,196,0.22);
    background: rgba(20,14,26,0.4);
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}
.sr-letter-on {
    color: #0a0610;
    background: linear-gradient(135deg, var(--sr-gold), var(--sr-gold-deep));
    border-color: var(--sr-gold);
    box-shadow: 0 0 10px rgba(255,215,0,0.65);
    animation: sr-letter-pop 360ms ease-out;
}
@keyframes sr-letter-pop {
    0%   { transform: scale(0.6); }
    60%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}
.sr-letters-complete .sr-letter {
    animation: sr-letter-celebrate 0.8s ease-in-out 3;
}
@keyframes sr-letter-celebrate {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50%      { transform: scale(1.18) rotate(-6deg); box-shadow: 0 0 18px rgba(255,215,0,0.95); }
}

/* Confetti when HARDIK completed */
.sr-confetti {
    position: absolute; inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 7;
}
.sr-confetti-dot {
    position: absolute;
    top: -16px;
    width: 8px; height: 12px;
    border-radius: 2px;
    animation: sr-confetti-fall 1.4s ease-in forwards;
}
@keyframes sr-confetti-fall {
    0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ===========================================================
   HUD — Sprint badge (left side, below hearts/score)
   =========================================================== */
.sr-sprint-badge {
    position: absolute;
    top: 130px; left: 12px;
    font-family: 'Orbitron', monospace;
    font-size: 0.6rem; font-weight: 800;
    letter-spacing: 0.2em;
    color: #ff3b85;
    background: rgba(255, 59, 133, 0.18);
    border: 1px solid #ff3b85;
    border-radius: 99px;
    padding: 4px 10px;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 0 14px rgba(255,59,133,0);
}
.sr-sprint-badge.sr-sprint-on {
    opacity: 1;
    transform: translateX(0);
    animation: sr-sprint-glow 0.5s ease-in-out infinite alternate;
}
@keyframes sr-sprint-glow {
    0%   { box-shadow: 0 0 8px rgba(255,59,133,0.4); }
    100% { box-shadow: 0 0 22px rgba(255,59,133,0.85), 0 0 40px rgba(255,59,133,0.3); }
}

/* ===========================================================
   HUD — Score float popups (center-bottom emitter)
   =========================================================== */
.sr-floats {
    position: absolute; bottom: 22%; left: 0; right: 0;
    text-align: center;
    pointer-events: none;
    z-index: 4;
}
.sr-score-float {
    display: inline-block;
    font-family: 'Bagel Fat One', sans-serif;
    font-size: 1.4rem;
    line-height: 1;
    text-shadow: 0 3px 0 #000, 0 8px 14px rgba(0,0,0,0.7);
    -webkit-text-stroke: 1.5px #000;
    animation: sr-score-float-anim 600ms ease-out forwards;
}
@keyframes sr-score-float-anim {
    0%   { opacity: 0; transform: translateY(0) scale(0.7); }
    20%  { opacity: 1; transform: translateY(-12px) scale(1.15); }
    100% { opacity: 0; transform: translateY(-72px) scale(0.95); }
}

/* ===========================================================
   TUTORIAL OVERLAY (first run)
   =========================================================== */
.sr-tut-overlay {
    position: fixed; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: radial-gradient(ellipse at center, rgba(28,18,40,0.96), #07050a 70%);
    z-index: 8000;
    padding: 24px;
    font-family: 'Fredoka', system-ui, sans-serif;
    animation: sr-tut-fade 0.32s ease-out;
}
.sr-tut-overlay.sr-tut-exit {
    animation: sr-tut-fade-out 0.28s ease-in forwards;
}
@keyframes sr-tut-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes sr-tut-fade-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}
.sr-tut-stepdots {
    display: flex; align-items: center; gap: 6px;
    margin-bottom: 22px;
    color: rgba(243,230,196,0.6);
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em;
}
.sr-tut-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(243,230,196,0.25);
    transition: all 0.25s ease;
}
.sr-tut-dot-active {
    background: var(--sr-gold);
    box-shadow: 0 0 10px rgba(255,215,0,0.6);
    transform: scale(1.25);
}
.sr-tut-step-count {
    margin-left: 8px;
    color: rgba(243,230,196,0.55);
}
.sr-tut-card {
    width: min(420px, 92vw);
    text-align: center;
    color: #f3e6c4;
}
.sr-tut-card-enter {
    animation: sr-tut-card-in 0.36s cubic-bezier(.2,.7,.3,1.2);
}
@keyframes sr-tut-card-in {
    0%   { opacity: 0; transform: translateY(20px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
.sr-tut-visual {
    width: 100%;
    height: 160px;
    margin-bottom: 18px;
    position: relative;
    display: flex; align-items: center; justify-content: center;
}
/* Revive (hoverboard) tutorial visual — board emoji inside a pulsing shield ring */
.sr-tut-revive { }
.sr-tut-revive-board {
    font-size: 4.2rem;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.6));
    animation: sr-tut-revive-bob 1.8s ease-in-out infinite;
    z-index: 1;
}
.sr-tut-revive-ring {
    position: absolute;
    width: 130px; height: 130px;
    border-radius: 50%;
    border: 3px solid rgba(0,212,255,0.85);
    box-shadow: 0 0 28px rgba(0,212,255,0.55), inset 0 0 22px rgba(0,212,255,0.35);
    animation: sr-tut-revive-pulse 1.8s ease-in-out infinite;
}
@keyframes sr-tut-revive-bob {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50%      { transform: translateY(-8px) rotate(4deg); }
}
@keyframes sr-tut-revive-pulse {
    0%, 100% { transform: scale(0.92); opacity: 0.65; }
    50%      { transform: scale(1.08); opacity: 1; }
}
.sr-tut-logo .sr-tut-logo-text {
    font-family: 'Bagel Fat One', sans-serif;
    font-size: 2.6rem; line-height: 0.95;
    background: linear-gradient(135deg, var(--sr-gold), var(--sr-gold-deep) 60%, #8b6914);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 6px 30px rgba(212,160,23,0.4);
    animation: sr-tut-logo-pulse 2.2s ease-in-out infinite;
}
@keyframes sr-tut-logo-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.04); }
}

/* Swipe-gesture visual */
.sr-tut-swipes {}
.sr-tut-figure {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255,215,0,0.18);
    border: 2px solid var(--sr-gold);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 22px rgba(255,215,0,0.4);
}
.sr-tut-figure-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--sr-gold);
}
.sr-tut-arrow {
    position: absolute;
    font-family: 'Bagel Fat One', sans-serif;
    font-size: 2rem;
    color: var(--sr-gold);
    text-shadow: 0 0 12px rgba(255,215,0,0.7);
    opacity: 0.85;
}
.sr-tut-arrow-left  { left:  calc(50% - 88px); top: 50%; transform: translateY(-50%); animation: sr-tut-arrow-h 1.6s ease-in-out infinite; }
.sr-tut-arrow-right { right: calc(50% - 88px); top: 50%; transform: translateY(-50%); animation: sr-tut-arrow-h 1.6s ease-in-out infinite 0.2s; }
.sr-tut-arrow-up    { left: 50%; top: 8px;     transform: translateX(-50%); animation: sr-tut-arrow-v 1.6s ease-in-out infinite 0.4s; }
.sr-tut-arrow-down  { left: 50%; bottom: 8px;  transform: translateX(-50%); animation: sr-tut-arrow-v 1.6s ease-in-out infinite 0.6s; }
@keyframes sr-tut-arrow-h {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1; }
}
@keyframes sr-tut-arrow-v {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1; }
}
.sr-tut-arrow-left  { animation-name: sr-tut-arrow-slide-l; }
.sr-tut-arrow-right { animation-name: sr-tut-arrow-slide-r; }
.sr-tut-arrow-up    { animation-name: sr-tut-arrow-slide-u; }
.sr-tut-arrow-down  { animation-name: sr-tut-arrow-slide-d; }
@keyframes sr-tut-arrow-slide-l {
    0%, 100% { transform: translateY(-50%) translateX(0);    opacity: 0.4; }
    50%      { transform: translateY(-50%) translateX(-12px); opacity: 1; }
}
@keyframes sr-tut-arrow-slide-r {
    0%, 100% { transform: translateY(-50%) translateX(0);    opacity: 0.4; }
    50%      { transform: translateY(-50%) translateX(12px); opacity: 1; }
}
@keyframes sr-tut-arrow-slide-u {
    0%, 100% { transform: translateX(-50%) translateY(0);    opacity: 0.4; }
    50%      { transform: translateX(-50%) translateY(-10px); opacity: 1; }
}
@keyframes sr-tut-arrow-slide-d {
    0%, 100% { transform: translateX(-50%) translateY(0);    opacity: 0.4; }
    50%      { transform: translateX(-50%) translateY(10px); opacity: 1; }
}

/* Hold-to-sprint visual */
.sr-tut-hold .sr-tut-finger {
    position: relative;
    width: 60px; height: 60px;
}
.sr-tut-finger-dot {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--sr-gold);
    box-shadow: 0 0 18px rgba(255,215,0,0.7);
    animation: sr-tut-finger-press 1.2s ease-in-out infinite;
}
.sr-tut-finger-ring {
    position: absolute; left: 50%; top: 50%;
    width: 60px; height: 60px;
    margin-left: -30px; margin-top: -30px;
    border-radius: 50%;
    border: 2px solid rgba(255,215,0,0.6);
    animation: sr-tut-finger-ring 1.2s ease-out infinite;
}
@keyframes sr-tut-finger-press {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50%      { transform: translate(-50%, -50%) scale(0.86); }
}
@keyframes sr-tut-finger-ring {
    0%   { transform: scale(0.8); opacity: 0.85; }
    100% { transform: scale(1.8); opacity: 0; }
}
.sr-tut-speedline {
    position: absolute;
    top: 50%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--sr-pink));
    border-radius: 99px;
    opacity: 0;
    animation: sr-tut-speedline 1s linear infinite;
}
.sr-tut-speedline:nth-child(3) { left: -90px; width: 60px;  animation-delay: 0s;   }
.sr-tut-speedline:nth-child(4) { left: -120px; width: 80px; top: calc(50% - 12px); animation-delay: 0.25s; }
.sr-tut-speedline:nth-child(5) { left: -100px; width: 50px; top: calc(50% + 14px); animation-delay: 0.5s; }
@keyframes sr-tut-speedline {
    0%   { opacity: 0; transform: translateX(-10px); }
    40%  { opacity: 1; }
    100% { opacity: 0; transform: translateX(40px); }
}

/* "Get started" letter block */
.sr-tut-start .sr-tut-letters {
    display: flex; gap: 6px;
}
.sr-tut-start .sr-tut-letters span {
    width: 38px; height: 46px;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: 'Bagel Fat One', sans-serif;
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--sr-gold), var(--sr-gold-deep));
    color: #0a0610;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(212,160,23,0.45);
    animation: sr-tut-letter-bounce 1.6s ease-in-out infinite;
}
.sr-tut-start .sr-tut-letters span:nth-child(1) { animation-delay: 0s; }
.sr-tut-start .sr-tut-letters span:nth-child(2) { animation-delay: 0.08s; }
.sr-tut-start .sr-tut-letters span:nth-child(3) { animation-delay: 0.16s; }
.sr-tut-start .sr-tut-letters span:nth-child(4) { animation-delay: 0.24s; }
.sr-tut-start .sr-tut-letters span:nth-child(5) { animation-delay: 0.32s; }
.sr-tut-start .sr-tut-letters span:nth-child(6) { animation-delay: 0.4s; }
@keyframes sr-tut-letter-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

.sr-tut-title {
    font-family: 'Bagel Fat One', 'Orbitron', sans-serif;
    font-size: 2rem;
    line-height: 1;
    background: linear-gradient(135deg, var(--sr-gold), var(--sr-gold-deep));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
}
.sr-tut-body {
    font-size: 1rem;
    color: #f3e6c4;
    line-height: 1.4;
    margin-bottom: 6px;
}
.sr-tut-sub {
    font-size: 0.78rem;
    color: rgba(243,230,196,0.65);
    line-height: 1.4;
    margin-bottom: 22px;
}
.sr-tut-next {
    background: linear-gradient(135deg, var(--sr-gold), var(--sr-gold-deep));
    color: #0a0610;
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem; font-weight: 800; letter-spacing: 0.15em;
    border: none; cursor: pointer;
    padding: 12px 28px; border-radius: 99px;
    box-shadow: 0 8px 22px rgba(212,160,23,0.55);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sr-tut-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(212,160,23,0.7);
}
.sr-tut-skip {
    position: absolute;
    bottom: 28px;
    color: rgba(243,230,196,0.55);
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.18em;
    cursor: pointer;
    padding: 8px 14px;
    transition: color 0.18s ease;
}
.sr-tut-skip:hover { color: var(--sr-gold); }

@media (max-width: 420px) {
    .sr-tut-title { font-size: 1.6rem; }
    .sr-tut-body { font-size: 0.92rem; }
    .sr-letters { top: 90px; }
    .sr-letter  { width: 18px; height: 18px; font-size: 0.6rem; }
    .sr-powerups { top: 90px; }
    .sr-powerup { width: 30px; height: 30px; }
    .sr-powerup-icon { font-size: 0.85rem; }
    .sr-challenge { top: 88px; padding: 6px 10px; }
    .sr-challenge-text { font-size: 0.64rem; }
    .sr-sprint-badge { top: 120px; }
    .sr-combo-flash-item { font-size: 2.6rem; }
}

/* ===== Loading overlay ===== */
.sr-loading {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 18px;
    background: radial-gradient(ellipse at 50% 30%, rgba(28,18,40,0.95) 0%, #07050a 70%);
    z-index: 50;
}
.sr-loading-title {
    font-family: 'Bagel Fat One', sans-serif;
    font-size: 2rem; line-height: 0.95; text-align: center;
    background: linear-gradient(135deg, var(--sr-gold) 0%, var(--sr-gold-deep) 60%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 8px 30px rgba(212,160,23,0.4);
}
.sr-loading-sub {
    font-size: 0.85rem; color: rgba(243,230,196,0.7);
}
.sr-loading-bar {
    width: 220px; height: 4px;
    background: rgba(212,160,23,0.18);
    border-radius: 99px; overflow: hidden;
    border: 1px solid rgba(212,160,23,0.4);
}
.sr-loading-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--sr-gold), var(--sr-pink));
    width: 30%;
    animation: sr-loading-anim 1.2s ease-in-out infinite;
}
@keyframes sr-loading-anim {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

/* ===========================================================
   MENU — header bar (coin balance + shop/missions/settings)
   =========================================================== */
.sr-menu-headbar {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0 10px;
    position: sticky; top: 0;
    z-index: 5;
}
.sr-menu-coinbtn {
    display: flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, rgba(255,215,0,0.18), rgba(212,160,23,0.06));
    border: 1px solid rgba(212,160,23,0.55);
    border-radius: 99px;
    padding: 6px 12px 6px 8px;
    cursor: pointer;
    color: var(--sr-gold);
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem; font-weight: 800;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.18s;
    box-shadow: 0 4px 14px rgba(212,160,23,0.18);
}
.sr-menu-coinbtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(212,160,23,0.35);
    border-color: var(--sr-gold);
}
.sr-coin-icon { font-size: 1.05rem; line-height: 1; }
.sr-coin-amt { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }

.sr-menu-headbtns {
    display: flex; gap: 6px;
}
.sr-icon-btn {
    position: relative;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(20,14,26,0.6);
    border: 1px solid rgba(212,160,23,0.32);
    border-radius: 50%;
    cursor: pointer;
    color: var(--sr-gold);
    font-size: 1rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.18s;
}
.sr-icon-btn:hover {
    transform: translateY(-1px) scale(1.05);
    border-color: var(--sr-gold);
    background: rgba(28,20,38,0.85);
    color: #fff;
}
/* "?" help / how-to-play button — make the glyph read clearly */
.sr-help-btn span {
    font-family: 'Orbitron', monospace;
    font-size: 1.05rem; font-weight: 800; line-height: 1;
}
.sr-icon-badge {
    position: absolute; top: -4px; right: -4px;
    background: var(--sr-pink);
    color: #fff;
    font-family: 'Orbitron', monospace;
    font-size: 0.55rem; font-weight: 800;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 99px;
    box-shadow: 0 2px 8px rgba(255,59,133,0.6);
    min-width: 12px;
    text-align: center;
}

/* ===========================================================
   CONTROLS HINT (desktop only — shows keyboard scheme)
   =========================================================== */
.sr-controls-hint {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: 6px; row-gap: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
    background: rgba(20,14,26,0.55);
    border: 1px solid rgba(212,160,23,0.25);
    border-radius: 12px;
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem; font-weight: 600; letter-spacing: 0.08em;
    color: rgba(243,230,196,0.75);
}
.sr-ctrl-key {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px; padding: 0 6px;
    background: rgba(212,160,23,0.18);
    border: 1px solid rgba(212,160,23,0.55);
    border-radius: 5px;
    color: var(--sr-gold);
    font-weight: 800; font-size: 0.7rem;
    box-shadow: inset 0 -1.5px 0 rgba(0,0,0,0.4), 0 1px 0 rgba(0,0,0,0.5);
}
.sr-ctrl-key-wide { min-width: 44px; }
.sr-ctrl-lbl { color: rgba(243,230,196,0.7); text-transform: uppercase; }
.sr-ctrl-sep { color: rgba(212,160,23,0.4); padding: 0 2px; }

/* ===========================================================
   DAILY WORD HUNT — strip + panel
   =========================================================== */
.sr-daily-host { cursor: pointer; margin-bottom: 12px; }
.sr-daily-strip {
    background: linear-gradient(135deg, rgba(20,14,26,0.7), rgba(28,20,38,0.5));
    border: 1px solid rgba(212,160,23,0.35);
    border-radius: 14px;
    padding: 10px 14px;
    transition: all 0.18s;
}
.sr-daily-host:hover .sr-daily-strip {
    transform: translateY(-1px);
    border-color: var(--sr-gold);
    box-shadow: 0 6px 18px rgba(212,160,23,0.2);
}
.sr-daily-strip.sr-daily-ready {
    border-color: var(--sr-pink);
    box-shadow: 0 0 16px rgba(255,59,133,0.4);
    animation: sr-daily-pulse 1.4s ease-in-out infinite;
}
@keyframes sr-daily-pulse {
    0%, 100% { box-shadow: 0 0 14px rgba(255,59,133,0.35); }
    50%      { box-shadow: 0 0 24px rgba(255,59,133,0.7); }
}
.sr-daily-label {
    font-family: 'Orbitron', monospace;
    font-size: 0.55rem; font-weight: 800; letter-spacing: 0.3em;
    color: var(--sr-gold);
    text-align: center;
}
.sr-daily-slots {
    display: flex; gap: 6px; justify-content: center;
    margin: 8px 0 6px;
}
.sr-daily-slots-lg { gap: 10px; margin: 18px 0; }
.sr-daily-slot {
    width: 32px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(7,5,10,0.85);
    border: 2px dashed rgba(212,160,23,0.7);
    border-radius: 6px;
    font-family: 'Bagel Fat One', sans-serif;
    font-size: 1.05rem;
    color: rgba(243,230,196,0.55);
    transition: all 0.2s;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.4);
}
.sr-daily-slot-lg {
    width: 44px; height: 52px;
    border-radius: 8px;
    font-size: 1.6rem;
}
.sr-daily-slot-filled {
    background: linear-gradient(135deg, var(--sr-gold), var(--sr-gold-deep));
    border: 1.5px solid var(--sr-gold);
    border-style: solid;
    color: #0a0610;
    box-shadow: 0 0 12px rgba(255,215,0,0.5);
    text-shadow: 0 1px 0 rgba(0,0,0,0.25);
}
.sr-daily-status {
    text-align: center;
    font-family: 'Orbitron', monospace;
    font-size: 0.6rem; font-weight: 700; letter-spacing: 0.15em;
    color: rgba(243,230,196,0.7);
}
.sr-daily-ready .sr-daily-status { color: var(--sr-pink); }

.sr-daily-progress {
    font-family: 'Orbitron', monospace;
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.15em;
    color: var(--sr-gold);
}
.sr-daily-claimed {
    font-family: 'Orbitron', monospace;
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em;
    color: #06d6a0;
}
.sr-daily-claim-btn {
    background: linear-gradient(135deg, var(--sr-gold), var(--sr-gold-deep));
    color: #0a0610;
    font-family: 'Orbitron', monospace;
    font-size: 0.95rem; font-weight: 800; letter-spacing: 0.15em;
    border: none; cursor: pointer;
    padding: 12px 28px; border-radius: 99px;
    box-shadow: 0 8px 22px rgba(212,160,23,0.55);
    transition: all 0.18s;
}
.sr-daily-claim-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(212,160,23,0.7);
}
.sr-daily-cta { text-align: center; margin: 10px 0; }

/* ===========================================================
   MODAL system (settings / shop / missions / dailyhunt)
   =========================================================== */
.sr-panel-host { position: fixed; inset: 0; pointer-events: none; z-index: 9000; }
.sr-modal {
    position: fixed; inset: 0;
    align-items: center; justify-content: center;
    z-index: 9100;
    pointer-events: auto;
    animation: sr-modal-fade 0.18s ease-out;
}
@keyframes sr-modal-fade { from { opacity: 0; } to { opacity: 1; } }
.sr-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(7,5,10,0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.sr-modal-card {
    position: relative;
    width: min(420px, 92vw);
    max-height: 88vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(180deg, rgba(28,18,40,0.96) 0%, rgba(8,6,16,0.96) 100%);
    border: 1.5px solid rgba(212,160,23,0.55);
    border-radius: 22px;
    padding: 24px 22px 22px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.75), 0 0 0 1px rgba(212,160,23,0.18);
    color: #f3e6c4;
}
.sr-modal-card::-webkit-scrollbar { width: 0; }
.sr-modal-close {
    position: absolute; top: 8px; right: 12px;
    width: 32px; height: 32px;
    background: rgba(20,14,26,0.7);
    border: 1px solid rgba(212,160,23,0.35);
    border-radius: 50%;
    color: var(--sr-gold);
    font-size: 1.2rem; font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.18s;
}
.sr-modal-close:hover {
    background: rgba(212,160,23,0.25);
    color: #fff;
    border-color: var(--sr-gold);
    transform: rotate(90deg);
}
.sr-modal-title {
    font-family: 'Bagel Fat One', 'Orbitron', sans-serif;
    font-size: 1.85rem; line-height: 1;
    background: linear-gradient(135deg, var(--sr-gold), var(--sr-gold-deep));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.sr-modal-sub {
    text-align: center;
    font-family: 'Orbitron', monospace;
    font-size: 0.62rem; font-weight: 700; letter-spacing: 0.22em;
    color: rgba(243,230,196,0.6);
    margin-bottom: 18px;
}
.sr-modal-hint {
    margin-top: 14px;
    font-size: 0.65rem;
    color: rgba(243,230,196,0.45);
    text-align: center;
    line-height: 1.5;
}
.sr-modal-actions {
    display: flex; gap: 10px; justify-content: center;
    margin-top: 18px;
}
.sr-modal-btn {
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem; font-weight: 800; letter-spacing: 0.15em;
    border: 1px solid rgba(212,160,23,0.4);
    background: rgba(20,14,26,0.65);
    color: var(--sr-gold);
    padding: 10px 26px; border-radius: 99px;
    cursor: pointer;
    transition: all 0.18s;
}
.sr-modal-btn:hover {
    background: rgba(212,160,23,0.2);
    transform: translateY(-1px);
}
.sr-modal-btn-primary {
    background: linear-gradient(135deg, var(--sr-gold), var(--sr-gold-deep));
    color: #0a0610;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(212,160,23,0.45);
}
.sr-modal-btn-primary:hover {
    background: linear-gradient(135deg, #ffec80, var(--sr-gold));
    color: #0a0610;
}
/* "How to play" replay button — full-width row in Settings */
.sr-setting-howto { justify-content: center; }
.sr-howto-btn { width: 100%; }

/* ===========================================================
   SETTINGS modal
   =========================================================== */
.sr-setting-row {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 4px;
    border-bottom: 1px solid rgba(212,160,23,0.12);
}
.sr-setting-row:last-of-type { border-bottom: none; }
.sr-setting-slider { flex-direction: column; align-items: stretch; }
.sr-setting-label {
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em;
    color: var(--sr-gold);
    display: flex; align-items: center; justify-content: space-between;
}
.sr-setting-val {
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem; font-weight: 700;
    color: #f3e6c4;
    margin-left: 8px;
}
.sr-toggle-pills {
    display: flex; gap: 2px;
    background: rgba(7,5,10,0.6);
    border: 1px solid rgba(212,160,23,0.25);
    border-radius: 99px;
    padding: 2px;
}
.sr-toggle-pill {
    font-family: 'Orbitron', monospace;
    font-size: 0.62rem; font-weight: 800; letter-spacing: 0.12em;
    color: rgba(243,230,196,0.55);
    background: transparent;
    border: none;
    padding: 6px 12px;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.18s;
}
.sr-toggle-pill:hover { color: var(--sr-gold); }
.sr-toggle-pill.active {
    background: linear-gradient(135deg, var(--sr-gold), var(--sr-gold-deep));
    color: #0a0610;
    box-shadow: 0 2px 8px rgba(212,160,23,0.5);
}
.sr-slider {
    width: 100%; -webkit-appearance: none; appearance: none;
    height: 6px; border-radius: 99px;
    background: rgba(212,160,23,0.18);
    outline: none;
    margin-top: 8px;
}
.sr-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sr-gold), var(--sr-gold-deep));
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(212,160,23,0.6);
    border: 2px solid #0a0610;
}
.sr-slider::-moz-range-thumb {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sr-gold), var(--sr-gold-deep));
    cursor: pointer;
    border: 2px solid #0a0610;
    box-shadow: 0 2px 8px rgba(212,160,23,0.6);
}

/* ===========================================================
   SHOP modal
   =========================================================== */
.sr-shop-balance {
    text-align: center;
    font-family: 'Orbitron', monospace;
    font-size: 1rem; font-weight: 800; letter-spacing: 0.1em;
    color: var(--sr-gold);
    background: rgba(20,14,26,0.5);
    border: 1px solid rgba(212,160,23,0.32);
    border-radius: 99px;
    padding: 6px 16px;
    width: fit-content;
    margin: -6px auto 16px;
}
.sr-shop-tabs {
    display: flex; gap: 4px;
    background: rgba(7,5,10,0.6);
    border: 1px solid rgba(212,160,23,0.25);
    border-radius: 99px;
    padding: 3px;
    margin-bottom: 14px;
}
.sr-shop-tab {
    flex: 1;
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem; font-weight: 800; letter-spacing: 0.15em;
    color: rgba(243,230,196,0.55);
    background: transparent;
    border: none;
    padding: 8px 12px;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.18s;
}
.sr-shop-tab:hover { color: var(--sr-gold); }
.sr-shop-tab.active {
    background: linear-gradient(135deg, var(--sr-gold), var(--sr-gold-deep));
    color: #0a0610;
    box-shadow: 0 3px 10px rgba(212,160,23,0.5);
}
.sr-shop-list { display: flex; flex-direction: column; gap: 10px; }
.sr-shop-counter {
    text-align: center;
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.18em;
    color: rgba(243,230,196,0.7);
    margin-bottom: 4px;
}
.sr-shop-item {
    display: flex; gap: 12px;
    background: rgba(20,14,26,0.55);
    border: 1px solid rgba(212,160,23,0.2);
    border-radius: 14px;
    padding: 10px;
    transition: all 0.18s;
}
.sr-shop-item:hover {
    background: rgba(28,20,38,0.7);
    border-color: rgba(212,160,23,0.45);
}
.sr-shop-item-active {
    border-color: var(--sr-gold);
    box-shadow: 0 0 14px rgba(212,160,23,0.25);
    background: linear-gradient(135deg, rgba(255,215,0,0.08), rgba(20,14,26,0.55));
}
.sr-shop-thumb {
    width: 68px; height: 68px;
    flex-shrink: 0;
    border-radius: 10px;
    background: #0a0610;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(212,160,23,0.3);
}
.sr-shop-thumb-char { border-color: rgba(255,215,0,0.45); width:80px; height:100px; }
.sr-shop-thumb-char img { display:block; width:100%; height:100%; object-fit:cover; }
.sr-shop-thumb-board { border-color: rgba(22,212,255,0.45); }
.sr-shop-thumb svg {
    display: block;
    width: 100%; height: 100%;
}
.sr-shop-item-active .sr-shop-thumb {
    box-shadow: 0 0 12px rgba(212,160,23,0.55), 0 4px 10px rgba(0,0,0,0.4);
}
.sr-shop-info {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column;
    justify-content: space-between;
}
.sr-shop-name {
    font-family: 'Bagel Fat One', sans-serif;
    font-size: 1rem; color: #fff;
    line-height: 1.1;
    margin-bottom: 2px;
}
.sr-shop-desc {
    font-size: 0.72rem;
    color: rgba(243,230,196,0.65);
    line-height: 1.3;
}
.sr-shop-btn {
    align-self: flex-start;
    margin-top: 6px;
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem; font-weight: 800; letter-spacing: 0.12em;
    padding: 7px 14px;
    border-radius: 99px;
    cursor: pointer;
    border: 1px solid rgba(212,160,23,0.5);
    background: rgba(20,14,26,0.65);
    color: var(--sr-gold);
    transition: all 0.18s;
}
.sr-shop-btn:hover { background: rgba(212,160,23,0.18); }
.sr-shop-btn-buy {
    background: linear-gradient(135deg, var(--sr-gold), var(--sr-gold-deep));
    color: #0a0610;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(212,160,23,0.4);
}
.sr-shop-btn-buy:hover { background: linear-gradient(135deg, #ffec80, var(--sr-gold)); }
.sr-shop-btn-equip {
    background: linear-gradient(135deg, var(--sr-pink), #d61f6a);
    color: #fff;
    border-color: transparent;
}
.sr-shop-btn-owned {
    background: transparent;
    color: rgba(6,214,160,0.95);
    border-color: rgba(6,214,160,0.5);
    cursor: default;
}
.sr-shop-btn-disabled {
    opacity: 0.45;
    cursor: not-allowed !important;
    background: rgba(20,14,26,0.5);
    color: rgba(243,230,196,0.45);
    border-color: rgba(212,160,23,0.18);
    box-shadow: none;
}

/* ===========================================================
   MISSIONS modal
   =========================================================== */
.sr-missions-list {
    display: flex; flex-direction: column;
    gap: 8px;
}
.sr-mission-row {
    display: flex; gap: 10px;
    align-items: center;
    background: rgba(20,14,26,0.5);
    border: 1px solid rgba(212,160,23,0.18);
    border-radius: 12px;
    padding: 10px 12px;
}
.sr-mission-row-ready {
    border-color: var(--sr-gold);
    background: linear-gradient(135deg, rgba(255,215,0,0.08), rgba(20,14,26,0.5));
    box-shadow: 0 0 12px rgba(212,160,23,0.18);
}
.sr-mission-row-claimed { opacity: 0.55; }
.sr-mission-info {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: 4px;
}
.sr-mission-label {
    font-size: 0.8rem;
    color: #f3e6c4;
    font-weight: 600;
}
.sr-mission-progress {
    display: flex; align-items: center; gap: 8px;
}
.sr-mission-bar {
    flex: 1;
    height: 5px;
    background: rgba(212,160,23,0.18);
    border-radius: 99px;
    overflow: hidden;
}
.sr-mission-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--sr-gold), var(--sr-pink));
    border-radius: 99px;
    transition: width 0.4s ease;
}
.sr-mission-count {
    font-family: 'Orbitron', monospace;
    font-size: 0.6rem; font-weight: 700;
    color: rgba(243,230,196,0.7);
    min-width: 56px;
    text-align: right;
}
.sr-mission-status {
    font-family: 'Orbitron', monospace;
    font-size: 0.6rem; font-weight: 700; letter-spacing: 0.15em;
}
.sr-mission-ready    { color: var(--sr-gold); }
.sr-mission-claimed  { color: rgba(6,214,160,0.85); }
.sr-mission-reward {
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem; font-weight: 800; letter-spacing: 0.05em;
    color: var(--sr-gold);
}
.sr-mission-claim {
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem; font-weight: 800; letter-spacing: 0.12em;
    background: linear-gradient(135deg, var(--sr-gold), var(--sr-gold-deep));
    color: #0a0610;
    border: none;
    padding: 8px 14px; border-radius: 99px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(212,160,23,0.4);
    white-space: nowrap;
    transition: all 0.18s;
}
.sr-mission-claim:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(212,160,23,0.6); }

/* "CLAIM ALL" button — full-width header action shown when ≥2 rewards are ready. */
.sr-mission-claim-all {
    display: block;
    width: 100%;
    margin: 4px 0 14px;
    font-family: 'Orbitron', monospace;
    font-size: 0.78rem; font-weight: 900; letter-spacing: 0.14em;
    background: linear-gradient(135deg, var(--sr-gold), var(--sr-gold-deep));
    color: #0a0610;
    border: none;
    padding: 12px 16px; border-radius: 99px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(212,160,23,0.5);
    transition: all 0.18s;
}
.sr-mission-claim-all:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(212,160,23,0.7); }
.sr-mission-claim-all:active { transform: translateY(0); }

/* Global non-blocking toast (end-screen share feedback — replaces alert()). */
.sr-global-toast {
    position: fixed;
    left: 50%; bottom: 32px;
    transform: translate(-50%, 24px);
    z-index: 100000;
    pointer-events: none;
    max-width: 86vw;
    padding: 12px 20px;
    background: rgba(20,14,26,0.94);
    border: 1px solid rgba(212,160,23,0.45);
    border-radius: 99px;
    color: #f3e6c4;
    font-family: 'Orbitron', monospace;
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.55);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.sr-global-toast.sr-global-toast-in {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Flying coin chip (missions claim animation) */
.sr-coin-fly {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem; font-weight: 800;
    color: var(--sr-gold);
    background: rgba(20,14,26,0.92);
    border: 1px solid var(--sr-gold);
    padding: 4px 10px;
    border-radius: 99px;
    transition: transform 0.7s cubic-bezier(0.22,0.61,0.36,1), opacity 0.7s;
    box-shadow: 0 4px 16px rgba(212,160,23,0.45);
}

/* Coin shower (daily-hunt claim) */
.sr-coin-shower {
    position: absolute;
    top: 0;
    font-size: 1.4rem;
    pointer-events: none;
    animation: sr-coin-fall 1.4s ease-in forwards;
}
@keyframes sr-coin-fall {
    0%   { transform: translateY(-30px) rotate(0deg); opacity: 0; }
    20%  { opacity: 1; }
    100% { transform: translateY(420px) rotate(540deg); opacity: 0; }
}

/* ===========================================================
   END SCREEN — extra sections (stats grid / missions / spotify)
   =========================================================== */
.sr-end-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 18px;
    width: 100%;
    max-width: 440px;
    padding: 0 4px;
}
.sr-stat-tile {
    background: rgba(7,5,10,0.5);
    border: 1px solid rgba(212,160,23,0.25);
    border-radius: 10px;
    padding: 8px 4px;
    text-align: center;
}
.sr-stat-tile .sr-stat-label {
    font-family: 'Orbitron', monospace;
    font-size: 0.5rem; font-weight: 700; letter-spacing: 0.16em;
    color: var(--sr-gold-deep);
}
.sr-stat-tile .sr-stat-value {
    font-family: 'Bagel Fat One', sans-serif;
    font-size: 1rem; color: #fff;
    text-shadow: 0 2px 0 #000;
    margin-top: 2px;
}
.sr-stat-gold {
    color: var(--sr-gold) !important;
    text-shadow: 0 0 12px rgba(255,215,0,0.7), 0 2px 0 #000 !important;
}

.sr-end-missions {
    width: 100%;
    max-width: 440px;
    margin-top: 18px;
    background: rgba(7,5,10,0.55);
    border: 1px solid rgba(212,160,23,0.32);
    border-radius: 14px;
    padding: 12px 14px;
}
.sr-end-section-label {
    text-align: center;
    font-family: 'Orbitron', monospace;
    font-size: 0.6rem; font-weight: 800; letter-spacing: 0.25em;
    color: var(--sr-gold);
    margin-bottom: 8px;
}
.sr-end-mission-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(212,160,23,0.1);
}
.sr-end-mission-row:last-of-type { border-bottom: none; }
.sr-end-mission-label {
    font-size: 0.78rem;
    color: #f3e6c4;
    text-align: left;
}
.sr-end-mission-reward {
    font-family: 'Orbitron', monospace;
    font-size: 0.72rem; font-weight: 800;
    color: var(--sr-gold);
}
.sr-end-mission-total {
    text-align: center;
    font-family: 'Bagel Fat One', sans-serif;
    font-size: 1.2rem;
    color: var(--sr-gold);
    margin-top: 8px;
    text-shadow: 0 2px 0 #000, 0 0 12px rgba(255,215,0,0.4);
    letter-spacing: 0.03em;
    animation: sr-slot-pulse 1.4s ease-in-out infinite;
}
@keyframes sr-slot-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.04); }
}

.sr-end-spotify {
    margin-top: 18px;
    text-align: center;
    width: 100%;
    max-width: 440px;
}
.sr-end-spotify-label {
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.2em;
    color: rgba(243,230,196,0.8);
    margin-bottom: 6px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}
.sr-end-spotify-btn {
    display: inline-flex;
    align-items: center; gap: 8px;
    background: #1db954;
    color: #fff;
    font-family: 'Orbitron', monospace;
    font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em;
    padding: 10px 18px; border-radius: 99px;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(29,185,84,0.45);
    transition: all 0.18s;
}
.sr-end-spotify-btn:hover {
    background: #1ed760;
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(29,185,84,0.6);
}
.sr-spotify-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px;
    background: #fff; color: #1db954;
    border-radius: 50%;
    font-size: 0.8rem;
}

@media (max-width: 420px) {
    .sr-end-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .sr-modal-card { padding: 20px 16px; }
    .sr-modal-title { font-size: 1.5rem; }
    .sr-shop-thumb { width: 56px; height: 56px; }
    .sr-shop-name { font-size: 0.9rem; }
    .sr-shop-desc { font-size: 0.66rem; }
    .sr-daily-slot { width: 24px; height: 28px; font-size: 0.9rem; }
    .sr-daily-slot-lg { width: 38px; height: 44px; font-size: 1.4rem; }
    .sr-mission-row { padding: 8px 10px; }
    .sr-mission-label { font-size: 0.74rem; }
}
