/* ═══════════════════════════════════════════
   ЭРУДИЦИЯ — Bright Arcade Theme
   Font: Dela Gothic One (display) + Manrope (body)
   Palette: Warm white + Amber/Orange + Teal accents
   ═══════════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }

:root {
    /* --- Primary: warm amber --- */
    --pri: #F59E0B;
    --pri-bright: #FBBF24;
    --pri-deep: #92400E;
    --pri-glow: rgba(245, 158, 11, 0.3);
    --pri-tint: rgba(245, 158, 11, 0.10);

    /* --- Accent: teal --- */
    --acc: #0D9488;
    --acc-light: #14B8A6;
    --acc-tint: rgba(13, 148, 136, 0.08);

    /* --- Surfaces --- */
    --bg: #F5F5FA;
    --card: #FFFFFF;
    --card-raised: #FFFFFF;
    --card-border: rgba(0, 0, 0, 0.06);
    --card-hover: #FAFAFA;

    /* --- Text --- */
    --t1: #1C1917;
    --t2: #57534E;
    --t3: #A8A29E;

    /* --- Status --- */
    --green: #16A34A;
    --green-bg: rgba(22, 163, 74, 0.08);
    --green-border: rgba(22, 163, 74, 0.25);
    --red: #DC2626;
    --red-bg: rgba(220, 38, 38, 0.06);
    --red-border: rgba(220, 38, 38, 0.25);

    /* --- Shadows --- */
    --sh-sm: 0 1px 2px rgba(0,0,0,0.05);
    --sh-md: 0 4px 12px rgba(0,0,0,0.07);
    --sh-lg: 0 8px 30px rgba(0,0,0,0.10);
    --sh-glow: 0 4px 20px var(--pri-glow);

    /* --- Fonts --- */
    --f-display: 'Dela Gothic One', cursive;
    --f-body: 'Manrope', sans-serif;

    /* --- Radii --- */
    --r: 16px;
    --r-sm: 10px;
    --r-xs: 6px;
}

body {
    font-family: var(--f-body);
    background: #432AD0;
    color: var(--t1);
    -webkit-font-smoothing: antialiased;
}

#app { height: 100%; position: relative; overflow: hidden; z-index: 1; background: #432AD0; }

/* ═══════════════════════════════════
   SCREENS
   ═══════════════════════════════════ */
.screen {
    position: absolute; inset: 0;
    display: none; flex-direction: column;
    overflow: hidden;
    padding: 16px 20px; padding-bottom: env(safe-area-inset-bottom, 16px);
}
.screen.active { display: flex; }
.screen.has-nav { padding-bottom: calc(76px + env(safe-area-inset-bottom, 16px)); }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════ */
.title {
    font-family: var(--f-display);
    font-size: 22px;
    text-align: center; line-height: 1.25;
    color: var(--t1);
}
.subtitle { font-size: 14px; color: var(--t2); text-align: center; }
.section-label {
    font-family: var(--f-body);
    font-size: 12px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--t3);
    margin-bottom: 10px;
}
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--t2); }

/* ═══════════════════════════════════
   CARDS
   ═══════════════════════════════════ */
.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--r);
    padding: 18px;
    margin-bottom: 10px;
    box-shadow: var(--sh-sm);
}

/* ═══════════════════════════════════
   BUTTONS
   ═══════════════════════════════════ */
.btn {
    display: block; width: 100%;
    padding: 14px 20px;
    border: none; border-radius: var(--r-sm);
    font-family: var(--f-body);
    font-size: 15px; font-weight: 800;
    cursor: pointer; text-align: center;
    transition: all 0.15s ease;
    position: relative;
}
.btn-primary {
    background: var(--pri);
    color: #fff;
    box-shadow: var(--sh-glow), 0 1px 2px rgba(0,0,0,0.1);
}
.btn-primary:active { transform: scale(0.97); box-shadow: 0 2px 8px var(--pri-glow); }
.btn-secondary {
    background: var(--card);
    color: var(--t1);
    border: 1.5px solid var(--card-border);
    box-shadow: var(--sh-sm);
}
.btn-secondary:active { transform: scale(0.97); background: var(--card-hover); }
.btn-ghost {
    background: transparent;
    color: var(--pri);
    border: 1.5px solid var(--pri-tint);
}
.btn-ghost:active { background: var(--pri-tint); }
.btn-sm { padding: 8px 14px; font-size: 12px; border-radius: var(--r-xs); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none !important; }
.btn + .btn { margin-top: 8px; }

/* ═══════════════════════════════════
   HEADER
   ═══════════════════════════════════ */
.header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 2px 0; margin-bottom: 18px;
}
.header-title {
    font-family: var(--f-display);
    font-size: 17px;
    color: var(--t1);
}
.header-back {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: var(--card); border: 1px solid var(--card-border);
    border-radius: var(--r-sm);
    color: var(--t1); cursor: pointer;
    box-shadow: var(--sh-sm);
}
.header-back:active { background: var(--card-hover); }

/* ═══════════════════════════════════
   STATS ROW (used in shop, etc.)
   ═══════════════════════════════════ */
.stats-row { display: flex; gap: 8px; margin-bottom: 18px; }
.stat-card {
    flex: 1;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--r-sm);
    padding: 12px 8px; text-align: center;
    box-shadow: var(--sh-sm);
}
.stat-value {
    font-family: var(--f-display);
    font-size: 20px;
    color: var(--t1);
    line-height: 1;
}
.stat-label { font-size: 11px; color: var(--t3); margin-top: 4px; font-weight: 700; }

/* ═══════════════════════════════════
   LOADER
   ═══════════════════════════════════ */
.loader-container {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 20px;
}
.loader-brand {
    font-size: 52px;
    animation: loaderBounce 1.5s ease-in-out infinite;
}
@keyframes loaderBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.05); }
}
.loader-bar {
    width: 100px; height: 4px; border-radius: 4px;
    background: rgba(0,0,0,0.06); overflow: hidden;
}
.loader-bar-fill {
    height: 100%; width: 30%; background: var(--pri); border-radius: 4px;
    animation: loaderSlide 1s ease-in-out infinite;
}
@keyframes loaderSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(400%); } }
.loader-text {
    font-family: var(--f-display);
    font-size: 14px;
    letter-spacing: 0.15em;
    color: var(--t3);
}

.spinner {
    width: 32px; height: 32px;
    border: 3px solid rgba(0,0,0,0.08);
    border-top-color: var(--pri);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-inline { display: flex; align-items: center; justify-content: center; min-height: 200px; }

/* ═══════════════════════════════════
   HOME — Figma "Главный" (dark purple)
   ═══════════════════════════════════ */

/* Dark screen override */
.screen-home {
    background: #432AD0;
    padding: 0;
    overflow-y: auto;
    min-height: 100%;
}
.screen-home::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 355px 160px at 55% -40px, rgba(51,176,255,0.50) 0%, transparent 70%),
        radial-gradient(ellipse 527px 158px at 30% 100%, rgba(51,176,255,0.30) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}
.screen-home > * { position: relative; z-index: 1; }

/* --- HUD Bar: Figma — Rating left, Soft+Energy grouped right --- */
.home-hud {
    display: flex; gap: 8px;
    padding: max(52px, calc(env(safe-area-inset-top, 0px) + 12px)) 15px 0;
    align-items: center;
}
.home-hud-rating { margin-right: auto; }
.home-hud-pill {
    display: flex; align-items: center;
    background: #1C107A;
    border-radius: 15px;
    height: 30px;
    padding: 0 12px 0 0;
    cursor: pointer;
    transition: transform 0.12s;
    position: relative;
}
.home-hud-pill:active { transform: scale(0.95); }
.home-hud-icon {
    width: 45px; height: 42px;
    margin-top: -6px;
    object-fit: contain;
    flex-shrink: 0;
}
.home-hud-icon--energy {
    width: 30px; height: 45px;
    margin-left: 0;
}
.home-hud-val {
    font-family: 'Inter', sans-serif;
    font-size: 24px; font-weight: 800;
    color: #ffffff;
    line-height: 1;
}
.home-hud-rating { min-width: 0; flex: 1 1 auto; max-width: 135px; }
.home-hud-soft { min-width: 0; flex: 0 0 auto; max-width: 120px; }
.home-hud-energy { min-width: 0; flex: 0 0 auto; max-width: 60px; }

/* --- Title: Figma Inter 900 32px white --- */
.home-title {
    font-family: 'Inter', sans-serif;
    font-size: 32px; font-weight: 900;
    color: #ffffff;
    text-align: center;
    margin-top: 52px;
    line-height: 1.2;
    cursor: pointer;
    position: relative;
    z-index: 2;
}
.home-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 12px; font-weight: 400;
    font-style: italic;
    color: #ffffff;
    text-align: center;
    margin-top: 8px;
    line-height: 1.2;
}

/* --- Menu cards: Figma white rounded 15px, text #26198C --- */
.home-menu,
.home-menu-group {
    display: flex; flex-direction: column;
    align-items: center;
    gap: 13px;
    padding: 0 15px;
}
.home-menu { margin-top: 40px; }
.home-menu-group { margin-top: 16px; }

.home-menu-card {
    width: 100%; max-width: 271px;
    height: 45px;
    display: flex; align-items: center; justify-content: center;
    background: #ffffff;
    border: none;
    border-radius: 15px;
    font-family: 'Inter', sans-serif;
    font-size: 20px; font-weight: 600;
    color: #26198C;
    cursor: pointer;
    transition: transform 0.12s;
    position: relative;
    box-shadow:
        0 3px 6.8px rgba(36,22,158,0.25),
        inset 0 -4px 1px rgba(157,146,255,0.25);
}
.home-menu-card:active { transform: scale(0.96); }

/* Figma pink notification dot #EA3D8D */
.home-dot {
    position: absolute;
    top: -4px; right: -4px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #EA3D8D;
    box-shadow: 0 0 8px rgba(234,61,141,0.5);
}

