/* ═══════════ HW Mystery Garage — две темы: Hot Wheels (glass-glam) и Hermès Luxe ═══════════ */

/* ── ТЕМА HOT WHEELS (по умолчанию) ── */
:root, [data-theme="hw"] {
  --bg: #0a0a13;
  --panel: #16161f;
  --panel2: #1c1c28;
  --panel-a: rgba(31, 31, 46, 0.64);   /* стеклянная карточка */
  --panel-b: rgba(18, 18, 27, 0.72);
  --text: #f6f7fa;
  --muted: #98a0b0;
  --line: rgba(255, 255, 255, 0.07);
  --accent: #ff6b00;
  --accent2: #e8261d;
  --accent-deep: #8f1310;
  --gold: #f6c453;
  --gold-deep: #c9952c;
  --green: #2ee06f;
  --danger: #ff5a5a;
  --radius: 18px;
  --font-display: 'Russo One', 'Rubik', system-ui, sans-serif;
  --font-main: 'Rubik', system-ui, -apple-system, sans-serif;
  --btn-skew: -8deg;
  --bg-image:
    radial-gradient(130% 55% at 50% -8%, rgba(232, 38, 29, 0.16), transparent 62%),
    radial-gradient(90% 40% at 50% 108%, rgba(59, 139, 255, 0.07), transparent 70%),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.011) 0 14px, transparent 14px 28px);
}

/* ── ТЕМА LUXE STYLE (светлая, тихая роскошь; без кричащего оранжевого) ── */
[data-theme="luxe"] {
  --bg: #e7ddca;                          /* тёплый бежевый «песок» */
  --panel: #fbf7ee;
  --panel2: #fffdf8;
  --panel-a: rgba(255, 253, 247, 0.78);   /* плотнее стекло → текст читается */
  --panel-b: rgba(248, 243, 233, 0.7);
  --text: #1f1b14;
  --muted: #6b6051;                       /* темнее → нормальный контраст */
  --line: rgba(60, 45, 25, 0.16);
  --accent: #7a6748;        /* приглушённая бронза вместо оранжа */
  --accent2: #5a4a33;
  --accent-deep: #3d3322;
  --gold: #9a7829;          /* глубокое золото — читается и как текст */
  --gold-deep: #6e5419;
  --green: #2f6e49;
  --danger: #a23f33;
  --radius: 12px;
  --font-display: 'Cormorant Garamond', Georgia, serif;            /* сериф — ТОЛЬКО крупные заголовки */
  --font-main: 'Rubik', system-ui, -apple-system, sans-serif;      /* весь функц. текст — читаемый санс */
  --btn-skew: 0deg;
  --bg-image:
    radial-gradient(135% 78% at 50% -12%, rgba(184, 151, 63, 0.16), transparent 58%),
    radial-gradient(80% 55% at 50% 118%, rgba(110, 90, 58, 0.10), transparent 62%),
    linear-gradient(180deg, #efe7d6 0%, #e7ddca 52%, #ddd0b6 100%),
    repeating-linear-gradient(0deg, rgba(60, 45, 25, 0.018) 0 1px, transparent 1px 30px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; }

body {
  background-color: var(--bg);
  background-image: var(--bg-image);
  color: var(--text);
  font-family: var(--font-main);
  overscroll-behavior: none;
}

.app { max-width: 520px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; position: relative; z-index: 1; }
main { flex: 1; padding: 0 14px calc(96px + env(safe-area-inset-bottom)); }

/* ─────────── шапка ─────────── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.logo-flame { font-size: 26px; filter: drop-shadow(0 0 10px rgba(255, 107, 0, 0.8)); animation: flameBreath 2.8s ease-in-out infinite; }
@keyframes flameBreath { 50% { filter: drop-shadow(0 0 16px rgba(255, 107, 0, 1)); transform: scale(1.06); } }
.logo-text {
  font-family: var(--font-display); font-size: 16px; line-height: 1;
  text-transform: uppercase; letter-spacing: 1px; transform: skewX(-6deg);
  background: linear-gradient(180deg, #fff3d6 5%, var(--gold) 40%, var(--accent) 75%, var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.45));
}
[data-theme="luxe"] .logo-text { transform: none; letter-spacing: 3px; font-weight: 700;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; filter: none; }
[data-theme="luxe"] .logo-flame { filter: none; }

.top-actions { display: flex; align-items: center; gap: 7px; }
.icon-btn {
  position: relative; overflow: hidden;
  font-size: 17px; background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border-radius: 12px; width: 40px; height: 40px; cursor: pointer; color: var(--text);
}
.balance-chip {
  display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 6px 0 12px;
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 0 14px rgba(246, 196, 83, 0.1);
  border-radius: 12px; color: var(--text); font-weight: 800; font-size: 15px; cursor: pointer;
}
.balance-chip .plus {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); font-weight: 900; color: #fff;
}

/* ─────────── кнопки ─────────── */
.btn {
  display: inline-block; border: none; cursor: pointer; font-family: var(--font-main);
  font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: 0.4px;
  font-size: 14px; border-radius: 11px; transform: skewX(var(--btn-skew));
  transition: transform 0.12s, filter 0.12s, box-shadow 0.12s;
}
.btn > span { display: inline-block; transform: skewX(calc(-1 * var(--btn-skew))); }
.btn:active { transform: skewX(var(--btn-skew)) scale(0.96); }
.btn.race {
  padding: 13px 20px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff 12%) 0%, var(--accent2) 55%, var(--accent-deep) 100%);
  border: 1px solid color-mix(in srgb, var(--gold) 90%, #fff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -8px 14px rgba(120, 8, 4, 0.4), 0 5px 0 var(--accent-deep), 0 12px 26px rgba(232, 38, 29, 0.4);
}
.btn.race:active { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 0 var(--accent-deep); }
.btn.ghost {
  padding: 12px 18px; color: var(--text);
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.btn.wide { width: 100%; }
.btn.small { padding: 8px 12px; font-size: 12px; }
[data-theme="luxe"] .btn { font-style: normal; font-weight: 700; letter-spacing: 1.5px; border-radius: 6px; }
[data-theme="luxe"] .btn.race { box-shadow: 0 2px 8px rgba(216, 84, 11, 0.3); border: 1px solid var(--accent-deep); }
.link-btn { background: none; border: none; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 12px; }

/* ─────────── hero ─────────── */
.hero { position: relative; text-align: center; padding: 18px 10px 6px; }
.checker-strip {
  height: 8px; margin: 0 -14px 18px;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.85) 0 90deg, transparent 90deg 180deg) 0 0 / 16px 16px;
  opacity: 0.32;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 25% 75%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 25% 75%, transparent);
}
[data-theme="luxe"] .checker-strip { background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0.5; height: 2px; }
.hero h1 {
  font-family: var(--font-display); font-size: 33px; letter-spacing: 2px; transform: skewX(-6deg);
  background: linear-gradient(180deg, #fff 15%, var(--gold) 42%, var(--accent) 72%, var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.55)) drop-shadow(0 0 22px rgba(255, 140, 30, 0.4));
}
[data-theme="luxe"] .hero h1 { transform: none; letter-spacing: 4px; font-weight: 700; filter: none;
  background: linear-gradient(180deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; }
.hero p { color: var(--muted); font-size: 13.5px; margin-top: 8px; }
[data-theme="luxe"] .hero p { font-size: 16px; }

/* ─────────── карточки кейсов ─────────── */
.cases-grid { display: grid; gap: 14px; margin-top: 14px; }
.case-card {
  position: relative; display: flex; gap: 14px;
  background: radial-gradient(120% 100% at 0% 0%, rgba(255, 255, 255, 0.05), transparent 50%), linear-gradient(165deg, var(--panel-a), var(--panel-b));
  border: 1px solid var(--line); border-left: 4px solid var(--case-color);
  border-radius: var(--radius); padding: 14px; cursor: pointer; overflow: hidden;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.case-card:active { transform: scale(0.98); }
.case-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.09) 48%, transparent 62%);
  transform: translateX(-130%); pointer-events: none;
}
.case-card:active::after { transition: transform 0.6s; transform: translateX(130%); }
.case-card[data-case="bomboclat"]::after, .case-card[data-case="mystery"]::after { animation: shineSweep 5.5s ease-in-out 2s infinite; }
@keyframes shineSweep { 0% { transform: translateX(-130%); } 28%, 100% { transform: translateX(130%); } }
.case-art { position: relative; flex: 0 0 86px; height: 86px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--case-color) 32%, transparent), transparent 72%); border-radius: 14px; }
.case-emoji { font-size: 52px; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45)); }
.case-q { position: absolute; top: 4px; right: 8px; font-family: var(--font-display); font-size: 21px; color: var(--gold);
  text-shadow: 0 0 12px rgba(246, 196, 83, 0.85); animation: qPulse 1.6s ease-in-out infinite; }
