/* Kvak VPN Mini App — "night pond" theme. Mobile-first (360–430px). --base follows Telegram bg_color when it is dark. */
:root {
  --base: #071a17;
  --base2: #0b2420;
  --card: rgba(255, 255, 255, .055);
  --card2: rgba(255, 255, 255, .09);
  --line: rgba(170, 255, 210, .10);
  --text: #eafff4;
  --muted: #8fb5a6;
  --dim: #5d8576;
  --mint: #5ef0a8;
  --lime: #c6f25e;
  --grad: linear-gradient(135deg, #6af2b0 0%, #c6f25e 100%);
  --on-acc: #05231a;
  --warn: #ffcf6b;
  --bad: #ff8080;
  --r: 20px;
  --r-sm: 14px;
  --tabbar-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-synthesis: none;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; color: var(--text); background: var(--base);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased; }
body { padding-bottom: calc(var(--tabbar-h) + 28px + var(--safe-b));
  background:
    radial-gradient(90% 45% at 85% -5%, rgba(198, 242, 94, .13), transparent 60%),
    radial-gradient(110% 55% at 0% 0%, rgba(94, 240, 168, .16), transparent 62%),
    linear-gradient(180deg, var(--base2) 0%, var(--base) 55%);
  background-attachment: fixed; }
body.has-sticky { padding-bottom: calc(var(--tabbar-h) + 104px + var(--safe-b)); }
button { font: inherit; color: inherit; }
a { color: var(--mint); text-decoration: none; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px 10px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(7, 26, 23, .85), rgba(7, 26, 23, .0)); }
.brand { display: flex; align-items: center; gap: 8px; font-size: 18px; letter-spacing: -.2px; }
.brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo { width: 34px; height: 34px; display: grid; place-items: center; font-size: 20px; border-radius: 12px;
  background: rgba(94, 240, 168, .12); border: 1px solid var(--line); }
.logo-img { width: 38px; height: 38px; padding: 0; object-fit: cover; border-radius: 50%; }
.trial .trial-logo { position: absolute; right: 10px; top: 10px; width: 64px; height: 64px; border-radius: 50%;
  object-fit: cover; box-shadow: 0 0 24px rgba(94, 240, 168, .35); }