/* --- Play button: Figma white 236x88, r=15 --- */
.home-play-btn {
    position: relative;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    width: 236px; height: 88px;
    margin: 40px auto 30px;
    background: #ffffff;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.15s;
    box-shadow:
        0 3px 6.8px rgba(36,22,158,0.35),
        inset 0 -4px 1px rgba(157,146,255,0.25),
        inset 0 -32px 0 rgba(0,0,0,0.05);
}
.home-play-btn::before,
.home-play-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
}
/* Primary flare — wide soft sweep */
.home-play-btn::before {
    background: linear-gradient(
        110deg,
        transparent 0%,
        transparent 30%,
        rgba(157,146,255,0.08) 38%,
        rgba(255,255,255,0.45) 44%,
        rgba(255,255,255,0.7) 50%,
        rgba(255,255,255,0.45) 56%,
        rgba(157,146,255,0.08) 62%,
        transparent 70%,
        transparent 100%
    );
    background-size: 300% 100%;
    animation: flare-sweep 3.5s linear infinite;
}
/* Secondary glow — subtle ambient pulse */
.home-play-btn::after {
    background: radial-gradient(
        ellipse 80% 60% at 50% 50%,
        rgba(157,146,255,0.12) 0%,
        transparent 70%
    );
    opacity: 0;
    animation: flare-pulse 3.5s ease-in-out infinite;
}
@keyframes flare-sweep {
    0%   { background-position: 200% center; }
    100% { background-position: -100% center; }
}
@keyframes flare-pulse {
    0%, 100% { opacity: 0; }
    40%, 60% { opacity: 1; }
}
.home-play-btn:active { transform: scale(0.95); }
.home-play-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}
.home-play-btn:disabled::before,
.home-play-btn:disabled::after {
    animation: none;
    opacity: 0;
}
.home-play-text {
    font-family: 'Inter', sans-serif;
    font-size: 36px; font-weight: 900;
    font-style: italic;
    color: #26198C;
    line-height: 1;
}
.home-play-energy {
    display: flex; align-items: center; gap: 2px;
    margin-top: 2px;
}
.home-play-energy img {
    width: 20px; height: 30px;
    object-fit: contain;
}
.home-play-energy span {
    font-family: 'Inter', sans-serif;
    font-size: 24px; font-weight: 700;
    color: #26198C;
}

/* --- Bottom Nav: Figma #0C0356, 4 tabs, text-only --- */
.home-nav {
    display: flex;
    align-items: center;
    background: #0C0356;
    border-radius: 15px 15px 0 0;
    margin-top: auto;
    height: 65px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    position: relative;
    z-index: 10;
}
.home-nav-btn {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    background: none; border: none;
    font-family: 'Inter', sans-serif;
    font-size: 12px; font-weight: 400;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}
.home-nav-btn.active {
    font-size: 16px; font-weight: 700;
    color: #FFCE1E;
}

/* ═══════════════════════════════════
   SHARED HUD PILLS (shop, other screens)
   ═══════════════════════════════════ */
