/* Cyber-Glass HUD — единый стиль платформы. Цвета берутся из brand.json (JS кладёт их в CSS-переменные на <html>). */
:root {
  --bg: #0b0e14; --bg2: #121722; --accent: #00f0ff; --accent2: #f5b041; --ink: #001418; --text: #e9f2f6; --muted: #8d9ba8;
  --glass: rgba(255,255,255,.055); --line: rgba(0,240,255,.40); --glow: rgba(0,240,255,.35);
  --accent-rgb: 0,240,255; --accent2-rgb: 245,176,65; --bg-rgb: 11,14,20;
  --ta1: #fff3c4; --ta2: #e0a030;           /* градиент первой строки заголовка баннера (золото/белый) */
  --radius: 20px; --shadow: 0 10px 34px -10px rgba(0,0,0,.7);
  --sheen: rgba(255,255,255,.10); --card-hi: rgba(255,255,255,.085); --card-lo: rgba(255,255,255,.02);
  --ok: #19e08a; --bad: #ff4d6d;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--text); font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background .35s, color .35s;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3, p { margin: 0; }
.hidden { display: none !important; }

/* ── фон: карбон + свечение + «жидкие» акценты бренда ───────────────────────────── */
.bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(var(--accent-rgb), .18), transparent 60%),
    radial-gradient(700px 480px at -10% 105%, rgba(var(--accent2-rgb), .16), transparent 62%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.022) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, var(--bg), var(--bg2)); }
.bg::before, .bg::after { content: ""; position: absolute; border-radius: 50%; filter: blur(2px); opacity: .9; }
.decor-gold .bg::before { width: 340px; height: 260px; right: -150px; top: -90px; transform: rotate(18deg);
  background: conic-gradient(from 210deg, #7a4a07, #f5b041, #fff1b8, #c5841a, #6d4106, #f5b041, #7a4a07); border-radius: 62% 38% 55% 45%; opacity: .55; }
.decor-gold .bg::after { width: 360px; height: 220px; left: -170px; bottom: -60px; transform: rotate(-16deg);
  background: conic-gradient(from 40deg, #6d4106, #f5b041, #fff1b8, #b9770e, #6d4106); border-radius: 40% 60% 45% 55%; opacity: .5; }
.decor-blue .bg { background:
    radial-gradient(700px 420px at 90% -8%, rgba(var(--accent-rgb), .30), transparent 62%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0/34px 34px, linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0/34px 34px,
    linear-gradient(180deg, var(--bg), var(--bg2)); }
.decor-steel .bg { background:
    radial-gradient(760px 460px at 88% -8%, rgba(var(--accent-rgb), .22), transparent 62%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.03) 0 1px, transparent 1px 12px),
    linear-gradient(180deg, var(--bg), var(--bg2)); }
.decor-cyber .bg::before { width: 380px; height: 300px; right: -160px; top: -110px; background: radial-gradient(circle at 40% 40%, rgba(var(--accent-rgb), .75), rgba(var(--accent2-rgb), .25) 60%, transparent 72%); filter: blur(18px); opacity: .7; }
.decor-cyber .bg::after { width: 360px; height: 280px; left: -170px; bottom: -80px; background: radial-gradient(circle at 60% 50%, rgba(var(--accent2-rgb), .6), rgba(var(--accent-rgb), .2) 62%, transparent 72%); filter: blur(22px); opacity: .6; }
.light .bg { background: radial-gradient(800px 480px at 85% -10%, rgba(var(--accent-rgb), .18), transparent 60%), linear-gradient(180deg, var(--bg), var(--bg2)); }
.light .bg::before, .light .bg::after { opacity: .25; }

/* ── каркас ───────────────────────────────────────────────────────────────── */
#app { max-width: 460px; margin: 0 auto; padding: 14px 14px 118px; }
#app.has-preview { padding-top: 100px; }
.screen { animation: rise .32s ease both; display: flex; flex-direction: column; gap: 14px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.row { display: flex; align-items: center; gap: 10px; }
.sp { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }

/* ── стеклянная карточка ───────────────────────────────────────────────────── */
.glass { position: relative; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden;
  background: linear-gradient(135deg, var(--card-hi), var(--card-lo)); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), var(--shadow), 0 0 28px -10px var(--glow); }
.glass::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, var(--sheen) 47%, transparent 60%); }
.glass > * { position: relative; }
.glass.hud { padding-top: 30px; padding-bottom: 28px; }
.hud-c { position: absolute !important; font-size: 9.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 5px; white-space: nowrap; z-index: 2; }
.hud-c.tl { top: 10px; left: 14px; } .hud-c.tr { top: 10px; right: 14px; } .hud-c.bl { bottom: 8px; left: 14px; } .hud-c.br { bottom: 8px; right: 14px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: pulse 1.8s infinite; display: inline-block; }
.dot.blue { background: #3aa0ff; box-shadow: 0 0 8px #3aa0ff; }
.dot.red { background: var(--bad); box-shadow: 0 0 8px var(--bad); animation: none; }
@keyframes pulse { 50% { opacity: .35; } }
.glass.sel { border-color: var(--accent); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), var(--shadow), 0 0 0 1px var(--accent), 0 0 34px -4px var(--glow); }

/* ── заголовки в стиле баннеров ─────────────────────────────────────────────── */
.t2 { display: flex; flex-direction: column; line-height: .95; font-weight: 900; text-transform: uppercase; letter-spacing: .01em; }
.t2 .a { font-size: 34px; background: linear-gradient(180deg, var(--ta1), var(--ta2)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.55)) drop-shadow(0 0 14px rgba(var(--accent2-rgb), .25)); }
.t2 .b { font-size: 34px; color: var(--accent); text-shadow: 0 0 6px rgba(var(--accent-rgb), .9), 0 0 22px rgba(var(--accent-rgb), .55), 0 2px 0 rgba(0,0,0,.4); }
.light .t2 .a { filter: none; } .light .t2 .b { text-shadow: 0 0 14px rgba(var(--accent-rgb), .35); }
.banner { width: 100%; display: block; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 0 26px -8px var(--glow); }
.screen-head { display: flex; align-items: center; gap: 12px; padding: 4px 2px 0; }
.back { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); display: grid; place-items: center; font-size: 18px; }

