@font-face { font-family: "SF Pro"; src: url(sf-pro-var-latin-cyrillic.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

/* цвета фона подарка анимируются плавно при смене бэкдропа */
@property --c { syntax: "<color>"; inherits: true; initial-value: #333; }
@property --e { syntax: "<color>"; inherits: true; initial-value: #222; }
@property --p { syntax: "<color>"; inherits: true; initial-value: #111; }

:root {
    --bg: #000;
    --card: #1c1c1e;
    --well: #2a2a2e;
    --ring: #28282c;
    --edge: #333338;
    --line: rgba(255, 255, 255, .08);
    --text: #fafafa;
    --hint: #8c8c8c;
    --idle: #e0e2e8;
    --ink: #a8c7ef;
    --slate: #8191a9;
    --glow: #4b6c9c;
    --lose: #ff6b6b;
    --nav-sel: #303034;
    --fill: rgba(255, 255, 255, .08);
    /* кнопка TIER (tier-configure.css .cfg-cta) */
    --cta: #8191a9;
    --cta-off: color-mix(in srgb, #fafafa 11%, #121214);
    --cta-off-ink: color-mix(in srgb, #fafafa 40%, #121214);
    --ease: cubic-bezier(.22, 1, .36, 1);
    --spring: cubic-bezier(.32, .72, 0, 1);
    --safe-b: env(safe-area-inset-bottom, 0px);
    color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
html { scrollbar-width: none; }
body {
    min-height: 100dvh;
    font: 400 15px/1.3 -apple-system, "SF Pro", "Roboto", sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    user-select: none;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
img { display: block; }
[hidden] { display: none !important; }
.ton-i { width: 22px; height: 22px; flex: none; }

.glow {
    position: absolute; inset: 0 0 auto; height: 420px; z-index: -1; pointer-events: none; overflow: hidden;
    background:
        linear-gradient(to top, var(--bg) 0, rgba(0,0,0,.6) 38%, transparent 78%),
        linear-gradient(var(--glow) -24%, transparent 82%);
}
.glow::before {
    content: ""; position: absolute; top: -40%; left: -30%; width: 90%; height: 120%;
    background: radial-gradient(closest-side, rgba(129,145,169,.45), transparent);
    animation: drift 14s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate(55%, 12%); } }

/* ---------- шапка ---------- */
.top { display: flex; align-items: center; justify-content: space-between; padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 0; }
.me {
    display: flex; align-items: center; gap: 8px; height: 42px; padding: 4px 16px 4px 4px;
    border-radius: 999px; background: rgba(28,28,30,.72); border: 1px solid var(--edge);
}
.ava {
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none; overflow: hidden;
    background: #3a3a3e center / cover no-repeat; color: #8e8e93;
}
.ava::before {
    content: ""; width: 62%; height: 62%; background: currentColor;
    -webkit-mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a4.6 4.6 0 1 0 0-9.2 4.6 4.6 0 0 0 0 9.2Zm0 2.2c-4.6 0-8.4 2.6-8.4 5.8 0 .9.7 1.6 1.6 1.6h13.6c.9 0 1.6-.7 1.6-1.6 0-3.2-3.8-5.8-8.4-5.8Z'/%3E%3C/svg%3E");
    mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a4.6 4.6 0 1 0 0-9.2 4.6 4.6 0 0 0 0 9.2Zm0 2.2c-4.6 0-8.4 2.6-8.4 5.8 0 .9.7 1.6 1.6 1.6h13.6c.9 0 1.6-.7 1.6-1.6 0-3.2-3.8-5.8-8.4-5.8Z'/%3E%3C/svg%3E");
}
.ava.has-photo::before { display: none; }
.me-name { font-weight: 600; font-size: 15px; }
.bal {
    display: flex; align-items: center; gap: 7px; height: 42px; padding: 0 5px 0 9px;
    border-radius: 999px; background: rgba(129,145,169,.26); border: 1px solid rgba(174,187,205,.28);
    transition: transform .2s var(--ease);
}
.bal:active { transform: scale(.96); }
.bal .ton-i { width: 24px; height: 24px; }
.bal b { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; transition: color .3s; }
.bal.is-up b { color: var(--ink); } .bal.is-down b { color: #ff9c9c; }
.bal-plus { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.14); }
.bal-plus svg { width: 20px; height: 20px; }

main { padding: 0 8px calc(var(--safe-b) + 110px); }
.view { display: none; padding-top: 12px; }
.view.is-active { display: block; }
.view.is-active > * { animation: rise .4s var(--ease) both; }
.view.is-active > *:nth-child(2) { animation-delay: .04s; }
.view.is-active > *:nth-child(3) { animation-delay: .08s; }
.view.is-active > *:nth-child(4) { animation-delay: .12s; }
.view.is-active > *:nth-child(n+5) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* плоская карточка TIER: #1c1c1e, без бевелей и градиентов */
.card, .gb-card { border-radius: 24px; background: var(--card); }

/* ---------- кнопка TIER ---------- */
.cta {
    position: relative; overflow: hidden; display: block; width: 100%; height: 52px; margin-top: 8px; padding: 0 20px;
    border-radius: 999px; background: var(--cta); color: #fff;
    font-size: 16px; font-weight: 590; line-height: 52px; letter-spacing: -.01em; white-space: nowrap; text-overflow: ellipsis;
    transition: transform .14s var(--ease), background-color .18s ease;
}
.cta::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 42%; pointer-events: none;
    background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,.06) 34%, rgba(255,255,255,.55) 50%, rgba(255,255,255,.06) 66%, transparent 100%);
    transform: translateX(-160%); animation: sheen 4.4s linear infinite;
}
@keyframes sheen { 0% { transform: translateX(-160%); } 26%, 100% { transform: translateX(340%); } }
.cta:active:not(:disabled) { transform: scale(.97); }
.cta:disabled { background: var(--cta-off); color: var(--cta-off-ink); }
.cta:disabled::after { content: none; }
.cta.is-cash { background: #5d86c4; }

.text-btn { display: block; margin: 8px auto 0; height: 44px; width: 100%; border-radius: 999px; background: var(--fill); color: var(--idle); font-size: 15px; font-weight: 600; transition: transform .14s var(--ease); }
.text-btn:active { transform: scale(.97); }
.lbl { display: block; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--hint); }

.disc-pill {
    position: absolute; left: 50%; bottom: -14px; translate: -50% 0; z-index: 5; height: 28px; padding: 0 12px;
    display: flex; align-items: center; gap: 4px; border-radius: 999px; background: #303034; border: 1px solid var(--line);
    color: var(--ink); font-size: 14px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums;
}

/* ---------- частицы ---------- */
.fx { position: absolute; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; border-radius: inherit; }
.fx i {
    position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); margin: calc(var(--s) / -2);
    border-radius: 50%; background: var(--c); opacity: 0;
    animation: burst var(--d) cubic-bezier(.15,.7,.3,1) forwards;
}
@keyframes burst {
    0% { opacity: 1; transform: translate(0, 0) scale(.4); }
    70% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1); }
}
.shake { animation: shake .45s; }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

/* ---------- плитка подарка: фон, узор, модель — каждый слой меняется плавно ---------- */
.gift {
    position: relative; overflow: hidden; border-radius: 18px; aspect-ratio: 1; isolation: isolate;
    background: radial-gradient(circle at 50% 42%, var(--c), var(--e) 78%);
    transition: --c .9s ease, --e .9s ease, --p .9s ease;
}
.gift::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(circle at 50% 45%, var(--c) 18%, transparent 62%); }
.gift .pat {
    position: absolute; inset: -10%; z-index: 0; background: var(--p); opacity: .45;
    -webkit-mask-image: var(--s); mask-image: var(--s); -webkit-mask-size: 18%; mask-size: 18%; -webkit-mask-repeat: space; mask-repeat: space;
    transition: opacity .7s ease;
}
.gift .pat.off { opacity: 0; }
.gift .mdl {
    position: absolute; z-index: 1; left: 13%; top: 13%; width: 74%; height: 74%; object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,.28)); transition: opacity .5s ease, transform .6s var(--ease);
}
.gift .mdl.off { opacity: 0; transform: scale(.7); }

