@font-face {
    font-family: 'Amsi Pro AKS Condensed';
    src: url('../fonts/AmsiProAKSCondensed-Bold.woff2') format('woff2'),
         url('../fonts/AmsiProAKSCondensed-Bold.woff') format('woff'),
         url('../fonts/AmsiProAKSCondensed-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

:root {
    --navy: #13244a;
    --teal-1: #2a9a98;
    --teal-2: #1d7377;
    --lime-1: #e9ff4a;
    --lime-2: #c4ec1c;
    --lime-3: #a9d80f;
    --frame: #fff;
    --frame-edge: #fff;

    /* размеры барабана (пересчитываются из JS) */
    --card-h: 200px;
    --gap: 16px;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Rubik', 'Arial Black', sans-serif;
    background: var(--teal-2);
    color: var(--navy);
    user-select: none;
    -webkit-user-select: none;
}

/* ================= ПРЕЛОАДЕР (bulkin.online) ================= */
#preloader {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #0a0a0a 0%, #000 70%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 25px;
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    transition: opacity 1.2s ease;
    cursor: pointer;
}
#preloader.is-hidden { opacity: 0; pointer-events: none; }

.preloader-content { text-align: center; padding: 0 16px; }

#track-svg {
    width: min(520px, 86vw);
    height: auto;
    aspect-ratio: 2 / 1;
    filter: drop-shadow(0 0 12px #ffffff);
}

#track-path {
    stroke: #ffffff;
    stroke-width: 11;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    opacity: 0;
}
#track-path.is-ready { opacity: 1; }

.preloader-title {
    font-size: clamp(1.1rem, 2.8vw, 3rem);
    font-weight: 700;
    letter-spacing: clamp(3px, 0.6vw, 8px);
    text-transform: uppercase;
    color: #ffffff;
    margin: 18px 0 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
    opacity: 0;
    animation: titleFade 1.2s 0.6s forwards;
}

.preloader-gp {
    font-size: clamp(1.8rem, 4.2vw, 4.5rem);
    font-weight: 900;
    letter-spacing: clamp(5px, 1vw, 12px);
    color: #ffffff;
    margin: -8px 0 0;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
    opacity: 0;
    animation: titleFade 1.2s 1.1s forwards;
}

.preloader-year {
    position: absolute;
    bottom: clamp(18px, 5vh, 56px);
    left: 0;
    right: 0;
    text-align: center;
    font-size: clamp(0.7rem, 1.4vw, 0.9rem);
    font-weight: 600;
    letter-spacing: 0.45em;
    text-indent: 0.45em;
    color: rgba(255, 255, 255, 0.38);
    pointer-events: none;
}

@keyframes titleFade { to { opacity: 1; } }

/* ================= ФОН (статичный, в духе FH) ================= */
.scene {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    background:
        /* звёздочки */
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='160' viewBox='0 0 180 160'%3E%3Cg fill='%23ffffff' fill-opacity='.13'%3E%3Cpath d='M40 18l6.5 13.2 14.5 2.1-10.5 10.2 2.5 14.5L40 51.2l-13 6.8 2.5-14.5L19 33.3l14.5-2.1z'/%3E%3Cpath d='M130 92l4.6 9.4 10.4 1.5-7.5 7.3 1.8 10.3-9.3-4.9-9.3 4.9 1.8-10.3-7.5-7.3 10.4-1.5z'/%3E%3C/g%3E%3C/svg%3E"),
        /* статичные лучи из-за логотипа */
        repeating-conic-gradient(from 0deg at 18% 50%,
            rgba(255,255,255,.16) 0deg 7deg,
            rgba(255,255,255,0) 7deg 15deg),
        radial-gradient(ellipse at 22% 50%, var(--scene-light) 0%, var(--scene-mid) 55%, var(--scene-dark) 100%);
}

.band {
    flex: 0 0 auto;
    height: clamp(26px, 11vh, 110px);
    background: linear-gradient(180deg, var(--teal-1), var(--teal-2));
    position: relative;
    z-index: 2;
}
.band-top { box-shadow: 0 4px 0 #fff, 0 8px 18px rgba(0,0,0,.25); }
.band-bottom { box-shadow: 0 -4px 0 #fff, 0 -8px 18px rgba(0,0,0,.25); }

/* ================= РАЗМЕТКА СЦЕНЫ ================= */
.stage {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr);
    align-items: center;
    gap: clamp(12px, 3vw, 60px);
    padding: clamp(10px, 3vh, 40px) clamp(16px, 5vw, 110px);
    position: relative;
    z-index: 1;
}

.side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 3vh, 34px);
    min-height: 0;
    height: 100%;
}