@keyframes qPulse { 50% { transform: scale(1.25) rotate(8deg); } }
.case-art.big { flex: none; width: 120px; height: 110px; margin: 0 auto; }
.case-art.big .case-emoji { font-size: 72px; }
.case-info { flex: 1; min-width: 0; }
.case-info h3 { font-size: 17px; font-weight: 800; font-style: italic; letter-spacing: 0.2px; }
[data-theme="luxe"] .case-info h3 { font-style: normal; font-weight: 700; }
.case-tagline { color: var(--muted); font-size: 12px; margin: 4px 0 8px; }
.case-top { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.mini-drop { font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; color: var(--rc);
  border: 1px solid var(--rc); background: color-mix(in srgb, var(--rc) 12%, transparent); white-space: nowrap; }
.demo-note { text-align: center; color: var(--muted); font-size: 11.5px; margin: 22px 0 8px; }

/* ─────────── экран кейса ─────────── */
.back-btn { margin: 10px 0 4px; background: none; border: none; color: var(--muted); font-size: 14px; font-weight: 700; cursor: pointer; padding: 8px 4px; }
.case-hero {
  position: relative; text-align: center;
  background: radial-gradient(140% 90% at 50% -20%, color-mix(in srgb, var(--case-color) 14%, transparent), transparent 60%), linear-gradient(165deg, var(--panel-a), var(--panel-b));
  border: 1px solid var(--line); border-top: 4px solid var(--case-color); border-radius: 20px; padding: 18px 14px; overflow: hidden;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.case-hero h2 { font-family: var(--font-display); font-size: 23px; letter-spacing: 1px; margin-top: 8px; transform: skewX(-4deg); }
[data-theme="luxe"] .case-hero h2 { transform: none; letter-spacing: 2px; }
.case-hero .case-tagline { margin-bottom: 4px; }
.preview-hint { color: var(--gold); font-size: 12px; font-weight: 700; margin: 8px 0 2px; }
.big-open { font-size: 16px; padding: 15px 26px; margin-top: 4px; animation: btnGlow 2.2s ease-in-out infinite; }
@keyframes btnGlow { 50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -8px 14px rgba(120, 8, 4, 0.4), 0 5px 0 var(--accent-deep), 0 12px 34px rgba(255, 122, 26, 0.66); } }
.drops-title { margin: 20px 2px 10px; font-size: 15px; font-weight: 800; font-style: italic; }
.drops-ticket-note { color: var(--muted); font-size: 12px; font-weight: 600; font-style: normal; }
.drops-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.drop-card {
  background: radial-gradient(110% 80% at 50% 0%, rgba(255, 255, 255, 0.03), transparent 55%), linear-gradient(175deg, var(--panel-a), var(--panel-b));
  border: 1px solid var(--line); border-bottom: 3px solid var(--rc); border-radius: 14px; padding: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.drop-card.r-th, .drop-card.r-sth, .drop-card.r-rlc, .drop-card.r-mystery {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 18px color-mix(in srgb, var(--rc) 22%, transparent);
}
.drop-car { padding: 2px 6px; }
.drop-name { font-size: 12px; font-weight: 700; margin: 6px 0; min-height: 2.4em; }
.drop-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.drop-chance { font-size: 12px; font-weight: 800; color: var(--gold); }
.rarity-badge { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.3px; padding: 3px 7px; border-radius: 999px;
  color: var(--rc); background: color-mix(in srgb, var(--rc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--rc) 55%, transparent); white-space: nowrap; }

/* ─────────── SVG машинок / фигурка ─────────── */
.car-svg { width: 100%; height: auto; display: block; }
/* стикер машинки (вырезанное фото) — контурное свечение + тень, как на наклейке */
.car-sticker { display: block; margin: 0 auto; max-width: 100%; height: auto; object-fit: contain;
  filter: drop-shadow(0 0 1px rgba(255,255,255,.92)) drop-shadow(0 1px 2px rgba(255,255,255,.5)) drop-shadow(0 4px 6px rgba(0,0,0,.5)); }
.cell .car-sticker, .drop-car .car-sticker, .stock-car .car-sticker, .lot-car .car-sticker,
.gallery-art .car-sticker, .sell-pick .car-sticker { height: 62px; width: auto; max-width: 100%; }
.cat-thumb .car-sticker { height: 92px; width: auto; max-width: 100%; padding: 4px; box-sizing: border-box; }
.ex-thumb.car-sticker { width: auto; height: 48px; }
.card-hero-svg .car-sticker { max-height: 150px; }
.reveal-car .car-sticker, .car-sticker.reveal-size { max-height: 190px; width: auto;
  filter: drop-shadow(0 0 2px rgba(255,255,255,.95)) drop-shadow(0 0 5px rgba(255,255,255,.5)) drop-shadow(0 8px 14px rgba(0,0,0,.55)); }
.car-svg .sparkles polygon { animation: sparkle 1.4s ease-in-out infinite; }
.car-svg .sparkles polygon:nth-child(2) { animation-delay: 0.45s; }
.car-svg .sparkles polygon:nth-child(3) { animation-delay: 0.9s; }
@keyframes sparkle { 0%, 100% { opacity: 0.15; } 50% { opacity: 1; } }

/* ─────────── нижняя навигация (4 вкладки) ─────────── */
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 520px;
  display: flex; gap: 6px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  border-top: 1px solid var(--line); z-index: 30;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-behavior: smooth;
}
.bottom-nav::-webkit-scrollbar { display: none; }
.nav-btn {
  flex: 1; padding: 11px 4px; font-family: var(--font-main); font-weight: 800; font-size: 12px; color: var(--muted);
  background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 13px; cursor: pointer;
  transition: color 0.15s, box-shadow 0.2s; white-space: nowrap;
}
.nav-btn.active {
  color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  background: linear-gradient(180deg, var(--accent), var(--accent2)); border-color: color-mix(in srgb, var(--gold) 80%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 18px rgba(232, 38, 29, 0.35);
}
[data-theme="luxe"] .nav-btn.active { color: #fff; }
.nav-btn .count { display: inline-block; min-width: 17px; padding: 1px 4px; border-radius: 999px; background: var(--gold); color: #5c3a00; font-size: 10px; font-weight: 900; }
/* 6 пунктов: не сжимать в кашу — целые подписи; узкий экран → бар прокручивается, широкий → заполняет */
.nav-btn { flex: 1 0 auto; }

/* ─────────── экраны ─────────── */
.screen { display: none; }
.screen.active { display: block; animation: screenIn 0.24s ease; }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } }
.section-title { font-size: 18px; font-weight: 900; font-style: italic; margin: 16px 2px 12px; }
[data-theme="luxe"] .section-title { font-style: normal; font-weight: 700; letter-spacing: 1px; }

/* ─────────── склад ─────────── */
#stock-actions { margin-bottom: 12px; }
.stock-item {
  display: flex; align-items: center; gap: 10px; background: linear-gradient(175deg, var(--panel-a), var(--panel-b));
  border: 1px solid var(--line); border-left: 4px solid var(--rc); border-radius: 14px; padding: 10px; margin-bottom: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.stock-item.r-sth, .stock-item.r-rlc, .stock-item.r-mystery { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 16px color-mix(in srgb, var(--rc) 18%, transparent); }
.stock-car { flex: 0 0 84px; }
.stock-info { flex: 1; min-width: 0; }
.stock-name { font-size: 13px; font-weight: 700; }
.stock-meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; flex-wrap: wrap; }
.stock-date { color: var(--muted); font-size: 11px; }
.stock-value { font-size: 11px; color: var(--gold); font-weight: 700; }
.stock-total { font-weight: 800; font-size: 13px; color: var(--gold); margin: 0 2px 10px; }
.stock-action { flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; }
.status-badge { font-size: 10.5px; font-weight: 800; color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--green) 40%, transparent); padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.empty { text-align: center; padding: 44px 16px; color: var(--muted); }
.empty-emoji { font-size: 54px; margin-bottom: 10px; }
.empty p { margin-bottom: 18px; }
.order-card { background: linear-gradient(175deg, var(--panel-a), var(--panel-b)); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; font-size: 13px; }
.order-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.order-items { font-size: 12.5px; }
.order-addr { color: var(--muted); font-size: 11.5px; margin-top: 5px; }

/* ─────────── витрина моделей ─────────── */
.gallery-intro { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin: 0 2px 14px; }
#catalog-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.cat-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
.cat-card {
  min-width: 0;
  background: linear-gradient(170deg, var(--panel-a), var(--panel-b)); border: 1px solid var(--line);
  border-bottom: 3px solid var(--rc); border-radius: 16px; padding: 10px; cursor: pointer; transition: transform 0.15s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.cat-card .car-svg { max-width: 100%; }
.cat-card:active { transform: scale(0.97); }
.cat-thumb { position: relative; border-radius: 10px; overflow: hidden; background: rgba(0,0,0,0.18); }
.cat-thumb img { width: 100%; height: 92px; object-fit: cover; display: block; }
.cat-name { font-size: 12.5px; font-weight: 700; margin: 8px 0 5px; }
.cat-meta { display: flex; align-items: center; justify-content: space-between; gap: 4px 6px; flex-wrap: wrap; }
.cat-value { font-size: 11.5px; font-weight: 800; color: var(--gold); }
.owner-pill { position: absolute; top: 6px; right: 6px; font-size: 9px; font-weight: 800; background: rgba(0,0,0,0.55); color: #fff; padding: 2px 6px; border-radius: 6px; }

/* карточка модели (модалка) */
.card-photo { width: 100%; height: 180px; object-fit: cover; border-radius: 14px; margin-bottom: 12px; display: block; }
.card-photo-none { display: grid; place-items: center; }
.card-hero-svg { max-width: 280px; margin: 0 auto 6px; }
.card-title { font-size: 19px; font-weight: 800; }
.card-sub { color: var(--muted); font-size: 12.5px; margin-bottom: 8px; }
.card-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.card-section-title { font-size: 13px; font-weight: 800; margin: 14px 0 6px; color: var(--gold); }
.card-desc { color: var(--text); font-size: 13.5px; line-height: 1.5; }
.card-figure-box { display: flex; align-items: center; gap: 12px; background: rgba(0,0,0,0.18); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.card-figure-svg { flex: 0 0 96px; }
.card-figure-note { font-size: 11.5px; color: var(--muted); }
.owner-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.card-desc-edit { width: 100%; min-height: 70px; padding: 10px; border-radius: 10px; background: var(--panel); color: var(--text); border: 1.5px solid var(--line); font-family: var(--font-main); font-size: 13px; resize: vertical; }

/* ─────────── аукцион ─────────── */
.auc-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.auc-tab { flex: 1; padding: 10px 6px; font-family: var(--font-main); font-weight: 800; font-size: 12.5px; color: var(--muted);
  background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.auc-tab.active { color: var(--text); border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 20%, var(--panel2)), var(--panel)); }
.lot-card { display: flex; gap: 10px; align-items: center; background: linear-gradient(175deg, var(--panel-a), var(--panel-b)); border: 1px solid var(--line);
  border-left: 4px solid var(--rc); border-radius: 14px; padding: 10px; margin-bottom: 10px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.04); }
.lot-car { flex: 0 0 78px; }
.lot-info { flex: 1; min-width: 0; }
.lot-name { font-size: 12.5px; font-weight: 700; }
.lot-tag { font-size: 9.5px; font-weight: 800; text-transform: uppercase; padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); margin-right: 4px; }
.lot-price { font-size: 14px; font-weight: 900; color: var(--gold); margin-top: 4px; }
.lot-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.lot-timer { font-size: 11px; font-weight: 800; color: var(--danger); }
.lot-actions { flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; }
.sell-form label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.sell-form input, .sell-form select { display: block; width: 100%; margin-top: 5px; padding: 11px 12px; font-size: 15px; font-family: var(--font-main);
  color: var(--text); background: var(--panel); border: 1.5px solid var(--line); border-radius: 11px; outline: none; }
.sell-cars { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.sell-cars::-webkit-scrollbar { display: none; }
.sell-pick { flex-shrink: 0; width: 96px; padding: 8px; border-radius: 12px; cursor: pointer; text-align: center;
  background: var(--panel); border: 2px solid var(--line); }
.sell-pick.active { border-color: var(--accent); box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 35%, transparent); }
.sell-pick .sp-name { font-size: 10px; font-weight: 700; margin-top: 4px; }
.commission-note { color: var(--gold); font-weight: 700; font-size: 12.5px; margin: 4px 0 12px; }

/* ─────────── оверлеи ─────────── */
.overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--bg) 92%, #000); padding: 18px; }
[data-theme="luxe"] .overlay { background: rgba(243, 236, 224, 0.92); }
.overlay[hidden] { display: none; }

/* ─────────── рулетка ─────────── */
#spin-overlay { background: radial-gradient(95% 50% at 50% 42%, rgba(232, 38, 29, 0.14), transparent 65%), color-mix(in srgb, var(--bg) 96%, #000); }
.spin-box { width: 100%; max-width: 520px; text-align: center; }
.spin-title { font-family: var(--font-display); font-size: 22px; letter-spacing: 1.5px; margin-bottom: 20px; transform: skewX(-6deg);
  background: linear-gradient(180deg, #fff 20%, var(--gold) 55%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(246, 196, 83, 0.45)); }
[data-theme="luxe"] .spin-title { transform: none; }
.spin-hint { margin-top: 18px; color: var(--muted); font-size: 13px; letter-spacing: 0.5px; }
.spin-window {
  position: relative; overflow: hidden; height: 152px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 2px, transparent 2px 56px), linear-gradient(180deg, #101018, #181822 50%, #101018);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 38px rgba(246, 196, 83, 0.08);
  transition: box-shadow 0.4s, border-color 0.4s;
}
.spin-window::before { content: ''; position: absolute; inset: 0; z-index: 20; pointer-events: none;
  background: linear-gradient(90deg, rgba(6, 6, 12, 0.96) 0%, transparent 16%, transparent 84%, rgba(6, 6, 12, 0.96) 100%); }
.spin-window::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(38% 90% at 50% 50%, rgba(246, 196, 83, 0.1), transparent 70%); }
/* ЗОЛОТОЙ СПИН: тизер редкого дропа — лента наливается золотом */
.spin-window.gold-spin { border-color: var(--gold); box-shadow: inset 0 0 60px rgba(246, 196, 83, 0.22), 0 0 0 1px rgba(0,0,0,0.6), 0 0 60px rgba(246, 196, 83, 0.4); animation: goldBreath 1.1s ease-in-out infinite; }
.spin-window.gold-spin::after { background: radial-gradient(46% 100% at 50% 50%, rgba(246, 196, 83, 0.3), transparent 72%); }
@keyframes goldBreath { 50% { box-shadow: inset 0 0 80px rgba(246, 196, 83, 0.34), 0 0 0 1px rgba(0,0,0,0.6), 0 0 80px rgba(246, 196, 83, 0.6); } }
.spin-window.gold-spin .spin-strip { filter: drop-shadow(0 0 8px rgba(246, 196, 83, 0.35)); }
.spin-strip { display: flex; align-items: center; height: 100%; will-change: transform; }
.cell { position: relative; flex: 0 0 104px; width: 104px; margin: 0 4px; padding: 8px 6px 12px;
  background: radial-gradient(110% 70% at 50% 0%, rgba(255, 255, 255, 0.035), transparent 55%), linear-gradient(180deg, #20202c, #171721);
  border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); will-change: transform, filter; transform-origin: center; }
.cell-bar { position: absolute; left: 8px; right: 8px; bottom: 5px; height: 4px; border-radius: 2px; background: var(--rc); box-shadow: 0 0 8px color-mix(in srgb, var(--rc) 70%, transparent); }
.spin-window.settled .cell:not(.winner) { opacity: 0.22; filter: brightness(0.45) saturate(0.5) !important; transition: opacity 0.45s ease, filter 0.45s ease; }
.cell.winner { border-color: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--rc) 80%, transparent), 0 0 34px color-mix(in srgb, var(--rc) 65%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  animation: winnerLand 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) forwards; z-index: 25 !important; }
@keyframes winnerLand { 0% { transform: translateY(-5px) scale(1.14); } 45% { transform: translateY(-9px) scale(1.26); } 100% { transform: translateY(-7px) scale(1.2); } }
.win-burst { position: absolute; inset: -42%; z-index: -1; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--rc) 38%, transparent) 0%, transparent 58%), repeating-conic-gradient(color-mix(in srgb, var(--rc) 22%, transparent) 0 8deg, transparent 8deg 26deg);
  border-radius: 50%; animation: burstIn 0.9s ease-out forwards; }
