@font-face {
  font-family: Manrope;
  src: url("/miniapp-beta/fonts/Manrope-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f4faff;
  --surface: rgba(255, 255, 255, .9);
  --surface-solid: #fff;
  --text: #0a1426;
  --muted: #6d7a8c;
  --line: #e2edf6;
  --blue: #1689ff;
  --blue-deep: #0668e7;
  --cyan: #32c7f2;
  --violet: #7a67ff;
  --green: #1cbf79;
  --orange: #f2a31c;
  --shadow: 0 22px 70px rgba(35, 105, 164, .12);
  --sidebar: 286px;
  font-family: Manrope, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Keep page scrolling, but avoid accidental double-tap and pinch zoom in Telegram WebView. */
html, body {
  touch-action: pan-x pan-y;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08111f;
  --surface: rgba(17, 29, 46, .92);
  --surface-solid: #111d2e;
  --text: #f4f8ff;
  --muted: #94a5ba;
  --line: #25364b;
  --shadow: 0 22px 70px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); transition: color .28s ease, background .28s ease; }
button, a, input { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 20; width: var(--sidebar); padding: 30px 24px;
  background: rgba(255, 255, 255, .86); border-right: 1px solid rgba(196, 218, 235, .7);
  backdrop-filter: blur(24px); display: flex; flex-direction: column;
}
.brand { border: 0; padding: 0; background: transparent; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.brand-mark { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 20px; background: linear-gradient(145deg, #8edcff, #1189ff 58%, #6a61ff); box-shadow: 0 10px 28px rgba(22,137,255,.25); }
.brand-name { font-size: 24px; letter-spacing: .18em; font-weight: 800; }
.brand-logo { display: block; width: 132px; height: 64px; object-fit: contain; transform: rotate(-5deg); transform-origin: center; filter: drop-shadow(0 9px 16px rgba(19, 126, 225, .22)); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.brand:hover .brand-logo { transform: rotate(-3deg) translateY(-1px) scale(1.025); }
.sidebar-user { margin: 42px 0 28px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.sidebar-user > div:last-child { min-width: 0; }
.sidebar-user strong, .sidebar-user span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { font-size: 14px; }
.sidebar-user span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.avatar { overflow: hidden; flex: 0 0 auto; display: grid; place-items: center; color: white; font-weight: 800; background: linear-gradient(145deg, #60d3f3, #138aff 60%, #7568ff); box-shadow: 0 9px 20px rgba(22,137,255,.22); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-small { width: 42px; height: 42px; border-radius: 14px; }
.avatar-large { width: 92px; height: 92px; border-radius: 30px; font-size: 36px; }
.side-nav { display: grid; gap: 8px; }
.nav-item { width: 100%; min-height: 48px; padding: 0 16px; border: 0; border-radius: 15px; background: transparent; display: flex; align-items: center; gap: 12px; color: #536175; cursor: pointer; font-weight: 600; }
.nav-item.active { color: var(--text); background: #eaf3fa; }
.nav-icon { width: 22px; text-align: center; font-size: 21px; }
.sidebar-help { margin-top: auto; border: 0; background: transparent; display: flex; align-items: center; gap: 10px; color: #637084; cursor: pointer; }
.sidebar-help span { width: 22px; height: 22px; border: 1.5px solid #7e8a9b; border-radius: 50%; display: grid; place-items: center; font-size: 12px; }

.workspace { min-height: 100vh; margin-left: var(--sidebar); padding: 38px clamp(30px, 5vw, 80px) 70px; }
.mobile-header, .bottom-nav { display: none; }
.screen { display: none; width: min(100%, 1040px); margin: 0 auto; animation: screen-in .28s ease both; }
.screen.active { display: block; }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hero-card { position: relative; min-height: 360px; overflow: hidden; border-radius: 34px; padding: 48px; background: linear-gradient(125deg, #0e7ffc 0%, #1fb9f0 48%, #8ee4ff 100%); background-size: 180% 180%; box-shadow: var(--shadow); color: #fff; isolation: isolate; animation: hero-gradient 10s ease-in-out infinite alternate; }
.hero-card::after { content: ""; position: absolute; inset: 0; z-index: -2; background-image: radial-gradient(circle, rgba(255,255,255,.22) 1.2px, transparent 1.4px); background-size: 22px 22px; mask-image: linear-gradient(90deg, #000, transparent 78%); }
.hero-orb { position: absolute; z-index: -1; border-radius: 50%; filter: blur(2px); background: rgba(255,255,255,.18); animation: orb-drift 8s ease-in-out infinite alternate; }
.orb-one { width: 270px; height: 270px; right: -40px; top: -90px; }
.orb-two { width: 130px; height: 130px; right: 250px; bottom: -70px; }
.hero-content { position: relative; z-index: 2; width: min(62%, 580px); }
.status-pill { width: max-content; padding: 8px 12px; border-radius: 999px; display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; }
.status-pill.online { background: rgba(5, 79, 145, .28); border: 1px solid rgba(255,255,255,.2); }
.status-pill.inactive { background: rgba(77, 35, 13, .32); border: 1px solid rgba(255, 208, 128, .35); }
.status-pill.inactive span { background: #ffd080; box-shadow: 0 0 0 4px rgba(255,208,128,.15); }
.status-pill span { width: 7px; height: 7px; background: #74ffbf; border-radius: 50%; box-shadow: 0 0 0 4px rgba(116,255,191,.15); }
.eyebrow, .section-kicker { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.eyebrow { margin-top: 28px; color: rgba(255,255,255,.75); }
.hero-card h1 { margin: 10px 0 14px; font-size: clamp(34px, 4.4vw, 58px); line-height: 1.02; letter-spacing: -.045em; }
.hero-copy { max-width: 470px; margin: 0; color: rgba(255,255,255,.82); font-size: 15px; line-height: 1.55; }
.primary-button, .secondary-button, .light-button, .ghost-button { min-height: 54px; padding: 0 22px; border-radius: 17px; border: 0; font-weight: 800; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease; }
.primary-button { color: #fff; background: linear-gradient(135deg, var(--blue), var(--blue-deep)); box-shadow: 0 13px 30px rgba(22,137,255,.25); display: flex; align-items: center; justify-content: center; text-align: center; }
.primary-button, .dashboard-connect { text-decoration: none; }
.primary-button[aria-disabled="true"] { opacity: .72; }
.primary-button:disabled { opacity: .38; cursor: not-allowed; box-shadow: none; }
.secondary-button { color: var(--blue); background: #e8f4ff; }
.light-button { color: var(--blue-deep); background: #fff; box-shadow: 0 12px 28px rgba(8,85,150,.12); }
.ghost-button { background: #edf3f8; color: #69778a; }
.primary-button:not(:disabled):active, .light-button:active, .secondary-button:active, .quick-card:active { transform: scale(.98); }
.hero-button { margin-top: 28px; min-width: 254px; color: var(--blue-deep); background: #fff; box-shadow: 0 16px 30px rgba(5,83,145,.22); display: flex; align-items: center; justify-content: space-between; }
.hero-button .arrow { font-size: 22px; }
.hero-happ-button { margin-top: 12px; padding: 7px 2px; border: 0; color: rgba(255,255,255,.9); background: transparent; font-size: 12px; font-weight: 800; cursor: pointer; }

.hero-mascot { position: absolute; width: min(39%, 390px); height: auto; right: 24px; bottom: -10px; z-index: 1; object-fit: contain; filter: drop-shadow(0 28px 28px rgba(0,68,138,.24)); animation: mascot-float 5.2s ease-in-out infinite; user-select: none; pointer-events: none; }
@keyframes hero-gradient { to { background-position: 90% 55%; } }
@keyframes orb-drift { to { transform: translate3d(-22px, 18px, 0) scale(1.08); } }
@keyframes mascot-float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-12px) rotate(1deg); } }

.section-heading { margin: 38px 0 16px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.section-heading h2 { margin: 5px 0 0; font-size: 24px; letter-spacing: -.025em; }
.section-kicker { color: #7f8da0; }
.text-button { border: 0; padding: 7px 0; color: var(--blue); background: transparent; font-size: 13px; font-weight: 800; cursor: pointer; }
.subscription-card { border: 1px solid var(--line); border-radius: 24px; padding: 24px; background: var(--surface-solid); box-shadow: 0 14px 45px rgba(48, 111, 160, .07); }
.subscription-top, .subscription-meta { display: flex; justify-content: space-between; gap: 16px; }
.subscription-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.subscription-top strong { font-size: 20px; }
.subscription-badge { height: max-content; padding: 7px 11px; border-radius: 999px; color: var(--green); background: #e9fbf3; font-size: 11px; font-weight: 800; }
.subscription-badge.inactive { color: #d76b11; background: #fff4e7; }
.subscription-progress { height: 8px; margin: 22px 0 12px; overflow: hidden; border-radius: 999px; background: #edf3f7; }
.subscription-progress span { display: block; height: 100%; width: 72%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.subscription-meta { color: var(--muted); font-size: 12px; }.subscription-meta b { color: var(--text); }
.expiry-alert { width: 100%; min-height: 72px; margin-top: 12px; padding: 13px 16px; border: 1px solid #ffd7a4; border-radius: 20px; color: #8c4d05; background: linear-gradient(135deg,#fff8ea,#fff2dd); display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; }
.expiry-alert[hidden] { display: none; }.expiry-alert > span:nth-child(2) { flex: 1; }.expiry-alert strong,.expiry-alert small { display: block; }.expiry-alert strong { font-size: 13px; }.expiry-alert small { margin-top: 3px; color: #a66c2a; font-size: 10px; }.expiry-alert b { color: #c76c00; font-size: 11px; }.expiry-icon { width: 40px; height: 40px; border-radius: 13px; background: #ffe8bf; display: grid; place-items: center; font-size: 20px; }
.traffic-card { margin-top: 12px; padding: 19px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface-solid); box-shadow: 0 13px 35px rgba(48,111,160,.06); }
.traffic-heading { display: flex; justify-content: space-between; align-items: center; }.traffic-heading strong,.traffic-heading small { display: block; }.traffic-heading strong { font-size: 13px; }.traffic-heading small { margin-top: 3px; color: var(--muted); font-size: 10px; }.traffic-heading button { width: 36px; height: 36px; border: 0; border-radius: 12px; color: var(--blue); background: #eaf5ff; font-size: 20px; cursor: pointer; }.traffic-value { display: block; margin-top: 14px; font-size: 28px; letter-spacing: -.04em; }.traffic-progress { height: 7px; margin: 10px 0 8px; overflow: hidden; border-radius: 999px; background: #eaf1f6; }.traffic-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--blue),var(--cyan)); transition: width .4s ease; }.traffic-progress span.unlimited { background: linear-gradient(90deg,var(--blue) 0%,var(--cyan) 38%,#b8f3ff 50%,var(--cyan) 62%,var(--blue) 100%); background-size: 220% 100%; animation: traffic-flow 2.4s linear infinite; }.traffic-card > small { color: var(--muted); font-size: 10px; }
@keyframes traffic-flow { to { background-position: -220% 0; } }
.quick-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.quick-card { min-height: 98px; padding: 17px; border: 0; border-radius: 22px; display: flex; align-items: center; gap: 14px; text-align: left; cursor: pointer; transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease; }
.quick-card:hover, .device-card:hover, .profile-list button:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(48,111,160,.12); }
.quick-card.blue { background: #eaf5ff; }.quick-card.cyan { background: #e6faff; }.quick-card.violet { background: #f0edff; }
.quick-icon { width: 48px; height: 48px; flex: 0 0 auto; border-radius: 16px; display: grid; place-items: center; color: #fff; font-size: 24px; font-weight: 500; }
.blue .quick-icon { background: linear-gradient(145deg, #41afff, #0b7ff6); }.cyan .quick-icon { background: linear-gradient(145deg, #53dff3, #11a9dd); }.violet .quick-icon { background: linear-gradient(145deg, #9b8aff, #6b57ed); }
.quick-card strong, .quick-card small { display: block; }.quick-card strong { font-size: 14px; }.quick-card small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.count-badge { display: inline-grid; place-items: center; min-width: 25px; height: 25px; padding: 0 7px; border-radius: 999px; color: var(--blue); background: #e4f3ff; font-size: 12px; vertical-align: 3px; }
.round-add { width: 42px; height: 42px; border: 0; border-radius: 14px; color: #fff; background: var(--blue); font-size: 24px; cursor: pointer; }
.device-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.device-card { width: 100%; min-height: 116px; padding: 18px; border: 1px solid var(--line); border-radius: 24px; background: #fff; display: flex; align-items: center; gap: 15px; text-align: left; cursor: pointer; box-shadow: 0 13px 35px rgba(48,111,160,.06); }
.device-visual { position: relative; width: 58px; height: 75px; flex: 0 0 auto; border-radius: 15px; background: linear-gradient(180deg, #f0f5f8, #d1dce4); box-shadow: inset 0 0 0 2px rgba(172,190,203,.22); }
.device-visual i { position: absolute; width: 16px; height: 3px; left: 50%; bottom: 7px; transform: translateX(-50%); border-radius: 5px; background: #aebdca; }
.device-copy { min-width: 0; flex: 1; }.device-copy strong, .device-copy small { display: block; }.device-copy strong { font-size: 14px; }.device-copy small { margin-top: 5px; color: var(--orange); font-size: 11px; font-weight: 700; }
.device-add .device-copy small { color: var(--muted); font-weight: 500; }.device-plus { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; color: var(--blue); background: #eaf5ff; font-size: 28px; }
.device-remove { padding: 8px 10px; border: 0; border-radius: 11px; color: #d84c54; background: #fff0f1; font-size: 9px; font-weight: 800; cursor: pointer; }
.traffic-heading button.loading { animation: payment-spin .7s linear infinite; }
.payment-methods[hidden] { display: none; }
.chevron { color: #9faab7; font-size: 25px; }

.page-heading { margin: 20px 0 30px; text-align: center; }.page-heading h1 { margin: 8px 0 10px; font-size: 38px; letter-spacing: -.04em; }.page-heading p { margin: 0; color: var(--muted); }
.referral-hero { position: relative; overflow: hidden; min-height: 290px; border-radius: 32px; padding: 36px; color: #fff; background: linear-gradient(135deg, #1288ff, #22c7ed); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.referral-hero::before { content: ""; position: absolute; width: 430px; height: 430px; border: 80px solid rgba(255,255,255,.09); border-radius: 50%; }
.referral-icon { position: relative; width: 60px; height: 60px; margin-bottom: 14px; border-radius: 20px; display: grid; place-items: center; color: var(--blue); background: #fff; font-size: 28px; font-weight: 800; transform: rotate(-4deg); }
.referral-hero > span:not(.referral-spark), .referral-hero > strong, .referral-hero > button { position: relative; }.referral-hero > span { font-size: 13px; }.referral-hero > strong { margin: 4px 0 22px; font-size: 44px; }.referral-spark { position: absolute; color: rgba(255,255,255,.74); }.spark-one { left: 15%; top: 22%; font-size: 30px !important; }.spark-two { right: 16%; bottom: 25%; font-size: 22px !important; }
.stats-grid { margin-top: 16px; border: 1px solid var(--line); border-radius: 24px; background: #fff; display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; }
.stats-grid div { padding: 22px; text-align: center; }.stats-grid div + div { border-left: 1px solid var(--line); }.stats-grid strong, .stats-grid span { display: block; }.stats-grid strong { font-size: 24px; }.stats-grid span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.how-card { margin-top: 16px; padding: 28px; border: 1px solid var(--line); border-radius: 26px; background: #fff; }.how-card h2 { margin: 0 0 22px; }.how-card ol { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 0; margin: 0; }.how-card li { display: flex; gap: 12px; }.how-card li > span { width: 32px; height: 32px; flex: 0 0 auto; border-radius: 11px; display: grid; place-items: center; color: var(--blue); background: #e8f5ff; font-weight: 800; }.how-card strong, .how-card small { display: block; }.how-card strong { font-size: 13px; }.how-card small { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; }

.profile-hero { padding: 40px 20px 30px; text-align: center; }.profile-hero .avatar { margin: 0 auto 18px; }.profile-hero h1 { margin: 0; font-size: 28px; }.profile-hero > span { display: block; margin-top: 5px; color: var(--muted); }.profile-status { width: max-content; margin: 15px auto 0; padding: 8px 12px; border-radius: 999px; color: var(--green); background: #eafaf3; font-size: 11px; font-weight: 700; }.profile-status span { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--green); }
.profile-list { overflow: hidden; border: 1px solid var(--line); border-radius: 26px; background: #fff; }.profile-list button { width: 100%; min-height: 76px; padding: 0 22px; border: 0; border-bottom: 1px solid var(--line); background: #fff; display: flex; align-items: center; gap: 15px; text-align: left; cursor: pointer; }.profile-list button:last-child { border-bottom: 0; }.profile-list button > span:nth-child(2) { flex: 1; }.profile-list strong, .profile-list small { display: block; }.profile-list strong { font-size: 14px; }.profile-list small { margin-top: 4px; color: var(--muted); font-size: 11px; }.list-icon { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 14px; display: grid; place-items: center; color: var(--blue); background: #eaf5ff; font-size: 18px; }
.trust-card { margin-top: 16px; padding: 20px; border-radius: 22px; display: flex; gap: 15px; color: #176846; background: #eafaf3; }.trust-shield { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--green); font-weight: 800; }.trust-card strong, .trust-card small { display: block; }.trust-card strong { font-size: 13px; }.trust-card small { margin-top: 5px; color: #5c8372; font-size: 11px; line-height: 1.5; }
.theme-card { margin-top: 16px; padding: 19px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface-solid); }.theme-card strong,.theme-card small { display: block; }.theme-card strong { font-size: 13px; }.theme-card small { margin-top: 4px; color: var(--muted); font-size: 10px; }.theme-switch { margin-top: 14px; padding: 4px; border-radius: 15px; background: #eaf1f6; display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; }.theme-switch button { min-height: 38px; border: 0; border-radius: 11px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 800; cursor: pointer; }.theme-switch button.active { color: var(--blue); background: var(--surface-solid); box-shadow: 0 6px 16px rgba(28,83,126,.1); }

.modal-backdrop { position: fixed; inset: 0; z-index: 49; background: rgba(4, 16, 31, .38); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.modal-backdrop.active { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; z-index: 50; width: min(520px, calc(100vw - 24px)); max-height: min(86vh, 790px); left: 50%; bottom: 12px; overflow: auto; padding: 18px 22px 24px; border: 1px solid rgba(198,219,235,.8); border-radius: 30px; background: #fff; box-shadow: 0 34px 100px rgba(10,44,76,.3); transform: translate(-50%, calc(100% + 30px)); transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.sheet.open { transform: translate(-50%, 0); }
.sheet-handle { width: 40px; height: 4px; margin: 0 auto 12px; border-radius: 99px; background: #bcc8d1; }.sheet-close { position: absolute; width: 34px; height: 34px; top: 17px; right: 17px; border: 0; border-radius: 50%; background: #eef3f7; color: #6b788a; font-size: 21px; cursor: pointer; }.sheet-heading { padding: 12px 34px 20px 0; }.sheet-heading.compact { padding-bottom: 14px; }.sheet-heading h2 { margin: 7px 0 8px; font-size: 25px; letter-spacing: -.035em; }.sheet-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.plan-list { display: grid; gap: 10px; }.plan-option { position: relative; min-height: 78px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 20px; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: left; cursor: pointer; }.plan-option.popular { margin-top: 9px; border: 2px solid var(--blue); background: #f4faff; }.plan-option > span { display: block; }.plan-option > span:last-child { text-align: right; }.plan-option strong, .plan-option small, .plan-option b { display: block; }.plan-option strong { font-size: 15px; }.plan-option b { font-size: 18px; }.plan-option small { margin-top: 3px; color: var(--muted); font-size: 10px; }.popular-label { position: absolute; top: -11px; left: 16px; padding: 4px 8px; border-radius: 999px; color: #fff; background: var(--blue); font-size: 8px; font-weight: 800; letter-spacing: .08em; }.plan-list + .secondary-button { width: 100%; margin-top: 12px; }
.setup-progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 4px 44px 12px 0; }.setup-progress span { height: 4px; border-radius: 10px; background: #e3ebf1; }.setup-progress span.active { background: var(--blue); }.setup-step { display: none; }.setup-step.active { display: block; animation: screen-in .22s ease both; }
.setup-skip { width: 100%; margin: 10px 0 0; padding: 9px 0; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; }
.setup-skip:hover { color: var(--blue); }
.sheet-close { display: none !important; }
.sheet-handle { cursor: grab; touch-action: none; }
.sheet-handle:active { cursor: grabbing; }
.setup-progress[hidden] { display: none; }
.device-options { display: grid; gap: 8px; }.device-options button { min-height: 62px; padding: 0 14px; border: 1px solid var(--line); border-radius: 17px; background: #fff; display: flex; align-items: center; gap: 13px; text-align: left; cursor: pointer; }.device-options button.selected { border-color: var(--blue); background: #f2f9ff; }.device-options button > span:nth-child(2) { flex: 1; }.device-options strong, .device-options small { display: block; }.device-options strong { font-size: 13px; }.device-options small { margin-top: 3px; color: var(--muted); font-size: 10px; }.platform-icon { width: 35px; text-align: center; color: var(--text); font-size: 18px; }.device-options i { width: 19px; height: 19px; border: 1.5px solid #b0bcc7; border-radius: 50%; }.device-options button.selected i { border: 5px solid var(--blue); }.full-width { width: 100%; margin-top: 14px; }
.platform-icon { height: 35px; display: grid; place-items: center; }
.platform-icon img { width: 24px; height: 24px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(10, 132, 255, .16)); }
.device-options button[data-device="android"] .platform-icon img { width: 26px; height: 26px; }
.device-options button[data-device="tv"] .platform-icon img { width: 25px; height: 25px; }
.app-options { display: grid; gap: 10px; }.app-option { min-height: 76px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 19px; color: inherit; background: #fff; display: flex; align-items: center; gap: 13px; text-decoration: none; }.app-option > span:nth-child(2) { flex: 1; }.app-logo { width: 48px; height: 48px; flex: 0 0 auto; border-radius: 15px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #2b3540, #0b0d10); font-size: 22px; font-weight: 800; }.app-logo.alt { background: linear-gradient(145deg, #4bbfff, #117ff0); }.app-option strong, .app-option small { display: block; }.app-option strong { font-size: 13px; }.app-option small { margin-top: 4px; color: var(--muted); font-size: 10px; }.app-option b { padding: 8px 11px; border-radius: 999px; color: var(--blue); background: #e7f4ff; font-size: 10px; }.setup-actions { display: grid; grid-template-columns: .65fr 1.35fr; gap: 9px; margin-top: 14px; }
.app-logo { overflow: hidden; }
.app-logo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.final-connect-card { padding: 25px; border-radius: 22px; background: linear-gradient(145deg, #e8f9ff, #eef5ff); text-align: center; }.connect-check { width: 58px; height: 58px; margin: 0 auto 12px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, var(--cyan), var(--blue)); font-size: 28px; font-weight: 800; }.final-connect-card strong, .final-connect-card small { display: block; }.final-connect-card small { max-width: 330px; margin: 6px auto 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.access-card { padding: 18px; }
.access-loading { min-height: 150px; display: grid; place-items: center; align-content: center; gap: 10px; }
.access-loading[hidden] { display: none; }
.access-loading span { width: 28px; height: 28px; border: 3px solid rgba(25,141,255,.2); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
.access-qr { width: min(210px, 72vw); aspect-ratio: 1; display: block; margin: 0 auto 14px; border-radius: 18px; background: #fff; padding: 10px; box-shadow: 0 12px 28px rgba(23,126,225,.16); }
.access-qr[hidden] { display: none; }
.subscription-copy { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; margin-top: 14px; padding: 8px 8px 8px 11px; border: 1px solid rgba(40,142,236,.22); border-radius: 14px; background: rgba(255,255,255,.68); text-align: left; }
.subscription-copy[hidden] { display: none; }
.subscription-copy span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); font-size: 10px; }
.subscription-copy button { border: 0; border-radius: 10px; padding: 9px 10px; color: #fff; background: var(--blue); font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; }
:root[data-theme="dark"] .access-card { background: rgba(16,47,73,.88); }
:root[data-theme="dark"] .subscription-copy { background: rgba(255,255,255,.07); border-color: rgba(116,200,255,.25); }
@property --wheel-angle { syntax: "<angle>"; inherits: true; initial-value: 0deg; }
.wheel-heading { text-align: center; padding-right: 0; }
.wheel-heading h2 { max-width: 420px; margin-inline: auto; }
.wheel-heading p { max-width: 430px; margin-inline: auto; }
.wheel-stage { position: relative; width: min(82vw, 390px); aspect-ratio: 1; margin: 8px auto 10px; padding: 6px; display: grid; place-items: center; }
.wheel-pointer { position: absolute; z-index: 7; width: 42px; height: 52px; top: -3px; left: 50%; transform: translateX(-50%); background: linear-gradient(180deg, #f9fdff 0%, #9be7ff 44%, #168fff 100%); clip-path: polygon(50% 100%, 0 0, 100% 0); filter: drop-shadow(0 8px 8px rgba(0,76,155,.28)); }
.bonus-wheel { --wheel-angle: 0deg; position: relative; width: 100%; height: 100%; border: 9px solid rgba(241,251,255,.98); border-radius: 50%; background: repeating-conic-gradient(from -22.5deg, rgba(255,255,255,.36) 0 44deg, rgba(255,255,255,.94) 44deg 45deg), conic-gradient(from -22.5deg, #62d7ff 0 45deg, #168ff0 45deg 90deg, #9ce9ff 90deg 135deg, #147fe1 135deg 180deg, #72dcff 180deg 225deg, #198ceb 225deg 270deg, #a9edff 270deg 315deg, #167bd8 315deg 360deg); box-shadow: 0 0 0 4px #1689ff, 0 24px 58px rgba(22,137,255,.3), inset 0 0 42px rgba(255,255,255,.62); transform: rotate(var(--wheel-angle)); transition: --wheel-angle 5.2s cubic-bezier(.12,.72,.08,1), transform 5.2s cubic-bezier(.12,.72,.08,1); }
.bonus-wheel::before { content: ""; position: absolute; inset: 4px; z-index: 1; border: 2px solid rgba(255,255,255,.84); border-radius: 50%; box-shadow: inset 0 0 28px rgba(255,255,255,.32); pointer-events: none; }
.bonus-wheel::after { content: ""; position: absolute; inset: 27%; z-index: 3; border: 2px solid rgba(255,255,255,.76); border-radius: 50%; pointer-events: none; }
.wheel-label { position:absolute; z-index:2; width:70px; min-height:48px; left:50%; top:50%; padding:5px 7px 6px; border:1px solid rgba(255,255,255,.86); border-radius:15px; transform:translate(-50%,-50%) rotate(calc(-1 * var(--wheel-angle))); display:grid; place-content:center; color:#07579b; background:rgba(247,253,255,.91); box-shadow:0 5px 14px rgba(1,77,147,.16), inset 0 1px 0 #fff; text-align:center; line-height:.88; text-shadow:none; transition:transform 5.2s cubic-bezier(.12,.72,.08,1); }
.wheel-label b { display:block; font-size:clamp(19px,5.2vw,27px); font-weight:950; letter-spacing:-.06em; }
.wheel-label small { display:block; margin-top:5px; color:#487696; font-size:9px; font-weight:850; letter-spacing:.02em; }
.wheel-label:nth-child(even) { color:#fff; border-color:rgba(173,228,255,.68); background:rgba(5,91,166,.86); box-shadow:0 5px 16px rgba(0,57,122,.24), inset 0 1px 0 rgba(255,255,255,.24); }
.wheel-label:nth-child(even) small { color:#d8f3ff; }
.wheel-label:nth-child(1) { left:50%; top:15.5%; }.wheel-label:nth-child(2) { left:74.5%; top:25.5%; }.wheel-label:nth-child(3) { left:84.5%; top:50%; }.wheel-label:nth-child(4) { left:74.5%; top:74.5%; }.wheel-label:nth-child(5) { left:50%; top:84.5%; }.wheel-label:nth-child(6) { left:25.5%; top:74.5%; }.wheel-label:nth-child(7) { left:15.5%; top:50%; }.wheel-label:nth-child(8) { left:25.5%; top:25.5%; }
.wheel-core { position: absolute; z-index: 5; width: 29%; aspect-ratio: 1; left: 35.5%; top: 35.5%; border: 7px solid rgba(255,255,255,.96); border-radius: 50%; background: radial-gradient(circle at 34% 26%, #d9f8ff, #64d9ff 38%, #1689ff 78%); display: grid; place-items: center; box-shadow: 0 12px 34px rgba(0,78,154,.28), inset 0 2px 0 rgba(255,255,255,.8); }
.wheel-core img { width: 88%; height: 88%; object-fit: contain; filter: drop-shadow(0 6px 7px rgba(0,59,125,.18)); }
.wheel-caption { margin:0 auto 12px; color:var(--muted); text-align:center; font-size:10px; font-weight:650; }
.wheel-result { min-height: 78px; padding: 14px 18px; border-radius: 20px; background: #edf8ff; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 12px; }
.wheel-result span { color: var(--muted); font-size: 12px; font-weight: 700; }.wheel-result strong { grid-row: span 2; color: var(--blue); font-size: 34px; }.wheel-result small { color: #597085; font-size: 10px; }
.wheel-result.won { background: linear-gradient(135deg, #e8fff4, #e8f7ff); animation: result-pop .55s cubic-bezier(.2,1.4,.2,1); }
.wheel-prizes { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:0 0 12px; }.wheel-prizes span { min-height:62px; padding:10px 7px; border:1px solid #d8e8f4; border-radius:18px; background:#f6fbff; display:grid; place-content:center; text-align:center; }.wheel-prizes span.jackpot { border-color:#8bd6ff; background:linear-gradient(145deg,#e8faff,#eef2ff); box-shadow:0 8px 22px rgba(22,137,255,.11); }.wheel-prizes b,.wheel-prizes small { display:block; }.wheel-prizes b { color:#0874dd; font-size:14px; }.wheel-prizes small { margin-top:4px; color:#6b7f91; font-size:9px; }
.wheel-spin-button[disabled] { opacity: .55; }
.mini-history { margin-top: 14px; display: grid; gap: 7px; }.mini-history:empty { display: none; }.mini-history-item { padding: 11px 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-solid); display: flex; align-items: center; justify-content: space-between; font-size: 11px; }.mini-history-item span { color: var(--muted); }
.history-list { display: grid; gap: 9px; }.history-empty { padding: 26px; border-radius: 20px; color: var(--muted); background: #f0f6fa; text-align: center; font-size: 12px; }.history-row { min-height: 68px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-solid); display: flex; align-items: center; gap: 12px; }.history-row > span:first-child { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 13px; color: var(--blue); background: #eaf5ff; display: grid; place-items: center; }.history-row > span:nth-child(2) { flex: 1; }.history-row strong,.history-row small { display: block; }.history-row strong { font-size: 12px; }.history-row small { margin-top: 4px; color: var(--muted); font-size: 9px; }.history-row b { font-size: 11px; }.history-row b.pending { color: var(--orange); }.history-row b.approved { color: var(--green); }
.payment-methods { display: grid; gap: 10px; }.payment-methods button { min-height: 78px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 19px; color: var(--text); background: var(--surface-solid); display: flex; align-items: center; gap: 13px; text-align: left; cursor: pointer; }.payment-methods button > span:first-child { width: 45px; height: 45px; border-radius: 14px; background: #eaf5ff; display: grid; place-items: center; font-size: 20px; }.payment-methods button > span:nth-child(2) { flex: 1; }.payment-methods strong,.payment-methods small { display: block; }.payment-methods strong { font-size: 12px; }.payment-methods small { margin-top: 4px; color: var(--muted); font-size: 9px; }.payment-methods b { color: var(--blue); font-size: 10px; }.payment-wait { padding: 26px 18px; border-radius: 20px; background: #edf8ff; text-align: center; }.payment-wait[hidden] { display: none; }.payment-wait strong,.payment-wait small { display: block; }.payment-wait strong { margin-top: 12px; }.payment-wait small { margin: 6px auto 0; max-width: 320px; color: var(--muted); font-size: 10px; line-height: 1.5; }.payment-spinner { width: 34px; height: 34px; margin: 0 auto; border: 3px solid #cde9ff; border-top-color: var(--blue); border-radius: 50%; display: block; animation: payment-spin .8s linear infinite; } @keyframes payment-spin { to { transform: rotate(360deg); } }
@keyframes result-pop { 50% { transform: scale(1.025); } }
.app-loader { position: fixed; inset: 0; z-index: 100; overflow: hidden; background: linear-gradient(145deg,#eefaff 0%,#f8fcff 46%,#dff4ff 100%); display: grid; place-content: center; justify-items: center; transition: opacity .42s ease, visibility .42s ease; }
.app-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-brand { width: clamp(210px,30vw,340px); display: grid; place-items: center; animation: loader-logo-in .65s cubic-bezier(.2,.85,.25,1) both, loader-breathe 2.4s .65s ease-in-out infinite; }
.loader-brand img { display: block; width: 100%; height: auto; object-fit: contain; filter: drop-shadow(0 18px 28px rgba(24,129,209,.23)); }
@keyframes loader-logo-in { from { opacity: 0; transform: translateY(8px) scale(.92); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes loader-breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.025); } }
@media (prefers-reduced-motion: reduce) { .loader-brand { animation-duration: .01ms; animation-iteration-count: 1; } }
.confetti { position: absolute; z-index: 70; width: 8px; height: 15px; left: var(--x); top: 44%; border-radius: 3px; background: hsl(var(--hue) 92% 57%); pointer-events: none; animation: confetti-fall 1.55s var(--delay) cubic-bezier(.2,.7,.2,1) both; }
@keyframes confetti-fall { from { opacity: 0; transform: translateY(-30px) rotate(0); } 15% { opacity: 1; } to { opacity: 0; transform: translateY(310px) rotate(520deg); } }
.toast { position: fixed; z-index: 80; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); max-width: calc(100vw - 30px); padding: 12px 16px; border-radius: 14px; color: #fff; background: rgba(9,22,40,.92); box-shadow: 0 12px 35px rgba(0,0,0,.2); font-size: 12px; font-weight: 700; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .2s ease; }.toast.show { opacity: 1; transform: translate(-50%, 0); }

:root[data-theme="dark"] .sidebar,
:root[data-theme="dark"] .bottom-nav { background: rgba(11,21,34,.92); border-color: var(--line); }
:root[data-theme="dark"] .nav-item.active,
:root[data-theme="dark"] .theme-switch,
:root[data-theme="dark"] .traffic-progress { background: #1b2b3e; }
:root[data-theme="dark"] .subscription-card,
:root[data-theme="dark"] .traffic-card,
:root[data-theme="dark"] .quick-card,
:root[data-theme="dark"] .device-card,
:root[data-theme="dark"] .stats-grid,
:root[data-theme="dark"] .how-card,
:root[data-theme="dark"] .profile-list,
:root[data-theme="dark"] .profile-list button,
:root[data-theme="dark"] .sheet,
:root[data-theme="dark"] .plan-option,
:root[data-theme="dark"] .device-options button,
:root[data-theme="dark"] .app-option { color: var(--text); background: var(--surface-solid); border-color: var(--line); }
:root[data-theme="dark"] .plan-option.popular,
:root[data-theme="dark"] .device-options button.selected { background: #152b42; }
:root[data-theme="dark"] .quick-card.blue,
:root[data-theme="dark"] .quick-card.cyan,
:root[data-theme="dark"] .quick-card.violet { background: #13263a; }
:root[data-theme="dark"] .app-loader { color: #eff7ff; background: linear-gradient(155deg,#08111f,#101d2d 48%,#0b2840); }
:root[data-theme="dark"] .sheet-close { color: var(--muted); background: #1b2b3e; }

@media (max-width: 900px) {
  :root { --sidebar: 230px; }
  .workspace { padding-inline: 24px; }
  .hero-mascot { width: 42%; right: -8px; }
  .hero-content { width: 68%; }
  .how-card ol { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  body { background: var(--bg); }
  .sidebar { display: none; }
  .workspace { margin-left: 0; padding: 0 14px calc(104px + env(safe-area-inset-bottom)); }
  .mobile-header { height: 70px; display: flex; align-items: center; justify-content: space-between; }
  .mobile-header .brand-mark { width: 34px; height: 34px; border-radius: 12px; font-size: 18px; }.mobile-header .brand-name { font-size: 20px; }
  .mobile-header .brand-logo { width: 106px; height: 48px; }
  .hero-card { min-height: 560px; padding: 24px; border-radius: 27px; }
  .hero-content { width: 100%; }.hero-card .eyebrow { margin-top: 105px; }.hero-card h1 { max-width: 330px; font-size: 34px; }.hero-copy { max-width: 290px; font-size: 13px; }.hero-button { position: relative; left: auto; top: auto; bottom: auto; width: calc(100vw - 76px); max-width: 360px; margin-top: 22px; }
  .hero-mascot { width: 155px; right: -24px; top: 24px; bottom: auto; }
  .section-heading { margin-top: 28px; }.section-heading h2 { font-size: 20px; }
  .subscription-card { padding: 19px; border-radius: 21px; }
  .quick-grid { grid-template-columns: 1fr; gap: 9px; }.quick-card { min-height: 76px; }.quick-icon { width: 44px; height: 44px; border-radius: 14px; }
  .device-grid { grid-template-columns: 1fr; }.device-card { min-height: 102px; }
  .page-heading { margin-top: 12px; text-align: left; }.page-heading h1 { font-size: 31px; }.page-heading p { font-size: 13px; }
  .referral-hero { min-height: 270px; padding: 26px; border-radius: 27px; }.stats-grid div { padding: 17px 7px; }.stats-grid strong { font-size: 20px; }.how-card { padding: 21px; }
  .profile-hero { padding-top: 20px; }.profile-list button { padding-inline: 16px; }
  .bottom-nav { position: fixed; inset: auto 0 0; z-index: 30; height: calc(76px + env(safe-area-inset-bottom)); padding: 7px 12px env(safe-area-inset-bottom); border-top: 1px solid rgba(201,220,234,.75); background: rgba(255,255,255,.91); backdrop-filter: blur(22px); display: grid; grid-template-columns: repeat(5, 1fr); align-items: start; box-shadow: 0 -15px 40px rgba(34,91,135,.08); }
  .bottom-nav button { position: relative; height: 56px; border: 0; background: transparent; color: #8a97a7; display: grid; place-content: center; gap: 3px; cursor: pointer; }.bottom-nav button.active { color: var(--blue); }.bottom-nav button > span { font-size: 21px; line-height: 1; }.bottom-nav small { font-size: 9px; font-weight: 700; }.bottom-nav .bottom-action { width: 56px; height: 56px; align-self: start; justify-self: center; margin-top: -22px; border-radius: 20px; color: #fff; background: linear-gradient(145deg, #25bdf0, #127eff); box-shadow: 0 14px 25px rgba(22,137,255,.3); }.bottom-nav .bottom-action span { font-size: 30px; }
  .sheet { width: 100%; max-height: 91vh; left: 0; bottom: 0; padding: 17px 17px calc(20px + env(safe-area-inset-bottom)); border-radius: 27px 27px 0 0; opacity: 0; visibility: hidden; pointer-events: none; transform: none; transition: none; }.sheet.open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }.sheet-heading h2 { font-size: 23px; }
}

/* Mobile sheets: one predictable level, an always-visible exit and a large swipe target. */
@media (max-width: 680px) {
  .sheet {
    box-sizing: border-box;
    width: calc(100% - 12px);
    height: min(80dvh, 720px);
    max-height: min(80dvh, 720px);
    left: 6px;
    bottom: 0;
    padding: 8px 17px calc(22px + env(safe-area-inset-bottom));
    border-radius: 30px 30px 0 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-padding-top: 54px;
    -webkit-overflow-scrolling: touch;
  }
  .sheet-handle {
    position: sticky;
    z-index: 12;
    top: 0;
    width: 74px;
    height: 32px;
    margin: -2px auto 0;
    border-radius: 0;
    background: transparent;
    display: grid;
    place-items: center;
  }
  .sheet-handle::before {
    content: "";
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: rgba(208,235,250,.9);
    box-shadow: 0 1px 0 rgba(255,255,255,.42);
  }
  .sheet-close {
    position: fixed;
    z-index: 14;
    top: calc(20dvh + 12px);
    right: 18px;
    float: none;
    width: 40px;
    height: 40px;
    margin: 0;
    border: 1px solid rgba(165,218,249,.42);
    border-radius: 15px;
    color: #eaf8ff;
    background: rgba(8,47,81,.78);
    box-shadow: 0 8px 22px rgba(2,24,46,.2), inset 0 1px 0 rgba(255,255,255,.2);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    display: grid !important;
    place-items: center;
    font-size: 25px;
    line-height: 1;
  }
  .sheet-heading {
    padding-top: 8px;
    padding-right: 52px;
  }
  body .sheet.open .sheet-close {
    display: grid !important;
  }
  #history-sheet,
  #wheel-sheet,
  #plans-sheet,
  #setup-sheet,
  #payment-sheet {
    height: min(80dvh, 720px);
  }
  #wheel-prize-sheet,
  #gift-success-sheet {
    height: auto;
    max-height: min(72dvh, 620px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* BLUP Liquid Glass — translucent controls with a bright specular edge. */
:root {
  --glass: rgba(255,255,255,.58);
  --glass-strong: rgba(255,255,255,.76);
  --glass-line: rgba(255,255,255,.78);
  --glass-shadow: 0 18px 48px rgba(32,93,143,.14), inset 0 1px 0 rgba(255,255,255,.92), inset 0 -1px 0 rgba(122,181,225,.13);
}
:root[data-theme="dark"] {
  --glass: rgba(19,31,48,.57);
  --glass-strong: rgba(24,39,59,.75);
  --glass-line: rgba(255,255,255,.13);
  --glass-shadow: 0 20px 55px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.12), inset 0 -1px 0 rgba(0,0,0,.2);
}
body {
  background:
    radial-gradient(70vw 48vw at 84% 6%, rgba(65,203,255,.2), transparent 70%),
    radial-gradient(62vw 50vw at 8% 74%, rgba(112,98,255,.13), transparent 72%),
    var(--bg);
  background-attachment: fixed;
}
.sidebar, .subscription-card, .traffic-card, .quick-card, .device-card,
.stats-grid, .how-card, .profile-list, .profile-list button, .theme-card, .sheet, .plan-option,
.device-options button, .app-option, .payment-methods button, .history-row,
.mini-history-item, .wheel-result, .wheel-prizes span {
  background: var(--glass);
  border-color: var(--glass-line);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(155%);
  backdrop-filter: blur(24px) saturate(155%);
}
.primary-button, .secondary-button, .light-button, .ghost-button,
.hero-button, .round-add, .theme-switch button.active, .sheet-close {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--glass-line);
  box-shadow: 0 12px 30px rgba(23,111,183,.18), inset 0 1px 0 rgba(255,255,255,.7), inset 0 -1px 0 rgba(0,83,174,.12);
  -webkit-backdrop-filter: blur(18px) saturate(165%);
  backdrop-filter: blur(18px) saturate(165%);
}
.primary-button::after, .secondary-button::after, .light-button::after,
.ghost-button::after, .hero-button::after, .round-add::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(255,255,255,.46), transparent 38%, rgba(255,255,255,.08) 72%, rgba(255,255,255,.24));
}
.primary-button { background: linear-gradient(135deg, rgba(29,157,255,.92), rgba(24,101,239,.9)); }
.secondary-button { background: rgba(225,244,255,.68); }
.light-button, .hero-button { background: rgba(255,255,255,.7); }
.ghost-button, .sheet-close { background: rgba(232,241,248,.63); }
.quick-card.blue, .quick-card.cyan, .quick-card.violet { background: var(--glass); }
.quick-icon, .brand-mark, .bottom-nav .bottom-action {
  border: 1px solid rgba(255,255,255,.62);
  box-shadow: 0 13px 30px rgba(22,137,255,.24), inset 0 1px 0 rgba(255,255,255,.65);
}
.sheet { background: var(--glass-strong); }
.toast {
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(8,20,37,.72);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
}
:root[data-theme="dark"] .subscription-card,
:root[data-theme="dark"] .traffic-card,
:root[data-theme="dark"] .quick-card,
:root[data-theme="dark"] .device-card,
:root[data-theme="dark"] .stats-grid,
:root[data-theme="dark"] .how-card,
:root[data-theme="dark"] .profile-list,
:root[data-theme="dark"] .profile-list button,
:root[data-theme="dark"] .sheet,
:root[data-theme="dark"] .plan-option,
:root[data-theme="dark"] .device-options button,
:root[data-theme="dark"] .app-option { background: var(--glass); border-color: var(--glass-line); }

@media (max-width: 680px) {
  .bottom-nav {
    inset: auto 10px calc(8px + env(safe-area-inset-bottom));
    width: auto;
    height: 68px;
    padding: 6px 8px;
    border: 1px solid var(--glass-line);
    border-radius: 25px;
    background: var(--glass-strong);
    box-shadow: 0 20px 55px rgba(25,74,116,.22), inset 0 1px 0 rgba(255,255,255,.85);
    -webkit-backdrop-filter: blur(30px) saturate(175%);
    backdrop-filter: blur(30px) saturate(175%);
  }
  .bottom-nav button { height: 54px; border-radius: 18px; transition: background .2s ease, transform .2s ease; }
  .bottom-nav button.active:not(.bottom-action) {
    background: rgba(255,255,255,.48);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 8px 20px rgba(38,107,164,.1);
  }
  .bottom-nav .bottom-action { margin-top: -16px; }
  :root[data-theme="dark"] .bottom-nav { background: var(--glass-strong); border-color: var(--glass-line); }
  :root[data-theme="dark"] .bottom-nav button.active:not(.bottom-action) { background: rgba(255,255,255,.09); }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .sidebar, .subscription-card, .traffic-card, .quick-card, .device-card,
  .stats-grid, .how-card, .profile-list, .theme-card, .sheet, .bottom-nav { background: var(--surface-solid); }
}

/* One-action onboarding: trial first, setup second. */
.onboarding-card {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  padding: clamp(30px, 5vw, 58px);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 34px;
  color: #071d36;
  background:
    radial-gradient(circle at 86% 16%, rgba(255,255,255,.72), transparent 25%),
    linear-gradient(135deg, rgba(221,247,255,.93), rgba(147,224,255,.87) 55%, rgba(93,184,255,.8));
  box-shadow: var(--glass-shadow);
  isolation: isolate;
}
.onboarding-card[hidden] { display: none !important; }
.onboarding-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .55;
  background-image: radial-gradient(circle, rgba(255,255,255,.8) 1px, transparent 1.5px);
  background-size: 23px 23px;
  mask-image: linear-gradient(90deg, #000, transparent 82%);
}
.onboarding-copy { position: relative; z-index: 2; width: min(58%, 540px); }
.onboarding-copy .eyebrow { margin: 24px 0 8px; color: #1577d5; }
.onboarding-copy h1 { margin: 0; font-size: clamp(42px, 5.2vw, 68px); line-height: .98; letter-spacing: -.055em; }
.onboarding-copy > p:not(.eyebrow) { max-width: 480px; margin: 18px 0 24px; color: #36556f; font-size: 16px; line-height: 1.5; }
.onboarding-button { width: min(100%, 390px); min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding-inline: 22px; font-size: 16px; }
.onboarding-copy > small { display: block; margin-top: 12px; color: #52718c; font-weight: 700; }
.onboarding-mascot-wrap { position: absolute; inset: 20px 2% 0 auto; width: min(42%, 390px); display: grid; place-items: center; }
.onboarding-mascot-wrap img { position: relative; z-index: 1; width: 100%; max-height: 345px; object-fit: contain; filter: drop-shadow(0 28px 25px rgba(27,108,178,.2)); animation: mascot-float 5.2s ease-in-out infinite; }
.onboarding-mascot-wrap .glass-orb { position: absolute; width: 82%; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.27); border: 1px solid rgba(255,255,255,.64); box-shadow: inset 0 1px 0 #fff, 0 24px 60px rgba(36,118,181,.13); backdrop-filter: blur(12px); }

#screen-home.onboarding-mode > .hero-card,
#screen-home.onboarding-mode > .plan-heading,
#screen-home.onboarding-mode > .subscription-card,
#screen-home.onboarding-mode > .expiry-alert,
#screen-home.onboarding-mode > .traffic-card,
#screen-home.onboarding-mode > .quick-grid,
#screen-home.onboarding-mode > .section-heading:not(.plan-heading),
#screen-home.onboarding-mode > .device-grid { display: none !important; }
.onboarding-active .side-nav,
.onboarding-active .sidebar-help,
.onboarding-active .bottom-nav { display: none !important; }

@media (max-width: 680px) {
  .onboarding-card { min-height: 520px; padding: 23px 20px 26px; border-radius: 27px; }
  .onboarding-copy { width: 100%; }
  .onboarding-copy .eyebrow { margin-top: 142px; }
  .onboarding-copy h1 { font-size: 39px; }
  .onboarding-copy > p:not(.eyebrow) { margin: 14px 0 19px; max-width: 330px; font-size: 14px; }
  .onboarding-button { width: 100%; min-height: 57px; }
  .onboarding-mascot-wrap { inset: 5px -5px auto auto; width: 175px; height: 175px; }
  .onboarding-mascot-wrap img { max-height: 170px; }
  #screen-home.onboarding-mode { padding-bottom: 88px; }
}

/* BLUP Glass 2.0 — soft Apple-like depth, coherent icons and motion. */
:root {
  --radius-xs: 14px;
  --radius-sm: 20px;
  --radius-md: 26px;
  --radius-lg: 34px;
  --glass-card: rgba(255,255,255,.64);
  --glass-card-strong: rgba(255,255,255,.78);
  --glass-border: rgba(255,255,255,.78);
  --soft-blue: rgba(89,177,255,.19);
  --soft-violet: rgba(137,114,255,.15);
  --spring: cubic-bezier(.22,1,.36,1);
}
:root[data-theme="dark"] {
  --glass-card: rgba(16,29,47,.62);
  --glass-card-strong: rgba(20,36,57,.8);
  --glass-border: rgba(255,255,255,.12);
  --soft-blue: rgba(45,152,255,.17);
  --soft-violet: rgba(128,104,255,.14);
}
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.ui-icon {
  width: 1.25em;
  height: 1.25em;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 78% -8%, rgba(78,205,255,.24), transparent 36%),
    radial-gradient(circle at -8% 70%, rgba(121,101,255,.17), transparent 38%),
    linear-gradient(150deg, #f5fbff 0%, #edf8ff 45%, #f7f5ff 100%);
}
:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 78% -8%, rgba(37,161,230,.18), transparent 38%),
    radial-gradient(circle at -8% 70%, rgba(105,78,231,.16), transparent 40%),
    linear-gradient(150deg, #07111f 0%, #091827 50%, #0d1324 100%);
}
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 42vw;
  min-width: 380px;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(70px);
  opacity: .48;
  will-change: transform;
  animation: ambient-drift 18s var(--spring) infinite alternate;
}
body::before {
  top: -24vw;
  right: -10vw;
  background: radial-gradient(circle, rgba(74,210,255,.62), transparent 68%);
}
body::after {
  left: -17vw;
  bottom: -25vw;
  background: radial-gradient(circle, rgba(128,105,255,.46), transparent 68%);
  animation-delay: -8s;
}
@keyframes ambient-drift {
  to { transform: translate3d(6vw, 5vh, 0) scale(1.13); }
}
.sidebar {
  inset: 18px auto 18px 18px;
  height: auto;
  width: calc(var(--sidebar) - 18px);
  padding: 24px 20px;
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  background: var(--glass-card);
  box-shadow: 0 28px 80px rgba(40,102,151,.14), inset 0 1px 0 rgba(255,255,255,.72);
  -webkit-backdrop-filter: blur(34px) saturate(175%);
  backdrop-filter: blur(34px) saturate(175%);
}
.workspace { margin-left: calc(var(--sidebar) + 2px); }
.brand-mark,
.avatar {
  border: 1px solid rgba(255,255,255,.78);
  box-shadow: 0 14px 35px rgba(18,137,238,.25), inset 0 1px 1px rgba(255,255,255,.74);
}
.brand-mark { border-radius: 15px; }
.avatar-small { border-radius: 16px; }
.avatar-large {
  width: 104px;
  height: 104px;
  border-radius: 36px;
  box-shadow: 0 22px 55px rgba(21,139,232,.28), inset 0 1px 1px rgba(255,255,255,.72);
}
.nav-item {
  min-height: 52px;
  border-radius: 18px;
  transition: color .22s ease, background .22s ease, transform .22s var(--spring), box-shadow .22s ease;
}
.nav-item:hover { transform: translateX(3px); }
.nav-item.active {
  background: rgba(255,255,255,.62);
  box-shadow: 0 12px 28px rgba(45,104,151,.1), inset 0 1px 0 rgba(255,255,255,.85);
}
:root[data-theme="dark"] .nav-item.active { background: rgba(255,255,255,.09); }
.nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #1689ff;
  background: rgba(74,169,255,.12);
}
.nav-icon .ui-icon { width: 19px; height: 19px; }
.sidebar-help span {
  border: 0;
  background: rgba(74,169,255,.11);
}
.sidebar-help .ui-icon { width: 16px; height: 16px; }
.hero-card,
.onboarding-card {
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 38px;
  box-shadow: 0 34px 90px rgba(18,102,178,.2), inset 0 1px 0 rgba(255,255,255,.6);
}
.hero-card {
  background:
    radial-gradient(circle at 83% 17%, rgba(255,255,255,.4), transparent 24%),
    radial-gradient(circle at 72% 92%, rgba(111,91,255,.22), transparent 31%),
    linear-gradient(128deg, #087cf2 0%, #18b6ec 52%, #7bdcff 100%);
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(255,255,255,.18), transparent 36%);
  pointer-events: none;
}
.status-pill {
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(5,66,126,.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.primary-button,
.secondary-button,
.light-button,
.ghost-button,
.hero-button {
  border-radius: 20px;
  transition: transform .25s var(--spring), box-shadow .25s ease, filter .25s ease, opacity .2s ease;
}
.primary-button:not(:disabled):hover,
.secondary-button:not(:disabled):hover,
.light-button:not(:disabled):hover,
.hero-button:hover {
  transform: translateY(-2px) scale(1.01);
  filter: brightness(1.03);
}
.hero-button {
  min-height: 58px;
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(255,255,255,.88);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
}
.subscription-card,
.traffic-card,
.quick-card,
.device-card,
.stats-grid,
.how-card,
.profile-list,
.theme-card,
.trust-card {
  border: 1px solid var(--glass-border);
  background: var(--glass-card);
  box-shadow: 0 20px 55px rgba(36,96,145,.11), inset 0 1px 0 rgba(255,255,255,.72);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
  backdrop-filter: blur(28px) saturate(165%);
}
.subscription-card {
  position: relative;
  overflow: hidden;
  padding: 27px;
  border-radius: 30px;
}
.subscription-card::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -80px;
  top: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(55,190,255,.22), transparent 70%);
  pointer-events: none;
}
.subscription-badge {
  border: 1px solid rgba(33,194,124,.16);
  background: rgba(224,255,244,.72);
}
.subscription-progress,
.traffic-progress {
  background: rgba(117,151,179,.13);
  box-shadow: inset 0 1px 3px rgba(38,80,116,.08);
}
.subscription-progress { height: 10px; }
.subscription-progress span,
.traffic-progress span {
  box-shadow: 0 0 16px rgba(33,172,244,.32);
}
.traffic-card {
  padding: 22px;
  border-radius: 28px;
}
.traffic-heading button,
.round-add {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.72);
  background: rgba(225,244,255,.7);
  box-shadow: 0 10px 25px rgba(23,131,219,.13), inset 0 1px 0 #fff;
}
.traffic-heading button .ui-icon { width: 19px; height: 19px; }
.traffic-heading button.loading .ui-icon { animation: payment-spin .7s linear infinite; }
.quick-grid { gap: 16px; }
.quick-card {
  min-height: 108px;
  padding: 18px;
  border-radius: 28px;
  background: var(--glass-card);
}
.quick-card.blue,
.quick-card.cyan,
.quick-card.violet { background: var(--glass-card); }
.quick-card:hover,
.device-card:hover,
.profile-list button:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 28px 60px rgba(35,100,153,.16), inset 0 1px 0 rgba(255,255,255,.82);
}
.quick-icon {
  width: 54px;
  height: 54px;
  border-radius: 19px;
}
.quick-icon .ui-icon { width: 25px; height: 25px; stroke-width: 1.9; }
.round-add { border-radius: 16px; }
.round-add .ui-icon { width: 21px; height: 21px; }
.device-card { border-radius: 30px; }
.device-plus {
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 21px;
  background: rgba(221,243,255,.62);
}
.device-plus .ui-icon { width: 25px; height: 25px; }
.chevron {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}
.chevron .ui-icon { width: 18px; height: 18px; }
.referral-hero {
  border: 1px solid rgba(255,255,255,.68);
  border-radius: 38px;
  background:
    radial-gradient(circle at 76% 12%, rgba(255,255,255,.34), transparent 24%),
    linear-gradient(135deg, #087ff5, #23c9ec);
  box-shadow: 0 34px 90px rgba(18,102,178,.2), inset 0 1px 0 rgba(255,255,255,.58);
}
.referral-icon {
  border-radius: 22px;
  background: rgba(255,255,255,.82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.referral-icon .ui-icon { width: 29px; height: 29px; }
.stats-grid,
.how-card,
.profile-list { border-radius: 30px; }
.profile-list button {
  background: transparent;
  transition: background .2s ease, transform .22s var(--spring), box-shadow .22s ease;
}
.profile-list button:hover { background: rgba(255,255,255,.35); }
.list-icon {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 16px;
  background: rgba(221,243,255,.62);
}
.list-icon .ui-icon { width: 21px; height: 21px; }
.theme-card,
.trust-card { border-radius: 28px; }
.trust-card { color: var(--text); background: var(--glass-card); }
.trust-shield {
  border-radius: 15px;
  box-shadow: 0 12px 28px rgba(28,191,121,.22);
}
.trust-shield .ui-icon { width: 21px; height: 21px; }
.sheet {
  border: 1px solid var(--glass-border);
  border-radius: 38px;
  background: var(--glass-card-strong);
  box-shadow: 0 45px 120px rgba(8,35,60,.32), inset 0 1px 0 rgba(255,255,255,.78);
  -webkit-backdrop-filter: blur(38px) saturate(180%);
  backdrop-filter: blur(38px) saturate(180%);
}
.plan-option,
.device-options button,
.app-option,
.payment-methods button,
.history-row,
.wheel-prizes span {
  border-color: var(--glass-border);
  border-radius: 22px;
  background: rgba(255,255,255,.48);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.68);
  transition: transform .22s var(--spring), border-color .2s ease, background .2s ease;
}
.plan-option:hover,
.device-options button:hover,
.app-option:hover,
.payment-methods button:hover { transform: translateY(-2px); }
:root[data-theme="dark"] .plan-option,
:root[data-theme="dark"] .device-options button,
:root[data-theme="dark"] .app-option,
:root[data-theme="dark"] .payment-methods button,
:root[data-theme="dark"] .history-row,
:root[data-theme="dark"] .wheel-prizes span { background: rgba(255,255,255,.055); }
.screen.active > * {
  animation: glass-rise .58s var(--spring) both;
}
.screen.active > *:nth-child(2) { animation-delay: .035s; }
.screen.active > *:nth-child(3) { animation-delay: .07s; }
.screen.active > *:nth-child(4) { animation-delay: .105s; }
.screen.active > *:nth-child(5) { animation-delay: .14s; }
.screen.active > *:nth-child(6) { animation-delay: .175s; }
@keyframes glass-rise {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 680px) {
  body::before,
  body::after { min-width: 330px; filter: blur(58px); }
  .workspace { margin-left: 0; padding-inline: 12px; }
  .mobile-header { height: 68px; padding: 0 3px; }
  .hero-card {
    min-height: 492px;
    padding: 22px;
    border-radius: 32px;
  }
  .hero-card .eyebrow { margin-top: 126px; }
  .hero-card h1 { font-size: 36px; }
  .hero-mascot { width: 148px; right: -18px; top: 18px; }
  .onboarding-card { min-height: 492px; border-radius: 32px; }
  .subscription-card,
  .traffic-card,
  .quick-card,
  .device-card,
  .profile-list,
  .theme-card,
  .trust-card { border-radius: 27px; }
  .quick-grid { grid-template-columns: 1fr; }
  .quick-card { min-height: 82px; }
  .quick-icon { width: 48px; height: 48px; border-radius: 17px; }
  .bottom-nav {
    border-radius: 28px;
    background: var(--glass-card-strong);
    box-shadow: 0 22px 58px rgba(23,73,113,.25), inset 0 1px 0 rgba(255,255,255,.8);
  }
  .bottom-nav button > span {
    display: grid;
    place-items: center;
  }
  .bottom-nav .ui-icon { width: 21px; height: 21px; }
  .bottom-nav .bottom-action .ui-icon { width: 26px; height: 26px; }
  .sheet { border-radius: 34px 34px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after,
  .screen.active > * { animation: none !important; }
}

/* BLUP Dashboard 3.0 — compact account-first home screen. */
.dashboard-card {
  position: relative;
  overflow: hidden;
  padding: 25px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 32px;
  color: #071d36;
  background:
    radial-gradient(circle at 86% 4%, rgba(255,255,255,.78), transparent 23%),
    radial-gradient(circle at 4% 100%, rgba(98,120,255,.17), transparent 31%),
    linear-gradient(145deg, rgba(222,247,255,.96), rgba(154,226,255,.92) 55%, rgba(101,188,255,.88));
  box-shadow: 0 28px 80px rgba(18,102,178,.19), inset 0 1px 0 rgba(255,255,255,.9);
  isolation: isolate;
}
.dashboard-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .48;
  background-image: radial-gradient(circle, rgba(255,255,255,.9) 1px, transparent 1.45px);
  background-size: 21px 21px;
  mask-image: linear-gradient(90deg, #000, transparent 90%);
}
.dashboard-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 260px;
  height: 260px;
  right: -100px;
  bottom: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.65);
  background: rgba(255,255,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82);
}
.dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.dashboard-overline {
  display: block;
  margin-bottom: 8px;
  color: #1776cf;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .17em;
}
.dashboard-card .status-pill,
.onboarding-card .status-pill {
  color: #0b365d;
  background: rgba(255,255,255,.48);
  border-color: rgba(255,255,255,.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.dashboard-card .status-pill.inactive {
  color: #7c4814;
  background: rgba(255,240,216,.66);
  border-color: rgba(255,226,181,.86);
}
.dashboard-help {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 15px;
  color: #0b5797;
  background: rgba(255,255,255,.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.dashboard-help .ui-icon { width: 21px; height: 21px; }
.dashboard-summary {
  margin: 22px 0 0;
  text-align: center;
}
.dashboard-summary > span {
  display: block;
  color: rgba(19,64,99,.66);
  font-size: 11px;
  font-weight: 700;
}
.dashboard-summary > strong {
  display: block;
  margin-top: 1px;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: -.055em;
}
.dashboard-meta {
  margin-top: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
}
.dashboard-meta > span {
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  color: #315a7b;
  background: rgba(255,255,255,.43);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
  font-size: 10px;
  font-weight: 700;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.dashboard-meta .subscription-badge {
  color: #087b4a;
  background: rgba(225,255,242,.69);
}
.dashboard-meta .subscription-badge.inactive {
  color: #a0520c;
  background: rgba(255,240,216,.76);
}
.dashboard-progress {
  width: min(100%, 520px);
  height: 6px;
  margin: 18px auto 8px;
  background: rgba(36,101,147,.13);
}
.dashboard-end {
  color: rgba(30,73,106,.68);
  text-align: center;
  font-size: 10px;
}
.dashboard-end b { color: #143d5d; }
.dashboard-actions {
  position: relative;
  z-index: 2;
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.dashboard-actions button {
  min-width: 0;
  min-height: 82px;
  padding: 10px 6px;
  border: 1px solid rgba(255,255,255,.77);
  border-radius: 20px;
  color: #163f62;
  background: rgba(255,255,255,.5);
  box-shadow: 0 10px 22px rgba(31,107,163,.08), inset 0 1px 0 rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  cursor: pointer;
  transition: transform .22s var(--spring), background .2s ease, box-shadow .2s ease;
}
.dashboard-actions button:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,.65);
  box-shadow: 0 15px 30px rgba(31,107,163,.13), inset 0 1px 0 #fff;
}
.dashboard-actions button:active { transform: scale(.97); }
.dashboard-actions button > span {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #087ce9;
  background: rgba(225,245,255,.8);
  display: grid;
  place-items: center;
}
.dashboard-actions .ui-icon { width: 18px; height: 18px; }
.dashboard-actions b {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}
.dashboard-actions i {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  color: #fff;
  background: #765cff;
  box-shadow: 0 4px 10px rgba(90,70,220,.27);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  line-height: 17px;
}
.dashboard-connect {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, rgba(12,127,243,.94), rgba(49,178,244,.94));
  box-shadow: 0 13px 28px rgba(15,119,210,.22), inset 0 1px 0 rgba(255,255,255,.27);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.dashboard-connect > span {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(255,255,255,.17);
  display: grid;
  place-items: center;
}
.dashboard-connect b { flex: 1; text-align: left; font-size: 12px; }
.dashboard-connect .ui-icon { width: 18px; height: 18px; }
.dashboard-connect > .ui-icon:last-child { width: 15px; opacity: .78; }

.dashboard-promo {
  width: 100%;
  min-height: 74px;
  margin-top: 13px;
  padding: 13px 16px;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  color: var(--text);
  background: var(--glass-card);
  box-shadow: 0 16px 40px rgba(36,96,145,.09), inset 0 1px 0 rgba(255,255,255,.74);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  cursor: pointer;
  transition: transform .22s var(--spring), box-shadow .2s ease;
}
.dashboard-promo:hover { transform: translateY(-2px); box-shadow: 0 22px 46px rgba(36,96,145,.13); }
.dashboard-promo > span:nth-child(2) { min-width: 0; flex: 1; }
.dashboard-promo strong,
.dashboard-promo small { display: block; }
.dashboard-promo strong { font-size: 12px; }
.dashboard-promo small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.promo-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #37c6f5, #087df0);
  box-shadow: 0 10px 22px rgba(14,126,221,.21);
  display: grid;
  place-items: center;
}
.promo-icon .ui-icon { width: 19px; height: 19px; }
.devices-heading { margin-top: 25px; }
.compact-traffic { margin-top: 14px; }
.compact-traffic-row {
  margin-top: 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.compact-traffic .traffic-value { margin: 0; font-size: 24px; }
.compact-traffic-row small { color: var(--muted); font-size: 10px; text-align: right; }

.onboarding-card {
  min-height: 315px;
  padding: 28px 30px;
  border-radius: 32px;
}
.onboarding-copy { width: min(61%, 530px); }
.onboarding-copy .dashboard-overline { margin-bottom: 10px; }
.onboarding-copy h1 {
  margin: 16px 0 8px;
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1;
  letter-spacing: -.05em;
}
.onboarding-copy h1 b { font-size: 1.22em; }
.onboarding-copy > p:not(.eyebrow) { margin: 11px 0 17px; font-size: 14px; line-height: 1.45; }
.onboarding-button { min-height: 51px; }
.onboarding-mascot-wrap { inset: 5px 3% 0 auto; width: min(35%, 300px); }
.onboarding-mascot-wrap img { max-height: 270px; }

#screen-home.onboarding-mode > .dashboard-card,
#screen-home.onboarding-mode > .expiry-alert,
#screen-home.onboarding-mode > .dashboard-promo,
#screen-home.onboarding-mode > .devices-heading,
#screen-home.onboarding-mode > .device-grid,
#screen-home.onboarding-mode > .traffic-card { display: none !important; }
.onboarding-active .side-nav { display: grid !important; }
.onboarding-active .sidebar-help { display: flex !important; }

.starter-dashboard {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  background: var(--glass-card);
  box-shadow: 0 22px 58px rgba(29,92,145,.11), inset 0 1px 0 rgba(255,255,255,.78);
  -webkit-backdrop-filter: blur(30px) saturate(165%);
  backdrop-filter: blur(30px) saturate(165%);
}
.starter-dashboard[hidden] { display: none !important; }
.starter-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}
.starter-heading h2 { margin: 5px 0 0; font-size: 25px; letter-spacing: -.035em; }
.starter-ready {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 7px 11px;
  border: 1px solid rgba(35,195,127,.18);
  border-radius: 999px;
  color: #16865d;
  background: rgba(228,255,245,.74);
  font-size: 10px;
  font-weight: 800;
}
.starter-ready i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #27d790; box-shadow: 0 0 0 5px rgba(39,215,144,.11); }
.starter-actions {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.starter-actions > button {
  min-width: 0;
  min-height: 78px;
  padding: 13px 14px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 21px;
  color: var(--text);
  background: rgba(255,255,255,.48);
  box-shadow: 0 12px 28px rgba(37,97,144,.08), inset 0 1px 0 rgba(255,255,255,.9);
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: transform .22s var(--spring), box-shadow .22s ease, background .22s ease;
}
.starter-actions > button:hover { transform: translateY(-2px); background: rgba(255,255,255,.67); box-shadow: 0 18px 34px rgba(37,97,144,.13), inset 0 1px 0 #fff; }
.starter-actions > button:active { transform: scale(.985); }
.starter-actions > button > span:nth-child(2) { min-width: 0; flex: 1; }
.starter-actions strong, .starter-actions small { display: block; }
.starter-actions strong { font-size: 13px; }
.starter-actions small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.starter-action-icon {
  position: relative;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  border-radius: 15px;
  color: #1689ff;
  background: rgba(221,243,255,.82);
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}
.starter-action-icon.primary { color: #fff; background: linear-gradient(145deg,#22b9f3,#1478f5); box-shadow: 0 10px 22px rgba(22,126,231,.2), inset 0 1px 0 rgba(255,255,255,.3); }
.starter-action-icon.violet { color: #fff; background: linear-gradient(145deg,#8d79ff,#5a5df4); }
.starter-action-icon .ui-icon { width: 20px; height: 20px; }
.starter-action-icon i {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 2px solid rgba(255,255,255,.9);
  border-radius: 999px;
  color: #fff;
  background: #6656ee;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  line-height: 14px;
  text-align: center;
}
.starter-chevron { width: 16px; height: 16px; flex: 0 0 auto; color: #8aa2b8; }
.starter-route {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(105,177,230,.16);
  border-radius: 21px;
  background: rgba(230,247,255,.48);
  display: grid;
  grid-template-columns: 1fr 24px 1fr 24px 1fr;
  align-items: center;
  gap: 8px;
}
.starter-route > div { min-width: 0; display: flex; align-items: center; gap: 9px; }
.starter-route > div > b { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 10px; color: #fff; background: linear-gradient(145deg,#28b8f2,#187cf2); display: grid; place-items: center; font-size: 11px; }
.starter-route strong, .starter-route small { display: block; }
.starter-route strong { font-size: 10px; }
.starter-route small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.starter-route > i { height: 1px; background: linear-gradient(90deg,rgba(24,137,244,.16),rgba(24,137,244,.65)); }
.starter-benefits {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 9px;
}
.starter-benefits > span {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.68);
  border-radius: 18px;
  background: rgba(255,255,255,.34);
}
.starter-benefits .ui-icon { width: 18px; height: 18px; margin-bottom: 8px; color: #1689ff; }
.starter-benefits b, .starter-benefits small { display: block; }
.starter-benefits b { font-size: 10px; }
.starter-benefits small { margin-top: 3px; color: var(--muted); font-size: 8px; }
:root[data-theme="dark"] .starter-dashboard { background: rgba(13,35,57,.72); border-color: rgba(113,194,255,.16); box-shadow: 0 24px 60px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.07); }
:root[data-theme="dark"] .starter-actions > button,
:root[data-theme="dark"] .starter-benefits > span { background: rgba(255,255,255,.065); border-color: rgba(255,255,255,.11); }
:root[data-theme="dark"] .starter-route { background: rgba(38,129,196,.09); border-color: rgba(91,180,245,.13); }
:root[data-theme="dark"] .starter-ready { color: #6ee7b5; background: rgba(30,177,118,.1); }

:root[data-theme="dark"] .dashboard-card {
  color: #eef8ff;
  border-color: rgba(137,210,255,.22);
  background:
    radial-gradient(circle at 86% 4%, rgba(99,203,255,.16), transparent 24%),
    radial-gradient(circle at 4% 100%, rgba(94,76,242,.19), transparent 31%),
    linear-gradient(145deg, rgba(17,49,75,.96), rgba(11,76,110,.95) 56%, rgba(16,94,142,.93));
  box-shadow: 0 30px 90px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.09);
}
:root[data-theme="dark"] .dashboard-overline { color: #6dc7ff; }
:root[data-theme="dark"] .dashboard-card .status-pill { color: #d9f1ff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.13); }
:root[data-theme="dark"] .dashboard-summary > span,
:root[data-theme="dark"] .dashboard-end { color: rgba(218,239,255,.63); }
:root[data-theme="dark"] .dashboard-end b { color: #eef8ff; }
:root[data-theme="dark"] .dashboard-meta > span { color: #d8efff; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.13); }
:root[data-theme="dark"] .dashboard-meta .subscription-badge { color: #70edb3; background: rgba(32,178,113,.12); }
:root[data-theme="dark"] .dashboard-actions button { color: #eef8ff; background: rgba(255,255,255,.075); border-color: rgba(255,255,255,.13); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
:root[data-theme="dark"] .dashboard-actions button > span { background: rgba(48,167,245,.13); }
:root[data-theme="dark"] .dashboard-help { color: #8ed4ff; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.13); }

@media (max-width: 680px) {
  .dashboard-card {
    padding: 18px 16px 16px;
    border-radius: 28px;
  }
  .dashboard-card::after { width: 210px; height: 210px; right: -120px; bottom: 35px; }
  .dashboard-help { width: 38px; height: 38px; border-radius: 13px; }
  .dashboard-summary { margin-top: 13px; }
  .dashboard-summary > strong { font-size: 42px; }
  .dashboard-meta { margin-top: 9px; gap: 5px; }
  .dashboard-meta > span { min-height: 25px; padding: 5px 8px; font-size: 9px; }
  .dashboard-progress { margin-top: 13px; }
  .dashboard-actions { margin-top: 15px; gap: 6px; }
  .dashboard-actions button { min-height: 75px; padding-inline: 3px; border-radius: 17px; }
  .dashboard-actions button > span { width: 31px; height: 31px; border-radius: 11px; }
  .dashboard-actions b { font-size: 9px; }
  .dashboard-connect { min-height: 46px; border-radius: 16px; }
  .dashboard-promo { min-height: 68px; padding: 11px 13px; border-radius: 21px; }
  .dashboard-promo strong { font-size: 11px; }
  .dashboard-promo small { font-size: 9px; }
  .promo-icon { width: 39px; height: 39px; border-radius: 13px; }
  .devices-heading { margin-top: 22px; }
  .compact-traffic { padding: 17px; }
  .onboarding-card {
    min-height: 330px;
    padding: 19px 17px 20px;
    border-radius: 28px;
  }
  .onboarding-copy { width: 100%; }
  .onboarding-copy .dashboard-overline { margin-top: 0; }
  .onboarding-copy h1 { max-width: 68%; margin-top: 14px; font-size: 38px; }
  .onboarding-copy > p:not(.eyebrow) { max-width: 65%; margin: 10px 0 16px; font-size: 12px; }
  .onboarding-button { width: 65%; min-height: 48px; padding-inline: 14px; font-size: 12px; }
  .onboarding-copy > small { margin-top: 8px; font-size: 9px; }
  .onboarding-mascot-wrap { inset: 57px -21px auto auto; width: 42%; height: 210px; }
  .onboarding-mascot-wrap img { max-height: 200px; }
  .onboarding-active .bottom-nav { display: grid !important; }
  .starter-dashboard { margin-top: 12px; padding: 16px; border-radius: 25px; }
  .starter-heading h2 { font-size: 21px; }
  .starter-ready { padding: 6px 9px; font-size: 8px; }
  .starter-actions { margin-top: 14px; grid-template-columns: 1fr; gap: 8px; }
  .starter-actions > button { min-height: 66px; padding: 10px 11px; border-radius: 18px; }
  .starter-action-icon { width: 39px; height: 39px; border-radius: 13px; }
  .starter-actions strong { font-size: 12px; }
  .starter-route { padding: 12px; grid-template-columns: 1fr; gap: 9px; }
  .starter-route > i { width: 1px; height: 9px; margin-left: 14px; background: linear-gradient(rgba(24,137,244,.16),rgba(24,137,244,.65)); }
  .starter-benefits { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .starter-benefits > span { padding: 10px 8px; border-radius: 15px; }
  .starter-benefits b { font-size: 9px; }
  .starter-benefits small { font-size: 7px; }
}

@media (max-width: 390px) {
  .dashboard-actions b { font-size: 8.5px; }
  .onboarding-copy h1 { max-width: 72%; font-size: 34px; }
  .onboarding-copy > p:not(.eyebrow),
  .onboarding-button { width: 70%; max-width: 70%; }
}

/* Dark contrast pass — bright controls on a deep background. */
:root[data-theme="dark"] .nav-item {
  color: #9bb0c6;
}
:root[data-theme="dark"] .nav-item.active {
  color: #f5faff;
  background: rgba(31,146,239,.16);
  box-shadow:
    inset 0 0 0 1px rgba(101,196,255,.2),
    inset 0 1px 0 rgba(255,255,255,.09),
    0 12px 28px rgba(0,0,0,.18);
}
:root[data-theme="dark"] .nav-icon,
:root[data-theme="dark"] .sidebar-help span,
:root[data-theme="dark"] .list-icon,
:root[data-theme="dark"] .device-plus,
:root[data-theme="dark"] .traffic-heading button,
:root[data-theme="dark"] .round-add {
  color: #73cbff;
  border: 1px solid rgba(112,204,255,.3);
  background: linear-gradient(145deg, rgba(25,137,224,.28), rgba(22,91,158,.2));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 8px 20px rgba(0,89,171,.18);
}
:root[data-theme="dark"] .nav-item.active .nav-icon {
  color: #a6e2ff;
  border-color: rgba(135,218,255,.42);
  background: linear-gradient(145deg, rgba(31,163,255,.4), rgba(18,102,186,.3));
}
:root[data-theme="dark"] .sidebar-help {
  color: #a6bbcf;
}
:root[data-theme="dark"] .profile-list button {
  color: #f3f8ff;
  border-bottom-color: rgba(126,178,221,.14);
}
:root[data-theme="dark"] .profile-list button:hover {
  background: rgba(52,151,226,.1);
}
:root[data-theme="dark"] .profile-list small {
  color: #9fb3c8;
}
:root[data-theme="dark"] .dashboard-actions button {
  color: #f7fbff;
  border-color: rgba(121,207,255,.24);
  background: linear-gradient(145deg, rgba(52,154,226,.17), rgba(255,255,255,.075));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 12px 26px rgba(0,55,106,.2);
}
:root[data-theme="dark"] .dashboard-actions button:hover {
  border-color: rgba(139,218,255,.4);
  background: linear-gradient(145deg, rgba(50,175,255,.26), rgba(255,255,255,.11));
}
:root[data-theme="dark"] .dashboard-actions button > span,
:root[data-theme="dark"] .dashboard-help {
  color: #83d4ff;
  border-color: rgba(126,211,255,.3);
  background: linear-gradient(145deg, rgba(31,157,244,.3), rgba(24,95,165,.22));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
:root[data-theme="dark"] .dashboard-promo {
  border-color: rgba(114,193,246,.2);
  background: linear-gradient(145deg, rgba(22,45,69,.85), rgba(15,33,53,.75));
}
:root[data-theme="dark"] .dashboard-promo strong {
  color: #f5faff;
}
:root[data-theme="dark"] .dashboard-promo small {
  color: #a3b7cb;
}
:root[data-theme="dark"] .bottom-nav button {
  color: #849bb2;
}
:root[data-theme="dark"] .bottom-nav button.active:not(.bottom-action) {
  color: #79d0ff;
  background: rgba(31,146,239,.16);
  box-shadow: inset 0 0 0 1px rgba(111,201,255,.18);
}

/* BLUP Night — branded dark theme, not generic black UI. */
:root[data-theme="dark"] {
  --bg: #06172d;
  --surface: rgba(10,37,63,.86);
  --surface-solid: #0c2946;
  --text: #f5faff;
  --muted: #a7bdd2;
  --line: rgba(101,190,247,.21);
  --blue: #39b9ff;
  --blue-deep: #147fff;
  --cyan: #60e2ff;
  --violet: #8e7bff;
  --shadow: 0 24px 72px rgba(0,10,36,.38);
  --glass: rgba(9,37,64,.66);
  --glass-strong: rgba(10,43,74,.86);
  --glass-line: rgba(103,197,255,.22);
  --glass-card: rgba(9,38,66,.7);
  --glass-card-strong: rgba(10,43,74,.88);
  --glass-border: rgba(104,197,255,.22);
  --soft-blue: rgba(47,175,255,.25);
  --soft-violet: rgba(139,113,255,.2);
}
:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 84% -7%, rgba(37,194,255,.3), transparent 34%),
    radial-gradient(circle at -8% 72%, rgba(132,90,255,.25), transparent 39%),
    radial-gradient(circle at 50% 115%, rgba(26,120,255,.17), transparent 34%),
    linear-gradient(145deg, #06172d 0%, #082641 48%, #121932 100%);
}
:root[data-theme="dark"] body::before {
  opacity: .58;
  background: radial-gradient(circle, rgba(48,209,255,.62), transparent 67%);
}
:root[data-theme="dark"] body::after {
  opacity: .48;
  background: radial-gradient(circle, rgba(132,93,255,.58), transparent 68%);
}
:root[data-theme="dark"] .sidebar,
:root[data-theme="dark"] .bottom-nav {
  border-color: rgba(105,198,255,.22);
  background: linear-gradient(160deg, rgba(7,30,55,.88), rgba(7,22,43,.82));
  box-shadow:
    0 24px 72px rgba(0,8,29,.31),
    inset 0 1px 0 rgba(153,220,255,.1);
}
:root[data-theme="dark"] .dashboard-card {
  border-color: rgba(130,216,255,.32);
  background:
    radial-gradient(circle at 86% 3%, rgba(98,226,255,.24), transparent 25%),
    radial-gradient(circle at 3% 100%, rgba(143,105,255,.26), transparent 34%),
    linear-gradient(135deg, rgba(9,58,98,.98), rgba(8,97,142,.96) 57%, rgba(25,124,184,.93));
  box-shadow:
    0 31px 90px rgba(0,20,56,.43),
    inset 0 1px 0 rgba(196,239,255,.18);
}
:root[data-theme="dark"] .dashboard-card::after {
  border-color: rgba(169,230,255,.28);
  background: rgba(67,194,255,.09);
}
:root[data-theme="dark"] .dashboard-progress {
  background: rgba(1,25,53,.28);
}
:root[data-theme="dark"] .dashboard-progress span {
  background: linear-gradient(90deg, #35baff, #5ee6ff 57%, #9c8cff);
  box-shadow: 0 0 20px rgba(70,211,255,.42);
}
:root[data-theme="dark"] .subscription-card,
:root[data-theme="dark"] .traffic-card,
:root[data-theme="dark"] .device-card,
:root[data-theme="dark"] .stats-grid,
:root[data-theme="dark"] .how-card,
:root[data-theme="dark"] .profile-list,
:root[data-theme="dark"] .theme-card,
:root[data-theme="dark"] .trust-card,
:root[data-theme="dark"] .sheet {
  border-color: rgba(103,197,255,.22);
  background: linear-gradient(145deg, rgba(10,43,73,.82), rgba(8,30,54,.76));
  box-shadow:
    0 22px 58px rgba(0,11,36,.3),
    inset 0 1px 0 rgba(167,224,255,.1);
}
:root[data-theme="dark"] .sheet {
  background:
    radial-gradient(circle at 88% -8%, rgba(50,186,255,.16), transparent 31%),
    linear-gradient(155deg, rgba(10,45,77,.97), rgba(7,25,47,.97));
}
:root[data-theme="dark"] .plan-option,
:root[data-theme="dark"] .device-options button,
:root[data-theme="dark"] .app-option,
:root[data-theme="dark"] .payment-methods button,
:root[data-theme="dark"] .history-row,
:root[data-theme="dark"] .wheel-prizes span {
  color: var(--text);
  border-color: rgba(102,195,255,.2);
  background: linear-gradient(145deg, rgba(26,78,116,.56), rgba(12,43,71,.5));
  box-shadow: inset 0 1px 0 rgba(180,230,255,.08);
}
:root[data-theme="dark"] .plan-option:hover,
:root[data-theme="dark"] .device-options button:hover,
:root[data-theme="dark"] .app-option:hover,
:root[data-theme="dark"] .payment-methods button:hover {
  border-color: rgba(111,215,255,.42);
  background: linear-gradient(145deg, rgba(34,109,158,.65), rgba(15,58,94,.58));
}
:root[data-theme="dark"] .plan-option.popular,
:root[data-theme="dark"] .device-options button.selected {
  border-color: #4bcaff;
  background: linear-gradient(145deg, rgba(25,134,205,.35), rgba(31,80,151,.28));
  box-shadow:
    inset 0 0 0 1px rgba(102,219,255,.18),
    0 10px 26px rgba(3,90,171,.17);
}
:root[data-theme="dark"] .payment-methods button > span:first-child,
:root[data-theme="dark"] .app-option > span:first-child {
  color: #7ed8ff;
  background: linear-gradient(145deg, rgba(38,156,232,.3), rgba(37,89,164,.22));
  box-shadow: inset 0 0 0 1px rgba(111,207,255,.2);
}
:root[data-theme="dark"] .payment-wait {
  color: var(--text);
  background: linear-gradient(145deg, rgba(26,104,158,.3), rgba(20,55,94,.3));
}
:root[data-theme="dark"] .theme-switch {
  border: 1px solid rgba(102,195,255,.15);
  background: rgba(4,24,46,.48);
}
:root[data-theme="dark"] .theme-switch button {
  color: #91a9c0;
}
:root[data-theme="dark"] .theme-switch button.active {
  color: #7ed8ff;
  border-color: rgba(112,211,255,.36);
  background: linear-gradient(145deg, rgba(26,133,207,.3), rgba(20,67,119,.24));
  box-shadow:
    inset 0 0 0 1px rgba(123,214,255,.18),
    0 8px 20px rgba(0,40,87,.2);
}
:root[data-theme="dark"] .bottom-nav {
  -webkit-backdrop-filter: blur(32px) saturate(175%);
  backdrop-filter: blur(32px) saturate(175%);
}
:root[data-theme="dark"] .bottom-nav .bottom-action {
  color: #fff !important;
  border: 1px solid rgba(203,246,255,.72);
  background: linear-gradient(145deg, #58e2ff 0%, #1497ff 55%, #7668ff 100%);
  box-shadow:
    0 15px 34px rgba(20,144,255,.43),
    0 0 25px rgba(74,213,255,.2),
    inset 0 1px 0 rgba(255,255,255,.68);
}
:root[data-theme="dark"] .bottom-nav .bottom-action .ui-icon {
  color: #fff;
  stroke-width: 2.2;
  filter: drop-shadow(0 1px 3px rgba(0,55,130,.35));
}
:root[data-theme="dark"] .round-add {
  color: #fff;
  border-color: rgba(190,239,255,.48);
  background: linear-gradient(145deg, #42d5ff, #168cff 62%, #7168ff);
  box-shadow:
    0 12px 28px rgba(14,139,242,.35),
    inset 0 1px 0 rgba(255,255,255,.48);
}
:root[data-theme="dark"] .sheet-close {
  color: #9edfff;
  border-color: rgba(111,205,255,.24);
  background: rgba(22,91,143,.35);
}
:root[data-theme="dark"] .secondary-button,
:root[data-theme="dark"] .light-button {
  color: #e9f9ff;
  border-color: rgba(135,220,255,.34);
  background: linear-gradient(145deg, rgba(42,174,246,.4), rgba(35,94,181,.34));
  box-shadow:
    0 12px 28px rgba(0,76,153,.22),
    inset 0 1px 0 rgba(255,255,255,.18);
}
:root[data-theme="dark"] .ghost-button {
  color: #b9d1e5;
  border-color: rgba(102,193,247,.18);
  background: rgba(13,48,78,.62);
}
:root[data-theme="dark"] .primary-button:disabled,
:root[data-theme="dark"] .secondary-button:disabled,
:root[data-theme="dark"] .light-button:disabled,
:root[data-theme="dark"] .ghost-button:disabled {
  color: #7793a9;
  border-color: rgba(109,168,207,.12);
  background: rgba(6,27,49,.52);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
  opacity: 1;
  cursor: not-allowed;
}
:root[data-theme="dark"] .wheel-spin-button[disabled] {
  color: #7d9bb1;
  border-color: rgba(108,177,220,.14);
  background: rgba(7,31,55,.55);
  box-shadow: none;
  opacity: 1;
}
@media (max-width: 390px) {
  .wheel-stage { width: min(78vw, 310px); }
  .wheel-label { width: 58px; min-height: 42px; padding: 4px 5px 5px; border-radius: 13px; }
  .wheel-label b { font-size: 20px; }
  .wheel-label small { margin-top: 4px; font-size: 8px; }
  .wheel-caption { max-width: 290px; line-height: 1.35; }
}
:root[data-theme="dark"] .wheel-caption { color: #a9c8df; }
:root[data-theme="dark"] .wheel-prizes span {
  border-color: rgba(107,202,255,.28);
  background: linear-gradient(145deg, rgba(25,91,134,.74), rgba(13,55,91,.72));
}
:root[data-theme="dark"] .wheel-prizes span.jackpot {
  border-color: rgba(110,218,255,.48);
  background: linear-gradient(145deg, rgba(21,128,188,.65), rgba(46,76,157,.55));
}
:root[data-theme="dark"] .wheel-prizes b { color: #86dcff; }
:root[data-theme="dark"] .wheel-prizes small { color: #bad7e9; }

/* 2026-08 gift flow, expiry state, wheel result and live traffic polish */
.expired-state {
  position: relative;
  max-width: 760px;
  margin: clamp(28px, 7vh, 86px) auto;
  padding: clamp(30px, 6vw, 64px);
  overflow: hidden;
  border: 1px solid rgba(111, 199, 255, .52);
  border-radius: 38px;
  background:
    radial-gradient(circle at 92% 0%, rgba(127, 224, 255, .54), transparent 35%),
    linear-gradient(145deg, rgba(242, 252, 255, .97), rgba(205, 239, 255, .91));
  box-shadow: 0 30px 90px rgba(15, 103, 173, .18);
  text-align: center;
}
.expired-state[hidden] { display: none; }
.expired-state-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 25px;
  background: linear-gradient(145deg, #56cfff, #177ce7);
  box-shadow: 0 16px 36px rgba(16, 122, 218, .25);
  display: grid;
  place-items: center;
  color: #fff;
}
.expired-state-icon .ui-icon { width: 34px; height: 34px; }
.expired-state h1 { margin: 10px 0 12px; font-size: clamp(34px, 6vw, 58px); letter-spacing: -.055em; }
.expired-state p { max-width: 540px; margin: 0 auto 24px; color: #45677d; line-height: 1.55; }
.expired-state .primary-button { width: min(100%, 390px); margin-inline: auto; }
.expired-state > small { display: block; max-width: 440px; margin: 15px auto 0; color: #627f91; line-height: 1.45; }
#screen-home.expired-mode > :not([data-expired-state]) { display: none !important; }

.gift-heading { max-width: 690px; }
.gift-card {
  position: relative;
  max-width: 720px;
  margin-top: 22px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(103, 191, 255, .32);
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(255,255,255,.86), rgba(231,247,255,.7));
  box-shadow: 0 24px 70px rgba(20, 101, 165, .1);
  backdrop-filter: blur(20px) saturate(1.18);
}
.gift-visual {
  width: 64px;
  height: 64px;
  margin-bottom: 22px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(145deg, #5bd8ff, #167df0 70%, #6368ff);
  display: grid;
  place-items: center;
  box-shadow: 0 15px 35px rgba(28, 128, 230, .23);
}
.gift-visual .ui-icon { width: 31px; height: 31px; }
.gift-user-field > span,
.gift-plan-block > span { display: block; margin: 0 0 9px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.gift-user-field > div {
  min-height: 60px;
  padding: 0 18px;
  border: 1px solid rgba(72, 161, 232, .34);
  border-radius: 19px;
  background: rgba(255,255,255,.78);
  display: flex;
  align-items: center;
  gap: 3px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.gift-user-field > div:focus-within { border-color: #258ff2; box-shadow: 0 0 0 4px rgba(38, 148, 247, .12); transform: translateY(-1px); }
.gift-user-field b { color: #1689ef; font-size: 20px; }
.gift-user-field input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--text); background: transparent; font: inherit; font-size: 18px; font-weight: 750; }
.gift-find { width: 100%; margin-top: 10px; }
.gift-recipient {
  margin-top: 13px;
  padding: 12px;
  border: 1px solid rgba(32, 190, 132, .28);
  border-radius: 18px;
  background: rgba(224, 255, 244, .72);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  animation: result-pop .4s cubic-bezier(.2,1.2,.2,1);
}
.gift-recipient[hidden] { display: none; }
.gift-recipient span:nth-child(2) strong,
.gift-recipient span:nth-child(2) small { display: block; }
.gift-recipient span:nth-child(2) small { margin-top: 3px; color: var(--muted); }
.gift-recipient > b { color: #149a69; font-size: 11px; }
.gift-plan-block { margin-top: 24px; }
.gift-plan-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gift-plan-option {
  min-height: 74px;
  padding: 13px 15px;
  border: 1px solid rgba(90, 169, 228, .27);
  border-radius: 19px;
  color: var(--text);
  background: rgba(255,255,255,.7);
  text-align: left;
  cursor: pointer;
  transition: .2s ease;
}
.gift-plan-option strong,
.gift-plan-option small { display: block; }
.gift-plan-option strong { font-size: 15px; }
.gift-plan-option small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.gift-plan-option:hover { transform: translateY(-2px); border-color: #38a9ff; }
.gift-plan-option.selected { color: #fff; border-color: transparent; background: linear-gradient(135deg, #35b9ff, #237cf2); box-shadow: 0 12px 28px rgba(22, 132, 235, .22); }
.gift-plan-option.selected small { color: rgba(255,255,255,.78); }
.gift-card [data-gift-continue] { margin-top: 18px; }
.gift-note { display: block; margin-top: 12px; color: var(--muted); line-height: 1.45; text-align: center; }
.gift-steps { max-width: 720px; margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gift-steps > div { padding: 16px; border: 1px solid var(--line); border-radius: 21px; background: var(--surface-solid); display: flex; gap: 11px; }
.gift-steps > div > b { width: 27px; height: 27px; flex: 0 0 auto; border-radius: 9px; color: #fff; background: var(--blue); display: grid; place-items: center; }
.gift-steps strong,.gift-steps small { display: block; }.gift-steps small { margin-top: 4px; color: var(--muted); line-height: 1.35; }

.wheel-pointer {
  width: 58px;
  height: 70px;
  top: -12px;
  background: linear-gradient(180deg, #ffffff 0 12%, #55dcff 42%, #087dff 76%, #044fc7 100%);
  filter: drop-shadow(0 0 8px rgba(97,224,255,.95)) drop-shadow(0 13px 13px rgba(0,48,126,.55));
  animation: wheel-pointer-pulse 1.8s ease-in-out infinite;
}
@keyframes wheel-pointer-pulse {
  0%, 100% { filter: drop-shadow(0 0 7px rgba(97,224,255,.78)) drop-shadow(0 13px 13px rgba(0,48,126,.48)); }
  50% { filter: drop-shadow(0 0 14px rgba(97,224,255,1)) drop-shadow(0 16px 16px rgba(0,48,126,.62)); }
}
.wheel-label { width: 76px; min-height: 54px; }
.wheel-label b { font-size: clamp(22px,5.7vw,31px); }
.wheel-label small { font-size: 10px; }
.prize-sheet { text-align: center; }
.prize-celebration { position: relative; padding: 44px 20px 22px; overflow: hidden; }
.prize-glow { position: absolute; width: 300px; height: 300px; left: 50%; top: -80px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, rgba(85,211,255,.4), transparent 68%); pointer-events: none; }
.prize-gift { position: relative; width: 104px; height: 104px; margin: 0 auto 24px; border-radius: 34px; color: #fff; background: linear-gradient(145deg,#6ce5ff,#1788f4 65%,#6968ff); display: grid; place-items: center; box-shadow: 0 24px 55px rgba(23,131,232,.32); animation: prize-float 2.4s ease-in-out infinite; }
.prize-gift .ui-icon { width: 52px; height: 52px; }
.prize-celebration h2 { margin: 12px 0; font-size: clamp(30px,7vw,48px); letter-spacing: -.05em; }.prize-celebration h2 b { display: block; color: #1689f3; }
.prize-celebration p { margin: 0 auto 25px; max-width: 330px; color: var(--muted); line-height: 1.5; }
[data-prize-again][hidden] { display: none !important; }

/* Compact first-run menu: keep the real dashboard visible and guide one action at a time. */
.onboarding-card {
  min-height: 0 !important;
  padding: 22px 24px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 150px !important;
  align-items: center !important;
  border-radius: 30px !important;
  overflow: hidden !important;
}
.onboarding-copy { width: 100% !important; }
.onboarding-copy h1 {
  max-width: none !important;
  margin: 9px 0 8px !important;
  font-size: clamp(28px, 4vw, 44px) !important;
  line-height: 1.02 !important;
}
.onboarding-copy > p:not(.eyebrow) {
  max-width: 600px !important;
  margin: 0 0 14px !important;
  font-size: 14px !important;
}
.onboarding-route {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 14px;
}
.onboarding-route span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 999px;
  background: rgba(255,255,255,.38);
  color: #163e60;
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}
.onboarding-route b {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #178fff;
  color: #fff;
}
.onboarding-button { min-height: 50px !important; }
.onboarding-mascot-wrap {
  position: relative !important;
  inset: auto !important;
  width: 150px !important;
  height: 150px !important;
}
.onboarding-mascot-wrap img { max-height: 135px !important; }
#screen-home.onboarding-mode > .starter-dashboard { display: block !important; }

@media (max-width: 720px) {
  .onboarding-card {
    padding: 18px !important;
    grid-template-columns: minmax(0, 1fr) 88px !important;
    border-radius: 25px !important;
  }
  .onboarding-copy h1 { font-size: 27px !important; }
  .onboarding-copy > p:not(.eyebrow) { max-width: none !important; font-size: 12px !important; }
  .onboarding-route { display: grid; grid-template-columns: 1fr; gap: 5px; }
  .onboarding-route span { padding: 6px 8px; }
  .onboarding-mascot-wrap { width: 88px !important; height: 110px !important; align-self: start; margin-top: 38px; }
  .onboarding-mascot-wrap img { max-height: 92px !important; }
  .onboarding-button { width: 100% !important; max-width: none !important; }
  .onboarding-active .bottom-nav { display: grid !important; }
}
@keyframes prize-float { 50% { transform: translateY(-8px) rotate(2deg); } }

.traffic-value { transition: color .2s ease, transform .2s ease; font-variant-numeric: tabular-nums; }
.traffic-value.counting { color: var(--blue); transform: translateY(-2px) scale(1.025); }
[data-traffic-updated] { font-variant-numeric: tabular-nums; }

.gift-success { padding: 48px 22px 28px; text-align: center; }
.gift-success-icon { width: 96px; height: 96px; margin: 0 auto 22px; border-radius: 32px; color: #fff; background: linear-gradient(145deg,#65ddff,#187ff0); display: grid; place-items: center; box-shadow: 0 22px 50px rgba(24,128,226,.26); }
.gift-success-icon .ui-icon { width: 46px; height: 46px; }
.gift-success h2 { margin: 10px 0; font-size: 31px; }.gift-success p { margin: 0 auto 24px; max-width: 330px; color: var(--muted); line-height: 1.55; }

:root[data-theme="dark"] .expired-state,
:root[data-theme="dark"] .gift-card { border-color: rgba(104,196,255,.27); background: linear-gradient(145deg, rgba(13,49,82,.96), rgba(7,29,54,.94)); }
:root[data-theme="dark"] .expired-state p,
:root[data-theme="dark"] .expired-state > small { color: #a9c9de; }
:root[data-theme="dark"] .gift-user-field > div,
:root[data-theme="dark"] .gift-plan-option { background: rgba(255,255,255,.065); border-color: rgba(117,199,255,.22); }
:root[data-theme="dark"] .gift-recipient { background: rgba(26,177,121,.12); }

@media (max-width: 720px) {
  .expired-state { margin: 14px 0; padding: 34px 20px; border-radius: 28px; }
  .expired-state h1 { font-size: 36px; }
  .gift-card { margin-top: 14px; padding: 19px; border-radius: 25px; }
  .gift-plan-list { grid-template-columns: 1fr 1fr; }
  .gift-steps { grid-template-columns: 1fr; }
  .gift-steps > div { padding: 13px; }
  .wheel-pointer { width: 50px; height: 61px; top: -9px; }
  .wheel-label { width: 64px; min-height: 47px; }
  .wheel-label b { font-size: 23px; }
  .wheel-label small { font-size: 9px; }
}
:root[data-theme="dark"] .app-loader {
  background:
    radial-gradient(circle at 78% 10%, rgba(42,202,255,.24), transparent 33%),
    radial-gradient(circle at 10% 80%, rgba(130,91,255,.22), transparent 38%),
    linear-gradient(155deg, #06172d, #0a2947 50%, #111932);
}

/* Keep the mobile exit control above every sheet and after all glass rules. */
@media (max-width: 680px) {
  body .sheet.open .sheet-close {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    left: auto !important;
    z-index: 20;
    display: grid !important;
    margin: 0 !important;
  }
}

.setup-progress-labels {
  margin: -3px 44px 16px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.setup-progress-labels[hidden] { display: none !important; }
.setup-progress-labels span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.setup-progress-labels span.active { color: var(--blue); }
.setup-progress-labels span.done { color: var(--green); }
.setup-checklist {
  margin: 0 0 15px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.setup-checklist li {
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 17px;
  background: rgba(255,255,255,.42);
  display: flex;
  align-items: center;
  gap: 11px;
}
.setup-checklist li > b {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, #36c4ff, #147df0);
  display: grid;
  place-items: center;
  font-size: 11px;
}
.setup-checklist strong,
.setup-checklist small { display: block; }
.setup-checklist strong { font-size: 12px; }
.setup-checklist small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.setup-fallback { margin: 9px 8px 12px; color: var(--muted); font-size: 10px; line-height: 1.45; text-align: center; }
.setup-return-check {
  margin: 10px 0 12px;
  padding: 14px;
  border: 1px solid rgba(65,195,255,.3);
  border-radius: 19px;
  background: rgba(68,190,255,.11);
}
.setup-return-check[hidden] { display: none !important; }
.setup-return-check strong,
.setup-return-check span { display: block; }
.setup-return-check strong { font-size: 13px; }
.setup-return-check span { margin: 5px 0 12px; color: var(--muted); font-size: 10px; line-height: 1.45; }
:root[data-theme="dark"] .setup-checklist li { background: rgba(255,255,255,.055); }
:root[data-theme="dark"] .setup-return-check { background: rgba(53,181,255,.1); }

@media (max-width: 680px) {
  .setup-progress-labels { margin-right: 52px; }
  .setup-checklist li { min-height: 52px; }
}

/* First connection guide: compact BLUP onboarding, without replacing home. */
.setup-welcome {
  padding: 10px 4px 2px;
  text-align: center;
}
.setup-welcome-brand {
  width: 118px;
  height: 86px;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 13px 22px rgba(20,135,255,.2));
}
.setup-welcome-brand img { width: 100%; height: 100%; object-fit: contain; }
.setup-welcome h2 {
  margin: 8px 0 9px;
  font-size: clamp(27px, 7vw, 38px);
  line-height: 1.02;
  letter-spacing: -.05em;
}
.setup-welcome > p {
  max-width: 390px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.setup-route {
  max-width: 370px;
  margin: 24px auto 18px;
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 8px;
}
.setup-route span { display: grid; justify-items: center; gap: 6px; }
.setup-route b {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #43c7ff, #1977f3);
  box-shadow: 0 10px 22px rgba(24,132,244,.24);
}
.setup-route small { color: var(--muted); font-size: 9px; font-weight: 800; }
.setup-route i { height: 2px; margin-bottom: 18px; border-radius: 99px; background: linear-gradient(90deg, rgba(44,170,255,.25), rgba(44,170,255,.8)); }
.setup-welcome .primary-button { max-width: 390px; margin: 8px auto 0; }
.setup-welcome-note { display: block; margin: 10px 0 2px; color: var(--muted); font-size: 10px; }
.setup-welcome .setup-skip { margin-top: 10px; }
#setup-sheet:has(.setup-welcome.active) {
  background:
    radial-gradient(circle at 82% 5%, rgba(79,200,255,.2), transparent 34%),
    radial-gradient(circle at 4% 88%, rgba(72,121,255,.13), transparent 38%),
    var(--glass-strong);
}
:root[data-theme="dark"] #setup-sheet:has(.setup-welcome.active) {
  background:
    radial-gradient(circle at 82% 5%, rgba(45,180,255,.18), transparent 34%),
    radial-gradient(circle at 4% 88%, rgba(74,96,255,.17), transparent 38%),
    linear-gradient(150deg, rgba(9,37,66,.97), rgba(5,24,45,.98));
}
@media (max-width: 680px) {
  .setup-welcome { padding-top: 3px; }
  .setup-welcome-brand { width: 105px; height: 72px; margin-bottom: 7px; }
  .setup-welcome h2 { font-size: 31px; }
  .setup-welcome > p { font-size: 12px; }
  .setup-route { margin: 21px auto 15px; }
}

/* Telegram Desktop can open the Mini App in a narrow side pane. Keep the
   desktop shell inside that pane instead of letting the dashboard run right. */
html,
body,
.app-shell {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

@media (min-width: 681px) and (max-width: 1280px) {
  :root { --sidebar: 210px; }

  .sidebar {
    inset: 14px auto 14px 14px;
    width: 196px;
    padding: 20px 15px;
    border-radius: 26px;
  }

  .brand-logo { width: 112px; height: 54px; }
  .sidebar-user { margin: 25px 0 20px; }
  .nav-item { min-height: 46px; padding-inline: 12px; gap: 9px; }

  .workspace {
    width: auto;
    min-width: 0;
    margin-left: 210px;
    padding: 24px 22px 56px;
  }

  .screen { width: 100%; max-width: 920px; min-width: 0; }
  .dashboard-card { min-width: 0; }
  .dashboard-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .device-grid { grid-template-columns: 1fr; }
}

/* Meme quiz: isolated styles so the existing dashboard and wheel stay intact. */
.meme-promo {
  width: 100%; margin: 14px 0; padding: 15px 17px; display: flex; align-items: center;
  gap: 13px; text-align: left; color: var(--text); cursor: pointer;
  border: 1px solid rgba(61,169,255,.45); border-radius: 21px;
  background: linear-gradient(105deg, rgba(27,143,252,.24), rgba(108,84,246,.18));
}
.meme-promo-icon { font-size: 28px; }
.meme-promo span:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: 3px; }
.meme-promo strong { font-size: 15px; }
.meme-promo small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.meme-promo b { white-space: nowrap; color: var(--blue); font-size: 12px; }
.meme-sheet { max-width: 520px; }
.meme-game-intro, .meme-game-result { display: grid; gap: 13px; text-align: center; }
.meme-game-intro[hidden], .meme-game-play[hidden], .meme-game-result[hidden] { display: none; }
.meme-game-hero { padding: 12px; font-size: 64px; line-height: 1.2; }
.meme-game-intro strong, .meme-game-result strong { font-size: 23px; }
.meme-game-intro p, .meme-game-result p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.meme-game-intro small { color: var(--muted); font-size: 12px; }
.meme-game-progress { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 12px; color: var(--muted); }
.meme-game-progress b { color: var(--blue); }
.meme-game-card {
  height: min(38vh, 270px); display: grid; place-items: center; overflow: hidden;
  border: 1px solid rgba(97,175,247,.35); border-radius: 22px;
  background: radial-gradient(circle at 80% 20%, rgba(66,182,255,.35), transparent 45%),
              linear-gradient(140deg, rgba(20,85,164,.28), rgba(102,80,190,.18));
}
.meme-game-card img { width: 100%; height: 100%; object-fit: contain; }
.meme-game-emoji { padding: 12px; font-size: clamp(54px, 16vw, 92px); text-align: center; }
.meme-game-image-state { padding: 18px; color: var(--muted); font-size: 13px; text-align: center; }
.meme-game-image-retry {
  min-height: 42px; padding: 8px 16px; border: 1px solid rgba(98,172,238,.5);
  border-radius: 12px; color: var(--text); background: rgba(57,137,222,.18);
  font-size: 13px; font-weight: 700;
}
.meme-game-question { display: block; margin: 13px 0 10px; text-align: center; font-size: 17px; }
.meme-game-answers { display: grid; gap: 8px; }
.meme-game-answers button {
  min-height: 44px; width: 100%; padding: 8px 12px; text-align: left;
  border: 1px solid rgba(98,172,238,.42); border-radius: 13px;
  color: var(--text); background: rgba(57,137,222,.12); font-size: 13px; font-weight: 700; cursor: pointer;
}
.meme-game-answers button:disabled { opacity: .55; cursor: wait; }
.meme-game-note { margin: 14px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
.meme-game-credits { margin-top: 8px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.meme-game-credits summary { cursor: pointer; text-align: center; }
.meme-game-credits a { color: var(--blue); }
@media (max-width: 480px) {
  .meme-promo { gap: 9px; padding: 12px; }
  .meme-promo b { display: none; }
  .meme-game-card { height: min(31vh, 220px); }
}

.referral-popup { padding: 32px 24px 30px; text-align: center; display: grid; gap: 15px; }
.referral-popup h2 { margin: 0; font-size: clamp(24px, 6vw, 34px); line-height: 1.13; }
.referral-popup p { margin: 0; color: var(--muted); line-height: 1.5; }
.referral-popup > strong { font-size: 43px; color: #1488df; line-height: 1; }
.referral-popup > small { color: var(--muted); line-height: 1.45; }