/* ---------- логотип ---------- */
.badge { position:relative; width:min(100%,46vh,420px); aspect-ratio:1; isolation:isolate; }
.logo-disk { position:absolute; left:8%; top:12%; width:84%; aspect-ratio:1; border:7px solid #fff; border-radius:50%; background:#08090a; padding:7px; box-shadow:0 4px 0 #0003; }
.logo-rays { width:100%; height:100%; border-radius:50%; background:repeating-conic-gradient(#c4fa00 0deg 15deg,#21b8ed 15deg 30deg); box-shadow:inset 0 0 24px #0467ce; will-change:transform; }
.logo-foreground,.logo-hat-glow { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; pointer-events:none; }
.logo-hat-glow { opacity:0; overflow:hidden; }
.badge.is-winner .logo-hat-glow { animation:hatBlink .28s ease-in-out infinite alternate; }
@keyframes hatBlink { from {opacity:0;} to {opacity:1;} }
/* ---------- кнопка «КРУТИТЬ» (на месте счётчика) ---------- */
.spin-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.spin-btn {
    -webkit-appearance: none;
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
    font: inherit;
    touch-action: manipulation;
}

.spin-btn-face {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: clamp(170px, 17vw, 260px);
    height: clamp(52px, 8.5vh, 84px);
    padding: 0 26px;
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 45%, #dfe4ea 100%);
    border: 4px solid var(--navy);
    border-radius: 12px;
    box-shadow:
        inset 0 0 0 4px #fff,
        inset 0 -10px 0 rgba(19,36,74,.08),
        0 6px 0 var(--navy),
        0 10px 22px rgba(0,0,0,.25);
    position: relative;
    overflow: hidden;
    transition: transform .12s ease, box-shadow .12s ease, background .2s;
}
/* блик как на окошке счётчика */
.spin-btn-face::before,
.spin-btn-face::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 18%;
    pointer-events: none;
}
.spin-btn-face::before { top: 0; background: linear-gradient(180deg, rgba(19,36,74,.35), transparent); }
.spin-btn-face::after { bottom: 0; background: linear-gradient(0deg, rgba(19,36,74,.35), transparent); }

.spin-btn-text {
    font-weight: 900;
    font-style: italic;
    font-size: clamp(1.5rem, 2.6vw, 2.5rem);
    letter-spacing: .02em;
    color: var(--navy);
    line-height: 1;
    display: inline-block;
}

.spin-btn:hover .spin-btn-face { transform: translateY(-2px) scale(1.03); }
.spin-btn:active .spin-btn-face {
    transform: translateY(5px);
    box-shadow: inset 0 0 0 4px #fff, 0 1px 0 var(--navy), 0 4px 10px rgba(0,0,0,.25);
}
.spin-btn:focus-visible { outline: none; }
.spin-btn:focus-visible .spin-btn-face { outline: 4px solid #fff; outline-offset: 4px; }

.spin-btn.is-busy { cursor: default; }
.spin-btn.is-busy .spin-btn-face { transform: none; background: linear-gradient(180deg,#f3f5f7,#d6dce3); }
.spin-btn.is-busy .spin-btn-text { animation: rollText .35s linear infinite; }
@keyframes rollText {
    0% { transform: translateY(-40%); opacity: 0; }
    30%, 70% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(40%); opacity: 0; }
}
.spin-btn.is-ready .spin-btn-face { animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse {
    0%, 100% { box-shadow: inset 0 0 0 4px #fff, 0 6px 0 var(--navy), 0 10px 22px rgba(0,0,0,.25), 0 0 0 0 rgba(255,255,255,.0); }
    50% { box-shadow: inset 0 0 0 4px #fff, 0 6px 0 var(--navy), 0 10px 22px rgba(0,0,0,.25), 0 0 0 8px rgba(255,255,255,.55); }
}

.spin-caption {
    font-weight: 800;
    font-style: italic;
    font-size: clamp(.9rem, 1.4vw, 1.3rem);
    color: #fff;
    text-shadow: 0 2px 0 rgba(19,36,74,.55);
    text-align: center;
    min-height: 1.3em;
}

/* ================= РАМКА БАРАБАНА ================= */
.reel-wrap {
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reel-frame {
    position: relative;
    width: 100%;
    max-width: 1100px;
    height: min(100%, 78vh);
    padding: clamp(6px, .9vw, 12px);
    border-radius: 18px;
    background: var(--frame);
    border: 3px solid var(--frame-edge);
    box-shadow:
        0 0 0 2px rgba(255,255,255,.6),
        0 14px 30px rgba(19,36,74,.18);
    transition: box-shadow .3s;
}

.reel-window {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 10px;
    background: var(--reel-bg);
    box-shadow: inset 0 0 0 2px var(--frame-edge);
}

/* стрелочки-указатели по бокам */
.notch {
    position: absolute;
    top: 50%;
    width: 0; height: 0;
    border-top: clamp(9px, 1.3vw, 15px) solid transparent;
    border-bottom: clamp(9px, 1.3vw, 15px) solid transparent;
    transform: translateY(-50%);
    z-index: 5;
    filter: drop-shadow(0 0 0 var(--frame-edge));
}
.notch-left {
    left: clamp(3px, .5vw, 6px);
    border-left: clamp(9px, 1.2vw, 14px) solid var(--frame-edge);
}
.notch-right {
    right: clamp(3px, .5vw, 6px);
    border-right: clamp(9px, 1.2vw, 14px) solid var(--frame-edge);
}

.reel-frame.win {
    animation: frameWin .28s ease-in-out infinite alternate;
}
@keyframes frameWin {
    from { box-shadow: 0 0 0 2px rgba(255,255,255,.6), 0 0 18px rgba(255,255,255,.6), 0 14px 30px rgba(19,36,74,.18); }
    to   { box-shadow: 0 0 0 4px rgba(255,255,255,.95), 0 0 46px rgba(255,255,255,.95), 0 14px 30px rgba(19,36,74,.18); }
}

.reel-track {
    position: absolute;
    left: 0; right: 0; top: 0;
    padding: 0 clamp(10px, 2.2vw, 30px);
    will-change: transform;
}

/* ================= КАРТОЧКА ================= */
.card {
    --c: #b9c3cc;
    --c2: #d4dbe1;
    position: relative;
    height: var(--card-h);
    margin-bottom: var(--gap);
    border-radius: 6px;
    border: clamp(3px, .35vw, 5px) solid #fff;
    background: var(--c);
    box-shadow: 0 3px 0 rgba(19,36,74,.12);
    overflow: hidden;
    container-type: size;
}

/* Solid panel colors follow the hue of each rarity backdrop. */
.rare-1 { --c: #adb5bd; }
.rare-2 { --c: #31c962; }
.rare-3 { --c: #28afe5; }
.rare-4 { --c: #bf2be6; }
.rare-5 { --c: #ffbd2b; }

/* белая полоса с машиной и названием */
.card-band {
    position: absolute;
    left: 0; right: 0;
    top: 25%;
    bottom: 25%;
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 55%, #e3e7eb 100%);
    box-shadow: 0 2px 0 rgba(19,36,74,.08);
}

.card-img {
    position: absolute;
    left: 3%;
    top: 50%;
    transform: translateY(-50%);
    height: 87%;
    width: 55%;
    max-width: 55%;
    object-fit: contain;
    object-position: left center;
    filter: drop-shadow(4px 8px 6px rgba(0,0,0,.28));
    z-index: 2;
    pointer-events: none;
}

.reel-loading { position:absolute; inset:5px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:18px; padding:24px; text-align:center; color:#fff; background:var(--reel-bg); border-radius:3px; z-index:7; font:700 clamp(18px,2vw,26px) 'Rubik',sans-serif; }
.reel-frame.is-loading .reel-window { visibility:hidden; }
.reel-frame.is-loading .notch { visibility:hidden; }
.asset-spinner { width:34px; height:34px; border:3px solid #ffffff40; border-top-color:#fff; border-radius:50%; animation:assetTurn .8s linear infinite; }
.reel-loading.has-error .asset-spinner { display:none; }
#retryAssets { border:2px solid #fff; border-radius:3px; padding:9px 20px; background:#fff; color:#13244a; font:700 16px 'Rubik',sans-serif; cursor:pointer; }
.spin-btn:disabled { cursor:default; }
@keyframes assetTurn { to {transform:rotate(360deg);} }
@media(prefers-reduced-motion:reduce) { .asset-spinner {animation:none;} }

.card-text {
    position: absolute;
    right: 5%;
    top: 0; bottom: 0;
    left: 54%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    text-align: right;
    z-index: 3;
    font-family: 'Amsi Pro AKS Condensed', 'Arial Narrow', sans-serif;
    font-style: italic;
    text-transform: uppercase;
    color: #111;
    line-height: .92;
}
.text-model {
    font-size: 22px;
    font-size: clamp(15px, min(21cqh, 8cqw), 76px);
    max-width: 100%;
    overflow-wrap: anywhere;
    text-wrap: balance;
}
.text-brand {
    font-size: 15px;
    font-size: clamp(11px, min(12.5cqh, 5cqw), 46px);
    margin-top: .1em;
    color: #222;
}

/* ================= ВСПЫШКА ================= */
.flash {
    position: fixed;
    inset: 0;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    z-index: 9000;
}
.flash.go { animation: flash .55s ease-out; }
.flash.soft { animation: flashSoft 1.3s cubic-bezier(.25, 0, .35, 1); }
@keyframes flash { 0%, 12% { opacity: 1; } 100% { opacity: 0; } }
@keyframes flashSoft { 0%, 20% { opacity: 1; } 100% { opacity: 0; } }

/* ================= АДАПТИВ: ВЕРТИКАЛЬНЫЙ ЭКРАН (телефон) ================= */
@media (max-aspect-ratio: 1/1) {
    .band { height: clamp(18px, 4vh, 48px); }
    .scene {
        background:
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='160' viewBox='0 0 180 160'%3E%3Cg fill='%23ffffff' fill-opacity='.13'%3E%3Cpath d='M40 18l6.5 13.2 14.5 2.1-10.5 10.2 2.5 14.5L40 51.2l-13 6.8 2.5-14.5L19 33.3l14.5-2.1z'/%3E%3Cpath d='M130 92l4.6 9.4 10.4 1.5-7.5 7.3 1.8 10.3-9.3-4.9-9.3 4.9 1.8-10.3-7.5-7.3 10.4-1.5z'/%3E%3C/g%3E%3C/svg%3E"),
            repeating-conic-gradient(from 0deg at 50% 18%,
                rgba(255,255,255,.16) 0deg 7deg,
                rgba(255,255,255,0) 7deg 15deg),
            radial-gradient(ellipse at 50% 20%, var(--scene-light) 0%, var(--scene-mid) 55%, var(--scene-dark) 100%);
    }
    .stage {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr) auto;
        gap: clamp(10px, 2vh, 22px);
        padding: clamp(10px, 2vh, 24px) 16px max(14px, env(safe-area-inset-bottom));
    }
    .side { display: contents; }
    .badge {
        grid-row: 1;
        justify-self: center;
        width: min(62vw, 27vh, 340px);
    }
    .reel-wrap { grid-row: 2; }
    .reel-frame { height: 100%; }
    .spin-box { grid-row: 3; width: 100%; }
    .spin-btn { width: min(100%, 420px); }
    .spin-btn-face { width: 100%; height: clamp(58px, 8.5vh, 80px); }
    .spin-btn-text { font-size: clamp(1.6rem, 7vw, 2.4rem); }
    .spin-caption { font-size: clamp(.85rem, 3.6vw, 1.1rem); }
}

/* низкий горизонтальный экран (телефон боком) */
@media (min-aspect-ratio: 1/1) and (max-height: 520px) {
    .band { height: 14px; }
    .stage { padding: 8px 16px; gap: 14px; }
    .side { gap: 8px; }
    .badge { width: min(100%, 52vh); }
    .spin-btn-face { min-width: 150px; height: 46px; }
    .spin-btn-text { font-size: 1.35rem; }
    .reel-frame { height: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .badge-rays, .mascot, .mascot-arm { animation: none; }
}

/* Colors share a palette; the reel stays darker than the stage. */
:root { --scene-light:#ffdf40; --scene-mid:#f8b11b; --scene-dark:#d87a13; --reel-bg:#243563; }
.scene[data-rarity="rare-1"] { --scene-light:#d6dce2; --scene-mid:#8f9aa8; --scene-dark:#546170; --reel-bg:#38424f; }
.scene[data-rarity="rare-2"] { --scene-light:#a4ef35; --scene-mid:#44c83e; --scene-dark:#14914c; --reel-bg:#155a2d; }
.scene[data-rarity="rare-3"] { --scene-light:#4ddaff; --scene-mid:#159fea; --scene-dark:#2255c5; --reel-bg:#10445e; }
.scene[data-rarity="rare-4"] { --scene-light:#ed41ff; --scene-mid:#c01cf0; --scene-dark:#8021c8; --reel-bg:#531466; }
.scene[data-rarity="rare-5"] { --scene-light:#fff15a; --scene-mid:#ffc51b; --scene-dark:#e99408; --reel-bg:#76520b; }
.band { background:radial-gradient(ellipse at 20% 0%,#58b69b99,transparent 70%),linear-gradient(160deg,#279c91,#1c6577); overflow:hidden; }
.band::before { content:""; position:absolute; inset:-100% -10%; opacity:.11; background:conic-gradient(from 45deg at 50% 50%,#a2e2cb 0 90deg,transparent 90deg 180deg,#123b59 180deg 270deg,transparent 270deg); background-size:180px 180px; transform:rotate(-12deg); }
.band::after { content:""; position:absolute; inset:0; opacity:.16; background:radial-gradient(#e4fff5 .6px,transparent .8px); background-size:3px 3px; mask-image:linear-gradient(transparent,#000); }
.reel-frame { padding:5px; border-radius:9px; border:4px solid #fff; background:#fff; box-shadow:0 0 0 2px #ffffff35,0 10px 25px #0003; }
.reel-window { border-radius:2px; box-shadow:none; isolation:isolate; }
.reel-window::after { content:""; position:absolute; inset:0; z-index:6; pointer-events:none; box-shadow:inset 0 28px 22px -9px #000b,inset 0 -28px 22px -9px #000b,inset 10px 0 13px -10px #000b,inset -10px 0 13px -10px #000b; }
.reel-track { padding:0 clamp(12px,1.5vw,22px); }
.card { border-radius:3px; }
.card-text { font-style:normal; left:57%; right:4%; }
.text-model { font-size:clamp(15px,min(17cqh,6.7cqw),64px); }
.text-brand { font-size:clamp(11px,min(11cqh,4.8cqw),38px); }
.notch-left {left:0;} .notch-right {right:0;}
.reel-frame.win .notch { animation:arrowBlink .28s ease-in-out infinite alternate; }
@keyframes arrowBlink { from {filter:drop-shadow(0 0 1px #fff);} to {filter:drop-shadow(0 0 10px #fff);} }
.spin-btn-face { border:3px solid #fff; border-radius:5px; background:linear-gradient(#fff 25%,#f5f5f5 70%,#b6b7b9); box-shadow:inset 0 0 0 3px #27292b,0 4px 12px #0005; }
.spin-btn-text { font-family:'Amsi Pro AKS Condensed',sans-serif; font-style:normal; font-weight:700; color:#111; position:relative; top:-.16em; }
.spin-caption { font-family:'Amsi Pro AKS Condensed',sans-serif; font-style:normal; }
@media (prefers-reduced-motion:reduce) { .badge.is-winner .logo-hat-glow,.reel-frame.win,.reel-frame.win .notch {animation:none;} .logo-hat-glow {display:none;} }

/* Full-bleed backgrounds: default during idle/spinning, rarity after result. */
.scene { --backdrop:url('../images/backgrounds/background.png?v=3'); }
.scene[data-rarity="rare-1"] { --backdrop:url('../images/backgrounds/common.png?v=3'); }
.scene[data-rarity="rare-2"] { --backdrop:url('../images/backgrounds/uncommon.png?v=3'); }
.scene[data-rarity="rare-3"] { --backdrop:url('../images/backgrounds/rare.png?v=3'); }
.scene[data-rarity="rare-4"] { --backdrop:url('../images/backgrounds/epic.png?v=3'); }
.scene[data-rarity="rare-5"] { --backdrop:url('../images/backgrounds/legendary.png?v=3'); }
.stage { isolation:isolate; }
.stage::before { content:""; position:absolute; inset:0; z-index:-1; background-image:var(--backdrop); background-size:cover; background-position:20% center; background-repeat:no-repeat; filter:none; }
.stage::after { content:none; }
.scene[data-rarity="rare-1"] .stage::before { filter:grayscale(1); }
.logo-foreground,.logo-hat-glow { inset:auto; left:-26.5%; top:-6%; width:153%; height:112%; }

/* Class selection follows the same full-screen game-menu layout. */
[hidden] { display:none !important; }
.class-nav { position:relative; z-index:2; width:100%; height:100%; display:flex; align-items:center; gap:20px; padding:0 clamp(20px,4vw,80px); color:#fff; }
#classLabel { font-size:clamp(14px,1.6vw,22px); font-weight:900; letter-spacing:.025em; }
.class-back { appearance:none; color:#fff; background:#0b374c55; border:1px solid #ffffff60; border-radius:3px; padding:9px 16px; font:700 15px 'Rubik',sans-serif; cursor:pointer; }
.class-back:hover,.class-back:focus-visible { background:#ffffff22; outline:2px solid #e1ff2b; outline-offset:3px; }
.scene[data-view="classes"] { background:linear-gradient(145deg,#299f92,#166477); }
.class-menu { position:relative; flex:1; min-height:0; display:flex; flex-direction:column; justify-content:center; padding:clamp(20px,4vh,54px) clamp(24px,5vw,110px); background:radial-gradient(ellipse at 15% 20%,#74d6ae30,transparent 70%); }
.class-menu::before { content:""; position:absolute; inset:0; pointer-events:none; opacity:.055; background:conic-gradient(from 45deg,#fff 0 90deg,transparent 90deg 180deg,#000 180deg 270deg,transparent 270deg); background-size:180px 180px; }
.class-menu-heading { position:relative; margin-bottom:22px; color:#fff; width:100%; max-width:1280px; margin-inline:auto; }
.menu-tab { display:inline-block; background:#080d10; color:#fff; font:900 clamp(16px,1.5vw,23px) 'Rubik',sans-serif; padding:10px 20px; letter-spacing:.02em; }
.class-menu-heading h1 { margin:14px 0 0; font:900 clamp(22px,2.5vw,40px) 'Rubik',sans-serif; letter-spacing:-.04em; }
.class-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; position:relative; width:100%; max-width:1280px; margin-inline:auto; }
.class-tile { position:relative; appearance:none; display:block; width:100%; aspect-ratio:1.55; max-height:48vh; border:2px solid #ffffff40; border-radius:3px; padding:0; text-align:left; color:#fff; cursor:pointer; isolation:isolate; transition:transform .16s ease,outline-color .16s ease; background:linear-gradient(160deg,#02b9f7 10%,#0087d3 60%,#085889); box-shadow:0 5px 15px #00324544; }
.tile-sports { background:linear-gradient(155deg,#f546c7 5%,#c020bd 60%,#722489); }
.class-tile::after { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(transparent 40%,#001b4233); }
.class-tile:hover,.class-tile:focus-visible { transform:scale(1.018); outline:3px solid #deff00; outline-offset:4px; z-index:3; }
.tile-art { position:absolute; inset:4% 3% 30%; overflow:hidden; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:3%; align-items:center; }
.tile-stripes { position:absolute; inset:0; background:linear-gradient(168deg,transparent 43%,#ffffffdc 43% 46%,transparent 46% 52%,#ffffffb8 52% 55%,transparent 55%); }
.tile-sports .tile-stripes { background:linear-gradient(147deg,transparent 34%,#ffffffdb 34% 37%,transparent 37% 43%,#ffffffb8 43% 46%,transparent 46%); }
.tile-car { position:relative; width:100%; height:100%; min-width:0; object-fit:contain; filter:drop-shadow(0 9px 5px #00163455); pointer-events:none; }
.tile-car-back { grid-column:2; grid-row:1; transform:translateY(-7%); }
.tile-car-front { grid-column:1; grid-row:1; transform:translateY(7%); }
.tile-copy { position:absolute; left:6%; bottom:7%; display:flex; flex-direction:column; gap:4px; z-index:2; }
.tile-title { font:900 clamp(28px,3.4vw,56px)/1 'Rubik',sans-serif; letter-spacing:-.06em; text-shadow:0 2px 1px #173c6320; }
.tile-count { font:700 clamp(15px,1.7vw,23px)/1.2 'Amsi Pro AKS Condensed',sans-serif; color:#edff54; }
.tile-arrow { position:absolute; bottom:8%; right:6%; font:700 clamp(26px,3vw,44px)/1 sans-serif; opacity:.8; }
@media(max-aspect-ratio:1/1) {
    .class-menu { padding:20px; justify-content:center; }
    .class-menu-heading { margin-bottom:18px; }
    .class-grid { grid-template-columns:1fr; gap:16px; }
    .class-tile { aspect-ratio:1.65; max-height:31vh; }
    .tile-art { bottom:35%; }
    .tile-title { font-size:clamp(28px,8vw,42px); }
    .tile-count { font-size:18px; }
    .class-nav { gap:12px; padding:0 18px; }
    .scene[data-view="wheelspin"] .band-top { height:50px; }
    .scene[data-view="classes"] .band-top { height:48px; }
    .class-back { font-size:12px; padding:6px 10px; }
}
@media(min-aspect-ratio:1/1) and (max-height:520px) {
    .scene[data-view="wheelspin"] .band-top { height:36px; }
    .scene[data-view="classes"] .band-top { height:36px; }
    .class-menu { padding:12px 28px; }
    .class-menu-heading { margin-bottom:12px; }
    .class-menu-heading h1 { display:none; }
    .menu-tab { padding:6px 12px; font-size:14px; }
    .class-tile { max-height:62vh; }
    .class-back { padding:4px 10px; font-size:12px; }
}
@media(prefers-reduced-motion:reduce) { .class-tile {transition:none;} }

/* Four classes: two rows on desktop and a scrollable list on phones. */
.class-menu { padding-top:clamp(16px,3vh,36px); padding-bottom:clamp(16px,3vh,36px); }
.class-menu-heading { display:flex; align-items:center; gap:20px; margin-bottom:18px; }
.class-menu-heading h1 { margin:0; font-size:clamp(22px,2.1vw,34px); }
.class-grid { flex:1; min-height:0; max-height:650px; grid-template-rows:repeat(2,minmax(0,1fr)); }
.class-tile { aspect-ratio:auto; height:100%; max-height:none; min-height:0; }
.tile-art { bottom:38%; }
.tile-title { font-size:clamp(24px,2.8vw,36px); }
.tile-count { font-size:clamp(15px,1.4vw,19px); }
.tile-classics { background:linear-gradient(155deg,#ffb22b,#f07512 60%,#ad3e17); }
.tile-muscle { background:linear-gradient(155deg,#2cd782,#10a45a 60%,#086252); }
.tile-classics .tile-stripes { background:linear-gradient(160deg,transparent 39%,#ffffffdd 39% 42%,transparent 42% 50%,#ffffffbb 50% 53%,transparent 53%); }
.tile-muscle .tile-stripes { background:linear-gradient(175deg,transparent 38%,#ffffffdd 38% 41%,transparent 41% 49%,#ffffffbb 49% 52%,transparent 52%); }
@media(max-aspect-ratio:1/1) {
    .class-menu { display:block; overflow-y:auto; overscroll-behavior:contain; padding:22px 20px 30px; }
    .class-menu-heading { display:block; }
    .class-menu-heading h1 { margin-top:12px; }
    .class-grid { grid-template-rows:none; grid-auto-rows:clamp(185px,25vh,225px); max-height:none; }
    .tile-title { font-size:30px; }
    .tile-count { font-size:18px; }
}
@media(min-aspect-ratio:1/1) and (max-height:520px) {
    .class-menu { padding-top:10px; padding-bottom:10px; }
    .class-menu-heading { margin-bottom:10px; }
    .class-grid { gap:10px; }
    .tile-title { font-size:22px; }
    .tile-copy { flex-direction:row; gap:10px; align-items:baseline; }
    .tile-arrow { font-size:22px; }
    .tile-art { bottom:29%; }
}