.hud {
    display: flex; gap: 6px; justify-content: center;
    padding: 2px 0 10px;
}
.hud-pill {
    display: flex; align-items: center; gap: 5px;
    background: var(--card);
    border: 1.5px solid var(--card-border);
    border-radius: 50px;
    padding: 5px 12px 5px 6px;
    box-shadow: var(--sh-sm);
    cursor: pointer;
    transition: transform 0.12s;
}
.hud-pill:active { transform: scale(0.95); }
.hud-pill-icon {
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.hud-pill-icon svg { width: 13px; height: 13px; }
.hud-rank-icon { background: linear-gradient(140deg, #FDE68A, #F59E0B); color: #78350F; }
.hud-coins-icon { background: linear-gradient(140deg, #FEF3C7, #D97706); color: #78350F; }
.hud-energy-icon { background: linear-gradient(140deg, #A7F3D0, #10B981); color: #fff; }
.hud-energy-icon svg { color: #fff; }
.hud-pill-val {
    font-family: var(--f-body);
    font-size: 14px; font-weight: 800;
    color: var(--t1); line-height: 1;
}
.hud-pill-add {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--pri);
    color: #fff;
    font-size: 12px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}

/* ═══════════════════════════════════
   QUIZ — Figma "Квиз Эрудиция"
   ═══════════════════════════════════ */

/* Shared dark-purple screen base for quiz & results */
.screen-quiz, .screen-results {
    background: #432ad0;
    padding: 0;
}
.screen-results { align-items: center; }
.screen-quiz::before, .screen-results::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 355px 159px at 50% -40px, rgba(51,176,255,0.55) 0%, transparent 70%),
        radial-gradient(ellipse 527px 158px at 30% 100%, rgba(51,176,255,0.35) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}
.screen-quiz::after, .screen-results::after {
    content: '';
    position: absolute;
    top: 30px; left: 0; right: 0; height: 630px;
    background: url('/static/game/img/pattern1.png') repeat;
    background-size: 200px 200px;
    opacity: 0.07;
    pointer-events: none; z-index: 0;
}
.screen-quiz > *, .screen-results > * { position: relative; z-index: 1; }

/* --- Quiz layout --- */
.quiz-body {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 0 15px;
}

/* Progress bar: Figma 360px wide, 5 pips, 9px tall, gap ~5px, rounded 30px */
.quiz-progress {
    display: flex; gap: 5px;
    width: 100%; max-width: 360px;
    margin: 0 auto;
    padding: 16px 15px 0;
}
.quiz-pip {
    flex: 1; height: 9px; border-radius: 30px;
    background: #24158f;
    transition: background 0.3s;
}
.quiz-pip.correct { background: #82ffcf; }
.quiz-pip.wrong   { background: #ea3d8d; }
.quiz-pip.current { background: #ffce1e; }

/* Timer: Figma 90x90, outer #3f4adc, inner ring #24158f, active ring #ffce1e */
.timer-wrap { text-align: center; margin-bottom: 0; }
.timer-ring {
    width: 90px; height: 90px; margin: 0 auto;
    position: relative; display: flex; align-items: center; justify-content: center;
}
.timer-ring svg {
    position: absolute; inset: 0;
    transform: rotate(-90deg);
    z-index: 2;
}
.timer-ring circle { fill: none; stroke-width: 6; stroke-linecap: round; }
.timer-ring .ring-bg { stroke: #24158f; }
.timer-ring .ring-fg {
    stroke: #ffce1e;
    transition: stroke-dashoffset 0.1s linear, stroke 0.3s;
}
.timer-ring .ring-fg.danger { stroke: #ea3d8d; }
.timer-ring-fill {
    position: absolute; inset: 5px;
    border-radius: 50%;
    background: #3f4adc;
    z-index: 1;
}
.timer-num {
    font-family: 'Inter', sans-serif;
    font-size: 48px; font-weight: 600;
    color: #ffffff; z-index: 3; transition: color 0.3s;
    line-height: 1;
}
.timer-num.danger { color: #ea3d8d; }

/* Question card: Figma #2e1cad, 360 wide, min 214px, radius 15 */
.quiz-question {
    font-family: 'Inter', sans-serif;
    font-size: 24px; font-weight: 600;
    text-align: center; line-height: 1.35;
    color: #f4fcff;
    background: #2e1cad;
    border-radius: 15px;
    width: 100%; max-width: 360px;
    min-height: 214px;
    display: flex; align-items: center; justify-content: center;
    padding: 30px 16px;
    margin-top: -20px;
}

/* No counter in Figma design */
.quiz-counter { display: none; }

/* Answer buttons: Figma white, 330 wide, 59px tall, radius 15 */
.quiz-options {
    display: flex; flex-direction: column; gap: 16px;
    margin-top: 32px;
    width: 100%; max-width: 330px;
    padding-bottom: 24px;
}
.quiz-opt {
    display: flex; align-items: center; justify-content: center;
    height: 59px;
    background: #ffffff;
    border: none;
    border-radius: 15px;
    font-family: 'Inter', sans-serif;
    font-size: 24px; font-weight: 800;
    color: #26198c;
    cursor: pointer;
    transition: all 0.15s ease;
}
.quiz-opt:active { transform: scale(0.97); }
.quiz-opt .opt-letter { display: none; }
.quiz-opt .opt-text { text-align: center; }

/* Correct: Figma #82ffcf */
.quiz-opt.is-correct {
    background: #82ffcf;
    border: none;
    box-shadow: none;
}

/* Wrong: Figma #ea3d8d */
.quiz-opt.is-wrong {
    background: #ea3d8d;
    border: none;
    box-shadow: none;
    color: #26198c;
}

.quiz-opt.locked { pointer-events: none; opacity: 0.5; }
.quiz-opt.is-correct.locked, .quiz-opt.is-wrong.locked { opacity: 1; }

/* ═══════════════════════════════════
   RESULTS — Figma "Результат"
   ═══════════════════════════════════ */

/* --- HUD bar: Figma same as home, y=97 --- */
.res-hud {
    display: flex; gap: 8px;
    padding: max(52px, calc(env(safe-area-inset-top, 0px) + 12px)) 15px 0;
    justify-content: center;
    width: 100%;
}
.res-hud-pill {
    display: flex; align-items: center;
    background: #1c107a;
    border-radius: 15px;
    height: 30px;
    padding: 0 12px 0 0;
    position: relative;
}
.res-hud-icon {
    width: 45px; height: 42px;
    margin-top: -6px;
    object-fit: contain;
    flex-shrink: 0;
}
.res-hud-icon--energy {
    width: 30px; height: 45px;
}
.res-hud-val {
    font-family: 'Inter', sans-serif;
    font-size: 24px; font-weight: 800;
    color: #ffffff;
    line-height: 1;
}
.res-hud-rating { min-width: 135px; }
.res-hud-soft { min-width: 120px; }
.res-hud-energy { min-width: 60px; }

/* --- Score: Figma "3/5" Inter 900 64px white at y=210 --- */
.res-score {
    font-family: 'Inter', sans-serif;
    font-size: 64px; font-weight: 900;
    color: #ffffff;
    text-align: center;
    margin-top: 56px;
    line-height: 1;
}

/* --- Message: Figma Inter 500 24px #FFCE1E italic at y=293 --- */
.res-msg {
    font-family: 'Inter', sans-serif;
    font-size: 24px; font-weight: 500;
    font-style: italic;
    color: #ffce1e;
    padding: 0 30px;
    margin-top: 16px;
    line-height: 1.2;
}

/* --- Reward card: Figma 360x119, #1C107A, r=15, dark header --- */
.res-reward-card {
    width: 100%; max-width: 360px;
    margin: 32px auto 0;
    background: #1c107a;
    border-radius: 15px;
    overflow: hidden;
}
.res-reward-header {
    background: #0c0356;
    height: 29px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 14px; font-weight: 400;
    color: #ffffff;
}
.res-reward-body {
    display: flex; align-items: center; justify-content: center;
    gap: 32px;
    padding: 20px 16px;
}
.res-reward-item {
    display: flex; align-items: center; gap: 4px;
}
.res-reward-item img {
    width: 51px; height: 48px;
    object-fit: contain;
}
.res-reward-item span {
    font-family: 'Inter', sans-serif;
    font-size: 32px; font-weight: 600;
    color: #ffffff;
    line-height: 1;
}

/* --- Premium bonus card: Figma 360x120, separate card --- */
.res-bonus-card {
    width: 100%; max-width: 360px;
    margin: 20px auto 0;
    background: #1c107a;
    border-radius: 15px;
    overflow: hidden;
}
.res-bonus-header {
    background: #0c0356;
    height: 29px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 16px; font-weight: 400;
    color: #ffce1e;
}
.res-laurel {
    width: 20px; height: 20px;
    object-fit: contain;
    opacity: 0.7;
}
.res-bonus-body {
    display: flex; align-items: center; justify-content: center;
    padding: 20px 16px;
}

/* --- "Далее" button: Figma white 330x59 r=15 at y=675 --- */
.res-next-btn {
    display: flex; align-items: center; justify-content: center;
    width: 100%; max-width: 330px;
    height: 59px;
    background: #ffffff;
    border: none;
    border-radius: 15px;
    font-family: 'Inter', sans-serif;
    font-size: 24px; font-weight: 800;
    color: #26198c;
    cursor: pointer;
    margin: auto auto 24px;
    transition: transform 0.15s;
    box-shadow:
        0 3px 6.8px rgba(36,22,158,0.25),
        inset 0 -4px 1px rgba(157,146,255,0.25);
}
.res-next-btn:active { transform: scale(0.97); }

/* Legacy compat */
.results-hud, .reward-card, .results-next-btn { display: none; }
.reward-row { display: none; }
.bonus-banner { display: none; }
.totals-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.totals-row:last-child { border-bottom: none; }
.totals-label { color: var(--t2); font-size: 13px; }
.totals-val { font-family: var(--f-display); font-size: 15px; color: var(--t1); }

/* ═══════════════════════════════════
   BOTTOM NAV
   ═══════════════════════════════════ */
.bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(0,0,0,0.06);
    padding: 4px 2px; padding-bottom: max(4px, env(safe-area-inset-bottom));
    z-index: 100;
}
.nav-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    gap: 2px; padding: 7px 0;
    color: var(--t3); font-size: 10px; font-weight: 700;
    cursor: pointer; border: none; background: none;
    transition: color 0.15s;
    position: relative;
}
.nav-btn.active { color: var(--pri); }
.nav-btn.active::before {
    content: ''; position: absolute; top: 0; left: 25%; right: 25%;
    height: 2.5px; border-radius: 2px;
    background: var(--pri);
}
.nav-btn svg { width: 21px; height: 21px; }

/* ═══════════════════════════════════
   LEADERBOARD — Figma "Лидерборд"
   ═══════════════════════════════════ */

/* Dark screen override — no page scroll, everything fits viewport */
.screen-leaderboard {
    background: #432AD0;
    padding: 25px 15px 0;
    overflow: hidden;
}
.screen-leaderboard::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 355px 160px at 55% -40px, rgba(51,176,255,0.50) 0%, transparent 70%),
        radial-gradient(ellipse 527px 158px at 30% 100%, rgba(51,176,255,0.30) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}
.screen-leaderboard::after {
    content: '';
    position: absolute;
    top: 30px; left: 0; right: 0; height: 630px;
    background: url('/static/game/img/pattern1.png') repeat;
    background-size: 200px 200px;
    opacity: 0.07;
    pointer-events: none; z-index: 0;
}
.screen-leaderboard > * { position: relative; z-index: 1; }

/* Main card: fills space between top and tabs/nav */
.lb-card {
    width: 100%; max-width: 360px;
    margin: 0 auto;
    background: #2e1cad;
    border-radius: 15px;
    padding: 12px 15px 28px;
    display: flex; flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Title: Figma Inter 900 32px, centered */
.lb-title {
    font-family: 'Inter', sans-serif;
    font-size: 32px; font-weight: 900;
    color: #ffffff;
    line-height: 1.2;
    text-align: center;
}

/* Prize banner: contains timer pill + info button overlaid */
.lb-prize {
    display: flex; align-items: center;
    background: rgba(12, 3, 86, 0.7);
    border-radius: 5px;
    height: 75px;
    margin-top: 20px;
    padding: 0 12px;
    gap: 8px;
    position: relative;
}

/* Timer pill: centered on top edge of prize banner */
.lb-timer-pill {
    display: flex; align-items: center;
    background: #ffffff;
    border-radius: 15px;
    height: 20px;
    min-width: 186px;
    padding: 0 12px;
    position: absolute;
    top: 0; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    justify-content: center;
    overflow: visible;
}
.lb-timer-icon {
    width: 28px; height: 28px;
    object-fit: contain;
    position: absolute;
    left: -3px;
    top: 50%;
    transform: translateY(-60%);
}
#lb-timer {
    font-family: 'Inter', sans-serif;
    font-size: 15px; font-weight: 800;
    color: #2e1cad;
    line-height: 1;
    white-space: nowrap;
}

/* Info button: top-right corner of prize banner */
.lb-info-btn {
    width: 18px; height: 18px;
    border-radius: 9px;
    background: #ffffff;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 12px; font-weight: 900;
    font-style: italic;
    color: #170a70;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    line-height: 1;
    padding: 0 0 1px 0;
    position: absolute;
    top: -5px; right: -3px;
    z-index: 2;
}
.lb-prize img {
    width: 66px; height: 41px;
    object-fit: contain;
    flex-shrink: 0;
}
#lb-prize-text {
    font-family: 'Inter', sans-serif;
    font-size: 10px; font-weight: 500;
    font-style: italic;
    color: #ffffff;
    line-height: 1.4;
}

/* Scrollable list — breaks out of card padding to go edge-to-edge */
.lb-list-wrap {
    flex: 1;
    min-height: 0;
    margin: 20px -15px 0;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 0;
    scrollbar-width: thin;
    scrollbar-color: #1d1082 #f5f3ff;
}
.lb-list-wrap::-webkit-scrollbar { width: 3px; }
.lb-list-wrap::-webkit-scrollbar-track { background: #f5f3ff; }
.lb-list-wrap::-webkit-scrollbar-thumb { background: #1d1082; border-radius: 3px; }

.lb-list { display: flex; flex-direction: column; }

.lb-loading {
    display: flex; align-items: center; justify-content: center;
    min-height: 200px;
}
.lb-loading .spinner {
    border-color: rgba(255,255,255,0.15);
    border-top-color: #ffffff;
}
.lb-empty {
    display: flex; align-items: center; justify-content: center;
    min-height: 200px;
    font-family: 'Inter', sans-serif;
    font-size: 14px; font-weight: 500;
    color: rgba(255,255,255,0.5);
}

/* Rows: Figma 360x38, alternating #FFF / #F4F3FF */
.lb-row {
    display: flex; align-items: center;
    height: 38px;
    background: #ffffff;
    padding: 0 15px;
    position: relative;
}
.lb-row--alt { background: #f4f3ff; }

/* Winner row: Figma 360x55, gold gradient, corner [15,0,0,0] */
.lb-row--first {
    height: 55px;
    background: linear-gradient(to right, #ffcf1f, #ffe071);
    border-radius: 15px 0 0 0;
}

/* Current user highlight: rendered outside scroll container */
.lb-row--me {
    border: 4px solid #170a70;
    border-radius: 5px;
    margin: -4px -4px 0;
    position: relative;
    z-index: 1;
}

/* Rank: Figma Inter 700 16px #170A70 */
.lb-rank {
    font-family: 'Inter', sans-serif;
    font-size: 16px; font-weight: 700;
    color: #170a70;
    min-width: 45px;
}
.lb-rank--first {
    font-size: 24px;
    color: #1d1082;
}

/* Phone: Figma Inter 400 13px #170A70, centered in row */
.lb-phone {
    flex: 1;
    font-family: 'Inter', sans-serif;
    font-size: 13px; font-weight: 400;
    color: #170a70;
    text-align: center;
}
.lb-phone--first {
    font-weight: 700;
    color: #1d1082;
}

/* Score: trophy 22x21 + Figma Inter 600 12px #170A70 */
.lb-score {
    display: flex; align-items: center; gap: 3px;
    margin-left: auto;
}
.lb-score-icon {
    width: 22px; height: 21px;
    object-fit: contain;
}
.lb-score span {
    font-family: 'Inter', sans-serif;
    font-size: 12px; font-weight: 600;
    color: #170a70;
    min-width: 70px;
    text-align: left;
    margin-left: 4px;
}

/* Winner row score: Figma Inter 800 (heavier than regular 600) */
.lb-row--first .lb-score span {
    font-weight: 800;
}

/* Laurel wreath on winner: Figma 34x34, op=0.5 */
.lb-row--first .lb-score { position: relative; }
.lb-laurel {
    width: 34px; height: 34px;
    object-fit: contain;
    opacity: 0.5;
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
}

/* Dots separator for user outside top */
.lb-dots {
    text-align: center;
    padding: 6px 0;
    color: #170a70;
    font-size: 14px;
    letter-spacing: 4px;
    background: #f4f3ff;
}

/* Leaderboard info popup — Figma 41:1740 */
.lb-info-overlay {
    background: rgba(0, 0, 0, 0.5);
}
.lb-info-popup {
    width: 100%; max-width: 360px;
    background: #2e1cad;
    border-radius: 15px;
    padding: 28px 16px 48px;
    position: relative;
    animation: modalPop 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.lb-info-title {
    font-family: 'Inter', sans-serif;
    font-size: 24px; font-weight: 900;
    color: #ffffff;
    text-align: center;
    margin-bottom: 20px;
}
.lb-info-body {
    padding: 0 8px;
}
.lb-info-body p {
    font-family: 'Inter', sans-serif;
    font-size: 14px; font-weight: 400;
    color: #f4fcff;
    line-height: 1.6;
    margin-bottom: 12px;
}
.lb-info-body b {
    font-weight: 700;
}
.lb-info-num {
    font-weight: 700;
}
.lb-info-trophy {
    width: 15px; height: 16px;
    object-fit: contain;
    vertical-align: middle;
    margin: 0 2px;
}
.lb-info-close {
    width: 210px; height: 59px;
    background: #ffffff;
    border: none;
    border-radius: 15px;
    font-family: 'Inter', sans-serif;
    font-size: 24px; font-weight: 800;
    color: #26198c;
    cursor: pointer;
    position: absolute;
    bottom: 0; left: 50%;
    transform: translate(-50%, 50%);
}

/* Period tabs: Figma 3x 105x38, r≈12 — overlap card bottom */
.lb-tabs {
    display: flex;
    width: 100%; max-width: 330px;
    margin: -19px auto 0;
    gap: 4px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}
/* Nav full-width in leaderboard: break out of screen padding */
.screen-leaderboard .home-nav {
    margin: 24px -15px 0;
    flex-shrink: 0;
}
.lb-tab {
    flex: 1;
    height: 38px;
    border-radius: 12px;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.15s;
    background: #ffffff;
    font-weight: 500;
    color: #26198c;
}
.lb-tab.active {
    background: #0d0356;
    color: #ffffff;
    font-weight: 800;
}

/* ═══════════════════════════════════
   DAILY BONUS
   ═══════════════════════════════════ */
.bonus-grid { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 16px 0; }
.bonus-cell {
    width: 64px; height: 74px; border-radius: 10px;
    background: var(--card);
    border: 1.5px solid var(--card-border);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; transition: all 0.2s;
    box-shadow: var(--sh-sm);
}
.bonus-cell.done {
    border-color: var(--green-border);
    background: var(--green-bg);
}
.bonus-cell.now {
    border-color: var(--pri);
    background: var(--pri-tint);
    box-shadow: var(--sh-glow);
    animation: cellPulse 2s ease-in-out infinite;
}
@keyframes cellPulse {
    0%, 100% { box-shadow: 0 2px 10px rgba(245,158,11,0.15); }
    50% { box-shadow: 0 4px 18px rgba(245,158,11,0.3); }
}
.bonus-cell-day { font-size: 9px; font-weight: 800; color: var(--t3); text-transform: uppercase; }
.bonus-cell-icon { font-size: 20px; line-height: 1; }
.bonus-cell-val { font-family: var(--f-display); font-size: 11px; color: var(--t1); }

/* ═══════════════════════════════════
   FORTUNE WHEEL — Figma slot-machine
   ═══════════════════════════════════ */

/* Full-screen override */
.screen-fortune_wheel {
    background: transparent !important;
    padding: 0 !important;
    overflow: hidden;
}

.fw-screen {
    position: relative;
    width: 100%; height: 100%;
    /* Figma: radial gold → dark brown, plus linear gold bottom, over solid purple */
    background:
        radial-gradient(ellipse 100% 50% at 50% -20%, rgba(235,174,32,0.6) 0%, transparent 70%),
        linear-gradient(to bottom, transparent 73%, rgba(197,163,59,0.8) 100%),
        #7800B4;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ── BG glow ellipses (Figma decorative) ── */
.fw-bg {
    position: absolute; inset: 0;
    pointer-events: none; z-index: 0;
    overflow: hidden;
}
.fw-bg-ellipse {
    position: absolute;
    border-radius: 50%;
}
.fw-bg-top {
    width: 676px; height: 158px;
    top: -80px; left: 50%;
    transform: translateX(-50%);
    background: #3C018B;
    filter: blur(78px);
}
.fw-bg-bottom {
    width: 100%; height: 158px;
    bottom: -40px; left: 0;
    background: #3C018B;
    filter: blur(78px);
    opacity: 0.7;
}
.fw-bg-glow {
    position: absolute;
    width: 526px; height: 202px;
    top: calc(42% - 40px); left: 50%;
    transform: translateX(-50%);
    background: #FFE18F;
    filter: blur(78px);
    opacity: 0.7;
    border-radius: 50%;
    transition: opacity 0.6s;
}

/* Glow pulse during spin */
@keyframes fwGlowPulse {
    0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.15); }
}
.fw-screen.spinning .fw-bg-glow {
    animation: fwGlowPulse 1.2s ease-in-out infinite;
}

/* ── Header (Figma: back 35px circle + Inter Black 32px, title centered) ── */
.fw-header {
    position: relative; z-index: 2;
    padding: max(54px, calc(env(safe-area-inset-top, 0px) + 14px)) 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 35px;
}
.fw-back {
    position: absolute;
    left: 15px;
    top: 54px;
    width: 35px; height: 35px;
    border-radius: 50%;
    background: rgba(0,0,0,0.4);
    border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.12s;
}
.fw-back:active { transform: scale(0.9); }
.fw-back:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}
.fw-title {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.2;
    text-align: center;
}

/* ── Main content area ── */
#fw-root {
    position: relative; z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
}

/* ── Viewport — transparent window, shows 3 lots ── */
.fw-viewport {
    width: 100%;
    max-width: 360px;
    height: 372px; /* 124px × 3 */
    overflow: hidden;
    position: relative;
}

/* ── Fade masks removed — top/bottom fade handled by lot opacity classes ── */
.fw-fade { display: none; }

/* ── Reel (scrolling strip of prizes) ── */
.fw-reel {
    display: flex;
    flex-direction: column;
    will-change: transform;
}

/* ── Lot / prize card (Figma 248×124, image cell + label cell for consistent centering) ── */
.fw-lot {
    width: 248px;
    height: 124px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 110px 90px;
    align-items: center;
    justify-content: center;
    column-gap: 8px;
    flex-shrink: 0;
    /* Default: hidden */
    opacity: 0.15;
    transform: scale(0.8);
    will-change: transform, opacity;
}

/* States via CSS classes — GPU-composited, no per-frame JS */
.fw-lot--center { opacity: 1;   transform: scale(1); }
.fw-lot--near   { opacity: 0.5; transform: scale(0.92); }
.fw-lot--far    { opacity: 0.2; transform: scale(0.85); }

/* Smooth transitions only when NOT spinning (avoid fighting rAF) */
.fw-lot { transition: none; }
.fw-screen:not(.spinning) .fw-lot {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Motion blur during spin — disabled per design request */

/* Hide back button + spin button during spin, focus on the wheel */
.fw-screen.spinning .fw-back,
.fw-screen.spinning .fw-btn {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

/* Slight zoom-in on the reel during spin to draw attention */
.fw-viewport {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.fw-screen.spinning .fw-viewport {
    transform: scale(1.08);
}

.fw-lot-img {
    width: 100%;
    height: 95px;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.25));
}
.fw-lot-label {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    text-align: left;
    justify-self: start;
}

/* ── Spin button (Figma: 272×75, gold #FFC425, radius 15) ── */
.fw-btn {
    width: 272px;
    height: 75px;
    margin: 20px auto 0;
    border: none;
    border-radius: 15px;
    background: #FFC425;
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 900;
    font-style: italic;
    color: #902500;
    cursor: pointer;
    display: block;
    box-shadow:
        0 3px 6.8px rgba(36,23,158,1),
        inset 0 -4px 1px rgba(157,146,255,0.25),
        inset 0 -24px 0 rgba(59,0,0,0.05),
        inset 0 2px 0 rgba(255,255,255,0.15);
    transition: transform 0.12s, opacity 0.3s;
    position: relative;
    z-index: 2;
    overflow: hidden;
}
.fw-btn:active:not(:disabled) {
    transform: scale(0.95);
}

/* Flare sweep — only on active (non-disabled) button */
.fw-btn:not(:disabled)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        100deg,
        transparent 0%,
        rgba(255,255,255,0.55) 50%,
        transparent 100%
    );
    transform: skewX(-20deg);
    animation: fwFlare 2.4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes fwFlare {
    0%   { left: -75%; }
    60%  { left: 125%; }
    100% { left: 125%; }
}

/* Disabled / unavailable state (Figma: white bg, opacity 0.4, purple text) */
.fw-btn--disabled {
    background: #ffffff;
    color: #271A8D;
    opacity: 0.4;
    cursor: not-allowed;
}

/* Spinning state */
.fw-btn--spinning {
    opacity: 0.6;
    cursor: wait;
}

/* ── Hint text (Figma: Inter Medium Italic 15px, white) ── */
.fw-hint {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    font-style: italic;
    color: #ffffff;
    text-align: center;
    white-space: pre-line;
    line-height: 1.2;
    margin: 16px 0 24px;
    position: relative;
    z-index: 2;
}

/* ── Loading spinner color override ── */
.screen-fortune_wheel .spinner {
    border-color: rgba(255,255,255,0.2);
    border-top-color: #FFC425;
}

/* ── Utility: hide elements during state transitions ── */
.fw-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease !important;
}

/* ── Accent state (Figma 62:249) — solo prize + radial glow burst ── */
.fw-accent {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.fw-accent--visible {
    opacity: 1;
    pointer-events: auto;
}

/* Radial glow behind the prize */
.fw-accent-glow {
    position: absolute;
    width: 400px; height: 400px;
    top: 50%; left: 50%;
    transform: translate(-50%, -55%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,225,143,0.9) 0%, rgba(255,196,37,0.5) 35%, rgba(255,196,37,0) 70%);
    filter: blur(30px);
    animation: fwAccentGlow 1.5s ease-in-out infinite alternate;
}
@keyframes fwAccentGlow {
    0%   { transform: translate(-50%, -55%) scale(0.9); opacity: 0.7; }
    100% { transform: translate(-50%, -55%) scale(1.1); opacity: 1; }
}

.fw-accent-img {
    position: relative;
    z-index: 1;
    height: 160px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 30px rgba(255,196,37,0.6));
    animation: fwAccentPop 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes fwAccentPop {
    0%   { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1);   opacity: 1; }
}

.fw-accent-label {
    position: relative;
    z-index: 1;
    font-family: 'Inter', sans-serif;
    font-size: 56px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(255,196,37,0.5);
    animation: fwAccentPop 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
    opacity: 0;
}

/* ── Finish state (Figma 62:342) — prize card ── */
.fw-finish {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 0 30px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.fw-finish--visible {
    opacity: 1;
    pointer-events: auto;
}

/* Prize card — Figma: #55009C 60% opacity, radius 15px */
.fw-finish-card {
    width: 100%;
    max-width: 330px;
    background: rgba(85, 0, 156, 0.6);
    border-radius: 15px;
    padding: 28px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: fwCardSlide 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes fwCardSlide {
    0%   { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0);    opacity: 1; }
}

/* Figma: Inter SemiBold 32px, white */
.fw-finish-title {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    margin: 0;
    line-height: 1.2;
}

.fw-finish-img {
    height: 120px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.3));
    margin: 8px 0;
}

.fw-finish-amount {
    font-family: 'Inter', sans-serif;
    font-size: 44px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

/* Figma: Inter Medium 16px, white */
.fw-finish-desc {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    line-height: 1.4;
    margin: 4px 0 0;
}

/* Claim button — Figma: 330×59, white bg, radius 15, purple shadow */
.fw-claim-btn {
    width: 100%;
    max-width: 330px;
    height: 59px;
    border: none;
    border-radius: 15px;
    background: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #271A8D;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(39, 26, 141, 0.35);
    transition: transform 0.12s;
    animation: fwCardSlide 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
    opacity: 0;
}
.fw-claim-btn:active {
    transform: scale(0.95);
}

/* ═══════════════════════════════════
   DAILY BONUS — Figma 115:293 / 116:449 / 116:580
   ═══════════════════════════════════ */
.screen-daily_bonus {
    background: transparent !important;
    padding: 0 !important;
    overflow: hidden;
}
.db-screen {
    position: relative;
    width: 100%; height: 100%;
    background: #432AD0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.db-bg {
    position: absolute; inset: 0;
    pointer-events: none; z-index: 0;
    overflow: hidden;
}
.db-bg::before {
    content: '';
    position: absolute;
    top: 130px; left: 0; right: 0; height: 630px;
    background: url('/static/game/img/pattern1.png') repeat;
    background-size: 260px 260px;
    opacity: 0.13;
    pointer-events: none;
}
.db-bg-ellipse, .db-bg-top, .db-bg-bottom {
    position: absolute;
    border-radius: 50%;
}
.db-bg-top {
    width: 355px; height: 159px;
    top: -79px; left: 50%;
    transform: translateX(-50%);
    background: #33B0FF;
    filter: blur(78px);
    opacity: 0.55;
}
.db-bg-bottom {
    width: 100%; height: 158px;
    bottom: -79px; left: 0;
    background: #33B0FF;
    filter: blur(78px);
    opacity: 0.35;
    border-radius: 50%;
}

#db-root {
    position: relative; z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 22px 24px;
    overflow-y: auto;
}

/* HUD on first-open state — reuses .home-hud */
.db-hud {
    padding-top: max(54px, calc(env(safe-area-inset-top, 0px) + 14px)) !important;
}

/* Header (back + title) on subsequent state */
.db-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(54px, calc(env(safe-area-inset-top, 0px) + 14px)) 0 0;
    min-height: 35px;
}
.db-back {
    position: absolute;
    left: 0;
    top: 54px;
    width: 35px; height: 35px;
    border-radius: 50%;
    background: #000000;
    border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.12s;
}
.db-back:active { transform: scale(0.9); }
.db-title {
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 900;
    color: #ffffff;
    text-align: center;
}

.db-h1 {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: #ffffff;
    text-align: center;
    margin: 22px 0 8px;
}
.db-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    font-style: italic;
    color: #FFC425;
    text-align: center;
    margin: 0 0 12px;
    line-height: 1.3;
}

/* Timer (state 116:580) */
.db-timer {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0 auto 18px;
    width: 270px;
    height: 50px;
}
.db-timer-icon {
    position: absolute;
    left: -4px; top: 50%;
    transform: translateY(-50%);
    width: 56px; height: 56px;
    object-fit: contain;
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
}
.db-timer-text {
    flex: 1;
    height: 38px;
    background: #ffffff;
    border-radius: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #2E1CAD;
}

/* Grid 3×2 + 1 wide */
.db-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 4px 0 16px;
}
.db-cell {
    position: relative;
    height: 130px;
    background: #1C1077;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.db-cell--wide {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: stretch;
}
.db-cell-header {
    background: #0D0356;
    color: #ffffff;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 7px 0;
    line-height: 1;
}
.db-cell--wide .db-cell-header {
    writing-mode: horizontal-tb;
    width: 100%;
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 2;
}
.db-cell-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 2px 4px 6px;
}
.db-cell--wide .db-cell-body {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 30px 0 0;
    align-items: center;
    justify-items: center;
}
.db-cell--wide .db-cell-icon {
    grid-column: 2;
}
.db-cell--wide .db-cell-amount {
    grid-column: 3;
}
.db-cell-icon {
    width: 64px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.db-cell--wide .db-cell-icon {
    width: 92px;
    height: 88px;
}
.db-cell-amount {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
}
.db-cell--wide .db-cell-amount {
    font-size: 22px;
    font-weight: 700;
}

/* Claimed state: dark fill + large green checkmark, no amount */
.db-cell--claimed {
    background: #0D0356;
}
.db-cell--claimed .db-cell-header {
    background: #0D0356;
    color: rgba(255,255,255,0.55);
}
.db-cell--claimed .db-cell-icon {
    display: none;
}
.db-cell--claimed .db-cell-amount {
    display: none;
}
.db-cell-check-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.35));
}

/* Active (today, can claim) — yellow header */
.db-cell--active .db-cell-header {
    background: #FFC425;
    color: #902500;
    font-weight: 700;
}

/* Locked (future days) — normal style */
.db-cell--locked { /* default styling */ }

/* Buttons */
.db-btn-wrap {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    justify-content: center;
}
.db-btn {
    width: 100%;
    max-width: 272px;
    height: 59px;
    border: none;
    border-radius: 15px;
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s, opacity 0.3s;
    position: relative;
    overflow: hidden;
}
.db-btn:active:not(:disabled) { transform: scale(0.96); }

.db-btn--primary {
    background: #FFC425;
    color: #902500;
    font-style: italic;
    box-shadow:
        0 3px 6.8px rgba(36,23,158,1),
        inset 0 -4px 1px rgba(157,146,255,0.25),
        inset 0 -16px 0 rgba(59,0,0,0.05),
        inset 0 2px 0 rgba(255,255,255,0.15);
}
.db-btn--primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,0.55) 50%, transparent 100%);
    transform: skewX(-20deg);
    animation: dbFlare 2.4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes dbFlare {
    0%   { left: -75%; }
    60%  { left: 125%; }
    100% { left: 125%; }
}

