/* Fursov Hub — Mini App витрина. Тёмная фирменная тема. */
:root{
  --ink:#0f0f13; --surface:#17171d; --surface-2:#1e1e26; --raised:#25252f;
  --line:#2a2a34; --line-2:#34343f;
  --text:#f4f5f7; --muted:#9a9aa7; --dim:#6b6b78;
  --signal:#b8f24a; --signal-2:#a6e63a; --on-signal:#101014;
  --ok:#6ee787; --warn:#ffc24b; --bad:#ff6b6b; --teal:#54d3c6;
  --clay:#e9927a; --slate:#93a4b8;
  --sans:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
/* светлая тема — переопределяем только переменные (весь UI на var()) */
:root[data-theme="light"]{
  --ink:#eef0f4; --surface:#ffffff; --surface-2:#f4f6f9; --raised:#e9ecf1;
  --line:#e4e7ee; --line-2:#d3d7e0;
  --text:#191b21; --muted:#666b78; --dim:#9aa0ad;
  --signal:#5a9e00; --signal-2:#4e8a00; --on-signal:#ffffff;
  --ok:#2a9d4e; --warn:#bd7f0a; --bad:#e04a44; --teal:#189a8d;
}
*{ box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body{ margin:0; height:100%; }
body{ font-family:var(--sans); background:var(--ink); color:var(--text); overscroll-behavior:none;
  -webkit-font-smoothing:antialiased; }
#app{ display:flex; flex-direction:column; height:100vh; height:100dvh; max-width:560px; margin:0 auto; }
.tnum{ font-variant-numeric:tabular-nums; }
button{ font-family:inherit; cursor:pointer; border:0; background:none; color:inherit; }

.boot{ flex:1; display:grid; place-items:center; }
.spinner{ width:34px; height:34px; border-radius:50%; border:3px solid var(--line-2); border-top-color:var(--signal);
  animation:spin .8s linear infinite; }
@keyframes spin{ to{ transform:rotate(360deg); } }

/* topbar — отдельный блок-шапка с разделителем */
.topbar{ display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:calc(env(safe-area-inset-top) + 12px) 14px 12px; background:var(--surface);
  border-bottom:1px solid var(--line); box-shadow:0 1px 0 rgba(0,0,0,.15); }
.t-brand{ display:flex; align-items:center; gap:9px; font-weight:750; font-size:16px; letter-spacing:-.2px;
  min-width:0; overflow:hidden; white-space:nowrap; }
.t-brand .dot{ width:32px; height:32px; flex:0 0 auto; display:block; color:var(--signal); }
.t-brand .dot svg{ width:100%; height:100%; display:block; }
/* фон-плашка лого — тёмный оттенок акцента (тонировка) */
.t-brand .dot svg .lg-a{ stop-color:color-mix(in srgb, var(--signal) 16%, #101014); }
.t-brand .dot svg .lg-b{ stop-color:color-mix(in srgb, var(--signal) 6%, #0c0c0f); }
.t-right{ display:flex; align-items:center; gap:7px; flex:0 0 auto; }
.lang-btn{ width:34px; height:34px; display:grid; place-items:center; background:var(--raised);
  border:1px solid var(--line); border-radius:10px; flex:0 0 auto; padding:0; overflow:hidden; }
.lang-btn svg{ width:22px; height:auto; border-radius:3px; display:block; }
.lang-btn:active{ background:var(--surface-2); }
.theme-btn{ width:34px; height:34px; display:grid; place-items:center; color:var(--muted); background:var(--raised);
  border:1px solid var(--line); border-radius:10px; flex:0 0 auto; }
.theme-btn svg{ width:18px; height:18px; }
.theme-btn:active{ background:var(--surface-2); }
.bal{ display:flex; align-items:center; gap:6px; background:var(--raised); border:1px solid var(--line);
  padding:0 6px 0 11px; height:34px; border-radius:11px; font-size:12.5px; white-space:nowrap; }
.bal > span:first-child{ color:var(--muted); }
.bal b{ font-variant-numeric:tabular-nums; }
.bal:active{ background:var(--surface-2); }
.bal-plus{ width:20px; height:20px; border-radius:50%; background:var(--signal); color:var(--on-signal);
  display:grid; place-items:center; flex:0 0 auto; }
.bal-plus svg{ width:13px; height:13px; }

/* scroll area */
.scroll{ flex:1; overflow-y:auto; overflow-x:hidden; padding:4px 14px 20px; -webkit-overflow-scrolling:touch; }
.scroll::-webkit-scrollbar{ display:none; }
.head{ font-size:22px; font-weight:800; letter-spacing:-.5px; margin:4px 2px 14px; }

.promo{ display:flex; align-items:center; gap:10px; padding:12px 14px; border-radius:14px; margin:2px 0 16px;
  background:linear-gradient(100deg, color-mix(in srgb,var(--signal) 15%,var(--surface)), var(--surface));
  border:1px solid color-mix(in srgb,var(--signal) 20%,var(--line)); font-size:12.5px; color:#e0e7d2; }
.promo-ic{ width:20px; height:20px; flex:0 0 auto; color:var(--signal); display:flex; align-items:center; }
.promo-ic svg{ width:100%; height:100%; }
:root[data-theme="light"] .promo{ color:#2d3d12; }

/* product cards */
.cards{ display:flex; flex-direction:column; gap:11px; }
.card{ display:flex; align-items:center; gap:13px; padding:13px; border-radius:16px; background:var(--surface);
  border:1px solid var(--line); transition:transform .06s; }
.card:active{ transform:scale(.985); }
.card.out{ opacity:.5; }
.glyph{ width:47px; height:47px; border-radius:13px; display:grid; place-items:center; font-weight:800; font-size:19px;
  color:#0d0d10; flex:0 0 auto; }
.g-claude{ background:linear-gradient(150deg,#f0a58e,#d97a5f); }
.g-grok{ background:linear-gradient(150deg,#aab8c9,#7f92a8); }
.g-perplexity{ background:linear-gradient(150deg,#6fe0d3,#33b7ab); }
.g-chatgpt,.g-default{ background:linear-gradient(150deg,#b8f24a,#7dd11f); }
.glyph.gimg{ padding:0; overflow:hidden; background:var(--surface-2); }
.glyph.gimg img{ width:100%; height:100%; object-fit:cover; }
.disc{ display:inline-block; font-size:10px; padding:2px 7px; border-radius:20px; margin-top:4px;
  background:color-mix(in srgb,var(--signal) 15%,transparent); color:var(--signal); }
.disc-list{ margin:14px 2px 2px; padding:12px 14px; border-radius:13px; background:var(--surface); border:1px solid var(--line); }
.disc-list .dl-h{ font-size:12px; color:var(--muted); margin-bottom:8px; }
.dl-ic{ display:inline-flex; width:15px; height:15px; vertical-align:-3px; margin-right:5px; color:var(--signal); }
.dl-ic svg{ width:100%; height:100%; }
.disc-list .dt{ display:flex; justify-content:space-between; padding:5px 0; font-size:13px; }
.disc-list .dt b{ color:var(--signal); }
.strike{ text-decoration:line-through; color:var(--dim); font-size:11px; margin-right:5px; }
.c-body{ flex:1; min-width:0; }
.c-title{ font-size:14.5px; font-weight:650; letter-spacing:-.2px; }
.c-sub{ font-size:11.5px; color:var(--muted); margin-top:2px; }
.c-right{ text-align:right; flex:0 0 auto; }
.c-price{ font-size:15px; font-weight:750; }
.badge{ display:inline-block; margin-top:4px; font-size:10px; padding:2px 8px; border-radius:20px; }
.b-ok{ background:color-mix(in srgb,var(--ok) 16%,transparent); color:var(--ok); }
.b-low{ background:color-mix(in srgb,var(--warn) 16%,transparent); color:var(--warn); }
.b-out{ background:color-mix(in srgb,var(--bad) 14%,transparent); color:var(--bad); }

/* product view */
.back{ display:inline-flex; align-items:center; gap:5px; color:var(--muted); font-size:14px; padding:6px 2px 12px; }
.p-hero{ display:flex; gap:14px; align-items:center; }
.p-hero .glyph{ width:60px; height:60px; border-radius:16px; font-size:24px; }
.p-hero h2{ margin:0; font-size:21px; letter-spacing:-.4px; }
.p-price{ display:flex; align-items:baseline; gap:11px; margin:18px 2px 4px; }
.p-price .big{ font-size:27px; font-weight:800; }
.p-desc{ font-size:13px; color:var(--muted); margin:12px 2px; line-height:1.55; }
.opt-label{ font-size:11px; text-transform:uppercase; letter-spacing:1.5px; color:var(--dim); margin:18px 2px 10px; }
.plans{ display:flex; flex-wrap:wrap; gap:8px; margin:0 2px; }
.planbtn{ padding:11px 15px; border-radius:12px; background:var(--surface); border:1px solid var(--line); font-size:13px; font-weight:600; }
.planbtn.sel{ border-color:var(--signal); box-shadow:0 0 0 1px var(--signal); color:var(--signal); background:color-mix(in srgb,var(--signal) 8%,var(--surface)); }
.opt{ display:flex; gap:12px; align-items:center; padding:14px; border-radius:14px; background:var(--surface);
  border:1px solid var(--line); margin-bottom:10px; }
.opt.sel{ border-color:var(--signal); background:color-mix(in srgb,var(--signal) 9%,var(--surface)); box-shadow:0 0 0 1px var(--signal); }
.opt .oi{ width:36px; height:36px; border-radius:11px; display:grid; place-items:center; font-size:17px; background:var(--raised); flex:0 0 auto; color:var(--muted); }
.opt .oi svg{ width:20px; height:20px; }
.opt.sel .oi{ color:var(--signal); }
.opt .ot{ flex:1; } .opt .ot b{ font-size:14px; } .opt .ot span{ display:block; font-size:11.5px; color:var(--muted); margin-top:2px; }
.opt .chk{ width:22px; height:22px; border-radius:50%; border:2px solid var(--line-2); flex:0 0 auto; }
.opt.sel .chk{ border-color:var(--signal); background:var(--signal); box-shadow:inset 0 0 0 4px var(--surface); }
.acc{ margin:4px 2px 2px; }
.acc label{ font-size:12px; color:var(--muted); display:block; margin-bottom:7px; }
.acc input{ width:100%; background:var(--surface); border:1px solid var(--line-2); border-radius:12px; color:var(--text);
  font-size:14px; padding:13px; font-family:inherit; }
.acc input:focus{ outline:2px solid color-mix(in srgb,var(--signal) 50%,transparent); border-color:var(--signal); }
.acc .hint{ font-size:11.5px; color:var(--dim); margin-top:7px; }

/* инструкция «данные для активации» (redeem) */
.act-guide{ margin:4px 2px 12px; padding:12px 13px; border-radius:13px;
  background:color-mix(in srgb,var(--signal) 7%,var(--surface)); border:1px solid color-mix(in srgb,var(--signal) 22%,var(--line)); }
.ag-head{ display:flex; align-items:center; gap:8px; cursor:pointer; }
.ag-title{ font-size:13.5px; font-weight:700; color:var(--text); flex:1; }
.ag-ch{ display:inline-flex; opacity:.7; transition:transform .18s; }
.ag-ch svg{ width:16px; height:16px; }
.ag-ch.op{ transform:rotate(90deg); }
.ag-intro{ font-size:12.5px; color:var(--muted); margin-top:6px; line-height:1.45; }
.ag-body{ margin-top:10px; }
.ag-warn{ font-size:12px; line-height:1.5; color:var(--warn); background:color-mix(in srgb,var(--warn) 10%,transparent);
  border:1px solid color-mix(in srgb,var(--warn) 24%,transparent); border-radius:10px; padding:9px 11px; margin-bottom:11px; }
.ag-sh{ font-size:10.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--dim); font-weight:700; margin-bottom:6px; }
.ag-steps{ margin:0 0 2px; padding-left:20px; }
.ag-steps li{ font-size:13px; line-height:1.55; color:var(--text); margin-bottom:4px; }
.ag-link{ color:var(--signal); font-weight:600; text-decoration:underline; text-underline-offset:2px; cursor:pointer; word-break:break-all; }
.ag-foot{ font-size:12.5px; color:var(--muted); margin-top:9px; line-height:1.45; }
.ag-more{ font-size:12.5px; font-weight:600; color:var(--signal); margin-top:10px; cursor:pointer; display:inline-block; }
.qty{ display:flex; align-items:center; justify-content:space-between; margin:16px 2px 2px; padding:12px 15px;
  border-radius:13px; background:var(--surface); border:1px solid var(--line); }
.qty .lab{ font-size:13px; color:var(--muted); }
.stepper{ display:flex; align-items:center; gap:18px; }
.stepper button{ width:32px; height:32px; border-radius:10px; border:1px solid var(--line-2); background:var(--raised); font-size:18px; }
.stepper b{ min-width:18px; text-align:center; font-variant-numeric:tabular-nums; }

/* cart */
.ci{ display:flex; gap:14px; align-items:center; padding:17px 0; border-bottom:1px solid var(--line); }
.ci .glyph{ width:56px; height:56px; border-radius:15px; font-size:22px; flex:0 0 auto; }
.ci .cb{ flex:1; min-width:0; }
.ci .cb .t{ font-size:15.5px; font-weight:600; }
.ci .cb .s{ font-size:12px; color:var(--muted); margin-top:4px; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.tag{ font-size:9.5px; padding:2px 7px; border-radius:20px; background:var(--raised); color:var(--muted); }
.tag.act{ color:var(--signal); background:color-mix(in srgb,var(--signal) 12%,transparent); }
.tag.code{ color:var(--teal); background:color-mix(in srgb,var(--teal) 12%,transparent); }
.ci .mini{ display:flex; align-items:center; gap:12px; margin-top:11px; }
.ci .mini button{ width:31px; height:31px; border-radius:9px; border:1px solid var(--line-2); background:var(--raised); font-size:16px; display:grid; place-items:center; }
.ci .mini .rm{ color:var(--bad); border-color:color-mix(in srgb,var(--bad) 30%,transparent); }
.ci .mini .rm svg{ width:16px; height:16px; }
.ci .cp{ font-weight:750; font-size:15px; font-variant-numeric:tabular-nums; text-align:right; }
.empty{ text-align:center; color:var(--muted); padding:60px 20px; font-size:14px; }
.empty .em-ic{ font-size:40px; display:block; margin-bottom:12px; opacity:.7; }

/* центрированный пустой/анонс-экран (корзина, B2B) */
.scroll-center{ display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; }
.ef{ display:flex; flex-direction:column; align-items:center; padding:20px; max-width:330px; }
.ef-ic{ width:62px; height:62px; color:var(--dim); opacity:.75; margin-bottom:16px; }
.ef-ic.accent{ color:var(--signal); opacity:1; }
.ef-ic svg{ width:100%; height:100%; }
.ef-t{ font-size:19px; font-weight:750; letter-spacing:-.3px; }
.ef-s{ font-size:13.5px; color:var(--muted); margin-top:9px; line-height:1.55; }
.ef-cta{ margin-top:22px; min-width:200px; }
.ef-cta[disabled]{ opacity:.7; box-shadow:none; }
.empty .em-svg{ display:block; width:42px; height:42px; margin:0 auto 12px; color:var(--muted); opacity:.55; }
.empty .em-svg svg{ width:100%; height:100%; }

.totrow{ display:flex; justify-content:space-between; align-items:center; margin:18px 2px 2px; }
.totrow .l{ color:var(--muted); font-size:14px; }
.totrow .v{ font-size:24px; font-weight:800; font-variant-numeric:tabular-nums; }
.link-btn{ display:block; width:100%; text-align:center; color:var(--muted); font-size:13px; padding:12px; margin-top:6px; }

/* корзина — фиксированный нижний блок (итого + оформить + очистить) */
.cart-foot{ padding:14px 14px 12px; border-top:1px solid var(--line); background:var(--ink); }
.cart-foot .totrow{ margin:0 2px 12px; }
.clear-btn{ display:flex; align-items:center; justify-content:center; gap:7px; width:100%; margin-top:10px; padding:11px;
  border-radius:12px; color:var(--muted); background:var(--surface); border:1px solid var(--line); font-size:13px; }
.clear-btn:active{ background:var(--surface-2); }
.clear-btn svg{ width:15px; height:15px; }

/* payment */
.pays{ display:grid; grid-template-columns:1fr 1fr; gap:9px; margin-top:4px; }
.pay{ display:flex; align-items:center; gap:8px; padding:14px; border-radius:13px; background:var(--surface);
  border:1px solid var(--line); font-size:13px; }
.pay.sel{ border-color:var(--signal); box-shadow:0 0 0 1px var(--signal); background:color-mix(in srgb,var(--signal) 8%,var(--surface)); }

/* заголовок с иконкой */
.head-ic{ display:inline-block; width:22px; height:22px; vertical-align:-3px; margin-right:8px; color:var(--signal); }
.head-ic svg{ width:100%; height:100%; display:block; }

/* orders — список */
.orow{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px; border-radius:16px;
  background:var(--surface); border:1px solid var(--line); margin-bottom:10px; }
.orow-l{ min-width:0; display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
.orow .on{ font-family:ui-monospace,Menlo,monospace; font-size:13px; color:var(--text); }
.orow-meta{ font-size:11px; color:var(--dim); }
.orow-r{ display:flex; align-items:center; gap:8px; flex:0 0 auto; }
.orow .ot{ font-weight:750; font-variant-numeric:tabular-nums; font-size:16px; }
.chev{ width:17px; height:17px; color:var(--dim); display:flex; flex:0 0 auto; }
.chev svg{ width:100%; height:100%; }

.pill{ font-size:11px; padding:3px 10px 3px 8px; border-radius:20px; display:inline-flex; align-items:center; gap:4px; font-weight:600; }
.pill-ic{ width:13px; height:13px; display:inline-flex; flex:0 0 auto; }
.pill-ic svg{ width:100%; height:100%; }
.pill.done{ background:color-mix(in srgb,var(--ok) 16%,transparent); color:var(--ok); }
.pill.wait{ background:color-mix(in srgb,var(--warn) 16%,transparent); color:var(--warn); }
.pill.fill{ background:color-mix(in srgb,var(--teal) 16%,transparent); color:var(--teal); }
.pill.bad{ background:color-mix(in srgb,var(--bad) 14%,transparent); color:var(--bad); }
.pill.neutral{ background:var(--raised); color:var(--muted); }

/* orders — деталь */
.od-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin:2px 2px 16px; }
.od-num{ font-family:ui-monospace,Menlo,monospace; font-size:19px; font-weight:800; letter-spacing:-.3px; }
.od-date{ font-size:12px; color:var(--muted); margin-top:3px; }
.od-meta{ background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:2px 16px; margin-bottom:6px; }
.mrow{ display:flex; justify-content:space-between; align-items:center; padding:12px 0; font-size:13.5px; }
.mrow + .mrow{ border-top:1px solid var(--line); }
.mk{ color:var(--muted); }
.mv{ font-weight:600; text-align:right; word-break:break-word; }

.oi-card{ background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:14px; margin-bottom:11px; }
.oi-top{ display:flex; gap:12px; align-items:center; }
.oi-top .glyph{ width:44px; height:44px; border-radius:12px; font-size:17px; }
.oi-info{ flex:1; min-width:0; }
.oi-title{ font-size:14.5px; font-weight:650; }
.oi-type{ display:flex; align-items:center; gap:5px; font-size:11.5px; color:var(--muted); margin-top:4px; }
.oi-type svg{ width:14px; height:14px; flex:0 0 auto; }
.oi-price{ font-weight:750; font-variant-numeric:tabular-nums; flex:0 0 auto; }
.oi-stat{ display:inline-flex; align-items:center; gap:5px; font-size:11.5px; font-weight:650; margin-top:12px; padding:5px 11px 5px 8px; border-radius:20px; }
.oi-stat .pill-ic{ width:13px; height:13px; }
.oi-stat.done{ background:color-mix(in srgb,var(--ok) 15%,transparent); color:var(--ok); }
.oi-stat.bad{ background:color-mix(in srgb,var(--bad) 14%,transparent); color:var(--bad); }
.oi-stat.fill{ background:color-mix(in srgb,var(--teal) 15%,transparent); color:var(--teal); }
.oi-stat.wait, .oi-stat.neutral{ background:var(--raised); color:var(--muted); }
.oi-field{ margin-top:13px; }
.oi-k{ font-size:11px; text-transform:uppercase; letter-spacing:1px; color:var(--dim); display:block; margin-bottom:7px; }
.oi-copy{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 13px; border-radius:11px;
  background:var(--ink); border:1px solid var(--line-2); }
.oi-copy + .oi-copy{ margin-top:7px; }
.oi-copy code{ font-family:ui-monospace,Menlo,monospace; font-size:12.5px; word-break:break-all; line-height:1.45; color:var(--text); }
.oi-copy.code code{ color:var(--signal); font-weight:700; letter-spacing:.5px; }
.oi-copy svg{ width:17px; height:17px; color:var(--signal); flex:0 0 auto; }
.oi-empty{ font-size:12.5px; color:var(--dim); padding:11px 13px; border-radius:11px; background:var(--ink); border:1px dashed var(--line-2); }

/* profile */
.prof-head{ display:flex; align-items:center; gap:14px; margin:6px 2px 18px; }
.avatar{ position:relative; width:56px; height:56px; border-radius:50%; background:linear-gradient(150deg,var(--signal),#7dd11f); color:#0c0c0f;
  font-weight:800; font-size:24px; display:grid; place-items:center; flex:0 0 auto; overflow:hidden; }
.avatar img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; border-radius:inherit; }
.pf-name{ font-size:19px; font-weight:750; letter-spacing:-.3px; }
.pf-user{ font-size:13px; color:var(--muted); margin-top:2px; }

.wallet-card{ border-radius:18px; padding:18px; margin-bottom:6px;
  background:linear-gradient(140deg, color-mix(in srgb,var(--signal) 15%,var(--surface)), var(--surface-2));
  border:1px solid color-mix(in srgb,var(--signal) 22%,var(--line)); }
.wc-top{ display:flex; align-items:center; justify-content:space-between; }
.wc-label{ font-size:12.5px; color:var(--muted); }
.wc-ic{ width:26px; height:26px; color:var(--signal); } .wc-ic svg{ width:100%; height:100%; }
.wc-bal{ font-size:34px; font-weight:800; letter-spacing:-1px; margin-top:4px; font-variant-numeric:tabular-nums; }

.stat3{ display:grid; grid-template-columns:repeat(3,1fr); gap:9px; margin:14px 0 6px; }
.st{ background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:13px 8px; text-align:center; }
.st-v{ font-size:17px; font-weight:800; font-variant-numeric:tabular-nums; letter-spacing:-.3px; }
.st-k{ font-size:10.5px; color:var(--muted); margin-top:3px; }

.txlist{ background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:2px 14px; }
.txrow{ display:flex; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid var(--line); }
.txrow:last-child{ border-bottom:0; }
.txrow.tap{ cursor:pointer; }
.txrow.tap:active{ opacity:.6; }
.tx-ch{ display:inline-flex; color:var(--dim); flex:0 0 auto; margin-left:-2px; }
.tx-ch svg{ width:16px; height:16px; }
.tx-hero{ text-align:center; padding:22px 10px 20px; }
.tx-hero-a{ font-size:34px; font-weight:750; letter-spacing:-1px; }
.tx-hero-a.pos{ color:var(--ok); }
.tx-hero-a.neg{ color:var(--bad); }
.tx-hero-s{ font-size:12.5px; color:var(--muted); margin-top:6px; }
.tx-ic{ width:36px; height:36px; border-radius:11px; display:grid; place-items:center; font-size:16px; flex:0 0 auto; background:var(--raised); color:var(--muted); }
.tx-ic.topup, .tx-ic.refund, .tx-ic.referral_bonus{ background:color-mix(in srgb,var(--ok) 15%,transparent); color:var(--ok); }
.tx-ic.purchase{ background:color-mix(in srgb,var(--bad) 15%,transparent); color:var(--bad); }
.tx-b{ flex:1; min-width:0; }
.tx-t{ font-size:13.5px; font-weight:600; }
.tx-d{ font-size:11px; color:var(--muted); margin-top:2px; }
.tx-a{ font-weight:750; font-variant-numeric:tabular-nums; font-size:14px; }
.tx-a.pos{ color:var(--ok); }
.tx-a.neg{ color:var(--bad); }

.ref-label{ font-size:11px; text-transform:uppercase; letter-spacing:1.3px; color:var(--dim); margin-bottom:8px; }
.ref-code{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 14px; border-radius:12px; background:var(--ink); border:1px dashed var(--line-2); }
.ref-code span{ font-family:ui-monospace,Menlo,monospace; font-size:18px; font-weight:800; letter-spacing:1.5px; color:var(--signal); }
.ref-copy{ font-size:12px; color:var(--muted); padding:7px 11px; border-radius:9px; background:var(--surface); border:1px solid var(--line); white-space:nowrap; }
.ref-enter{ display:flex; gap:8px; }
.ref-enter input{ flex:1; min-width:0; background:var(--ink); border:1px solid var(--line-2); border-radius:11px; color:var(--text); font-size:14px; padding:12px; font-family:ui-monospace,monospace; letter-spacing:1px; }
.ref-done{ margin-top:12px; font-size:13px; color:var(--ok); padding:11px 13px; border-radius:11px; background:color-mix(in srgb,var(--ok) 10%,transparent); border:1px solid color-mix(in srgb,var(--ok) 25%,transparent); }

.pcard-h{ display:flex; align-items:center; gap:9px; font-weight:750; font-size:15px; letter-spacing:-.2px; }
.pc-ic{ width:27px; height:27px; flex:0 0 auto; display:grid; place-items:center; border-radius:8px;
  background:color-mix(in srgb,var(--signal) 14%,transparent); color:var(--signal); }
.pc-ic svg{ width:17px; height:17px; }

.swatches{ display:flex; gap:13px; margin-top:15px; flex-wrap:wrap; }
.sw{ width:40px; height:40px; border-radius:50%; background:var(--sw); flex:0 0 auto;
  box-shadow:inset 0 0 0 1px color-mix(in srgb,#000 14%,transparent); transition:transform .1s; }
.sw:active{ transform:scale(.9); }
.sw.sel{ box-shadow:0 0 0 3px var(--surface), 0 0 0 5px var(--sw); }

/* B2B-кабинет — список ключей */
.keylist{ display:flex; flex-direction:column; gap:8px; }
.keyrow{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 13px; border-radius:11px; background:var(--ink); border:1px solid var(--line-2); }
.key-b{ min-width:0; }
.key-p{ font-family:ui-monospace,Menlo,monospace; font-size:13px; font-weight:700; color:var(--text); }
.key-m{ font-size:11px; color:var(--muted); margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.key-rm{ font-size:12px; color:var(--bad); padding:6px 10px; border-radius:8px; border:1px solid color-mix(in srgb,var(--bad) 30%,transparent); flex:0 0 auto; white-space:nowrap; }
.newkey{ margin-bottom:12px; }

/* B2B — онбординг / мини-регистрация */
.b2b-onb{ text-align:center; padding:14px 6px 8px; }
.b2b-onb-ic{ width:74px; height:74px; margin:6px auto 16px; border-radius:22px; display:grid; place-items:center;
  color:var(--signal); background:color-mix(in srgb,var(--signal) 12%,transparent); }
.b2b-onb-ic svg{ width:38px; height:38px; }
.b2b-onb h2{ margin:0; font-size:22px; letter-spacing:-.4px; }
.b2b-onb p{ color:var(--muted); font-size:13.5px; line-height:1.55; margin:10px 8px 22px; }
.fld{ margin-bottom:14px; }
.fld label{ display:block; font-size:11px; text-transform:uppercase; letter-spacing:1.2px; color:var(--dim); margin-bottom:8px; }
.fld-opt{ text-transform:none; letter-spacing:0; }
.fld input{ width:100%; box-sizing:border-box; background:var(--surface); border:1px solid var(--line-2); border-radius:12px;
  color:var(--text); font-size:14px; padding:13px; }
.fld input:focus{ outline:2px solid color-mix(in srgb,var(--signal) 45%,transparent); border-color:var(--signal); }

/* B2B — шапка кабинета */
.b2b-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin:4px 2px 16px; }
.ph-l{ min-width:0; }
.ph-name{ font-size:21px; font-weight:800; letter-spacing:-.4px; overflow:hidden; text-overflow:ellipsis; }
.ph-link{ display:inline-flex; align-items:center; gap:5px; font-size:12.5px; color:var(--signal); margin-top:5px;
  max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ph-link svg{ width:13px; height:13px; flex:0 0 auto; }
.b2b-badge{ font-size:10.5px; font-weight:700; padding:5px 11px; border-radius:20px; flex:0 0 auto; white-space:nowrap;
  background:color-mix(in srgb,var(--signal) 15%,transparent); color:var(--signal); }

.pcard{ background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:18px; margin-bottom:14px; }
.prow{ display:flex; justify-content:space-between; align-items:center; padding:9px 0; font-size:13.5px; }
.prow + .prow{ border-top:1px solid var(--line); }
.prow .k{ color:var(--muted); }
.reflink{ display:flex; gap:8px; margin-top:10px; }
.reflink input{ flex:1; background:var(--ink); border:1px solid var(--line-2); border-radius:11px; color:var(--muted);
  font-size:11.5px; padding:11px; font-family:ui-monospace,monospace; }

/* CTA + tabbar */
.cta-wrap{ padding:12px 14px calc(env(safe-area-inset-bottom) + 12px); border-top:1px solid var(--line); background:var(--ink); }
.cta{ width:100%; padding:15px; border-radius:14px; background:var(--signal); color:var(--on-signal); font-weight:750;
  font-size:15px; display:flex; align-items:center; justify-content:center; gap:8px; box-shadow:0 8px 24px color-mix(in srgb,var(--signal) 26%,transparent); }
.cta svg{ width:18px; height:18px; flex:0 0 auto; }
.cta:active{ background:var(--signal-2); }
.cta.dim{ background:var(--raised); color:var(--muted); box-shadow:none; }

.tabbar{ display:flex; justify-content:space-around; padding:9px 6px calc(env(safe-area-inset-bottom) + 12px);
  border-top:1px solid var(--line); background:var(--ink); }
.tab{ display:flex; flex-direction:column; align-items:center; gap:3px; font-size:10px; color:var(--dim); flex:1; position:relative; }
.tab.on{ color:var(--signal); }
.tab .ic{ width:23px; height:23px; }
.tab .ic svg{ width:100%; height:100%; display:block; }
.tab .cnt{ position:absolute; top:-4px; right:calc(50% - 22px); background:var(--signal); color:var(--on-signal);
  font-size:9px; font-weight:800; min-width:16px; height:16px; border-radius:9px; display:grid; place-items:center; padding:0 4px; }

/* toast */
.toast{ position:fixed; left:50%; bottom:88px; transform:translateX(-50%) translateY(20px); opacity:0; pointer-events:none;
  background:var(--raised); color:var(--text); border:1px solid var(--line-2); padding:11px 18px; border-radius:12px;
  font-size:13px; transition:.2s; z-index:50; max-width:88%; text-align:center; }
.toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }
.toast.err{ border-color:color-mix(in srgb,var(--bad) 45%,transparent); }

.success{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:30px; }
.success .big-ic{ width:92px; height:92px; border-radius:50%; display:grid; place-items:center; margin-bottom:20px;
  background:color-mix(in srgb,var(--signal) 13%,transparent); color:var(--signal); }
.success .big-ic svg{ width:44px; height:44px; }
.success .big-ic.ok{ background:color-mix(in srgb,var(--ok) 14%,transparent); color:var(--ok); }
.success h2{ margin:0 0 8px; font-size:22px; }
.success p{ color:var(--muted); font-size:14px; margin:0 0 6px; line-height:1.5; }
.success .onum{ font-family:ui-monospace,monospace; color:var(--signal); }

/* payment method cards */
.pays2{ display:flex; flex-direction:column; gap:10px; }
.paym{ display:flex; align-items:center; gap:13px; padding:14px; border-radius:14px; background:var(--surface); border:1px solid var(--line); }
.paym.sel{ border-color:var(--signal); box-shadow:0 0 0 1px var(--signal); background:color-mix(in srgb,var(--signal) 7%,var(--surface)); }
.paym.dis{ opacity:.5; }
.paym .m-ic{ width:30px; height:30px; flex:0 0 auto; color:var(--signal); }
.paym .m-ic svg{ width:100%; height:100%; display:block; }
.paym .m-body{ flex:1; min-width:0; }
.paym .m-label{ font-size:14px; font-weight:650; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.paym .m-sub{ font-size:11.5px; color:var(--muted); margin-top:2px; }
.m-badge{ font-size:9px; font-weight:800; padding:2px 8px; border-radius:20px; background:var(--signal); color:var(--on-signal); text-transform:uppercase; letter-spacing:.4px; }
.m-soon{ font-size:11px; color:var(--dim); flex:0 0 auto; }
.paym .m-check{ width:22px; height:22px; border-radius:50%; border:2px solid var(--line-2); flex:0 0 auto; }
.paym.sel .m-check{ border-color:var(--signal); background:var(--signal); box-shadow:inset 0 0 0 4px var(--surface); }
.paym.dis .m-check{ display:none; }

/* top-up amount */
.amt-input{ display:flex; align-items:center; gap:6px; background:var(--surface); border:1px solid var(--line-2); border-radius:16px; padding:4px 18px; margin:4px 2px 14px; }
.amt-input .cur{ font-size:26px; color:var(--muted); }
.amt-input input{ flex:1; background:transparent; border:0; color:var(--text); font-size:30px; font-weight:800; padding:12px 0; outline:none; width:100%; -moz-appearance:textfield; appearance:textfield; }
.amt-input input::-webkit-outer-spin-button,
.amt-input input::-webkit-inner-spin-button{ -webkit-appearance:none; appearance:none; margin:0; }
.quick{ display:flex; gap:8px; flex-wrap:wrap; margin:0 2px 16px; }
.quickb{ padding:9px 16px; border-radius:11px; background:var(--surface); border:1px solid var(--line); font-size:13px; font-weight:600; }
.quickb.sel{ border-color:var(--signal); color:var(--signal); }

/* payment screen */
.pay-timer{ display:flex; align-items:center; justify-content:center; gap:6px; font-size:14px; color:var(--warn); font-variant-numeric:tabular-nums; margin:2px 0 14px; font-weight:600; }
.pt-ic{ display:inline-flex; }
.pt-ic svg{ width:15px; height:15px; display:block; }
.qrbox{ background:#fff; border-radius:16px; padding:12px; width:250px; margin:0 auto 18px; }
.qrbox svg,.qrbox img{ width:100%; height:auto; display:block; aspect-ratio:1/1; }
.pay-field{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 14px; border-radius:13px;
  background:var(--surface); border:1px solid var(--line); margin-bottom:10px; }
.pay-field .k{ font-size:11px; color:var(--muted); display:block; margin-bottom:3px; }
.pay-field b{ font-size:14px; }
.pay-field .addr{ font-family:ui-monospace,monospace; font-size:12px; word-break:break-all; line-height:1.4; }
.pay-field.copy{ cursor:pointer; }
.pay-field .cp-ic{ color:var(--signal); flex:0 0 auto; display:inline-flex; }
.pay-field .cp-ic svg{ width:18px; height:18px; display:block; }
.pay-note{ font-size:12px; color:var(--muted); line-height:1.5; margin-top:6px; padding:12px 14px; border-radius:12px;
  background:color-mix(in srgb,var(--signal) 8%,var(--surface)); border:1px solid color-mix(in srgb,var(--signal) 18%,var(--line)); }
.pay-hosted{ display:flex; flex-direction:column; align-items:center; text-align:center; gap:9px; padding:24px 18px 20px; margin:2px 0 12px;
  border-radius:16px; background:var(--surface); border:1px solid var(--line); }
.pay-hosted .ph-logo{ width:54px; height:54px; }
.pay-hosted .ph-logo svg{ width:100%; height:100%; display:block; }
.pay-hosted .ph-amount{ font-size:30px; font-weight:750; letter-spacing:-0.5px; line-height:1; }
.pay-hosted .ph-sub{ font-size:12px; color:var(--muted); margin-top:-3px; }
.pay-hosted .cta{ width:100%; margin-top:4px; }
.coins{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.coin{ display:flex; align-items:center; gap:11px; padding:12px 12px; border-radius:14px; background:var(--surface); border:1px solid var(--line); text-align:left; cursor:pointer; }
.coin:active{ border-color:var(--signal); background:color-mix(in srgb,var(--signal) 6%,var(--surface)); }
.coin-ic{ width:38px; height:38px; border-radius:50%; overflow:hidden; flex:0 0 auto; }
.coin-ic svg{ width:38px; height:38px; display:block; }
.coin-b{ display:flex; flex-direction:column; min-width:0; }
.coin-b b{ font-size:14px; line-height:1.15; }
.coin-b span{ font-size:11px; color:var(--muted); }
.p-warranty{ display:flex; align-items:center; gap:8px; font-size:13px; color:var(--ok); background:color-mix(in srgb,var(--ok) 10%,transparent); border:1px solid color-mix(in srgb,var(--ok) 22%,transparent); border-radius:12px; padding:11px 13px; margin:14px 0 4px; font-weight:600; }
.p-warranty .dl-ic{ display:inline-flex; }
.p-warranty svg{ width:17px; height:17px; }
.p-warranty.tap{ cursor:pointer; }
.p-warranty.tap .warr-ch{ margin-left:auto; display:inline-flex; transition:transform .18s; opacity:.7; }
.p-warranty.tap .warr-ch svg{ width:16px; height:16px; }
.p-warranty.tap .warr-ch.op{ transform:rotate(90deg); }
.p-warr-info{ font-size:13px; line-height:1.5; color:var(--muted); background:color-mix(in srgb,var(--ok) 5%,transparent); border:1px solid color-mix(in srgb,var(--ok) 15%,transparent); border-top:0; border-radius:0 0 12px 12px; padding:11px 13px 13px; margin:-4px 0 4px; white-space:pre-wrap; }
.totrow.sub{ padding:7px 2px; font-size:13px; }
.totrow.sub .l,.totrow.sub .v{ color:var(--muted); font-weight:500; }
.totrow.sub.disc .l,.totrow.sub.disc .v{ color:var(--ok); }
.promo-row{ display:flex; gap:8px; margin:14px 0 4px; }
.promo-row input{ flex:1; min-width:0; background:var(--surface); border:1px solid var(--line-2); border-radius:12px; color:var(--text); font-size:14px; padding:12px 13px; text-transform:uppercase; }
.promo-row input:focus{ outline:none; border-color:var(--signal); }
.promo-btn{ background:var(--raised); border:1px solid var(--line-2); color:var(--text); font-weight:600; font-size:13px; padding:0 16px; border-radius:12px; }
.promo-on{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin:14px 0 4px; padding:11px 14px; border-radius:12px; background:color-mix(in srgb,var(--ok) 12%,transparent); border:1px solid color-mix(in srgb,var(--ok) 28%,transparent); color:var(--ok); font-size:13px; font-weight:600; }
.promo-x{ color:var(--muted); font-size:15px; padding:2px 6px; }