/* ---------- апгрейд (геометрия Gift Boom) ---------- */
.up-stage { position: relative; overflow: hidden; display: flex; justify-content: center; padding: 28px 12px 26px; }
.up-stage::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .5s;
    background: radial-gradient(60% 55% at 50% 50%, rgba(168,199,239,.22), transparent 70%);
}
.up-stage.is-spin::before, .up-stage.is-win::before { opacity: 1; }
.corner {
    position: absolute; z-index: 31; top: 12px; width: 28px; height: 28px; border-radius: 50%;
    display: grid; place-items: center; background: #3a3a3e; color: var(--idle); transition: transform .14s var(--ease);
}
.corner:active { transform: scale(.9); }
.corner svg { width: 20px; height: 20px; }
.corner-r { right: 12px; }
.up-pointer { position: absolute; z-index: 30; top: 8px; width: 28px; height: 28px; rotate: -135deg; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); transform-origin: 30% 30%; }
.up-wheel-wrap { position: relative; }
.up-wheel { position: relative; width: 280px; height: 280px; border-radius: 50%; background: var(--ring); will-change: transform; }
.up-arc { position: absolute; inset: 0; width: 100%; height: 100%; rotate: -90deg; pointer-events: none; }
#upArc { stroke: var(--ink); transition: stroke-dasharray .7s var(--ease); }
.up-ticks { position: absolute; inset: 0; width: 100%; height: 100%; }
.tk { fill: #5c5c62; }
.tk.is-major { fill: rgba(174,187,205,.7); }
.up-wheel.has-arc .tk.in { fill: rgba(11,14,20,.5); }
.up-core { position: absolute; inset: 28px; border-radius: 50%; background: var(--card); display: grid; place-items: center; transition: box-shadow .4s; }
.up-gift { width: 140px; height: 140px; }
.up-gift > div { width: 100%; height: 100%; }
.lottie { animation: appear .45s var(--ease) both; }
@keyframes appear { from { opacity: 0; transform: scale(.8); } }
.up-orbits { position: absolute; inset: 20px 0 0; pointer-events: none; z-index: 29; }
.up-orbits i { position: absolute; left: 50%; top: 50%; background: center / contain no-repeat url(ton-mark.svg); }
.up-stage.is-win .up-core { box-shadow: 0 0 0 3px var(--ink), 0 0 50px rgba(168,199,239,.5); }
.up-stage.is-lose .up-core { box-shadow: 0 0 0 3px var(--lose); }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; padding: 8px; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 10px 18px; border-radius: 18px; background: var(--well); min-width: 0; transition: transform .16s var(--ease); }
.slot:active { transform: scale(.97); }
.slot-h { font-weight: 600; font-size: 15px; }
.slot-body { position: relative; width: 96px; height: 96px; }
.slot-add { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; border: 1.5px dashed rgba(255,255,255,.2); }
.slot-add svg { width: 30px; height: 30px; color: #8e8e93; }
.slot-body .gift { width: 100%; height: 100%; border-radius: 50%; animation: appear .4s var(--ease) both; }
.slot-ton { display: grid; place-items: center; width: 100%; height: 100%; animation: appear .4s var(--ease) both; }
.slot-ton img { width: 100%; height: 100%; }
.slot-price {
    position: absolute; left: 50%; bottom: -10px; translate: -50% 0; white-space: nowrap; display: flex; align-items: center; gap: 3px; z-index: 2;
    height: 24px; padding: 0 10px 0 6px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #303034; border: 1px solid var(--line);
}
.slot-price img { width: 14px; height: 14px; }
.slot-stack { position: absolute; z-index: 2; top: -2px; right: -2px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--ink); color: #0b0e14; font-size: 12px; font-weight: 800; display: grid; place-items: center; }

/* ---------- лестница: раскладка Portals, плоские клетки TIER ---------- */
.ld-stage { position: relative; overflow: hidden; padding: 12px 12px 8px; }
.ld-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px 10px; }
.ld-prize { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ld-prize-art { width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--well); overflow: hidden; }
.ld-prize-art .gift { width: 100%; height: 100%; border-radius: 14px; animation: appear .45s var(--ease) both; }
.ld-prize-art .empty-art { width: 100%; height: 100%; background: center / 46% no-repeat url(ton-mark.svg); opacity: .25; }
.ld-prize-t { min-width: 0; }
.ld-prize-t b { display: block; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-prize-t span { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--hint); font-variant-numeric: tabular-nums; }
.ld-prize-t span img { width: 14px; height: 14px; }
.ld-x { flex: none; font-size: 24px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.ld-x.bump { animation: pump .45s var(--ease); }
@keyframes pump { 35% { transform: scale(1.18); } }

.ld-board { position: relative; display: flex; flex-direction: column-reverse; }
.row { position: relative; display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 6px; padding: 4px 0; }
.row + .row { border-bottom: 1px solid var(--line); }
.row-mult { font-size: 15px; font-weight: 500; color: var(--hint); font-variant-numeric: tabular-nums; transition: color .3s; }
.row.is-now .row-mult { color: var(--ink); font-weight: 700; }
.row.is-done .row-mult { color: var(--idle); }
.cells { display: flex; justify-content: center; gap: 6px; }
.cell {
    flex: 1 1 0; max-width: 56px; aspect-ratio: 1; display: grid; place-items: center; padding: 0; overflow: hidden;
    border-radius: 16px; background: var(--well); transition: background .25s, transform .15s var(--ease), opacity .3s;
}
.row:not(.is-now):not(.is-done) .cell { opacity: .45; }
.row.is-now .cell:not(:disabled) { background: #36363c; box-shadow: inset 0 0 0 1.5px rgba(168,199,239,.4); }
.row.is-now .cell:active:not(:disabled) { transform: scale(.9); }
.cell svg { width: 42%; height: 42%; }
.cell img { width: 78%; height: 78%; object-fit: contain; }
.cell.is-safe { background: var(--ink); color: #0b1a33; animation: pop .4s var(--ease) both; }
.cell.is-bomb { background: rgba(255,107,107,.22); color: var(--lose); animation: pop .35s var(--ease) both; }
.cell.is-hit { background: var(--lose); color: #1a0606; }
@keyframes pop { from { transform: scale(.6); } }
.act-row { display: flex; gap: 8px; margin-top: 8px; }
.act-row .cta { margin: 0; flex: 1; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex: 0 0 148px; height: 52px; padding: 0 8px; border-radius: 999px; background: var(--card); }
.stepper:has(button:disabled) { opacity: .5; }
.step-b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #3a3a3e; flex: none; transition: transform .12s var(--ease); }
.step-b:active { transform: scale(.88); }
.step-b svg { width: 10px; height: 10px; }
.step-v { display: flex; align-items: center; gap: 4px; min-width: 0; }
.step-v b { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.step-v img { width: 16px; height: 16px; }

.seg-pill { position: relative; display: flex; gap: 4px; height: 44px; margin-top: 8px; padding: 4px; border-radius: 999px; background: var(--card); }
.seg-pill::before {
    content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 16px) / 3); border-radius: 999px; background: var(--nav-sel);
    transform: translateX(calc(var(--seg, 1) * (100% + 4px))); transition: transform .35s var(--spring);
}
.seg-pill button { position: relative; z-index: 1; flex: 1; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--idle); transition: color .25s; }
.seg-pill button.is-on { color: var(--ink); }
.seg-pill button:disabled:not(.is-on) { opacity: .4; }

/* ---------- кузница: крафт casemint в стиле TIER ---------- */
.fg-slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 10px; position: relative; }
.fg-slot { position: relative; aspect-ratio: 1; border-radius: 16px; border: 1.5px dashed rgba(255,255,255,.14); display: grid; place-items: center; color: #5c5c62; font-size: 15px; font-weight: 700; transition: transform .15s var(--ease); }
.fg-slot.has-gift { border: 0; }
.fg-slot .gift { position: absolute; inset: 0; border-radius: 16px; animation: appear .35s var(--ease) both; }
.fg-slot:active { transform: scale(.93); }
.fg-slot.is-fly .gift { animation: suck .6s cubic-bezier(.5,0,.8,.4) forwards; }
@keyframes suck { to { transform: translate(var(--tx), var(--ty)) scale(.2); opacity: 0; } }
.fg-sum { margin-top: 8px; padding: 16px 14px 14px; }
.fg-cols { display: grid; grid-template-columns: 1fr 1fr; }
.fg-cols > div + div { border-left: 1px solid var(--line); padding-left: 14px; }
.fg-cols b { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fg-cols b img { width: 20px; height: 20px; }
.fg-r b { font-size: 17px; color: var(--ink); }
.fg-bar { display: flex; gap: 3px; height: 8px; margin: 16px 0 6px; }
.fg-bar i { border-radius: 99px; }
.fg-bar i:nth-child(1) { background: rgba(255,107,107,.55); }
.fg-bar i:nth-child(2) { background: rgba(224,226,232,.35); }
.fg-bar i:nth-child(3) { background: var(--ink); }
.fg-legend { display: grid; grid-template-columns: 55fr 30fr 15fr; font-size: 11px; color: var(--hint); font-variant-numeric: tabular-nums; }
.fg-legend span { white-space: nowrap; }
.fg-legend span:last-child { text-align: right; }
.fg-sum .cta { margin-top: 14px; }

/* сетки подарков */
.gb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sheet .gb-grid { max-height: min(430px, calc(100dvh - 330px)); overflow-y: auto; border-radius: 22px; scrollbar-width: none; overscroll-behavior: contain; }
.inv-grid { margin-bottom: 8px; }
.gb-pick {
    position: relative; display: flex; flex-direction: column; min-width: 0; padding: 6px 6px 8px; border-radius: 22px;
    background: var(--card); text-align: left;
    animation: appear .35s var(--ease) both; animation-delay: calc(min(var(--n, 0), 12) * 25ms);
    transition: transform .15s var(--ease);
}
.gb-pick:active:not(:disabled) { transform: scale(.95); }
.gb-pick .gift { border-radius: 17px; }
.gb-pick-t { display: flex; flex-direction: column; padding: 7px 4px 0; min-width: 0; }
.gb-pick-t b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gb-pick-t small { font-size: 11px; color: var(--hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gb-foot { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: 6px; }
.gb-price { display: flex; align-items: center; gap: 3px; height: 24px; padding: 0 9px 0 5px; border-radius: 999px; background: var(--fill); font-size: 12px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gb-price img { width: 14px; height: 14px; }
.gb-ch { position: absolute; z-index: 3; top: 12px; left: 12px; height: 22px; padding: 0 8px; display: grid; place-items: center; border-radius: 999px; background: rgba(0,0,0,.55); backdrop-filter: blur(8px); font-size: 11.5px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.gb-pick.is-on { box-shadow: inset 0 0 0 2px var(--ink); }
.gb-pick.is-on::after {
    content: ""; position: absolute; z-index: 3; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%;
    background: var(--ink) center / 13px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b0e14' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
    animation: appear .3s var(--ease) both;
}
.gb-empty, .pf-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 26px 0; color: var(--hint); font-size: 14px; }
.gb-empty svg, .pf-empty svg { width: 46px; height: 46px; stroke: #5c5c62; }

/* ---------- профиль ---------- */
.pf-head { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 16px 20px; }
.pf-head::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(70% 70% at 50% 0%, rgba(75,108,156,.3), transparent 70%); }
.ava--lg { position: relative; width: 88px; height: 88px; margin-bottom: 4px; }
.pf-head b { position: relative; font-size: 22px; font-weight: 700; }
.pf-bal { position: relative; display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 8px; border-radius: 999px; background: var(--fill); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pf-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 8px; padding: 14px 0; }
.pf-stats div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pf-stats div + div { border-left: 1px solid var(--line); }
.pf-stats b { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pf-stats span { font-size: 13px; color: var(--hint); }
.pf-sec { display: flex; align-items: center; justify-content: space-between; margin: 18px 14px 10px; font-size: 13px; font-weight: 600; color: #868686; }
.pf-sec em { font-style: normal; height: 22px; min-width: 22px; padding: 0 8px; border-radius: 999px; background: var(--fill); display: grid; place-items: center; color: var(--idle); }
.credit { margin: 16px 0 0; font-size: 12px; color: #5c5c62; text-align: center; }
.credit a { color: var(--hint); text-decoration: none; }
#pfReset { width: auto; padding: 0 20px; margin-top: 18px; color: var(--hint); font-size: 14px; }

/* ---------- шторки: форма Gift Boom, движение portal-market ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; }
.scrim { position: absolute; inset: 0; background: rgba(0,0,0,.3); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); animation: fade .3s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
    position: absolute; left: 8px; right: 8px; bottom: calc(8px + var(--safe-b)); max-height: min(740px, calc(100dvh - 40px)); max-width: 576px; margin-inline: auto;
    display: flex; flex-direction: column; padding: 0 16px; border-radius: 34px; background: #161618; border: 1px solid var(--line);
    animation: sheet-in .5s var(--spring);
}
@keyframes sheet-in { from { transform: translateY(105%); } }
.sheet-wrap.is-out .sheet { transform: translateY(105%); transition: transform .3s var(--spring); }
.sheet-wrap.is-out .scrim { opacity: 0; transition: opacity .3s; }
.grabber { display: block; width: 36px; height: 5px; margin: 9px auto 0; border-radius: 999px; background: rgba(255,255,255,.4); }
.sheet-head { position: relative; display: flex; justify-content: center; padding: 14px 16px; }
.sheet-head h2 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; }
.sheet-head h2:empty { display: none; }
.x { position: absolute; right: -4px; top: 4px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #3a3a3e; color: var(--idle); }
.x svg { width: 16px; }
.sheet-body { overflow-y: auto; padding: 0 0 14px; scrollbar-width: none; min-height: 0; }
.sheet-foot { margin: 0 -16px; padding: 4px 16px 16px; }
.sheet-foot:empty { display: none; }
.sheet-foot .cta { margin: 0; }

.gb-tabs { position: relative; display: flex; height: 44px; padding: 4px; border-radius: 999px; background: var(--card); margin-bottom: 10px; }
.gb-tabs::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--nav-sel); transform: translateX(calc(var(--seg, 0) * 100%)); transition: transform .35s var(--spring); }
.gb-tabs button { position: relative; z-index: 1; flex: 1; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--idle); transition: color .25s; }
.gb-tabs button.is-on { color: var(--ink); }
.gb-amount { display: flex; align-items: center; justify-content: center; height: 110px; margin-bottom: 8px; }
.gb-amount input { border: 0; background: none; color: var(--text); font: 600 46px/1 -apple-system, "SF Pro", sans-serif; text-align: center; padding: 0 6px 0 0; outline: none; font-variant-numeric: tabular-nums; field-sizing: content; min-width: 1ch; }
.gb-amount span { padding-top: 12px; font-size: 28px; font-weight: 700; color: #5c5c62; }
.gb-chips { display: flex; gap: 6px; }
.gb-chips button { flex: 1; height: 40px; border-radius: 999px; background: var(--card); display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 14px; font-weight: 700; white-space: nowrap; transition: transform .12s var(--ease); }
.gb-chips button:active { transform: scale(.92); }
.gb-chips img { width: 16px; height: 16px; }
.gb-bal { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 12px 0 0; font-size: 13px; color: var(--hint); }
.gb-bal img { width: 14px; height: 14px; }

.result { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 8px 8px; }
.result-art { position: relative; width: 180px; height: 180px; }
.result-art .gift { width: 100%; height: 100%; border-radius: 36px; }
.result h3 { margin: 10px 0 4px; font-size: 24px; font-weight: 700; animation: rise .4s .1s var(--ease) both; }
.result p { display: flex; align-items: center; gap: 5px; margin: 0; color: var(--hint); font-size: 15px; font-variant-numeric: tabular-nums; animation: rise .4s .16s var(--ease) both; }
.result p img { width: 18px; height: 18px; }
.result.is-win h3 { color: var(--ink); }
.result.is-lose h3 { color: var(--lose); }
.result.is-lose .result-art { filter: grayscale(1) brightness(.55); }
.result.is-roll h3, .result.is-roll p { visibility: hidden; }

.hist { display: flex; flex-direction: column; gap: 6px; }
.hist-row { display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; border-radius: 20px; background: var(--card); animation: rise .35s var(--ease) both; }
.hist-row img { width: 44px; height: 44px; }
.hist-row div { flex: 1; min-width: 0; }
.hist-row b { display: block; font-size: 15px; }
.hist-row span { font-size: 12px; color: var(--hint); }
.hist-row em { font-style: normal; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.hist-row em.w { color: var(--ink); } .hist-row em.l { color: var(--lose); }

/* ---------- таббар ---------- */
.tabbar {
    position: fixed; z-index: 70; left: 0; right: 0; bottom: calc(var(--safe-b) + 14px); margin-inline: auto;
    width: min(calc(100% - 24px), 420px); height: 64px; padding: 2px; display: flex; gap: 4px;
    border: 1px solid var(--edge); border-radius: 999px; background: var(--card); overflow: hidden; isolation: isolate;
    box-shadow: 0 10px 30px rgba(0,0,0,.6);
}
.tabbar::after {
    content: ""; position: absolute; z-index: 0; top: 2px; bottom: 2px; left: 2px;
    width: calc((100% - 4px - 16px) / 5); border-radius: 999px; background: var(--nav-sel);
    transform: translateX(calc(var(--i, 0) * (100% + 4px))); transition: transform .4s var(--spring);
}
.tab { position: relative; z-index: 1; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 999px; color: var(--idle); font-size: 11px; font-weight: 510; line-height: 13px; transition: color .2s; }
.tab svg { width: 24px; height: 24px; }
.tab.is-active { color: var(--ink); }
body::after {
    content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--safe-b) + 110px); z-index: 60; pointer-events: none;
    background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,.55) 50%, transparent);
}

.toast { position: fixed; z-index: 120; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 12px); translate: -50% 0; padding: 10px 18px; border-radius: 999px; background: #2a2a2e; border: 1px solid var(--edge); font-size: 14px; font-weight: 600; animation: drop .35s var(--spring); white-space: nowrap; }
@keyframes drop { from { transform: translateY(-30px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; } }

/* ---------- pvp: джекпот (Rolls / Portals Arena), плоский TIER ---------- */
.pv-top { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pv-mini { padding: 10px 14px; min-width: 0; }
.pv-mini b { display: flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.pv-mini b em { font-style: normal; color: var(--ink); margin-left: auto; }
.pv-mini b img { width: 14px; height: 14px; }
.pv-stage { position: relative; overflow: hidden; display: flex; justify-content: center; margin-top: 8px; padding: 52px 12px 20px; }
.pv-pot { position: absolute; top: 12px; left: 12px; z-index: 3; display: flex; align-items: center; gap: 5px; height: 30px; padding: 0 14px 0 10px; border-radius: 999px; background: var(--well); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pv-pot img { width: 16px; height: 16px; }
.pv-pot.bump { animation: pump .45s var(--ease); }
.pv-round { position: absolute; top: 18px; right: 16px; font-size: 12px; color: var(--hint); font-variant-numeric: tabular-nums; }
.pv-pointer { position: absolute; z-index: 30; top: 38px; width: 28px; height: 28px; rotate: -135deg; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); transform-origin: 30% 30%; }
.pv-wheel-wrap { position: relative; width: 290px; height: 290px; }
.pv-wheel { position: absolute; inset: 0; border-radius: 50%; will-change: transform; }
.pv-wheel svg { width: 100%; height: 100%; display: block; }
.pv-wheel path { transition: opacity .3s; }
.pv-wheel.is-done path:not(.win) { opacity: .25; }
.pv-ava { position: absolute; width: 36px; height: 36px; margin: -18px; border-radius: 50%; border: 2px solid #000; overflow: hidden; display: grid; place-items: center; font-size: 14px; font-weight: 700; color: #0b0e14; animation: appear .35s var(--ease) both; }
.pv-ava img { width: 100%; height: 100%; object-fit: cover; }
.pv-core { position: absolute; inset: 78px; border-radius: 50%; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 2; }
.pv-timer { position: absolute; inset: 0; width: 100%; height: 100%; rotate: -90deg; }
#pvArc { transition: stroke-dasharray 1s linear; }
.pv-core b { position: relative; font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pv-core span { position: relative; font-size: 12px; color: var(--hint); }
.pv-core .pv-win { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-size: 22px; font-weight: 700; color: #0b0e14; animation: appear .4s var(--ease) both; }
.pv-list { display: flex; flex-direction: column; gap: 6px; }
.pv-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border-radius: 20px; background: var(--card); animation: rise .35s var(--ease) both; }
.pv-row.is-me { box-shadow: inset 0 0 0 1.5px rgba(168,199,239,.45); }
.pv-row .pv-ava { position: static; margin: 0; flex: none; border: 0; }
.pv-row-t { flex: 1; min-width: 0; }
.pv-row-t b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-row-t span { display: flex; gap: 3px; margin-top: 3px; }
.pv-row-t span img { width: 22px; height: 22px; border-radius: 6px; background: var(--well); object-fit: contain; }
.pv-row-r { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-variant-numeric: tabular-nums; }
.pv-row-r b { display: flex; align-items: center; gap: 3px; font-size: 14px; font-weight: 700; }
.pv-row-r b img { width: 14px; height: 14px; }
.pv-row-r span { font-size: 12px; font-weight: 700; color: var(--ink); }
.pv-empty { padding: 22px 0; text-align: center; color: var(--hint); font-size: 14px; }

/* =========================================================
   оболочка: на телефоне — как раньше, на ПК — меню слева и лента справа
   ========================================================= */
.side, .feed { display: none; }
.app { min-width: 0; }
.tab svg, .side-i svg, .hub-i svg, .icon-btn svg { fill: currentColor; }
.top-r { display: flex; align-items: center; gap: 8px; }
.icon-btn {
    display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
    background: rgba(28,28,30,.72); border: 1px solid var(--edge); color: var(--idle); transition: transform .14s var(--ease), color .2s;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn.is-off { color: #5c5c62; }
.online { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--hint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.online i { width: 7px; height: 7px; border-radius: 50%; background: #5fd08a; box-shadow: 0 0 0 3px rgba(95,208,138,.18); }
.online b { color: var(--idle); font-weight: 700; }
.ava-sil { display: block; width: 62%; height: 62%; margin: auto; background: #8e8e93;
    -webkit-mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a4.6 4.6 0 1 0 0-9.2 4.6 4.6 0 0 0 0 9.2Zm0 2.2c-4.6 0-8.4 2.6-8.4 5.8 0 .9.7 1.6 1.6 1.6h13.6c.9 0 1.6-.7 1.6-1.6 0-3.2-3.8-5.8-8.4-5.8Z'/%3E%3C/svg%3E");
    mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a4.6 4.6 0 1 0 0-9.2 4.6 4.6 0 0 0 0 9.2Zm0 2.2c-4.6 0-8.4 2.6-8.4 5.8 0 .9.7 1.6 1.6 1.6h13.6c.9 0 1.6-.7 1.6-1.6 0-3.2-3.8-5.8-8.4-5.8Z'/%3E%3C/svg%3E"); }

/* лента выигрышей полосой (телефон и узкий ПК) */
.strip { display: flex; align-items: center; gap: 6px; margin: 10px 8px 0; padding: 0 0 2px; overflow-x: auto; scrollbar-width: none; }
.strip-on { flex: none; height: 52px; padding: 0 12px; border-radius: 16px; background: var(--card); }
.fd-chip { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 52px; height: 52px; border-radius: 16px; background: var(--card); animation: appear .35s var(--ease) both; }
.fd-chip img { width: 30px; height: 30px; object-fit: contain; }
.fd-chip em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.fd-x { font-size: 12px; font-weight: 800; color: var(--idle); height: 30px; display: grid; place-items: center; }

.fd-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border-radius: 18px; animation: rise .35s var(--ease) both; }
.fd-row:nth-child(odd) { background: rgba(255,255,255,.025); }
.fd-ava, .fl-ava { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; overflow: hidden; background: #3a3a3e; }
.fd-ava img, .fl-ava img { width: 100%; height: 100%; object-fit: cover; }
.fd-t { flex: 1; min-width: 0; }
.fd-t b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fd-t span { font-size: 12px; color: var(--hint); white-space: nowrap; }
.fd-g { width: 34px; height: 34px; object-fit: contain; flex: none; }
.fd-row em { display: flex; align-items: center; gap: 3px; font-style: normal; font-size: 13.5px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fd-row em img { width: 14px; height: 14px; }

.seg-pill.seg-2::before { width: calc((100% - 12px) / 2); }
.pv-pane { margin-top: 8px; }
.pv-ton { display: inline-flex; align-items: center; gap: 2px; height: 22px; padding: 0 7px 0 4px; border-radius: 999px; background: var(--fill); font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--idle); white-space: nowrap; }
.pv-ton img { width: 12px !important; height: 12px !important; background: none !important; border-radius: 0 !important; }
.pv-row-r span.is-l { color: var(--lose); }
.pv-row .fd-ava { width: 36px; height: 36px; }

/* ---------- коинфлип ---------- */
.fl-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 10px; border-radius: 22px; background: var(--card); animation: rise .35s var(--ease) both; }
.fl-row.is-me { box-shadow: inset 0 0 0 1.5px rgba(168,199,239,.45); }
.fl-side { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; text-align: center; transition: opacity .3s, filter .3s; }
.fl-side b { max-width: 100%; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-side em { display: flex; align-items: center; gap: 3px; font-style: normal; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fl-side em img { width: 14px; height: 14px; }
.fl-side .fl-ava { width: 44px; height: 44px; }
.fl-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; min-height: 22px; }
.fl-items img { width: 22px; height: 22px; object-fit: contain; border-radius: 6px; background: var(--well); }
.fl-side.is-empty { opacity: .5; }
.fl-side.is-win .fl-ava { box-shadow: 0 0 0 2.5px var(--ink); }
.fl-side.is-win em { color: var(--ink); }
.fl-side.is-lose { opacity: .45; filter: grayscale(1); }
.fl-btn { height: 36px; padding: 0 16px; border-radius: 999px; background: var(--cta); color: #fff; font-size: 14px; font-weight: 600; transition: transform .14s var(--ease), filter .2s; }
.fl-btn:active { transform: scale(.94); }
.fl-btn.is-ghost { background: var(--fill); color: var(--idle); }
.fl-state { font-size: 12.5px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.fl-show { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 16px 0 20px; }
.fl-coin-wrap { perspective: 600px; }
.fl-coin { position: relative; width: 110px; height: 110px; transform-style: preserve-3d; }
.fl-face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; overflow: hidden; background: #3a3a3e; box-shadow: 0 0 0 5px #8191a9, 0 0 0 7px #2a2a2e; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.fl-face.is-back { transform: rotateY(180deg); box-shadow: 0 0 0 5px #a8c7ef, 0 0 0 7px #2a2a2e; }
.fl-face img { width: 100%; height: 100%; object-fit: cover; }
.fl-show .fl-side .fl-ava { width: 52px; height: 52px; }

/* ---------- краш ---------- */
.cr-stage { position: relative; overflow: hidden; height: 270px; }
.cr-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cr-hist { position: absolute; z-index: 2; top: 10px; left: 10px; right: 10px; display: flex; gap: 5px; overflow: hidden; mask-image: linear-gradient(90deg, #000 80%, transparent); }
.cr-hist span { flex: none; height: 24px; padding: 0 9px; border-radius: 999px; display: grid; place-items: center; background: rgba(255,107,107,.14); color: #ff9c9c; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cr-hist span.is-mid { background: rgba(168,199,239,.14); color: var(--ink); }
.cr-hist span.is-hi { background: rgba(240,194,122,.16); color: #f0c27a; }
.cr-mid { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.cr-mid b { font-size: 50px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cr-mid span { margin-top: 2px; font-size: 14px; font-weight: 600; color: var(--hint); font-variant-numeric: tabular-nums; }
.cr-stage.is-run .cr-mid b { color: #fff; }
.cr-stage.is-crash .cr-mid b { color: var(--lose); animation: pump .45s var(--ease); }
.cr-ctl { margin-top: 8px; }
.cr-ctl .act-row { margin-top: 0; }
.cr-auto { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; height: 52px; padding: 0 16px; border-radius: 999px; background: var(--card); cursor: text; }
.cr-auto span { font-size: 13px; font-weight: 600; color: var(--hint); }
.cr-auto input { flex: 1; width: 100%; min-width: 0; border: 0; background: none; color: var(--text); font: 700 16px -apple-system, "SF Pro", sans-serif; text-align: right; outline: none; font-variant-numeric: tabular-nums; user-select: text; }
.cr-auto input::placeholder { color: #5c5c62; }
.cr-auto em { font-style: normal; font-weight: 700; color: var(--hint); }

/* ---------- кейсы ---------- */
.cs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.cs-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px 14px; border-radius: 24px; background: var(--card); animation: appear .35s var(--ease) both; animation-delay: calc(var(--n, 0) * 40ms); transition: transform .15s var(--ease); }
.cs-card:active { transform: scale(.96); }
.cs-card b { font-size: 16px; font-weight: 700; }
.cs-art { position: relative; width: 100%; height: 108px; }
.cs-art img { position: absolute; top: 50%; left: 50%; width: 76px; height: 76px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.4)); transition: transform .3s var(--ease); }
.cs-art-0 { z-index: 3; width: 92px !important; height: 92px !important; transform: translate(-50%, -50%); }
.cs-art-1 { z-index: 2; transform: translate(-105%, -46%) rotate(-12deg) scale(.82); opacity: .8; }
.cs-art-2 { z-index: 1; transform: translate(5%, -46%) rotate(12deg) scale(.82); opacity: .8; }
.cs-card::before { content: ""; position: absolute; left: 50%; top: 66px; width: 120px; height: 90px; translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, rgba(129,145,169,.35), transparent); }
.cs-stage { position: relative; overflow: hidden; padding: 48px 0 20px; }
.corner-l { left: 12px; }
.cs-name { position: absolute; top: 14px; left: 0; right: 0; text-align: center; font-size: 16px; font-weight: 700; }
.cs-reel { position: relative; overflow: hidden; height: 150px; mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.cs-track { position: absolute; top: 10px; left: 0; display: flex; gap: 8px; will-change: transform; }
.cs-cell { flex: none; width: 110px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cs-cell .gift { width: 110px; border-radius: 20px; }
.cs-cell.is-hit .gift { box-shadow: 0 0 0 3px var(--ink), 0 0 30px rgba(168,199,239,.45); }
.cs-mark { position: absolute; z-index: 3; left: 50%; top: 44px; bottom: 16px; width: 2px; translate: -50% 0; border-radius: 2px; background: var(--ink); box-shadow: 0 0 12px rgba(168,199,239,.8); }
.cs-mark::before, .cs-mark::after { content: ""; position: absolute; left: 50%; translate: -50% 0; border: 7px solid transparent; }
.cs-mark::before { top: -2px; border-top-color: var(--ink); }
.cs-mark::after { bottom: -2px; border-bottom-color: var(--ink); }

/* ---------- плинко ---------- */
.pk-stage { position: relative; padding: 4px 8px 12px; }
.pk-stage canvas { display: block; width: 100%; height: 330px; --pk-max: 360; }
.pk-slots { display: flex; justify-content: center; gap: 0; }
.pk-slots span {
    flex: none; width: var(--gap); height: 26px; display: grid; place-items: center; border-radius: 8px; margin: 0 1px;
    background: color-mix(in srgb, var(--c) 22%, #1c1c1e); color: var(--c); font-size: min(11px, calc(var(--gap) * .34)); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; overflow: hidden; white-space: nowrap;
}
.pk-slots span.is-hit { animation: slot-hit .4s var(--ease); background: var(--c); color: #0b0e14; }
@keyframes slot-hit { 30% { transform: translateY(5px); } }
.pk-ctl .seg-pill + .seg-pill { margin-top: 8px; }

/* ---------- игры (телефон) ---------- */
.hub { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hub-i { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; height: 128px; padding: 16px; border-radius: 24px; background: var(--card); color: var(--ink); transition: transform .15s var(--ease); text-align: left; }
.hub-i:active { transform: scale(.96); }
.hub-i svg { width: 34px; height: 34px; }
.hub-i b { font-size: 17px; font-weight: 700; color: var(--text); }

@media (hover: hover) {
    .cta:hover:not(:disabled), .fl-btn:hover { filter: brightness(1.1); }
    .gb-pick:hover:not(:disabled), .cs-card:hover, .hub-i:hover { background: #232326; }
    .cs-card:hover .cs-art-1 { transform: translate(-112%, -50%) rotate(-16deg) scale(.84); }
    .cs-card:hover .cs-art-2 { transform: translate(12%, -50%) rotate(16deg) scale(.84); }
    .row.is-now .cell:hover:not(:disabled) { background: #404047; }
    .slot:hover { background: #303035; }
    .step-b:hover, .corner:hover, .icon-btn:hover, .x:hover { filter: brightness(1.2); }
    .side-i:hover:not(.is-active) { background: rgba(255,255,255,.04); color: var(--text); }
    .fg-slot.has-gift:hover { opacity: .8; }
}

/* ---------- апгрейд: панели выбора (только ПК) ---------- */
.up-pick { display: none; }
.panel { padding: 14px; min-width: 0; }
.panel-h { display: flex; align-items: center; gap: 8px; margin: 0 2px 12px; }
.panel-h b { font-size: 15px; font-weight: 700; }
.panel-h em { font-style: normal; height: 22px; min-width: 22px; padding: 0 8px; border-radius: 999px; background: var(--fill); display: grid; place-items: center; color: var(--hint); font-size: 12px; font-weight: 700; }
.panel .gb-grid { max-height: 520px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #333 transparent; padding-right: 2px; }
.chip { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 14px 0 8px; border-radius: 999px; background: var(--fill); font-size: 13px; font-weight: 700; color: var(--idle); transition: background .2s; }
.chip img { width: 18px; height: 18px; }
.chip:hover { background: rgba(255,255,255,.14); }
.search { margin-left: auto; width: 180px; height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--fill); color: var(--text); font: 600 13px -apple-system, "SF Pro", sans-serif; outline: none; user-select: text; }
.search::placeholder { color: #6c6c72; }
.search:focus { box-shadow: inset 0 0 0 1.5px rgba(168,199,239,.5); }

/* ---------- краш (новый) ---------- */
.cr-stage { height: 300px; background: radial-gradient(120% 90% at 20% 100%, #1b2433 0%, #121418 55%, #0d0e10 100%); }
.cr-stage[data-phase="crash"] { background: radial-gradient(120% 90% at 20% 100%, #2a1718 0%, #141213 55%, #0d0e10 100%); }
.cr-mid b { font-size: 56px; text-shadow: 0 4px 30px rgba(0,0,0,.6); }
.cr-stage[data-phase="bet"] .cr-mid b { color: var(--idle); font-size: 44px; }
.cr-stage[data-phase="run"] .cr-mid { justify-content: flex-start; padding-top: 58px; }
.cr-stage[data-phase="crash"] .cr-mid b { color: var(--lose); animation: pump .45s var(--ease); }
.cr-stage[data-phase="crash"] .cr-mid span { color: #ff9c9c; }
.cr-bar { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 3px; background: var(--ink); transform-origin: left; transform: scaleX(0); opacity: 0; transition: opacity .3s; }
.cr-stage[data-phase="bet"] .cr-bar { opacity: 1; }
.cr-bet { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; padding: 10px; }
.cr-bet .cta { grid-column: 1 / -1; margin: 0; }
.cr-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cr-field .lbl { padding-left: 14px; }
.cr-in { display: flex; align-items: center; gap: 4px; height: 48px; padding: 0 6px 0 14px; border-radius: 999px; background: var(--well); cursor: text; }
.cr-in:focus-within { box-shadow: inset 0 0 0 1.5px rgba(168,199,239,.45); }
.cr-in img { width: 18px; height: 18px; }
.cr-in input { flex: 1; width: 100%; min-width: 0; border: 0; background: none; color: var(--text); font: 700 17px -apple-system, "SF Pro", sans-serif; outline: none; font-variant-numeric: tabular-nums; user-select: text; }
.cr-in input:disabled { color: var(--hint); }
.cr-in input::placeholder { color: #5c5c62; }
.cr-in em { font-style: normal; font-weight: 700; color: var(--hint); padding-right: 10px; }
.cr-in button { flex: none; height: 36px; min-width: 36px; padding: 0 10px; border-radius: 999px; background: #3a3a3e; font-size: 13px; font-weight: 700; color: var(--idle); transition: background .2s, transform .12s var(--ease); }
.cr-in button:hover:not(:disabled) { background: #46464b; }
.cr-in button:active:not(:disabled) { transform: scale(.92); }
.cr-in button:disabled { opacity: .4; }
.cr-in button.is-on { background: var(--ink); color: #0b0e14; }
#crGift { display: none; }
.cr-table { display: flex; flex-direction: column; gap: 4px; }
.cr-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 76px 64px 80px; align-items: center; gap: 10px; height: 48px; padding: 0 14px 0 8px; border-radius: 16px; background: var(--card); font-variant-numeric: tabular-nums; animation: rise .3s var(--ease) both; transition: background .3s; }
.cr-row.is-me { box-shadow: inset 0 0 0 1.5px rgba(168,199,239,.45); }
.cr-row.is-out { background: color-mix(in srgb, #a8c7ef 9%, var(--card)); }
.cr-n { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-it { display: flex; gap: 2px; }
.cr-it img { width: 24px; height: 24px; object-fit: contain; }
.cr-v { display: flex; align-items: center; gap: 3px; font-size: 13.5px; font-weight: 700; justify-content: flex-end; }
.cr-v img { width: 14px; height: 14px; }
.cr-row em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--hint); text-align: right; white-space: nowrap; }
.cr-row b { font-size: 13.5px; font-weight: 700; text-align: right; white-space: nowrap; }
.cr-row .w { color: var(--ink); } .cr-row .l { color: var(--lose); }
@media (max-width: 899px) { .cr-row { grid-template-columns: 30px minmax(0, 1fr) 60px 50px 64px; padding-right: 10px; } .cr-it { display: none; } }

/* ---------- кейсы (новые) ---------- */
.cs-tabs { margin: 0 0 10px; }
.cs-tabs::before { width: calc((100% - 24px) / 5) !important; }
.cs-n::before { width: calc((100% - 20px) / 4) !important; }
.cs-card { overflow: hidden; isolation: isolate; }
.cs-card::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--acc) 55%, transparent), transparent) !important; width: 170px !important; height: 130px !important; }
.cs-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, color-mix(in srgb, var(--acc2) 16%, transparent), transparent 60%); }
.cs-card.is-risk { box-shadow: inset 0 0 0 1.5px rgba(255,107,107,.28); }
.cs-tag { position: absolute; z-index: 4; top: 10px; left: 10px; height: 22px; padding: 0 9px; border-radius: 999px; display: grid; place-items: center; background: rgba(0,0,0,.45); font-style: normal; font-size: 11px; font-weight: 700; color: var(--idle); }
.cs-card.is-risk .cs-tag { color: #ff9c9c; }
.cs-art { z-index: 1; }
.cs-foot { display: flex; align-items: center; gap: 8px; }
.cs-foot small { font-size: 11.5px; font-weight: 600; color: var(--hint); white-space: nowrap; }
.cs-stage { padding: 48px 0 12px; }
.cs-reels { display: flex; flex-direction: column; gap: 6px; }
.cs-reel { position: relative; }
.cs-reel .cs-mark { top: 4px; bottom: 26px; }
.cs-reel.is-sm { height: 124px; }
.cs-reel.is-sm .cs-cell { width: 86px; }
.cs-reel.is-sm .cs-cell .gift { width: 86px; border-radius: 16px; }
.cs-reel.is-sm .cs-cell .gb-price { transform: scale(.9); }
.cs-bar { display: flex; gap: 8px; margin-top: 8px; }
.cs-bar .seg-pill { margin: 0; flex: 0 0 220px; height: 52px; }
.cs-bar .cta { margin: 0; flex: 1; }
.cs-multi .gb-grid { grid-template-columns: repeat(3, 1fr); }
.cs-total { margin: 14px 0 0; display: flex; justify-content: center; align-items: center; gap: 6px; font-size: 22px; font-weight: 700; color: var(--hint); }
.cs-total.w { color: var(--ink); }
.cs-total img { width: 22px; height: 22px; }

/* ---------- плинко: подарки в лунках ---------- */
.pk-stage { overflow: visible; }
.pk-slots span { flex-direction: column; height: auto !important; padding: 4px 0 3px; gap: 2px; border-radius: 10px; }
.pk-slots span img { width: calc(var(--gap) * .78); height: calc(var(--gap) * .78); object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
.pk-slots span i { height: calc(var(--gap) * .78); }
.pk-slots span em { font-style: normal; }
.pk-fly { position: absolute; z-index: 20; display: flex; flex-direction: column; align-items: center; gap: 2px; translate: -50% -100%; pointer-events: none; animation: pk-fly 1.4s var(--ease) forwards; }
.pk-fly img { width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0,0,0,.5)); }
.pk-fly em { font-style: normal; font-size: 12px; font-weight: 800; color: var(--ink); background: rgba(12,14,18,.85); padding: 2px 8px; border-radius: 999px; }
@keyframes pk-fly { 0% { opacity: 0; transform: translateY(10px) scale(.6); } 20% { opacity: 1; transform: translateY(-8px) scale(1.05); } 75% { opacity: 1; transform: translateY(-30px) scale(1); } 100% { opacity: 0; transform: translateY(-46px) scale(.9); } }

/* ---------- pvp ---------- */
.pv-row { position: relative; overflow: hidden; isolation: isolate; }
.pv-bar { position: absolute; z-index: -1; left: 0; top: 0; bottom: 0; width: var(--w); background: linear-gradient(90deg, color-mix(in srgb, var(--c) 22%, transparent), color-mix(in srgb, var(--c) 6%, transparent)); transition: width .5s var(--ease); }
.fl-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.fl-card { position: relative; border-radius: 22px; background: var(--card); overflow: hidden; animation: appear .3s var(--ease) both; }
.fl-card.is-me { box-shadow: inset 0 0 0 1.5px rgba(168,199,239,.45); }
.fl-top { display: grid; grid-template-columns: 1fr 52px 1fr; align-items: center; padding: 16px 10px 12px; }
.fl-bot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 10px 10px 16px; background: rgba(255,255,255,.03); border-top: 1px solid var(--line); }
.fl-pot { display: flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 700; color: var(--idle); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fl-pot img { width: 15px; height: 15px; }
.fl-coin-s { justify-self: center; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #2a2a2e; box-shadow: 0 0 0 3px #1c1c1e, 0 0 0 4.5px #3a3a3e; }
.fl-coin-s img { width: 22px; height: 22px; opacity: .8; }
.fl-coin-s.is-spin { animation: coin-s .5s linear infinite; }
@keyframes coin-s { 50% { transform: scaleX(.1); } }
.fl-q { font-size: 18px; font-weight: 800; color: #6c6c72; background: transparent !important; border: 1.5px dashed rgba(255,255,255,.18); }
.fl-state { font-size: 13px; font-weight: 700; color: var(--hint); white-space: nowrap; }
.fl-state.is-w { color: var(--ink); }
.fl-state.is-roll { animation: blink 1s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .45; } }
.fl-btn { height: 38px; }

/* =========================================================
   ПК
   ========================================================= */
@media (min-width: 900px) {
    body { display: grid; grid-template-columns: 224px minmax(0, 1fr); }
    body::after, .tabbar { display: none; }
    .glow { left: 224px; }
    .side {
        display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; padding: 22px 12px 18px;
        border-right: 1px solid var(--line); background: rgba(10,10,11,.6);
    }
    .brand { display: block; margin: 0 12px 26px; color: var(--text); text-decoration: none; font-size: 26px; font-weight: 800; letter-spacing: -.04em; }
    .side-nav { display: flex; flex-direction: column; gap: 2px; }
    .side-i { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 14px; border-radius: 999px; color: var(--idle); font-size: 15px; font-weight: 590; transition: background .2s, color .2s; }
    .side-i svg { width: 22px; height: 22px; flex: none; }
    .side-i.is-active { background: var(--nav-sel); color: var(--ink); }
    .side-foot { margin-top: auto; padding: 0 14px; }

    .top, .strip, main { max-width: 1040px; margin-inline: auto; }
    .top { padding: 18px 28px 0; }
    .strip { margin-top: 14px; padding: 0 28px; }
    main { padding: 0 28px 56px; }
    .view { padding-top: 14px; }
    .view.is-active { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; column-gap: 12px; }
    .card, .gb-card { border-radius: 28px; }

    .gb-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .sheet .gb-grid { grid-template-columns: repeat(4, 1fr); max-height: min(520px, calc(100dvh - 300px)); }

    /* шторка превращается в окно по центру */
    .sheet { top: 50%; bottom: auto; left: 50%; right: auto; width: min(640px, calc(100vw - 48px)); translate: -50% -50%; max-height: min(820px, calc(100dvh - 64px)); animation: modal-in .32s var(--spring); }
    .sheet-wrap.is-out .sheet { transform: scale(.96); opacity: 0; transition: transform .22s var(--ease), opacity .22s; }
    .grabber { visibility: hidden; height: 0; margin-top: 12px; }
    @keyframes modal-in { from { transform: scale(.94); opacity: 0; } }
    .toast { top: 22px; }

    /* все игры по центру: сцена в середине, управление под ней */
    main, .top { max-width: 1120px; }
    .view.is-active { justify-items: stretch; }
    .card, .gb-card { border-radius: 24px; }

    /* апгрейд: ваш подарок — колесо — желаемый, ниже панели выбора */
    #view-upgrade.is-active { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "mine stage want" ". go ." "pick pick pick"; column-gap: 12px; }
    #view-upgrade .pair { display: contents; }
    #upMine { grid-area: mine; } #upWant { grid-area: want; }
    #view-upgrade .slot { background: var(--card); border-radius: 24px; justify-content: center; gap: 18px; padding: 20px 14px 30px; margin-top: 0; }
    #view-upgrade .slot:hover { background: #232326; }
    #view-upgrade .slot-body { width: 132px; height: 132px; }
    #view-upgrade .slot-h { font-size: 14px; color: var(--hint); }
    .up-stage { grid-area: stage; width: 460px; padding: 34px 12px 40px; zoom: 1.15; }
    .up-pick { grid-area: pick; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
    .up-pick .gb-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }

    /* лестница: доска по центру, управление строкой под ней */
    #view-ladder.is-active { max-width: 640px; width: 100%; margin: 0 auto; }
    .cell { max-width: 64px; border-radius: 18px; }
    .row { grid-template-columns: 64px 1fr; }

    /* кузница */
    .fg-slots { grid-template-columns: repeat(10, 1fr); padding: 12px; }
    .fg-sum { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; align-items: center; padding: 18px 20px; }
    .fg-sum .fg-cols { grid-column: 1; grid-row: 1; }
    .fg-sum .fg-bar, .fg-sum .fg-legend { grid-column: 1; }
    .fg-sum .cta { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin: 0; }
    .fg-sum .text-btn { grid-column: 2; grid-row: 3; margin-top: 8px; }

    /* краш: широкая сцена, ставка строкой */
    #view-crash.is-active { max-width: 980px; width: 100%; margin: 0 auto; }
    .cr-stage { height: 460px; }
    .cr-mid b { font-size: 84px; }
    .cr-stage[data-phase="bet"] .cr-mid b { font-size: 60px; }
    .cr-stage[data-phase="run"] .cr-mid { padding-top: 70px; }
    .cr-bet { grid-template-columns: 1.3fr 1fr 1.1fr; align-items: end; padding: 12px; }
    .cr-bet .cta { grid-column: auto; height: 52px; }
    #crGift { display: block; }

    /* pvp */
    #view-pvp.is-active { max-width: 980px; width: 100%; margin: 0 auto; }
    #pvSeg { max-width: 320px; justify-self: center; width: 100%; }
    #pvJp .pv-top { max-width: 620px; margin: 0 auto; }
    #pvJp .pv-stage { max-width: 620px; margin: 8px auto 0; padding: 64px 12px 36px; }
    #pvJp #pvJoin { max-width: 620px; margin: 8px auto 0; }
    #pvJp .pv-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
    .pv-wheel-wrap { zoom: 1.25; }
    #pvFl .pf-sec { margin-top: 18px; }
    #flNew { max-width: 320px; margin: 0 auto; }
    .fl-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }

    /* кейсы */
    .cs-list, .cs-open { max-width: 1040px; width: 100%; margin: 0 auto; }
    .cs-tabs { max-width: 480px; }
    .cs-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
    .cs-art { height: 140px; }
    .cs-art img { width: 96px; height: 96px; }
    .cs-art-0 { width: 120px !important; height: 120px !important; }
    .cs-card { padding: 18px 12px; }
    .cs-card::before { top: 84px; }
    .cs-bar { max-width: 620px; margin: 10px auto 0; }

    /* плинко: поле по центру, настройки строкой */
    #view-plinko.is-active { max-width: 860px; width: 100%; margin: 0 auto; }
    .pk-stage canvas { --pk-max: 560; }
    .pk-ctl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
    .pk-ctl .seg-pill { margin: 0 !important; }
    .pk-ctl .act-row { grid-column: 1 / -1; margin: 0; }

    .hub { grid-template-columns: repeat(4, 1fr); }
    #view-profile .pf-head { padding: 32px 16px 26px; }
}

@media (min-width: 1280px) {
    body { grid-template-columns: 224px minmax(0, 1fr) 320px; }
    .strip { display: none; }
    .feed {
        display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; min-width: 0;
        border-left: 1px solid var(--line); background: rgba(10,10,11,.6);
    }
    .feed-h { display: flex; align-items: center; justify-content: space-between; padding: 26px 20px 12px; font-size: 15px; font-weight: 700; }
    .feed-list { flex: 1; overflow-y: auto; padding: 0 10px 16px; scrollbar-width: thin; scrollbar-color: #333 transparent; }
}
@media (max-width: 899px) { .cs-bar { flex-direction: column; } .cs-bar .seg-pill { flex: none; height: 44px; } }

/* текст не выделяется и не копируется, кроме полей ввода */
body, button { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input { -webkit-user-select: text; user-select: text; }
img { -webkit-user-drag: none; user-drag: none; }

/* обычный подарок: без фона и узора */
.gift.is-base { background: var(--well); }
.gift.is-base::after { content: none; }
.gift.is-base .mdl { filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
.slot-body .gift.is-base, .ld-prize-art .gift.is-base { background: #2f2f34; }

/* стрелка апгрейда: крупнее и у самого кольца */
.up-wheel-wrap .up-pointer { top: -42px; left: 50%; width: 40px; height: 40px; margin-left: -20px; transform-origin: 50% 50%; z-index: 30; }
.up-stage { padding-top: 50px; }

/* быстрый прокрут */
.go-row { display: flex; gap: 8px; margin-top: 8px; }
.go-row .cta { margin: 0; flex: 1; }
.fast { flex: none; display: flex; align-items: center; justify-content: center; gap: 6px; height: 52px; padding: 0 18px 0 14px; border-radius: 999px; background: var(--card); color: var(--hint); font-size: 14px; font-weight: 700; transition: background .2s, color .2s, transform .14s var(--ease); }
.fast svg { width: 18px; height: 18px; }
.fast:active { transform: scale(.94); }
.fast.is-on { background: color-mix(in srgb, #f0c27a 18%, var(--card)); color: #f0c27a; }
@media (hover: hover) { .fast:hover:not(.is-on) { color: var(--idle); background: #232326; } }

/* лунки плинко: множитель всегда с «×» */
.pk-slots span b { display: grid; place-items: center; height: calc(var(--gap) * .78); font-size: min(12px, calc(var(--gap) * .36)); font-weight: 800; letter-spacing: -.02em; }
.pk-slots span em { font-size: min(10px, calc(var(--gap) * .3)); }
.pk-slots span.is-hit b, .pk-slots span.is-hit em { color: #0b0e14; }

@media (min-width: 900px) {
    #upGoRow { grid-area: go; width: 440px; justify-self: center; margin-top: 12px; }
    #upGoRow #upGo { width: auto; margin: 0; }
    .up-stage { padding: 52px 12px 40px; }
}
@media (min-width: 900px) { #pvJp #pvCancel { grid-column: 1; max-width: 620px; margin: 8px auto 0; } }

/* выбрать все подарки в ставке */
.gb-all { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 2px 10px; }
.gb-all span { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--hint); font-variant-numeric: tabular-nums; }
.gb-all span img { width: 14px; height: 14px; }
.gb-all .chip { margin-left: 0; padding: 0 14px; }

/* ---------- вход ---------- */
.me-wrap { display: flex; align-items: center; gap: 8px; min-width: 0; }
.me { max-width: 240px; }
.me-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.login-btn { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 18px 0 14px; border-radius: 999px; background: #2aabee; color: #fff; text-decoration: none; font-size: 15px; font-weight: 700; transition: filter .2s, transform .14s var(--ease); }
.login-btn svg { width: 18px; height: 18px; }
.login-btn:active { transform: scale(.96); }
@media (hover: hover) { .login-btn:hover { filter: brightness(1.08); } }
.side-foot { display: flex; flex-direction: column; gap: 12px; }
.side-fair { display: flex; align-items: center; gap: 8px; color: var(--hint); font-size: 13px; font-weight: 600; transition: color .2s; }
.side-fair svg { width: 18px; height: 18px; fill: currentColor; }
.side-fair:hover { color: var(--ink); }
.corner-btn { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.08); color: var(--hint); transition: color .2s, background .2s; }
.corner-btn svg { width: 17px; height: 17px; fill: currentColor; }
.corner-btn:hover { color: var(--ink); background: rgba(255,255,255,.14); }
.cr-fair { position: absolute; z-index: 3; top: 8px; right: 10px; }
.cr-hist { right: 48px; }
.pv-fair { position: absolute; z-index: 3; top: 12px; right: 44px; }

/* ---------- продажа в профиле ---------- */
.pf-sec .pf-sellall { margin-left: auto; height: 28px; padding: 0 12px 0 8px; gap: 5px; font-size: 12px; }
.pf-sec .pf-sellall svg { width: 16px; height: 16px; fill: currentColor; }
.pf-sec em + .pf-sellall { margin-left: 8px; }
.pf-sec { gap: 8px; }
.pf-sec em { margin-left: auto; }
.pf-sec em:has(+ .pf-sellall:not([hidden])) { margin-left: auto; }
.sell-1 { margin-left: auto; height: 24px; padding: 0 9px; border-radius: 999px; display: grid; place-items: center; background: rgba(95,208,138,.14); color: #7fdca0; font-size: 11.5px; font-weight: 700; cursor: pointer; transition: background .2s; }
.sell-1:hover { background: rgba(95,208,138,.26); }
/* на телефоне цена и «продать» не влезают в одну строку и распирают сетку — кнопка уходит под цену */
@media (max-width: 899px) {
    .pf-inv { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pf-inv .gb-foot { flex-wrap: wrap; gap: 5px; }
    .pf-inv .sell-1 { flex: 1 0 100%; margin-left: 0; height: 26px; }
}
.sell-all { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 6px 0 12px; }
.sell-art { display: flex; }
.sell-art img { width: 64px; height: 64px; object-fit: contain; margin-left: -14px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.sell-art img:first-child { margin-left: 0; }
.sell-all p { display: flex; align-items: center; gap: 5px; margin: 0; font-size: 17px; font-weight: 700; }
.sell-all p img { width: 18px; height: 18px; }

/* ---------- мины ---------- */
.mn-stage { position: relative; padding: 14px; }
.mn-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px 12px; }
.mn-x { font-size: 26px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.mn-next { font-size: 13px; font-weight: 600; color: var(--hint); font-variant-numeric: tabular-nums; }
.mn-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.mn-cell { aspect-ratio: 1; border-radius: 18px; background: var(--well); display: grid; place-items: center; transition: background .2s, transform .12s var(--ease); }
.mn-cell:not(:disabled):hover { background: #36363c; }
.mn-cell:not(:disabled):active { transform: scale(.92); }
.mn-cell:disabled { cursor: default; }
.mn-cell svg { width: 54%; height: 54%; animation: pop .35s var(--ease) both; }
.mn-cell.is-gem { background: rgba(168,199,239,.16); }
.mn-cell.is-bomb { background: rgba(255,107,107,.18); color: var(--lose); }
.mn-cell.is-hit { background: var(--lose); color: #1a0606; }
.mn-cell.is-dim { opacity: .45; }
.mn-ctl { margin-top: 8px; }
.mn-count { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: 999px; background: var(--card); }
.mn-chips { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.mn-chips button { flex: 1; min-width: 34px; height: 34px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--idle); transition: background .2s; }
.mn-chips button.is-on { background: var(--nav-sel); color: var(--ink); }
.mn-chips button:disabled:not(.is-on) { opacity: .4; }
.mn-ctl .act-row { margin-top: 8px; }

/* ---------- рулетка ---------- */
.rl-stage { position: relative; overflow: hidden; padding: 12px 0 14px; }
.rl-top { display: flex; align-items: center; gap: 8px; padding: 0 12px 12px; }
.rl-hist { display: flex; gap: 4px; flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, #000 80%, transparent); }
.rl-hist i { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 24%, #1c1c1e); color: var(--c); font-style: normal; font-size: 11px; font-weight: 800; }
.rl-reel { position: relative; height: 96px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.rl-track { position: absolute; top: 8px; left: 0; display: flex; will-change: transform; }
.rl-t { flex: none; width: 72px; height: 80px; margin: 0 2px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 30%, #16161a); box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--c) 70%, transparent); color: var(--c); font-size: 18px; font-weight: 800; }
.rl-mark { position: absolute; z-index: 2; left: 50%; top: 0; bottom: 0; width: 3px; translate: -50% 0; border-radius: 3px; background: #fff; box-shadow: 0 0 14px rgba(255,255,255,.7); }
.rl-time { display: flex; align-items: center; gap: 12px; padding: 14px 16px 0; }
.rl-time b { min-width: 60px; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rl-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--well); overflow: hidden; }
.rl-bar i { display: block; height: 100%; background: var(--ink); transform-origin: left; }
.rl-bet { margin-top: 8px; padding: 8px; }
.rl-amt { display: flex; align-items: center; gap: 4px; height: 48px; padding: 0 6px 0 14px; border-radius: 999px; background: var(--well); }
.rl-amt img { width: 18px; height: 18px; }
.rl-amt input { flex: 1; min-width: 0; width: 100%; border: 0; background: none; color: var(--text); font: 700 17px -apple-system, "SF Pro", sans-serif; outline: none; font-variant-numeric: tabular-nums; }
.rl-amt button { flex: none; height: 36px; min-width: 36px; padding: 0 10px; border-radius: 999px; background: #3a3a3e; font-size: 13px; font-weight: 700; color: var(--idle); }
.rl-amt button.is-on { background: var(--ink); color: #0b0e14; }
.rl-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 8px; }
.rl-col { min-width: 0; transition: opacity .3s; }
.rl-col.is-lose { opacity: .45; }
.rl-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 56px; padding: 0 16px; border-radius: 20px; background: color-mix(in srgb, var(--c) 22%, #1c1c1e); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 45%, transparent); transition: filter .2s, transform .12s var(--ease); }
.rl-btn b { font-size: 20px; font-weight: 800; color: var(--c); }
.rl-btn span { display: flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 700; color: var(--idle); font-variant-numeric: tabular-nums; }
.rl-btn span img { width: 13px; height: 13px; }
.rl-btn:not(:disabled):hover { filter: brightness(1.15); }
.rl-btn:not(:disabled):active { transform: scale(.97); }
.rl-btn:disabled { cursor: default; }
.rl-col.is-win .rl-btn { background: var(--c); }
.rl-col.is-win .rl-btn b, .rl-col.is-win .rl-btn span { color: #0b0e14; }
.rl-bets { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.rl-b { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 4px; border-radius: 14px; background: var(--card); animation: rise .3s var(--ease) both; }
.rl-b .fd-ava { width: 30px; height: 30px; }
.rl-b.is-me { box-shadow: inset 0 0 0 1.5px rgba(168,199,239,.45); }
.rl-n { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-b em { font-style: normal; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rl-col.is-win .rl-b em { color: var(--c); }

/* ---------- батлы ---------- */
.bt-list { display: flex; flex-direction: column; gap: 8px; }
.bt-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px; border-radius: 22px; background: var(--card); cursor: pointer; animation: rise .3s var(--ease) both; transition: background .2s; }
.bt-row:hover { background: #232326; }
.bt-row.is-me { box-shadow: inset 0 0 0 1.5px rgba(168,199,239,.45); }
.bt-rc { display: flex; gap: 4px; overflow: hidden; }
.bt-c { position: relative; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--well); display: grid; place-items: center; }
.bt-c img { width: 36px; height: 36px; object-fit: contain; }
.bt-c em { position: absolute; right: -2px; bottom: -4px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--ink); color: #0b0e14; font-style: normal; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; }
.bt-rp { grid-column: 1; display: flex; align-items: center; gap: 6px; }
.bt-p { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #3a3a3e; }
.bt-p img { width: 100%; height: 100%; object-fit: cover; }
.bt-p.is-empty { background: transparent; border: 1.5px dashed rgba(255,255,255,.2); }
.bt-p.is-me { box-shadow: 0 0 0 2px var(--ink); }
.bt-p.is-win { box-shadow: 0 0 0 2px #f0c27a; }
.bt-vs { font-style: normal; font-size: 10px; font-weight: 800; color: #5c5c62; }
.bt-rr { grid-column: 2; grid-row: 1 / 3; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.bt-head { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 52px; }
.bt-head .corner { top: 50%; translate: 0 -50%; }
.bt-cases { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.bt-cases .bt-c { transition: opacity .3s, box-shadow .3s; }
.bt-cases .bt-c.is-done { opacity: .4; }
.bt-cases .bt-c.is-now { box-shadow: 0 0 0 2px var(--ink); }
.bt-cost { display: flex; align-items: center; gap: 4px; font-weight: 700; white-space: nowrap; }
.bt-cost img { width: 16px; height: 16px; }
.bt-cols { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.bt-col { position: relative; padding: 10px; min-width: 0; transition: box-shadow .3s, opacity .3s; }
.bt-col.is-win { box-shadow: inset 0 0 0 2px #f0c27a; }
.bt-col.is-lose { opacity: .55; }
.bt-ph { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bt-ph b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-ph b.is-wait { color: var(--hint); }
.bt-ph .fd-ava:empty { border: 1.5px dashed rgba(255,255,255,.2); background: transparent; }
.bt-reel { position: relative; height: 150px; margin-top: 10px; border-radius: 18px; background: var(--well); overflow: hidden; mask-image: linear-gradient(transparent, #000 25%, #000 75%, transparent); }
.bt-track { position: absolute; left: 50%; top: 0; width: 88px; margin-left: -44px; will-change: transform; }
.bt-cell { height: 96px; display: grid; place-items: center; }
.bt-cell .gift { width: 84px; border-radius: 18px; }
.bt-cell.is-hit .gift { box-shadow: 0 0 0 2px var(--ink); }
.bt-mark { position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; translate: 0 -50%; background: rgba(168,199,239,.5); pointer-events: none; }
.bt-won { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 4px; margin-top: 10px; min-height: 64px; }
.bt-w { display: flex; flex-direction: column; align-items: center; gap: 2px; animation: appear .35s var(--ease) both; }
.bt-w .gift { width: 100%; border-radius: 12px; }
.bt-w em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--hint); font-variant-numeric: tabular-nums; }
.bt-total { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 10px; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bt-total img { width: 18px; height: 18px; }
.bt-col.is-win .bt-total { color: #f0c27a; }
#btAct { max-width: 420px; margin: 10px auto 0; }
.bt-make .bt-n { margin: 0 0 10px; }
.bt-sel { display: flex; align-items: center; gap: 5px; min-height: 56px; padding: 6px 12px 6px 6px; margin-bottom: 10px; border-radius: 18px; background: var(--card); overflow-x: auto; scrollbar-width: none; }
.bt-sel .bt-c { cursor: pointer; }
.bt-sel em { margin-left: auto; font-style: normal; font-size: 13px; font-weight: 700; color: var(--hint); }
.bt-hint { padding-left: 8px; font-size: 13px; color: #6c6c72; }
@media (max-width: 899px) { .bt-cols { grid-template-columns: repeat(min(var(--n, 2), 2), minmax(0, 1fr)); } }

/* ---------- топ ---------- */
.top-bar { display: grid; grid-template-columns: 1fr; gap: 8px; }
.top-bar .seg-pill { margin: 0; }
.tp-podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 8px; margin-top: 12px; }
.tp-pod { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px 14px; border-radius: 24px; background: var(--card); min-width: 0; animation: rise .35s var(--ease) both; }
.tp-pod .fd-ava { width: 56px; height: 56px; }
.tp-pod b { max-width: 100%; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-pod em { display: flex; align-items: center; gap: 3px; font-style: normal; font-size: 15px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.tp-pod em img { width: 15px; height: 15px; }
.tp-pod small { font-size: 11.5px; color: var(--hint); display: flex; align-items: center; gap: 3px; }
.tp-pod small img { width: 12px; height: 12px; }
.tp-1 { order: 2; padding-top: 26px; box-shadow: inset 0 0 0 1.5px rgba(240,194,122,.5); }
.tp-1 .fd-ava { width: 68px; height: 68px; box-shadow: 0 0 0 3px #f0c27a; }
.tp-2 { order: 1; } .tp-3 { order: 3; }
.tp-pod.is-me, .tp-row.is-me { background: color-mix(in srgb, #a8c7ef 10%, var(--card)); }
.tp-rank { font-size: 13px; font-weight: 800; color: var(--hint); font-variant-numeric: tabular-nums; }
.tp-pod .tp-rank { position: absolute; top: 10px; left: 12px; }
.tp-1 .tp-rank { color: #f0c27a; }
.tp-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.tp-row { display: grid; grid-template-columns: 28px 34px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; height: 52px; padding: 0 14px 0 10px; border-radius: 18px; background: var(--card); animation: rise .3s var(--ease) both; }
.tp-row .tp-rank { text-align: center; }
.tp-row b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-row small { font-size: 12px; color: var(--hint); display: flex; align-items: center; gap: 3px; }
.tp-row small img { width: 12px; height: 12px; }
.tp-row em { display: flex; align-items: center; gap: 3px; font-style: normal; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.tp-row em img { width: 14px; height: 14px; }

/* ---------- честная игра ---------- */
.fair { display: flex; flex-direction: column; gap: 10px; }
.fair-now { display: flex; flex-direction: column; gap: 6px; }
.fair-c { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 16px; background: var(--card); }
.fair-c span { font-size: 12px; font-weight: 700; color: var(--hint); }
.fair code, .fair-row code { display: block; font: 500 11.5px/1.45 "SF Mono", ui-monospace, Menlo, monospace; color: var(--idle); word-break: break-all; }
.fair-f { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 16px; background: var(--well); }
.fair-f code { color: #b9c6d8; }
.fair-list { display: flex; flex-direction: column; gap: 6px; }
.fair-row { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 16px; background: var(--card); }
.fair-h { display: flex; align-items: center; gap: 8px; }
.fair-h b { font-size: 13.5px; }
.fair-h span { flex: 1; min-width: 0; font-size: 12.5px; color: var(--hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fair-h .chip { margin: 0; height: 28px; font-size: 12px; }
.fair-row code { color: #7c7c84; }
.fair-out span { font-size: 12.5px; font-weight: 700; }
.fair-out .is-ok { color: #7fdca0; } .fair-out .is-bad { color: var(--lose); }

@media (min-width: 900px) {
    #view-mines.is-active { max-width: 560px; width: 100%; margin: 0 auto; }
    #view-roulette.is-active { max-width: 980px; width: 100%; margin: 0 auto; }
    .rl-cols { grid-template-columns: repeat(4, 1fr); }
    .rl-reel { height: 110px; }
    .rl-t { width: 72px; height: 92px; font-size: 20px; }
    .rl-bet { max-width: 560px; justify-self: center; width: 100%; }
    #view-battles.is-active { max-width: 1040px; width: 100%; margin: 0 auto; }
    #btNew { max-width: 320px; margin: 0 auto; }
    .bt-row { grid-template-columns: minmax(0, 1fr) auto auto; }
    .bt-rp { grid-column: 2; grid-row: 1; }
    .bt-rr { grid-column: 3; grid-row: 1; flex-direction: row; align-items: center; }
    .bt-reel { height: 180px; }
    .sheet .bt-pick { grid-template-columns: repeat(5, 1fr); }
    #view-top.is-active { max-width: 760px; width: 100%; margin: 0 auto; }
    .top-bar { grid-template-columns: 240px 1fr; }
}

.bt-col.is-win .bt-reel, .bt-col.is-lose .bt-reel { display: none; }
@media (max-width: 520px) {
    .login-btn { width: 42px; padding: 0; justify-content: center; }
    .login-btn span { display: none; }
    .me-name { max-width: 96px; }
    .top { gap: 8px; }
}

.cs-card.is-theme .cs-tag { color: #f0c27a; }
@media (min-width: 900px) { .cs-tabs { max-width: 600px; } }
@media (max-width: 520px) { .cs-tabs button { font-size: 13px; } }

/* ---------- трейды ---------- */
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: #ff6b6b; color: #fff; font-style: normal; font-size: 11.5px; font-weight: 800; }
.tab .nav-badge { position: absolute; top: 6px; left: calc(50% + 6px); margin: 0; min-width: 18px; height: 18px; font-size: 10.5px; }
.hub-i { position: relative; }
.hub-i .nav-badge { position: absolute; top: 14px; right: 14px; }
.tr-mine { padding: 14px; }
.tr-slots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.tr-slot { position: relative; aspect-ratio: 1; border-radius: 18px; display: grid; place-items: center; border: 1.5px dashed rgba(255,255,255,.14); color: #5c5c62; transition: transform .14s var(--ease), box-shadow .2s, background .2s; }
.tr-slot svg { width: 26px; height: 26px; }
.tr-slot.has-gift { border: 0; background: var(--well); }
.tr-slot .gift { position: absolute; inset: 0; border-radius: 18px; }
.tr-slot em { position: absolute; z-index: 2; left: 50%; bottom: 6px; translate: -50% 0; height: 20px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; background: rgba(0,0,0,.55); font-style: normal; font-size: 11px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.tr-slot:not(.has-gift):hover { background: rgba(255,255,255,.04); color: var(--idle); }
.tr-slot:active { transform: scale(.94); }
.tr-slot.is-on { box-shadow: 0 0 0 2.5px var(--ink); }
.tr-x { position: absolute; z-index: 3; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.55); color: #fff; opacity: 0; transition: opacity .2s; }
.tr-x svg { width: 12px; height: 12px; }
.tr-slot.has-gift:hover .tr-x { opacity: 1; }
@media (hover: none) { .tr-x { opacity: 1; } }
.tr-offers { display: flex; flex-direction: column; gap: 8px; }
.tr-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 14px; border-radius: 24px; background: var(--card); animation: rise .35s var(--ease) both; }
.tr-card.is-yes { box-shadow: inset 0 0 0 1.5px rgba(127,220,160,.45); }
.tr-card.is-no, .tr-card.is-off { opacity: .6; }
.tr-card.is-add { box-shadow: inset 0 0 0 1.5px rgba(122,176,255,.45); }
.tr-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tr-side.is-to { align-items: flex-end; text-align: right; }
.tr-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tr-side.is-to .tr-who { flex-direction: row-reverse; }
.tr-who .fd-ava { width: 28px; height: 28px; }
.tr-who b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-gs { display: flex; flex-wrap: wrap; gap: 4px; }
.tr-side.is-to .tr-gs { justify-content: flex-end; }
.tr-g { position: relative; width: 52px; }
.tr-g .gift { width: 52px; border-radius: 14px; }
.tr-g em { display: block; margin-top: 2px; text-align: center; font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--hint); font-variant-numeric: tabular-nums; }
.tr-ton { align-self: center; display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 9px 0 5px; border-radius: 999px; background: var(--fill); font-size: 12px; font-weight: 700; }
.tr-ton img { width: 14px; height: 14px; }
.tr-none { color: #5c5c62; }
.tr-sum { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 700; color: var(--idle); font-variant-numeric: tabular-nums; }
.tr-sum img { width: 14px; height: 14px; }
.tr-mid { display: flex; flex-direction: column; align-items: center; gap: 6px; }
/* надпись как на листке: буквы разных цветов */
.tr-word { display: flex; font-size: 26px; font-weight: 900; letter-spacing: .02em; line-height: 1; transform: rotate(-4deg); }
.tr-word i { font-style: normal; }
.tr-word i:nth-child(odd) { color: #ef6b6b; }
.tr-word i:nth-child(even) { color: #6fd08c; }
.tr-state { display: flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--hint); white-space: nowrap; }
.tr-state svg { width: 14px; height: 14px; }
.tr-card.is-yes .tr-state { color: #7fdca0; }
.tr-card.is-no .tr-state { color: var(--lose); }
.tr-card.is-add .tr-state { color: #7ab0ff; }
.tr-btns { grid-column: 1 / -1; display: flex; justify-content: center; gap: 14px; padding-top: 4px; }
.tr-b { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; transition: transform .14s var(--ease), filter .2s; }
.tr-b svg { width: 28px; height: 28px; }
.tr-b:hover { filter: brightness(1.12); }
.tr-b:active { transform: scale(.9); }
.tr-b.is-yes { background: rgba(111,208,140,.18); color: #6fd08c; box-shadow: inset 0 0 0 2px rgba(111,208,140,.55); }
.tr-b.is-add { background: rgba(122,176,255,.18); color: #7ab0ff; box-shadow: inset 0 0 0 2px rgba(122,176,255,.55); }
.tr-b.is-no { background: rgba(239,107,107,.18); color: #ef6b6b; box-shadow: inset 0 0 0 2px rgba(239,107,107,.55); }
.tr-row-btns { grid-column: 1 / -1; display: flex; justify-content: center; gap: 8px; }
.tr-card.is-log { padding: 10px 12px; }
.tr-card.is-log .tr-word { font-size: 18px; }
.tr-card.is-log .tr-g, .tr-card.is-log .tr-g .gift { width: 40px; }
.tr-boards { display: grid; grid-template-columns: 1fr; gap: 8px; }
.tr-board { padding: 12px; }
.tr-bh { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.tr-bh .fd-ava { width: 30px; height: 30px; }
.tr-bh b { flex: 1; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-bh em { display: flex; align-items: center; gap: 3px; font-style: normal; font-size: 13px; font-weight: 700; color: var(--hint); }
.tr-bh em img { width: 14px; height: 14px; }
.tr-board .tr-slots { grid-template-columns: repeat(6, 1fr); }
.tr-go { margin-top: 10px; height: 44px; line-height: 44px; font-size: 14.5px; }
#view-trade .pf-sec em { margin-left: auto; }
@media (max-width: 520px) {
    .tr-slots, .tr-board .tr-slots { grid-template-columns: repeat(3, 1fr); }
    .tr-card { grid-template-columns: 1fr; }
    .tr-side.is-to { align-items: flex-start; text-align: left; }
    .tr-side.is-to .tr-who { flex-direction: row; }
    .tr-side.is-to .tr-gs { justify-content: flex-start; }
}
@media (min-width: 900px) {
    #view-trade.is-active { max-width: 980px; width: 100%; margin: 0 auto; }
    .tr-boards { grid-template-columns: 1fr 1fr; }
}

/* ---------- трейды: лист бумаги ---------- */
.tt-list { display: flex; flex-direction: column; gap: 8px; }
.tt-li { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 22px; background: var(--card); cursor: pointer; animation: rise .3s var(--ease) both; transition: background .2s; }
.tt-li:hover { background: #232326; }
.tt-li.is-me { box-shadow: inset 0 0 0 1.5px rgba(168,199,239,.45); }
.tt-li .tt-word { font-size: 20px; }
.tt-lp { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tt-lp.is-r { align-items: flex-end; }
.tt-lp.is-r .tt-who { flex-direction: row-reverse; }
.tt-lg { display: flex; align-items: center; gap: 3px; min-height: 26px; }
.tt-lg img { width: 26px; height: 26px; object-fit: contain; }
.tt-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tt-who .fd-ava { width: 30px; height: 30px; }
.tt-who b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-who.is-wait b { color: var(--hint); }
.tt-who.is-wait .fd-ava { background: transparent; border: 1.5px dashed rgba(255,255,255,.2); }
.tt-res { width: 34px; height: 34px; display: grid; place-items: center; }
.tt-res svg { width: 28px; height: 28px; }
.tt-res.is-yes { color: #3fae5f; } .tt-res.is-no, .tt-res.is-off { color: #e24d4d; }
.tt-word { display: flex; font: 400 40px/1 "Permanent Marker", "SF Pro", sans-serif; letter-spacing: .02em; transform: rotate(-3deg); }
.tt-word i { font-style: normal; }
.tt-word i:nth-child(1) { color: #e24d4d; }
.tt-word i:nth-child(2) { color: #3fae5f; transform: translateY(2px) rotate(3deg); }
.tt-word i:nth-child(3) { color: #e24d4d; transform: rotate(-4deg); }
.tt-word i:nth-child(4) { color: #3fae5f; transform: translateY(-1px); }
.tt-word i:nth-child(5) { color: #e24d4d; transform: rotate(5deg); }

.tt-room { max-width: 560px; margin: 0 auto; }
.tt-bar { display: flex; align-items: center; justify-content: center; position: relative; height: 44px; }
.tt-bar .corner { position: absolute; left: 0; top: 50%; translate: 0 -50%; }
.tt-bar.is-bottom { margin-top: 2px; }
/* лист: тёплая бумага, лёгкая тень, чуть повёрнут */
.tt-paper {
    position: relative; margin: 6px 0; padding: 18px 16px; border-radius: 6px;
    background: #f4f1ea; color: #1b1b1b; transform: rotate(-.6deg);
    box-shadow: 0 18px 40px rgba(0,0,0,.55), 0 2px 0 rgba(0,0,0,.2);
    background-image: radial-gradient(120% 90% at 50% 40%, #fbf9f4 0%, #f1ede4 70%, #e9e4d8 100%);
}
.tt-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
/* квадрат, нарисованный маркером */
.tt-box {
    aspect-ratio: 1.15; display: grid; place-items: center; border: 3px solid #1b1b1b;
    border-radius: 7px 11px 6px 12px / 12px 6px 11px 7px; transform: rotate(var(--r));
    transition: background .2s, transform .15s var(--ease);
}
.tt-box svg { width: 56%; height: 56%; }
.tt-box.is-yes { color: #3fae5f; } .tt-box.is-add { color: #2f7de0; } .tt-box.is-no { color: #e24d4d; }
.tt-box:not(:disabled) { cursor: pointer; }
.tt-box:not(:disabled):hover { background: rgba(0,0,0,.05); }
.tt-box:not(:disabled):active { transform: rotate(var(--r)) scale(.93); }
.tt-box.is-on { animation: stamp .35s var(--ease); }
.tt-box.is-on.is-yes { background: rgba(63,174,95,.22); }
.tt-box.is-on.is-add { background: rgba(47,125,224,.2); }
.tt-box.is-on.is-no { background: rgba(226,77,77,.2); }
@keyframes stamp { 0% { transform: rotate(var(--r)) scale(1.25); } 60% { transform: rotate(var(--r)) scale(.95); } }
.tt-zone { position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 10px; min-height: 108px; padding: 14px 8px; }
.tt-empty { font: 400 17px "Permanent Marker", sans-serif; color: rgba(27,27,27,.35); transform: rotate(-2deg); }
.tt-sum { position: absolute; right: 4px; bottom: 2px; font: 400 15px "Permanent Marker", sans-serif; color: rgba(27,27,27,.55); }
.tt-g { position: relative; display: flex; flex-direction: column; align-items: center; transform: rotate(var(--r)); animation: drop-in .35s var(--ease) both; }
.tt-g img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 5px 6px rgba(0,0,0,.28)); }
.tt-g em { font: 400 13px "Permanent Marker", sans-serif; font-style: normal; color: #1b1b1b; }
.tt-g .tr-x { top: -4px; right: -6px; background: #1b1b1b; }
.tt-g:not(:disabled):hover .tr-x { opacity: 1; }
.tt-tonc img { width: 44px; height: 44px; margin: 10px 0; }
@keyframes drop-in { from { opacity: 0; transform: rotate(var(--r)) translateY(-14px) scale(1.1); } }
.tt-mid { position: relative; display: flex; justify-content: center; padding: 4px 0; }
.tt-mid .tt-word { font-size: 64px; }
.tt-stamp { position: absolute; left: 50%; top: 50%; translate: -50% -50%; padding: 4px 16px; border: 4px solid currentColor; border-radius: 10px; font: 400 34px "Permanent Marker", sans-serif; transform: rotate(-12deg); background: rgba(244,241,234,.75); animation: stamp2 .4s var(--ease) both; }
.tt-stamp.is-yes { color: #2f9a4f; } .tt-stamp.is-no { color: #d23c3c; }
@keyframes stamp2 { from { opacity: 0; transform: rotate(-12deg) scale(1.8); } }
.tt-paper.is-no, .tt-paper.is-off { filter: saturate(.7); }
.tt-ctl { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; margin-top: 10px; }
.tt-ctl .cta { margin: 0; }
.tt-ctl .text-btn { margin: 0; width: auto; height: 52px; padding: 0 18px; }
@media (max-width: 520px) {
    .tt-li { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .tt-li .tt-word { display: none; }
    .tt-la { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
    .tt-mid .tt-word { font-size: 48px; }
    .tt-g img { width: 52px; height: 52px; }
    .tt-ctl { grid-template-columns: 1fr 1fr; }
    .tt-ctl .cta { grid-column: 1 / -1; }
}
@media (min-width: 900px) { #ttNew { max-width: 320px; margin: 0 auto; } }

/* ---------- админка ---------- */
.adm { display: flex; flex-direction: column; gap: 8px; }
.adm .lbl { margin: 6px 0 -2px 4px; }
.adm .search { width: 100%; margin: 0; height: 40px; }
.adm-found { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-p { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px 0 5px; border-radius: 999px; background: var(--card); font-size: 13.5px; transition: box-shadow .2s; }
.adm-p .fd-ava { width: 30px; height: 30px; }
.adm-p.is-on { box-shadow: inset 0 0 0 2px var(--ink); }
.adm-on { width: 7px; height: 7px; border-radius: 50%; background: #5fd08a; }
.adm-sel { display: flex; align-items: center; gap: 5px; min-height: 52px; padding: 4px 12px 4px 4px; border-radius: 18px; background: var(--card); overflow-x: auto; scrollbar-width: none; }
.adm-sel em { margin-left: auto; font-style: normal; font-size: 13px; font-weight: 700; color: var(--hint); white-space: nowrap; }
.sheet .adm-cat { max-height: 320px; }
#pfAdmin { max-width: 320px; margin: 14px auto 0; }

/* =========================================================
   кейсы: живые превью и лента с редкостями (27.09.2026)
   ========================================================= */
.cs-rays {
    position: absolute; left: 50%; top: 50%; z-index: 0; width: 200px; height: 200px; margin: -100px 0 0 -100px; border-radius: 50%; pointer-events: none;
    background: repeating-conic-gradient(color-mix(in srgb, var(--acc) 45%, transparent) 0deg 7deg, transparent 7deg 22.5deg);
    -webkit-mask: radial-gradient(closest-side, #000 15%, transparent); mask: radial-gradient(closest-side, #000 15%, transparent);
    opacity: .5; animation: cs-spin 24s linear infinite paused;
}
.cs-stars {
    position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0;
    background: radial-gradient(2px 2px at 16% 26%, #fff, transparent), radial-gradient(1.5px 1.5px at 84% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 74% 80%, #fff, transparent), radial-gradient(2px 2px at 24% 76%, #fff, transparent), radial-gradient(1px 1px at 52% 8%, #fff, transparent);
    animation: cs-twinkle 2.8s ease-in-out infinite paused; animation-delay: var(--d);
}
.cs-art-0 { animation: cs-float 3.4s ease-in-out infinite paused; animation-delay: var(--d); }
.cs-art-1 { animation: cs-float 3.4s ease-in-out infinite paused; animation-delay: calc(var(--d) - 1.1s); }
.cs-art-2 { animation: cs-float 3.4s ease-in-out infinite paused; animation-delay: calc(var(--d) - 2.2s); }
.cs-glint { position: absolute; inset: 0; z-index: 5; overflow: hidden; border-radius: inherit; pointer-events: none; }
.cs-glint::before { content: ""; position: absolute; top: -10%; bottom: -10%; left: 0; width: 36%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.11), transparent); transform: translateX(-150%) skewX(-16deg); animation: cs-glint 6s ease-in-out infinite paused; animation-delay: var(--d); }
.cs-card.is-vis :is(.cs-rays, .cs-stars, .cs-art img, b) { animation-play-state: running; }
.cs-card.is-vis .cs-glint::before { animation-play-state: running; }
.cs-card:active .cs-art-0 { scale: 1.08; }
.cs-x {
    position: absolute; z-index: 4; top: 10px; right: 10px; height: 22px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center;
    font-style: normal; font-size: 11px; font-weight: 800; color: var(--rc);
    background: color-mix(in srgb, var(--rc) 14%, rgba(0,0,0,.5)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 35%, transparent);
}
.cs-odds { display: flex; gap: 2px; width: 72%; height: 4px; margin: -3px 0 -1px; border-radius: 4px; overflow: hidden; }
.cs-odds i { min-width: 3px; }
.cs-card.is-lux { box-shadow: inset 0 0 0 1.5px rgba(255,201,77,.5), 0 0 26px -8px rgba(255,201,77,.45); }
.cs-card.is-lux .cs-rays { background: repeating-conic-gradient(rgba(255,201,77,.5) 0deg 7deg, transparent 7deg 22.5deg); opacity: .7; animation-duration: 14s; }
.cs-card.is-lux .cs-stars { background: radial-gradient(2px 2px at 16% 26%, #ffe39a, transparent), radial-gradient(2px 2px at 84% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 74% 80%, #ffe39a, transparent), radial-gradient(2px 2px at 24% 76%, #fff, transparent), radial-gradient(1.5px 1.5px at 52% 8%, #ffe39a, transparent), radial-gradient(1.5px 1.5px at 92% 58%, #fff, transparent); }
.cs-card.is-lux b { background: linear-gradient(90deg, #ffc94d, #fff3cf, #ffc94d, #e8a93a, #ffc94d) 0 0 / 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: cs-gold 4s linear infinite paused; }
@keyframes cs-spin { to { rotate: 360deg; } }
@keyframes cs-float { 50% { translate: 0 -6px; } }
@keyframes cs-twinkle { 50% { opacity: .9; } }
@keyframes cs-glint { 0% { transform: translateX(-150%) skewX(-16deg); } 24%, 100% { transform: translateX(380%) skewX(-16deg); } }
@keyframes cs-gold { to { background-position: -200% 0; } }

/* лента: цвет редкости под каждым подарком, стрелка красится в текущий */
.cs-cell { position: relative; transition: transform .14s var(--ease), opacity .35s, filter .35s; }
.cs-rb { position: absolute; top: 0; left: 0; z-index: 1; width: 100%; aspect-ratio: 1; border-radius: 20px; pointer-events: none; background: linear-gradient(to top, color-mix(in srgb, var(--rc) 40%, transparent), transparent 48%); box-shadow: inset 0 -3px 0 var(--rc); }
.cs-cell[data-r="0"] .cs-rb { opacity: .45; }
.cs-reel.is-sm .cs-rb { border-radius: 16px; }
.cs-cell.is-cur { transform: scale(1.06); }
.cs-reel::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 20px; width: 170px; translate: -50% 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(closest-side, color-mix(in srgb, var(--rc, var(--ink)) 32%, transparent), transparent); }
.cs-track { z-index: 1; }
.cs-reel.is-spin::after, .cs-reel.is-done::after { opacity: 1; }
.cs-reel .cs-mark { background: var(--rc, var(--ink)); box-shadow: 0 0 14px var(--rc, rgba(168,199,239,.8)); transition: background .12s, box-shadow .12s; }
.cs-reel .cs-mark::before { border-top-color: var(--rc, var(--ink)); }
.cs-reel .cs-mark::after { border-bottom-color: var(--rc, var(--ink)); }
.cs-reel.is-done .cs-cell:not(.is-hit) { opacity: .28; filter: grayscale(.7); }
.cs-cell.is-hit { z-index: 2; animation: cs-hit .55s var(--ease) forwards; }
.cs-cell.is-hit .gift { box-shadow: 0 0 0 3px var(--rc), 0 0 34px color-mix(in srgb, var(--rc) 70%, transparent); }
.cs-burst { position: absolute; left: 50%; top: 55px; z-index: -1; width: 250px; height: 250px; margin: -125px 0 0 -125px; border-radius: 50%; pointer-events: none; background: repeating-conic-gradient(color-mix(in srgb, var(--rc) 60%, transparent) 0deg 8deg, transparent 8deg 24deg); -webkit-mask: radial-gradient(closest-side, #000 12%, transparent); mask: radial-gradient(closest-side, #000 12%, transparent); animation: cs-spin 7s linear infinite, fade .5s; }
.cs-reel.is-sm .cs-burst { top: 43px; width: 190px; height: 190px; margin: -95px 0 0 -95px; }
@keyframes cs-hit { 0% { transform: scale(1); } 45% { transform: scale(1.14); } 100% { transform: scale(1.07); } }
@media (prefers-reduced-motion: reduce) { .cs-rays, .cs-stars, .cs-art img, .cs-glint::before, .cs-card.is-lux b, .cs-burst { animation: none !important; } }