.trial h4 { padding-right: 72px; }
.bal-pill { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 12px 7px 10px;
  font-weight: 650; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.bal-pill:empty { display: none; }
.bal-pill .plus { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: var(--on-acc); font-size: 14px; line-height: 1; font-weight: 800; }

main { padding: 2px 14px 12px; max-width: 520px; margin: 0 auto; }
.screen { animation: in-fade .28s cubic-bezier(.2, .8, .2, 1); }
.screen.from-right { animation-name: in-right; }
.screen.from-left { animation-name: in-left; }
@keyframes in-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes in-right { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes in-left { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }

h2.title { font-size: 24px; letter-spacing: -.4px; margin: 6px 4px 4px; }
.sub-title { color: var(--muted); font-size: 14px; margin: 0 4px 14px; }
h3.sec { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650;
  margin: 22px 6px 10px; }

/* ---------- cards ---------- */
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; margin: 12px 0; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.card.glow { background: linear-gradient(160deg, rgba(94, 240, 168, .14), rgba(255, 255, 255, .04) 55%);
  box-shadow: 0 10px 40px -18px rgba(94, 240, 168, .45); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; }

/* ---------- buttons ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0;
  border-radius: 16px; padding: 15px 16px; margin-top: 12px; font-size: 16px; font-weight: 700; cursor: pointer;
  background: var(--grad); color: var(--on-acc); transition: transform .12s, opacity .12s, filter .12s;
  box-shadow: 0 10px 28px -12px rgba(150, 242, 120, .7); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; }
.btn.ghost { background: var(--card2); color: var(--text); box-shadow: none; border: 1px solid var(--line); font-weight: 600; }
.btn.sm { padding: 11px 12px; font-size: 14px; margin-top: 0; border-radius: 13px; }
.btn.cta { font-size: 18px; padding: 18px; margin-top: 14px; border-radius: 20px; }

/* ---------- status card + ring ---------- */
.status-head { display: flex; justify-content: space-between; align-items: center; }
.badge { font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 5px 10px; border-radius: 999px; }
.badge.ok { background: rgba(94, 240, 168, .16); color: var(--mint); }
.badge.trial { background: rgba(198, 242, 94, .16); color: var(--lime); }
.badge.off { background: rgba(255, 255, 255, .08); color: var(--muted); }
.badge.bad { background: rgba(255, 128, 128, .14); color: var(--bad); }
.plan-name { font-weight: 700; font-size: 16px; }
.ring-wrap { position: relative; width: 196px; height: 196px; margin: 14px auto 6px; }
.ring-wrap::before { content: ""; position: absolute; inset: 15px; border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(210,255,220,.13); box-shadow: inset 0 9px 22px rgba(0,0,0,.72), inset 0 -8px 18px rgba(74,255,112,.045), 0 0 0 4px rgba(0,0,0,.2); }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring-bg { stroke: rgba(255, 255, 255, .055); }
.ring-ticks { stroke: rgba(118,255,151,.42); stroke-width: 1.25; stroke-dasharray: .55 1.45; }
.ring-major { stroke: rgba(198,242,94,.74); stroke-width: 2; stroke-dasharray: 2 6; }
.ring-fg { stroke: url(#ringGrad); transition: stroke-dashoffset 1s cubic-bezier(.2, .8, .2, 1);
  filter: drop-shadow(0 0 5px rgba(94, 240, 168, .34)); }
.ring-unlimited .ring-fg { transition: none; }
.ring-awake .ring-ticks, .ring-awake .ring-major, .ring-awake .ring-fg { animation: ring-response .46s ease-out 1 both; }
@keyframes ring-response { 0% { filter: brightness(.82); opacity: .72; } 38% { filter: brightness(1.45) drop-shadow(0 0 4px rgba(118,255,151,.48)); opacity: 1; } 100% { filter: brightness(1); opacity: 1; } }
.ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-num { font-size: 52px; font-weight: 800; letter-spacing: -2px; line-height: 1; }
.ring-lbl { color: var(--muted); font-size: 14px; margin-top: 4px; }
.until { text-align: center; color: var(--muted); font-size: 14px; }
.until b { color: var(--text); font-weight: 600; }
.usage { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.bar { height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .07); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; border-radius: 6px; background: var(--grad); }
.bar.warn i { background: linear-gradient(90deg, #ffcf6b, #ff8080); }
.pill-inf { font-size: 12px; font-weight: 700; color: var(--lime); }

/* trial card */
.trial { overflow: hidden; background: linear-gradient(135deg, rgba(198, 242, 94, .2), rgba(94, 240, 168, .1));
  border-color: rgba(198, 242, 94, .3); }
.trial .big-emoji { position: absolute; right: -10px; top: -18px; font-size: 64px; opacity: .14; transform: rotate(14deg);
  pointer-events: none; }
.trial h4 { margin: 0; font-size: 19px; padding-right: 36px; position: relative; }
.trial .muted { position: relative; }

/* quick actions + stats */
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.qa { border: 1px solid var(--line); background: var(--card); border-radius: 18px; padding: 14px 6px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.qa:active { transform: scale(.96); }
.qa .ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(94, 240, 168, .12); color: var(--mint); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.stat { border: 1px solid var(--line); background: var(--card); border-radius: 16px; padding: 12px; }
.stat .v { font-size: 18px; font-weight: 750; margin-top: 2px; white-space: nowrap; }
.stat .k { font-size: 12px; color: var(--muted); }

/* ---------- tariffs ---------- */
.early { display: flex; gap: 12px; align-items: center; background: linear-gradient(135deg, rgba(198, 242, 94, .18), rgba(94, 240, 168, .06));
  border-color: rgba(198, 242, 94, .28); }
.early .fire { font-size: 26px; }
.plan-h { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 6px 8px; }
.plan-h b { font-size: 17px; }
.plan-h span { color: var(--muted); font-size: 13px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--card); border-radius: 18px; padding: 14px; margin: 8px 0;
  transition: border-color .15s, background .15s, transform .12s; }
.opt:active { transform: scale(.985); }
.opt.on { border-color: var(--mint); background: rgba(94, 240, 168, .09); }
.radio { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--dim); display: grid; place-items: center; }
.opt.on .radio { border-color: var(--mint); }
.opt.on .radio:after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--mint); }
.opt .mid { flex: 1; min-width: 0; }
.opt .t { font-weight: 700; font-size: 16px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.opt .d { color: var(--muted); font-size: 13px; margin-top: 2px; }
.opt .p { text-align: right; white-space: nowrap; }
.opt .p b { font-size: 17px; display: block; }
.opt .p s { color: var(--dim); font-size: 13px; }
.tag { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; padding: 3px 7px; border-radius: 7px; text-transform: uppercase; }
.tag.best { background: var(--grad); color: var(--on-acc); }
.tag.disc { background: rgba(255, 207, 107, .16); color: var(--warn); }

.sticky { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + 18px + var(--safe-b)); z-index: 6;
  padding: 0 14px; max-width: 520px; margin: 0 auto; animation: in-fade .25s; }
.sticky .inner { border-radius: 22px; padding: 10px; background: rgba(9, 32, 28, .88); border: 1px solid var(--line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .6); }
.sticky .btn { margin-top: 0; }
.sticky .note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 7px; }

/* ---------- connect ---------- */
.apps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.app { border: 1px solid var(--line); background: var(--card); border-radius: 18px; padding: 14px; cursor: pointer;
  text-align: left; display: flex; flex-direction: column; gap: 10px; }
.app:active { transform: scale(.97); }
.app .ai { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.app .ai.h { background: linear-gradient(135deg, #6af2b0, #2bb38a); color: #032018; }
.app .ai.i { background: linear-gradient(135deg, #c6f25e, #7fcf3a); color: #1a2a03; }
.app b { font-size: 16px; }
.app small { color: var(--muted); font-size: 12px; }
.app .rec { font-size: 10px; font-weight: 800; color: var(--lime); letter-spacing: .05em; text-transform: uppercase; }
.list { padding: 4px 0; }
.li { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 16px; border: 0; background: none;
  text-align: left; cursor: pointer; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li .ic { width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center;
  background: rgba(94, 240, 168, .1); color: var(--mint); }
.li .mid { flex: 1; min-width: 0; }
.li .mid b { font-weight: 600; display: block; }
.li .mid small { color: var(--muted); font-size: 12.5px; }
.li .chev { color: var(--dim); }
.li.soon { cursor: default; opacity: .65; }
.li.pay-primary { background: linear-gradient(135deg, rgba(94, 240, 168, .16), rgba(198, 242, 94, .07)); }
.li.pay-primary .ic { background: var(--grad); color: var(--on-acc); box-shadow: 0 8px 22px -10px rgba(94, 240, 168, .8); }
.li.pay-primary .mid b { color: var(--mint); }
.pay-rec { display: inline-block; margin-left: 5px; padding: 2px 6px; border-radius: 6px; vertical-align: 1px;
  background: var(--grad); color: var(--on-acc); font-size: 9px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.soon-tag { font-size: 10.5px; font-weight: 800; padding: 3px 8px; border-radius: 7px; background: rgba(255, 255, 255, .08);
  color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.plat { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pl { border: 1px solid var(--line); background: var(--card); border-radius: 16px; padding: 12px 2px 10px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; }
.pl .ic { color: var(--mint); }
.pl.cur { border-color: rgba(94, 240, 168, .55); background: rgba(94, 240, 168, .08); }
.linkbox { display: flex; gap: 8px; align-items: center; }
.linkbox code { flex: 1; min-width: 0; font-family: inherit; font-size: 13px; line-height: 1.4;
  color: var(--muted); background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { flex: none; width: 46px; height: 46px; border-radius: 13px; border: 0; background: var(--grad); color: var(--on-acc);
  display: grid; place-items: center; cursor: pointer; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { position: relative; padding: 0 0 18px 46px; counter-increment: s; }
.steps li:before { content: counter(s); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 10px;
  display: grid; place-items: center; font-weight: 800; background: rgba(94, 240, 168, .14); color: var(--mint); }
.steps li:not(:last-child):after { content: ""; position: absolute; left: 14px; top: 32px; bottom: 4px; width: 2px;
  background: var(--line); }
.steps b { display: block; margin-bottom: 2px; }
.steps .small { color: var(--muted); }
.steps .btn { margin-top: 10px; }
.qr { background: #fff; border-radius: 22px; padding: 16px; width: 252px; margin: 6px auto 0; box-shadow: 0 18px 50px -18px rgba(94, 240, 168, .5); }
.qr svg { display: block; width: 100%; height: auto; }

/* ---------- profile ---------- */
.me { display: flex; align-items: center; gap: 14px; }
.ava { width: 62px; height: 62px; flex: none; border-radius: 22px; display: grid; place-items: center; font-size: 26px;
  font-weight: 800; background: var(--grad); color: var(--on-acc); }
.me .n { font-size: 20px; font-weight: 750; letter-spacing: -.3px; }
.me .u { color: var(--muted); font-size: 13.5px; }
.me .id { display: inline-flex; gap: 4px; margin-top: 4px; font-size: 12px; color: var(--dim); cursor: pointer; }
.bal-card .big { font-size: 34px; font-weight: 800; letter-spacing: -1px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.field { display: flex; gap: 8px; }
.inp { flex: 1; min-width: 0; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25);
  color: var(--text); font-size: 16px; outline: none; }
.inp:focus { border-color: rgba(94, 240, 168, .55); }
.inp.code { text-transform: uppercase; letter-spacing: .08em; }
.inp.code::placeholder { text-transform: none; letter-spacing: 0; color: var(--dim); }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 16px; background: rgba(255, 255, 255, .14); transition: .2s; }
.switch span:before { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; border-radius: 50%;
  background: #fff; transition: .22s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.switch input:checked + span { background: var(--mint); }
.switch input:checked + span:before { transform: translateX(20px); }
.ref-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.ref-stats div { text-align: center; background: rgba(0, 0, 0, .18); border-radius: 13px; padding: 10px 4px; }
.ref-stats b { display: block; font-size: 18px; }
.ref-stats span { font-size: 11.5px; color: var(--muted); }
.footer { text-align: center; color: var(--dim); font-size: 12px; margin: 22px 0 6px; }

/* top-up */
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.chip { border: 1.5px solid var(--line); background: var(--card); border-radius: 14px; padding: 12px 0; font-size: 15px;
  font-weight: 650; cursor: pointer; }
.chip.on { border-color: var(--mint); color: var(--mint); background: rgba(94, 240, 168, .08); }
.method { display: flex; align-items: center; gap: 12px; }

/* history */
.hist { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.hist:last-child { border-bottom: 0; }
.hist .ic { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--card2); }
.hist .mid { flex: 1; min-width: 0; }
.hist .mid b { font-weight: 600; display: block; }
.hist .mid small { color: var(--muted); font-size: 12.5px; display: block; }
.hist .amt { font-weight: 750; white-space: nowrap; }
.plus-amt { color: var(--mint); }

/* faq */
details.qa-item { border-bottom: 1px solid var(--line); padding: 2px 0; }
details.qa-item:last-child { border-bottom: 0; }
details.qa-item summary { list-style: none; cursor: pointer; padding: 14px 28px 14px 2px; font-weight: 600; position: relative; }
details.qa-item summary::-webkit-details-marker { display: none; }
details.qa-item summary:after { content: "+"; position: absolute; right: 4px; top: 11px; font-size: 22px; color: var(--mint);
  transition: transform .2s; }
details.qa-item[open] summary:after { transform: rotate(45deg); }
details.qa-item p { margin: 0 2px 14px; color: var(--muted); font-size: 14px; }

/* ---------- tab bar ---------- */
.tabbar { position: fixed; z-index: 10; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b)); height: var(--tabbar-h);
  max-width: 496px; margin: 0 auto; display: flex; padding: 6px; border-radius: 24px;
  background: rgba(10, 34, 30, .82); border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7); }
.tab-pill { position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / var(--n, 4)); border-radius: 18px; background: rgba(94, 240, 168, .14);
  border: 1px solid rgba(94, 240, 168, .25); transition: transform .32s cubic-bezier(.3, 1.2, .4, 1), width .2s; }
.tabbar button { position: relative; z-index: 1; flex: 1; border: 0; background: none; cursor: pointer; color: var(--dim);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 650;
  transition: color .2s; }
.tabbar button.on { color: var(--mint); }
.tabbar button i { display: grid; place-items: center; height: 24px; }
.tabbar button.on i { transform: translateY(-1px); }

svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- misc ---------- */
.loading { display: grid; place-items: center; min-height: 50vh; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(94, 240, 168, .15); border-top-color: var(--mint);
  animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { border-radius: var(--r); background: linear-gradient(90deg, var(--card) 0%, var(--card2) 50%, var(--card) 100%);
  background-size: 200% 100%; animation: sh 1.2s infinite; height: 120px; margin: 12px 0; }
@keyframes sh { to { background-position: -200% 0; } }
.toast { position: fixed; z-index: 20; left: 50%; bottom: calc(var(--tabbar-h) + 30px + var(--safe-b)); transform: translate(-50%, 10px);
  background: rgba(234, 255, 244, .96); color: #062019; font-weight: 600; padding: 11px 16px; border-radius: 14px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: 86vw; text-align: center;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .5); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.empty { text-align: center; padding: 26px 10px; color: var(--muted); }
.empty .e { font-size: 40px; margin-bottom: 6px; }

/* ---- devices / reissue / quota (v2.1) ---- */
.dev-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dev-row:last-child { border-bottom: 0; }
.dev-row .ic { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--card2); }
.dev-row .mid { flex: 1; min-width: 0; }
.dev-row .mid b { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-row .mid small { color: var(--muted); font-size: 12.5px; display: block; }
.dev-row.over { opacity: .6; }
.btn.xs { width: auto; padding: 8px 12px; font-size: 13px; margin-top: 0; border-radius: 11px; }
.btn.danger { background: rgba(255, 128, 128, .14); color: var(--bad); box-shadow: none; border: 1px solid rgba(255, 128, 128, .3); }
.slots { display: flex; gap: 6px; margin-top: 10px; }
.slots i { flex: 1; height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .08); }
.slots i.on { background: var(--grad); }
.quota-over { border-color: rgba(255, 128, 128, .35); background: linear-gradient(160deg, rgba(255, 128, 128, .12), rgba(255, 255, 255, .03) 60%); }
.dev-mini { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); cursor: pointer; }

/* ---- connection wizard: bottom sheet (v2.4) ---- */
.plat { grid-template-columns: repeat(4, 1fr); }
.wiz-open { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer; margin: 0 0 10px;
  background: linear-gradient(135deg, rgba(94, 240, 168, .16), rgba(198, 242, 94, .07)); border-color: rgba(94, 240, 168, .3); }
.wiz-open:active { transform: scale(.985); }
.wiz-open .ic { width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--grad); color: var(--on-acc); }
.wiz-open .mid { flex: 1; min-width: 0; }
.wiz-open .mid b { display: block; font-size: 16px; }
.wiz-open .mid small { color: var(--muted); font-size: 12.5px; }
.wiz-open .chev { color: var(--mint); }
body.sheet-open { overflow: hidden; }
.sheet-bg { position: fixed; inset: 0; z-index: 30; background: rgba(2, 10, 8, .62); opacity: 0; pointer-events: none;
  transition: opacity .28s; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet-bg.open { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; z-index: 31; left: 0; right: 0; bottom: 0; max-width: 520px; margin: 0 auto; max-height: 92vh;
  display: flex; flex-direction: column; border-radius: 26px 26px 0 0; border: 1px solid var(--line); border-bottom: 0;
  background:
    radial-gradient(120% 40% at 50% 0%, rgba(94, 240, 168, .12), transparent 65%),
    linear-gradient(180deg, var(--base2), var(--base));
  box-shadow: 0 -20px 60px -10px rgba(0, 0, 0, .7); transform: translateY(105%);
  transition: transform .36s cubic-bezier(.2, .9, .25, 1); visibility: hidden; }
.sheet.open { transform: none; visibility: visible; }
.sh-grab { padding: 9px 0 4px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.sh-grab i { width: 42px; height: 5px; border-radius: 3px; background: rgba(234, 255, 244, .22); }
.sh-head { padding: 2px 18px 0; touch-action: none; }
.sh-top { display: flex; justify-content: space-between; align-items: center; min-height: 34px; }
.sh-back { border: 0; background: none; padding: 6px 4px; color: var(--mint); font-size: 15px; font-weight: 650; cursor: pointer; }
.sh-kick { font-size: 13px; color: var(--muted); font-weight: 650; letter-spacing: .02em; }
.sh-prog { font-size: 12.5px; color: var(--muted); font-weight: 650; }
.sh-x { border: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--card2); color: var(--muted); cursor: pointer; font-size: 14px; }
.sh-dots { display: flex; gap: 6px; margin: 6px 0 2px; }
.sh-dots i { flex: 1; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .09); transition: background .25s; }
.sh-dots i.done { background: rgba(94, 240, 168, .45); }
.sh-dots i.on { background: var(--grad); }
.sh-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 18px 8px; -webkit-overflow-scrolling: touch; }
.sh-foot { padding: 8px 18px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); background: rgba(7, 26, 23, .6); }
.sh-foot .btn { margin-top: 0; }
.btn.big { font-size: 17px; padding: 17px; border-radius: 18px; }
.sh-h { font-size: 22px; letter-spacing: -.3px; margin: 10px 2px 4px; }
.sh-sub { color: var(--muted); font-size: 14px; margin: 0 2px 12px; }
.opt.wp { padding: 12px 14px; margin: 7px 0; }
.opt.wp .pic { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center;
  background: rgba(94, 240, 168, .1); color: var(--mint); }
.opt.wp .d:empty { display: none; }
.appc { border: 1.5px solid var(--line); background: var(--card); border-radius: 20px; padding: 14px; margin: 10px 0; cursor: pointer;
  transition: border-color .15s, background .15s; outline: none; }
.appc.on { border-color: var(--mint); background: rgba(94, 240, 168, .08); }
.appc.on .radio { border-color: var(--mint); }
.appc.on .radio:after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--mint); }
.appc-h { display: flex; align-items: center; gap: 12px; }
.appc .ai { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.appc .ai.h { background: linear-gradient(135deg, #6af2b0, #2bb38a); color: #032018; }
.appc .ai.i { background: linear-gradient(135deg, #c6f25e, #7fcf3a); color: #1a2a03; }
.appc .mid { flex: 1; min-width: 0; }
.appc .mid b { font-size: 17px; margin-right: 6px; }
.appc .mid small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.appc .dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.appc .dl .btn:only-child, .appc .dl .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
.btn.out { margin: 0; padding: 10px 10px; font-size: 13.5px; font-weight: 650; border-radius: 13px; box-shadow: none;
  background: transparent; color: var(--mint); border: 1.5px solid rgba(94, 240, 168, .45); }
.btn.out svg.i { opacity: .85; }
.wway-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.wway-h b { font-size: 16px; }
.wway .btn { margin-top: 12px; }
ol.mini { margin: 8px 0 0; padding-left: 20px; color: var(--muted); font-size: 13px; }
ol.mini li { margin: 3px 0; padding-left: 2px; }
ol.mini li::marker { color: var(--mint); font-weight: 700; }
.wbig { text-align: center; padding: 22px 18px; }
.wbig .small { color: var(--muted); font-size: 14px; }
.wbig-ic { width: 76px; height: 76px; border-radius: 24px; margin: 0 auto 14px; display: grid; place-items: center;
  background: rgba(94, 240, 168, .12); color: var(--mint); }
.wbig-e { font-size: 58px; margin-bottom: 8px; filter: drop-shadow(0 8px 20px rgba(94, 240, 168, .35)); }

/* ---- v2.5: Wednesday promo, extra devices sheet, admin tab ---- */
.wed { display: flex; gap: 12px; align-items: center; cursor: pointer; border-color: rgba(198, 242, 94, .45);
  background: linear-gradient(120deg, rgba(198, 242, 94, .26), rgba(94, 240, 168, .1) 70%); }
.wed b { font-size: 16.5px; }
.wed .small { color: var(--text); opacity: .85; margin-top: 2px; }
.wed-frog { font-size: 36px; line-height: 1; transform: rotate(-8deg); filter: drop-shadow(0 6px 14px rgba(198, 242, 94, .35)); }
.wed-tease { margin-top: 12px; padding: 9px 12px; border-radius: 12px; font-size: 13px; color: var(--muted);
  background: rgba(255, 255, 255, .04); border: 1px dashed var(--line); text-align: center; }
.wed-tease.on { color: var(--lime); border-color: rgba(198, 242, 94, .45); background: rgba(198, 242, 94, .08); }
.ref-h { font-size: 17px; }
.wiz-open.warn { border-color: rgba(255, 207, 107, .5); background: linear-gradient(135deg, rgba(255, 207, 107, .16), rgba(255, 255, 255, .03)); }
.slots i.extra { background: linear-gradient(90deg, #c6f25e, #ffe27a); }
.slots i.on.extra { opacity: 1; }
.stepper-card { padding: 18px 16px 14px; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.st-btn { width: 56px; height: 56px; border-radius: 18px; border: 1px solid var(--line); background: var(--card2); color: var(--mint);
  font-size: 30px; font-weight: 500; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.st-btn:active { transform: scale(.94); }
.st-btn:disabled { opacity: .3; }
.st-val { text-align: center; }
.st-val b { display: block; font-size: 44px; font-weight: 800; line-height: 1.05; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.st-val span { font-size: 13px; color: var(--muted); }
.st-now { text-align: center; font-size: 13px; color: var(--muted); margin-top: 10px; }
.kv { padding: 4px 16px; }
.kv > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.kv > div:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv span small { display: block; font-size: 11.5px; color: var(--dim); }
.kv b { white-space: nowrap; }
.sh-note { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 7px; }
.card.adv { margin-top: 12px; border-style: dashed; }
.stats.adm { grid-template-columns: 1fr 1fr; }
.today-plus { display: block; color: var(--mint); font-size: 12px; font-weight: 600; }
.today-list { padding: 4px 16px; }
.today-user { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.today-user:last-child { border-bottom: 0; }
.today-user .mid { min-width: 0; flex: 1; }
.today-user .mid b, .today-user .mid small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-user .mid small { color: var(--muted); font-size: 12px; }
.today-user time { color: var(--muted); font-size: 13px; align-self: flex-start; }
.today-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; background: var(--dim); box-shadow: 0 0 0 4px rgba(93, 133, 118, .12); }
.today-user.trial .today-dot { background: #69a9ff; box-shadow: 0 0 0 4px rgba(105, 169, 255, .14); }
.today-user.paid .today-dot { background: var(--warn); box-shadow: 0 0 0 4px rgba(255, 207, 107, .14); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg .chip { font-size: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lbl { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.lbl .inp { width: 100%; padding: 11px 10px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .03em; }
.promo-res { margin-top: 14px; padding: 14px; border-radius: 16px; border: 1px solid rgba(94, 240, 168, .35); background: rgba(94, 240, 168, .07); text-align: center; }
.pcode { font-size: 24px; font-weight: 800; color: var(--mint); margin: 6px 0 2px; word-break: break-all; }
.hist .amt.dim { color: var(--dim); }.card > .inp { width: 100%; display: block; }
.stats.adm .stat[role="button"] { cursor:pointer;transition:transform .15s; }.stats.adm .stat[role="button"]:active { transform:scale(.97); }
.admin-user-list { padding:2px 16px; }.admin-user-row { width:100%;display:flex;align-items:center;gap:12px;padding:13px 0;border:0;border-bottom:1px solid var(--line);background:none;color:var(--text);text-align:left;cursor:pointer; }.admin-user-row:last-child { border-bottom:0; }.admin-user-row .mid { min-width:0;flex:1; }.admin-user-row b,.admin-user-row small { display:block; }.admin-user-row small { color:var(--muted);font-size:12px; }.admin-user-state { text-align:right; }.admin-user-detail b { white-space:normal;text-align:right; }.admin-grant { margin-top:12px; }.admin-grant .btn { margin-top:12px; }


/* ---- v2.6: in-app support and service center ---- */
.support-input { resize: vertical; min-height: 110px; line-height: 1.45; }
.support-count { color: var(--dim); font-size: 12px; text-align: right; margin-top: 5px; }
.ticket-card { margin-top: 10px; }
.status { font-size: 11px; font-weight: 700; padding: 5px 9px; border-radius: 999px; color: var(--muted); background: var(--card2); }
.status.open { color: var(--mint); background: rgba(94,240,168,.1); }
.support-msg { max-width: 90%; margin-top: 11px; padding: 10px 12px; border-radius: 14px; background: var(--card2); white-space: pre-wrap; overflow-wrap: anywhere; }
.support-msg.in { margin-left: auto; background: rgba(94,240,168,.1); }
.support-msg small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.service-status { display: flex; align-items: center; gap: 12px; }
.service-status i { width: 12px; height: 12px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 6px rgba(94,240,168,.12); }
.service-status.maintenance i { background: var(--warn); box-shadow: 0 0 0 6px rgba(255,207,107,.12); }
.service-status.incident i { background: var(--bad); box-shadow: 0 0 0 6px rgba(255,128,128,.12); }
.service-status b, .service-status small { display:block; }
.service-status small, .news-item > small { color: var(--muted); font-size:12px; }
.news-item h3 { margin: 7px 0 5px; }
.news-item p { margin: 0; color: var(--muted); line-height: 1.45; }

/* ---- v2.7: first-open onboarding ---- */
body.onboarding-open { overflow: hidden; }
.onboarding { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center; padding: 18px max(16px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: rgba(1, 12, 10, .82); backdrop-filter: blur(12px); animation: fade-in .18s ease-out; }
.onboarding.closing { opacity: 0; transition: opacity .18s ease; }
.onboarding-card { position: relative; width: min(100%, 480px); min-height: 520px; display: flex; flex-direction: column; padding: 24px 22px 22px; border: 1px solid rgba(94,240,168,.22); border-radius: 28px; background: linear-gradient(155deg, rgba(18,55,47,.98), rgba(5,25,22,.99)); box-shadow: 0 24px 80px rgba(0,0,0,.48), inset 0 1px rgba(255,255,255,.05); animation: tour-up .24s ease-out; }
.onboarding-skip { align-self: flex-end; border: 0; padding: 6px 2px; color: var(--muted); background: transparent; font: inherit; font-size: 14px; cursor: pointer; }
.onboarding-progress { display: flex; gap: 6px; margin: 18px 0 28px; }
.onboarding-progress i { height: 4px; flex: 1; border-radius: 4px; background: rgba(255,255,255,.12); transition: background .2s, transform .2s; }
.onboarding-progress i.on { background: var(--accent); transform: scaleY(1.35); }
.onboarding-visual { display: grid; place-items: center; width: 112px; height: 112px; margin: 0 auto 24px; border-radius: 34px; font-size: 54px; background: radial-gradient(circle at 35% 30%, rgba(94,240,168,.28), rgba(94,240,168,.07)); box-shadow: 0 18px 50px rgba(0,0,0,.28); }
.onboarding-count { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-align: center; }
.onboarding-card h2 { margin: 10px 0 12px; text-align: center; font-size: 25px; line-height: 1.15; }
.onboarding-card p { margin: 0 auto; max-width: 390px; color: var(--muted); text-align: center; line-height: 1.55; font-size: 15px; }
.onboarding-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 28px; }
.onboarding-actions .btn { flex: 1; margin: 0; }
@keyframes tour-up { from { transform: translateY(28px); opacity: .4; } }
@keyframes fade-in { from { opacity: 0; } }
@media (min-height: 740px) { .onboarding { align-items: center; } }
@media (max-height: 620px) { .onboarding-card { min-height: 0; max-height: 94vh; overflow-y: auto; } .onboarding-visual { width: 82px; height: 82px; font-size: 42px; margin-bottom: 16px; } .onboarding-progress { margin: 10px 0 16px; } }
/* ---- device-oriented setup wizard (v2 state) ---- */
.setup-choice { width: 100%; min-height: 68px; margin: 8px 0; padding: 12px; display: flex; align-items: center; gap: 12px; color: var(--text); text-align: left; border: 1px solid rgba(118,255,151,.22); background: #06150b; cursor: pointer; }
.setup-choice .pic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; color: var(--mint); border: 1px solid rgba(118,255,151,.25); background: rgba(118,255,151,.06); }
.setup-choice > span:nth-child(2) { flex: 1; min-width: 0; }
.setup-choice b, .setup-choice small { display: block; }
.setup-choice small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.setup-choice:focus-visible, .setup-secondary:focus-visible, .setup-alternatives summary:focus-visible, .setup-store-label select:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.setup-client { width: 100%; color: var(--text); text-align: left; }
.setup-alternatives { margin: 10px 0; border-top: 1px solid var(--line); }
.setup-alternatives summary { min-height: 44px; padding: 12px 2px; display: flex; align-items: center; color: var(--muted); cursor: pointer; }
.setup-focus, .setup-success, .setup-check, .setup-summary { min-height: 150px; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; border-radius: 0; background: #031109; border-color: rgba(118,255,151,.3); }
.setup-focus .ai { width: 54px; height: 54px; display: grid; place-items: center; font-size: 24px; font-weight: 800; color: #031109; background: var(--grad); }
.setup-store-label { display: grid; gap: 6px; margin: 12px 0; color: var(--muted); font-size: 12px; }
.setup-store-label select { min-height: 46px; padding: 0 10px; color: var(--text); border: 1px solid var(--line); border-radius: 0; background: #020b05; }
.setup-secondary { width: 100%; min-height: 44px; padding: 10px; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.setup-warning { margin-top: 8px; color: #ffc77d; border: 1px solid rgba(255,199,125,.25); }
.setup-truth { margin: 10px 0; padding: 10px; color: var(--muted); font: 600 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; border-left: 2px solid var(--mint); background: rgba(118,255,151,.04); }
.setup-success > svg, .setup-check > svg { color: var(--mint); }
.setup-check.unverified { border-color: rgba(255,199,125,.4); }
.setup-check.unverified > svg { color: #ffc77d; }
.setup-check.unavailable { border-color: rgba(255,125,125,.3); }
.setup-success.verified { box-shadow: inset 0 0 32px rgba(118,255,151,.07); }
.setup-spinner { width: 32px; height: 32px; border: 2px solid rgba(118,255,151,.2); border-top-color: var(--mint); border-radius: 50%; animation: setup-spin .7s linear infinite; }
@keyframes setup-spin { to { transform: rotate(360deg); } }
.sh-foot:has(.setup-primary) { background: rgba(1,10,5,.98); }
@media (max-width: 430px) {
  .sheet { max-height: 96vh; }
  .sh-grab { padding-top: 6px; }
  .sh-head { padding-inline: 12px; }
  .sh-body { padding: 2px 12px 5px; }
  .sh-foot { padding: 7px 12px calc(9px + var(--safe-b)); }
  .sh-h { margin-top: 7px; font-size: 20px; }
  .sh-sub { margin-bottom: 9px; font-size: 12px; }
  .btn.big.setup-primary { min-height: 48px; padding: 12px; border-radius: 0; font-size: 15px; }
  .opt.wp { min-height: 52px; margin: 5px 0; padding: 8px 10px; }
  .opt.wp .pic { width: 32px; height: 32px; }
  .setup-choice { min-height: 62px; }
  .setup-focus, .setup-success, .setup-check, .setup-summary { min-height: 128px; padding: 14px; }
  .appc.setup-client { margin: 7px 0; padding: 10px; border-radius: 0; }
  .appc .ai { width: 38px; height: 38px; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { .onboarding, .onboarding-card { animation: none; } }


/* ---- v3.0 production cyberdeck: approved KVAK Signal Layer ---- */
:root {
  --base: #020806;
  --base2: #04110a;
  --card: rgba(3, 18, 9, .92);
  --card2: rgba(8, 35, 17, .82);
  --line: rgba(118, 255, 151, .26);
  --line-hot: rgba(118, 255, 151, .62);
  --text: #e5ffeb;
  --muted: #91b89a;
  --dim: #66806c;
  --mint: #77ff98;
  --lime: #beffc9;
  --grad: linear-gradient(180deg, #8dffa7 0%, #69ed8b 100%);
  --on-acc: #011006;
  --warn: #b8ff79;
  --bad: #92ffa9;
  --r: 2px;
  --r-sm: 2px;
  --tabbar-h: 68px;
}
html, body { background: #020806; color: var(--text); overflow-x: hidden; }
body {
  min-height: 100vh;
  background:
    linear-gradient(rgba(112,255,143,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112,255,143,.014) 1px, transparent 1px),
    radial-gradient(circle at 50% 12%, rgba(45,130,66,.11), transparent 42%),
    #020806;
  background-size: 48px 48px, 48px 48px, auto, auto;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .2;
  background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(95,255,129,.035) 3px 4px);
  mix-blend-mode: screen;
}
button, input, textarea { border-radius: 0 !important; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid var(--mint); outline-offset: 3px;
}
.app-shell { position: relative; z-index: 2; min-height: 100vh; margin: 0 auto; border-left: 1px solid rgba(118,255,151,.16); border-right: 1px solid rgba(118,255,151,.16); background: rgba(1,8,4,.78); }
.top {
  position: sticky; padding: 14px 16px 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: rgba(1,9,4,.96); backdrop-filter: none; -webkit-backdrop-filter: none;
}
.brand { gap: 10px; font: 700 17px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; }
.brand > span { display: grid; gap: 5px; }
.brand b { color: var(--text); background: none; }
.brand small { color: var(--muted); font-size: 9px; letter-spacing: .14em; }
.logo, .logo-img { width: 42px; height: 42px; border-radius: 0; border: 1px solid var(--line-hot); background: #031109; }
.bal-pill { border-radius: 0; padding: 9px 11px; border-color: var(--line-hot); background: #031109; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.bal-pill .plus { border-radius: 0; background: var(--mint); }
.terminal-strip, .context-strip {
  display: flex; align-items: center; justify-content: space-between; min-height: 32px; padding: 7px 14px;
  border-bottom: 1px solid rgba(118,255,151,.2); color: var(--muted); background: rgba(2,13,6,.94);
  font: 700 10px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .07em;
}
.terminal-strip span { color: var(--mint); }
.terminal-strip b { color: var(--text); font-size: 9px; }
.context-strip { justify-content: flex-start; color: #76937d; background: rgba(1,8,4,.86); }
.context-strip::before { content: ">"; margin-right: 8px; color: var(--mint); }
main { padding: 12px 14px 18px; }
h2.title { margin: 10px 0 2px; font-size: 27px; letter-spacing: -.02em; }
.sub-title { margin: 0 0 15px; }
h3.sec { margin-left: 0; color: var(--mint); font: 700 11px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .1em; }
.card, .opt, .app, .qa, .stat, .chip, .appc, .wiz-open {
  border-radius: 0; border-color: var(--line); background: linear-gradient(180deg, rgba(5,24,12,.95), rgba(2,12,6,.94));
  backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none;
}
.card::before { content: ""; position: absolute; left: -1px; top: -1px; width: 28px; height: 2px; background: var(--mint); }
.card.glow { background: linear-gradient(145deg, rgba(12,52,24,.9), rgba(2,13,7,.96) 62%); box-shadow: inset 0 0 44px rgba(74,255,112,.035); }
.btn { border-radius: 0; border: 1px solid var(--line-hot); box-shadow: none; text-transform: none; }
.btn.ghost, .btn.out { border-color: var(--line); background: rgba(5,24,12,.92); }
.btn.danger { color: var(--mint); border: 1px dashed var(--line-hot); background: rgba(8,34,16,.76); }
.btn:active, .qa:active, .opt:active, .app:active { transform: translateY(1px); }
.badge, .tag, .status, .soon-tag, .pay-rec, .pill-inf { border-radius: 0; }
.badge.bad, .quota-over { color: var(--text); border-color: var(--line-hot); background: repeating-linear-gradient(135deg, rgba(83,255,120,.08) 0 6px, rgba(3,18,9,.94) 6px 12px); }
.bar, .bar i, .slots i, .radio, .switch span, .switch span::before { border-radius: 0; }
.bar.warn i { background: repeating-linear-gradient(90deg, var(--mint) 0 8px, #245c32 8px 12px); }
.ring-fg { stroke: var(--mint); filter: drop-shadow(0 0 6px rgba(110,255,141,.38)); }
.ring-bg { stroke: rgba(118,255,151,.09); }
.ring-num { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.qa .ic, .li .ic, .dev-row .ic, .wiz-open .ic, .opt.wp .pic, .wbig-ic, .app .ai, .appc .ai { border-radius: 0; }
.quick, .stats { gap: 1px; border: 1px solid var(--line); background: var(--line); }
.quick .qa, .stats .stat { margin: 0; border: 0; }
.plan-h { border-left: 2px solid var(--mint); padding-left: 9px; }
.opt.on, .appc.on { border-color: var(--mint); background: rgba(11,50,23,.92); }
.sticky .inner { border-radius: 0; background: rgba(2,14,7,.98); border-color: var(--line-hot); }
.linkbox code, .inp, .field .inp, .qr, .ref-stats div, .promo-res { border-radius: 0; }
.inp { background: #010904; border-color: var(--line); }
.switch input:checked + span { background: var(--mint); }
.tabbar {
  border-radius: 0; border: 1px solid var(--line-hot); background: rgba(1,10,5,.97); box-shadow: 0 -10px 36px rgba(0,0,0,.7);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.tab-pill { top: 0; bottom: 0; left: 0; width: calc(100% / var(--n, 4)); border-radius: 0; border: 0; border-top: 2px solid var(--mint); background: rgba(18,66,31,.62); }
.tabbar button { font-size: 11px; }
.tabbar button.on { color: var(--mint); }
.toast { border-radius: 0; border: 1px solid var(--line-hot); background: rgba(226,255,233,.98); }
.spinner { border-radius: 0; border-color: rgba(118,255,151,.16); border-top-color: var(--mint); }
.sheet { border-radius: 0; background: #031109; }
.sheet-bg { background: rgba(0,5,2,.78); }
.sh-grab i, .sh-dots i { border-radius: 0; }
.onboarding { background: rgba(0,7,3,.9); }
.onboarding-card { border-radius: 0; border-color: var(--line-hot); background: linear-gradient(155deg, rgba(7,35,16,.99), rgba(1,10,5,.99)); }
.onboarding-visual { border-radius: 0; background: rgba(12,54,25,.82); }
.service-status i, .today-dot { border-radius: 0; background: var(--mint) !important; box-shadow: 0 0 0 4px rgba(118,255,151,.12) !important; }
.today-user.trial .today-dot, .today-user.paid .today-dot { background: var(--mint); }
.wed, .early, .trial { border-color: var(--line-hot); background: linear-gradient(135deg, rgba(18,64,30,.84), rgba(3,17,8,.94)); }

.mobile-event-bus { display: block; margin: 12px 0; border: 1px solid var(--line-hot); background: rgba(2,16,7,.96); }
.mobile-event-bus summary { list-style: none; cursor: pointer; padding: 12px; }
.mobile-event-bus summary::-webkit-details-marker { display: none; }
.machine-head { display: flex; justify-content: space-between; gap: 12px; color: var(--mint); font: 700 10px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .07em; }
.machine-head > span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.machine-led { width: 7px; height: 7px; flex: none; background: var(--mint); box-shadow: 0 0 9px rgba(118,255,151,.72); }
.machine-disclosure::before { content: "+ "; }
.mobile-event-bus[open] .machine-disclosure::before { content: "− "; }
.machine-status { margin-top: 5px; color: var(--text); font: 800 17px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.machine-expanded { overflow: hidden; }
.machine-metrics { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); }
.machine-metrics > div { padding: 9px 10px; border-right: 1px solid var(--line); min-width: 0; }
.machine-metrics > div:last-child { border-right: 0; }
.machine-metrics span, .machine-detail dt { display: block; color: var(--muted); font: 700 9px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .05em; }
.machine-metrics b { display: block; overflow: hidden; text-overflow: ellipsis; color: var(--text); font-size: 13px; white-space: nowrap; }
.machine-detail { padding: 11px 12px 12px; border-top: 1px solid var(--line); }
.machine-detail dl { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border: 1px solid var(--line); }
.machine-detail dl > div { padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.machine-detail dl > div:nth-child(2n) { border-right: 0; }
.machine-detail dd { margin: 2px 0 0; color: var(--mint); font: 700 11px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.machine-events { display: grid; gap: 5px; margin: 9px 0 0; padding: 0; list-style: none; }
.machine-events li { color: var(--text); font: 600 12px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.machine-note { margin-top: 9px; color: var(--muted); font-size: 12px; }

.signal-layer { display: none; position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; color: rgba(118,255,151,.34); }
.signal-grid { position: absolute; inset: 0; opacity: .42; background-image: linear-gradient(rgba(118,255,151,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(118,255,151,.03) 1px, transparent 1px); background-size: 48px 48px; }
.signal-traces { position: absolute; inset: 0; width: 100%; height: 100%; fill: rgba(118,255,151,.35); stroke: rgba(118,255,151,.2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.signal-trace-hot { stroke: rgba(118,255,151,.1); stroke-dasharray: 5 12; animation: signal-dash 18s linear infinite; }
@keyframes signal-dash { to { stroke-dashoffset: -180; } }
.cogitator { display: none; position: fixed; flex-direction: column; padding: 12px; border: 1px solid rgba(118,255,151,.34); background: rgba(1,12,5,.84); box-shadow: inset 0 0 45px rgba(69,255,107,.035); color: #8bd39b; font: 600 9px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.cogitator::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(118,255,151,.11); pointer-events: none; }
.cog-head { display: flex; justify-content: space-between; gap: 8px; padding-bottom: 7px; border-bottom: 1px solid var(--line); color: #b9f8c6; letter-spacing: .07em; }
.cog-head span { color: #52765a; font-size: 8px; }
.cog-kicker { margin-top: 12px; color: #5f8b69; letter-spacing: .07em; }
.cog-primary { margin: 5px 0 10px; color: var(--mint); font-size: 18px; font-weight: 800; }
.cog-list { margin: 0; }
.cog-list div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(118,255,151,.1); }
.cog-list dt { color: #608168; }
.cog-list dd { margin: 0; color: #a9e9b7; text-align: right; }
.cog-bars { display: flex; align-items: end; gap: 5px; height: 54px; margin-top: auto; padding-top: 12px; }
.cog-bars i { flex: 1; height: 28%; background: rgba(118,255,151,.28); animation: cog-bars 1.8s steps(3,end) infinite alternate; }
.cog-bars i:nth-child(2n) { height: 68%; animation-delay: -.6s; }.cog-bars i:nth-child(3n) { height: 44%; animation-delay: -1.1s; }
@keyframes cog-bars { to { height: 82%; opacity: .8; } }
.cog-foot { margin-top: auto; padding-top: 9px; border-top: 1px solid rgba(118,255,151,.12); color: #45634c; font-size: 8px; }
.cog-orbit { position: relative; display: grid; place-items: center; width: 122px; height: 74px; margin: 12px auto; border: 1px solid rgba(118,255,151,.24); border-radius: 50%; }
.cog-orbit::before, .cog-orbit::after { content: ""; position: absolute; inset: 12px -15px; border: 1px solid rgba(118,255,151,.15); border-radius: 50%; transform: rotate(13deg); }
.cog-orbit::after { transform: rotate(-16deg); }
.cog-orbit span { color: var(--mint); font-size: 16px; }
.cog-events { margin: 6px 0 12px; padding-left: 15px; color: #6c9e77; }
.cog-events li { margin: 4px 0; }
.route-map { position: relative; height: 145px; margin: 10px 0; border: 1px solid rgba(118,255,151,.12); background-image: linear-gradient(rgba(118,255,151,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(118,255,151,.03) 1px,transparent 1px); background-size: 20px 20px; }
.route-map svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: rgba(118,255,151,.3); stroke: rgba(118,255,151,.42); stroke-width: 1.3; stroke-dasharray: 5 6; }

@media (max-width: 719px) {
  .app-shell { width: 100%; border: 0; }
  .top { margin: 6px 8px 0; padding: 7px 9px; min-height: 48px; }
  .logo, .logo-img { width: 34px; height: 34px; }
  .brand { gap: 8px; font-size: 15px; }
  .brand small { font-size: 8px; }
  .bal-pill { padding: 7px 9px; }
  .terminal-strip { min-height: 24px; margin-inline: 8px; padding: 4px 9px; font-size: 8px; }
  .context-strip { display: none; }
  main { max-width: 560px; padding: 6px 10px 16px; }
  h2.title { margin: 5px 2px 0; font-size: 21px; }
  .sub-title { margin: 0 2px 8px; font-size: 12px; }
  .card { padding: 14px; }
  .screen { animation-duration: .2s; }
  .screen.from-right { animation-name: mobile-in-right; }
  .screen.from-left { animation-name: mobile-in-left; }
  @keyframes mobile-in-right { from { opacity: 0; transform: translateX(7px); } to { opacity: 1; transform: none; } }
  @keyframes mobile-in-left { from { opacity: 0; transform: translateX(-7px); } to { opacity: 1; transform: none; } }

  .primary-instrument {
    isolation: isolate; overflow: hidden; margin: 8px 0; padding: 12px 14px 11px;
    border-color: rgba(118,255,151,.38);
    background: linear-gradient(180deg, rgba(2,11,6,.18), rgba(0,5,2,.56)),
      radial-gradient(circle at 50% 38%, rgba(95,255,129,.105), transparent 48%), #020b05;
    box-shadow: inset 0 0 0 5px rgba(0,0,0,.34), inset 0 10px 28px rgba(0,0,0,.48), inset 0 -8px 24px rgba(55,255,96,.045), 0 12px 28px rgba(0,0,0,.32);
  }
  .primary-instrument::after {
    content: ""; position: absolute; inset: 6px; z-index: -1; pointer-events: none;
    border: 1px solid rgba(200,255,211,.13);
    background: linear-gradient(115deg, transparent 18%, rgba(151,255,172,.035) 47%, transparent 64%);
    box-shadow: inset 0 0 22px rgba(0,0,0,.48);
  }
  .primary-instrument .status-head, .primary-instrument .ring-wrap, .primary-instrument .until { position: relative; z-index: 1; }
  .primary-instrument .badge { padding: 4px 7px; font-size: 10px; }
  .primary-instrument .plan-name { max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
  .ring-wrap { width: 132px; height: 132px; margin: 5px auto 1px; }
  .ring-wrap::before { inset: 11px; border-color: rgba(210,255,220,.16); box-shadow: inset 0 8px 18px rgba(0,0,0,.78), inset 0 -6px 15px rgba(74,255,112,.055), 0 0 0 3px rgba(0,0,0,.24); }
  .ring-fg { transition-duration: .52s; filter: drop-shadow(0 0 4px rgba(110,255,141,.32)); stroke-width: 7px; }
  .ring-bg { stroke-width: 7px; }
  .ring-ticks { stroke-width: 1.45; }
  .ring-major { stroke-width: 2.35; }
  .ring-num { font-size: 39px; letter-spacing: -1px; text-shadow: 0 0 14px rgba(118,255,151,.18); }
  .ring-lbl { margin-top: 2px; font-size: 11px; }
  .until { font-size: 12px; }

  .mobile-event-bus {
    margin: 8px 0; overflow: hidden; border-color: rgba(118,255,151,.32);
    background: linear-gradient(180deg, rgba(4,23,11,.98), rgba(1,10,5,.98));
    box-shadow: inset 0 0 22px rgba(80,255,113,.035);
  }
  .mobile-event-bus summary { min-height: 62px; padding: 10px 12px; }
  .mobile-event-bus summary:focus-visible { outline-offset: -3px; }
  .machine-status { margin-top: 6px; font-size: 15px; }
  .machine-metrics > div { padding: 8px; }
  .machine-metrics b { font-size: 12px; }

  .btn.cta { min-height: 52px; margin: 8px 0; padding: 13px 15px; font-size: 16px; border-color: rgba(141,255,167,.72); box-shadow: inset 0 -4px 0 rgba(0,25,8,.34), 0 0 18px rgba(105,237,139,.12); transition-duration: .09s; }
  .btn.cta:active { transform: translateY(2px); box-shadow: inset 0 2px 7px rgba(0,0,0,.38), 0 0 10px rgba(105,237,139,.08); filter: brightness(.86); }
  .home-account-details { margin: 8px 0; padding: 10px 12px; }
  .home-account-details .usage { margin: 0; padding: 0; border-top: 0; }
  .home-account-details .dev-mini { margin-top: 9px; padding-top: 9px; }

  .tabbar { left: 8px; right: 8px; bottom: calc(6px + var(--safe-b)); height: 62px; padding: 4px; border-color: rgba(118,255,151,.38); background: linear-gradient(180deg, rgba(3,18,8,.985), rgba(0,8,3,.985)); box-shadow: inset 0 1px 0 rgba(166,255,185,.04), 0 -8px 26px rgba(0,0,0,.55); }
  .tab-pill { top: 0; bottom: 0; transition: transform .18s cubic-bezier(.2,.8,.2,1), width .18s; background: linear-gradient(180deg, rgba(31,99,46,.6), rgba(8,38,18,.52)); box-shadow: inset 0 8px 18px rgba(85,255,119,.035); }
  .tabbar button { min-height: 44px; font-size: 12px; }
  .tabbar button i { transition: transform .12s, filter .12s; }
  .tabbar button.on i { transform: translateY(-1px); filter: drop-shadow(0 0 5px rgba(118,255,151,.55)); }
}
@media (min-width: 720px) {
  .signal-layer { display: block; }
  .app-shell { width: calc(100% - 24px); max-width: 920px; }
  main { width: min(560px, calc(100% - 280px)); max-width: none; margin-left: auto; margin-right: 0; padding-inline: 18px; }
  .cogitator-rail { display: flex; left: max(28px, calc(50% - 430px)); top: 145px; bottom: 96px; width: 238px; }
  .tabbar { left: auto; right: max(12px, calc((100vw - 920px) / 2)); width: min(560px, calc(100vw - 304px)); max-width: none; }
  .sticky { left: auto; right: max(12px, calc((100vw - 920px) / 2)); width: min(560px, calc(100vw - 304px)); max-width: none; }
  .mobile-event-bus { display: none; }
}
@media (min-width: 1500px) {
  .app-shell { width: 720px; }
  main { width: 100%; max-width: 620px; margin: 0 auto; }
  .tabbar, .sticky { right: calc(50% - 348px); width: 696px; }
  .cogitator-left { display: flex; left: 12px; top: 76px; bottom: 92px; width: 205px; }
  .cogitator-rail { left: 228px; top: 92px; bottom: 92px; width: 150px; }
  .cogitator-right { display: flex; right: 12px; top: 76px; bottom: 92px; width: calc(50vw - 392px); min-width: 250px; max-width: 350px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