/* ── кнопки ───────────────────────────────────────────────────────────────── */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 12px 18px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--glass); color: var(--text); font-weight: 700; transition: transform .12s, box-shadow .2s, filter .2s; text-align: center; }
.btn:active { transform: scale(.975); }
.btn.primary { border: 0; color: var(--ink); background: linear-gradient(135deg, var(--accent), rgba(var(--accent-rgb), .72)); box-shadow: 0 8px 26px -6px rgba(var(--accent-rgb), .65), inset 0 1px 0 rgba(255,255,255,.45); }
.btn.gold { border: 0; color: #2a1800; background: linear-gradient(135deg, #ffe08a, #f5b041 55%, #c98618); box-shadow: 0 8px 26px -6px rgba(var(--accent2-rgb), .6), inset 0 1px 0 rgba(255,255,255,.6); }
.btn.lg { min-height: 58px; font-size: 17px; font-weight: 800; border-radius: 18px; }
.btn.sm { min-height: 38px; padding: 8px 12px; font-size: 13px; width: auto; border-radius: 12px; }
.btn.neon { animation: neon 2.2s ease-in-out infinite; }
@keyframes neon { 50% { box-shadow: 0 0 0 1px var(--accent), 0 0 40px 2px rgba(var(--accent-rgb), .75), inset 0 1px 0 rgba(255,255,255,.5); } }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.danger { color: var(--bad); border-color: rgba(255,77,109,.5); }
.link { background: none; border: 0; color: var(--accent); padding: 6px; font-weight: 600; }

/* ── бейджи / чипы ──────────────────────────────────────────────────────── */
.badge-gold { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 900; letter-spacing: .04em; color: #3a2300;
  background: linear-gradient(180deg, #fff0b3, #f5b041 50%, #c98618); box-shadow: inset 0 1px 0 rgba(255,255,255,.8), inset 0 -2px 0 rgba(120,70,0,.35), 0 3px 10px -2px rgba(var(--accent2-rgb), .6); white-space: nowrap; }
.badge-ok { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #04210f; background: linear-gradient(180deg, #5af0a6, #19c76d); box-shadow: 0 3px 10px -3px rgba(25,224,138,.7); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid var(--line); background: var(--glass); white-space: nowrap; }
.stars { color: #ffc93c; letter-spacing: 1px; text-shadow: 0 0 10px rgba(255,201,60,.6); }

/* ── hero ─────────────────────────────────────────────────────────────────── */
.hero { padding-bottom: 20px; }
.hero .avatar { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .14), 0 0 34px rgba(var(--accent-rgb), .55); background: var(--bg2); flex: none; }
.hero .mascot { position: absolute !important; right: -6px; bottom: 0; height: 168px; width: auto; filter: drop-shadow(0 8px 22px rgba(0,0,0,.6)); pointer-events: none; z-index: 1; }
.hero h1 { font-size: 25px; line-height: 1.08; font-weight: 900; margin: 12px 0 6px; max-width: 78%; }
.hero.has-mascot h1, .hero.has-mascot .feats { max-width: 62%; }
.feats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.avatar-fallback { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 30px; border: 2px solid var(--accent);
  background: radial-gradient(circle at 30% 25%, rgba(var(--accent-rgb), .5), rgba(var(--accent2-rgb), .25)); box-shadow: 0 0 34px rgba(var(--accent-rgb), .5); flex: none; color: var(--text); }

/* ── тарифы ───────────────────────────────────────────────────────────────── */
.plan { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer; padding: 16px; }
.plan .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; transition: .2s; }
.sel .radio { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 14px var(--glow); }
.sel .radio::after { content: "✓"; color: var(--ink); font-size: 13px; font-weight: 900; }
.plan .name { font-size: 17px; font-weight: 800; }
.plan .price { font-size: 21px; font-weight: 900; }
.plan .per { font-size: 12px; color: var(--muted); }
.plan .save { color: var(--ok); font-weight: 700; font-size: 12px; }
.plan .tag { position: absolute !important; top: 0; right: 0; border-radius: 0 var(--radius) 0 14px; padding: 4px 12px; font-size: 11px; font-weight: 900; z-index: 3; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 36px; height: 36px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); font-size: 20px; font-weight: 800; }
.stepper b { min-width: 22px; text-align: center; font-size: 18px; }
.cta-bar { position: fixed; left: 0; right: 0; bottom: 66px; z-index: 30; padding: 10px 14px 6px; max-width: 460px; margin: 0 auto;
  background: linear-gradient(180deg, transparent, rgba(var(--bg-rgb), .92) 40%); display: flex; flex-direction: column; gap: 8px; }

/* ── строки сводки ──────────────────────────────────────────────────────── */
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed rgba(255,255,255,.08); }
.kv:last-child { border-bottom: 0; }
.light .kv { border-bottom-color: rgba(0,0,0,.08); }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 700; text-align: right; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; font-size: 18px; font-weight: 900; }
.total .v { color: var(--accent2); font-size: 28px; text-shadow: 0 0 18px rgba(var(--accent2-rgb), .45); }