@keyframes burstIn { 0% { opacity: 0; transform: scale(0.3) rotate(-30deg); } 35% { opacity: 1; } 100% { opacity: 0.85; transform: scale(1.1) rotate(14deg); } }
.spin-marker { position: absolute; inset: 0; z-index: 30; pointer-events: none;
  background: linear-gradient(180deg, var(--gold) 0%, rgba(246, 196, 83, 0.55) 35%, rgba(246, 196, 83, 0.55) 65%, var(--gold) 100%) 50% 0 / 2px 100% no-repeat;
  filter: drop-shadow(0 0 6px rgba(246, 196, 83, 0.9)); }
.spin-marker::before, .spin-marker::after { content: ''; position: absolute; left: 50%; width: 12px; height: 12px; transform: translateX(-50%) rotate(45deg);
  background: linear-gradient(135deg, #fff3d6, var(--gold) 55%, var(--gold-deep)); box-shadow: 0 0 10px rgba(246, 196, 83, 0.95); }
.spin-marker::before { top: -6px; } .spin-marker::after { bottom: -6px; }
.spin-window.land-rare { animation: landShake 0.45s linear; }
@keyframes landShake { 10% { transform: translate(-3px, 2px); } 25% { transform: translate(3px, -2px); } 40% { transform: translate(-2px, -1px); } 55% { transform: translate(2px, 1px); } 70% { transform: translate(-1px, 1px); } 85% { transform: translate(1px, 0); } }

/* ─────────── показ выигрыша ─────────── */
#reveal-overlay { z-index: 70; perspective: 1000px; }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.on { animation: flashAnim 0.55s ease-out; }
@keyframes flashAnim { 0% { opacity: 0.95; } 100% { opacity: 0; } }
.reveal-card { position: relative; width: min(92vw, 380px); border-radius: 24px; border: 2px solid var(--rc);
  background: linear-gradient(170deg, var(--panel2), color-mix(in srgb, var(--panel) 70%, #000)); box-shadow: 0 0 40px rgba(0, 0, 0, 0.5); overflow: hidden;
  animation: cardIn 0.65s cubic-bezier(0.16, 1.3, 0.3, 1); }
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .reveal-card { background: radial-gradient(100% 80% at 50% 0%, color-mix(in srgb, var(--rc) 17%, transparent), transparent 65%), linear-gradient(170deg, var(--panel2), color-mix(in srgb, var(--panel) 70%, #000));
    box-shadow: 0 0 46px color-mix(in srgb, var(--rc) 34%, transparent), 0 24px 60px rgba(0, 0, 0, 0.5); }
}
@keyframes cardIn { 0% { transform: rotateY(58deg) scale(0.62) translateY(36px); opacity: 0; } 100% { transform: rotateY(0) scale(1) translateY(0); opacity: 1; } }
.reveal-card::after { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.16) 47%, transparent 62%); transform: translateX(-130%); animation: shineSweep 1.5s ease-out 0.45s forwards; }
.reveal-inner { position: relative; z-index: 1; padding: 22px 18px; text-align: center; }
.reveal-rays { position: absolute; inset: -45%; background: repeating-conic-gradient(color-mix(in srgb, var(--rc) 18%, transparent) 0 9deg, transparent 9deg 24deg);
  animation: raysSpin 9s linear infinite; -webkit-mask-image: radial-gradient(circle at 50% 42%, #000 0 45%, transparent 72%); mask-image: radial-gradient(circle at 50% 42%, #000 0 45%, transparent 72%); }
@keyframes raysSpin { to { transform: rotate(360deg); } }
.reveal-banner { font-family: var(--font-display); font-size: 24px; letter-spacing: 1px; transform: skewX(-6deg); color: var(--rc);
  text-shadow: 0 0 18px color-mix(in srgb, var(--rc) 70%, transparent); animation: bannerPunch 0.6s cubic-bezier(0.2, 1.8, 0.4, 1) 0.15s backwards; }
[data-theme="luxe"] .reveal-banner { transform: none; }
@keyframes bannerPunch { from { transform: skewX(-6deg) scale(0.3); opacity: 0; } }
.reveal-card.r-sth .reveal-banner { font-size: 26px; background: linear-gradient(180deg, #fff, var(--gold) 50%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.reveal-card.r-mystery .reveal-banner { background: linear-gradient(90deg, #ff5af1, var(--gold), #ff5af1); -webkit-background-clip: text; background-clip: text; color: transparent; }
.reveal-card.r-rlc .reveal-banner { letter-spacing: 2px; }
.reveal-card.r-mystery .reveal-rays { animation: raysSpin 7s linear infinite, hueShift 4s linear infinite; }
@keyframes hueShift { to { filter: hue-rotate(360deg); } }
.reveal-car { margin: 10px auto 4px; max-width: 270px; animation: carFloat 2.6s ease-in-out infinite; }
@keyframes carFloat { 50% { transform: translateY(-7px); } }
.reveal-name { font-size: 17px; font-weight: 800; margin: 6px 0 8px; }
.reveal-value { color: var(--gold); font-weight: 800; font-size: 14px; margin-top: 6px; }
.reveal-chance { color: var(--muted); font-size: 12px; margin-top: 8px; }
.reveal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }

/* ─────────── модалки ─────────── */
#ship-overlay, #topup-overlay, #owner-overlay, #settings-overlay, #card-overlay, #admin-overlay, #trade-overlay { z-index: 80; align-items: flex-end; }
#pay-overlay { z-index: 85; align-items: flex-end; }  /* выше магазина: магазин остаётся открыт под оплатой */
@media (min-width: 480px) { #ship-overlay, #topup-overlay, #owner-overlay, #settings-overlay, #card-overlay, #admin-overlay, #trade-overlay, #pay-overlay { align-items: center; } }
.modal { position: relative; width: 100%; max-width: 440px; max-height: 88vh; overflow-y: auto;
  background: linear-gradient(175deg, color-mix(in srgb, var(--panel2) 92%, transparent), color-mix(in srgb, var(--panel) 93%, transparent));
  -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3);
  border: 1px solid color-mix(in srgb, var(--text) 12%, transparent); border-radius: 20px; padding: 20px 18px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06); animation: modalIn 0.25s ease; }
@keyframes modalIn { from { transform: translateY(30px); opacity: 0; } }
.modal h3 { font-size: 18px; font-style: italic; margin-bottom: 12px; padding-right: 30px; }
[data-theme="luxe"] .modal h3 { font-style: normal; font-weight: 700; letter-spacing: 1px; }
.modal-text { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin-bottom: 16px; }
.modal-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 10px; border: none;
  background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--muted); font-size: 14px; cursor: pointer; z-index: 2; }
.ship-items { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ship-chip { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; color: var(--rc); border: 1px solid var(--rc); background: color-mix(in srgb, var(--rc) 12%, transparent); }
#ship-form label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 12px; }
#ship-form input { display: block; width: 100%; margin-top: 5px; padding: 12px 13px; font-size: 15px; font-family: var(--font-main); color: var(--text);
  background: var(--panel); border: 1.5px solid var(--line); border-radius: 12px; outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
#ship-form input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(246, 196, 83, 0.12); }
#ship-form input.invalid { border-color: var(--danger); }
#ship-form .btn { margin-top: 4px; }
.ship-success { text-align: center; padding: 8px 4px; }
.success-emoji { font-size: 52px; margin-bottom: 8px; }
.ship-success h4 { font-size: 17px; margin-bottom: 8px; }
.ship-success p { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }

/* ─────────── настройки ─────────── */
.set-row { margin-bottom: 16px; }
.set-label { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { flex: 1; min-width: 64px; padding: 10px 8px; font-family: var(--font-main); font-weight: 700; font-size: 12.5px; color: var(--muted);
  background: var(--panel); border: 1.5px solid var(--line); border-radius: 11px; cursor: pointer; }
.seg button.active { color: var(--text); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--panel)); }

/* ─────────── билеты / гарант / лента / mystery ─────────── */
.ticket-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.ticket-btn { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px;
  background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1.5px solid var(--line); border-radius: 14px; color: var(--muted);
  font-family: var(--font-main); cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.ticket-btn .t-emoji { font-size: 20px; }
.ticket-btn .t-name { font-weight: 800; font-size: 12.5px; color: var(--text); }
.ticket-btn .t-price { font-size: 12px; font-weight: 800; color: var(--gold); }
.ticket-btn .t-mult { font-size: 9.5px; color: var(--muted); }
.ticket-btn.active { border-color: var(--gold); transform: translateY(-2px); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 20%, var(--panel2)), var(--panel));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 6px 18px rgba(255, 107, 0, 0.25); }
.pity { margin: 12px auto 0; max-width: 300px; font-size: 11px; color: var(--muted); }
.pity.ready { color: var(--gold); font-weight: 700; }
.pity-bar { height: 5px; background: rgba(255, 255, 255, 0.08); border-radius: 3px; margin-top: 5px; overflow: hidden; }
.pity-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); border-radius: 3px; box-shadow: 0 0 8px rgba(246, 196, 83, 0.6); transition: width 0.3s; }
.feed-wrap { display: flex; align-items: center; gap: 8px; margin: 14px 0 2px; }
.feed-label { flex-shrink: 0; font-size: 9px; font-weight: 900; letter-spacing: 1.5px; color: var(--danger); border: 1px solid var(--danger); border-radius: 5px; padding: 3px 6px; animation: livePulse 1.6s ease-in-out infinite; }
@keyframes livePulse { 50% { opacity: 0.45; } }
.drop-feed { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px 0; }
.drop-feed::-webkit-scrollbar { display: none; }
.feed-chip { flex-shrink: 0; display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted);
  background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-left: 3px solid var(--rc); border-radius: 8px; padding: 5px 8px; animation: chipIn 0.3s ease; }
