/* Светлый минимал и тёмная тема. Все цвета - в токенах. */
:root {
  --bg: #e4e4de;
  --card: #f9f9f6;
  --soft: #ecece6;
  --line: #e2e2dc;
  --line2: #dcdcd6;
  --ink: #0d0d0d;
  --on-ink: #ffffff;
  --ink-muted: #9a9a95;
  --muted: #8a8a86;
  --up: #d9600f;
  --down: #1f9d55;
  --alert: #e5484d;
  --r: 18px;
  --tb: 50px; /* высота нижнего меню без safe-area */
  --shadow: 0 0 0 1px rgba(20,20,10,.05), 0 1px 2px rgba(20,20,10,.06), 0 8px 20px -8px rgba(20,20,10,.16);
  --glow-ink: 0 0 0 1px rgba(0,0,0,.2), 0 10px 26px -10px rgba(13,13,13,.55), 0 0 22px -6px rgba(217,96,15,.28);
  --pat: rgba(40,40,20,.11); /* цвет узора фона (симки и линии) */
}
/* Тёмная тема: включается атрибутом data-theme="dark" на <html> */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111112;
  --card: #1c1c1e;
  --soft: #26262a;
  --line: #2a2a2e;
  --line2: #3a3a3f;
  --ink: #f2f2ee;
  --on-ink: #111112;
  --ink-muted: #6b6b68;
  --muted: #8d8d93;
  --up: #ff8a3d;
  --down: #3ccf7a;
  --shadow: 0 0 0 1px rgba(255,255,255,.05), 0 8px 20px -10px rgba(0,0,0,.7);
  --glow-ink: 0 0 0 1px rgba(255,255,255,.1), 0 10px 26px -12px rgba(0,0,0,.8), 0 0 24px -6px rgba(255,138,61,.3);
  --sim-bg: #232326;
  --sim-fg: #f2f2ee;
  --pat: rgba(255,255,255,.085);
}
:root[data-theme="dark"] .sim { box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 18px 40px -16px rgba(0,0,0,.9); }
:root[data-theme="dark"] .stage::before { opacity: .8; }
:root[data-theme="dark"] .sheet { background: rgba(0,0,0,.55); }
:root[data-theme="dark"] .switch.on i { background: var(--on-ink); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); transition: background-color .2s; scrollbar-gutter: stable; }
/* Узор фона: симки плиткой + длинные диагональные линии. Цвет - токен --pat, форма - SVG-маски. */
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--pat);
  -webkit-mask: url(bg-sims.svg) 0 0 / 380px 460px repeat, url(bg-lines.svg) 0 0 / 100% 100% no-repeat;
  mask: url(bg-sims.svg) 0 0 / 380px 460px repeat, url(bg-lines.svg) 0 0 / 100% 100% no-repeat; }
html, body { margin: 0; color: var(--ink); font: 15px/1.4 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
/* Без прокрутки влево: всё, что вылезает за ширину, обрезаем (clip не ломает sticky) */
html, body { overflow-x: clip; overscroll-behavior: none; }
/* Быстрые тапы не зумят и не двигают страницу */
button, a, [data-act], [data-go], [data-sheet] { touch-action: manipulation; }
/* Экран крутки помещается в окно целиком и не прокручивается. Если разбор оценки длинный, листается только он. */
html.lock, html.lock body { height: 100%; overflow: hidden; }
html.lock main { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
html.lock main > * { flex: none; }
html.lock .panel { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
html.lock .panel::-webkit-scrollbar { display: none; }
html.lock .dock { margin-top: auto; }
main { max-width: 440px; margin: 0 auto; padding: 16px 18px calc(var(--tb) + 25px + env(safe-area-inset-bottom)); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { opacity: .4; cursor: default; }
h1 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin: 28px 0 12px; }
h1 .muted { font-weight: 600; }
h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin: 26px 0 10px; }
h3 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 24px 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.up { color: var(--up); }
.down { color: var(--down); }
.dot-c { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--muted)); }

