/* ==========================================================================
   AppDrop — ПОЛНЫЙ ОРИГИНАЛЬНЫЙ CSS (1500+ строк) + ФИКСЫ
   ========================================================================== */

:root, [data-theme="dark"] {
  --bg: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e; --surface-3: #3a3a3c;
  --text: #ffffff; --text-2: #98989d; --text-3: #636366;
  --separator: rgba(255, 255, 255, .08); --stroke: rgba(255, 255, 255, .08);
  --accent: #0a84ff; --accent-text: #0a84ff; --accent-ink: #ffffff; --accent-soft: rgba(10, 132, 255, .15);
  --success: #30d158; --danger: #ff453a; --star: #ff9f0a; --orange: #ff9f0a; --teal: #64d2ff; --pink: #ff6482;
  --tint-bg-s: 28%;  --tint-bg-l: 13%; --tint-fg-s: 65%;  --tint-fg-l: 68%;
  --skeleton: #1c1c1e; --skeleton-shine: rgba(255, 255, 255, .04);
  --glass: rgba(28, 28, 30, .72); --glass-thin: rgba(28, 28, 30, 0.18); --glass-sheet: rgba(28, 28, 30, 0.42);
  --glass-medium: rgba(28, 28, 30, 0.55); --glass-strong: rgba(28, 28, 30, 0.68);
  --glass-border: rgba(255, 255, 255, 0.14); --glass-highlight: rgba(255, 255, 255, 0.22);
  --shadow: 0 8px 24px rgba(0, 0, 0, .4);
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 20px;
  --gutter: 16px; --tabbar-h: 56px; --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.32, 0.72, 0, 1); --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font: -apple-system, 'SF Pro Display', 'Inter', system-ui, sans-serif;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f2f2f7; --surface: #ffffff; --surface-2: #e5e5ea; --surface-3: #d1d1d6;
  --text: #000000; --text-2: #6e6e73; --text-3: #aeaeb2;
  --separator: rgba(0, 0, 0, .1); --stroke: rgba(0, 0, 0, .06);
  --accent: #007aff; --accent-text: #007aff; --accent-soft: rgba(0, 122, 255, .1);
  --success: #34c759; --danger: #ff3b30; --orange: #c77700; --teal: #0a7ea4; --pink: #d6345a;
  --tint-bg-s: 60%;  --tint-bg-l: 94%; --tint-fg-s: 55%;  --tint-fg-l: 38%;
  --skeleton: #e5e5ea; --skeleton-shine: rgba(255, 255, 255, .6);
  --glass: rgba(255, 255, 255, .8); --glass-thin: rgba(255, 255, 255, 0.32); --glass-sheet: rgba(255, 255, 255, 0.48);
  --glass-medium: rgba(255, 255, 255, 0.6); --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.85); --glass-highlight: rgba(255, 255, 255, 0.95);
  --shadow: 0 8px 24px rgba(0, 0, 0, .08);
  color-scheme: light;
}

/* ---------- 2. База и раскладка ---------- */
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.4; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; letter-spacing: inherit; }
input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }

#app { position: fixed; inset: 0; }
.screens { position: absolute; inset: 0; }
.screen { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px + 32px); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .25s ease, transform .35s var(--ease-out), visibility 0s linear .25s; }
.screen.active { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease, transform .35s var(--ease-out), visibility 0s; }

.tap, .app-row, .chart-row, .hero-card, .mini-card, .bento-tile, .removed-card, .collection-card,
.chip, .get-btn, .tab, .see-all, .stat-tile, .icon-btn, .btn-primary { transition: transform .2s var(--ease-out), opacity .2s ease, background-color .2s ease; }
.tap:active, .hero-card:active, .mini-card:active, .bento-tile:active, .removed-card:active,
.collection-card:active, .stat-tile:active, .btn-primary:active { transform: scale(.97); }
.app-row:active, .chart-row:active { background: var(--surface-2); }
.chip:active, .get-btn:active, .icon-btn:active, .see-all:active { opacity: .6; }

/* ---------- 3. Шапка, поиск, секции ---------- */
.top-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 18px var(--gutter) 8px; }
.eyebrow { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0; color: var(--text-2); margin-bottom: 2px; }
.large-title { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.avatar-btn { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: 15px; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

.search-wrap { position: sticky; top: 0; z-index: 5; padding: 8px var(--gutter) 10px; background: var(--glass-medium); backdrop-filter: blur(28px) saturate(200%); -webkit-backdrop-filter: blur(28px) saturate(200%); box-shadow: inset 0 -1px 0 var(--glass-border); border-bottom: none; animation: glass-appear .6s var(--ease-out) backwards; }
.page-nav.scrolled { background: var(--glass-strong); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); box-shadow: inset 0 -1px 0 var(--glass-border); }
.search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border-radius: var(--radius-md); background: var(--surface); }
.search svg { width: 17px; height: 17px; flex-shrink: 0; fill: none; stroke: var(--text-2); stroke-width: 2; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; }
.search input::placeholder { color: var(--text-2); }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear { width: 18px; height: 18px; border-radius: 50%; background: var(--text-3); color: var(--bg); font-size: 9px; font-weight: 800; display: none; place-items: center; }
.search.has-value .search-clear { display: grid; }

.section { margin-top: 28px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 var(--gutter) 10px; padding-top: 12px; border-top: 1px solid var(--separator); }
.section-head h2 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.section-head .sub { display: block; font-size: 13px; color: var(--text-2); font-weight: 400; margin-top: 2px; letter-spacing: 0; }
.see-all { color: var(--accent-text); font-weight: 400; font-size: 16px; white-space: nowrap; }

.h-scroll { display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); padding: 0 var(--gutter) 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.h-scroll::-webkit-scrollbar { display: none; }
.h-scroll > * { scroll-snap-align: start; flex-shrink: 0; }

/* ---------- 4. Иконки, кнопки, звёзды, бейджи ---------- */
.app-icon { --h: 210; --s: 64px; position: relative; flex-shrink: 0; width: var(--s); height: var(--s); display: grid; place-items: center; overflow: hidden; border-radius: 22.5%; background: hsl(var(--h) 35% 30%); color: rgba(255, 255, 255, .9); font-weight: 700; letter-spacing: -0.02em; font-size: calc(var(--s) * .42); }
.app-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .25s ease; }
.app-icon img.ready { opacity: 1; }
.app-icon.icon-full { background: var(--surface-2); color: transparent; }
.app-icon.icon-full img { object-fit: cover; }
.app-icon.has-favicon { background: #ffffff; color: transparent; }
.app-icon.has-favicon img { padding: 10%; image-rendering: -webkit-optimize-contrast; }
.app-icon::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .12); }
[data-theme="light"] .app-icon::after { box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .1); }
.icon-xs { --s: 28px; } .icon-sm { --s: 48px; } .icon-md { --s: 64px; } .icon-lg { --s: 84px; } .icon-xl { --s: 118px; }

.get-btn { position: relative; flex-shrink: 0; min-width: 76px; height: 30px; padding: 0 14px; border-radius: 15px; background: rgba(10, 132, 255, 0.85); backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.15), 0 2px 10px rgba(10, 132, 255, 0.35); border: none; color: #fff; font-size: 15px; font-weight: 700; letter-spacing: 0; display: inline-flex; align-items: center; justify-content: center; gap: 4px; overflow: hidden; }
.get-btn.big { height: 32px; min-width: 92px; padding: 0 18px; font-size: 15px; }
.get-btn.is-installed { background: rgba(255, 255, 255, 0.12); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: var(--text-2); box-shadow: none; }
.get-btn.big.is-installed { color: var(--text); }
[data-theme="light"] .get-btn.is-installed { background: rgba(0, 0, 0, 0.06); }
.get-btn svg.check { width: 15px; height: 15px; fill: none; stroke: var(--success); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.get-btn.is-loading { min-width: 30px; width: 30px; padding: 0; background: transparent !important; box-shadow: none; border-color: transparent; }
.get-btn.big.is-loading { width: 32px; min-width: 32px; }
.get-btn.is-loading > span, .get-btn.is-loading > svg.check { display: none; }
.get-btn .ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--surface-3); stroke-width: 2.5; }
.ring-fill { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 88; stroke-dashoffset: 88; animation: ring-fill 1.1s var(--ease) forwards; }
.ring-stop { fill: var(--accent); }
@keyframes ring-fill { 0% { stroke-dashoffset: 88; } 30% { stroke-dashoffset: 70; } 100% { stroke-dashoffset: 4; } }
.get-btn.just-installed { animation: fade-in-scale .3s var(--ease-out); }
@keyframes fade-in-scale { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }

.icon-btn { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--accent-text); }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.is-active { color: var(--danger); }
.icon-btn.is-active svg { fill: currentColor; }

.stars { display: inline-flex; gap: 1px; color: var(--text-2); vertical-align: middle; }
.stars svg .bg { fill: var(--surface-3); }
.stars svg .fg { fill: currentColor; }
.review-card .stars, .rating-panel .stars { color: var(--star); }

.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11px; font-weight: 600; letter-spacing: 0; white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.badge-removed { color: var(--orange); background: rgba(255, 159, 10, .14); }
.badge-pick { color: var(--accent-text); background: var(--accent-soft); }
.price-note { display: block; font-size: 10px; color: var(--text-3); text-align: center; margin-top: 3px; }

/* ---------- 5. Главная ---------- */
.hero-card { --h: 210; position: relative; isolation: isolate; width: calc(100vw - 32px); max-width: 430px; aspect-ratio: 4 / 3; border-radius: var(--radius-xl); overflow: hidden; color: #fff; text-align: left; background: #1c1c1e; box-shadow: 0 8px 24px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 255, 255, .06); }
.hero-photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s ease; }
.hero-photo.ready { opacity: 1; }
.hero-overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, .85) 100%); }
.hero-corner { position: absolute; top: 12px; right: 12px; z-index: 1; }
.hero-card:not(.compact) .hero-corner .badge { background: rgba(0, 0, 0, .55); color: #ffc266; }
.hero-bottom { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--glass-sheet); backdrop-filter: blur(24px) saturate(200%); -webkit-backdrop-filter: blur(24px) saturate(200%); box-shadow: inset 0 1px 0 var(--glass-highlight), 0 0 0 1px var(--glass-border); }
[data-theme="light"] .hero-card:not(.compact) .hero-bottom { background: rgba(28, 28, 30, 0.42); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.14); }
.hero-text { flex: 1; min-width: 0; }
.hero-title { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-sub { font-size: 13px; color: rgba(255, 255, 255, .65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }

.hero-card.compact { aspect-ratio: 16 / 9; display: flex; flex-direction: column; justify-content: space-between; padding: 14px; color: var(--text); background: var(--surface); box-shadow: none; }
.hero-compact-body { display: flex; align-items: center; gap: 14px; }
.hero-compact-body .hero-sub { color: var(--text-2); white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hero-compact-body .hero-title { font-size: 19px; }
.hero-compact-actions { display: flex; justify-content: flex-end; }
.hero-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.hero-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--surface-3); transition: background-color .25s ease; }
.hero-dots i.on { background: var(--text-2); }

.collection-card { --c: 210; width: 250px; padding: 14px; border-radius: var(--radius-lg); background: hsl(var(--c) var(--tint-bg-s) var(--tint-bg-l)); box-shadow: inset 0 0 0 1px hsl(var(--c) 40% 50% / .14); text-align: left; display: flex; flex-direction: column; gap: 14px; }
.c-stack { display: flex; }
.c-stack .app-icon { box-shadow: 0 0 0 2px hsl(var(--c) var(--tint-bg-s) var(--tint-bg-l)); }
.c-stack .app-icon + .app-icon { margin-left: -8px; }
.collection-card .c-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.collection-card b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.collection-card span { display: block; font-size: 13px; color: var(--text-2); margin-top: 2px; }
.collection-card span { color: hsl(var(--c) 20% 70%); }
[data-theme="light"] .collection-card span { color: hsl(var(--c) 25% 40%); }
.c-arrow { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: hsl(var(--c) var(--tint-fg-s) var(--tint-fg-l)); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.chart-col { width: calc(100vw - var(--gutter) * 2 - 28px); max-width: 400px; display: flex; flex-direction: column; }
.chart-row { display: flex; align-items: center; gap: 12px; text-align: left; border-radius: var(--radius-sm); }
.chart-row + .chart-row .chart-body { border-top: 1px solid var(--separator); }
.chart-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; align-self: stretch; padding: 10px 0; }
.chart-row .rank { width: 16px; flex-shrink: 0; text-align: center; font-size: 16px; font-weight: 700; color: var(--text); }
.chart-row:nth-child(1) .rank { color: #ffc266; }
.chart-row:nth-child(2) .rank { color: #c7ced9; }
.chart-row:nth-child(3) .rank { color: #d9a27a; }
.row-text { flex: 1; min-width: 0; }
.row-title { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.row-meta { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; }
.row-meta .badge { height: 18px; font-size: 10.5px; padding: 0 6px; }

.removed-card { width: 220px; padding: 14px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: inset 0 2px 0 rgba(255, 159, 10, .55); text-align: left; display: flex; flex-direction: column; gap: 10px; }
.removed-card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.removed-card b { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.removed-card .dev { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.removed-card .sub { font-size: 12px; color: var(--text-3); margin-top: 4px; line-height: 1.2; }
.removed-card .bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.mini-card { width: 96px; text-align: left; }
.mini-card .app-icon { margin-bottom: 8px; }
.mini-card .mini-title { font-size: 13px; font-weight: 500; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-card .mini-sub { font-size: 12px; color: var(--text-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-card .badge { margin-top: 5px; height: 18px; font-size: 10.5px; }

.bento { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 0 var(--gutter); }
.bento-tile { --c: 210; min-height: 64px; padding: 12px; border-radius: var(--radius-md); background: hsl(var(--c) var(--tint-bg-s) var(--tint-bg-l)); text-align: left; display: flex; align-items: center; gap: 10px; }
.bento-text { flex: 1; min-width: 0; }
.cat-icon { width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; background: hsl(var(--c) 50% 50% / .18); }
.cat-icon svg { width: 19px; height: 19px; fill: none; stroke: hsl(var(--c) var(--tint-fg-s) var(--tint-fg-l)); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bento-tile.size-xl .cat-icon { width: 40px; height: 40px; border-radius: 11px; }
.bento-tile.size-xl .cat-icon svg { width: 22px; height: 22px; }
.bento-tile b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.bento-tile span:not(.cat-icon) { display: block; font-size: 12.5px; color: hsl(var(--c) 15% 62%); margin-top: 2px; }
[data-theme="light"] .bento-tile span:not(.cat-icon) { color: hsl(var(--c) 20% 40%); }
.bento-tile .chev { width: 8px; height: 13px; flex-shrink: 0; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bento-tile.size-xl { grid-column: span 2; min-height: 76px; }
.bento-tile.size-xl b { font-size: 17px; }

/* ---------- 6. Списки и каталог ---------- */
.list-card { margin: 0 var(--gutter); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.list-card:empty { display: none; }
.app-row { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; text-align: left; animation: fade-up .35s var(--ease-out) both; }
.app-row + .app-row::before { content: ''; position: absolute; top: 0; right: 0; left: 90px; border-top: 1px solid var(--separator); }

.result-meta { padding: 0 var(--gutter) 10px; font-size: 13px; color: var(--text-2); }
.result-meta:empty { display: none; }
.sentinel { min-height: 1px; }
.list-loader { display: flex; justify-content: center; padding: 18px; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--surface-3); border-top-color: var(--text-2); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.chips-row { display: flex; gap: 8px; align-items: center; overflow-x: auto; scrollbar-width: none; padding: 0 var(--gutter) 10px; }
.chips-row::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; height: 32px; padding: 0 14px; border-radius: 16px; background: var(--surface); color: var(--text); font-size: 14px; font-weight: 500; white-space: nowrap; }
.chip.active { background: var(--text); color: var(--bg); }
.chip-cat { display: inline-flex; align-items: center; gap: 7px; }
.chip-cat i { width: 7px; height: 7px; border-radius: 50%; background: hsl(var(--c) var(--tint-fg-s) var(--tint-fg-l)); }
.chip-cat.active { background: hsl(var(--c) 25% 18%); color: hsl(var(--c) 55% 78%); }
[data-theme="light"] .chip-cat.active { background: hsl(var(--c) 60% 90%); color: hsl(var(--c) 60% 30%); }
[data-removed-toggle].active { background: rgba(255, 159, 10, .18); color: var(--orange); }
.chip-divider { width: 1px; height: 18px; background: var(--separator); flex-shrink: 0; }

.segmented { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 var(--gutter) 10px; padding: 2px; border-radius: 9px; background: var(--surface); }
.segmented button { position: relative; z-index: 1; height: 28px; font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; }
.segmented button.active { font-weight: 600; }
.segmented-thumb { position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc((100% - 4px) / 4); border-radius: 7px; background: var(--surface-3); box-shadow: 0 3px 8px rgba(0, 0, 0, .12); transition: transform .3s var(--ease); }
[data-theme="light"] .segmented { background: var(--surface-2); }
[data-theme="light"] .segmented-thumb { background: #fff; }

/* ---------- 7. Страница приложения ---------- */
#pages { position: fixed; inset: 0; pointer-events: none; z-index: 40; }
.page { position: absolute; inset: 0; background: var(--bg); transform: translateX(100%); transition: transform .45s var(--ease); pointer-events: auto; box-shadow: -8px 0 24px rgba(0, 0, 0, .4); display: flex; flex-direction: column; overflow: hidden; }
.page.open { transform: none; }
.page.behind { transform: translateX(-25%); }

.page-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 3; height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 12px; transition: background-color .25s ease, box-shadow .25s ease; }
.nav-back { display: flex; align-items: center; gap: 0; color: var(--accent-text); font-size: 17px; }
.nav-back svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nav-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.page-nav.scrolled .nav-center { opacity: 1; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-get { opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.page-nav.scrolled .nav-get { opacity: 1; pointer-events: auto; }

.page-scroll {
  position: relative; flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  padding: 56px 0 calc(var(--safe-bottom) + 40px);
  background: linear-gradient(180deg, hsl(var(--h, 210) var(--tint-bg-s) var(--tint-bg-l)) 0px, var(--bg) 280px) no-repeat;
  background-attachment: scroll;
}

.app-head { display: flex; gap: 14px; padding: 4px var(--gutter) 0; }
.app-head-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-head h1 { margin: 2px 0 0; font-size: 21px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.app-head .app-sub { font-size: 14px; color: var(--text-2); margin-top: 2px; line-height: 1.3; }
.app-head .app-dev { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.app-head-actions { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.app-badges { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px var(--gutter) 0; }

.info-bento { display: grid; grid-template-columns: repeat(4, 1fr); margin: 18px var(--gutter) 0; padding: 10px 0; border-top: 1px solid var(--separator); border-bottom: 1px solid var(--separator); }
.info-cell { text-align: center; min-width: 0; padding: 0 4px; }
.info-cell + .info-cell { border-left: 1px solid var(--separator); }
.info-cell .k { font-size: 10.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info-cell .v { font-size: 18px; font-weight: 700; color: var(--text-2); margin: 3px 0 1px; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info-cell .s { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.divider { height: 1px; background: var(--separator); margin: 24px var(--gutter) 0; }
.shots { gap: 10px; }
.shot { position: relative; overflow: hidden; width: 196px; aspect-ratio: 9 / 19.5; border-radius: 20px; background: var(--skeleton); box-shadow: inset 0 0 0 1px var(--stroke); }
.shot img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s ease; }
.shot img.loaded { opacity: 1; }
.shot.is-loading::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, var(--skeleton-shine) 50%, transparent 70%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }

.text-block { padding: 0 var(--gutter); font-size: 15px; line-height: 1.5; white-space: pre-line; }
.text-block.clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.more-btn { margin: 4px var(--gutter) 0; color: var(--accent-text); font-size: 15px; }
.changelog-meta { display: flex; justify-content: space-between; padding: 0 var(--gutter); margin-bottom: 6px; font-size: 14px; color: var(--text-2); }

.rating-panel { margin: 0 var(--gutter); }
.rating-summary { display: flex; align-items: center; gap: 18px; }
.rating-big { text-align: center; min-width: 76px; }
.rating-big b { display: block; font-size: 52px; line-height: 1; font-weight: 700; letter-spacing: -0.04em; }
.rating-big span { font-size: 13px; color: var(--text-2); font-weight: 600; }
.rating-bars { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.bar-row { display: flex; align-items: center; gap: 8px; }
.bar-row .lbl { width: 12px; font-size: 11px; font-weight: 600; color: var(--text-3); text-align: right; }
.bar-row .bar { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.bar-row .bar i { display: block; height: 100%; border-radius: 2px; background: var(--text-2); width: 0; transition: width .7s var(--ease); }
.rating-count { margin-top: 8px; text-align: right; font-size: 13px; color: var(--text-2); }

.tap-to-rate { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--separator); }
.tap-to-rate > span { font-size: 15px; color: var(--text-2); }
.rate-stars { display: flex; gap: 4px; }
.rate-stars button svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; transition: fill .15s ease; }
.rate-stars button.on svg { fill: var(--accent); }

.review-card { width: calc(100vw - var(--gutter) * 2 - 24px); max-width: 360px; min-height: 160px; padding: 14px; border-radius: var(--radius-lg); background: var(--surface); display: flex; flex-direction: column; gap: 6px; }
.review-card.mine { box-shadow: inset 0 0 0 1px var(--accent); }
.review-head { display: flex; align-items: center; gap: 10px; }
.review-avatar { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); font-weight: 600; font-size: 13px; flex-shrink: 0; }
.review-avatar img { width: 100%; height: 100%; object-fit: cover; }
.review-head b { display: block; font-size: 15px; font-weight: 600; }
.review-head span { font-size: 12px; color: var(--text-3); }
.review-text { font-size: 15px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.review-text.empty { color: var(--text-3); }
.reviews-empty { margin: 14px var(--gutter) 0; padding: 16px; border-radius: var(--radius-lg); background: var(--surface); text-align: center; color: var(--text-2); font-size: 14px; }

.info-list { margin: 0 var(--gutter); }
.info-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; font-size: 15px; }
.info-row + .info-row { border-top: 1px solid var(--separator); }
.info-row .k { color: var(--text-2); flex-shrink: 0; }
.info-row .v { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info-row a.v { color: var(--accent-text); text-decoration: none; }

/* ---------- 8. Макеты экранов ---------- */
.shot.mock { --brand: hsl(var(--h) 60% 58%); --brand-fill: hsl(var(--h) 40% 24%); --m-surface: #1c1c1e; --m-surface-2: #2c2c2e; --m-line: rgba(255, 255, 255, .07); display: flex; flex-direction: column; background: #0a0a0c; color: #fff; font-size: 8px; line-height: 1.3; letter-spacing: 0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), 0 8px 24px rgba(0, 0, 0, .4); }
.shot.mock button { font: inherit; color: inherit; cursor: default; }
.shot.mock small { font-size: 6.5px; color: #98989d; }
.mock-status { position: relative; z-index: 3; flex-shrink: 0; height: 22px; padding: 0 14px; display: flex; justify-content: space-between; align-items: center; font-size: 7px; font-weight: 600; }
.mock-notch { width: 44px; height: 13px; margin-top: -9px; background: #000; border-radius: 0 0 9px 9px; }
.mock-bars { display: flex; gap: 1.5px; align-items: flex-end; }
.mock-bars i { width: 2px; background: #fff; border-radius: 1px; }
.m-h1 { padding: 6px 14px 8px; font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.m-section-title { padding: 10px 14px 5px; font-size: 9px; font-weight: 700; }
.m-cta { margin: 10px 14px; height: 28px; flex-shrink: 0; display: grid; place-items: center; border-radius: 8px; background: hsl(var(--h) 55% 48%); color: #fff; font-size: 8.5px; font-weight: 700; }
.m-tabbar { margin-top: auto; flex-shrink: 0; height: 30px; padding-bottom: 4px; display: flex; justify-content: space-around; align-items: center; border-top: 1px solid var(--m-line); }
.m-tabbar i { width: 11px; height: 11px; border-radius: 3px; background: #3a3a3c; }
.m-tabbar i.on { background: var(--brand); }
.m-ava { width: 22px; height: 22px; flex-shrink: 0; border-radius: 6px; display: grid; place-items: center; background: var(--m-surface-2); color: #98989d; font-size: 8px; font-weight: 700; font-style: normal; }
.m-tx:nth-of-type(3n+1) .m-ava, .m-chat-row:nth-of-type(4n+1) .m-ava { background: hsl(25 40% 24%); color: hsl(25 70% 72%); }
.m-tx:nth-of-type(3n+2) .m-ava, .m-chat-row:nth-of-type(4n+2) .m-ava { background: hsl(200 40% 24%); color: hsl(200 70% 72%); }
.m-tx:nth-of-type(3n) .m-ava, .m-chat-row:nth-of-type(4n+3) .m-ava { background: hsl(145 35% 22%); color: hsl(145 60% 66%); }
.m-chat-row:nth-of-type(4n) .m-ava { background: hsl(280 30% 26%); color: hsl(280 60% 76%); }
.m-ava.round { border-radius: 50%; }
.plus { color: #30d158; } .minus { color: #ff453a; }

.m-card { margin: 6px 14px; padding: 12px; min-height: 82px; border-radius: 12px; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(135deg, hsl(var(--h) 42% 30%), hsl(var(--h) 38% 18%)); }
.m-card-brand { font-size: 9.5px; font-weight: 700; }
.m-card-num { font-size: 8px; color: #98989d; letter-spacing: .12em; }
.m-balance { padding: 4px 14px 8px; }
.m-balance small { display: block; text-transform: uppercase; }
.m-balance b { display: block; margin-top: 2px; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.m-tx { display: flex; align-items: center; gap: 8px; padding: 6px 14px; }
.m-tx b { display: block; font-size: 8px; font-weight: 600; }
.m-tx small { display: block; }
.m-tx > span { margin-left: auto; font-size: 8px; font-weight: 600; }
.m-greet { padding: 8px 14px; }
.m-greet small { display: block; }
.m-greet b { display: block; font-size: 13px; font-weight: 700; }
.m-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 4px 14px; }
.m-quick button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; border-radius: 10px; background: var(--m-surface); }
.m-quick button i { width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid var(--brand); }
.m-quick button span { font-size: 6px; color: #98989d; }
.m-line-tx { display: flex; justify-content: space-between; padding: 7px 14px; border-bottom: 1px solid var(--m-line); }
.m-line-tx span:last-child { font-weight: 600; }
.m-contacts { display: flex; gap: 10px; padding: 4px 14px 8px; }
.m-contact { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 6px; color: #98989d; }
.m-contact .m-ava { width: 26px; height: 26px; border-radius: 50%; }
.m-contact.on .m-ava { box-shadow: 0 0 0 1.5px var(--brand); color: #fff; }
.m-amount { text-align: center; padding: 10px 0 2px; font-size: 24px; font-weight: 700; letter-spacing: -.03em; }
.m-amount-sub { text-align: center; color: #98989d; font-size: 7px; }
.m-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 10px 14px 0; }
.m-keypad span { height: 24px; border-radius: 7px; background: var(--m-surface); display: grid; place-items: center; font-size: 10px; font-weight: 500; }

.m-ticker { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 14px 0; }
.m-ticker b { font-size: 13px; font-weight: 700; }
.m-price-big { padding: 0 14px; font-size: 17px; font-weight: 700; }
.m-chart { height: 84px; margin: 6px 0 2px; }
.m-chart svg { width: 100%; height: 100%; display: block; }
.m-periods { display: flex; justify-content: space-between; padding: 0 14px 6px; color: #636366; font-size: 7px; font-weight: 600; }
.m-periods span.on { color: #fff; }
.m-holding { margin: 6px 14px; padding: 10px; border-radius: 10px; background: var(--m-surface); display: flex; justify-content: space-between; align-items: center; }
.m-holding b { font-size: 11px; }
.m-pos { display: flex; align-items: center; gap: 8px; padding: 6px 14px; }
.m-pos div { flex: 1; min-width: 0; }
.m-pos b { display: block; font-weight: 600; }
.m-pos > span { font-weight: 600; }
.m-donut { position: relative; display: grid; place-items: center; padding: 8px 0; }
.m-donut svg { width: 108px; height: 108px; transform: rotate(-90deg); }
.m-donut-center { position: absolute; text-align: center; }
.m-donut-center b { display: block; font-size: 11px; font-weight: 700; }
.m-leg { display: flex; align-items: center; gap: 6px; padding: 4px 14px; }
.m-leg i { width: 8px; height: 8px; border-radius: 2px; }
.m-leg span:last-child { margin-left: auto; color: #98989d; font-weight: 600; }
.m-seg { display: grid; grid-template-columns: 1fr 1fr; margin: 8px 14px; padding: 2px; border-radius: 7px; background: var(--m-surface); }
.m-seg span { text-align: center; padding: 5px 0; border-radius: 5px; font-weight: 600; color: #98989d; }
.m-seg span.on { background: var(--m-surface-2); color: #fff; }
.m-field { margin: 5px 14px; padding: 9px 10px; border-radius: 9px; background: var(--m-surface); display: flex; justify-content: space-between; align-items: center; }
.m-field b { font-size: 10px; }

.m-search { margin: 4px 14px 6px; padding: 7px 10px; border-radius: 8px; background: var(--m-surface); color: #98989d; }
.m-promo { margin: 0 14px 4px; padding: 9px 10px; border-radius: 10px; background: var(--m-surface); border-left: 2px solid var(--brand); }
.m-promo b { display: block; font-size: 10px; font-weight: 700; }
.m-grid-products { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 6px 14px; }
.m-product-img { aspect-ratio: 1; border-radius: 8px; margin-bottom: 4px; background: var(--m-surface); }
.m-product:nth-child(1) .m-product-img { background: hsl(25 30% 20%); }
.m-product:nth-child(2) .m-product-img { background: hsl(200 30% 20%); }
.m-product:nth-child(3) .m-product-img { background: hsl(150 25% 18%); }
.m-product:nth-child(4) .m-product-img { background: hsl(280 25% 22%); }
.m-product b { display: block; font-size: 9px; font-weight: 700; }
.m-product small { display: block; }
.m-product-hero { height: 40%; flex-shrink: 0; background: var(--m-surface); display: grid; place-items: center; }
.m-product-hero i { width: 48px; height: 48px; border-radius: 12px; background: var(--m-surface-2); }
.m-price { display: flex; align-items: baseline; gap: 6px; padding: 10px 14px 0; }
.m-price b { font-size: 16px; font-weight: 700; }
.m-price small { text-decoration: line-through; }
.m-price .m-sale { padding: 1px 4px; border-radius: 3px; background: var(--m-surface-2); color: #ff453a; font-size: 6.5px; font-weight: 700; }
.m-title-sm { padding: 4px 14px; font-size: 10px; font-weight: 600; }
.m-stars-row { padding: 0 14px; color: #ff9f0a; font-size: 7px; }
.m-chips { display: flex; gap: 5px; padding: 8px 14px 0; }
.m-chips span { padding: 4px 8px; border-radius: 6px; background: var(--m-surface); font-weight: 600; }
.m-chips span.on { box-shadow: inset 0 0 0 1px #fff; }
.m-cart-item { display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-bottom: 1px solid var(--m-line); }
.m-cart-item > i { width: 34px; height: 34px; flex-shrink: 0; border-radius: 8px; background: var(--m-surface); }
.m-cart-item div { flex: 1; min-width: 0; }
.m-cart-item b { display: block; font-size: 8.5px; font-weight: 600; }
.m-qty { padding: 3px 6px; border-radius: 5px; background: var(--m-surface); font-weight: 700; }
.m-total { display: flex; justify-content: space-between; padding: 10px 14px 0; font-size: 11px; font-weight: 700; }

.m-stories { display: flex; gap: 7px; padding: 4px 14px 8px; }
.m-story { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; background: var(--m-surface-2); box-shadow: 0 0 0 1.5px #0a0a0c, 0 0 0 2.5px var(--brand); }
.m-story:nth-child(n+3) { box-shadow: 0 0 0 1.5px #0a0a0c, 0 0 0 2.5px #3a3a3c; }
.m-post-head { display: flex; align-items: center; gap: 6px; padding: 0 14px 6px; }
.m-post-img { height: 140px; background: var(--m-surface); display: flex; align-items: flex-end; padding: 8px 14px; }
.m-post-img i { display: block; width: 50%; height: 6px; border-radius: 3px; background: var(--m-surface-2); }
.m-post-stats { display: flex; gap: 10px; padding: 6px 14px; color: #98989d; }
.m-post-text { padding: 0 14px; color: #c7c7cc; }
.m-chat-row { display: flex; align-items: center; gap: 8px; padding: 7px 14px; }
.m-chat-row .m-ava { width: 28px; height: 28px; }
.m-chat-row div { flex: 1; min-width: 0; }
.m-chat-row b { display: block; font-size: 8.5px; font-weight: 600; }
.m-chat-row small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-chat-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.m-unread { min-width: 13px; height: 13px; padding: 0 4px; border-radius: 7px; background: var(--brand); font-size: 6.5px; font-weight: 700; display: grid; place-items: center; }
.m-chat-head { display: flex; align-items: center; gap: 8px; padding: 4px 14px 8px; border-bottom: 1px solid var(--m-line); }
.m-chat-head b { display: block; font-size: 9px; font-weight: 600; }
.m-bubble { max-width: 72%; margin: 4px 14px; padding: 6px 9px; border-radius: 12px 12px 12px 4px; background: var(--m-surface); }
.m-bubble.me { margin-left: auto; border-radius: 12px 12px 4px 12px; background: var(--m-surface-2); box-shadow: inset 2px 0 0 var(--brand); }
.m-input { margin: auto 10px 10px; height: 26px; flex-shrink: 0; border-radius: 13px; background: var(--m-surface); display: flex; align-items: center; justify-content: space-between; padding: 0 4px 0 10px; color: #98989d; }
.m-input i { width: 18px; height: 18px; border-radius: 50%; background: var(--m-surface-2); }

.m-scene { position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, hsl(var(--h) 30% 20%) 0%, hsl(var(--h) 20% 10%) 55%, #0a0a0c 100%); }
.m-scene::after { content: ''; position: absolute; left: -30%; right: -30%; bottom: 0; height: 42%; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 22px), repeating-linear-gradient(0deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 16px); transform: perspective(120px) rotateX(55deg); transform-origin: bottom; }
.m-hud { position: absolute; z-index: 1; top: 28px; left: 10px; right: 10px; display: flex; justify-content: space-between; align-items: flex-start; }
.m-hp { width: 70px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.m-hp i { display: block; height: 100%; border-radius: 2px; background: #30d158; }
.m-hp-label { margin-top: 3px; font-size: 6.5px; font-weight: 600; color: #98989d; }
.m-minimap { width: 38px; height: 38px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .25); position: relative; background: rgba(28, 28, 30, .8); }
.m-minimap::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; border-radius: 50%; background: var(--brand); }
.m-score { font-size: 11px; font-weight: 700; }
.m-reticle { position: absolute; z-index: 1; left: 50%; top: 46%; width: 20px; height: 20px; transform: translate(-50%, -50%); border: 1px solid rgba(255, 255, 255, .7); border-radius: 50%; }
.m-reticle::before, .m-reticle::after { content: ''; position: absolute; background: rgba(255, 255, 255, .7); }
.m-reticle::before { left: 50%; top: -5px; bottom: -5px; width: 1px; }
.m-reticle::after { top: 50%; left: -5px; right: -5px; height: 1px; }
.m-action-btn { position: absolute; z-index: 1; right: 16px; bottom: 40px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .06); }
.m-action-btn::after { content: ''; position: absolute; inset: 12px; border-radius: 50%; border: 1px solid var(--brand); }
.m-joystick { position: absolute; z-index: 1; left: 18px; bottom: 36px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .25); }
.m-joystick::after { content: ''; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px; border-radius: 50%; background: rgba(255, 255, 255, .3); }
.m-inv-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 6px 14px; }
.m-inv-cell { aspect-ratio: 1; border-radius: 8px; display: grid; place-items: center; background: var(--m-surface); color: #98989d; font-weight: 700; font-size: 9px; }
.m-inv-cell.rare { box-shadow: inset 0 0 0 1px var(--brand); color: #fff; }
.m-inv-info { position: relative; z-index: 1; margin: 6px 14px; padding: 9px; border-radius: 8px; background: var(--m-surface); }
.m-inv-info b { display: block; font-size: 9px; font-weight: 700; }
.m-lobby-title { position: relative; z-index: 1; padding: 22px 14px 2px; font-size: 17px; font-weight: 800; letter-spacing: -.02em; text-transform: uppercase; }
.m-level { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; padding: 0 14px 10px; }
.m-level .m-hp { width: 90px; }
.m-mode { position: relative; z-index: 1; margin: 5px 14px; padding: 10px; border-radius: 10px; display: flex; justify-content: space-between; align-items: center; background: rgba(28, 28, 30, .9); }
.m-mode b { font-size: 9px; font-weight: 600; }
.m-mode.on { box-shadow: inset 0 0 0 1px var(--brand); }
.m-play { position: absolute; z-index: 1; left: 14px; right: 14px; bottom: 22px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #f2f2f7; color: #000; font-size: 10px; font-weight: 800; letter-spacing: .04em; }

.m-services { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px 14px; }
.m-services button { display: flex; flex-direction: column; gap: 8px; padding: 9px 8px; border-radius: 9px; background: var(--m-surface); text-align: left; font-size: 8px; font-weight: 600; }
.m-services button i { width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid var(--brand); }
.m-notice { margin: 6px 14px; padding: 10px; border-radius: 10px; background: var(--m-surface); }
.m-notice b { display: block; font-size: 8.5px; font-weight: 600; }
.m-notice-row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.m-notice-row b { font-size: 11px; font-weight: 700; }
.m-pay { padding: 4px 9px; border-radius: 6px; background: #f2f2f7; color: #000; font-weight: 700; }
.m-doc { margin: 8px 14px; padding: 12px; min-height: 88px; border-radius: 12px; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(135deg, hsl(var(--h) 40% 28%), hsl(var(--h) 35% 17%)); }
.m-doc b { font-size: 11px; font-weight: 700; }
.m-doc-row { display: flex; justify-content: space-between; padding: 8px 14px; border-bottom: 1px solid var(--m-line); }
.m-doc-row span:last-child { color: #98989d; }

.m-map { position: relative; flex-shrink: 0; height: 52%; background: linear-gradient(90deg, transparent 46%, #26282d 46% 50%, transparent 50%), linear-gradient(0deg, transparent 60%, #26282d 60% 63%, transparent 63%), repeating-linear-gradient(90deg, #1b1d21 0 1px, transparent 1px 26px), repeating-linear-gradient(0deg, #1b1d21 0 1px, transparent 1px 26px), #141518; }
.m-map::before { content: ''; position: absolute; left: 8%; top: 12%; width: 32%; height: 26%; border-radius: 6px; background: #1a2420; }
.m-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.m-pin { position: absolute; left: 70%; top: 22%; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2.5px solid var(--brand); }
.m-you { position: absolute; left: 24%; top: 72%; width: 9px; height: 9px; border-radius: 50%; background: #0a84ff; border: 2px solid #fff; }
.m-sheet { margin-top: -12px; position: relative; flex: 1; display: flex; flex-direction: column; border-radius: 12px 12px 0 0; background: #0a0a0c; padding-top: 6px; }
.m-sheet::before { content: ''; width: 24px; height: 3px; margin: 0 auto 4px; border-radius: 2px; background: #3a3a3c; }
.m-poi { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--m-line); }
.m-poi b { display: block; font-size: 8.5px; font-weight: 600; }
.m-poi small { display: block; }
.m-tariffs { display: flex; gap: 6px; padding: 6px 14px; }
.m-tariff { flex: 1; padding: 8px 4px; border-radius: 9px; background: var(--m-surface); text-align: center; }
.m-tariff i { display: block; width: 22px; height: 10px; margin: 0 auto 4px; border-radius: 4px; background: var(--m-surface-2); }
.m-tariff b { display: block; font-size: 8px; font-weight: 600; }
.m-tariff small { display: block; }
.m-tariff.on { box-shadow: inset 0 0 0 1px #fff; }
.m-route-row { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--m-line); }
.m-bus { min-width: 26px; padding: 3px 0; border-radius: 5px; text-align: center; font-weight: 700; background: var(--m-surface-2); }
.m-route-row div { flex: 1; min-width: 0; }
.m-route-row b { display: block; font-size: 8.5px; font-weight: 600; }
.m-eta { font-weight: 700; color: #30d158; }

.m-cover { margin: 12px 18px; aspect-ratio: 1; border-radius: 12px; flex-shrink: 0; background: linear-gradient(135deg, hsl(var(--h) 40% 28%), hsl(calc(var(--h) + 40) 35% 16%)); display: grid; place-items: center; }
.m-cover svg { width: 40px; height: 40px; fill: none; stroke: hsl(var(--h) 50% 70% / .6); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.m-track { padding: 0 18px; }
.m-track b { display: block; font-size: 11px; font-weight: 700; }
.m-progress { margin: 10px 18px 4px; height: 3px; border-radius: 2px; background: #3a3a3c; }
.m-progress i { display: block; height: 100%; border-radius: 2px; background: #fff; }
.m-times { display: flex; justify-content: space-between; padding: 0 18px; font-size: 6px; color: #636366; }
.m-controls { display: flex; justify-content: center; align-items: center; gap: 20px; padding: 10px 0; }
.m-controls i { width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.m-controls .prev { border-right: 7px solid #fff; }
.m-controls .next { border-left: 7px solid #fff; }
.m-play-btn { width: 32px; height: 32px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.m-play-btn::after { content: ''; margin-left: 2px; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid #000; }
.m-shelf { display: flex; gap: 6px; padding: 0 14px 8px; overflow: hidden; }
.m-poster { flex: 0 0 46px; aspect-ratio: 2 / 3; border-radius: 6px; background: var(--m-surface); display: flex; align-items: flex-end; padding: 4px; }
.m-poster:nth-child(4n+1) { background: hsl(var(--h) 35% 24%); }
.m-poster:nth-child(4n+2) { background: hsl(210 30% 22%); }
.m-poster:nth-child(4n+3) { background: hsl(340 28% 22%); }
.m-poster:nth-child(4n) { background: hsl(160 25% 18%); }
.m-poster i { display: block; width: 70%; height: 3px; border-radius: 2px; background: #3a3a3c; }
.m-backdrop { position: relative; height: 38%; flex-shrink: 0; margin-top: -22px; background: linear-gradient(180deg, hsl(var(--h) 35% 24%), #0a0a0c); display: grid; place-items: center; }
.m-backdrop span { font-size: 12px; font-weight: 800; letter-spacing: .06em; color: hsl(var(--h) 40% 72% / .7); text-transform: uppercase; }
.m-movie-title { padding: 10px 14px 0; font-size: 14px; font-weight: 800; letter-spacing: -.02em; }
.m-meta-chips { display: flex; gap: 4px; padding: 6px 14px; }
.m-meta-chips span { padding: 2px 6px; border-radius: 4px; background: var(--m-surface); font-weight: 600; color: #98989d; }
.m-meta-chips .m-rate { color: #30d158; }
.m-episode { display: flex; align-items: center; gap: 8px; padding: 5px 14px; }
.m-episode i { width: 50px; aspect-ratio: 16 / 9; flex-shrink: 0; border-radius: 5px; background: var(--m-surface); }
.m-episode b { display: block; font-weight: 600; }

.m-splash { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; margin-top: -22px; }
.m-splash b { font-size: 12px; font-weight: 600; }
.m-dots { display: flex; gap: 4px; }
.m-dots i { width: 4px; height: 4px; border-radius: 50%; background: #3a3a3c; }
.m-dots i:first-child { background: #98989d; }
.m-hero-fallback { margin: 10px 14px; height: 40%; border-radius: 12px; background: var(--m-surface); }
.m-line { margin: 6px 14px; height: 8px; border-radius: 4px; background: var(--m-surface); }
.m-line.short { width: 50%; }

/* ---------- 9. Профиль ---------- */
.profile-hero { margin: 4px var(--gutter) 0; padding: 16px; border-radius: var(--radius-lg); background: var(--surface); display: flex; align-items: center; gap: 14px; }
.profile-avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); font-size: 26px; font-weight: 600; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-hero h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.profile-hero .handle { font-size: 13.5px; color: var(--text-2); margin-top: 2px; }
.profile-hero .badge { margin-top: 8px; margin-right: 4px; }
.badge-level { color: var(--teal); background: rgba(100, 210, 255, .13); }
.badge-admin { color: var(--accent-text); background: var(--accent-soft); }

.profile-bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px var(--gutter) 0; }
.balance-card { grid-column: span 3; padding: 16px; border-radius: var(--radius-lg); background: linear-gradient(135deg, hsl(214 45% 19%), hsl(232 35% 15%)); color: var(--text); box-shadow: inset 0 0 0 1px hsl(214 60% 60% / .14); }
[data-theme="light"] .balance-card { background: linear-gradient(135deg, hsl(214 80% 94%), hsl(232 70% 95%)); }
.balance-card .k { font-size: 13px; color: hsl(214 60% 75%); }
[data-theme="light"] .balance-card .k { color: hsl(214 60% 40%); }
.balance-card .v { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; margin-top: 2px; }
.balance-card .v small { font-size: 20px; color: var(--text-2); font-weight: 600; margin-left: 4px; }
.balance-card .s { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.stat-tile { padding: 14px 8px; border-radius: var(--radius-lg); background: var(--surface); text-align: center; }
.stat-tile b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.stat-tile span { font-size: 12px; color: var(--text-2); }
.profile-bento .stat-tile:nth-child(3) b { color: var(--teal); }
.profile-bento .stat-tile:nth-child(4) b { color: var(--pink); }
.profile-bento .stat-tile:nth-child(5) b { color: var(--orange); }

.level-card { grid-column: span 3; padding: 14px 16px; border-radius: var(--radius-lg); background: var(--surface); }
.level-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.level-head b { font-size: 15px; font-weight: 600; }
.level-head span { font-size: 13px; color: var(--text-2); text-align: right; }
.level-bar { margin-top: 10px; height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.level-bar i { display: block; height: 100%; width: 0; border-radius: 2px; background: linear-gradient(90deg, #0a84ff, #64d2ff); transition: width .8s var(--ease); }
.level-steps { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 8px; font-size: 11px; color: var(--text-3); }
.level-steps span:nth-child(2) { text-align: center; padding-right: 20%; }
.level-steps span:nth-child(3) { text-align: center; padding-left: 20%; }
.level-steps span:last-child { text-align: right; }
.level-steps span.on { color: var(--teal); font-weight: 600; }

.admin-hint { margin: 8px var(--gutter) 0; padding: 12px 14px; border-radius: var(--radius-lg); background: var(--surface); color: var(--text-2); font-size: 14px; line-height: 1.4; }
.admin-hint b { color: var(--text); }
.empty-state { padding: 56px 32px 16px; text-align: center; animation: fade-up .4s var(--ease-out) both; }
.empty-art { width: 64px; height: 64px; margin: 0 auto 16px; display: grid; place-items: center; }
.empty-art svg { width: 48px; height: 48px; fill: none; stroke: var(--text-3); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.empty-state h3 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.empty-state p { margin: 6px 0 20px; color: var(--text-2); font-size: 15px; }
.btn-primary { height: 44px; padding: 0 22px; border-radius: var(--radius-md); background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 16px; }
.btn-primary:disabled { opacity: .4; }
.btn-primary.block { width: 100%; }

/* ---------- 10. Таббар, шторка, тосты ---------- */
.tabbar { position: fixed; z-index: 30; left: 16px; right: 16px; bottom: calc(var(--safe-bottom) + 12px); height: var(--tabbar-h); display: grid; grid-template-columns: repeat(4, 1fr); border-radius: 24px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 40%, transparent 100%), var(--glass-thin); backdrop-filter: blur(40px) saturate(220%); -webkit-backdrop-filter: blur(40px) saturate(220%); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 var(--glass-highlight), inset 0 -1px 0 rgba(0, 0, 0, 0.15), 0 0 0 1px var(--glass-border); border: none; transition: transform .4s var(--ease), opacity .3s ease; animation: glass-appear .6s var(--ease-out) backwards; }
[data-theme="light"] .tabbar { background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.15) 40%, transparent 100%), var(--glass-thin); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), inset 0 1px 0 var(--glass-highlight), inset 0 -1px 0 rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.06); }
.tabbar.is-switching { transform: scale(0.98); }
.tabbar.hidden-by-page { transform: translateY(calc(100% + 24px + var(--safe-bottom))); opacity: 0; }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; margin: 4px; border-radius: 14px; overflow: hidden; isolation: isolate; color: var(--text-3); font-size: 10px; font-weight: 500; transition: color .3s ease; -webkit-tap-highlight-color: transparent; }
.tab:focus, .tab:focus-visible, .tab:active { outline: none; -webkit-tap-highlight-color: transparent; }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.tab.active { color: var(--accent); }
.tab::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: rgba(255, 255, 255, 0.08); opacity: 0; transform: scale(0.85); transition: opacity .35s cubic-bezier(0.32, 0.72, 0, 1), transform .45s cubic-bezier(0.34, 1.56, 0.64, 1); pointer-events: none; }
.tab.active::before { opacity: 1; transform: scale(1); }
[data-theme="light"] .tab::before { background: rgba(0, 0, 0, 0.06); }
.tab:active svg { transform: scale(0.88); transition: transform .12s ease-out; }
.tab.active svg { animation: tab-bounce .4s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes tab-bounce { 0% { transform: scale(1); } 45% { transform: scale(1.15); } 100% { transform: scale(1); } }
.tab-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; font-style: normal; font-weight: 600; display: grid; place-items: center; }

.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.4); opacity: 0; backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); transition: opacity .3s ease, backdrop-filter .4s ease, -webkit-backdrop-filter .4s ease; }
.sheet-backdrop.open { opacity: 1; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 92vh; overflow-y: auto; padding: 8px var(--gutter) calc(var(--safe-bottom) + 20px); border-radius: 14px 14px 0 0; background: var(--glass-sheet); backdrop-filter: blur(40px) saturate(220%); -webkit-backdrop-filter: blur(40px) saturate(220%); box-shadow: inset 0 1px 0 var(--glass-highlight); transform: translateY(105%); transition: transform .5s cubic-bezier(0.32, 0.72, 0, 1); }
.sheet.open { transform: none; animation: sheet-liquid-in .5s var(--ease-out); }
@keyframes sheet-liquid-in { 0% { transform: translateY(100%); backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); } 60% { transform: translateY(-2%); } 100% { transform: translateY(0); backdrop-filter: blur(40px) saturate(220%); -webkit-backdrop-filter: blur(40px) saturate(220%); } }

.list-card, .hero-card, .bento-tile, .removed-card, .collection-card { background: var(--glass-medium); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); box-shadow: inset 0 1px 0 var(--glass-highlight), 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 0 1px var(--glass-border); border: none; }
.bento-tile, .collection-card { background: hsl(var(--c) var(--tint-bg-s) var(--tint-bg-l) / 0.55); }
.removed-card { box-shadow: inset 0 2px 0 rgba(255, 159, 10, .55), inset 0 1px 0 var(--glass-highlight), 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 0 1px var(--glass-border); }
[data-theme="light"] .list-card, [data-theme="light"] .hero-card, [data-theme="light"] .bento-tile, [data-theme="light"] .removed-card, [data-theme="light"] .collection-card { box-shadow: inset 0 1px 0 var(--glass-highlight), 0 4px 14px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.05); }
[data-theme="light"] .bento-tile, [data-theme="light"] .collection-card { background: hsl(var(--c) var(--tint-bg-s) var(--tint-bg-l) / 0.75); }

@keyframes glass-appear { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
.get-btn, .chip, .icon-btn, .app-row, .chart-row { position: relative; overflow: hidden; -webkit-tap-highlight-color: transparent; }
.get-btn::after, .chip::after, .icon-btn::after, .app-row::after, .chart-row::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at var(--tap-x, 50%) var(--tap-y, 50%), rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.15) 30%, transparent 60%); opacity: 0; pointer-events: none; transition: opacity .4s ease; border-radius: inherit; }
.get-btn:active::after, .chip:active::after, .icon-btn:active::after, .app-row:active::after, .chart-row:active::after { opacity: 1; transition: opacity .05s ease; }

.sheet-grip { width: 36px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 0 auto 14px; }
.sheet h3 { margin: 0 0 2px; font-size: 18px; font-weight: 700; text-align: center; }
.sheet .sheet-sub { text-align: center; color: var(--text-2); font-size: 14px; margin-bottom: 16px; }
.sheet .rate-stars { justify-content: center; gap: 8px; margin-bottom: 16px; }
.sheet .rate-stars button svg { width: 34px; height: 34px; }
.sheet textarea { width: 100%; min-height: 110px; resize: none; padding: 12px; border-radius: var(--radius-md); border: 0; outline: 0; background: var(--surface-2); font-size: 16px; line-height: 1.4; }
.sheet .counter { text-align: right; font-size: 12px; color: var(--text-3); margin: 6px 2px 14px; }

#toast-root { position: fixed; left: 0; right: 0; z-index: 80; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px + 14px); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px); padding: 10px 14px; border-radius: var(--radius-md); background: var(--surface-2); color: var(--text); box-shadow: var(--shadow); font-size: 14px; font-weight: 500; animation: fade-up .25s var(--ease-out) both; }
.toast.out { animation: fade-out .2s ease forwards; }
.toast .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-2); flex-shrink: 0; }
.toast.success .dot { background: var(--success); }
.toast.error .dot { background: var(--danger); }
@keyframes fade-out { to { opacity: 0; transform: translateY(6px); } }

.ptr { position: fixed; z-index: 35; top: 0; left: 50%; width: 32px; height: 32px; margin-left: -16px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); box-shadow: var(--shadow); transform: translateY(-50px); opacity: 0; pointer-events: none; }
.ptr svg { width: 16px; height: 16px; fill: none; stroke: var(--text-2); stroke-width: 2.2; stroke-linecap: round; }
.ptr.armed svg { stroke: var(--text); }
.ptr.loading { transition: transform .25s var(--ease); }
.ptr.loading svg { animation: spin .8s linear infinite; }
.ptr.release { transition: transform .35s var(--ease), opacity .25s ease; }
.screen.pulling { transition: none !important; }

.sk { position: relative; overflow: hidden; background: var(--skeleton); border-radius: var(--radius-sm); }
.sk::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, var(--skeleton-shine) 50%, transparent 70%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.sk-line { height: 11px; border-radius: 5px; }
.sk-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.sk-row .sk-icon { width: 64px; height: 64px; border-radius: 22.5%; flex-shrink: 0; }
.sk-row .sk-texts { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.sk-pill { width: 76px; height: 30px; border-radius: 15px; }
[data-theme="dark"] .list-card .sk, :root:not([data-theme="light"]) .list-card .sk { background: var(--surface-2); }

@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fade-in { animation: fade-up .4s var(--ease-out) both; }
.stagger > * { animation: fade-up .4s var(--ease-out) both; }
.stagger > *:nth-child(2) { animation-delay: .03s; }
.stagger > *:nth-child(3) { animation-delay: .06s; }
.stagger > *:nth-child(4) { animation-delay: .09s; }
.stagger > *:nth-child(5) { animation-delay: .12s; }
.stagger > *:nth-child(n+6) { animation-delay: .15s; }
.error-box { margin: 40px var(--gutter); text-align: center; color: var(--text-2); }
.error-box b { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }
.error-box button { margin-top: 14px; }

@media (min-width: 640px) {
  .bento { grid-template-columns: repeat(3, 1fr); }
  .bento-tile.size-xl { grid-column: span 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   БЛОК ФИКСОВ ДЛЯ МОДАЛЬНОГО ОКНА APPLE ID (чтобы ничего не обрезалось)
   ========================================================================== */

.modal-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .65); display: flex; align-items: flex-end; justify-content: center; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.modal-box { 
  background: var(--bg); width: 100%; max-width: 560px; 
  /* УВЕЛИЧИЛИ МИНИМАЛЬНУЮ ВЫСОТУ, ЧТОБЫ ВЛЕЗЛА ИНСТРУКЦИЯ */
  min-height: 80vh; max-height: 95vh; overflow-y: auto; 
  border-radius: 28px 28px 0 0; padding: 24px 16px calc(var(--safe-bottom) + 24px); 
  position: relative; transform: translateY(100%); transition: transform .3s var(--ease-out); 
}
.modal-overlay.show .modal-box { transform: none; }
.modal-x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; font-size: 15px; z-index: 2; }

.warnbox { background: #fff8e6; border: 1px solid #f0d98a; border-radius: 18px; padding: 16px; margin-bottom: 14px; text-align: left; }
[data-theme="dark"] .warnbox { background: #2a2410; border-color: #5a4a1a; }
.warnbox .wt { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.warnbox .wt .ic { width: 28px; height: 28px; border-radius: 8px; background: #f5c542; color: #fff; display: grid; place-items: center; font-size: 16px; flex: none; }
.warnbox .wt b { font-size: 15px; color: #7a5a00; }
[data-theme="dark"] .warnbox .wt b { color: #f0c860; }
.warnbox p { font-size: 13px; line-height: 1.5; color: #7a5a00; font-weight: 500; margin: 0; }
[data-theme="dark"] .warnbox p { color: #e0c070; }
.warnbox .ic svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

.timer-box { background: var(--surface); border: 2px solid var(--accent); border-radius: 18px; padding: 14px; text-align: center; margin-bottom: 14px; }
.timer-box .tn { font-size: 30px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.timer-box .tl { color: var(--text-2); font-size: 12px; margin-top: 6px; }

.searchacc { text-align: center; padding: 10px 0; }
.searchacc h2 { font-size: 24px; margin-bottom: 8px; }
.searchacc .sub { color: var(--text-2); font-size: 14px; margin-bottom: 20px; }

.search-anim { display: flex; flex-direction: column; align-items: center; gap: 20px; width: 100%; margin-bottom: 20px; }
.sa-ring { position: relative; width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; }
.sa-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.sa-track { fill: none; stroke: var(--surface-2); stroke-width: 5; }
.sa-progress { fill: none; stroke: url(#appleGrad); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 0.2s linear; }
.sa-center { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.sa-progress-label { display: flex; flex-direction: column; align-items: center; transition: opacity 0.3s; }
.sa-percent { font-size: 28px; font-weight: 800; color: var(--text); line-height: 1; }
.sa-caption { font-size: 11px; color: var(--text-2); margin-top: 4px; }
.sa-done { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; transform: scale(0.8); transition: all 0.4s var(--ease-out); }
.sa-done__icon { width: 32px; height: 32px; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; font-size: 16px; margin-bottom: 6px; font-weight: bold; }
.sa-done span { font-size: 14px; font-weight: 600; color: var(--success); }

.search-anim.is-complete .sa-progress-label { opacity: 0; transform: scale(0.9); }
.search-anim.is-complete .sa-done { opacity: 1; transform: scale(1); }
.search-anim.is-complete .sa-progress { stroke: var(--success); stroke-dashoffset: 0 !important; }

.sa-steps { list-style: none; padding: 0; margin: 0; width: 100%; max-width: 280px; text-align: left; display: flex; flex-direction: column; gap: 14px; }
.sa-step { display: flex; align-items: center; gap: 12px; opacity: 0; transform: translateY(10px); transition: all 0.4s var(--ease-out); }
.sa-step.is-visible { opacity: 1; transform: none; }
.sa-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--surface-3); display: grid; place-items: center; flex-shrink: 0; background: var(--bg); transition: all 0.3s; }
.sa-check { opacity: 0; transform: scale(0); color: #fff; font-size: 12px; font-weight: bold; transition: all 0.3s var(--ease-out); }
.sa-text { font-size: 14px; color: var(--text-2); transition: color 0.3s; }
.sa-step.is-active .sa-dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.sa-step.is-active .sa-text { color: var(--text); font-weight: 500; }
.sa-step.is-done .sa-dot { background: var(--success); border-color: var(--success); }
.sa-step.is-done .sa-check { opacity: 1; transform: scale(1); }
.sa-step.is-done .sa-text { color: var(--text-3); text-decoration: line-through; }

.accbox { text-align: center; padding: 10px 0; }
.accbox h2 { font-size: 24px; margin-bottom: 6px; }
.accbox .sub { color: var(--text-2); font-size: 14px; margin-bottom: 20px; }

.field-row { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.field { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--separator); border-radius: 16px; padding: 12px 16px; }
.field .fi { color: var(--text-3); display: grid; place-items: center; }
.field .fi svg { width: 20px; height: 20px; stroke-width: 2; }
.field .fv { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
.field .fv span { font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.field .fv b { font-size: 16px; font-weight: 600; word-break: break-all; }
.field .cp { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; transition: all 0.2s ease; }
.field .cp:active { transform: scale(0.9); }
.field .cp.ok { background: rgba(48, 209, 88, 0.15); color: var(--success); }
.field .cp svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.copyall { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 52px; border-radius: 16px; background: var(--surface-2); color: var(--text); font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.copyall:active { background: var(--surface-3); }
.copyall svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }

.anim-box { position: relative; background: #1c1c1e; border-radius: 20px; overflow: hidden; width: 100%; max-width: 340px; margin: 0 auto; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); height: 400px; }
.anim-screen { position: relative; z-index: 2; background: #1c1c1e; transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s; }
.anim-content { display: flex; flex-direction: column; transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1); }
.anim-profile { display: flex; flex-direction: column; align-items: center; margin-bottom: 24px; }
.anim-avatar { width: 64px; height: 64px; border-radius: 50%; background: #2c2c2e; display: grid; place-items: center; font-size: 20px; font-weight: 600; color: #fff; margin-bottom: 8px; }
.anim-profile__name { font-size: 18px; font-weight: 600; color: #fff; }
.anim-profile__mail { font-size: 13px; color: #8e8e93; margin-top: 2px; }
.anim-group { background: #2c2c2e; border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.anim-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; font-size: 16px; color: #fff; background: #1c1c1e; transition: background 0.2s; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.anim-row:last-child { border-bottom: none; }
.anim-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 14px; }
.anim-row.danger { background: #2c2c2e; border-radius: 12px; color: #ff453a; justify-content: center; font-weight: 600; margin-top: 12px; border: none; opacity: 0; transform: translateY(10px) scale(0.95); transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.anim-row.danger.is-visible { opacity: 1; transform: none; }
.anim-row.danger.is-pressed { transform: scale(0.96); background: rgba(255, 69, 58, 0.1); }
.anim-row.danger.is-confirmed { background: #ff453a; color: #fff; }
.anim-screen.is-leaving { transform: translateY(100%); opacity: 0; }
.anim-after { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #1c1c1e; color: #fff; gap: 8px; opacity: 0; transition: opacity 0.4s ease 0.2s; }
.anim-after strong { font-size: 18px; font-weight: 600; }
.anim-after span { font-size: 14px; color: #8e8e93; }
.anim-box.is-done .anim-after { opacity: 1; }

.btn-primary { height: 44px; padding: 0 22px; border-radius: var(--radius-md); background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 16px; }
.btn-primary:disabled { opacity: .4; }
.btn-primary.block { width: 100%; }
.empty-state { padding: 56px 32px 16px; text-align: center; }