.db-btn--secondary {
    background: #ffffff;
    color: #271A8D;
    font-weight: 800;
    max-width: 330px;
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.95),
        inset 0 -4px 1px rgba(39,26,141,0.18);
}

/* Reward modal overlay (state 116:449) */
.db-reward-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.db-reward-overlay--visible {
    opacity: 1;
    pointer-events: auto;
}
.db-reward-card {
    width: 100%;
    max-width: 330px;
    background: #432AD0;
    border-radius: 20px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    animation: dbRewardPop 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes dbRewardPop {
    0%   { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1);    opacity: 1; }
}
.db-reward-title {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    text-align: center;
    margin: 0;
}
.db-reward-img {
    height: 130px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,0.35));
    margin: 4px 0;
}
.db-reward-amount {
    font-family: 'Inter', sans-serif;
    font-size: 36px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.db-reward-desc {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    text-align: center;
    line-height: 1.4;
    margin: 6px 0 0;
}
.db-reward-next {
    max-width: 330px;
}

/* ═══════════════════════════════════
   STUB SCREENS (shop, prizes)
   ═══════════════════════════════════ */
/* ═══════════════════════════════════
   START — Figma 211:2670 (pre-quiz briefing)
   ═══════════════════════════════════ */
.screen-start {
    padding: 0 !important;
    overflow: hidden;
}
.start-screen {
    position: absolute;
    inset: 0;
    background: #432BD1;
    overflow: hidden;
}
.start-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 355px 160px at 75% 0%, rgba(52,176,255,0.35) 0%, transparent 70%),
        radial-gradient(ellipse 527px 158px at 50% 100%, rgba(52,176,255,0.30) 0%, transparent 70%);
    pointer-events: none;
}
.start-bg-pattern {
    position: absolute;
    top: 31px; left: 0; right: 0; bottom: 183px;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(56,136,242,0.20) 48%, rgba(0,0,0,0) 100%);
    opacity: 0.7;
    pointer-events: none;
}
.start-content {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.start-title {
    position: absolute;
    top: 276px; left: 0; right: 0;
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: #FFFFFF;
    text-align: center;
    margin: 0;
    line-height: 1.21;
}
.start-info-card {
    position: absolute;
    top: 360px; left: 15px; right: 15px;
    height: 180px;
    background: #2E1CAD;
    border-radius: 15px;
    box-shadow: inset 0 4px 1px rgba(6,0,55,0.25);
    padding: 14px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.start-info-text {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #F4FCFF;
    margin: 0;
    line-height: 1.32;
}
.start-info-text--ready {
    margin-top: 8px;
}
.start-btn {
    position: absolute;
    bottom: max(20px, env(safe-area-inset-bottom, 20px));
    left: 30px;
    right: 30px;
    height: 59px;
    background: #FFFFFF;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #271A8D;
    box-shadow: 0 3px 6.8px rgba(36,23,158,1), inset 0 -4px 1px rgba(157,146,255,0.25);
    transition: transform 0.12s;
}
.start-btn:active { transform: scale(0.98); }
.start-btn:disabled { opacity: 0.65; cursor: default; }

/* ═══════════════════════════════════
   LOADER — Figma 212:2851 (initial app load)
   ═══════════════════════════════════ */
.loader-fullscreen {
    position: absolute;
    inset: 0;
    background: #432BD1;
    overflow: hidden;
    z-index: 9999;
}
.loader-fullscreen-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 355px 160px at 65% 0%, rgba(52,176,255,0.42) 0%, transparent 70%);
    pointer-events: none;
}
.loader-fullscreen-question {
    position: absolute;
    top: 195px;
    left: 50%;
    transform: translateX(-50%);
    width: 170px;
    height: 226px;
    object-fit: contain;
    filter: drop-shadow(0 4px 24px rgba(255,205,87,0.35));
    animation: loader-q-pulse 1.6s ease-in-out infinite;
}
@keyframes loader-q-pulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50%      { transform: translateX(-50%) scale(1.05); }
}
.loader-fullscreen-title {
    position: absolute;
    top: 446px;
    left: 0; right: 0;
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: #FFFFFF;
    text-align: center;
    margin: 0;
    line-height: 1.21;
}
.loader-fullscreen-tagline {
    position: absolute;
    top: 494px;
    left: 53px; right: 54px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #FFFFFF;
    text-align: center;
    line-height: 1.21;
    margin: 0;
}
.loader-fullscreen-loading {
    position: absolute;
    bottom: max(60px, calc(env(safe-area-inset-bottom, 0px) + 60px));
    left: 0; right: 0;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    line-height: 1.21;
    animation: loader-blink 1.2s ease-in-out infinite;
}
@keyframes loader-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.45; }
}
.loader-fullscreen-footer {
    position: absolute;
    bottom: max(16px, env(safe-area-inset-bottom, 16px));
    left: 22px;
    right: 30px;
    display: flex;
    justify-content: space-between;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #FFFFFF;
    line-height: 1.21;
}