/* Шапка */
.top { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.lvl { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 12px; color: var(--muted); }
.lvl .bar { flex: 0 1 56px; min-width: 24px; }
.lvl > span:first-child { white-space: nowrap; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; font-weight: 700; cursor: pointer; }
.avatar.xl { width: 88px; height: 88px; font-size: 36px; }
.who { min-width: 0; line-height: 1.25; cursor: pointer; }
.who b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who span { font-size: 12px; color: var(--muted); }
.balance { position: relative; margin-left: auto; text-align: right; line-height: 1.15; }
.balance[data-go] { cursor: pointer; }
.cty-r { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.cty-r small { font-size: 11px; }
/* Бонус-крутка в шапке: минимализм. Тонкое кольцо прогресса с числом и множитель простым текстом.
   Без заливок и градиентов: уровень удачи виден только по цвету кольца (--a). */
.hbonus { --a: var(--ink);
  flex: none; display: flex; align-items: center; gap: 7px; margin-left: auto; padding: 0; background: none;
  border: 0; font: inherit; color: var(--ink); line-height: 1; cursor: pointer; transition: opacity .15s; }
.hbonus:active { opacity: .5; }
.hbonus + .balance { margin-left: 0; }
.hbonus.t2 { --a: var(--down); }
.hbonus.t3 { --a: #5b6cff; }
.hbonus.t5, .hbonus.ready { --a: var(--up); }
.hb-ring { position: relative; display: grid; place-items: center; width: 32px; height: 32px; }
.hb-ring .ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.hb-ring .ring circle { fill: none; stroke: var(--line2); stroke-width: 1.6; }
.hb-ring .ring .ring-v { stroke: var(--a); stroke-linecap: round; transition: stroke-dasharray .4s; }
.hb-ring b { position: relative; font-size: 11px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hbonus.ready .hb-ring b { color: var(--a); }
.hbonus-x { font-size: 15px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hbonus-x i { font-style: normal; font-weight: 400; color: var(--muted); margin-right: 1px; }
.balance .gain { position: absolute; right: 0; top: 100%; font-style: normal; font-size: 14px; font-weight: 800; color: #1fa855; white-space: nowrap; pointer-events: none; margin-top: 2px; animation: gain-up 1.8s ease-out forwards; }
@keyframes gain-up { 0% { opacity: 0; transform: translateY(-4px); } 12% { opacity: 1; transform: translateY(0); } 75% { opacity: 1; } 100% { opacity: 0; } }
.balance small { display: block; font-size: 11px; color: var(--muted); }
.balance b { font-size: 21px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bar { flex: 1; height: 4px; background: var(--soft); border-radius: 2px; overflow: hidden; }
.bar b { display: block; height: 100%; background: var(--ink); border-radius: 2px; transition: width .4s; }

/* SIM-карта */
/* Сцена: тёплое свечение за картой, сама карта - светлый пластик по центру */
.stage { position: relative; isolation: isolate; padding: 22px 0 18px; }
.stage::before { content: ''; position: absolute; z-index: -1; left: 50%; top: 50%; width: 120%; aspect-ratio: 1.3; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(255,214,150,.55), rgba(255,190,110,.12) 55%, transparent); opacity: .35; pointer-events: none; }
.sim { position: relative; overflow: hidden; isolation: isolate; width: 100%; aspect-ratio: 1.58; margin: 0 auto; padding: 16px 18px; border-radius: 14px; background: linear-gradient(160deg, #ffffff, #f1f1ee 60%, #e7e7e3); color: #151515; display: flex; flex-direction: column; box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 18px 36px -16px rgba(0,0,0,.45); }
.sim.big { width: 82%; max-width: 340px; padding: 18px 20px; border-radius: 16px; }
.sim.big .num { font-size: 23px; font-weight: 600; }
.sim.big .chip { width: 44px; height: 34px; }
.sim:not(.empty)::after { content: ''; position: absolute; z-index: -1; right: -25%; bottom: -55%; width: 75%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, var(--rc), transparent); opacity: .22; }
.sim-top { display: flex; justify-content: space-between; align-items: flex-start; }
.brand { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: #6d6d68; }
.brand i { display: grid; place-items: center; width: 14px; height: 14px; border-radius: 4px; background: #9a9a94; color: #fff; font: 800 10px/1 inherit; font-style: normal; }
.op { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; }
.op-mark { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 3px; border-radius: 5px; font-size: 10px; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.country { font-size: 11px; color: #85857f; margin-top: 4px; }
/* Золотой чип с контактными площадками */
.chip { position: relative; flex: none; width: 38px; height: 30px; border-radius: 6px; background: linear-gradient(135deg, #f6dfa4, #d8b25e 55%, #c79a42); box-shadow: inset 0 0 0 1px rgba(120,80,20,.35), 0 1px 2px rgba(0,0,0,.15); }
.chip::before { content: ''; position: absolute; inset: 6px 9px; border-radius: 3px; border: 1px solid rgba(110,72,18,.45); }
.chip::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(110,72,18,.45); box-shadow: 0 -8px 0 rgba(110,72,18,.3), 0 8px 0 rgba(110,72,18,.3); }
.num { margin-top: auto; font-size: 22px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sim.empty .num span { color: #c4c4be; }
.num .reel { display: inline-block; height: 1.2em; line-height: 1.2em; overflow: hidden; vertical-align: bottom; -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); }
.num .strip { display: block; will-change: transform; }
.num .strip i { display: block; font-style: normal; height: 1.2em; }
.rar { align-self: flex-start; display: flex; align-items: center; gap: 7px; margin-top: 10px; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.1); font-size: 12px; font-weight: 600; color: #fff; }
.sim .rar { background: rgba(0,0,0,.06); color: #222; }
.rar i { width: 7px; height: 7px; border-radius: 50%; background: var(--rc); }
/* Мифическая редкость: чёрная карта, цвет редкости светит из угла */
.sim.dark { color: #fff; background: linear-gradient(160deg, #1a1a20, #0b0b10 60%, #050507); box-shadow: 0 0 0 1px rgba(255,255,255,.16), 0 0 26px -6px var(--rc), 0 18px 40px -14px rgba(0,0,0,.9); }
.sim.dark::after { opacity: .5; }
.sim.dark .country { color: rgba(255,255,255,.65); }
.sim.dark .rar { background: rgba(255,255,255,.14); color: #fff; }
.sim.dark .sim-top, .sim.dark .num, .sim.dark .rar { position: relative; z-index: 3; }
/* Божественная редкость: неоновая сцена страны во всю карту, переливающаяся рамка и блик */
.sim.divine { color: #fff; background: #07070c; box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 0 26px -6px var(--rc), 0 18px 40px -14px rgba(0,0,0,.9); }
.sim.divine::after { content: ''; position: absolute; z-index: 2; inset: 0; border-radius: inherit; padding: 1.5px; background: conic-gradient(from var(--ang, 0deg), #3fe0ff, #b388ff, #ff6ad5, #ffd36b, #6bffb8, #3fe0ff); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .9; right: 0; bottom: 0; width: auto; aspect-ratio: auto; animation: divine-ring 4s linear infinite; pointer-events: none; }
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes divine-ring { to { --ang: 360deg; } }
.sim-art { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; }
.sim-art .neon { fill: none; stroke: var(--line); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.sim-art .neon.thin { stroke-width: 1; opacity: .6; }
.sim-art .ray { stroke: #ffd34d; stroke-width: 1.4; opacity: .7; }
.sim-holo { position: absolute; z-index: 1; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.22) 45%, rgba(160,240,255,.18) 50%, transparent 62%); background-size: 260% 100%; mix-blend-mode: screen; animation: divine-holo 5s ease-in-out infinite; }
@keyframes divine-holo { 0%, 20% { background-position: 120% 0; } 70%, 100% { background-position: -40% 0; } }
.sim.divine .sim-top, .sim.divine .num, .sim.divine .rar { position: relative; z-index: 3; }
.sim.divine .country { color: rgba(255,255,255,.72); }
.sim.divine .num { text-shadow: 0 1px 8px rgba(0,0,0,.6), 0 0 14px color-mix(in srgb, var(--rc) 45%, transparent); }
.sim.divine .rar { background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(4px); }
@media (prefers-reduced-motion: reduce) { .sim.divine::after, .sim-holo { animation: none; } }

/* Свечение за картой по редкости. Цвет - --rc со .stage, сила растёт с редкостью. */
.stage[class*=" r-"]::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--rc) 60%, transparent), color-mix(in srgb, var(--rc) 16%, transparent) 55%, transparent); transition: opacity .4s; }
.stage.r-common::before { background: radial-gradient(closest-side, rgba(255,214,150,.55), rgba(255,190,110,.12) 55%, transparent); opacity: .35; }
.stage.r-uncommon::before { opacity: .45; }
.stage.r-rare::before { opacity: .6; }
.stage.r-epic::before { opacity: .75; }
.stage.r-legendary::before, .stage.r-mythic::before, .stage.r-divine::before { opacity: .95; animation: aura-breathe 3.2s ease-in-out infinite; }
.stage.r-rare .sim.big, .stage.r-epic .sim.big { box-shadow: 0 0 0 1px color-mix(in srgb, var(--rc) 35%, transparent), 0 0 24px -8px var(--rc), 0 18px 36px -16px rgba(0,0,0,.45); }
.stage.r-legendary .sim.big, .stage.r-mythic .sim.big { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--rc) 65%, transparent), 0 0 30px -4px var(--rc), 0 18px 36px -16px rgba(0,0,0,.45); }
@keyframes aura-breathe { 50% { transform: translate(-50%, -50%) scale(1.08); } }

/* Слой анимации. Не выходит за поля страницы, чтобы не было горизонтальной прокрутки. */
.aura { position: absolute; z-index: -1; left: -18px; right: -18px; top: -10px; bottom: -10px; overflow: hidden; pointer-events: none;
  -webkit-mask: radial-gradient(closest-side, #000 68%, transparent); mask: radial-gradient(closest-side, #000 68%, transparent); }
.aura i { position: absolute; left: 50%; top: 50%; width: 150%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  -webkit-mask: radial-gradient(closest-side, #000 25%, transparent 92%); mask: radial-gradient(closest-side, #000 25%, transparent 92%); }
/* Легендарный: золотые лучи медленно вращаются, второй слой - навстречу */
.r-legendary .aura i:first-child { background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 70%, transparent) 0 5deg, transparent 5deg 18deg); opacity: .55; animation: aura-spin 22s linear infinite; }
.r-legendary .aura i:last-child { width: 115%; background: repeating-conic-gradient(from 9deg, rgba(255,236,170,.8) 0 3deg, transparent 3deg 30deg); opacity: .5; animation: aura-spin 30s linear infinite reverse; }
/* Мифический: два встречных огненных вихря, искры поднимаются вверх */
.r-mythic .aura i:first-child { background: repeating-conic-gradient(from 0deg, #ff375f 0 4deg, transparent 4deg 11deg, #ff9f43 11deg 13deg, transparent 13deg 24deg); opacity: .75; animation: aura-spin 14s linear infinite; }
.r-mythic .aura i:last-child { width: 120%; background: conic-gradient(from 90deg, transparent, #ff375f 15%, transparent 35%, #ff375f 65%, transparent 85%); opacity: .6; filter: blur(4px); animation: aura-spin 6s linear infinite reverse, aura-beat 1.2s ease-in-out infinite; }
.aura b { position: absolute; left: var(--x); top: var(--y); width: 5px; height: 5px; border-radius: 50%; transform: scale(var(--s)); }
.r-mythic .aura b { width: 7px; height: 7px; background: radial-gradient(circle, #fff3c4, #ff7a3d 45%, transparent 70%); animation: ember 3s ease-in infinite; animation-delay: calc(var(--d) * -1); }
/* Божественный: радужный ореол и мерцающие звёзды */
.r-divine .aura i:first-child { background: conic-gradient(from 0deg, #3fe0ff, #b388ff, #ff6ad5, #ffd36b, #6bffb8, #3fe0ff); opacity: .85; filter: blur(3px); animation: aura-spin 9s linear infinite; }
.r-divine .aura i:last-child { width: 125%; background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.9) 0 2.5deg, transparent 2.5deg 15deg); opacity: .55; animation: aura-spin 40s linear infinite reverse; }
.r-divine .aura b { width: 9px; height: 9px; border-radius: 0; background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); filter: drop-shadow(0 0 3px #3fe0ff); animation: twinkle 2.6s ease-in-out infinite; animation-delay: calc(var(--d) * -1); }
@keyframes aura-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes aura-beat { 50% { opacity: .95; } }
@keyframes ember { 0% { opacity: 0; transform: translateY(20px) scale(var(--s)); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-60px) scale(calc(var(--s) * .3)); } }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(calc(var(--s) * .3)) rotate(0deg); } 50% { opacity: 1; transform: scale(var(--s)) rotate(45deg); } }
/* Блик по карте легендарного и мифического номера */
.sim-shine { position: absolute; z-index: 1; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 35%, color-mix(in srgb, var(--rc) 35%, rgba(255,255,255,.7)) 50%, transparent 65%); background-size: 260% 100%; mix-blend-mode: soft-light; animation: divine-holo 3.6s ease-in-out infinite; }
:root[data-theme="dark"] .sim-shine { mix-blend-mode: screen; opacity: .5; }
@media (prefers-reduced-motion: reduce) { .stage::before, .aura i, .aura b, .sim-shine { animation: none !important; } .aura b { opacity: .7; } }
.pop { animation: pop .45s cubic-bezier(.2,1.3,.4,1); }
@keyframes pop { from { transform: translateY(14px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }

/* Крутка */
.panel { margin-top: 12px; padding: 16px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.factor { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--soft); color: var(--up); font-weight: 700; }
.score { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.score small { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.score small .factor, .score small .keep-btn { margin: 0; }
.score .keep-btn { padding: 1px 9px; font-size: 11px; line-height: 1.5; }
.score .rar { align-self: center; margin: 0; padding: 8px 14px; background: var(--soft); color: var(--ink); font-size: 13px; }
.value { margin-top: 6px; font-size: 36px; font-weight: 800; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.chips { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 12px; }
.chip-btn { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 12px 14px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-size: 14px; font-weight: 600; }
.chip-t { display: flex; align-items: center; gap: 7px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.caret { flex: none; font-size: 11px; color: var(--muted); }
.chip-btn.count { justify-content: center; min-width: 54px; background: var(--ink); color: var(--on-ink); font-variant-numeric: tabular-nums; }
.cta .price { padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--on-ink) 12%, transparent); color: var(--on-ink); }
.selectors { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.sel { min-width: 0; text-align: left; padding: 13px 15px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.sel small { display: block; margin-bottom: 2px; font-size: 11px; color: var(--muted); }
.sel b { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; }
/* Почему такая оценка */
.why { list-style: none; margin: 14px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); }
.why li { display: flex; align-items: baseline; gap: 10px; padding: 4px 0; font-size: 12px; color: color-mix(in srgb, var(--ink) 80%, transparent); }
/* Удача: плашка в стиле бейджа бонуса в шапке */
.why li.why-luck { --a: #3ee08f; --b: #0f9a57; --g: rgba(46,204,120,.55);
  position: relative; overflow: hidden; align-items: center; gap: 8px; margin: 2px 0 4px; padding: 4px 4px 4px 6px; border-radius: 10px; color: var(--ink); font-weight: 600;
  background: linear-gradient(135deg, color-mix(in srgb, var(--a) 16%, transparent), color-mix(in srgb, var(--b) 10%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a) 40%, transparent); }
.why li.why-luck.t3 { --a: #8fb4ff; --b: #6a4cff; --g: rgba(110,110,255,.55); }
.why li.why-luck.t5 { --a: #ffe066; --b: #ff5e3a; --g: rgba(255,150,40,.6); }
.wl-ic { flex: none; width: 18px; text-align: center; font-size: 13px; }
.luck-x { flex: none; display: flex; align-items: baseline; padding: 3px 8px 3px 7px; border-radius: 7px; background: linear-gradient(160deg, var(--a), var(--b)); color: #fff; font-size: 12px; font-weight: 900; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 1px rgba(0,0,0,.25); box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 3px 10px -3px var(--g); }
.luck-x i { font-style: normal; font-size: 10px; font-weight: 800; opacity: .85; margin-right: 1px; }
.why-luck.t5 .luck-x { color: #3a1200; text-shadow: 0 1px 0 rgba(255,255,255,.35); background: linear-gradient(110deg, #ffe066, #ffb12b 40%, #ff5e3a 70%, #ffe066); background-size: 220% 100%; animation: hb-flow 3s linear infinite; }
.why-luck.t5::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 35%, rgba(255,255,255,.4) 50%, transparent 65%); transform: translateX(-120%); animation: hb-shine 3.2s ease-in-out infinite; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .why-luck .luck-x, .why-luck::after { animation: none !important; } }
.why-i { flex: none; width: 14px; text-align: center; color: var(--muted); }
.why-t { flex: 1; min-width: 0; }
.why b { font-weight: 600; font-variant-numeric: tabular-nums; }
.cta { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-top: 12px; box-shadow: 0 10px 24px -10px rgba(0,0,0,.5); padding: 19px 22px; border-radius: 18px; background: var(--ink); color: var(--on-ink); font-weight: 700; font-size: 16px; transition: transform .1s; }
.cta:active { transform: scale(.985); }
.cta:disabled { opacity: .55; cursor: default; transform: none; transition: opacity .15s; }
.cta span:last-child { color: var(--ink-muted); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Нижний блок крутки прилипает над вкладками, кнопку видно без прокрутки на любом экране */
.dock { position: sticky; z-index: 5; bottom: calc(var(--tb) + 7px + env(safe-area-inset-bottom)); margin: 0 -18px; padding: 4px 18px 10px; background: linear-gradient(color-mix(in srgb, var(--bg) 0%, transparent), var(--bg) 16px); }
@media (max-height: 760px) {
  .stage { padding: 16px 0 12px; }
  .panel { padding: 14px; }
  .value { font-size: 30px; }
  .why { margin-top: 10px; padding-top: 4px; }
  .why li { padding: 3px 0; }
  .cta { padding: 16px 20px; }
}
/* Низкое окно (Telegram на ПК): ужимаем всё, чтобы разбор оценки не прятался под кнопкой */
@media (max-height: 640px) {
  main { padding-top: 10px; }
  .top { padding-top: 6px; padding-bottom: 6px; }
  .balance b { font-size: 19px; }
  .stage { padding: 10px 0 8px; }
  .sim.big { width: 70%; }
  .sim.big .num { font-size: 20px; }
  .country { margin-top: 4px; }
  .num { font-size: 20px; }
  .panel { margin-top: 8px; padding: 8px 12px; }
  .score small { font-size: 11px; }
  .value { margin-top: 1px; font-size: 22px; }
  .score .rar { padding: 5px 10px; font-size: 11.5px; }
  .why { margin-top: 6px; padding-top: 2px; }
  .why li { padding: 1px 0; font-size: 11.5px; line-height: 1.3; }
  .why li.why-luck { padding: 2px 3px 2px 5px; margin: 1px 0 2px; }
  .chips { margin-top: 4px; gap: 6px; }
  .chip-btn { padding: 8px 12px; font-size: 13px; }
  .cta { margin-top: 8px; padding: 12px 18px; border-radius: 16px; font-size: 15px; }
  .cta .price { padding: 4px 10px; }
  .dock { padding-bottom: 6px; }
}

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 11px 18px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--ink); font-weight: 600; font-size: 14px; white-space: nowrap; }
.btn.small { padding: 7px 13px; font-size: 13px; }
.star { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; color: var(--line2); }
.star.on { color: var(--ink); }

/* Списки-карточки: коллекция, меню, статистика, шансы, шторки */
.list, .stats, .chances, .opts { background: var(--card); box-shadow: var(--shadow); border-radius: var(--r); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 16px; border-bottom: 1px solid var(--line); }
.item:last-child, .stats div:last-child, .chances div:last-child, .opt:last-child, .link:last-child { border-bottom: 0; }
.item-main { flex: 1; min-width: 0; }
.coll-item { gap: 5px; padding-left: 10px; padding-right: 8px; }
.coll-item .item-num { font-size: 13px; letter-spacing: -.01em; }
.coll-item .item-sub { flex-wrap: wrap; row-gap: 0; }
.coll-item .item-price { white-space: nowrap; }
.coll-item .star, .coll-item .mk-btn { width: 30px; height: 30px; }
.coll-item .btn.small { flex: none; padding: 7px 9px; }
.isim { position: relative; overflow: hidden; isolation: isolate; flex: none; width: 50px; aspect-ratio: 1.58; display: flex; flex-direction: column; padding: 5px 6px; border-radius: 7px; background: linear-gradient(160deg, #ffffff, #f1f1ee 60%, #e7e7e3); color: #151515; box-shadow: 0 0 0 1px rgba(0,0,0,.07), 0 6px 12px -6px rgba(0,0,0,.45); }
.isim::after { content: ''; position: absolute; z-index: -1; right: -30%; bottom: -60%; width: 95%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, var(--rc), transparent); opacity: .45; }
.isim-top { display: flex; justify-content: space-between; align-items: flex-start; }
.isim .op-mark { min-width: 13px; height: 13px; padding: 0 2px; border-radius: 3px; font-size: 7px; }
.isim-chip { position: relative; width: 15px; height: 12px; border-radius: 3px; background: linear-gradient(135deg, #f6dfa4, #d8b25e 55%, #c79a42); box-shadow: inset 0 0 0 1px rgba(120,80,20,.35); }
.isim-chip::before { content: ''; position: absolute; inset: 3px 4px; border-radius: 1px; border: 1px solid rgba(110,72,18,.45); }
.isim-num { margin-top: auto; display: flex; gap: 3px; }
.isim-num i { height: 3px; border-radius: 2px; background: currentColor; opacity: .5; }
.isim-num i:first-child { width: 12px; }
.isim-num i:last-child { width: 20px; }
.isim.dark, .isim.divine { background: #07070c; color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 0 12px -3px var(--rc); }
.isim.dark::after { opacity: .7; }
.isim.divine::after { opacity: 0; }
.isim .sim-art { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; }
.isim.divine .isim-top, .isim.divine .isim-num { position: relative; z-index: 1; }
:root[data-theme="dark"] .isim:not(.dark):not(.divine) { box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 6px 12px -6px rgba(0,0,0,.9); }
.item-num { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.item-sub { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12px; color: var(--muted); }
.item-price { margin-right: 4px; font-size: 14px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.coll-sort { margin: 0 0 12px; }
.empty-note { padding: 32px 0; text-align: center; color: var(--muted); }

/* Профиль */
.profile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 24px 0 4px; text-align: center; }
.profile h1 { margin: 12px 0 0; }
.badge { margin: 8px 0 4px; padding: 6px 12px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-size: 13px; font-weight: 600; }
.stats { margin-top: 16px; }
.stats div { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.stats span { color: var(--muted); }
.stats b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Меню */
.menu-h { margin-top: 26px; }
.sound-row.menu-bottom { margin-top: 22px; }
.ico { width: 20px; height: 20px; display: block; }
.tile-i { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--soft); color: var(--ink); display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line); }
/* Бонус дня: тёмная карточка с мягким свечением, после получения - светлая */
.claim { width: 100%; display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 14px 14px 14px 12px; border-radius: var(--r); background: var(--ink); color: var(--on-ink); text-align: left; box-shadow: var(--glow-ink); transition: transform .1s; }
.claim .tile-i { background: color-mix(in srgb, var(--on-ink) 10%, transparent); color: var(--on-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--on-ink) 8%, transparent); }
.claim-t { flex: 1; min-width: 0; line-height: 1.25; }
.claim-t b { display: block; font-size: 15px; }
.claim-t small { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-muted); }
.claim .tag { flex: none; padding: 8px 13px; border-radius: 999px; background: var(--on-ink); color: var(--ink); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.claim.done { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.claim.done .tile-i { background: var(--soft); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.claim.done .claim-t small { color: var(--muted); }
.claim.done .tag { background: var(--soft); color: var(--muted); font-weight: 600; }
/* Прогресс удачи */
.luck-card { width: 100%; display: block; margin-top: 8px; padding: 12px 14px 14px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); text-align: left; transition: transform .1s; }
.luck-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.luck-l { display: flex; align-items: center; gap: 8px; min-width: 0; }
.luck-l .ico { width: 18px; height: 18px; color: var(--up); }
.luck-l b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.luck-card .bar { display: block; height: 6px; border-radius: 3px; }
.luck-card .bar b { background: var(--up); border-radius: 3px; }
/* Доступные разделы 2x2 */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { min-width: 0; display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); text-align: left; transition: transform .1s, box-shadow .2s; }
.tile .tile-i { background: var(--ink); color: var(--on-ink); box-shadow: 0 4px 12px -4px rgba(13,13,13,.45); }
.tile-t { min-width: 0; line-height: 1.25; }
.tile-t b { display: block; font-size: 14px; font-weight: 700; }
.tile-t small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* В разработке */
.soon-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.soon-i { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px; border-radius: 14px; background: transparent; border: 1px dashed var(--line2); color: var(--muted); font-size: 11.5px; font-weight: 600; line-height: 1.2; text-align: center; transition: transform .1s; }
.soon-i .ico { width: 18px; height: 18px; opacity: .8; }
.soon-i span { max-width: 100%; }
.tile:active, .claim:active, .luck-card:active, .soon-i:active, .row:active { transform: scale(.97); }
.link { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 16px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 500; }
.link .muted { font-size: 13px; }
.link.soon { color: var(--muted); }

/* Шансы */
.chances div { display: grid; grid-template-columns: 1fr auto 72px; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.chances span:first-child { display: flex; align-items: center; gap: 9px; }
.chances b { font-weight: 600; }
.chances span:last-child { text-align: right; }
.back { display: inline-block; margin-top: 4px; color: var(--muted); font-weight: 500; }

/* Шторка */
.sheet { position: fixed; inset: 0; z-index: 30; background: rgba(13,13,13,.32); opacity: 0; pointer-events: none; transition: opacity .2s; }
.sheet.open { opacity: 1; pointer-events: auto; }
.sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-width: 440px; max-height: 85vh; margin: 0 auto; overflow-y: auto; padding: 8px 18px calc(24px + env(safe-area-inset-bottom)); background: var(--bg); border-radius: 24px 24px 0 0; transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.sheet.open .sheet-panel { transform: none; }
.grip { width: 36px; height: 4px; margin: 6px auto 10px; border-radius: 2px; background: var(--line2); cursor: pointer; }
.sheet h2 { margin: 10px 0 2px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.tabs { display: flex; gap: 4px; margin: 14px 0; padding: 4px; background: var(--soft); border-radius: 12px; }
.tabs button { flex: 1; padding: 9px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); }
.tabs .on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.seg { display: flex; gap: 4px; padding: 4px; background: var(--soft); border-radius: 12px; }
.seg button { flex: 1; padding: 9px 4px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg .on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.opt { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.opt > span:first-child { min-width: 0; }
.opt .opt-l { display: flex; align-items: center; gap: 10px; }
.opt small { font-size: 12px; margin-left: 2px; }
.opt span span small { display: block; margin-left: 0; }
.opt > span:not(:first-child) { flex: none; white-space: nowrap; }
.opt.on { font-weight: 600; }
.opt::after { content: ''; flex: none; width: 14px; text-align: right; font-weight: 700; }
.opt.on::after { content: '✓'; }

/* Нижнее меню */
/* Нижнее меню в стиле iOS: стекло, иконки над подписями, тинт активной вкладки */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 0 0 max(6px, env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--card) 78%, transparent); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: .5px solid color-mix(in srgb, var(--ink) 16%, transparent); }
.tabbar-in { display: flex; max-width: 440px; height: var(--tb); margin: 0 auto; }
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; padding: 6px 0 0; color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: .1px; transition: color .15s; }
.tabbar button:active .ti { transform: scale(.88); }
.tabbar .on { color: var(--up); }
.tabbar .ti { position: relative; width: 28px; height: 26px; display: grid; place-items: center; transition: transform .12s; }
.tabbar svg { width: 26px; height: 26px; }
.tabbar .dot { position: absolute; top: -2px; right: -5px; min-width: 10px; height: 10px; border-radius: 5px; background: var(--alert); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--card) 90%, transparent); }

/* Тост */
.toast { position: fixed; left: 50%; top: 16px; z-index: 40; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-weight: 600; font-size: 14px; white-space: nowrap; opacity: 0; transform: translate(-50%, -20px); transition: .25s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast i { width: 8px; height: 8px; border-radius: 50%; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.sound-row { margin-top: 8px; padding: 12px 14px; }

/* Настройки */
.sound-row .caret { font-size: 22px; line-height: 1; padding-right: 4px; color: var(--muted); }
.set-note { margin: -2px 0 10px; font-size: 13px; }
.set-row .opt-l .ico { flex: none; color: var(--ink); }
.set-row.opt::after { display: none; }
.set-row b { font-weight: 600; }
.switch { flex: none; position: relative; width: 44px; height: 26px; border-radius: 13px; background: var(--line2); transition: background .2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch.on { background: var(--ink); }
.switch.on i { transform: translateX(18px); }
.sold-tag { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--soft); color: var(--down); font-weight: 700; }
.keep-btn { display: inline-block; margin-left: 2px; padding: 1px 8px; border: 1px solid currentColor; border-radius: 999px; background: transparent; color: var(--up); font: inherit; font-weight: 700; cursor: pointer; }
.keep-btn:active { opacity: .6; }

/* ---------- Разделы меню: пропуск, рулетка, магазин, обмен, рейтинг, достижения ---------- */
.tile { position: relative; }
.tile-dot { position: absolute; top: 10px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--alert); }
.center { text-align: center; }
.btn.dark { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.btn.wide { width: 100%; margin-top: 10px; padding: 13px 18px; }
.list .tile-i { width: 36px; height: 36px; border-radius: 11px; }
.list .tile-i .ico { width: 18px; height: 18px; }

/* Пропуск */
.hero { padding: 16px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.hero-top small { display: block; font-size: 12px; color: var(--muted); }
.hero-top b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.hero .bar { display: block; height: 6px; border-radius: 3px; }
.hero .bar b { background: var(--up); }
.hero-sub { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); }
.pill { flex: none; padding: 5px 10px; border-radius: 999px; background: var(--soft); font-size: 12px; font-weight: 600; }
.pass-head { display: grid; grid-template-columns: 40px 1fr 1fr; gap: 6px; margin: 20px 0 6px; padding: 0 10px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pass-row { display: grid; grid-template-columns: 40px 1fr 1fr; gap: 6px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.pass-row:last-child { border-bottom: 0; }
.pl { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--soft); font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.pass-row.reached .pl { background: var(--ink); color: var(--on-ink); }
.pr { min-width: 0; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 11px; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; color: var(--muted); }
.pr em { margin-left: auto; font-style: normal; font-size: 11px; }
.pr.ready { background: var(--ink); color: var(--on-ink); text-align: left; }
.pr.ready em { color: var(--ink-muted); }
.pr.done { color: var(--ink); }
.pr.done em { color: var(--down); font-size: 13px; }
.pr.locked { opacity: .45; }

/* Рулетка */
.wheel-wrap { position: relative; width: min(300px, 100%); margin: 8px auto 4px; }
.wheel { display: block; width: 100%; height: auto; border-radius: 50%; box-shadow: var(--shadow); }
.wheel text { font-size: 12px; font-weight: 700; font-family: inherit; }
.wheel-pin { position: absolute; z-index: 1; top: -6px; left: 50%; width: 0; height: 0; margin-left: -10px; border: 10px solid transparent; border-top: 18px solid var(--up); border-bottom: 0; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.wheel-wrap + .cta + .muted { margin-top: 10px; font-size: 13px; }

/* Магазин и достижения */
.shop-item .item-sub, .ach .item-sub { white-space: normal; }
.stars-box { margin: 12px 0 6px; padding: 16px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.stars-bal { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-weight: 600; }
.stars-bal b { font-size: 24px; }
.stars-box .muted { margin: 6px 0 12px; font-size: 13px; }
.stars-packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stars-packs .btn { width: 100%; }
.shop-mode { margin: 12px 0 4px; }
.stars-box .m-field { margin-top: 10px; }
.stars-box .m-field + .muted { margin-bottom: 0; }
.ach.claimed { opacity: .6; }
.ach-prog { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.ach-prog .bar b { background: var(--up); }
.ach-prog small { flex: none; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ach-ok { flex: none; width: 34px; text-align: center; font-weight: 700; color: var(--down); }

/* Обмен */
.trade { display: grid; gap: 8px; }
.trade-row { display: grid; gap: 10px; padding: 14px 16px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.trade-top { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.trade-from, .trade-to { display: flex; align-items: center; gap: 7px; }
.trade-to { margin-left: auto; }
.trade-row .bar { height: 5px; }
.trade-give { font-size: 12px; color: var(--muted); }
.trade-row .btn { justify-self: start; }

/* Рейтинг */
.top-row { gap: 10px; padding-left: 10px; }
.top-row.me { background: color-mix(in srgb, var(--up) 12%, var(--card)); }
.place { flex: none; width: 24px; text-align: center; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.top-val { flex: none; padding-right: 6px; font-weight: 700; font-variant-numeric: tabular-nums; }

.podium { display: flex; align-items: flex-end; gap: 8px; margin: 18px 0 14px; }
.pd { --mc: var(--muted); flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.pd-1 { --mc: #ef9f27; } .pd-2 { --mc: #a8a6a0; } .pd-3 { --mc: #d85a30; }
.pd-name { max-width: 100%; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-sub { max-width: 100%; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-val { margin-top: 2px; font-size: 13px; font-weight: 700; color: var(--mc); font-variant-numeric: tabular-nums; }
.pd-1 .pd-val { font-size: 15px; }
.pd-step { align-self: stretch; display: grid; place-items: center; margin-top: 8px; border-radius: 12px 12px 4px 4px; background: color-mix(in srgb, var(--mc) 16%, var(--card)); color: var(--mc); font-size: 20px; font-weight: 800; }
.pd-1 .pd-step { height: 74px; font-size: 26px; }
.pd-2 .pd-step { height: 54px; }
.pd-3 .pd-step { height: 40px; }
.pd.empty .pd-step { background: var(--soft); color: var(--muted); }
.top-mine { position: sticky; bottom: calc(var(--tb) + 14px + env(safe-area-inset-bottom)); z-index: 5; margin-top: 12px; box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--up) 45%, transparent); }

/* Кнопка меню в шапке: три полоски */
.burger { position: relative; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--soft); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; transition: transform .1s; }
.burger i { display: block; width: 18px; height: 2px; border-radius: 1px; background: var(--ink); }
.burger:active { transform: scale(.94); }
.burger .dot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--alert); box-shadow: 0 0 0 2px var(--soft); }
.who .luck-tag { padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, var(--up) 14%, transparent); color: var(--up); font-weight: 600; white-space: nowrap; }

/* Друзья в настройках */
.friend-row { cursor: default; }
.friend-row .avatar { width: 32px; height: 32px; font-size: 14px; }
.set-row .btn { flex: none; }

/* ---------- Распаковка: коробки с телефонами ---------- */
/* Телефон сзади: корпус --pb, блок камер в левом верхнем углу. Размер задаёт --w. */
.phone { --w: 46px; position: relative; display: inline-block; flex: none; width: var(--w); height: calc(var(--w) * 2.05); border-radius: calc(var(--w) * .19); overflow: hidden; background: linear-gradient(155deg, color-mix(in srgb, var(--pb) 72%, #fff) 0%, var(--pb) 38%, var(--pb) 62%, color-mix(in srgb, var(--pb) 78%, #000) 100%); box-shadow: inset 0 0 0 calc(var(--w) * .028) color-mix(in srgb, var(--pb) 55%, #8a8a90), inset 0 0 0 calc(var(--w) * .045) color-mix(in srgb, var(--pb) 70%, #000), 0 8px 16px -8px rgba(0,0,0,.65); }
.phone::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(115deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,.05) 30%, transparent 46%, transparent 78%, rgba(255,255,255,.06) 100%); }
.phone svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.phone.wide { --w: 50px; }
.phone.square { border-radius: calc(var(--w) * .1); }
.phone.fold { height: calc(var(--w) * 1.9); width: calc(var(--w) * 1.2); border-radius: calc(var(--w) * .11); }
.phone.xs { --w: 16px; }
.phone.sm { --w: 26px; }
.phone.xl { --w: 96px; }
/* Детали крышки: площадки, линзы, вспышка */
.phone .pl { fill: color-mix(in srgb, var(--pb) 84%, #fff); stroke: color-mix(in srgb, var(--pb) 60%, #000); stroke-width: .7; }
.phone .pi { fill: color-mix(in srgb, var(--pb) 92%, #000); stroke: color-mix(in srgb, var(--pb) 55%, #fff); stroke-width: .6; }
.phone .pd { fill: color-mix(in srgb, var(--pb) 22%, #121317); stroke: color-mix(in srgb, var(--pb) 40%, #6b6c72); stroke-width: .8; }
.phone .psh { fill: rgba(0,0,0,.22); }
.phone .rim { fill: none; stroke: color-mix(in srgb, var(--pb) 30%, #c9cad0); stroke-width: 2.2; }
.phone .lr { fill: color-mix(in srgb, var(--pb) 35%, #2a2b30); stroke: color-mix(in srgb, var(--pb) 45%, #d6d7dc); stroke-width: 1; }
.phone .lg { fill: #05060a; }
.phone .li { fill: #172446; }
.phone .lh { fill: #3d5a9e; opacity: .55; }
.phone .ls { fill: #fff; opacity: .8; }
.phone .fl { fill: #f3ecd4; stroke: rgba(0,0,0,.35); stroke-width: .6; }
.phone .lidar { fill: #0d0e12; stroke: color-mix(in srgb, var(--pb) 50%, #000); stroke-width: .6; }
.phone .dt { fill: rgba(0,0,0,.5); }
.phone .scr { fill: #08090c; }
.phone .scr-g { fill: none; stroke: color-mix(in srgb, var(--pb) 60%, #000); stroke-width: 1.4; }
.phone .scr-l { fill: rgba(255,255,255,.07); }
.phone .half { fill: rgba(0,0,0,.06); }
.phone .hg { stroke: rgba(0,0,0,.4); stroke-width: 1.4; }
.phone .hg-l { stroke: rgba(255,255,255,.22); stroke-width: .7; }

.box-note { margin-top: 14px; font-size: 13px; }
.inv-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); font-size: 16px; }
.inv-btn b { flex: 1; text-align: left; }
.inv-btn span { padding: 4px 10px; border-radius: 999px; background: var(--soft); font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.phone-row .phone.xs { margin: 0 2px; }
.phone-row .btn { font-variant-numeric: tabular-nums; }

/* Шторка коробки */
.center-h { justify-content: center; text-align: center; }
.sheet-head { display: flex; align-items: center; gap: 16px; padding: 12px 0 14px; }
.sheet-head > div { flex: 1; min-width: 0; }
.sheet-head h2 { margin: 0; }
.sheet-head p { margin: 2px 0 0; font-size: 13px; }
.br { background: var(--card); box-shadow: var(--shadow); border-radius: var(--r); overflow: hidden; }
.br-row { display: grid; grid-template-columns: auto auto 1fr auto auto; align-items: center; gap: 9px; width: 100%; padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
.br-row:last-child { border-bottom: 0; }
.br-row b { font-weight: 600; }
.br-m { color: var(--muted); font-size: 12px; }
.br-p { font-weight: 700; font-variant-numeric: tabular-nums; }
.br-row .caret { color: var(--muted); font-size: 11px; }
.br-list { display: grid; gap: 2px; padding: 4px 6px 6px; }
.br-list div { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 6px 8px; font-size: 13px; }
.br-list .muted { font-size: 12px; }
.br-list b { font-variant-numeric: tabular-nums; min-width: 52px; text-align: right; }
.small-note { margin: 10px 0 0; font-size: 13px; }
.cta.gold { background: var(--up); color: #fff; }
.cta.ghost { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.sheet .cta, .reveal .cta { justify-content: center; }

/* Открытие: тёмный экран поверх игры */
.reveal { position: fixed; inset: 0; z-index: 35; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 16px; background: rgba(8,8,10,.9); color: #f2f2ee; opacity: 0; pointer-events: none; transition: opacity .2s; --card: #1c1c1e; --soft: #26262a; --ink: #f2f2ee; --on-ink: #111112; --muted: #8d8d93; }
.reveal.open { opacity: 1; pointer-events: auto; }
.reveal-in { position: relative; width: 100%; min-width: 0; max-width: 440px; display: flex; flex-direction: column; align-items: center; }
.reveal .cta { align-self: stretch; }
.strip-wrap { position: relative; align-self: stretch; overflow: hidden; margin: 8px -16px 0; padding: 14px 0; -webkit-mask: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); }
.strip { display: flex; gap: 8px; width: max-content; will-change: transform; }
.strip-pin { position: absolute; z-index: 2; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px; background: #ff8a3d; box-shadow: 0 0 10px #ff8a3d; border-radius: 2px; }
/* ячейка 96px + зазор 8px = CELL в app.js */
.pc { flex: none; width: 96px; height: 132px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border-radius: 14px; background: linear-gradient(180deg, #26262a 55%, color-mix(in srgb, var(--rc) 30%, #26262a)); box-shadow: inset 0 -3px 0 var(--rc); color: #f2f2ee; }
.pc-n { font-size: 11px; font-weight: 600; line-height: 1.15; text-align: center; padding: 0 6px; height: 2.3em; display: flex; align-items: center; }
.win { animation: win-pop .4s cubic-bezier(.2,1.4,.4,1); }
.win-glow { position: absolute; z-index: -1; top: -40px; left: 50%; width: 320px; height: 320px; margin-left: -160px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--rc) 55%, transparent), transparent); }
.win .phone { margin: 10px 0 6px; }
.win-name { margin: 14px 0 2px; font-size: 24px; }
.win-rar { color: var(--rc); font-weight: 700; font-size: 14px; }
.win-val { margin-top: 6px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.win-sub { margin-bottom: 14px; color: #f5c518; font-size: 13px; font-weight: 600; }
.win .cta { margin-top: 8px; }
.again { margin-top: 14px; color: var(--muted); font-weight: 600; font-size: 14px; }
@keyframes win-pop { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .win { animation: none; } }
.sheet .cta span:only-child, .reveal .cta span:only-child { color: inherit; }
.inv-btn:active { transform: scale(.97); }
.br-list { border-bottom: 1px solid var(--line); }
.sheet .cta:has(.price) { justify-content: space-between; }
/* ---------- Меню: плитка магазина первой, дальше разделы ---------- */
.m-chev { flex: none; color: var(--line2); font-size: 20px; line-height: 1; }
.o-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 18%, transparent); }
.o-wrap { position: relative; isolation: isolate; margin-top: 8px; padding: 18px 0 2px; }
.o-wrap::before { content: ''; position: absolute; z-index: -1; left: -18px; right: -18px; top: -10px; height: 290px; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--up) 10%, transparent), transparent); transition: opacity .3s; }
.o-wrap.on::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--up) 26%, transparent), transparent); }
.o-orb { position: relative; display: block; width: 216px; height: 216px; margin: 0 auto; border-radius: 50%; transition: transform .15s; }
.o-orb:active { transform: scale(.97); }
.o-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.o-ring circle { fill: none; stroke-width: 3; }
.o-tr { stroke: var(--line2); stroke-width: 2; stroke-dasharray: 2 7.6; }
.o-wrap.on .o-tr { stroke-dasharray: none; stroke-width: 3; stroke: color-mix(in srgb, var(--ink) 8%, transparent); }
.o-pr { stroke: var(--up); stroke-linecap: round; stroke-dasharray: var(--len) 700; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--up) 60%, transparent)); animation: o-fill 1.2s .1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes o-fill { from { stroke-dasharray: 0 700; } }
.o-ctr { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.o-ctr small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.o-ctr small .ico { width: 14px; height: 14px; color: var(--up); }
.o-x { margin: 6px 0 4px; font-size: 64px; font-weight: 700; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums;
  background: linear-gradient(160deg, color-mix(in srgb, var(--up) 35%, var(--card)), var(--up) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.o-x.ghost { background: none; color: transparent; -webkit-text-stroke: 1.2px color-mix(in srgb, var(--ink) 35%, transparent); }
.o-sub { font-size: 13px; color: var(--muted); }
.o-buy { margin-top: 10px; padding: 7px 14px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-size: 13px; font-weight: 600; }
.o-stars { display: flex; justify-content: center; gap: 14px; margin: 12px auto 0; font-size: 13px; color: var(--muted); }
.o-stars b { color: var(--ink); font-weight: 600; }
.o-stars em { font-style: normal; color: var(--up); font-weight: 600; }

.o-claim { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding: 6px 6px 6px 18px; min-height: 56px; border-radius: 999px;
  background: var(--card); box-shadow: var(--shadow); text-align: left; font-size: 13px; color: var(--muted); }
.o-claim b { display: block; font-size: 15px; font-weight: 600; color: var(--ink); }
.o-claim i { flex: none; font-style: normal; padding: 11px 18px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-size: 14px; font-weight: 600; transition: transform .1s; }
.o-claim:active i { transform: scale(.96); }
.o-claim.done { padding-right: 18px; }

.o-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.o-stats button { min-width: 0; padding: 14px 0 14px 14px; border-left: 1px solid var(--line); text-align: left; }
.o-stats button:first-child { border-left: 0; padding-left: 4px; }
.o-stats small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.o-stats small .ico { width: 14px; height: 14px; }
.o-stats b { display: block; margin-top: 4px; font-size: 22px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-stats b span { font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.o-stats button:active b { color: var(--muted); }

.o-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.o-tile { min-width: 0; display: flex; flex-direction: column; gap: 22px; padding: 16px; border-radius: 20px; background: var(--card); box-shadow: 0 0 0 1px var(--line2), var(--shadow); text-align: left; transition: transform .1s; }
.o-tile:active { transform: scale(.97); }
.o-tt { display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.o-tile b { display: block; font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
.o-tile small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-tile small.a { color: var(--up); }

.o-list { margin-top: 10px; padding: 0 16px; border-radius: 20px; background: var(--card); box-shadow: 0 0 0 1px var(--line2), var(--shadow); }
.o-row { width: 100%; display: flex; align-items: center; gap: 14px; padding: 15px 0; border-top: 1px solid var(--line); text-align: left; }
.o-row .m-chev { color: var(--muted); }
.o-row:first-child { border-top: 0; }
.o-row .ico { color: var(--muted); }
.o-row b { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.o-row em { flex: none; font-style: normal; font-size: 13px; color: var(--muted); }
.o-row:active b { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .o-pr { animation: none; } }
/* ---------- Распаковка: сетка коробок с веером телефонов ---------- */
.phone.md { --w: 34px; }
.fan { display: flex; align-items: flex-end; justify-content: center; }
.fan .phone { margin: 0 -6px; }
.fan .phone:nth-child(1) { transform: rotate(-12deg) translateY(4px); }
.fan .phone:nth-child(2) { z-index: 1; }
.fan .phone:nth-child(3) { transform: rotate(12deg) translateY(4px); }
.bx-stage { display: grid; place-items: end center; height: 86px; margin-bottom: 10px; border-radius: 16px; padding-bottom: 8px; background: radial-gradient(circle at 50% 85%, color-mix(in srgb, var(--bc) 45%, transparent), color-mix(in srgb, var(--bc) 8%, var(--soft)) 72%); }
.bx-stage.lg { width: 96px; height: 96px; flex: none; margin: 0; }
.bx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bx-card { position: relative; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 10px 10px 12px; border-radius: 22px; text-align: left; background: linear-gradient(170deg, color-mix(in srgb, var(--bc) 20%, var(--card)), var(--card) 60%); box-shadow: var(--shadow); transition: transform .1s; }
.bx-card b { padding: 0 4px; font-size: 15px; font-weight: 700; }
.bx-card small { padding: 0 4px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bx-price { align-self: flex-start; margin: 8px 4px 0; padding: 6px 11px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.bx-own { position: absolute; z-index: 2; top: 16px; left: 16px; padding: 2px 8px; border-radius: 999px; background: var(--up); color: #fff; font-size: 11px; font-weight: 700; }
.bx-wide { position: relative; width: 100%; display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 16px 18px; border-radius: 22px; text-align: left; overflow: hidden; background: radial-gradient(circle at 85% 70%, color-mix(in srgb, var(--bc) 40%, transparent), transparent 55%), linear-gradient(100deg, color-mix(in srgb, var(--bc) 26%, var(--card)), var(--card) 70%); box-shadow: var(--shadow); transition: transform .1s; }
.bx-wt { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.bx-wt b { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.bx-wt small { font-size: 12px; color: var(--muted); }
.bx-wt .bx-own { position: static; margin-bottom: 4px; }
.bx-wt .bx-price { margin: 10px 0 0; }
.bx-wide .fan { width: 120px; height: 84px; }
.bx-card:active, .bx-wide:active { transform: scale(.97); }

/* ---------- Рынок и кошельки ---------- */
.cur-row { display: flex; gap: 6px; overflow-x: auto; margin: 8px -16px 4px; padding: 2px 16px; scrollbar-width: none; }
.cur-row::-webkit-scrollbar { display: none; }
.cur-chip { flex: none; padding: 8px 12px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.cur-chip.on { background: var(--ink); color: var(--on-ink); }
.m-field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.m-field input { width: 100%; box-sizing: border-box; padding: 14px 16px; border: 1px solid var(--line2); border-radius: 14px; background: var(--card); color: var(--ink); font: 600 18px/1.2 inherit; font-variant-numeric: tabular-nums; }
.m-field input:focus { outline: 2px solid var(--up); outline-offset: -1px; }
.m-calc { min-height: 1.3em; margin: 8px 0 0; font-size: 14px; font-weight: 600; }
.cta.solo { justify-content: center; }
.cta.solo span:last-child { color: var(--on-ink); }
.m-wallet { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 4px 0 2px; padding: 12px 16px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; text-align: left; }
.m-wallet .m-chev { margin-left: auto; color: var(--muted); }
.w-flag { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--soft); font-size: 18px; }
.wallet-row .btn.small, .lot-row .btn.small { flex: none; }
.lot-price { flex: none; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lot-row .item-sub { flex-wrap: wrap; }
/* Витрина рынка: карточки 2 в ряд с миниатюрой номера или телефона */
.m-cur { position: relative; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.m-cur select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.m-cur i { font-style: normal; font-size: 10px; opacity: .7; }
.m-meta { margin: 10px 0 2px; font-size: 12px; color: var(--muted); }
.lot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.lot-card { position: relative; overflow: hidden; isolation: isolate; min-width: 0; display: flex; flex-direction: column; padding: 12px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.lot-card::before { content: ''; position: absolute; z-index: -1; left: -30px; top: -60px; width: 180px; height: 140px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--rc) 30%, transparent), transparent); }
.lot-rar { font-size: 11px; font-weight: 700; color: var(--rc); }
.lot-name { margin-top: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lot-buy { margin-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 9px 10px 9px 12px; border-radius: 12px; background: var(--ink); color: var(--on-ink); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lot-buy span { overflow: hidden; text-overflow: ellipsis; }
.lot-buy i { font-style: normal; font-size: 17px; line-height: 1; opacity: .6; }
.lot-buy.lack { background: var(--soft); color: var(--muted); }
.lot-mine { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lot-mine button { padding: 7px 10px; border-radius: 10px; background: var(--soft); font-size: 12px; font-weight: 600; color: var(--muted); }
/* мини-симка: та же карта, что на главной, в масштабе карточки */
.msim, .mph { position: relative; overflow: hidden; isolation: isolate; aspect-ratio: 1.58; margin: 8px 0 8px; border-radius: 10px; }
.msim { display: flex; flex-direction: column; padding: 9px 10px; background: linear-gradient(160deg, #ffffff, #f1f1ee 60%, #e7e7e3); color: #151515; box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 10px 20px -10px rgba(0,0,0,.5); }
.msim::after { content: ''; position: absolute; z-index: -1; right: -25%; bottom: -55%; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, var(--rc), transparent); opacity: .3; }
.msim-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 4px; }
.msim-top > div { min-width: 0; }
.msim-op { display: flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.msim-op .op-mark { min-width: 13px; height: 13px; padding: 0 2px; border-radius: 3px; font-size: 7px; }
.msim-co { margin-top: 2px; font-size: 8px; color: #85857f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msim-chip { flex: none; position: relative; width: 20px; height: 16px; border-radius: 3px; background: linear-gradient(135deg, #f6dfa4, #d8b25e 55%, #c79a42); box-shadow: inset 0 0 0 1px rgba(120,80,20,.35); }
.msim-chip::before { content: ''; position: absolute; inset: 3px 5px; border-radius: 2px; border: 1px solid rgba(110,72,18,.45); }
.msim-num { margin-top: auto; font-size: 12px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.msim.dark { background: #07070c; color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 0 18px -4px var(--rc); }
.msim.dark .msim-co { color: rgba(255,255,255,.65); }
.msim.dark::after { opacity: .55; }
/* мини-телефон: модель в рамке размера симки на подсветке редкости */
.mph { display: grid; place-items: center; background: radial-gradient(60% 70% at 50% 60%, color-mix(in srgb, var(--rc) 22%, transparent), transparent), var(--soft); box-shadow: inset 0 0 0 1px var(--line); }
.mph-cond { position: absolute; right: 6px; top: 6px; padding: 2px 6px; border-radius: 6px; background: var(--card); font-size: 10px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.mk-btn { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.mk-btn .ico { width: 19px; height: 19px; }
.item .star + .mk-btn, .phone-row .mk-btn { margin: 0 -6px; }

/* Шторка «Не хватает монет» */
.short-opt b { display: block; font-weight: 600; }
.short-opt small { display: block; margin-left: 0; }
.short-opt::after { display: none; }
.short-opt .short-r { font-weight: 700; font-variant-numeric: tabular-nums; }
.short-opt.off { opacity: .55; }

/* Обязательная подписка на канал: онбординг на весь экран в стиле iOS, закрыть нельзя */
.subgate { --sg-sub: color-mix(in srgb, var(--ink) 58%, transparent);
  position: fixed; inset: 0; z-index: 38; display: flex; justify-content: center; overflow-y: auto; background: var(--bg); color: var(--ink); animation: subgate-fade .3s ease; }
.subgate[hidden] { display: none; }
.subgate-card { width: 100%; max-width: 440px; min-height: 100%; box-sizing: border-box; display: flex; flex-direction: column; padding: calc(56px + env(safe-area-inset-top)) 24px calc(20px + env(safe-area-inset-bottom)); text-align: center; font-family: -apple-system, "SF Pro Display", Inter, system-ui, sans-serif; }
.subgate-art { position: relative; flex: 1; min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.subgate-art::before { content: ''; position: absolute; left: 50%; top: 50%; width: 300px; height: 300px; margin: -150px 0 0 -150px; border-radius: 50%; background: radial-gradient(closest-side, rgba(242,193,78,.35), transparent); pointer-events: none; }
.subgate-sim { position: relative; width: 170px; height: 108px; border-radius: 16px; background: linear-gradient(135deg, #f8d77a, #e6ad35 55%, #c98d1f); box-shadow: 0 22px 40px -16px rgba(201,141,31,.75), inset 0 1px 0 rgba(255,255,255,.5); animation: subgate-float 4s ease-in-out infinite; }
.subgate-sim i { position: absolute; left: 20px; top: 32px; width: 38px; height: 30px; border-radius: 6px; background: linear-gradient(135deg, #e0b04a, #b9842a); box-shadow: inset 0 0 0 1px rgba(90,65,16,.35); }
.subgate-sim i::before, .subgate-sim i::after { content: ''; position: absolute; left: 0; right: 0; top: 10px; height: 1px; background: rgba(90,65,16,.4); }
.subgate-sim i::after { top: 19px; }
.subgate-sim span { position: absolute; right: 16px; bottom: 13px; font-size: 13px; font-weight: 600; letter-spacing: 1px; color: #5a4110; font-variant-numeric: tabular-nums; }
.subgate-tg { position: relative; margin-top: -20px; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: #229ed9; color: #fff; box-shadow: 0 0 0 4px var(--bg), 0 10px 22px -8px rgba(34,158,217,.8); }
.subgate-tg svg { margin-left: -3px; }
.subgate-card h2 { margin: 22px 0 0; font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -.7px; }
.subgate-sub { margin: 10px auto 0; max-width: 320px; font-size: 16px; line-height: 1.4; color: var(--sg-sub); }
.subgate-sub b { color: var(--ink); font-weight: 600; }
.subgate-actions { margin-top: 36px; }
.subgate-main { display: block; width: 100%; padding: 17px; border: 0; border-radius: 16px; background: var(--ink); color: var(--on-ink); font: inherit; font-size: 17px; font-weight: 600; letter-spacing: -.3px; cursor: pointer; transition: transform .12s, opacity .12s; -webkit-tap-highlight-color: transparent; }
.subgate-main:active { transform: scale(.98); opacity: .85; }
.subgate-alt { display: block; width: 100%; margin-top: 6px; padding: 14px; border: 0; background: none; color: var(--sg-sub); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.subgate-alt:active { opacity: .5; }
.subgate-alt:disabled { opacity: .5; cursor: default; }
@keyframes subgate-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes subgate-float { 0%, 100% { transform: rotate(-8deg) translateY(0); } 50% { transform: rotate(-6deg) translateY(-6px); } }

/* Итог мульти-крутки */
.opts.batch { margin-top: 14px; }
.batch-row::after { display: none; }
.batch-row b { font-weight: 600; }
.batch-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.batch-r { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-variant-numeric: tabular-nums; }
.batch-r em { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.batch-row.sell { background: color-mix(in srgb, var(--down) 8%, transparent); }
.batch-row.sell .batch-r em { background: var(--down); color: #fff; }
.batch-row.gone .opt-l { opacity: .5; }
.batch-row.gone .batch-r > b { opacity: .5; }
.batch-r .keep-btn { margin: 0; font-size: 11px; padding: 2px 9px; }
.batch-all { width: 100%; margin-top: 10px; padding: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }

/* Окно подтверждения (вместо системного tg.showConfirm) */
.ask { position: fixed; inset: 0; z-index: 39; display: grid; place-items: center; padding: 16px; background: rgba(13,13,13,.4); opacity: 0; transition: opacity .2s; }
.ask[hidden] { display: none; }
.ask.open { opacity: 1; }
:root[data-theme="dark"] .ask { background: rgba(0,0,0,.6); }
.ask-card { position: relative; width: 100%; max-width: 360px; padding: 26px 20px 20px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow), 0 24px 60px -20px rgba(0,0,0,.45); text-align: center; overflow: hidden; transform: translateY(14px) scale(.96); transition: transform .3s cubic-bezier(.2,1.2,.4,1); }
.ask.open .ask-card { transform: none; }
.ask-card::before { content: ''; position: absolute; left: 50%; top: -90px; width: 240px; height: 240px; margin-left: -120px; border-radius: 50%; background: radial-gradient(closest-side, rgba(242,193,78,.35), transparent); pointer-events: none; }
.ask-ico { position: relative; width: 64px; height: 64px; margin: 0 auto; display: grid; place-items: center; border-radius: 20px; background: var(--soft); box-shadow: var(--shadow); font-size: 32px; line-height: 1; }
.ask-ico.gold { background: linear-gradient(135deg, #f8d77a, #e6ad35 55%, #c98d1f); box-shadow: 0 14px 28px -12px rgba(201,141,31,.8), inset 0 1px 0 rgba(255,255,255,.5); }
.ask-card h2 { position: relative; justify-content: center; margin: 16px 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.ask-text { position: relative; margin: 0 auto; max-width: 290px; color: var(--muted); font-size: 15px; line-height: 1.4; }
.ask-text b { color: var(--ink); font-weight: 700; }
.ask-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: 20px; }
.ask-actions .cta { margin: 0; padding: 15px 12px; justify-content: center; font-size: 15px; border-radius: 16px; }
.ask-actions .cta span:last-child { color: inherit; }
@media (prefers-reduced-motion: reduce) { .ask-card { transition: none; } }
.ask-actions .cta.ghost { background: var(--soft); box-shadow: none; }

/* ---------- VIP ---------- */
.vip-badge { display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 6px; font-size: 10px; font-weight: 800; letter-spacing: .04em; vertical-align: 2px;
  color: #2a1a00; background: linear-gradient(135deg, #ffe08a, #f5a623); }
.vip-box { margin: 14px 0 6px; padding: 16px; border-radius: var(--r); box-shadow: var(--shadow);
  background: linear-gradient(145deg, color-mix(in srgb, #f5a623 16%, var(--card)), var(--card) 60%);
  border: 1px solid color-mix(in srgb, #f5a623 45%, transparent); }
.vip-box.on { border-color: #f5a623; }
.vip-head { display: flex; align-items: center; gap: 4px; font-size: 17px; }
.vip-head .vip-badge { font-size: 12px; vertical-align: 0; }
.vip-perks { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.vip-box .muted { margin: 10px 0 0; font-size: 13px; }
.vip-buy { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.vip-buy .btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px; }
.vip-buy .btn small { font-size: 11px; font-weight: 500; opacity: .75; }
.top-row.vip { background: color-mix(in srgb, #f5a623 13%, var(--card)); box-shadow: inset 3px 0 0 #f5a623; }
.top-row.vip .item-num { color: color-mix(in srgb, #f5a623 70%, var(--text)); font-weight: 700; }
.pd.vip { --mc: #f5a623; }
.pd.vip .pd-name { color: color-mix(in srgb, #f5a623 70%, var(--text)); font-weight: 700; }

/* ----- Профили игроков ----- */
.top-row[data-player], .pd[data-player] { cursor: pointer; }
.top-row[data-player]:active, .pd[data-player]:active { opacity: .7; }
.lot-seller { display: flex; align-items: center; gap: 4px; min-width: 0; margin: 2px 0 6px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.lot-seller .ico { flex: none; width: 13px; height: 13px; }
.lot-seller span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--muted) 40%, transparent); text-underline-offset: 2px; }
.avatar.xl.vip { box-shadow: 0 0 0 3px #f5a623; }
.pl-lots { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; border: 0; font: inherit; cursor: pointer; }
.pl-lots .ico { width: 16px; height: 16px; }
.pl-tabs { margin-top: 18px; }
.pl-tabs .muted { font-weight: 400; }
.pl-wait { padding: 40px 0; }
.pl-hidden { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 16px; padding: 28px 16px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); text-align: center; }
.pl-hidden .ico { width: 32px; height: 32px; color: var(--muted); }
.priv-link { margin-top: 16px; }
.top-hidden { margin: 10px 0 0; font-size: 13px; }
.link-btn { padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- Выпадение мифического и божественного (dropfx.js) ---------- */
/* Во время прокрутки аура спрятана, чтобы не выдать редкость раньше времени. */
.stage .aura { transition: opacity .5s; }
.stage.fx-hold .aura { opacity: 0; }
.stage.fx-hold::before { opacity: .35 !important; animation: none !important; }
/* Нагнетание: карта дрожит, за ней разгорается свечение. */
.stage[class*="fx-charge-"] .sim.big { animation: fx-tremble .09s linear infinite; }
.stage.fx-charge-mythic::before { opacity: 1 !important; background: radial-gradient(closest-side, rgba(255,55,95,.75), rgba(255,120,40,.2) 55%, transparent) !important; animation: fx-charge-glow .5s ease-in-out infinite alternate !important; }
.stage.fx-charge-divine::before { opacity: 1 !important; background: radial-gradient(closest-side, rgba(255,255,255,.9), rgba(63,224,255,.3) 50%, transparent) !important; animation: fx-charge-glow .6s ease-in-out infinite alternate !important; }
@keyframes fx-tremble { 0% { transform: translate(0, 0); } 25% { transform: translate(1.5px, -1px) rotate(.3deg); } 50% { transform: translate(-1px, 1.5px); } 75% { transform: translate(-1.5px, -.5px) rotate(-.3deg); } }
@keyframes fx-charge-glow { from { transform: translate(-50%, -50%) scale(.85); } to { transform: translate(-50%, -50%) scale(1.2); } }

/* Удар по карте в момент выпадения: копия карты лежит в оверлее поверх затемнения. */
.dfx-card .sim.big { width: 100%; max-width: none; height: 100%; margin: 0; }
.dfx-mythic .dfx-card .sim { animation: fx-hit-mythic .7s cubic-bezier(.2,1.4,.4,1); box-shadow: 0 0 0 1.5px #ff5a3d, 0 0 40px -2px #ff375f, 0 0 90px -10px #ff9f43; }
.dfx-divine .dfx-card .sim { animation: fx-hit-divine 1.4s cubic-bezier(.2,1.2,.3,1); box-shadow: 0 0 0 1.5px #fff, 0 0 40px -2px #3fe0ff, 0 0 100px -10px #b388ff; }
@keyframes fx-hit-mythic { 0% { transform: scale(1.18); filter: brightness(2.2) saturate(1.4); } 18% { transform: scale(.94) rotate(-1.5deg); } 34% { transform: scale(1.06) rotate(1deg); } 60% { transform: scale(.99); filter: none; } 100% { transform: none; } }
@keyframes fx-hit-divine { 0% { transform: translateY(-10px) scale(.86); filter: brightness(3); } 30% { transform: translateY(-14px) scale(1.08); filter: brightness(1.6) drop-shadow(0 0 30px #fff); } 100% { transform: none; filter: none; } }
#app.fx-quake { animation: fx-quake .6s cubic-bezier(.36,.07,.19,.97); }
@keyframes fx-quake { 10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(4px, -2px); } 30%, 50%, 70% { transform: translate(-6px, 3px); } 40%, 60% { transform: translate(6px, -3px); } }

.dfx { position: fixed; inset: 0; z-index: 1000; overflow: hidden; cursor: pointer; transition: opacity .45s; }
.dfx.out { opacity: 0; }
.dfx > * { position: absolute; pointer-events: none; }
.dfx-cv { inset: 0; width: 100%; height: 100%; }
.dfx-veil { inset: 0; animation: fx-fade .35s ease-out both; }
.dfx-flash { inset: 0; opacity: 0; animation: fx-flash .7s ease-out; }
@keyframes fx-fade { from { opacity: 0; } }
@keyframes fx-flash { 0% { opacity: 1; } 100% { opacity: 0; } }

.dfx-ring { left: var(--cx); top: var(--cy); width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; opacity: 0; animation: fx-ring 1.1s cubic-bezier(.1,.7,.3,1) forwards; }
.dfx-ring:nth-of-type(2) { animation-delay: .12s; }
.dfx-ring:nth-of-type(3) { animation-delay: .28s; animation-duration: 1.5s; }
@keyframes fx-ring { 0% { opacity: 1; transform: scale(.4); } 100% { opacity: 0; transform: scale(22); } }

.dfx-title { left: 16px; right: 16px; top: var(--ty); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.dfx-title small { font-size: 12px; font-weight: 700; letter-spacing: .4em; text-transform: uppercase; color: rgba(255,255,255,.75); animation: fx-up .5s .35s both; }
.dfx-title b { position: relative; font-size: clamp(30px, 9.5vw, 46px); font-weight: 800; line-height: 1.1; letter-spacing: var(--ls, -.01em); text-transform: uppercase; white-space: nowrap; animation: fx-slam .55s .16s cubic-bezier(.2,1.5,.4,1) both; }
.dfx-title span { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.85); animation: fx-up .5s .5s both; }
@keyframes fx-slam { 0% { opacity: 0; transform: scale(2.2); letter-spacing: .3em; } 60% { opacity: 1; } 100% { transform: none; letter-spacing: var(--ls, -.01em); } }
@keyframes fx-up { from { opacity: 0; transform: translateY(8px); } }

/* Мифический: багровый мрак, огненные кольца, трещины света, раскалённый титр. */
.dfx-mythic .dfx-veil { background: radial-gradient(circle at var(--cx) var(--cy), rgba(255,55,95,.28), rgba(40,0,8,.82) 45%, rgba(10,0,2,.94)); }
.dfx-mythic .dfx-flash { background: radial-gradient(circle at var(--cx) var(--cy), #fff, #ffb347 25%, rgba(255,55,95,.7) 50%, transparent 80%); }
.dfx-mythic .dfx-ring { border: 3px solid #ff5a3d; box-shadow: 0 0 18px #ff375f, inset 0 0 12px #ffb347; }
.dfx-mythic .dfx-ring:nth-of-type(3) { border-width: 1.5px; border-color: #ffd27a; }
.dfx-cracks { left: var(--cx); top: var(--cy); width: 200vmax; height: 200vmax; transform: translate(-50%, -50%); background: repeating-conic-gradient(from 7deg, rgba(255,90,60,.55) 0 .7deg, transparent .7deg 23deg, rgba(255,200,120,.35) 23deg 23.5deg, transparent 23.5deg 41deg); -webkit-mask: radial-gradient(circle, transparent 60px, #000 90px, transparent 60%); mask: radial-gradient(circle, transparent 60px, #000 90px, transparent 60%); opacity: 0; animation: fx-cracks 2s .05s ease-out forwards; }
@keyframes fx-cracks { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(-8deg); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1) rotate(4deg); } }
/* Титр: широкий плотный Unbounded, светлая раскалённая заливка и чистое огненное свечение вокруг букв. */
.dfx-mythic .dfx-title b { --ls: .02em; font-family: Unbounded, Inter, sans-serif; font-weight: 800; font-size: clamp(20px, 7.8vw, 36px); color: #fff1e0; text-shadow: 0 0 1px #fff, 0 0 10px rgba(255,140,70,.9), 0 0 26px rgba(255,55,95,.75), 0 0 60px rgba(255,55,95,.45); animation: fx-slam .55s .16s cubic-bezier(.2,1.5,.4,1) both, fx-heat 1.2s .7s ease-in-out infinite alternate; }
@keyframes fx-heat { to { color: #fff8ec; text-shadow: 0 0 1px #fff, 0 0 14px rgba(255,170,90,1), 0 0 34px rgba(255,70,60,.9), 0 0 80px rgba(255,55,95,.6); } }

/* Божественный: столб света, вращающиеся радужные лучи, звёзды, переливающийся титр. */
.dfx-divine .dfx-veil { background: radial-gradient(circle at var(--cx) var(--cy), rgba(255,255,255,.35), rgba(20,30,70,.8) 45%, rgba(4,6,20,.94)); }
.dfx-divine .dfx-flash { background: #fff; animation-duration: 1s; }
.dfx-divine .dfx-ring { border: 2px solid #fff; box-shadow: 0 0 20px #3fe0ff, 0 0 40px #b388ff, inset 0 0 14px #ff6ad5; }
.dfx-pillar { left: var(--cx); top: 0; height: var(--cy); width: 220px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.08) 25%, rgba(255,255,255,.55) 50%, rgba(255,255,255,.08) 75%, transparent); -webkit-mask: linear-gradient(transparent, #000 40%); mask: linear-gradient(transparent, #000 40%); filter: blur(2px); animation: fx-pillar 3.4s ease-out both; }
@keyframes fx-pillar { 0% { opacity: 0; transform: translateX(-50%) scaleX(.1); } 12% { opacity: 1; transform: translateX(-50%) scaleX(1.3); } 40% { transform: translateX(-50%) scaleX(.8); } 100% { opacity: .2; transform: translateX(-50%) scaleX(.6); } }
.dfx-rays { left: var(--cx); top: var(--cy); width: 220vmax; height: 220vmax; border-radius: 50%; transform: translate(-50%, -50%); background: conic-gradient(from 0deg, transparent, rgba(63,224,255,.5) 4deg, transparent 9deg 30deg, rgba(179,136,255,.5) 34deg, transparent 39deg 60deg, rgba(255,106,213,.5) 64deg, transparent 69deg 90deg, rgba(255,211,107,.5) 94deg, transparent 99deg 120deg, rgba(107,255,184,.5) 124deg, transparent 129deg 150deg, rgba(255,255,255,.6) 154deg, transparent 159deg 180deg, rgba(63,224,255,.5) 184deg, transparent 189deg 210deg, rgba(179,136,255,.5) 214deg, transparent 219deg 240deg, rgba(255,106,213,.5) 244deg, transparent 249deg 270deg, rgba(255,211,107,.5) 274deg, transparent 279deg 300deg, rgba(107,255,184,.5) 304deg, transparent 309deg 330deg, rgba(255,255,255,.6) 334deg, transparent 339deg); -webkit-mask: radial-gradient(circle, #000 4%, transparent 40%); mask: radial-gradient(circle, #000 4%, transparent 40%); opacity: 0; animation: fx-rays 3.6s ease-out forwards; }
.dfx-rays.r2 { animation-name: fx-rays2; }
@keyframes fx-rays { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(0); } 15% { opacity: 1; } 70% { opacity: .8; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1) rotate(70deg); } }
@keyframes fx-rays2 { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(105deg); } 20% { opacity: .6; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(.9) rotate(15deg); } }
/* Титр: антиква Cormorant в разрядку, перламутровая заливка (почти белая, читается на любом фоне) и мягкий радужный ореол. */
.dfx-divine .dfx-title b { --ls: .06em; font-family: "Cormorant Garamond", Georgia, serif; font-weight: 700; font-size: clamp(22px, 7.9vw, 40px); background: linear-gradient(90deg, #ffffff, #d6f7ff 20%, #ffffff 35%, #f0e2ff 55%, #ffffff 70%, #fff3d6 85%, #ffffff) 0 0 / 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 0 10px rgba(63,224,255,.55)) drop-shadow(0 0 22px rgba(179,136,255,.4)); animation: fx-slam .7s .2s cubic-bezier(.2,1.4,.4,1) both, fx-rainbow 3.2s linear infinite; }
.dfx-divine .dfx-title b::after { content: attr(data-t); position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, #fff 50%, transparent 65%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: fx-glint 2.2s .8s ease-in-out infinite; }
.dfx-divine .dfx-title small { color: #e6fbff; text-shadow: 0 0 10px #3fe0ff; }
@keyframes fx-rainbow { to { background-position: -200% 0; } }
@keyframes fx-glint { 0% { background-position: 150% 0; } 60%, 100% { background-position: -100% 0; } }

/* Без анимаций: только затемнение и титр. */
.dfx.calm .dfx-flash { animation-duration: .4s; }
.dfx.calm .dfx-title *, .dfx.calm .dfx-title b::after { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .stage[class*="fx-charge-"] .sim.big, .dfx-card .sim, #app.fx-quake { animation: none !important; } }

/* Раскрытие итога крутки (revealResult в app.js). --rv-ms - длительность крутки, --rv-from - когда начинает проступать цвет.
   До --rv-from сцена нейтральная: тёплое свечение как у пустой карты, без цвета редкости, аур и цветных теней.
   Потом цветной слой .rv-glow медленно разгорается до силы этой редкости (--rv-glow), нейтральное свечение уходит. */
@keyframes rv-glow { from { opacity: 0; } }
@keyframes rv-glow-to { from { opacity: 0; } to { opacity: var(--rv-glow, .6); } }
@keyframes rv-neutral-out { from { opacity: .35; } to { opacity: 0; } }
@keyframes rv-line { from { opacity: 0; transform: translateY(6px); } }
@keyframes rv-pop { 0% { opacity: 0; transform: scale(.7); } 70% { transform: scale(1.08); } }
@keyframes rv-ink { from { color: #151515; } }
@keyframes rv-ink-soft { from { color: #85857f; } }
@keyframes rv-veil { from { opacity: 1; } to { opacity: 0; } }
.stage { --rv-late: calc(var(--rv-ms, 1.5s) - var(--rv-from, .7s)); }
.stage.rv[class]::before { background: radial-gradient(closest-side, rgba(255,214,150,.55), rgba(255,190,110,.12) 55%, transparent); animation: rv-neutral-out var(--rv-late) ease-in var(--rv-from) both; }
.stage.rv.fx-hold[class]::before { animation: none; }
.rv-glow { position: absolute; z-index: -1; left: 50%; top: 50%; width: 120%; aspect-ratio: 1.3; transform: translate(-50%, -50%); pointer-events: none; background: radial-gradient(closest-side, color-mix(in srgb, var(--rc) 60%, transparent), color-mix(in srgb, var(--rc) 16%, transparent) 55%, transparent); animation: rv-glow-to var(--rv-late) cubic-bezier(.6,0,.5,1) var(--rv-from) both; }
.stage.r-common .rv-glow { background: radial-gradient(closest-side, rgba(255,214,150,.55), rgba(255,190,110,.12) 55%, transparent); }
/* Край карты без цвета редкости. Переход только на выходе (.rv-end), иначе цветная тень на старте гасла бы видимо. */
.stage.rv[class] .sim.big { box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 18px 36px -16px rgba(0,0,0,.45); transition: none; }
:root[data-theme="dark"] .stage.rv[class] .sim.big { box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 18px 40px -16px rgba(0,0,0,.9); }
.stage.rv-end .sim.big { transition: box-shadow .4s ease-out; }
.stage.rv:not(.fx-hold) .aura, .stage.rv .sim:not(.empty):not(.divine)::after { animation: rv-glow var(--rv-late) cubic-bezier(.6,0,.5,1) var(--rv-from) both; }
.stage.rv .sim-shine { animation: rv-glow var(--rv-late) cubic-bezier(.6,0,.5,1) var(--rv-from) both, divine-holo 3.6s ease-in-out infinite; }
.stage.rv .sim.divine::after { animation: divine-ring 4s linear infinite, rv-glow var(--rv-late) cubic-bezier(.6,0,.5,1) var(--rv-from) both; }
/* Божественная карта: светлая вуаль поверх тёмного фона держится до --rv-from и тает, текст перекрашивается в белый. */
.sim-veil { position: absolute; z-index: 2; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(160deg, #ffffff, #f1f1ee 60%, #e7e7e3); animation: rv-veil var(--rv-late) ease-in var(--rv-from) both; }
.stage.rv .sim.divine .sim-top, .stage.rv .sim.divine .num, .stage.rv .sim.dark .sim-top, .stage.rv .sim.dark .num { animation: rv-ink var(--rv-late) ease-in var(--rv-from) both; }
.stage.rv .sim.divine .country, .stage.rv .sim.dark .country { animation: rv-ink-soft var(--rv-late) ease-in var(--rv-from) both; }
/* Разбор оценки: строки по очереди, у каждой своя задержка --d. Плашка редкости и множитель - в конце. */
.panel.rv .why li { animation: rv-line .32s ease-out var(--d, 0ms) both; }
.panel.rv .score .rar, .panel.rv .score .factor { animation: rv-pop .42s cubic-bezier(.2,1.3,.4,1) calc(var(--rv-ms, 1.5s) - 80ms) both; }
/* «Оставить» ждёт конца всех анимаций крутки, потом выскакивает. */
.keep-btn.rv-wait { visibility: hidden; }
.keep-btn.rv-show { animation: rv-pop .42s cubic-bezier(.2,1.3,.4,1) both; }
@media (prefers-reduced-motion: reduce) { .keep-btn.rv-show { animation: none; } .rv-glow, .sim-veil { display: none; } .stage.rv[class]::before, .stage.rv .aura, .panel.rv .why li, .panel.rv .score .rar, .panel.rv .score .factor { animation: none !important; } }

/* ===== Бенчмарк: гонка телефонов ===== */
.o-duo2 { margin-top: 10px; }
.phone.bm { --w: 56px; }
.bm-pick { display: flex; gap: 8px; margin: 14px -16px 0; padding: 4px 16px 6px; overflow-x: auto; scrollbar-width: none; }
.bm-pick::-webkit-scrollbar { display: none; }
.bm-pick button { flex: none; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 9px 10px 7px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.bm-pick button.on { box-shadow: 0 0 0 2px var(--ink), var(--shadow); }
.bm-pick small { font-size: 11px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.bm-vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 4px; margin-top: 12px; padding: 16px 10px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.bm-side { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
.bm-ph { height: 122px; display: flex; align-items: flex-end; margin-bottom: 6px; }
.bm-who { font-size: 11px; font-weight: 600; color: var(--muted); }
.bm-rar { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.bm-side b { font-size: 14px; line-height: 1.2; }
.bm-side > small:not(.bm-who) { font-size: 12px; color: var(--muted); }
.bm-x { align-self: center; font-weight: 800; color: var(--muted); }
.bm-pw { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bm-pw .ico { width: 13px; height: 13px; color: var(--up); }
.bm-pw i { display: inline-block; width: 44px; height: 5px; border-radius: 3px; background: var(--soft); overflow: hidden; }
.bm-pw i::after { content: ''; display: block; height: 100%; width: var(--p); background: var(--up); }
.bm-stakes { margin-top: 12px; }
.bm-stakes button { font-variant-numeric: tabular-nums; }
.bm-race { display: grid; gap: 12px; margin-top: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.bm-track { display: grid; gap: 5px; }
.bm-lbl { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bm-bar { height: 14px; border-radius: 8px; background: var(--soft); overflow: hidden; }
.bm-bar i { display: block; height: 100%; border-radius: 8px; background: var(--ink); transition: width .1s linear, background-color .2s; }
.bm-bar.foe i { background: var(--muted); }
.bm-bar.hot i { background: var(--alert); }
.bm-bar.turbo i { background: var(--down); }
.bm-bar.frz i { opacity: .35; }
.bm-log { min-height: 58px; display: grid; align-content: start; gap: 3px; margin-top: 10px; padding: 0 4px; font-size: 12px; color: var(--muted); }
.bm-log div:first-child { color: var(--ink); }
.bm-res { text-align: center; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bm-log .bm-res.win { color: var(--down); }
.bm-log .bm-res.lose { color: var(--alert); }
.bm-log .bm-res + div { text-align: center; }
.shake { animation: bm-shake .12s infinite; }
@keyframes bm-shake { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(2px) rotate(1deg); } }

/* ===== Мастерская ===== */
.rp-tag { padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--up) 16%, transparent); color: var(--up); font-size: 11px; font-weight: 700; white-space: nowrap; }
.rp-bench { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; margin-top: 14px; padding: 16px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.rp-art { display: flex; justify-content: center; }
.rp-name { display: block; font-size: 16px; }
.rp-cond { margin-top: 4px; font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rp-cond small { font-size: 13px; font-weight: 600; color: var(--muted); }
.rp-cbar { height: 6px; margin-top: 6px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.rp-cbar i { display: block; height: 100%; background: var(--down); transition: width .4s; }
.rp-mode { margin-top: 12px; }
.rp-tools { display: flex; align-items: center; justify-content: space-between; margin: 10px 4px; font-size: 13px; }
.rp-dots { display: flex; gap: 4px; }
.rp-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--up); }
.rp-dots i.off { background: var(--soft); }
.rp-done { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 0; padding: 12px; border-radius: 14px; background: color-mix(in srgb, var(--down) 14%, transparent); color: var(--down); font-weight: 700; }
.rp-done .ico { width: 18px; height: 18px; }
.rp-parts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rp-part { display: grid; gap: 2px; padding: 12px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); text-align: left; transition: transform .1s; }
.rp-part:active:not(:disabled) { transform: scale(.97); }
.rp-part:disabled { cursor: default; }
.rp-part b { font-size: 14px; }
.rp-part small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rp-st { font-size: 12px; font-weight: 700; color: var(--muted); }
.rp-part.ok .rp-st, .rp-part.fixed .rp-st { color: var(--down); }
.rp-part.bad { box-shadow: 0 0 0 1.5px var(--alert), var(--shadow); }
.rp-part.bad .rp-st { color: var(--alert); }
.rp-part.fixed { box-shadow: 0 0 0 1.5px var(--down), var(--shadow); }
.rp-part.wasted { opacity: .6; }
.rp-sum .rp-tot span { color: var(--ink); font-weight: 800; }
.rp-sum .rp-tot b { font-weight: 800; }
.rp-sum .pos { color: var(--down); }
.rp-sum .neg { color: var(--alert); }

/* Рейтинг номеров: пьедестал с миниатюрами симок */
.num-podium .msim { align-self: stretch; margin: 0 0 8px; padding: 6px 7px; border-radius: 8px; }
.num-podium .msim-op { gap: 3px; font-size: 8px; }
.num-podium .msim-op .op-mark { min-width: 10px; height: 10px; font-size: 6px; }
.num-podium .msim-co { font-size: 7px; }
.num-podium .msim-chip { width: 14px; height: 11px; }
.num-podium .msim-chip::before { inset: 2px 3px; }
.num-podium .msim-num { font-size: 9.5px; overflow: hidden; text-overflow: ellipsis; }
.num-podium .pd-1 .msim { box-shadow: 0 0 0 2px #ef9f27, 0 10px 20px -10px rgba(0,0,0,.5); }
.num-podium .pd.me .pd-name { color: var(--up); }

/* Напоминание о чате игроков: плашка над нижним меню, раза два в день */
.chatnudge { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tb) + env(safe-area-inset-bottom) + 10px); z-index: 37; max-width: 460px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 12px; border-radius: var(--r); background: var(--card); color: var(--ink); box-shadow: var(--shadow), 0 14px 32px -12px rgba(0,0,0,.35); transform: translateY(16px); opacity: 0; transition: transform .3s ease, opacity .3s ease; }
.chatnudge[hidden] { display: none; }
.chatnudge.show { transform: none; opacity: 1; }
.chatnudge-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--soft); }
.chatnudge-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12px; line-height: 1.3; color: var(--muted); }
.chatnudge-tx b { font-size: 14px; color: var(--ink); }
.chatnudge-go { flex: none; padding: 9px 14px; border: 0; border-radius: 999px; background: var(--ink); color: var(--on-ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.chatnudge-x { flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }

/* Меню, вариант C: крупная плитка «Магазин» во всю ширину сетки */
.o-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.o-shop { grid-column: span 2; display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 20px; text-align: left;
  background: linear-gradient(120deg, color-mix(in srgb, var(--up) 12%, var(--card)), var(--card));
  box-shadow: 0 0 0 1.5px var(--up), var(--shadow); transition: transform .1s; }
.o-shop:active { transform: scale(.98); }
.o-shop-ic { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--up); color: #fff;
  box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--up) 80%, transparent); }
.o-shop-ic .ico { width: 26px; height: 26px; }
.o-shop-t { flex: 1; min-width: 0; }
.o-shop-t b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.o-shop-t small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-shop.on .o-shop-t small { color: var(--up); font-weight: 500; }
.o-shop-go { flex: none; padding: 9px 14px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
