/* Общая раскладка элементов. Цвета и характер задаёт прототип через токены. */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 500 14px/1.4 var(--body); -webkit-font-smoothing: antialiased; overflow: hidden; transition: background .3s, color .3s; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; text-align: left; }
h1, h2, h3, p { margin: 0; }
img { display: block; -webkit-user-drag: none; user-select: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#app { position: relative; width: 100%; height: 100%; overflow: hidden; }
#confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

.h1 { font: var(--h1-font, 800 24px/1.1 var(--display)); text-wrap: balance; }
.h2 { font: var(--h2-font, 700 15px/1.2 var(--display)); }
.lead { color: var(--muted); }
.small { font-size: 12.5px; color: var(--muted); }
.strong { font-weight: 600; }
.plus { color: var(--good); }
.mt { margin-top: 6px; }
.center { text-align: center; }
.nums { font-variant-numeric: tabular-nums; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
.row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.grow { flex: 1; min-width: 0; }
.wide { width: 100%; }

.panel { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 14px; background: var(--surface); border: var(--edge-w, 1px) solid var(--edge); border-radius: var(--radius, 18px); box-shadow: var(--shadow, none); }

.cta, .alt, .soft { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 16px; border-radius: var(--btn-radius, 13px); font: var(--btn-font, 700 14px var(--display)); text-align: center; transition: transform .08s, box-shadow .08s, filter .15s; }
.cta { background: var(--cta); color: var(--cta-ink); box-shadow: var(--cta-shadow, none); border: var(--btn-border, 0); }
.alt { background: var(--alt); color: var(--alt-ink); box-shadow: var(--alt-shadow, none); border: var(--btn-border, 0); }
.soft { background: var(--surface-2); color: inherit; border: var(--edge-w, 1px) solid var(--edge); }
.cta:active, .alt:active, .soft:active { transform: var(--press, scale(.97)); }
.sm { min-height: 36px; padding: 0 13px; font-size: 13px; }

.pill { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; padding: 3px 9px; border-radius: var(--pill-radius, 8px); background: var(--surface-2); color: var(--muted); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.pill-good { background: var(--good-bg); color: var(--good); }
.pill-warn { background: var(--warn-bg); color: var(--warn); white-space: normal; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.note { padding: 10px 12px; border-radius: 12px; font-size: 13px; font-weight: 600; background: var(--surface-2); }
.note-warn { background: var(--warn-bg); color: var(--warn); }
.note-bad { background: var(--bad-bg); color: var(--bad); }

.ring { position: relative; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring-bg { stroke: var(--surface-2); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .8s; }
.ring-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font: 800 19px/1 var(--display); }
.ring-text small { display: block; margin-top: 2px; font: 600 10px var(--body); color: var(--muted); }
.timer { font: 800 23px/1.15 var(--display); font-variant-numeric: tabular-nums; }

.loot { display: flex; gap: 9px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; flex: none; }
.loot::-webkit-scrollbar, .sheet::-webkit-scrollbar { display: none; }
.item { flex: none; width: 78px; padding: 5px 3px 6px; border-radius: 14px; text-align: center; background: linear-gradient(180deg, var(--r1), var(--r2)); box-shadow: inset 0 0 0 1.5px var(--r3); }
.item img { width: 56px; height: 56px; margin: 0 auto 1px; }
.item b { display: block; font: 800 13px var(--display); color: #fff; }
.r-legend { --r1: #b8761b; --r2: #5a2a05; --r3: #ffd25e; }
.r-epic { --r1: #7d3bd8; --r2: #2c0f63; --r3: #c79bff; }
.r-rare { --r1: #1b7fc9; --r2: #0a2d5c; --r3: #6fd3ff; }
.r-pink { --r1: #d2237f; --r2: #560a3d; --r3: #ff8fd0; }

.pin-row { flex: none; display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; background: var(--surface-2); border: var(--edge-w, 1px) solid var(--edge); border-radius: var(--btn-radius, 13px); }
.pin-box { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid var(--muted); border-radius: 7px; font-weight: 800; font-size: 14px; transition: background .15s, border-color .15s; }
.pin-box.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pin-hint { display: block; }
.pin-box.round { border-radius: 50%; }
.picks { display: flex; flex-direction: column; gap: 7px; }
.pick-off { opacity: .55; }
.small-portrait { width: 44px; height: 44px; border-radius: 12px; }
.small-portrait img { width: 40px; height: 40px; }
.select-row { flex: none; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 50px; padding: 0 13px; background: var(--surface-2); border: var(--edge-w, 1px) solid var(--edge); border-radius: var(--btn-radius, 13px); }
.select-value { font-weight: 700; color: var(--accent); text-align: right; overflow-wrap: anywhere; }
.op-toggle { flex: none; display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 12px 6px 8px; background: var(--surface-2); border: var(--edge-w, 1px) solid var(--edge); border-radius: var(--btn-radius, 13px); }
.op-toggle img { flex: none; width: 36px; height: 36px; }
.op-group { display: flex; flex-direction: column; gap: 7px; }
.op-group-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 4px; }
.switch { position: relative; flex: none; width: 44px; height: 26px; border-radius: 13px; background: var(--edge); transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); transition: transform .18s; }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(18px); background: var(--accent-ink); }
.perks { display: flex; flex-direction: column; gap: 8px; }
.perk { display: flex; align-items: center; gap: 10px; }
.sub-price { font: 700 13px var(--display); font-variant-numeric: tabular-nums; color: var(--accent); margin-top: 3px; }
.acct { text-align: left; transition: transform .12s; }
.acct:active { transform: scale(.985); }
.acct-history-btn { flex: none; width: 44px; min-height: 44px; padding: 0; border-radius: 50%; color: var(--accent); }
.acct-card.expired { background: var(--bad-bg); border-color: var(--bad); }
.acct-card.expired .acct-nick { color: var(--bad); }
.pill-bad { background: var(--bad-bg); color: var(--bad); }
.avatar-btn { position: relative; }
.avatar-edit { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--accent-ink, var(--bg)); font: 700 11px/1 var(--body); }
.avatar-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.avatar-pick { display: grid; place-items: center; aspect-ratio: 1; padding: 3px; border: 2px solid transparent; border-radius: 50%; }
.avatar-pick img { width: 100%; height: 100%; object-fit: contain; }
.avatar-pick.on { border-color: var(--accent); }
.avatar-pick.taken { opacity: .35; }
.puzzle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.puzzle-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; aspect-ratio: 1.45; background: var(--surface); border: var(--edge-w, 1px) solid var(--edge); border-radius: var(--radius, 18px); box-shadow: var(--shadow, none); }
.puzzle-cell b { font: 800 26px/1 var(--display); color: var(--accent); }
.puzzle-cell.empty b { color: var(--muted); opacity: .5; }
.puzzle-prizes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.puzzle-prize { position: relative; display: grid; place-items: center; aspect-ratio: 1; padding: 3px; background: var(--surface-2); border: 1px solid var(--accent); border-radius: 11px; }
.puzzle-prize.taken { border-color: var(--edge); }
.puzzle-prize img { width: 100%; height: 100%; object-fit: contain; }
.puzzle-prize.taken img { filter: grayscale(1) opacity(.45); }
/* На светлом фоне серые картинки почти сливаются с ним: делаем их темнее. */
:root[data-theme="light"] .puzzle-prize.taken img, :root[data-theme="light"] .op.wait img, :root[data-theme="light"] .op.none img { filter: grayscale(1) brightness(.7) opacity(.6); }
.puzzle-prize i { position: absolute; right: -3px; top: -3px; display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--accent); color: var(--accent-ink, var(--bg)); font: 800 10px/1 var(--body); }
.trader-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.trader-card { align-items: center; justify-content: space-between; gap: 8px; padding: 10px 8px; text-align: center; }
.trader-card img { width: 52px; height: 52px; object-fit: contain; }
.trader-card .bar-wrap, .trader-card .alt { width: 100%; }
.trader-card .alt { min-height: 36px; padding: 0 6px; }
.trader-card .pill { align-self: center; }
.trader-card .bar-label { justify-content: center; }
.trader-place { line-height: 1.2; }
.manual-list { display: flex; flex-direction: column; }
.manual-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--edge); }
.manual-row:last-child { border-bottom: 0; }
.manual-row.wait { color: var(--muted); }
.manual-mark { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border: 2px solid var(--edge); border-radius: 50%; font-size: 11px; font-weight: 800; }
.manual-row.done .manual-mark { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, var(--bg)); }
.manual-row.active .manual-mark { border-color: var(--surface-2); border-top-color: var(--accent); animation: manual-spin .8s linear infinite; }
@keyframes manual-spin { to { transform: rotate(360deg); } }
.acct-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.acct-card { gap: 0; min-width: 0; padding: 10px; }
.acct-top { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.portrait.acct-face { position: relative; width: 42px; height: 42px; border-radius: 12px; }
.portrait.acct-face img { width: 38px; height: 38px; }
.acct-star { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: var(--bg); font: 700 10px/1 var(--body); }
.acct-flags { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; min-width: 0; }
.acct-flags .pill { align-self: auto; padding: 2px 7px; font-size: 10.5px; }
.acct-nick { display: block; overflow: hidden; font: 700 13px/1.25 var(--display); white-space: nowrap; text-overflow: ellipsis; }
.acct-igg { display: block; overflow: hidden; font-size: 11.5px; white-space: nowrap; text-overflow: ellipsis; }
.portrait { flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 15px; background: var(--portrait, var(--surface-2)); }
.portrait img { width: 52px; height: 52px; }
.nick { display: block; font: 700 16px/1.15 var(--display); overflow-wrap: anywhere; }
.bar-wrap { display: block; }
.bar-label { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.bar { display: block; height: 8px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 5px; background: var(--accent); }

.promo { position: relative; overflow: hidden; }
/* Картинка стоит по центру места над кнопкой: воздух сверху и снизу одинаков с таймером и без него. */
.promo-art { position: absolute; right: 12px; top: 9px; width: 62px; height: calc(100% - 78px); object-fit: contain; }
.promo .cta { margin-top: 7px; }
/* Самое длинное название занимает всю ширину до картинки: так все карточки одной высоты. */
.promo-name { padding-right: 76px; font: 800 clamp(13px, calc((100vw - 138px) / 13.6), 19px)/1.2 var(--display); white-space: nowrap; }
/* Одна строка: иначе длинный текст из CRM снова сделает карточки разной высоты. */
.promo-sub { padding-right: 76px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.count { align-self: flex-start; padding: 3px 9px; border-radius: 8px; background: var(--surface-2); font-size: 12px; font-weight: 700; }

.vault { position: relative; overflow: hidden; }
.input { width: 100%; min-height: 48px; padding: 0 13px; background: var(--surface-2); border: var(--edge-w, 1px) solid var(--edge); border-radius: var(--btn-radius, 13px); font-weight: 600; }
.input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.code-field { text-transform: uppercase; letter-spacing: .08em; font-family: var(--display); }
.code-field::placeholder { text-transform: none; letter-spacing: 0; }
.code-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--edge); }
.code-row:last-child { border-bottom: 0; padding-bottom: 0; }
.code-row:first-child { padding-top: 0; }
.code-name { font: 700 14px var(--display); letter-spacing: .05em; overflow-wrap: anywhere; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-height: 118px; padding: 12px; background: var(--surface); border: var(--edge-w, 1px) solid var(--edge); border-radius: var(--radius, 18px); box-shadow: var(--shadow, none); transition: transform .12s; }
.tile:active { transform: scale(.97); }
.tile-soon { justify-content: center; align-items: center; text-align: center; border-style: dashed; background: none; box-shadow: none; color: var(--muted); }
.tile-soon:active { transform: none; }
.tile img { position: absolute; right: -4px; top: -4px; width: 70px; height: auto; }
.tile-name { font: 700 14px/1.15 var(--display); }
.tile .tile-chest { right: 8px; top: 8px; width: 64px; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--muted); min-height: 32px; }
.page-hero { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.spin-history-btn { position: absolute; right: 0; top: 2px; width: 44px; min-height: 44px; padding: 0; border-radius: 50%; color: var(--accent); }
/* На экране пять последних круток, более ранние открываются прокруткой. */
.spin-list { max-height: 328px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.spin-list::-webkit-scrollbar { display: none; }
.item.spin-thumb { width: 44px; padding: 3px; border-radius: 10px; }
.item.spin-thumb img { width: 38px; height: 38px; margin: 0; }
.page-art { flex: none; width: 120px; height: 120px; object-fit: contain; }
.case-chest { flex: none; width: 170px; height: 121px; }
.case-chest.shaking { animation: shake .25s ease-in-out infinite; }
.case-chest.chest-pop { animation: chest-pop .35s cubic-bezier(.2, 1.7, .4, 1); }
@keyframes shake { 25% { transform: rotate(-2deg) translateY(-1px); } 75% { transform: rotate(2deg) translateY(-1px); } }
@keyframes chest-pop { from { transform: scale(.9); } }
.case-window { position: relative; flex: none; height: 118px; overflow: hidden; border-radius: var(--radius, 18px); background: var(--surface); border: var(--edge-w, 1px) solid var(--edge); -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); }
.case-marker { position: absolute; z-index: 2; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.case-strip { position: absolute; left: 50%; top: 9px; display: flex; gap: 8px; will-change: transform; }
.item.case-item { width: 92px; padding: 6px 4px 7px; }
.item.case-item b { font-size: 10.5px; line-height: 1.2; }
.case-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 7px; flex: none; }
.case-items .item.case-item { width: auto; }
.r-common { --r1: #4b4e55; --r2: #24262b; --r3: #8d9199; }
.prize-card { align-self: center; padding: 10px 26px; border-radius: 18px; background: linear-gradient(180deg, var(--r1), var(--r2)); box-shadow: inset 0 0 0 2px var(--r3); }
.prize-card .result-art { width: 96px; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
button:disabled { opacity: .55; cursor: default; }
.sub-tile { justify-content: flex-start; min-height: 0; }
.sub-tile { padding-inline: 10px; }
/* Размер подобран так, чтобы название занимало всю ширину кнопки. На очень узком экране оно переносится на две строки. */
.sub-tile .tile-name { margin-bottom: 4px; font-size: clamp(10.5px, calc((100vw - 82px) / 26.2), 14px); }

.back { position: absolute; inset: 0; z-index: 10; display: flex; align-items: flex-end; background: var(--backdrop, rgb(0 0 0 / 55%)); }
.back.fresh { animation: fade .18s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-height: 92%; overflow-y: auto; scrollbar-width: none; padding: 8px 16px 22px; background: var(--sheet); color: var(--ink); border-radius: var(--sheet-radius, 24px 24px 0 0); border-top: var(--sheet-border, 0); display: flex; flex-direction: column; gap: 12px; }
.sheet-tall { height: 88%; }
.back.fresh .sheet { animation: rise .32s cubic-bezier(.2, 1.2, .35, 1); }
@keyframes rise { from { transform: translateY(60%); } }
/* Полоска маленькая, но тянуть её удобно: зона нажатия шире и выше. */
.grab { position: relative; align-self: center; flex: none; width: 40px; height: 4px; border-radius: 3px; background: var(--edge); cursor: grab; touch-action: none; }
.grab::before { content: ""; position: absolute; inset: -12px -60px; }
.sheet { -webkit-user-select: none; user-select: none; }
.sheet input, .sheet textarea { -webkit-user-select: text; user-select: text; }
.label { display: flex; flex-direction: column; gap: 5px; font-weight: 700; font-size: 13px; }
.choices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.choices.three { grid-template-columns: repeat(3, 1fr); }
.choices.two { grid-template-columns: repeat(2, 1fr); }
.add-steps { display: flex; flex-direction: column; gap: 5px; margin: 0; padding-left: 20px; font-size: 13px; color: var(--muted); }
.time-big { font: 500 44px/1 var(--display); text-align: center; color: var(--accent); }
.time-big small { font-size: 13px; color: var(--muted); }
.wheel { position: relative; flex: none; display: flex; gap: 6px; padding-block: 4px; padding-inline: calc(50% - 32px); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab; user-select: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent); }
.wheel::-webkit-scrollbar { display: none; }
.wheel.dragging { scroll-snap-type: none; cursor: grabbing; }
.wheel-item { flex: none; display: grid; place-items: center; width: 64px; height: 56px; border-radius: var(--btn-radius, 12px); background: var(--surface-2); border: var(--edge-w, 1px) solid var(--edge); font: 500 20px var(--display); color: var(--muted); scroll-snap-align: center; text-align: center; transition: background .12s, color .12s, transform .12s; }
.wheel-item.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; transform: scale(1.06); }
.choice { display: grid; place-items: center; min-height: 46px; background: var(--surface-2); border: var(--edge-w, 1px) solid var(--edge); border-radius: var(--btn-radius, 12px); font: 700 14px var(--display); }
.choice.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.plans.three { grid-template-columns: repeat(3, 1fr); gap: 7px; }
.plans.three .plan { padding: 12px 9px; }
.plan { position: relative; display: flex; flex-direction: column; padding: 12px; background: var(--surface-2); border: 2px solid var(--edge); border-radius: var(--radius, 15px); }
.plan.on { border-color: var(--accent); }
.plan b { font: 800 24px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.plan-option b { font-size: 18px; }
.ribbon { position: absolute; top: -9px; right: 8px; padding: 2px 7px; border-radius: 6px; background: var(--alt); color: var(--alt-ink); font-size: 10.5px; font-weight: 800; }
.ops { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.op { position: relative; padding: 5px 2px 6px; background: var(--surface-2); border: 1px solid var(--edge); border-radius: 12px; text-align: center; font-size: 9.5px; font-weight: 700; line-height: 1.15; color: var(--muted); }
.op img { width: 40px; height: 40px; margin: 0 auto 2px; }
.op.wait img, .op.none img { filter: grayscale(1) opacity(.45); }
.op.done { color: var(--ink); border-color: var(--good); }
.op.done::after { content: "✓"; position: absolute; top: 2px; right: 3px; display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--good); color: var(--bg); font-size: 10px; font-weight: 800; }
.result-art { width: 130px; height: auto; margin: 0 auto; animation: burst .6s cubic-bezier(.2, 1.7, .4, 1); }
.sheet-art { width: 56px; height: auto; }
@keyframes burst { from { transform: scale(.2) rotate(-18deg); opacity: 0; } }
.toast { position: absolute; z-index: 30; left: 12px; right: 12px; top: 12px; padding: 11px 14px; border-radius: 13px; background: var(--ink); color: var(--bg); font-weight: 700; animation: fade .2s; }

.theme-btn { position: relative; flex: none; width: 56px; height: 30px; border-radius: 15px; background: var(--surface-2); border: 1px solid var(--edge); display: flex; align-items: center; justify-content: space-around; font-size: 13px; color: var(--muted); }
.theme-btn::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); opacity: .9; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
:root[data-theme="dark"] .theme-btn::after { transform: translateX(26px); }
.theme-btn span { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Пополнение */
.topup-amount { gap: 10px; }
.topup-field { display: flex; align-items: baseline; gap: 8px; }
.topup-field input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: none; color: var(--ink); font: 800 34px/1.15 var(--display); }
.topup-field span { font: 700 15px var(--display); color: var(--muted); }
.pay-methods { display: flex; flex-direction: column; gap: 8px; }
.pay-method { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 12px; text-align: left; background: var(--surface); border: var(--edge-w, 1px) solid var(--edge); border-radius: var(--btn-radius, 13px); transition: border-color .12s; }
.pay-method.on { border-color: var(--accent); }
.pay-method .grow > span { display: block; }
.pay-icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--surface-2); color: var(--accent); }
.pay-price { flex: none; font: 700 13px var(--display); }
.pay-regions { margin: -2px 0 2px; }
.pay-regions .choice { min-width: 0; padding: 6px 8px; font-size: 13px; line-height: 1.15; text-align: center; }
.topup-cta[disabled] { opacity: .5; }
.order-list { gap: 6px; }
.order-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 0; text-align: left; border-top: 1px solid var(--edge); }
.order-row .grow > span { display: block; }
.order-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.order-step { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.order-step i { display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid var(--edge); border-radius: 50%; font: 800 11px/1 var(--body); }
.order-step.active { color: var(--ink); }
.order-step.active i { border-color: var(--accent); color: var(--accent); }
.order-step.done i { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, var(--bg)); }
.req-row { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--edge); }
.req-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.req-sum { font: 800 20px var(--display); color: var(--accent); }
.req-value { font: 600 14px var(--body); letter-spacing: .03em; overflow-wrap: anywhere; }
.order-file { cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.note-good { background: var(--good-bg); color: var(--good); }
.danger-text { color: var(--bad); }

/* Выбор наград */
.reward-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.reward-option { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; text-align: center; line-height: 1.2; background: var(--surface); border: var(--edge-w, 1px) solid var(--edge); border-radius: var(--btn-radius, 13px); }
.reward-option img { width: 48px; height: 48px; object-fit: contain; }
.reward-option.on { border-color: var(--accent); }
.reward-option i { position: absolute; right: 5px; top: 5px; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--accent); color: var(--accent-ink, var(--bg)); font: 800 10px/1 var(--body); }
.choices.two .choice { padding: 6px 8px; font-size: 13px; line-height: 1.15; text-align: center; }
/* История сбора: раскрытый сбор по группам операций */
.run-row { width: 100%; text-align: left; }
.run-detail { display: flex; flex-direction: column; gap: 10px; padding: 2px 0 12px; border-bottom: 1px solid var(--edge); }
.run-group { display: flex; flex-direction: column; gap: 3px; }
.run-op { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
.run-op span:last-child { flex: none; text-align: right; }
.run-op .op-done { color: var(--good); font-weight: 700; }
.run-op .op-bad { color: var(--bad); font-weight: 700; }
/* Пока внутри Telegram грузятся данные игрока. */
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg, #0b0b10); font: 600 16px/1.4 var(--body, sans-serif); color: var(--muted, #9aa); z-index: 50; }