/* ═══════════════════════════════════
   LOOTBOX OPEN — Figma 194:1265 / 1348 / 1480
   ═══════════════════════════════════ */
.screen-lootbox_open {
    padding: 0 !important;
    overflow: hidden;
}
.lb-screen {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% -20%, #EBAE20 0%, #65471E 100%),
        linear-gradient(180deg, rgba(218,132,62,0) 73%, rgba(197,162,59,1) 100%),
        #2100DA;
    background-blend-mode: normal;
}
.lb-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% -10%, #E8A41C 0%, #6F4D1F 60%, #2100DA 100%);
    pointer-events: none;
    z-index: 0;
}

/* Stars (Figma "Star 2" + "Star 3") */
.lb-stars {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}
.lb-star {
    position: absolute;
    background: #D9D9D9;
    opacity: 0;
    /* CSS-only star using clip-path */
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    transition: opacity 0.6s ease-out, transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: scale(0.4) rotate(0deg);
    transform-origin: center center;
}
.lb-star--1 {
    width: 287px; height: 287px;
    top: 278px; left: 51px;
}
.lb-star--2 {
    width: 686px; height: 686px;
    top: 79px; left: -148px;
}
.lb-star--3 {
    width: 584px; height: 584px;
    top: 130px; left: -97px;
}

