/* ============================================================
   KARMA — общий стиль (интерфейс в духе Clash Royale: тёмная ночь, объёмные «сочные» кнопки).
   Разделы рисуются через эти классы, поэтому изменения здесь применяются ко всей игре сразу.
   Макет утверждён 2026-10-20.
   ============================================================ */

:root {
    --bg: #12101C;          /* ночной фон */
    --surface: #2A2342;     /* верх карточки */
    --surface-2: #1F1A31;   /* низ карточки */
    --edge: #3A3158;        /* обводки */
    --sole: #0D0A18;        /* «подошва» объёмных элементов */
    --line: rgba(255, 255, 255, 0.07);
    --text: #F3EFFF;
    --muted: #9D96BA;
    --gold: #F7C548;  --gold-2: #B7841C;
    --violet: #8B5CF6; --violet-2: #5B32C2;
    --green: #3DD68C; --green-2: #1E9A5C;
    --red: #F2605C;   --red-2: #B23431;
    --blue: #4FA8F7;
    --display: "Rubik", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
    --body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
    --radius: 18px;
    /* Цвет раздела для карточек (как у карточки профессии): фон-градиент, рамка, свечение */
    --acc: #8B5CF6; --acc-bg: #261A44; --acc-edge: rgba(139, 92, 246, 0.38); --acc-glow: rgba(139, 92, 246, 0.12);
}
#tab-fight      { --acc: #F2605C; --acc-bg: #3A1620; --acc-edge: rgba(242, 96, 92, 0.38);  --acc-glow: rgba(242, 96, 92, 0.12); }
#tab-business   { --acc: #F7C548; --acc-bg: #382A12; --acc-edge: rgba(247, 197, 72, 0.36); --acc-glow: rgba(247, 197, 72, 0.10); }
#tab-collection { --acc: #A78BFA; --acc-bg: #2A1B4A; --acc-edge: rgba(167, 139, 250, 0.40); --acc-glow: rgba(167, 139, 250, 0.12); }
#tab-clan       { --acc: #4FA8F7; --acc-bg: #13284A; --acc-edge: rgba(79, 168, 247, 0.38); --acc-glow: rgba(79, 168, 247, 0.12); }
#tab-games      { --acc: #3DD68C; --acc-bg: #0F3326; --acc-edge: rgba(61, 214, 140, 0.36); --acc-glow: rgba(61, 214, 140, 0.10); }
#tab-admin      { --acc: #9D96BA; --acc-bg: #2A2342; --acc-edge: var(--edge); --acc-glow: transparent; }

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { background: var(--bg); }

body {
    font-family: var(--body); font-weight: 700;
    color: var(--text);
    min-height: 100vh;
    background:
        radial-gradient(520px 300px at 50% -80px, rgba(139, 92, 246, 0.22), transparent 70%),
        radial-gradient(420px 280px at 100% 100%, rgba(247, 197, 72, 0.06), transparent 70%),
        var(--bg);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(247, 197, 72, 0.3); }

.app { max-width: 480px; margin: 0 auto; padding: 0 14px calc(110px + env(safe-area-inset-bottom)); }

h1, h2, h3, .display { font-family: var(--display); font-weight: 800; letter-spacing: 0.3px; }