.method { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border-radius: 16px; border: 1px solid rgba(255,255,255,.1); background: var(--glass); text-align: left; transition: .2s; }
.light .method { border-color: rgba(0,0,0,.1); }
.method.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 24px -6px var(--glow); }
.method .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; background: rgba(255,255,255,.07); flex: none; }

/* ── мастер подключения ──────────────────────────────────────────────────── */
.steps { display: flex; gap: 6px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.12); }
.steps i.on { background: var(--accent); box-shadow: 0 0 10px var(--glow); }
.osgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.osbtn { padding: 14px 6px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass); display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; }
.osbtn.on { border-color: var(--accent); box-shadow: 0 0 22px -4px var(--glow); }
.osbtn .e { font-size: 26px; }
.stores { display: grid; gap: 10px; }
details.spoiler { border: 1px solid var(--line); border-radius: 16px; background: var(--glass); padding: 0 14px; }
details.spoiler summary { padding: 13px 0; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
details.spoiler summary::after { content: "▾"; color: var(--accent); }
details.spoiler[open] summary::after { content: "▴"; }
details.spoiler ol { margin: 0 0 12px; padding-left: 20px; color: var(--muted); font-size: 13.5px; }
details.spoiler li { margin: 4px 0; }

/* ── кабинет ──────────────────────────────────────────────────────────────── */
.seg { display: flex; padding: 4px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); gap: 4px; }
.seg button { flex: 1; border: 0; background: none; padding: 10px 6px; border-radius: 12px; font-weight: 700; color: var(--muted); transition: .2s; }
.seg button.on { background: linear-gradient(135deg, var(--accent), rgba(var(--accent-rgb), .7)); color: var(--ink); box-shadow: 0 4px 16px -4px rgba(var(--accent-rgb), .7); }
.dev { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed rgba(255,255,255,.08); }
.dev:last-child { border-bottom: 0; }
.dev .ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; background: rgba(var(--accent-rgb), .12); border: 1px solid var(--line); flex: none; }
.dev .x { width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255,77,109,.45); background: rgba(255,77,109,.08); color: var(--bad); font-size: 15px; font-weight: 800; flex: none; }
.progress { height: 8px; border-radius: 8px; background: rgba(255,255,255,.1); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--accent), var(--accent2)); box-shadow: 0 0 12px var(--glow); }
.gift { background: linear-gradient(135deg, rgba(var(--accent2-rgb), .22), rgba(var(--accent-rgb), .10)); }
.gift .big { font-size: 38px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.5)); }
.field { width: 100%; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--text); font: inherit; outline: none; }
.light .field { background: rgba(255,255,255,.8); }
.field:focus { box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .45); }
.stat { text-align: center; }
.stat b { display: block; font-size: 22px; font-weight: 900; color: var(--accent); }
.copybox { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 14px; background: rgba(0,0,0,.25); border: 1px dashed var(--line); font-size: 12.5px; word-break: break-all; }
.light .copybox { background: rgba(255,255,255,.7); }
.qr { background: #fff; padding: 12px; border-radius: 18px; width: 208px; height: 208px; margin: 0 auto; box-shadow: 0 0 40px -6px var(--glow); }
.qr svg { width: 100%; height: 100%; display: block; }

/* ── нижнее меню / панель теста / тосты ───────────────────────────────────────── */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-width: 460px; margin: 0 auto; display: flex; padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(var(--bg-rgb), .86); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-top: 1px solid var(--line); }
.nav button { flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; color: var(--muted); font-size: 11px; font-weight: 700; }
.nav button .e { font-size: 21px; }
.nav button.on { color: var(--accent); text-shadow: 0 0 14px var(--glow); }
.preview { position: fixed; top: 0; left: 0; right: 0; z-index: 60; max-width: 460px; margin: 0 auto; padding: 8px 10px; background: rgba(var(--bg-rgb), .9);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.preview .lbl { font-size: 9.5px; letter-spacing: .14em; color: var(--muted); font-weight: 800; }
.preview .brands { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 5px 0 1px; }
.preview .brands::-webkit-scrollbar { display: none; }
.pb { flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); font-size: 12px; font-weight: 800; color: var(--text); }
.pb i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-shadow: 0 0 8px currentColor; }
.pb.on { border-color: var(--accent); box-shadow: 0 0 16px -2px var(--glow); }
.swatches { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; padding-top: 6px; }
.sw { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); padding: 0; }
.sw.on { border-color: #fff; box-shadow: 0 0 0 2px var(--bg), 0 0 14px currentColor; transform: scale(1.12); }
.toast { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); z-index: 100; background: rgba(20,24,32,.96); color: #fff; padding: 11px 18px; border-radius: 14px; border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 24px -6px var(--glow); font-weight: 600; font-size: 14px; max-width: 88%; text-align: center; animation: rise .25s both; }
.sheet-bg { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 460px; background: var(--bg2); border-radius: 24px 24px 0 0; border: 1px solid var(--line); padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; animation: rise .25s; }
.empty { padding: 26px 10px; text-align: center; color: var(--muted); }
.hr { height: 1px; background: rgba(255,255,255,.08); margin: 6px 0; }
.demo-note { font-size: 11px; color: var(--muted); text-align: center; padding: 4px 0; }
.skeleton { height: 120px; border-radius: 20px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.1), rgba(255,255,255,.04)); background-size: 200% 100%; animation: sh 1.2s infinite; }
@keyframes sh { to { background-position: -200% 0; } }
@media (min-width: 700px) { body { background-attachment: fixed; } #app { margin-top: 10px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