/* Phase 1: closed chest */
.lb-chest {
    position: absolute;
    width: 174px; height: 143px;
    top: 351px; left: 108px;
    object-fit: contain;
    z-index: 2;
    filter: drop-shadow(0 -2px 5.5px rgba(255,221,87,0.45)) drop-shadow(0 4px 4px rgba(0,0,0,0.4));
    animation: lb-chest-bob 1.4s ease-in-out infinite alternate;
    transition: opacity 0.35s ease-out, transform 0.5s ease-in;
}
@keyframes lb-chest-bob {
    from { transform: translateY(0) rotate(-1deg); }
    to   { transform: translateY(-8px) rotate(2deg); }
}

/* Phase 1: small star initial state (visible faintly) */
.lb-screen .lb-star--1 { opacity: 0.11; transform: scale(1) rotate(0deg); }

/* Phase 2: chest fades, big stars appear, prize emerges */
.lb-prize-emerge {
    position: absolute;
    top: 353px; left: 50%;
    transform: translateX(-50%) translateY(40px);
    width: 110px; height: 137px;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.45s ease-out, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lb-prize-emerge-img {
    width: 91px;
    height: 136px;
    object-fit: contain;
    filter: drop-shadow(0 0 24px rgba(255,225,143,0.85));
}
.lb-prize-emerge-x {
    position: absolute;
    bottom: 0; right: -10px;
    font-family: 'Inter', sans-serif;
    font-size: 40px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    line-height: 1;
}

.lb-screen.lb-phase-2 .lb-chest {
    opacity: 0;
    transform: scale(0.5) translateY(40px);
}
.lb-screen.lb-phase-2 .lb-star--2,
.lb-screen.lb-phase-2 .lb-star--3 {
    opacity: 0.11;
    transform: scale(1) rotate(15deg);
}
.lb-screen.lb-phase-2 .lb-star--1 {
    transform: scale(1.4) rotate(-15deg);
}
.lb-screen.lb-phase-2 .lb-prize-emerge {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Phase 3: result panel slides in, stars stay big */
.lb-result {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease-out 0.1s;
}
.lb-screen.lb-phase-3 .lb-result {
    opacity: 1;
    pointer-events: auto;
}
.lb-screen.lb-phase-3 .lb-prize-emerge { opacity: 0; }

/* "Вы получили:" label */
.lb-got-label {
    position: absolute;
    top: 156px; left: 0; right: 0;
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: #ffffff;
    text-align: center;
    margin: 0;
    line-height: 1.21;
    text-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

/* Result panel */
.lb-result-card {
    position: absolute;
    top: 273px; left: 30px; right: 30px;
    height: 298px;
    background: rgba(0,0,0,0.30);
    border-radius: 15px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(2px);
}
.lb-result-title {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    text-align: center;
    line-height: 1.21;
}
.lb-result-img-wrap {
    position: relative;
    margin-top: 16px;
    width: 110px;
    height: 137px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lb-result-img {
    width: 91px;
    height: 136px;
    object-fit: contain;
    filter: drop-shadow(0 0 24px rgba(255,225,143,0.65));
}
.lb-result-x {
    position: absolute;
    bottom: 0;
    right: -2px;
    font-family: 'Inter', sans-serif;
    font-size: 40px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
    line-height: 1;
}
.lb-result-desc {
    margin-top: auto;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    text-align: center;
    line-height: 1.21;
    padding: 0 6px;
}

/* Claim button (Figma 300×59 at y=676) */
.lb-claim-btn {
    position: absolute;
    bottom: max(30px, env(safe-area-inset-bottom, 30px));
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 59px;
    background: #ffffff;
    border: none;
    border-radius: 15px;
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #271A8D;
    cursor: pointer;
    box-shadow: 0 3px 6.8px rgba(36,23,158,1), inset 0 -4px 1px rgba(157,146,255,0.25);
    transition: transform 0.12s;
}
.lb-claim-btn:active { transform: translateX(-50%) scale(0.96); }

/* ═══════════════════════════════════
   PRIZES — Figma 199:2022, 208:2267, 208:2361
   ═══════════════════════════════════ */
.screen-prizes {
    background: #432BD1;
    padding: 0 !important;
    overflow: hidden;
    display: flex !important;
    flex-direction: column;
}
.prizes-screen {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.prizes-bg {
    position: absolute; inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(ellipse 355px 160px at 75% 0%, rgba(52,176,255,0.35) 0%, transparent 70%),
        radial-gradient(ellipse 527px 158px at 50% 100%, rgba(52,176,255,0.30) 0%, transparent 70%);
}
.prizes-bg-pattern {
    position: absolute;
    top: 31px; left: -2px; right: -2px; bottom: 183px;
    background:
        linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(56,136,242,0.20) 48%, rgba(0,0,0,0) 100%);
    opacity: 0.7;
    pointer-events: none;
}
.prizes-content {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.prizes-hud {
    padding: max(12px, env(safe-area-inset-top, 12px)) 15px 0 !important;
    flex-shrink: 0;
}
.prizes-body {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
}
.prizes-loading {
    text-align: center;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    margin-top: 200px;
}

/* Empty state ("Призов нет") */
.prizes-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 220px;
    padding-left: 33px;
    padding-right: 33px;
}
.prizes-empty-text {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #ffffff;
    text-align: center;
    margin: 14px 0 0;
    line-height: 1.21;
}

/* List state ("Призы есть" / "Призов много") */
.prizes-list-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: 0 15px;
}
.prizes-title {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: #ffffff;
    margin: 0;
    text-align: center;
    line-height: 1.21;
    flex-shrink: 0;
}
.prizes-title--list {
    margin-top: 20px;
}
.prizes-list-hint {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #ffffff;
    text-align: center;
    margin: 6px 0 0;
    line-height: 1.21;
    flex-shrink: 0;
}
.prizes-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    margin-top: 16px;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: #F5F3FF rgba(245,243,255,0.15);
    display: flex;
    flex-direction: column;
    gap: 17px;
    padding-bottom: 8px;
}
.prizes-list::-webkit-scrollbar { width: 4px; }
.prizes-list::-webkit-scrollbar-track {
    background: rgba(245,243,255,0.15);
    border-radius: 2px;
}
.prizes-list::-webkit-scrollbar-thumb {
    background: #F5F3FF;
    border-radius: 2px;
}

/* Prize card (Figma "Group 56" + "Group 57") */
.prize-card {
    display: flex;
    width: 100%;
    height: 75px;
    background: #F5F3FF;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.12s;
    flex-shrink: 0;
}
.prize-card:active { transform: scale(0.98); }
.prize-card-img {
    width: 90px;
    height: 75px;
    flex-shrink: 0;
    border-radius: 15px 0 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.prize-card-img--money {
    background: #E0E0E0;
}
.prize-card-img--money img {
    width: 83px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}
.prize-card-img--promo {
    background: linear-gradient(135deg, #FFCF1F 0%, #FFA500 100%);
}
.prize-card-promo-tag {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #1D1082;
    letter-spacing: 0.05em;
}
.prize-card-text {
    flex: 1;
    padding: 14px 15px 14px 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-width: 0;
}
.prize-card-title {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #1D1082;
    line-height: 1.21;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.prize-card-date {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #1D1082;
    line-height: 1.21;
}

/* ── SHOP / BUY ENERGY OVERLAY ── */
.shop-overlay {
    position: absolute;
    inset: 0;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.shop-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.shop-screen {
    position: relative;
    width: 100%; height: 100%;
    background: #432AD0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.shop-bg {
    position: absolute; inset: 0;
    pointer-events: none; z-index: 0;
    overflow: hidden;
}
.shop-bg .shop-bg-top {
    position: absolute;
    width: 355px; height: 159px;
    top: -79px; left: 50%;
    transform: translateX(-50%);
    background: #33B0FF;
    filter: blur(78px);
    border-radius: 50%;
}
.shop-bg .shop-bg-bottom {
    position: absolute;
    width: 527px; height: 158px;
    bottom: -79px; left: 50%;
    transform: translateX(-50%);
    background: #33B0FF;
    filter: blur(78px);
    opacity: 0.7;
    border-radius: 50%;
}
.shop-content {
    position: relative; z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 30px 24px;
    overflow-y: auto;
}
.shop-hud {
    padding: 50px 15px 0 !important;
    margin: 0 -30px;
}
.hud-timer-tab {
    position: absolute;
    bottom: -12px;
    left: 10px;
    width: 58px; height: 12px;
    background: #ffffff;
    border-radius: 0 0 11.75px 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hud-timer-tab span {
    font-family: 'Inter', sans-serif;
    font-size: 8.6px;
    font-weight: 500;
    color: #1C107A;
    white-space: nowrap;
}

.shop-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0 6px;
}
.shop-back {
    width: 35px; height: 35px;
    background: rgba(0,0,0,0.40);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
}
.shop-back::before {
    content: '';
    width: 11px; height: 11px;
    border-left: 3px solid #d9d9d9;
    border-bottom: 3px solid #d9d9d9;
    transform: rotate(45deg);
    margin-left: 4px;
}
.shop-title {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: #ffffff;
    margin: 0;
}
.shop-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #ffffff;
    text-align: center;
    margin: 4px 0 8px;
}

/* Timer */
.shop-timer {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0 auto 16px;
    width: 186px;
    height: 28px;
}
.shop-timer-icon {
    position: absolute;
    left: -6px; top: 50%;
    transform: translateY(-50%);
    width: 28px; height: 28px;
    object-fit: contain;
    z-index: 2;
}
.shop-timer-text {
    flex: 1;
    height: 20px;
    background: rgba(255,255,255,0.30);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
}

/* Energy lots */
.shop-lots {
    display: flex;
    gap: 15px;
    margin: 0 0 20px;
}
.shop-lot-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    position: relative;
}
.shop-lot-top {
    width: 100%;
    height: 150px;
    background: rgba(0,0,0,0.20);
    border-radius: 11.25px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    isolation: isolate;
    box-shadow:
        0 2.25px 5.1px #24169E,
        inset 0 3px 0.75px rgba(5,0,55,0.25);
}
.shop-lot-img {
    width: 57px; height: 85px;
    object-fit: contain;
}
.shop-lot-img--x5 {
    width: 100px; height: 85px;
}
.shop-lot-label { display: none !important; }
.shop-lot-qty {
    position: absolute;
    bottom: 40px;
    right: 21px;
    font-family: 'Inter', sans-serif;
    font-size: 30px;
    font-weight: 800;
    color: #ffffff;
    pointer-events: none;
}
.shop-lot-badge {
    position: absolute;
    top: 7px; right: -3px;
    background: #FF00BF;
    border-radius: 15px;
    padding: 0 5px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 800;
    color: #FAFAFA;
    line-height: 15px;
    z-index: 3;
}
.shop-lot-btn {
    width: 135px;
    height: 45px;
    background: #ffffff;
    border: none;
    border-radius: 15px;
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #26198C;
    cursor: pointer;
    box-shadow:
        0 3px 6.8px #24169E,
        inset 0 -4px 1px rgba(156,145,255,0.25),
        inset 0 -32px 0 rgba(0,0,0,0.02);
    transition: transform 0.12s;
    margin-top: -30px;
    position: relative;
    z-index: 2;
    overflow: hidden;
}
.shop-lot-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,0.45) 45%, rgba(255,255,255,0.55) 55%, transparent 80%);
    animation: btn-flare 10s ease-in-out infinite;
}
.shop-lot-btn:active { transform: scale(0.96); }

/* Smart status card */
.shop-smart-card {
    background: rgba(0,0,0,0.20);
    border-radius: 11.25px;
    padding: 12px 16px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow:
        0 2.25px 5.1px #24169E,
        inset 0 3px 0.75px rgba(5,0,55,0.25);
    overflow: visible;
}
.shop-smart-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    width: 100%;
}
.shop-smart-3d {
    width: 77px; height: 68px;
    object-fit: contain;
    filter: drop-shadow(0 0 10.8px rgba(255,255,255,0.25));
}
.shop-smart-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.shop-smart-title {
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 900;
    color: #ffffff;
}
.shop-smart-badge {
    display: inline-block;
    background: #FF00BF;
    border-radius: 15px;
    padding: 1.5px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: #FAFAFA;
    line-height: 15px;
    width: max-content;
}