/* ---------- шапка: аватар слева, Карма и золото справа ---------- */
.header {
    position: sticky; top: 0; z-index: 900;
    display: flex; align-items: center; gap: 10px;
    margin: 0 -14px; padding: 10px 14px 8px;
    background: rgba(18, 16, 28, 0.82);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.me { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; background: none; border: 0; color: inherit;
      cursor: pointer; padding: 0; text-align: left; font: inherit; box-shadow: none; position: relative; }
.me-avatar {
    position: relative; width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; font-size: 25px;
    background: linear-gradient(160deg, #3B2F6B, #241C44); border: 2px solid var(--gold); box-shadow: 0 3px 0 var(--gold-2);
}
.me-badge {
    position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); min-width: 22px; padding: 0 5px; height: 17px; border-radius: 9px;
    background: var(--blue); border: 2px solid var(--bg); font: 800 11px/13px var(--display); display: grid; place-items: center; color: white;
}
.me-badge:empty { display: none; }
.me-text { min-width: 0; }
.me-name { font: 800 17px/1.15 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-sub { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me.has-badge::after { top: -3px; left: 38px; right: auto; }
.purse { display: flex; gap: 6px; flex-shrink: 0; }

/* «Монетки» в шапке: золото (→ история) и Карма (→ магазин) */
.gold {
    position: relative; display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 10px 0 6px; border-radius: 10px;
    border: 0; cursor: pointer; background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1.5px var(--edge);
    color: var(--text); font: 800 14px/1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.gold-coin { font-size: 17px; line-height: 1; }
.gold.karma { box-shadow: inset 0 0 0 1.5px var(--violet); }
.karma-plus { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 5px; margin-left: 1px;
              background: var(--green); box-shadow: 0 2px 0 var(--green-2); color: #08301B; font: 800 13px/1 var(--display); }
.gold:active { transform: translateY(1px); }
.gold.flash-plus { animation: gold-flash-plus 0.6s ease-out; }
.gold.flash-minus { animation: gold-flash-minus 0.6s ease-out; }
@keyframes gold-flash-plus { 0% { box-shadow: inset 0 0 0 2px var(--green), 0 0 16px rgba(61, 214, 140, 0.7); } 100% { box-shadow: inset 0 0 0 1.5px var(--edge); } }
@keyframes gold-flash-minus { 0% { box-shadow: inset 0 0 0 2px var(--red), 0 0 16px rgba(242, 96, 92, 0.7); } 100% { box-shadow: inset 0 0 0 1.5px var(--edge); } }
.gold-delta {
    position: absolute; right: 6px; top: 100%; margin-top: 4px; padding: 2px 8px; border-radius: 8px; z-index: 5;
    font: 800 12px var(--display); pointer-events: none; animation: gold-delta 1.4s ease-out forwards;
}
.gold-delta.plus { color: var(--green); background: rgba(13, 10, 24, 0.9); }
.gold-delta.minus { color: var(--red); background: rgba(13, 10, 24, 0.9); }
@keyframes gold-delta { 0% { opacity: 0; transform: translateY(-6px); } 15% { opacity: 1; transform: translateY(0); } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(6px); } }
@media (max-width: 370px) { .gold { font-size: 13px; padding: 0 7px 0 5px; } .me-name { font-size: 15px; } }

/* ---------- быстрые кнопки под шапкой ---------- */
.quick { display: flex; gap: 8px; margin: 2px -14px 6px; padding: 2px 14px 4px; overflow-x: auto; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.side-btn { position: relative; flex-shrink: 0; width: 60px; background: none; border: 0; color: var(--text); cursor: pointer; font: inherit; padding: 0; box-shadow: none; }
.side-btn .disc {
    width: 50px; height: 50px; margin: 0 auto; border-radius: 15px; display: grid; place-items: center; font-size: 25px;
    background: linear-gradient(180deg, var(--surface), var(--surface-2)); box-shadow: inset 0 0 0 1.5px var(--edge), 0 3px 0 var(--sole);
}
.side-btn small { display: block; margin-top: 4px; font-size: 10.5px; color: var(--muted); text-align: center; white-space: nowrap; }
.side-btn:active .disc { transform: translateY(2px); box-shadow: inset 0 0 0 1.5px var(--edge), 0 1px 0 var(--sole); }
.side-btn.has-badge::after { top: -3px; right: 4px; }

/* ---------- нижняя панель: 5 разделов, «Бой» в центре ---------- */
.tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 950; margin: 0 auto; max-width: 480px;
    display: grid; grid-template-columns: 1fr 1fr 1.25fr 1fr 1fr; align-items: end; gap: 0;
    padding: 0 6px calc(8px + env(safe-area-inset-bottom)); height: calc(84px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(18, 16, 28, 0), #0E0C17 30%); border: none; border-radius: 0;
}
.tab-btn {
    position: relative; border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; padding: 6px 0 2px;
    display: flex; flex-direction: column; align-items: center; gap: 3px; box-shadow: none !important; min-width: 0;
}
/* Все вкладки одинаковые (центральная «Бой» — чуть крупнее); открытая — большой светящийся золотой квадрат */
.tab-btn .ic {
    width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 25px; line-height: 1;
    filter: grayscale(0.35) brightness(0.85); background: transparent; box-shadow: none;
    transition: transform 0.18s ease, background 0.18s, box-shadow 0.18s, width 0.18s, height 0.18s, font-size 0.18s;
}
.tab-btn .lbl { font: 800 11px var(--display); letter-spacing: 0.3px; white-space: nowrap; }
.tab-btn.center .ic { font-size: 29px; }
.tab-btn.active { color: var(--text); }
.tab-btn.active .ic {
    width: 50px; height: 50px; font-size: 28px; filter: none; transform: translateY(-10px);
    background: linear-gradient(180deg, #FFDC74, var(--gold)); box-shadow: 0 4px 0 var(--gold-2), 0 0 0 3px #0E0C17, 0 0 20px rgba(247, 197, 72, 0.55);
}
.tab-btn.center.active .ic { width: 54px; height: 54px; font-size: 31px; }
.tab-btn.active .lbl { margin-top: -10px; color: var(--gold); }
.has-badge::after { content: ''; position: absolute; top: 4px; right: 6px; width: 9px; height: 9px; border-radius: 50%;
                    background: var(--red); box-shadow: 0 0 0 2px var(--bg); z-index: 2; }
.tab-btn.has-badge::after { right: calc(50% - 20px); }

.tab { display: none; }
.tab.active { display: block; }
.tab.tab-enter { animation: tab-in 0.25s ease-out; }
.tab h2 { font-size: 22px; margin: 10px 2px 10px; }

/* ---------- подвкладки: «чипы» ---------- */
.subtabs { display: flex; gap: 6px; margin: 6px -14px 12px; padding: 0 14px; overflow-x: auto; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.sub-btn {
    flex-shrink: 0; position: relative; height: 34px; padding: 0 13px; border: 0; border-radius: 11px; cursor: pointer; white-space: nowrap;
    background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1.5px var(--edge); color: var(--muted); font: 800 13px var(--body);
}
.sub-btn.active { color: #2B1B00; background: linear-gradient(180deg, #FFD86A, var(--gold)); box-shadow: 0 3px 0 var(--gold-2); }
.sub-btn.has-badge::after { top: -3px; right: -3px; }
.subtab { display: none; }
.subtab.active { display: block; }
/* Свайп между подвкладками — новая въезжает с той стороны, куда листали */
.subtab.swipe-from-right { animation: swipe-in-right 0.25s ease-out; }
.subtab.swipe-from-left { animation: swipe-in-left 0.25s ease-out; }
@keyframes swipe-in-right { from { opacity: 0.3; transform: translateX(36px); } to { opacity: 1; transform: none; } }
@keyframes swipe-in-left { from { opacity: 0.3; transform: translateX(-36px); } to { opacity: 1; transform: none; } }

@keyframes tab-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes card-in { from { opacity: 0; transform: translateY(8px) scale(0.99); } to { opacity: 1; transform: none; } }

/* ---------- карточки ---------- */
.cards { display: grid; gap: 10px; }
.card {
    position: relative; isolation: isolate; overflow: hidden;
    background: linear-gradient(145deg, var(--acc-bg), var(--surface-2) 72%);
    border: 0; border-radius: var(--radius);
    padding: 14px; margin-bottom: 10px;
    box-shadow: inset 0 0 0 1.5px var(--acc-edge), 0 4px 0 var(--sole), 0 6px 22px var(--acc-glow);
}
/* Большой полупрозрачный смайлик в углу — ставит cards.js из заголовка карточки */
.card-wm {
    position: absolute; right: -12px; top: -16px; z-index: -1; font-size: 84px; line-height: 1;
    opacity: 0.11; pointer-events: none; user-select: none; transform: rotate(-8deg);
}
.card h3 img.emj { filter: drop-shadow(0 0 8px var(--acc-glow)) drop-shadow(0 0 3px var(--acc-edge)); }
.tab.tab-enter .card { animation: card-in 0.3s ease-out both; }
.tab.tab-enter .card:nth-child(2) { animation-delay: 0.03s; }
.tab.tab-enter .card:nth-child(3) { animation-delay: 0.06s; }
.tab.tab-enter .card:nth-child(4) { animation-delay: 0.09s; }
.card h3 { font-size: 17px; margin-bottom: 8px; color: var(--text); }

.info-block {
    background: linear-gradient(145deg, var(--acc-bg), var(--surface-2) 72%);
    box-shadow: inset 0 0 0 1.5px var(--acc-edge), 0 4px 0 var(--sole);
    padding: 14px; border-radius: var(--radius); line-height: 1.6;
}

/* ---------- кнопки: объёмные, при нажатии опускаются ---------- */
button {
    font-family: inherit; font-weight: 800;
    transition: transform 0.06s ease, filter 0.15s, opacity 0.15s, box-shadow 0.06s;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.38);
}
button:not(:disabled):active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.38); }
button:disabled { cursor: not-allowed; box-shadow: none; opacity: 0.75; }
.card button { padding: 10px; background: linear-gradient(180deg, #FFDC74, var(--gold)); color: #3A2600; border: none; border-radius: 12px; font-weight: 800; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- поля ввода ---------- */
input, select, textarea { font-family: inherit; font-size: 14px; outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.card input, .card select {
    width: 100%; padding: 10px; background: var(--sole); color: var(--text);
    border: 1.5px solid var(--edge); border-radius: 11px; font-weight: 700;
}
input:focus, select:focus { border-color: var(--gold) !important; box-shadow: 0 0 0 3px rgba(247, 197, 72, 0.15); }
input::placeholder { color: #6B6588; }

/* ---------- 👤 профиль — лист снизу (секция tab-home) ---------- */
.home-scrim { position: fixed; inset: 0; z-index: 960; background: rgba(5, 4, 10, 0.6); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.home-scrim.open { opacity: 1; pointer-events: auto; }
.tab.home-sheet {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 970; margin: 0 auto; max-width: 480px;
    max-height: 92vh; overflow-y: auto; padding: 10px 14px calc(24px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, #262040, var(--surface-2) 140px); border-radius: 24px 24px 0 0; box-shadow: 0 -1.5px 0 var(--edge);
    transform: translateY(105%); visibility: hidden; transition: transform 0.28s cubic-bezier(.2, .9, .3, 1.05), visibility 0s 0.28s;
    scrollbar-width: none;
}
.tab.home-sheet.open { transform: none; visibility: visible; transition: transform 0.28s cubic-bezier(.2, .9, .3, 1.05); }
.sheet-grab { width: 44px; height: 5px; border-radius: 3px; background: var(--edge); margin: 0 auto 6px; }
.sheet-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 11px; border: 0; cursor: pointer;
           background: rgba(255, 255, 255, 0.07); color: var(--text); font: 800 16px var(--display); box-shadow: none; z-index: 2; }
.prof-hero { text-align: center; padding: 8px 0 2px; }
.prof-avatar { position: relative; width: 84px; height: 84px; margin: 0 auto; border-radius: 24px; display: grid; place-items: center; font-size: 46px;
               background: linear-gradient(160deg, #3B2F6B, #241C44); border: 3px solid var(--gold); box-shadow: 0 0 22px rgba(247, 197, 72, 0.3), 0 4px 0 var(--gold-2); }
.prof-avatar .me-badge { height: 22px; font-size: 13px; bottom: -11px; padding: 0 8px; }
.nick-row { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; max-width: 100%; }
.nick-row #profile-nick { font: 800 25px/1.2 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pencil { width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; border: 0; cursor: pointer; background: rgba(255, 255, 255, 0.08); color: var(--text); font-size: 14px; box-shadow: none; }
.nick-edit { display: none; gap: 6px; margin: 10px auto 0; max-width: 320px; }
.nick-edit.on { display: flex; }
.nick-edit input { flex: 1; min-width: 0; height: 40px; border-radius: 11px; border: 0; padding: 0 12px; background: var(--sole); color: var(--text);
                   font: 800 15px var(--body); box-shadow: inset 0 0 0 1.5px var(--gold); }
.nick-edit button { height: 40px; padding: 0 14px; border: 0; border-radius: 11px; cursor: pointer; background: linear-gradient(180deg, #5EEBA6, var(--green));
                    box-shadow: 0 3px 0 var(--green-2); color: #06301A; font: 800 15px var(--display); }
.nick-hint-line { font-size: 11px; color: var(--muted); margin-top: 4px; }
.title-pill { display: inline-block; margin-top: 4px; padding: 3px 10px; border-radius: 8px; background: rgba(247, 197, 72, 0.12); color: var(--gold); font-size: 12px; }
.title-pill:empty { display: none; }
.prof-line { margin-top: 8px; font-size: 12px; color: var(--muted); }
.prof-bonuses { margin-top: 8px; display: flex; flex-direction: column; gap: 2px; align-items: center; }
.menu { display: grid; gap: 8px; margin: 14px 0 6px; }
.menu > button, .menu > a {
    display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border: 0; border-radius: 14px; cursor: pointer; width: 100%;
    color: var(--text); font: 800 14px var(--body); text-align: left; text-decoration: none;
    background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1.5px var(--edge), 0 3px 0 var(--sole);
}
.menu .m-ic { font-size: 20px; width: 26px; text-align: center; flex-shrink: 0; }
.menu .m-go { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ---------- 📦 кейсы: витрина из трёх «ящиков» ---------- */
.case-shop { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.case-box {
    position: relative; overflow: hidden; cursor: pointer; min-width: 0; padding: 12px 6px 8px; border-radius: 16px; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 3px; transition: transform 0.1s;
    background: radial-gradient(circle at 50% 26%, var(--c2), transparent 62%), linear-gradient(180deg, #2A2342, #17132A);
    box-shadow: inset 0 0 0 1.5px var(--c2), 0 4px 0 var(--sole);
}
.case-box:active { transform: translateY(2px); }
.case-box.legend { box-shadow: inset 0 0 0 1.5px var(--c), 0 4px 0 var(--sole), 0 0 18px var(--c3); }
.case-box.legend::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; transform: translateX(-100%);
    background: linear-gradient(105deg, transparent 40%, rgba(255, 230, 150, 0.22) 50%, transparent 60%); animation: case-shine 3.2s ease-in-out infinite;
}
.case-ic { font-size: 44px; line-height: 1; margin: 2px 0 4px; filter: drop-shadow(0 4px 10px var(--c2)); animation: case-float 3s ease-in-out infinite; }
.case-box:nth-child(2) .case-ic { animation-delay: -1s; }
.case-box:nth-child(3) .case-ic { animation-delay: -2s; }
.case-name { font: 900 14px var(--display); color: var(--c); text-shadow: 0 2px 0 var(--sole); }
.case-line { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.card .case-buy {
    margin-top: 6px; width: 100%; padding: 7px 4px; border-radius: 11px; white-space: nowrap; font: 900 12.5px var(--display);
    background: linear-gradient(180deg, #5BE3A2, var(--green)); color: #05301B; box-shadow: 0 3px 0 var(--green-2);
}
.card .case-buy.poor { background: var(--edge); color: var(--red); box-shadow: 0 3px 0 var(--sole); }
.case-buy s { display: block; font-size: 9.5px; opacity: 0.65; }
.case-hero { font-size: 72px; text-align: center; line-height: 1; filter: drop-shadow(0 0 20px var(--c)); }
.case-hero.shaking { animation: case-shake 0.35s ease-in-out infinite; }
.case-hero.burst { animation: case-burst 0.6s ease-out; }
@keyframes case-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes case-shine { 0%, 55% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes case-shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg) scale(1.03); } 75% { transform: rotate(6deg) scale(1.03); } }
@keyframes case-burst { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* ---------- 🔐 сейф: стальная дверца, кодовые барабаны, штурвал ---------- */
.vault { position: relative; max-width: 330px; margin: 0 auto; perspective: 1000px; }
.vault-inside {
    position: absolute; inset: 6px; border-radius: 20px; display: grid; place-items: center;
    background: radial-gradient(circle at 50% 45%, #7A5410, #241705 70%); box-shadow: inset 0 0 30px #000, inset 0 0 0 4px #15100A;
}
.vault-door {
    position: relative; z-index: 1; padding: 16px 14px 14px; border-radius: 22px; transform-origin: left center;
    transition: transform 1.2s cubic-bezier(0.35, 0.1, 0.2, 1);
    background: linear-gradient(160deg, #5C6577, #3A4152 40%, #272C38);
    box-shadow: inset 0 0 0 2px #707A8F, inset 0 0 0 7px #2B303C, inset 0 0 0 8px #4D5567, 0 6px 0 var(--sole), 0 12px 30px rgba(0, 0, 0, 0.45);
}
.vault.open .vault-door { transform: rotateY(-105deg); }
.vault.alarm .vault-door { animation: vault-alarm 0.5s ease-in-out 4; }
.rivet { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #C9D1E3, #4D5567 70%); box-shadow: 0 1px 0 #1A1E29; }
.vault-plate { font: 900 10px var(--display); letter-spacing: 3px; color: #AEB6C8; text-shadow: 0 1px 0 #1A1E29; }
.lamps { display: flex; justify-content: center; gap: 6px; margin: 8px 0 10px; }
.lamp { width: 10px; height: 10px; border-radius: 50%; background: #1A1E29; box-shadow: inset 0 1px 2px #000; }
.lamp.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.lamp.used { background: #7A2422; }
.lamp.win { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.dial-window {
    display: flex; justify-content: center; gap: 8px; padding: 10px; border-radius: 14px;
    background: #12151D; box-shadow: inset 0 3px 8px #000, 0 1px 0 #707A8F;
}
.drum { width: 62px; display: flex; flex-direction: column; gap: 5px; }
.card .drum-btn {
    height: 28px; padding: 0; border-radius: 8px; font-size: 12px; color: #DDE3EF;
    background: linear-gradient(180deg, #5C6577, #3A4152); box-shadow: 0 3px 0 #1A1E29;
}
.drum-face {
    height: 96px; overflow: hidden; border-radius: 10px; touch-action: none; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(180deg, #1B1F2A 0%, #9AA2B2 22%, #F4F6FA 50%, #9AA2B2 78%, #1B1F2A 100%);
    box-shadow: inset 0 0 0 2px #2B303C; transition: box-shadow 0.2s;
}
.drum-digits { display: flex; flex-direction: column; align-items: center; color: #1A1E29; }
.drum-digits span { height: 32px; line-height: 32px; }
.drum-digits .cur { font: 900 32px var(--display); }
.drum-digits .dim { font: 800 20px var(--display); opacity: 0.4; }
.drum-digits.spin-up { animation: drum-up 0.18s ease-out; }
.drum-digits.spin-down { animation: drum-down 0.18s ease-out; }
.drum.hit .drum-face { box-shadow: inset 0 0 0 2px #2B303C, 0 0 0 3px var(--green), 0 0 16px var(--green); }
.drum.near .drum-face { box-shadow: inset 0 0 0 2px #2B303C, 0 0 0 3px #E5AE22, 0 0 14px #E5AE22; }
.drum.miss .drum-face { box-shadow: inset 0 0 0 2px #2B303C, 0 0 0 3px #5B6170; }
.drum.dup .drum-face, .drum.alarm .drum-face { box-shadow: inset 0 0 0 2px #2B303C, 0 0 0 3px var(--red), 0 0 14px var(--red); }
.card .vault-wheel {
    position: relative; display: block; width: 72px; height: 72px; margin: 14px auto 2px; padding: 0; border-radius: 50%;
    background: radial-gradient(circle, #2B303C 30%, #5C6577 32%, #3A4152 60%, #272C38 62%, #8C95A8 64%, #4D5567 72%);
    box-shadow: 0 4px 0 var(--sole); transition: transform 0.5s;
}
.card .vault-wheel:not(:disabled):active { transform: rotate(45deg); box-shadow: 0 4px 0 var(--sole); }
.vault-wheel.turning { animation: wheel-turn 0.8s linear infinite; }
.vault-wheel .spoke { position: absolute; left: 50%; top: 5px; bottom: 5px; width: 8px; margin-left: -4px; border-radius: 4px; background: linear-gradient(90deg, #8C95A8, #DDE3EF, #8C95A8); }
.vault-wheel .hub { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
                    background: radial-gradient(circle at 35% 35%, #FFE7A0, var(--gold) 55%, var(--gold-2)); }
.card .safe-input {
    display: block; width: 100%; max-width: 230px; margin: 10px auto 0; padding: 9px 10px; text-align: center; border-radius: 12px;
    background: #12151D; color: #F4F6FA; border: 1.5px solid #4D5567; box-shadow: inset 0 2px 6px #000;
    font: 900 20px var(--display); letter-spacing: 8px;
}
.card .safe-input:focus { border-color: var(--gold); }
.safe-input::placeholder { font: 700 13px var(--body); letter-spacing: 0; color: #8C95A8; }
.vault-hint { font-size: 11px; color: #AEB6C8; margin-top: 4px; }
.vault-status { margin-top: 12px; font-size: 13px; color: var(--muted); }
.safe-log { margin-top: 12px; padding: 10px; border-radius: 14px; background: rgba(13, 10, 24, 0.5); }
.safe-log-title { font: 800 11px var(--display); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.safe-log-row { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 4px 0; }
.safe-log-row .n { width: 18px; font-size: 11px; color: var(--muted); }
.safe-pin { width: 30px; height: 30px; border-radius: 8px; display: inline-grid; place-items: center; font: 900 15px var(--display); color: #fff; }
.safe-pin.hit { background: var(--green-2); }
.safe-pin.near { background: #C08A12; }
.safe-pin.miss { background: #4A4560; }
.safe-legend { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 6px; margin-top: 8px; font-size: 11px; color: var(--muted); }
.safe-legend .safe-pin { width: 12px; height: 12px; border-radius: 4px; }
@keyframes drum-up { from { transform: translateY(32px); } to { transform: none; } }
@keyframes drum-down { from { transform: translateY(-32px); } to { transform: none; } }
@keyframes wheel-turn { to { transform: rotate(360deg); } }
@keyframes vault-alarm { 0%, 100% { transform: none; filter: none; } 25% { transform: translateX(-4px); } 50% { filter: drop-shadow(0 0 14px var(--red)); } 75% { transform: translateX(4px); } }

/* ---------- прокрутка ---------- */
* { scrollbar-width: thin; scrollbar-color: var(--edge) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--edge); border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
    .tab.tab-enter, .tab.tab-enter .card, .subtab.swipe-from-right, .subtab.swipe-from-left { animation: none; }
    button, .tab.home-sheet, .home-scrim, .vault-door { transition: none; }
    .case-ic, .case-box.legend::after, .case-hero, .drum-digits, .vault-wheel, .vault.alarm .vault-door { animation: none !important; }
}