@keyframes chipIn { from { opacity: 0; transform: translateX(-8px); } }
.feed-chip b { color: var(--rc); white-space: nowrap; }
.feed-chip .feed-name { white-space: nowrap; }
.feed-chip.you { border-color: var(--gold); }
.feed-chip.you .feed-name { color: var(--gold); font-weight: 800; }
.feed-chip.feed-rare { box-shadow: 0 0 10px color-mix(in srgb, var(--rc) 35%, transparent); }
.mystery-banner { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 14px; padding: 14px; border-radius: 18px; cursor: pointer; text-align: left;
  background: radial-gradient(120% 130% at 85% 20%, rgba(255, 90, 241, 0.14), transparent 55%), linear-gradient(135deg, color-mix(in srgb, #ff5af1 12%, var(--panel)), var(--panel));
  border: 1px solid rgba(255, 90, 241, 0.45); box-shadow: 0 0 20px rgba(255, 90, 241, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.06); color: var(--text); font-family: var(--font-main); overflow: hidden; }
.mystery-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.08) 48%, transparent 62%); transform: translateX(-130%); animation: shineSweep 6s ease-in-out 3.5s infinite; pointer-events: none; }
.mb-q { font-family: var(--font-display); font-size: 34px; color: #ff5af1; text-shadow: 0 0 16px rgba(255, 90, 241, 0.85); animation: qPulse 1.6s ease-in-out infinite; flex-shrink: 0; width: 36px; text-align: center; }
.mb-text { display: flex; flex-direction: column; gap: 3px; }
.mb-text b { font-size: 14px; font-style: italic; letter-spacing: 0.5px; }
.mb-text span { font-size: 11px; color: var(--muted); }
.mb-arrow { margin-left: auto; color: #ff5af1; font-weight: 900; font-size: 18px; flex-shrink: 0; }
#gallery-grid { display: grid; gap: 12px; }
.gallery-card { position: relative; background: radial-gradient(120% 100% at 50% 0%, rgba(255, 90, 241, 0.08), transparent 55%), linear-gradient(160deg, var(--panel-a), var(--panel-b));
  border: 1.5px solid rgba(255, 90, 241, 0.5); border-radius: 18px; padding: 14px; box-shadow: 0 0 18px rgba(255, 90, 241, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.05); overflow: hidden; }
.gallery-art { max-width: 240px; margin: 0 auto; }
.gallery-name { font-weight: 800; font-size: 14px; margin: 8px 0 4px; }
.gallery-lore { color: var(--muted); font-size: 11.5px; line-height: 1.45; margin-bottom: 8px; }
.gallery-value { font-size: 12px; font-weight: 800; color: var(--gold); margin-left: 8px; }
.drop-card.hidden-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: radial-gradient(120% 100% at 50% 0%, rgba(255, 90, 241, 0.1), transparent 55%), linear-gradient(160deg, var(--panel-a), var(--panel-b)); }
.hidden-q { font-family: var(--font-display); font-size: 44px; line-height: 1.2; color: #ff5af1; text-shadow: 0 0 20px rgba(255, 90, 241, 0.85); animation: qPulse 1.6s ease-in-out infinite; }
.drop-card.hidden-drop .drop-name { min-height: 0; }
.drop-card.hidden-drop .drop-meta { width: 100%; }
.gallery-link { margin-top: 8px; color: #ff5af1; }
.cell.hidden-cell { display: flex; align-items: center; justify-content: center; background: radial-gradient(120% 100% at 50% 0%, rgba(255, 90, 241, 0.12), transparent 60%), linear-gradient(180deg, #1a1024, #12101a); }
.cell.hidden-cell .hidden-q { font-size: 36px; }

/* ─────────── остатки / распродано ─────────── */
.drop-card.sold-out, .gallery-card.sold-out, .cat-card.sold-out { opacity: 0.45; filter: grayscale(0.7); }
.sold-badge { font-size: 10px; font-weight: 800; color: var(--danger); white-space: nowrap; }
.sold-badge.big { font-size: 13px; padding: 12px 0; display: inline-block; }
.case-card.case-dead { opacity: 0.55; }
.low-stock { display: block; font-size: 10px; color: var(--danger); font-weight: 700; margin-top: 2px; }

/* ─────────── панель владельца ─────────── */
.owner-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.owner-table th { color: var(--muted); font-size: 10px; text-transform: uppercase; text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.owner-table td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
.rtp-ok { color: var(--green); font-weight: 800; }
.rtp-warn { color: var(--gold); font-weight: 800; }
.rtp-bad { color: var(--danger); font-weight: 800; }
.owner-note { color: var(--muted); font-size: 11px; line-height: 1.5; margin-top: 10px; }

/* ─────────── фон ─────────── */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-blob { position: absolute; border-radius: 50%; filter: blur(72px); opacity: 0.42; mix-blend-mode: screen; will-change: transform; }
.b1 { width: 340px; height: 340px; top: -70px; left: -60px; background: radial-gradient(circle, var(--accent), transparent 68%); animation: drift1 24s ease-in-out infinite; }
.b2 { width: 320px; height: 320px; bottom: -60px; right: -70px; background: radial-gradient(circle, var(--accent2), transparent 68%); animation: drift2 28s ease-in-out infinite; }
.b3 { width: 280px; height: 280px; top: 36%; left: 44%; background: radial-gradient(circle, #3b8bff, transparent 70%); opacity: 0.28; animation: drift3 32s ease-in-out infinite; }
[data-theme="luxe"] .bg-blob { mix-blend-mode: multiply; opacity: 0.18; }
[data-theme="luxe"] .b3 { display: none; }
@keyframes drift1 { 50% { transform: translate(90px, 120px) scale(1.15); } }
@keyframes drift2 { 50% { transform: translate(-80px, -90px) scale(1.1); } }
@keyframes drift3 { 50% { transform: translate(-60px, 70px) scale(1.2); } }
.bg-grid { position: absolute; left: 50%; bottom: 0; width: 240%; height: 48%; transform: translateX(-50%) perspective(320px) rotateX(70deg); transform-origin: bottom center;
  background-image: linear-gradient(rgba(246, 196, 83, 0.13) 1px, transparent 1px), linear-gradient(90deg, rgba(246, 196, 83, 0.08) 1px, transparent 1px);
  background-size: 46px 46px; -webkit-mask-image: linear-gradient(to top, #000, transparent 78%); mask-image: linear-gradient(to top, #000, transparent 78%); animation: gridRun 2.6s linear infinite; opacity: 0.65; }
@keyframes gridRun { to { background-position: 0 46px, 0 46px; } }
[data-theme="luxe"] .bg-grid { background-image: linear-gradient(rgba(176, 141, 79, 0.16) 1px, transparent 1px), linear-gradient(90deg, rgba(176, 141, 79, 0.1) 1px, transparent 1px); opacity: 0.4; }
@supports not ((-webkit-mask-image: linear-gradient(#000, #000)) or (mask-image: linear-gradient(#000, #000))) { .bg-grid { display: none; } }

/* ─────────── icon off (звук/музыка legacy — на всякий) ─────────── */
.icon-btn.off { opacity: 0.5; }
.icon-btn.off::after { content: ''; position: absolute; inset: 9px; background: linear-gradient(135deg, transparent 42%, var(--muted) 42%, var(--muted) 58%, transparent 58%); }

/* ─────────── эффекты ─────────── */
#fx { position: fixed; inset: 0; z-index: 90; pointer-events: none; display: none; }
#fx.on { display: block; }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(8px); z-index: 100;
  background: color-mix(in srgb, var(--panel2) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--line); color: var(--text); font-size: 13.5px; font-weight: 600; padding: 11px 18px; border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none; max-width: 86vw; text-align: center; }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═══════════ LUXE STYLE — стекло, бронза, тихая роскошь ═══════════ */
[data-theme="luxe"] .btn.race {
  background: rgba(33, 28, 22, 0.5);
  -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2);
  color: var(--gold); text-shadow: none;
  border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent);
  box-shadow: 0 6px 22px rgba(40, 30, 16, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  letter-spacing: 2.5px; font-weight: 700;
}
[data-theme="luxe"] .btn.race:active { box-shadow: 0 2px 8px rgba(40, 30, 16, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
[data-theme="luxe"] .btn.ghost {
  background: rgba(255, 255, 255, 0.4); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--line); color: var(--text); letter-spacing: 1.5px;
}
[data-theme="luxe"] .icon-btn, [data-theme="luxe"] .balance-chip {
  background: rgba(255, 255, 255, 0.42); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
[data-theme="luxe"] .balance-chip { border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
[data-theme="luxe"] .balance-chip .plus { background: linear-gradient(180deg, var(--gold), var(--gold-deep)); color: #2a2010; }
[data-theme="luxe"] .nav-btn { background: rgba(255, 255, 255, 0.4); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--line); }
[data-theme="luxe"] .nav-btn.active {
  background: rgba(33, 28, 22, 0.82); color: var(--gold); border-color: color-mix(in srgb, var(--gold) 50%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 6px 18px rgba(40, 30, 16, 0.2); text-shadow: none;
}
[data-theme="luxe"] .ticket-btn.active { background: rgba(184, 151, 63, 0.14); border-color: var(--gold); box-shadow: 0 6px 18px rgba(184, 151, 63, 0.18); }
[data-theme="luxe"] .case-card, [data-theme="luxe"] .drop-card, [data-theme="luxe"] .stock-item, [data-theme="luxe"] .lot-card, [data-theme="luxe"] .cat-card, [data-theme="luxe"] .modal { -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2); }
[data-theme="luxe"] .hero h1, [data-theme="luxe"] .logo-text { background: linear-gradient(180deg, var(--gold), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="luxe"] .drop-chance, [data-theme="luxe"] .cat-value, [data-theme="luxe"] .reveal-value, [data-theme="luxe"] .lot-price, [data-theme="luxe"] .stock-value, [data-theme="luxe"] .stock-total, [data-theme="luxe"] .gallery-value { color: var(--gold-deep); }
[data-theme="luxe"] .feed-label { color: var(--accent); border-color: var(--accent); }
[data-theme="luxe"] .case-q, [data-theme="luxe"] .spin-title { color: var(--gold-deep); }

/* ═══════════ ПРЕМИАЛЬНЫЙ ВЫИГРЫШ (обе темы) ═══════════ */
.reveal-value { font-size: 18px; letter-spacing: 0.5px; animation: valuePop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) 0.2s backwards; }
@keyframes valuePop { from { transform: scale(0.4); opacity: 0; } }
/* золотая фольга-блик, медленно проходит по карточке */
.reveal-card::before {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; mix-blend-mode: overlay;
  background: linear-gradient(120deg, transparent 42%, rgba(255, 255, 255, 0.55) 50%, transparent 58%);
  background-size: 250% 100%; animation: foilSweep 3.4s ease-in-out 0.9s infinite;
}
@keyframes foilSweep { 0% { background-position: 150% 0; } 55%, 100% { background-position: -50% 0; } }
/* у редких — золотисто-градиентная грань */
.reveal-card.r-th, .reveal-card.r-elite, .reveal-card.r-sth, .reveal-card.r-rlc, .reveal-card.r-mystery {
  border-image: linear-gradient(135deg, color-mix(in srgb, var(--rc) 92%, #fff), var(--rc) 45%, color-mix(in srgb, var(--rc) 60%, #000)) 1;
}
/* «пьедестал» под машинкой — мягкое золотое свечение */
.reveal-car { position: relative; }
.reveal-car::after {
  content: ''; position: absolute; left: 50%; bottom: -10px; width: 70%; height: 26px; transform: translateX(-50%);
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--rc) 45%, transparent), transparent 72%);
  filter: blur(5px); z-index: -1; animation: pedestal 2.6s ease-in-out infinite;
}
@keyframes pedestal { 50% { opacity: 0.55; transform: translateX(-50%) scaleX(0.86); } }

/* luxe reveal — золотая фольга, спокойно, но дорого */
[data-theme="luxe"] .reveal-card { background: linear-gradient(170deg, #fffdf8, #efe7d6); border: 1px solid color-mix(in srgb, var(--gold) 60%, transparent);
  box-shadow: 0 30px 70px rgba(40, 30, 16, 0.28), 0 0 0 1px rgba(184, 151, 63, 0.25); }
[data-theme="luxe"] .reveal-banner { color: var(--gold-deep); text-shadow: none; letter-spacing: 2px; }
[data-theme="luxe"] .reveal-name { color: var(--text); }
[data-theme="luxe"] .reveal-rays { opacity: 0.45; }
[data-theme="luxe"] .spin-window { border-color: color-mix(in srgb, var(--gold) 45%, transparent); }

/* ═══════════ ЭФФЕКТЫ ВЫИГРЫША (градация) ═══════════ */
#reveal-overlay.shake-fx { animation: revealShake 0.5s ease-out; }
@keyframes revealShake {
  0% { transform: translate(0, 0); } 15% { transform: translate(-7px, 4px); }
  30% { transform: translate(7px, -4px); } 45% { transform: translate(-5px, -2px); }
  60% { transform: translate(5px, 2px); } 75% { transform: translate(-3px, 1px); }
  88% { transform: translate(2px, -1px); } 100% { transform: translate(0, 0); }
}
.reveal-ring {
  position: absolute; left: 50%; top: 42%; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border-radius: 50%; border: 3px solid var(--rc); z-index: 2; pointer-events: none;
  box-shadow: 0 0 16px color-mix(in srgb, var(--rc) 70%, transparent), inset 0 0 12px color-mix(in srgb, var(--rc) 50%, transparent);
  animation: ringPulse 0.95s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes ringPulse { 0% { transform: scale(0.2); opacity: 0.95; } 100% { transform: scale(9); opacity: 0; } }

/* ═══════════ ПРОФИЛЬ ═══════════ */
.profile-row { display: flex; align-items: center; gap: 12px; padding: 10px; margin-bottom: 16px; border-radius: 14px; background: linear-gradient(175deg, var(--panel-a), var(--panel-b)); border: 1px solid var(--line); }
.prof-av { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid color-mix(in srgb, var(--gold) 60%, transparent); }
.prof-av-ph { display: grid; place-items: center; font-size: 22px; font-weight: 800; background: linear-gradient(180deg, var(--accent), var(--accent2)); color: #fff; text-transform: uppercase; }
.prof-name { font-weight: 800; font-size: 15px; }
.prof-id { font-size: 11px; color: var(--muted); }

/* ═══════════ МАГАЗИН МОНЕТ / СЕЙФЫ ═══════════ */
.set-label { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.safes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.safe-card { position: relative; text-align: center; padding: 12px 6px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(170deg, var(--panel2), var(--panel)); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255,255,255,0.05); }
.safe-card.s-middle { border-color: color-mix(in srgb, var(--blue) 50%, transparent); box-shadow: 0 0 16px color-mix(in srgb, var(--blue) 16%, transparent); }
.safe-card.s-mega { border-color: color-mix(in srgb, var(--gold) 60%, transparent); box-shadow: 0 0 20px color-mix(in srgb, var(--gold) 22%, transparent); }
.safe-card.s-mega::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.14) 50%, transparent 60%); transform: translateX(-130%); animation: shineSweep 4s ease-in-out 1.5s infinite; pointer-events: none; }
.safe-emoji { font-size: 30px; }
.safe-name { font-size: 11px; font-weight: 800; margin: 2px 0; }
.safe-coins { font-size: 13px; font-weight: 900; color: var(--gold); }
.safe-eco { display: inline-block; margin: 4px 0; font-size: 9.5px; font-weight: 800; color: #fff; background: var(--green); border-radius: 6px; padding: 1px 6px; }
.safe-price { font-size: 12px; margin-bottom: 8px; }
.safe-price s { color: var(--muted); }
.safe-price b { color: var(--text); font-size: 14px; }
.safe-buy { padding: 9px 6px !important; font-size: 12px !important; letter-spacing: 0 !important; }
#shop-amount { display: block; width: 100%; margin-top: 5px; padding: 11px 12px; font-size: 15px; font-family: var(--font-main); color: var(--text); background: var(--panel); border: 1.5px solid var(--line); border-radius: 11px; outline: none; }

/* ═══════════ ОПЛАТА ═══════════ */
.pay-get { font-weight: 800; color: var(--gold); margin-bottom: 12px; }
.pay-amount { font-size: 15px; margin-bottom: 6px; }
.wallet-addr { word-break: break-all; font-family: monospace; font-size: 12.5px; background: var(--panel); border: 1px dashed var(--line); border-radius: 10px; padding: 10px; margin: 6px 0 8px; }
.qr-wrap { display: grid; place-items: center; margin: 12px 0; }
.qr { width: 160px; height: 160px; border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,0.25); }

/* ═══════════ АДМИН-ПАНЕЛЬ ═══════════ */
.adm-tabs { flex-wrap: wrap; }
.adm-tabs .auc-tab { font-size: 11px; padding: 8px 4px; }
.adm-input { padding: 8px 10px; font-size: 14px; font-family: var(--font-main); color: var(--text); background: var(--panel); border: 1.5px solid var(--line); border-radius: 9px; outline: none; }
.adm-input:focus { border-color: var(--gold); }
.adm-sm { width: 92px; } .adm-xs { width: 68px; text-align: right; }
.adm-row { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.adm-row input, .adm-row select { display: block; width: 100%; margin-top: 5px; }
.adm-mini { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.adm-case { background: linear-gradient(175deg, var(--panel-a), var(--panel-b)); border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.adm-case-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 800; font-size: 13px; margin-bottom: 8px; }
.adm-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-top: 1px solid var(--line); }
.adm-item-name { flex: 1; font-size: 12px; min-width: 0; }
.adm-pct { font-size: 11px; font-weight: 800; color: var(--gold); width: 48px; text-align: right; }
.adm-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.adm-grid3 label { font-size: 10px; color: var(--muted); }
.adm-grid3 input { width: 100%; margin-top: 4px; }
.adm-check { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.add-form .adm-row { margin-bottom: 10px; }
.add-form .adm-grid3 { margin-bottom: 10px; }
.add-form .adm-grid3 label, .add-form .adm-row { font-size: 11px; color: var(--muted); }
.adm-color { width: 100%; height: 34px; padding: 2px; cursor: pointer; }
.nm-preview { text-align: center; margin: 8px 0; min-height: 4px; }
.nm-photo { max-width: 150px; max-height: 96px; border-radius: 10px; object-fit: cover; box-shadow: 0 4px 14px rgba(0,0,0,0.25); }

/* ═══════════ АНИМАЦИЯ ПОКУПКИ ═══════════ */
.balance-chip.pop { animation: chipPop 0.5s cubic-bezier(0.2, 1.7, 0.4, 1); }
@keyframes chipPop { 30% { transform: scale(1.2); } }
.coin-fly-layer { position: fixed; inset: 0; z-index: 95; pointer-events: none; }
.coin-fly { position: absolute; font-size: 22px; animation: coinFly 1.1s cubic-bezier(0.4, 0, 0.6, 1) forwards; }
@keyframes coinFly { 0% { transform: translateY(0) scale(0.6); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(40vw, -42vh) scale(1.1); opacity: 0; } }
.card-figure-img { flex: 0 0 96px; width: 96px; height: 64px; object-fit: cover; border-radius: 8px; }

/* ═══════════ БИРЖА ═══════════ */
.bottom-nav { gap: 5px; }
.nav-btn { padding: 11px 3px; }
#exchange-grid { display: grid; gap: 10px; }
.ex-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; cursor: pointer;
  background: linear-gradient(175deg, var(--panel-a), var(--panel-b)); border: 1px solid var(--line); border-left: 4px solid var(--rc); box-shadow: inset 0 1px 0 rgba(255,255,255,0.04); transition: transform 0.15s; }
.ex-card:active { transform: scale(0.98); }
.ex-car { flex: 0 0 72px; }
.ex-thumb { width: 72px; height: 48px; object-fit: cover; border-radius: 8px; display: block; }
.ex-info { flex: 1; min-width: 0; }
.ex-name { font-size: 12.5px; font-weight: 700; }
.ex-seller { font-size: 10.5px; color: var(--muted); margin: 3px 0; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ex-price-row { display: flex; align-items: baseline; gap: 8px; }
.ex-price { font-size: 14px; font-weight: 900; color: var(--gold); }
.ex-price.big { font-size: 24px; }
.ex-change { font-size: 11.5px; font-weight: 800; }
.ex-change.up { color: var(--green); } .ex-change.down { color: var(--danger); }
.ex-spark { flex: 0 0 78px; }
.spark { width: 78px; height: 40px; display: block; }
.ex-detail-price { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 4px; }
.bigchart { width: 100%; height: auto; display: block; background: rgba(0,0,0,0.18); border: 1px solid var(--line); border-radius: 12px; }
.seller-chip { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: 12px; cursor: pointer; text-align: left;
  background: linear-gradient(175deg, var(--panel-a), var(--panel-b)); border: 1px solid var(--line); color: var(--text); font-family: var(--font-main); }
.sc-name { flex: 1; min-width: 0; font-size: 13px; }
.sc-name .rmini { display: block; margin-top: 2px; }
.chev { color: var(--muted); font-size: 20px; font-weight: 700; }
.t-av { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-size: 18px; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15); }
.rmini { font-size: 10.5px; font-weight: 800; color: var(--gold); white-space: nowrap; }
.rmini.new { color: var(--muted); }

/* ═══════════ ПРОФИЛЬ / РЕЙТИНГ / ОТЗЫВЫ ═══════════ */
.profile-row.clickable { cursor: pointer; }
.profile-row .chev { margin-left: auto; }
.prof-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.prof-big-av { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; font-size: 30px; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.2); flex-shrink: 0; }
.prof-big-name { font-size: 18px; font-weight: 800; }
.you-tag { font-size: 10px; font-weight: 800; background: var(--accent); color: #fff; padding: 2px 7px; border-radius: 999px; vertical-align: middle; }
.prof-stars { margin-top: 4px; }
.stars { display: inline-flex; align-items: center; gap: 1px; }
.stars .star { color: rgba(255,255,255,0.18); font-size: 16px; }
[data-theme="luxe"] .stars .star { color: rgba(40,30,20,0.18); }
.stars .star.on { color: var(--gold); }
.stars b { margin-left: 6px; font-size: 13px; color: var(--text); }
.stars.mini .star { font-size: 11px; } .stars.mini b { font-size: 11px; margin-left: 4px; }
.stars-empty { font-size: 11px; color: var(--muted); }
.prof-stats { display: flex; gap: 10px; margin-bottom: 14px; }
.prof-stats > div { flex: 1; text-align: center; padding: 10px 4px; border-radius: 12px; background: linear-gradient(175deg, var(--panel-a), var(--panel-b)); border: 1px solid var(--line); }
.prof-stats b { display: block; font-size: 17px; font-weight: 900; color: var(--gold); }
.prof-stats span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.3px; }
.review-form { margin-bottom: 14px; }
.star-pick { display: flex; gap: 4px; margin: 6px 0 8px; }
.star-pick .star { font-size: 30px; color: rgba(255,255,255,0.2); cursor: pointer; transition: transform 0.1s; }
[data-theme="luxe"] .star-pick .star { color: rgba(40,30,20,0.2); }
.star-pick .star.on { color: var(--gold); }
.star-pick .star:active { transform: scale(1.2); }
.reviews-list { display: flex; flex-direction: column; gap: 8px; }
.review { background: linear-gradient(175deg, var(--panel-a), var(--panel-b)); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.review-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.review-top b { font-size: 12.5px; }
.review-text { font-size: 12.5px; color: var(--muted); line-height: 1.4; }

/* ─────────── мелкие экраны ─────────── */
@media (max-width: 380px) { .icon-btn { width: 36px; height: 36px; font-size: 16px; } .balance-chip { height: 36px; font-size: 14px; } .logo-text { font-size: 14px; } .nav-btn { font-size: 10.5px; padding: 10px 2px; } .top-actions { gap: 5px; } }
@media (max-width: 360px) { .hero h1 { font-size: 27px; } .reveal-actions { flex-direction: column; } .ticket-btn .t-mult { display: none; } }
@media (prefers-reduced-motion: reduce) { .bg-blob, .bg-grid, .case-card::after, .mystery-banner::after, .spin-window.gold-spin, .reveal-card::before, .reveal-car::after { animation: none !important; } }

/* ═══════════ ДЕСКТОП-ВЕРСИЯ (ПК): сайдбар-меню + многоколоночность ═══════════ */
@media (min-width: 880px) {
  .app {
    max-width: 1180px;
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "top top" "side main";
    min-height: 100vh;
  }
  .topbar { grid-area: top; padding: 12px 22px; }
  .logo-text { font-size: 18px; }
  main { grid-area: main; padding: 22px 30px 56px; }

  /* нижнее меню → левый вертикальный сайдбар */
  .bottom-nav {
    grid-area: side; position: sticky; top: 78px; align-self: start;
    left: auto; transform: none; width: auto; max-width: none;
    flex-direction: column; gap: 8px; padding: 22px 16px;
    background: transparent; border-top: none; border-right: 1px solid var(--line);
    -webkit-backdrop-filter: none; backdrop-filter: none; z-index: 10; min-height: calc(100vh - 78px);
  }
  .nav-btn { width: 100%; text-align: left; padding: 15px 18px; font-size: 14.5px; border-radius: 14px; }
  .nav-btn .count { float: right; }

  /* сетки — в несколько колонок, шире воздух */
  .cases-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .cat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .drops-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #exchange-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding-top: 26px; }
  .hero h1 { font-size: 42px; }
  .hero p { font-size: 15px; }
  .section-title { font-size: 20px; }

  /* приятные hover-эффекты на ПК (на тач — :active как был) */
  .case-card, .cat-card, .ex-card, .lot-card, .gallery-card, .drop-card { transition: transform 0.16s, box-shadow 0.22s; }
  .case-card:hover, .cat-card:hover, .ex-card:hover, .lot-card:hover, .gallery-card:hover {
    transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  }
  .nav-btn:not(.active):hover { color: var(--text); background: linear-gradient(180deg, var(--panel), var(--panel2)); }
  .btn:hover { filter: brightness(1.07); }
  .mini-drop, .feed-chip, .seller-chip:hover { cursor: default; }
  .seller-chip:hover, .profile-row.clickable:hover { background: linear-gradient(175deg, var(--panel2), var(--panel)); cursor: pointer; }

  /* рулетка шире и эффектнее на большом экране */
  .spin-box { max-width: 760px; }
  .spin-window { height: 184px; }

  /* модалки — комфортная ширина по центру */
  .modal { max-width: 480px; max-height: 88vh; }
  #card-overlay .modal, #market-overlay .modal { max-width: 560px; }
}

/* очень широкие экраны — не растягиваем бесконечно */
@media (min-width: 1240px) {
  .cat-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* ═══════════════ ДРИФТ-КРАШ ═══════════════ */
.drift-hist { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 6px 0 12px; }
.drift-hist::-webkit-scrollbar { display: none; }
.hist-chip { flex-shrink: 0; font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); }
.hist-chip.good { color: var(--muted); border-color: var(--line); }
.hist-chip.bad  { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); background: color-mix(in srgb, var(--danger) 13%, var(--panel)); }
.hist-chip.won  { color: var(--gold,#f5c800); border-color: color-mix(in srgb, var(--gold,#f5c800) 60%, transparent); background: color-mix(in srgb, var(--gold,#f5c800) 15%, var(--panel)); font-weight: 900; }
.hist-empty { font-size: 12px; color: var(--muted); }

.drift-stage { position: relative; aspect-ratio: 1 / 1.05; max-height: 58vh; border-radius: var(--radius); overflow: hidden;
  --tone: color-mix(in srgb, var(--green) calc((1 - var(--tense)) * 100%), var(--danger));
  border: 1px solid color-mix(in srgb, var(--tone) calc(26% + var(--tense) * 50%), var(--line));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 0 calc(16px + var(--tense) * 46px) color-mix(in srgb, var(--tone) calc(16% + var(--tense) * 40%), transparent);
  transition: border-color .25s; }
/* трасса — вид сверху */
.drift-road { position: absolute; inset: 0; overflow: hidden;
  background: linear-gradient(90deg, #0b0d12 0 6%, #2b2e38 6% 10%, #1b1e26 10% 90%, #2b2e38 90% 94%, #0b0d12 94%); }
.road-edge { position: absolute; top: -10%; height: 120%; width: 4px; opacity: .55; will-change: transform;
  background: repeating-linear-gradient(0deg, color-mix(in srgb, var(--gold) 75%, #fff) 0 18px, transparent 18px 42px);
  filter: blur(calc(var(--speed, 0) * 1.1px)); }
.road-edge.l { left: 12%; } .road-edge.r { right: 12%; }
.road-dash { position: absolute; left: 50%; top: -30%; width: 7px; height: 160%; border-radius: 6px;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.92) 0 26px, transparent 26px 60px); will-change: transform; transform: translateX(-50%);
  filter: blur(calc(var(--speed, 0) * 1.6px)); }
.drift-stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(120% 70% at 50% 100%, color-mix(in srgb, var(--tone) calc(14% + var(--tense) * 30%), transparent), transparent 60%),
              radial-gradient(100% 55% at 50% 0%, rgba(0,0,0,.5), transparent 55%); }
.drift-car { position: absolute; left: 50%; top: 62%; width: 62px; z-index: 2; will-change: transform; transform-origin: 50% 50%;
  transform: translate(-50%,-50%); filter: drop-shadow(0 5px 7px rgba(0,0,0,.55)); }
.drift-car .car-top { width: 62px; height: auto; display: block; }
.drift-car::after { content: ''; position: absolute; left: 50%; bottom: -16px; width: 56px; height: 42px; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(circle, rgba(222,227,237,.85), transparent 70%); filter: blur(5px);
  opacity: var(--smk, 0); pointer-events: none; }
.drift-car.spinout { animation: driftSpinout .9s cubic-bezier(.3,.6,.2,1) forwards; }
@keyframes driftSpinout {
  0% { transform: translate(-50%,-50%) rotate(0); opacity: 1; }
  60% { transform: translate(-50%,-42%) rotate(430deg) scale(1.06); opacity: 1; }
  100% { transform: translate(-50%,20%) rotate(650deg) scale(.78); opacity: .12; } }
.drift-skin { position: absolute; top: 8px; right: 8px; z-index: 6; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(0,0,0,.38); color: #fff; font-size: 16px; cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.drift-skins { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 10px 0 2px; }
.drift-skins::-webkit-scrollbar { display: none; }
.skin-chip { flex: 0 0 auto; width: 62px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel-a); cursor: pointer; }
.skin-chip.active { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 14px color-mix(in srgb, var(--gold) 40%, transparent); }
.skin-mini { width: 34px; height: 50px; display: flex; align-items: center; justify-content: center; }
.skin-mini .car-top { width: 30px; }
.skin-name { font-size: 9.5px; font-weight: 700; color: var(--muted); text-align: center; line-height: 1.05; max-height: 2.2em; overflow: hidden; }

/* множитель сбоку — поднимается по ходу движения, деления подсвечиваются */
.drift-gauge { position: absolute; top: 12px; right: 8px; bottom: 12px; width: 72px; z-index: 3; pointer-events: none; }
.drift-gauge::before { content: ''; position: absolute; right: 8px; top: 0; bottom: 0; width: 2px; border-radius: 2px; background: rgba(255,255,255,.14); }
.gauge-fill { position: absolute; right: 7px; bottom: 0; width: 4px; height: 0; border-radius: 3px;
  background: linear-gradient(to top, var(--green), var(--tone)); box-shadow: 0 0 8px color-mix(in srgb, var(--tone) 70%, transparent); transition: height .05s linear; }
.gauge-tick { position: absolute; right: 3px; width: 12px; height: 2px; transform: translateY(50%); border-radius: 2px; background: var(--muted); opacity: .38; transition: background .2s, opacity .2s, box-shadow .2s; }
.gauge-tick.passed { background: var(--gold); opacity: 1; box-shadow: 0 0 8px color-mix(in srgb, var(--gold) 80%, transparent); }
.drift-mult { position: absolute; right: 20px; bottom: 0; transform: translateY(50%); z-index: 4; pointer-events: none; white-space: nowrap; text-align: right;
  font-family: var(--font-display); font-size: clamp(24px, 6.5vw, 38px); letter-spacing: .5px; transition: bottom .05s linear;
  color: color-mix(in srgb, var(--tone) calc(45% + var(--tense) * 55%), #fff);
  text-shadow: 0 0 calc(8px + var(--tense) * 22px) color-mix(in srgb, var(--tone) 75%, transparent); }
.drift-status { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 4; white-space: nowrap;
  font-family: var(--font-display); font-size: 17px; letter-spacing: .5px; opacity: 0; }
.drift-status.show { animation: driftBanner .5s cubic-bezier(.2,1.7,.4,1) forwards; }
@keyframes driftBanner { 0% { opacity: 0; transform: translateX(-50%) scale(.7); } 100% { opacity: 1; transform: translateX(-50%) scale(1); } }
.drift-status.crash { color: var(--danger); text-shadow: 0 0 16px color-mix(in srgb, var(--danger) 70%, transparent); }
.drift-status.cash { color: var(--gold); text-shadow: 0 0 16px color-mix(in srgb, var(--gold) 70%, transparent); }
.drift-stage.crashed { animation: driftRedFlash .5s ease-out; }
@keyframes driftRedFlash { 0% { box-shadow: inset 0 0 90px color-mix(in srgb, var(--danger) 60%, transparent); } 100% { box-shadow: none; } }

.drift-fx { animation: driftShake .45s ease-out; }
@keyframes driftShake { 0%,100% { transform: translate(0,0); } 20% { transform: translate(calc(-1 * var(--shk,6px)), 2px); }
  40% { transform: translate(var(--shk,6px), -2px); } 60% { transform: translate(calc(-.6 * var(--shk,6px)), -1px); } 80% { transform: translate(calc(.4 * var(--shk,6px)), 1px); } }

.drift-controls { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.drift-bet { display: flex; align-items: stretch; gap: 8px; }
.bet-step { width: 48px; border: 1px solid var(--line); border-radius: 12px; font-size: 24px; font-weight: 900; line-height: 1;
  background: var(--panel-a); color: var(--text); cursor: pointer; }
.bet-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 12px; background: var(--panel); border: 1.5px solid var(--line); }
.bet-field input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--text); font-weight: 900; font-size: 20px; }
.bet-field input::-webkit-outer-spin-button, .bet-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.drift-bet-quick { display: flex; gap: 6px; }
.bet-quick { flex: 1; padding: 9px 0; font-weight: 800; font-size: 12.5px; color: var(--muted); background: var(--panel-a); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.drift-auto { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 2px 2px; }
.drift-auto input[type=number] { width: 64px; padding: 6px 8px; border-radius: 9px; background: var(--panel); border: 1.5px solid var(--line); color: var(--text); font-weight: 800; }
.drift-auto input:disabled { opacity: .5; }
.drift-go { font-size: 17px; padding: 16px 20px; }
.drift-go:disabled, .bet-step:disabled, .bet-quick:disabled { opacity: .45; cursor: not-allowed; filter: saturate(.5); }

/* luxe — приглушаем красный в золото, без неона */
[data-theme="luxe"] .drift-stage { --tone: color-mix(in srgb, var(--green) calc((1 - var(--tense)) * 100%), var(--gold)); }
[data-theme="luxe"] .drift-arc { stroke-dasharray: none; opacity: .4; }

/* ═══════════════ PERFECT SHIFT ═══════════════ */
.game-tabs { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.game-tabs::-webkit-scrollbar { display: none; }
.game-tab { flex: 1 0 auto; min-width: 88px; padding: 11px 8px; font-family: var(--font-main); font-weight: 800; font-size: 13px; color: var(--muted);
  background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; white-space: nowrap; transition: color .15s, box-shadow .2s; }
.game-tab.active { color: #fff; background: linear-gradient(180deg, var(--accent), var(--accent2));
  border-color: color-mix(in srgb, var(--gold) 80%, transparent); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 6px 16px rgba(232,38,29,.3); }
[data-theme="luxe"] .game-tab.active { color: var(--gold); background: rgba(33,28,22,.82); border-color: color-mix(in srgb, var(--gold) 50%, transparent); box-shadow: none; }

.shift-stage { aspect-ratio: 1 / 1; max-height: 50vh; min-height: 260px; padding: 0; display: block; }
.shift-road { z-index: 0; }
.shift-bg { position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--tone) calc(10% + var(--tense)*34%), transparent), transparent 60%),
              repeating-linear-gradient(115deg, rgba(255,255,255,.018) 0 12px, transparent 12px 24px); }
.shift-gears { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 8px; }
.gear-pip { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; font-family: var(--font-display);
  font-size: 14px; color: var(--muted); background: var(--panel-a); border: 1px solid var(--line); transition: all .2s; }
.gear-pip.done { color: var(--green); border-color: color-mix(in srgb, var(--green) 55%, transparent); background: color-mix(in srgb, var(--green) 14%, var(--panel)); }
.gear-pip.cur { color: #fff; border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 14px color-mix(in srgb, var(--gold) 45%, transparent); transform: translateY(-2px) scale(1.08); }

.shift-stage .shift-car { position: absolute; left: 50%; top: 64%; transform: translate(-50%,-50%); width: 62px; z-index: 2;
  will-change: transform; transition: none; filter: drop-shadow(0 5px 7px rgba(0,0,0,.55)); }
.shift-stage .shift-car .car-top { width: 62px; }
.shift-stage.cashed { border-color: var(--gold); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 0 30px color-mix(in srgb, var(--gold) 36%, transparent); }
.shift-stage .shift-car.spinout { animation: shiftSpinout .85s cubic-bezier(.3,.6,.2,1) forwards; }
@keyframes shiftSpinout { 0% { transform: translate(-50%,-50%) rotate(0) scale(1); opacity: 1; } 60% { transform: translate(-50%,-50%) rotate(420deg) scale(1.05); opacity: 1; } 100% { transform: translate(-50%,-28%) rotate(660deg) scale(.7); opacity: .12; } }
.shift-stage.perfect { animation: shiftPerfFlash .45s ease-out; }
@keyframes shiftPerfFlash { 0% { box-shadow: inset 0 0 72px color-mix(in srgb, #00ff66 50%, transparent), inset 0 1px 0 rgba(255,255,255,.05); } 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,.05); } }
.shift-mult { position: absolute; left: 12px; top: 12px; z-index: 4; font-family: var(--font-display); font-size: clamp(26px, 7vw, 40px); line-height: 1;
  color: color-mix(in srgb, var(--tone) calc(45% + var(--tense)*55%), #fff);
  text-shadow: 0 0 calc(8px + var(--tense)*22px) color-mix(in srgb, var(--tone) 75%, transparent); }
#shift-status.drift-status { bottom: 12px; }

/* тахометр */
.shift-tach { margin-top: 12px; }
.tach-leds { display: flex; gap: 4px; justify-content: center; margin-bottom: 8px; }
.tach-leds .led { width: 14px; height: 8px; border-radius: 2px; background: var(--panel-a); border: 1px solid var(--line); opacity: .45; transition: opacity .05s, box-shadow .05s; }
.tach-leds .led.g.on { background: var(--green); opacity: 1; box-shadow: 0 0 8px var(--green); border-color: var(--green); }
.tach-leds .led.y.on { background: #ffc73a; opacity: 1; box-shadow: 0 0 8px #ffc73a; border-color: #ffc73a; }
.tach-leds .led.r.on { background: var(--danger); opacity: 1; box-shadow: 0 0 10px var(--danger); border-color: var(--danger); }
.tach-bar { position: relative; height: 42px; border-radius: 12px; overflow: hidden; background: linear-gradient(180deg, var(--panel), var(--panel-a)); border: 1.5px solid var(--line); }
.tach-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, var(--green), #ffc73a 70%, var(--danger)); opacity: .45; transition: width .03s linear; }
.tach-redline { position: absolute; top: 0; bottom: 0; right: 0; width: 16%; z-index: 1;
  background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--danger) 42%, transparent) 0 6px, transparent 6px 12px); border-left: 2px solid var(--danger); }
.tach-window { position: absolute; top: -2px; bottom: -2px; z-index: 1; background: color-mix(in srgb, var(--green) 26%, transparent);
  border-left: 2px solid var(--green); border-right: 2px solid var(--green); box-shadow: 0 0 12px color-mix(in srgb, var(--green) 50%, transparent); }
.tach-window.flash { animation: tachWin .4s ease-out; }
@keyframes tachWin { 0% { background: color-mix(in srgb, var(--green) 80%, transparent); } 100% { background: color-mix(in srgb, var(--green) 26%, transparent); } }
/* отказ мотора: окно красное и пульсирует — игрок видит, что передача обречена (не его вина) */
.tach-window.fault { background: color-mix(in srgb, var(--danger) 32%, transparent);
  border-left-color: var(--danger); border-right-color: var(--danger);
  box-shadow: 0 0 14px color-mix(in srgb, var(--danger) 60%, transparent); animation: tachFault .5s ease-in-out infinite; }
@keyframes tachFault { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
.tach-perfect { position: absolute; top: -3px; bottom: -3px; z-index: 2; border-radius: 2px;
  background: color-mix(in srgb, #00ff66 48%, transparent); box-shadow: 0 0 14px #00ff66, inset 0 0 8px rgba(255,255,255,.55);
  border-left: 2px solid #c7ffdd; border-right: 2px solid #c7ffdd; animation: tachPerfPulse .7s ease-in-out infinite; }
.tach-perfect.flash { animation: tachPerfFlash .4s ease-out; }
@keyframes tachPerfPulse { 0%,100% { opacity: .72; } 50% { opacity: 1; } }
@keyframes tachPerfFlash { 0% { background: #7dffb0; box-shadow: 0 0 26px #00ff66, inset 0 0 10px #fff; } 100% { background: color-mix(in srgb, #00ff66 48%, transparent); } }
.drift-status.perfect { color: #6dffa6; text-shadow: 0 0 18px #00ff66, 0 0 6px rgba(255,255,255,.8); }
.tach-needle { position: absolute; top: -3px; bottom: -3px; left: 0; width: 3px; margin-left: -1.5px; z-index: 3; background: #fff; border-radius: 2px;
  box-shadow: 0 0 8px rgba(255,255,255,.85); transition: left .03s linear; }

.shift-diffs { display: flex; gap: 6px; }
.shift-diff { flex: 1; padding: 9px 0; font-weight: 800; font-size: 12.5px; color: var(--muted); background: var(--panel-a); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.shift-diff.active { color: #fff; background: linear-gradient(180deg, var(--accent), var(--accent2)); border-color: color-mix(in srgb, var(--gold) 70%, transparent); }
[data-theme="luxe"] .shift-diff.active { color: var(--gold); background: rgba(33,28,22,.82); }
.shift-diff:disabled { opacity: .5; cursor: not-allowed; }
.shift-actions { display: flex; gap: 8px; }
.shift-actions .shift-go { flex: 2; }
.shift-go.is-rev { background: linear-gradient(180deg, #34d36a, #149e47); border-color: color-mix(in srgb, var(--green) 70%, #000); }
.shift-cash { flex: 1.4; font-family: var(--font-main); font-size: 14.5px; font-weight: 900; padding: 16px 12px; cursor: pointer;
  background: linear-gradient(180deg, #ffd45a, #f3a712); color: #3a2600; border: 1px solid color-mix(in srgb, var(--gold) 80%, #000); border-radius: 14px;
  box-shadow: 0 6px 16px rgba(243,167,18,.32); }
.shift-cash:disabled { opacity: .45; cursor: not-allowed; filter: saturate(.5); }

/* ═══════════════ БАШНЯ ПИТСТОПА ═══════════════ */
.tower-stage { aspect-ratio: auto; max-height: none; min-height: 300px; padding: 14px; display: block; }
.tower-head { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 10px; position: relative; z-index: 2; }
.tower-stage .tower-car { position: static; left: auto; top: auto; transform: none; width: 40px; filter: drop-shadow(0 3px 5px rgba(0,0,0,.5)); }
.tower-stage .tower-car .car-top { width: 40px; }
.tower-stage .tower-car::after { content: none; }
.tower-mult { font-family: var(--font-display); font-size: clamp(26px, 7vw, 38px); line-height: 1;
  color: color-mix(in srgb, var(--tone) calc(45% + var(--tense)*55%), #fff); text-shadow: 0 0 calc(8px + var(--tense)*20px) color-mix(in srgb, var(--tone) 70%, transparent); }
.tower-floors { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 6px; width: 100%; }
.floor { display: flex; align-items: center; gap: 10px; padding: 5px 8px 5px 10px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel-a); opacity: .5; transition: opacity .2s, border-color .2s, box-shadow .2s; }
.floor.locked { opacity: .42; }
.floor.done { opacity: .85; border-color: color-mix(in srgb, var(--green) 42%, transparent); background: color-mix(in srgb, var(--green) 9%, var(--panel)); }
.floor.cur { opacity: 1; border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 16px color-mix(in srgb, var(--gold) 32%, transparent); }
.floor.crashed { opacity: 1; border-color: var(--danger); box-shadow: 0 0 14px color-mix(in srgb, var(--danger) 40%, transparent); }
.floor.roof { border-style: dashed; }
.floor-mult { font-family: var(--font-display); font-size: 13.5px; min-width: 56px; color: var(--muted); }
.floor.cur .floor-mult, .floor.done .floor-mult, .floor.crashed .floor-mult { color: var(--text); }
.floor-doors { display: flex; gap: 6px; flex: 1; justify-content: flex-end; }
.floor-flag { font-size: 14px; margin-left: 2px; }
.door { width: 40px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  font-size: 17px; display: grid; place-items: center; cursor: default; padding: 0; transition: transform .1s, background .2s, border-color .2s; }
.door.live { cursor: pointer; background: linear-gradient(180deg, var(--panel2), var(--panel)); border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.door.live:active { transform: scale(.9); }
.door.safe { background: color-mix(in srgb, var(--green) 24%, var(--panel)); border-color: var(--green); }
.door.trap { background: color-mix(in srgb, var(--danger) 30%, var(--panel)); border-color: var(--danger); }
.door.dim, .door.lock { opacity: .42; }
.tower-go.is-cash, .mines-go.is-cash { background: linear-gradient(180deg, #ffd45a, #f3a712); color: #3a2600; border-color: color-mix(in srgb, var(--gold) 80%, #000); }
.tower-go.is-cash:disabled, .mines-go.is-cash:disabled { background: linear-gradient(180deg, var(--panel2), var(--panel)); color: var(--muted); }

/* ═══════════════ ГАРАЖИ (MINES) ═══════════════ */
.mines-stage { aspect-ratio: auto; max-height: none; min-height: 350px; padding: 14px; display: block; }
.mines-head { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 8px; position: relative; z-index: 2; }
.mines-stage .mines-car { position: static; left: auto; top: auto; transform: none; width: 38px; filter: drop-shadow(0 3px 5px rgba(0,0,0,.5)); }
.mines-stage .mines-car .car-top { width: 38px; }
.mines-stage .mines-car::after { content: none; }
.mines-mult { font-family: var(--font-display); font-size: clamp(26px, 7vw, 38px); line-height: 1;
  color: color-mix(in srgb, var(--tone) calc(45% + var(--tense)*55%), #fff); text-shadow: 0 0 calc(8px + var(--tense)*20px) color-mix(in srgb, var(--tone) 70%, transparent); }
.mines-next { font-size: 12.5px; font-weight: 800; color: var(--muted); }
.mines-grid { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; width: 100%; max-width: 320px; margin: 4px auto 0; }
.cell { aspect-ratio: 1 / 1; border-radius: 10px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel2), var(--panel));
  font-size: 20px; display: grid; place-items: center; cursor: pointer; padding: 0; color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05); transition: transform .08s, background .2s, border-color .2s; }
.cell.hidden::after { content: ''; width: 40%; height: 40%; border-radius: 4px; border: 2px solid color-mix(in srgb, var(--muted) 38%, transparent); opacity: .5; }
.cell.hidden:active { transform: scale(.9); }
.cell.safe { background: color-mix(in srgb, var(--green) 22%, var(--panel)); border-color: var(--green); cursor: default; animation: cellPop .25s ease-out; }
.cell.mine { background: color-mix(in srgb, var(--danger) 16%, var(--panel)); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); opacity: .8; cursor: default; }
.cell.boom { background: color-mix(in srgb, var(--danger) 42%, var(--panel)); border-color: var(--danger); animation: cellBoom .45s ease-out; }
.cell.dim { opacity: .38; cursor: default; }
@keyframes cellPop { 0% { transform: scale(.55); } 100% { transform: scale(1); } }
@keyframes cellBoom { 0% { transform: scale(1.35); } 60% { transform: scale(.92); } 100% { transform: scale(1); } }
.mines-count { display: flex; align-items: stretch; gap: 8px; }
.mc-field { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px;
  background: var(--panel); border: 1.5px solid var(--line); font-weight: 800; color: var(--muted); font-size: 13px; }
.mc-field b { color: var(--text); font-size: 18px; font-family: var(--font-display); }
.mines-hint { text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; margin: -2px 0 0; }

/* ═══════════════ ДРАГ-ЗАЕЗД ═══════════════ */
.drag-stage { aspect-ratio: auto; max-height: none; min-height: 360px; padding: 12px; display: block; }
.drag-track { position: relative; z-index: 2; display: flex; gap: 10px; height: 300px; }
.drag-lane { position: relative; flex: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(180deg, #161922, #0b0d13); box-shadow: inset 0 0 30px rgba(0,0,0,.4); }
.drag-lane::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; transform: translateX(-50%);
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.5) 0 14px, transparent 14px 40px); opacity: .45; }
.drag-finish { position: absolute; top: 6px; left: 6px; right: 6px; height: 9px; z-index: 3; border-radius: 3px; opacity: .9;
  background-image: repeating-conic-gradient(#fff 0 25%, #111 0 50%); background-size: 9px 9px; }
.lane-name { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); z-index: 3; font-family: var(--font-display);
  font-size: 11px; letter-spacing: .5px; white-space: nowrap; pointer-events: none; }
.drag-you { color: var(--gold); } .drag-bot { color: #9aa3b2; }
.drag-lanecar { position: absolute; left: 50%; bottom: 0; width: 40px; transform: translateX(-50%); z-index: 2;
  transition: bottom .06s linear; filter: drop-shadow(0 4px 6px rgba(0,0,0,.55)); }
.drag-lanecar .car-top { width: 40px; display: block; }
.drag-tree { position: absolute; top: 30px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; flex-direction: column; gap: 5px;
  padding: 6px; border-radius: 10px; background: rgba(0,0,0,.5); border: 1px solid var(--line); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.tree-bulb { width: 17px; height: 17px; border-radius: 50%; background: #2a2a2a; border: 1px solid rgba(255,255,255,.08); transition: background .1s, box-shadow .1s; }
.tree-bulb.a.on { background: #ffb300; box-shadow: 0 0 12px #ffb300; }
.tree-bulb.g.on { background: #2ee06f; box-shadow: 0 0 16px #2ee06f; }
#drag-status.drift-status { bottom: 10px; }
.drag-go.is-racing { filter: saturate(1.2); }

/* ═══════════════ ✨ VISUAL GLOW-UP — die-cast flame logo + polish ✨ ═══════════════ */

/* ── ЛОГО: die-cast flame hex знак + хром→огонь вордмарк ── */
.logo { display: flex; align-items: center; gap: 10px; cursor: pointer; -webkit-user-select: none; user-select: none; }
.logo-mark { position: relative; width: 40px; height: 40px; display: block; flex: 0 0 auto;
  filter: drop-shadow(0 0 7px rgba(255,107,0,.55)) drop-shadow(0 0 2px rgba(232,38,29,.6));
  animation: hwlogoPulse 3.2s ease-in-out infinite; transition: transform .25s cubic-bezier(.2,.9,.3,1.3); }
.logo-mark-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.logo:hover .logo-mark, .logo:active .logo-mark { transform: rotate(-4deg) scale(1.07); }
.logo-flame { display: none !important; }
.logo-text {
  font-family: var(--font-display); font-size: 15.5px; line-height: 1;
  text-transform: uppercase; letter-spacing: 1.2px; transform: skewX(-7deg);
  background: linear-gradient(180deg, #ffffff 0%, #fff0c8 26%, var(--gold) 50%, var(--accent) 80%, var(--accent2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.55)) drop-shadow(0 0 9px rgba(255,107,0,.28)); }

/* ── HERO: неон-заголовок + живая шашка-трасса ── */
.hero h1 { position: relative;
  font-family: var(--font-display); font-size: 33px; letter-spacing: 2px; transform: skewX(-6deg);
  background: linear-gradient(180deg, #ffffff 12%, var(--gold) 40%, var(--accent) 70%, var(--accent2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.55)) drop-shadow(0 0 10px rgba(255,107,0,.45)) drop-shadow(0 0 26px rgba(232,38,29,.30)); }
.hero h1::after { content: ""; position: absolute; left: 14%; right: 14%; bottom: -7px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), #fff6df, var(--accent2), transparent);
  box-shadow: 0 0 10px rgba(255,107,0,.8), 0 0 22px rgba(232,38,29,.5);
  border-radius: 2px; transform: skewX(-6deg); opacity: .9; pointer-events: none; }
.checker-strip { position: relative; background-size: 16px 16px; animation: hwCheckerRun 1.4s linear infinite; }
.checker-strip::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,107,0,.9), transparent); box-shadow: 0 0 8px rgba(255,107,0,.55);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 25% 75%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 25% 75%, transparent); }

/* ── ПОЛИРОВКА: ВАУ-приёмы (без коллизий) ── */
.topbar { overflow: hidden; }
.topbar::after { content: ""; position: absolute; left: -40%; bottom: 0; width: 40%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), #fff3d0, var(--accent2), transparent);
  box-shadow: 0 0 10px rgba(255,107,0,.7); animation: hwScan 4.2s linear infinite; pointer-events: none; }
.topbar::before { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 18%, var(--gold) 50%, var(--accent2) 82%, transparent); opacity: .6; pointer-events: none; }
.balance-chip { position: relative; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 16px rgba(246,196,83,.18);
  animation: hwCoinGlow 3.4s ease-in-out infinite; }
.balance-chip .coin { filter: drop-shadow(0 0 5px rgba(246,196,83,.7)); }
.balance-chip::after { content: ""; position: absolute; top: 0; left: -45%; width: 38%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,240,200,.42), transparent);
  transform: skewX(-18deg); animation: hwChipShine 5.5s ease-in-out infinite; pointer-events: none; }
.icon-btn { transition: transform .15s, box-shadow .2s, border-color .2s; }
.icon-btn::before { content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.10), transparent 55%); pointer-events: none; }
.icon-btn:hover, .icon-btn:active { transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 0 14px rgba(255,107,0,.28); }
.bg::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(36% 22% at 18% 12%, rgba(255,107,0,.06), transparent 70%),
             radial-gradient(40% 26% at 84% 8%, rgba(232,38,29,.05), transparent 72%);
  animation: hwHeadlights 9s ease-in-out infinite alternate; }
.bg-grid { -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 35%, transparent 78%);
                   mask-image: radial-gradient(120% 80% at 50% 0%, #000 35%, transparent 78%); }
.case-card { transition: transform .16s cubic-bezier(.2,.9,.3,1), box-shadow .25s, border-color .2s; }
.case-card:hover { transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0,0,0,.45), 0 0 0 1px color-mix(in srgb, var(--gold) 38%, transparent), 0 0 18px rgba(255,107,0,.22); }
.case-card:active { transform: translateY(-1px) scale(.99); }

/* ── @keyframes ── */
@keyframes hwlogoPulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(255,107,0,.45)) drop-shadow(0 0 2px rgba(232,38,29,.55)); }
  50%      { filter: drop-shadow(0 0 12px rgba(255,107,0,.85)) drop-shadow(0 0 4px rgba(232,38,29,.8)); } }
@keyframes hwCheckerRun { to { background-position: 32px 0; } }
@keyframes hwScan { to { left: 140%; } }
@keyframes hwCoinGlow { 50% { box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 0 24px rgba(246,196,83,.34); } }
@keyframes hwChipShine { 0%, 72% { left: -45%; } 86% { left: 130%; } 100% { left: 130%; } }
@keyframes hwHeadlights { to { opacity: .55; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  .logo-mark, .checker-strip, .topbar::after, .balance-chip, .balance-chip::after, .bg::before { animation: none !important; } }

/* ── LUXE (светлая тема) — тихие оверрайды ── */
[data-theme="luxe"] .logo-mark { animation: none; filter: drop-shadow(0 1px 2px rgba(40,30,20,.18)) saturate(.8) brightness(.97); opacity: .92; }
[data-theme="luxe"] .logo:hover .logo-mark, [data-theme="luxe"] .logo:active .logo-mark { transform: none; }
[data-theme="luxe"] .logo-text { transform: none; letter-spacing: 3px; font-weight: 700;
  background: linear-gradient(180deg, var(--gold), var(--accent2)); -webkit-background-clip: text; background-clip: text; filter: none; }
[data-theme="luxe"] .hero h1 { filter: none; }
[data-theme="luxe"] .hero h1::after { display: none; }
[data-theme="luxe"] .checker-strip { animation: none; }
[data-theme="luxe"] .checker-strip::before { display: none; }
[data-theme="luxe"] .topbar::after { display: none; }
[data-theme="luxe"] .topbar::before { background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .35; }
[data-theme="luxe"] .balance-chip { animation: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 0 8px rgba(184,151,63,.12); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
[data-theme="luxe"] .balance-chip::after { display: none; }
[data-theme="luxe"] .balance-chip .coin { filter: none; }
[data-theme="luxe"] .icon-btn:hover, [data-theme="luxe"] .icon-btn:active { transform: none; border-color: color-mix(in srgb, var(--accent) 40%, transparent); box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
[data-theme="luxe"] .bg::before { display: none; }
[data-theme="luxe"] .bg-grid { -webkit-mask-image: none; mask-image: none; }
[data-theme="luxe"] .case-card:hover { box-shadow: 0 10px 22px rgba(120,95,55,.18), 0 0 0 1px color-mix(in srgb, var(--gold) 30%, transparent); }

/* ═══════════════ ✨ ELITE (luxe) — читаемость + силуэты авто ✨ ═══════════════ */
/* сериф оставляем только крупным заголовкам/именам — остальное санс (читаемо) */
[data-theme="luxe"] .section-title, [data-theme="luxe"] .case-info h3, [data-theme="luxe"] .cat-name,
[data-theme="luxe"] .stock-name, [data-theme="luxe"] .reveal-name, [data-theme="luxe"] .modal h3,
[data-theme="luxe"] .lot-card .cat-name, [data-theme="luxe"] .hero h1, [data-theme="luxe"] .logo-text { font-family: var(--font-display); }
/* мелкие подписи/цены/значения — чуть жирнее для контраста на беже */
[data-theme="luxe"] .cat-value, [data-theme="luxe"] .stock-value, [data-theme="luxe"] .lot-price,
[data-theme="luxe"] .drop-chance, [data-theme="luxe"] .stock-total { color: var(--gold-deep); font-weight: 700; }
[data-theme="luxe"] .owner-note, [data-theme="luxe"] .gallery-intro,
[data-theme="luxe"] .demo-note { color: var(--muted); }

/* ═══════════════ ИГРЫ В ОДИН ЭКРАН — кнопки видны без прокрутки ═══════════════ */
#screen-drift.active, #screen-shift.active, #screen-tower.active, #screen-mines.active, #screen-drag.active {
  display: flex; flex-direction: column; gap: 6px;
  min-height: calc(100dvh - 156px);   /* высота за вычетом шапки и нижней навигации */
}
/* заголовок дублирует активный таб, интро — флавор-текст: прячем, чтобы влезли кнопки */
#screen-drift > .section-title, #screen-shift > .section-title, #screen-tower > .section-title,
#screen-mines > .section-title, #screen-drag > .section-title,
#screen-drift > .gallery-intro, #screen-shift > .gallery-intro, #screen-tower > .gallery-intro,
#screen-mines > .gallery-intro, #screen-drag > .gallery-intro { display: none; }
.screen.active > .game-tabs { margin-bottom: 0; flex: 0 0 auto; }
.screen.active > .drift-hist { padding: 2px 0 2px; flex: 0 0 auto; }

/* визуальные сцены (Лаунч/Шифт/Драг) — растягиваются, заполняя свободное место */
#screen-drift .drift-stage { flex: 1 1 auto; min-height: 150px; max-height: none; aspect-ratio: auto; }
#screen-shift .shift-stage { flex: 1 1 auto; min-height: 120px; max-height: none; aspect-ratio: auto; }
.shift-tach { margin-top: 6px; flex: 0 0 auto; }
.shift-tach .tach-leds { margin-bottom: 5px; }
.shift-tach .tach-bar { height: 36px; }
#screen-drag .drag-stage { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 200px; max-height: none; }
#screen-drag .drag-track { height: auto; flex: 1 1 auto; min-height: 0; }

/* сеточные сцены (Башня/Гаражи) — по контенту, компактно */
#screen-tower .tower-stage { flex: 0 1 auto; min-height: 0; padding: 10px; }
#screen-mines .mines-stage { flex: 0 1 auto; min-height: 0; padding: 10px; }
.tower-head, .mines-head { margin-bottom: 4px; }
.tower-floors { gap: 4px; }
.floor { padding: 3px 8px 3px 9px; }
.door { width: 34px; height: 28px; }
/* квадратный грид: явные ряды+колонки minmax(0,1fr) + aspect-ratio гасят «раздувание» клеток */
.mines-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(5, minmax(0, 1fr));
  aspect-ratio: 1 / 1; max-width: min(64vw, 30vh, 250px); gap: 5px; margin-top: 0; }
.mines-grid .cell { aspect-ratio: auto; }   /* размер задаёт грид, не сама клетка */
.mines-count { gap: 6px; }
.mines-hint { margin: 0; font-size: 11px; }

/* контролы плотнее и всегда внизу видимой области */
.drift-controls { margin-top: 6px; gap: 5px; flex: 0 0 auto; }
.drift-bet-quick .bet-quick { padding: 7px 0; }
.shift-diffs .shift-diff { padding: 7px 0; }
.drift-skins { padding: 5px 0 0; }
.drift-go, .tower-go, .mines-go, .drag-go, .shift-actions .shift-go { padding: 12px 16px; font-size: 16px; }
.bet-field input { font-size: 18px; }
.bet-step { font-size: 22px; width: 44px; }
.drift-auto { padding: 0; font-size: 12px; }

/* короткие экраны (≤700px высоты) — дожимаем сеточные игры, чтобы кнопки влезли */
@media (max-height: 700px) {
  #screen-drift.active, #screen-shift.active, #screen-tower.active, #screen-mines.active, #screen-drag.active { gap: 4px; min-height: calc(100dvh - 148px); }
  .drift-controls { gap: 4px; margin-top: 4px; }
  .drift-bet-quick .bet-quick, .shift-diffs .shift-diff { padding: 5px 0; font-size: 12px; }
  .drift-go, .tower-go, .mines-go, .drag-go, .shift-actions .shift-go { padding: 9px 16px; font-size: 15px; }
  .tower-head, .mines-head { margin-bottom: 3px; }
  .tower-floors { gap: 3px; }
  .floor { padding: 2px 8px; }
  .door { width: 32px; height: 23px; }
  .mines-hint, .mines-count { display: none; }   /* инфо-подсказку и степпер прячем — число шипов задают пресеты 1/3/5/10 */
  .mines-grid { max-width: min(56vw, 23vh, 200px); }
}