.shop-smart-features {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 12px;
}
.shop-smart-feat {
    width: 91px; height: 84px;
    background: rgba(255,255,255,0.10);
    border-radius: 11.25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow:
        0 2.25px 5.1px #24169E,
        inset 0 3px 0.75px rgba(5,0,55,0.25);
}
.shop-smart-feat img {
    width: 22px; height: 33px;
    object-fit: contain;
}
.shop-smart-feat--center img {
    width: 30px; height: 33px;
}
.shop-smart-feat span {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 500;
    color: #ffffff;
    text-align: center;
    line-height: 1.2;
}

.shop-smart-btn {
    width: 233px;
    height: 45px;
    background: #ffffff;
    border: none;
    border-radius: 15px;
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #26198C;
    cursor: pointer;
    box-shadow:
        0 3px 6.8px #24169E,
        inset 0 -4px 1px rgba(156,145,255,0.25),
        inset 0 -32px 0 rgba(0,0,0,0.02);
    transition: transform 0.12s;
    margin-bottom: -22px;
    position: relative;
    z-index: 2;
    overflow: hidden;
}
.shop-smart-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,0.45) 45%, rgba(255,255,255,0.55) 55%, transparent 80%);
    animation: btn-flare 10s ease-in-out 5s infinite;
}
.shop-smart-btn:active { transform: scale(0.96); }

@keyframes btn-flare {
    0% { left: -100%; opacity: 0; }
    5% { opacity: 1; }
    35% { left: 200%; opacity: 1; }
    40% { opacity: 0; }
    40.01%, 100% { left: -100%; opacity: 0; }
}
.shop-smart-star {
    font-weight: 300;
    font-size: 11px;
    vertical-align: super;
}
.shop-smart-note {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 300;
    font-style: italic;
    color: #FAFAFA;
    margin: 30px 0 0;
    text-align: center;
}

/* ═══════════════════════════════════
   MAIN SHOP — Figma 177:656 (no-scroll, compact layout)
   ═══════════════════════════════════ */
