:root {
  --bg: #0d0a12;
  --card: #15111d;
  --card2: #1e1828;
  --line: #30263e;
  --fg: #f4f0fa;
  --dim: #a59aac;
  --acc: #bb83ff;
  --accent-fill: linear-gradient(115deg, #a33de5, #792de1 62%, #6823cb);
  --accent-soft: rgba(167,83,241,.11);
  --ok: #34c77b;
  --warn: #f5a524;
  --danger: #f0506e;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: radial-gradient(ellipse 680px 460px at 50% -150px, #372044 0%, transparent 85%), var(--bg);
  color: var(--fg);
  font-family: -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 560px; margin: 0 auto; padding: 22px 16px 64px; }
.brand { display: flex; align-items: center; gap: 12px; margin: 4px 0 24px; }
.brand-mark { display: block; flex: 0 0 48px; object-fit: contain; }
.brand-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brand-name { font-size: 27px; line-height: 1.15; letter-spacing: -.7px; font-weight: 800; overflow-wrap: anywhere; }
.brand-caption { color: var(--dim); font-size: 12px; letter-spacing: .3px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.12); }
.card h2 { font-size: 16px; margin-bottom: 12px; }
.cap { font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
label { display: block; font-size: 13px; color: var(--dim); margin: 10px 0 5px; }
input, select {
  width: 100%; background: var(--card2); border: 1px solid var(--line); color: var(--fg);
  border-radius: 10px; padding: 12px 13px; font-size: 16px; outline: none;
}
input:focus, select:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(187,131,255,.1); }
button, input, select { font-family: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid #d6b0ff; outline-offset: 4px; }
.btn {
  width: 100%; border: none; border-radius: 11px; padding: 13px; font-size: 15px; font-weight: 650;
  cursor: pointer; margin-top: 12px; transition: filter .15s, transform .05s, border-color .15s;
  background: var(--card2); color: var(--fg);
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent-fill); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 4px 16px rgba(119,35,209,.2); }
.btn.ghost { background: rgba(155,84,217,.04); color: #dfcaf5; border: 1px solid #443156; }
.btn.oauth { background: var(--card2); color: var(--fg); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 8px; }
@media (hover: hover) {
  .btn:not(:disabled):hover { filter: brightness(1.12); }
  .tab:not(.on):hover, .plan:hover, .dur:hover { border-color: #80519f; }
}
.row { display: flex; gap: 10px; }
.row .btn { margin-top: 0; }
.muted { color: var(--dim); font-size: 13px; }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tab { flex: 1; min-width: 0; text-align: center; padding: 11px 7px; border-radius: 10px; background: var(--card); color: #c4b9ce; border: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.tab.on { background: var(--accent-fill); color: #fff; border-color: #a35ce0; box-shadow: 0 3px 14px rgba(134,47,207,.18); }
.plan { border: 1px solid var(--line); border-radius: 11px; padding: 12px; margin-bottom: 8px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.plan.on { border-color: var(--acc); background: var(--accent-soft); }
.plan .name { font-weight: 650; }
.durs { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 4px; }
.dur { flex: 1; min-width: 90px; border: 1px solid var(--line); border-radius: 10px; padding: 9px; text-align: center; cursor: pointer; }
.dur.on { border-color: var(--acc); background: var(--accent-soft); }
.dur .m { font-size: 12px; color: var(--dim); }
.dur .p { font-weight: 700; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.ok { background: rgba(52,199,123,.15); color: var(--ok); }
.pill.warn { background: rgba(245,165,36,.15); color: var(--warn); }
.li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.li:last-child { border-bottom: none; }
.device-row { align-items: center; gap: 12px; }
.device-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.device-name { overflow-wrap: anywhere; }
.device-client { color: var(--acc); font-size: 12px; line-height: 1.4; }
.device-client.unknown { color: var(--dim); }
.sublink { word-break: break-all; background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 11px; font-family: ui-monospace, monospace; font-size: 12.5px; }
.subscription-access { margin-top: 18px; }
.subscription-access .sublink { user-select: text; overflow-wrap: anywhere; }
.subscription-access .hint { margin: 12px 0 0; }
.promo-box { margin: 16px 0 4px; padding: 12px; border: 1px solid #48305e; border-radius: 11px; background: rgba(155,84,217,.05); }
.promo-box summary { color: #d6b0ff; font-size: 13px; font-weight: 600; cursor: pointer; }
.promo-row { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.promo-row input { flex: 1; min-width: 0; }
.promo-row .btn { flex: 0 0 auto; width: auto; margin: 0; padding: 12px; }
.promo-status { color: var(--dim); font-size: 12px; line-height: 1.45; margin-top: 9px; overflow-wrap: anywhere; }
.promo-status.success { color: var(--ok); }
.promo-clear { background: none; border: 0; padding: 8px 0 0; color: var(--dim); cursor: pointer; font-size: 12px; }
.old-price { color: var(--dim); font-weight: 400; font-size: 11px; margin-right: 6px; }
.price-pair { display: inline-flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 3px; }
@media (max-width: 360px) { .promo-row { flex-wrap: wrap; } .promo-row .btn { width: 100%; } }
.hint { font-size: 12.5px; color: var(--dim); margin-top: 6px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 12px; margin: 14px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.trial-offer { background: radial-gradient(ellipse at 100% 0, rgba(157,70,224,.15), transparent 70%), #1c1428; border: 1px solid #4b2d65; border-radius: 13px; padding: 17px; }
.trial-heading { display: flex; align-items: center; gap: 12px; }
.trial-gift { flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: #e0b3ff; background: linear-gradient(140deg, rgba(175,82,238,.27), rgba(137,64,211,.1)); border: 1px solid rgba(211,144,255,.19); }
.trial-gift svg { width: 24px; height: 24px; }
.trial-eyebrow { color: #be9cd7; font-size: 10px; font-weight: 600; letter-spacing: .7px; text-transform: uppercase; margin-bottom: 4px; }
.trial-title { font-size: 21px !important; line-height: 1.2; letter-spacing: -.3px; margin: 0 !important; }
.trial-copy { font-size: 13px; line-height: 1.55; color: #d5c6e1; margin: 12px 0 2px; }
.btn.telegram { display: flex; align-items: center; justify-content: center; gap: 9px; background: linear-gradient(115deg, #7733ad, #5c298f); color: #fff; border: 1px solid #9954c7; padding: 12px 8px; }
.telegram-icon { display: flex; width: 18px; height: 18px; }
.telegram-icon svg { width: 100%; height: 100%; }
.trial-note { color: #b7a4c6; font-size: 11px; line-height: 1.45; margin-top: 10px; text-align: center; }
.trial-offer .btn.primary { display: block; text-align: center; text-decoration: none; }
#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #282031; color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90%; text-align: center;
  border: 1px solid var(--line);
}
#toast.show { opacity: 1; }
.center { text-align: center; }
.link { color: var(--acc); cursor: pointer; }
.copy-fallback { position: fixed; left: -9999px; top: -9999px; }
.connect-card { text-align: center; overflow: hidden; padding: 28px 22px 22px; }
.connect-title { font-size: 28px !important; line-height: 1.15; letter-spacing: -.02em; margin-bottom: 8px !important; }
.connect-subtitle { color: var(--dim); font-size: 14px; line-height: 1.45; max-width: 390px; margin: 0 auto; }
.connect-caption, .connect-copy-title { color: var(--dim); font-size: 12px; margin: 22px 0 9px; }
.connect-caption { letter-spacing: .08em; text-transform: uppercase; }
.connect-copy-title { text-align: left; font-size: 13px; }
.connect-chips { display: flex; justify-content: center; gap: 8px; }
.connect-chip { border: 1px solid var(--line); background: var(--card2); color: var(--fg); font: inherit; font-weight: 700; padding: 9px 20px; border-radius: 999px; cursor: pointer; }
.connect-chip.on { background: var(--accent-fill); border-color: #a35ce0; color: #fff; }
.connect-hero { pointer-events: none; position: relative; width: min(50vw, 220px); aspect-ratio: 1; margin: 30px auto; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 50%; }
.password-link { display: block; margin: 12px auto 0; padding: 8px; border: 0; background: none; color: var(--acc); font: inherit; font-size: 14px; cursor: pointer; }
.recovery-title { font-size: 23px; margin: 0 0 12px; }
.recovery-note { color: var(--dim); line-height: 1.5; margin: 0 0 18px; }
.connect-hero::before, .connect-hero::after { content: ""; position: absolute; inset: -15%; border: 1px solid var(--line); border-radius: 50%; opacity: .55; }
.connect-hero::after { inset: -30%; opacity: .3; }
.connect-icon { width: 42%; color: var(--fg); }
.connect-icon svg { display: block; width: 100%; height: 100%; }
.btn.connect-action { display: block; text-decoration: none; text-align: center; padding: 15px 18px; border-radius: 18px; }
.connect-back { display: block; margin: 13px auto 0; padding: 7px; border: 0; background: transparent; color: var(--dim); cursor: pointer; font-size: 13px; }
@media (max-width: 430px) {
  #app { padding: 18px 14px 40px; }
  .brand { margin-bottom: 20px; }
  .trial-offer { padding: 14px; }
  .tab { font-size: 13px; }
  .connect-card { padding: 24px 16px 18px; }
  .connect-title { font-size: 24px !important; }
  .connect-hero { width: min(54vw, 190px); margin: 28px auto; }
}
