:root {
  --ink: #102a43;
  --muted: #627d98;
  --surface: #ffffff;
  --surface-soft: #f5faff;
  --blue: #1677d2;
  --blue-dark: #095aab;
  --blue-soft: #e6f3ff;
  --blue-pale: #f1f8ff;
  --line: #d7e8f8;
  --danger: #c24154;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: #f4f9ff; font: 500 16px/1.5 "Manrope", sans-serif; padding-bottom: 90px; }
button, input { font: inherit; }
button { cursor: pointer; border: 0; }
button:disabled { cursor: not-allowed; opacity: .56; }
svg { width: 1em; height: 1em; stroke-width: 2; vertical-align: middle; }
.sky { position: fixed; z-index: -1; inset: 0 0 auto; height: 260px; background: linear-gradient(145deg, #b8e2ff, #e9f6ff 62%, #f4f9ff); border-radius: 0 0 42% 42%; }
.app-shell { max-width: 680px; margin: auto; padding: 22px 16px 30px; }
.hero { display: flex; align-items: center; gap: 11px; min-height: 72px; }
.brand-mark { display: grid; place-items: center; width: 51px; height: 51px; border-radius: 17px; color: var(--blue); background: #fff; box-shadow: 0 8px 22px #0a69b21c; }
.brand-mark svg { width: 28px; height: 28px; }
h1, h2, p { margin: 0; }
h1 { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: 20px; font-weight: 800; letter-spacing: -.025em; }
.eyebrow { color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.icon-button { display: grid; place-items: center; width: 38px; height: 38px; margin-left: auto; border-radius: 50%; color: var(--blue); background: #ffffffb8; }
.icon-button svg { width: 19px; height: 19px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 17px; box-shadow: 0 8px 24px #164c7510; }
.loading { margin-top: 18px; text-align: center; color: var(--muted); }
.spinner { display: inline-block; width: 15px; height: 15px; border: 2px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.welcome { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 14px; background: linear-gradient(120deg, #fff, #edf7ff); }
.welcome-icon { display: grid; place-items: center; width: 48px; height: 48px; color: var(--blue); background: var(--blue-soft); border-radius: 15px; }
.welcome-icon svg { width: 26px; height: 26px; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.action-card { min-height: 125px; padding: 15px; text-align: left; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 7px 18px #164c750b; }
.action-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 10px; border-radius: 13px; color: var(--blue); background: var(--blue-soft); }
.action-icon svg { width: 21px; height: 21px; }
.action-card b, .action-card small { display: block; }
.action-card small, .muted { color: var(--muted); font-size: 13px; margin-top: 4px; }
.promo-card, .subscription-summary, .section-heading, .form-row, .button-row { display: flex; align-items: center; gap: 10px; }
.promo-card, .subscription-summary { justify-content: space-between; }
.button { padding: 11px 14px; border-radius: 12px; font-weight: 800; white-space: nowrap; text-decoration: none; text-align: center; }
.primary { color: #fff; background: var(--blue); box-shadow: 0 5px 12px #1677d22b; }
.primary:active { background: var(--blue-dark); }
.secondary { color: var(--blue-dark); background: var(--blue-soft); }
.notice { margin: 8px 0 14px; border-color: #aad8ff; }
.notice p { color: var(--muted); margin: 8px 0 14px; }
.notice .primary { width: 100%; margin-top: 10px; }
.section-heading { margin: 8px 0 15px; }
.back { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--blue); background: var(--blue-soft); }
.back svg { width: 20px; height: 20px; }
.tabs { display: flex; gap: 7px; overflow: auto; margin-bottom: 13px; }
.tab { padding: 9px 13px; border-radius: 999px; color: var(--muted); background: #eaf4fd; white-space: nowrap; }
.tab.active { color: #fff; background: var(--blue); }
.stack { display: grid; gap: 10px; }
.plan-card { border-left: 5px solid #49a8ed; }
.plan-card.unlimited { border-left-color: var(--blue); }
.plan-top, .sub-top { display: flex; justify-content: space-between; gap: 8px; }
.price { color: var(--blue-dark); font-size: 19px; font-weight: 800; }
.plan-meta { color: var(--muted); margin: 8px 0 14px; font-size: 14px; }
.plan-card .button { width: 100%; }
.device-picker { margin: 10px 0; }
.device-picker label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 5px; }
.device-options { display: flex; gap: 5px; flex-wrap: wrap; }
.device-options button { width: 34px; height: 32px; border: 1px solid transparent; border-radius: 9px; color: var(--blue-dark); background: var(--blue-soft); }
.device-options button.selected { color: #fff; background: var(--blue); box-shadow: 0 3px 8px #1677d236; }
.sub-card { overflow: hidden; }
.sub-status { color: var(--blue-dark); font-size: 13px; font-weight: 800; }
.sub-status.expired { color: var(--danger); }
.sub-card details { margin-top: 12px; }
.sub-card summary { color: var(--blue-dark); cursor: pointer; font-weight: 800; }
code { display: block; overflow: auto; padding: 10px; margin-top: 9px; border-radius: 10px; background: var(--blue-pale); color: #245277; font-size: 12px; white-space: nowrap; }
.copy-row { display: flex; gap: 8px; margin-top: 9px; }
.copy-row .button { flex: 1; }
.link-card { display: flex; width: 100%; justify-content: space-between; align-items: center; color: var(--ink); text-decoration: none; text-align: left; }
.link-label { display: flex; align-items: center; gap: 9px; }
.link-label svg, .link-card > svg { color: var(--blue); width: 20px; height: 20px; }
ol { padding-left: 20px; color: var(--muted); }
.form-row { align-items: stretch; }
input { min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 11px; text-transform: uppercase; background: #fff; }
.ref-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.stat { padding: 12px 8px; border-radius: 14px; background: var(--blue-pale); text-align: center; }
.stat b { display: block; color: var(--blue-dark); font-size: 18px; }
.stat small { color: var(--muted); font-size: 11px; }
.bottom-nav { position: fixed; display: flex; justify-content: space-around; bottom: 0; left: 0; right: 0; z-index: 4; padding: 8px max(14px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)); background: #ffffffed; backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.bottom-nav button { display: grid; place-items: center; gap: 3px; min-width: 58px; color: var(--muted); background: transparent; }
.bottom-nav button svg { width: 20px; height: 20px; }
.bottom-nav span { font-size: 10px; }
.bottom-nav button.active { color: var(--blue); }
.modal { position: fixed; inset: 0; z-index: 10; display: flex; align-items: end; background: #062b4c73; }
.modal-sheet { position: relative; width: 100%; max-height: 82vh; overflow: auto; padding: 26px 18px calc(24px + env(safe-area-inset-bottom)); border-radius: 25px 25px 0 0; background: var(--surface-soft); }
.modal-sheet h2 { margin-bottom: 12px; }
.legal-text { white-space: pre-wrap; color: #365a7b; font-size: 13px; }
.close { display: grid; place-items: center; position: absolute; top: 12px; right: 14px; width: 33px; height: 33px; border-radius: 50%; color: var(--ink); background: var(--blue-soft); }
.close svg { width: 18px; height: 18px; }
.toast { position: fixed; z-index: 20; bottom: 82px; left: 50%; max-width: 90%; transform: translateX(-50%); padding: 11px 14px; border-radius: 12px; color: #fff; background: #123b5d; box-shadow: 0 4px 20px #0004; }
@media (min-width: 700px) { body { padding-bottom: 20px; } .bottom-nav { position: static; margin: auto; max-width: 680px; border-radius: 20px; border: 1px solid var(--line); } }