.screen-shop, .screen-shop_energy {
    padding: 0 !important;
}
.shop-main-screen {
    height: 100%;
    width: 100%;
    overflow: hidden;
    background: #432BD1;
    display: flex;
    flex-direction: column;
}
.shop-main-screen .shop-content {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 0 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
@media (max-height: 800px) {
    .shop-main-screen .shop-content {
        overflow-y: auto;
        overflow-x: hidden;
        padding-bottom: 16px;
    }
}
.shop-main-screen .shop-hud {
    padding: max(12px, env(safe-area-inset-top, 12px)) 15px 0 !important;
    margin: 0 -30px;
    flex-shrink: 0;
}
.shop-main-title {
    text-align: center;
    margin: 0 !important;
    flex-shrink: 0;
}
/* Compact section margins for no-scroll layout */
.shop-main-screen .shop-lootbox-card,
.shop-main-screen .shop-smart-card,
.shop-main-screen .shop-lots {
    flex-shrink: 0;
}
.shop-main-screen .shop-lootbox-card { margin: 0 auto !important; }
.shop-main-screen .shop-smart-card { margin: 0 !important; padding: 8px 16px 0; }
.shop-main-screen .shop-lots { margin: 0 !important; gap: 24px; }
.shop-main-screen .shop-smart-features { margin-bottom: 8px; }
.shop-main-screen .shop-smart-note { margin: 26px 0 0 !important; }

/* Lootbox card (Figma Group 51 in 177:656) */
.shop-lootbox-card {
    position: relative;
    width: 329px;
    max-width: 100%;
    height: 250px;
    margin: 0 auto;
    flex-shrink: 0;
}
.shop-lootbox-card::before {
    content: '';
    position: absolute;
    top: 10px; left: 0; right: 0;
    height: 219px;
    background: rgba(0,0,0,0.20);
    border-radius: 11.25px;
    z-index: 0;
}
.shop-lootbox-chest {
    position: absolute;
    top: 0; left: 9px;
    width: 118px;
    height: 97px;
    object-fit: contain;
    z-index: 1;
    filter: drop-shadow(0 -2px 5.5px rgba(255,221,87,0.35)) drop-shadow(0 4px 4px rgba(0,0,0,0.25));
}
.shop-lootbox-info {
    position: absolute;
    top: 28px; left: 141px;
    width: 173px;
    z-index: 1;
}
.shop-lootbox-title {
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 900;
    color: #ffffff;
    margin: 0;
    line-height: 1.21;
    text-align: center;
}
.shop-lootbox-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: #FFC425;
    margin: 6px 0 0;
    text-align: right;
}
.shop-lootbox-tag {
    position: absolute;
    top: 95px;
    left: 144px;
    width: 171px;
    height: 15px;
    background: #00A1FF;
    color: #FAFAFA;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    line-height: 15px;
    border-radius: 15px 0 15px 15px;
    z-index: 1;
}
.shop-lootbox-features {
    position: absolute;
    top: 115px;
    left: 13px;
    right: 14px;
    display: flex;
    justify-content: space-between;
    z-index: 1;
}
.shop-lootbox-feat {
    width: 91px;
    height: 75px;
    background: rgba(255,255,255,0.10);
    border-radius: 11.25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 4px;
}
.shop-lootbox-feat--no-icon {
    justify-content: flex-end;
    padding-bottom: 8px;
}
.shop-lootbox-feat img {
    width: 28px;
    height: 32px;
    object-fit: contain;
}
.shop-lootbox-feat span {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 500;
    color: #ffffff;
    text-align: center;
    line-height: 1.21;
}
.shop-lootbox-btn {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 233px;
    height: 45px;
    background: #ffffff;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #271A8D;
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 600;
    box-shadow: 0 3px 6.8px rgba(36,23,158,1), inset 0 -4px 1px rgba(157,146,255,0.25), inset 0 -32px 0 rgba(0,0,0,0.02);
    z-index: 2;
}
.shop-lootbox-btn img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}
.shop-lootbox-btn:active { transform: translateX(-50%) scale(0.96); }
.shop-lootbox-btn:disabled { opacity: 0.6; cursor: default; }

/* Active subscription state (Figma Магазин 2 — 194:1141) */
.shop-smart-active {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 45px;
    margin: 16px auto 0;
    width: 233px;
    background: rgba(255,255,255,0.10);
    border-radius: 15px;
    color: #4ADE80;
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 700;
}
.shop-smart-active img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}
.shop-smart-card--active .shop-smart-badge {
    background: #4ADE80;
    color: #fff;
}

/* HUD energy pill clickable on main shop */
.shop-main-screen #hud-energy-pill {
    cursor: pointer;
}
.shop-main-screen #hud-energy-pill:active {
    transform: scale(0.95);
}

/* ═══════════════════════════════════
   SETTINGS — Figma 211:2711
   ═══════════════════════════════════ */
.screen-settings {
    background: #432BD1;
    overflow: hidden;
    padding: 0 !important;
}
.settings-bg {
    position: absolute; inset: 0; z-index: 0; overflow: hidden;
    pointer-events: none;
}
.settings-bg-top {
    position: absolute;
    width: 355px; height: 159px;
    top: 0; left: 86px;
    background: #34B0FF;
    border-radius: 50%;
    filter: blur(155px);
}
.settings-bg-bottom {
    position: absolute;
    width: 527px; height: 158px;
    bottom: -160px; left: 0;
    background: #34B0FF;
    border-radius: 50%;
    filter: blur(155px);
    opacity: 0.7;
}
.settings-content {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.settings-title-row {
    position: absolute;
    top: 255px;
    left: 0; right: 0;
    height: 39px;
    text-align: center;
}
.settings-title-row .shop-back {
    position: absolute;
    top: 2px;
    left: 15px;
}
.settings-title {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: #ffffff;
    margin: 0;
    line-height: 39px;
    vertical-align: top;
}
.settings-buttons {
    position: absolute;
    top: 315px;
    left: 0; right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.settings-btn {
    width: 271px;
    height: 45px;
    background: #ffffff;
    border: none;
    border-radius: 15px;
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #271A8D;
    cursor: pointer;
    transition: transform 0.12s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 17px;
    line-height: 1.2;
    box-shadow: 0 3px 6.8px rgba(36,22,158,0.45), inset 0 -4px 1px rgba(156,145,255,0.25), inset 0 -32px 0 rgba(0,0,0,0.02);
    flex-shrink: 0;
}
.settings-btn:active { transform: scale(0.96); }
.settings-btn--sm {
    font-size: 14px;
}
.settings-btn--support {
    position: absolute;
    top: 615px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0 !important;
}
.settings-btn--support:active { transform: translateX(-50%) scale(0.96); }
.settings-footer {
    position: absolute;
    bottom: max(16px, env(safe-area-inset-bottom, 16px));
    left: 22px;
    right: 30px;
    display: flex;
    justify-content: space-between;
    margin: 0;
    padding: 0;
}
.settings-email,
.settings-version {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #ffffff;
    line-height: 1.21;
}

/* ═══════════════════════════════════
   FAQ — Figma 211:2617
   ═══════════════════════════════════ */
.screen-faq {
    background: #432BD1;
    overflow: hidden;
    padding: 0 !important;
}
.screen-faq .settings-bg,
.screen-faq .settings-bg-top,
.screen-faq .settings-bg-bottom { /* reuse settings bg styles */ }

.faq-content {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.faq-title-row {
    position: absolute;
    top: 120px;
    left: 0; right: 0;
    height: 39px;
    text-align: center;
}
.faq-title-row .shop-back {
    position: absolute;
    top: 2px;
    left: 15px;
}
.faq-title {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: #ffffff;
    margin: 0;
    line-height: 39px;
    vertical-align: top;
}
.faq-list {
    position: absolute;
    top: 195px;
    left: 14px;
    right: 14px;
    bottom: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: #F5F3FF rgba(245,243,255,0.15);
}
.faq-list::-webkit-scrollbar {
    width: 4px;
}
.faq-list::-webkit-scrollbar-track {
    background: rgba(245,243,255,0.15);
    border-radius: 2px;
}
.faq-list::-webkit-scrollbar-thumb {
    background: #F5F3FF;
    border-radius: 2px;
}
.faq-item {
    background: #0D0356;
    border-radius: 5px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: background 0.2s;
}
.faq-q {
    width: 100%;
    min-height: 45px;
    background: transparent;
    border: none;
    padding: 13px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #F4FCFF;
    text-align: left;
    cursor: pointer;
    line-height: 1.21;
    display: block;
}
.faq-q:active { opacity: 0.85; }
.faq-a {
    max-height: 0;
    overflow: hidden;
    padding: 0 16px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #0D0356;
    line-height: 1.45;
    transition: max-height 0.25s ease-out, padding 0.25s ease-out;
}
.faq-item.open {
    background: #FFFFFF;
}
.faq-item.open .faq-q {
    color: #0D0356;
    font-weight: 700;
    font-size: 20px;
    padding: 10px 16px 6px;
}
.faq-item.open .faq-a {
    max-height: 200px;
    padding: 0 16px 14px;
}

/* ═══════════════════════════════════
   MODAL
   ═══════════════════════════════════ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    z-index: 200; padding: 24px;
    animation: modalFade 0.2s;
}
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }

.modal {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 32px 24px 24px;
    max-width: 300px; width: 100%;
    text-align: center;
    box-shadow: var(--sh-lg);
    animation: modalPop 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes modalPop {
    0% { transform: scale(0.9) translateY(10px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-glyph {
    width: 56px; height: 56px; margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--pri-tint);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
}
.modal-title {
    font-family: var(--f-display);
    font-size: 18px;
    color: var(--t1);
    margin-bottom: 6px;
}
.modal-text {
    font-size: 14px; color: var(--t2);
    margin-bottom: 20px; line-height: 1.5;
}

/* ═══════════════════════════════════
   EMPTY STATES
   ═══════════════════════════════════ */
.empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 40px 24px; text-align: center;
}
.empty-icon { font-size: 44px; margin-bottom: 14px; opacity: 0.35; }
.empty-title { font-family: var(--f-display); font-size: 15px; margin-bottom: 4px; color: var(--t1); }
.empty-text { font-size: 13px; color: var(--t3); max-width: 220px; }

/* ═══════════════════════════════════
   UTILITIES
   ═══════════════════════════════════ */
.spacer { flex: 1; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mt-auto { margin-top: auto; }
.hidden { display: none !important; }
.divider { height: 1px; background: rgba(0,0,0,0.05); margin: 14px 0; }

/* ═══════════════════════════════════════════
   Toast (transient error feedback)
   ═══════════════════════════════════════════ */
.toast-stack {
    position: fixed;
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 9999;
    pointer-events: none;
    width: min(92vw, 420px);
}
.toast {
    background: rgba(20, 20, 30, 0.92);
    color: #fff;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.35;
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    text-align: center;
}
.toast--visible { opacity: 1; transform: translateY(0); }
.toast--error   { border-left: 3px solid #EF4444; }
.toast--success { border-left: 3px solid #10B981; }
.toast--info    { border-left: 3px solid #6366F1; }
