
:root {
  color-scheme: dark;
  --bg: #0a090c;
  --bg-2: #110f15;
  --surface: #19171d;
  --surface-2: #211e27;
  --surface-3: #2a2731;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f1f5;
  --muted: rgba(240, 240, 240, 0.62);
  --muted-2: rgba(240, 240, 240, 0.42);
  --primary: #c70047;
  --primary-bright: #ff2d77;
  --primary-dark: #8e0033;
  --primary-soft: #ff8ab3;
  --mint: #7ee2a8;
  --mint-ink: #0a3d24;
  --green: #1f9d55;
  --cream: #fcffeb;
  --amber: #f6ba4b;
  --danger: #ff5a5f;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  --shadow-primary: 0 16px 34px rgba(199, 0, 71, 0.35);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --radius: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--bg);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(120% 70% at 15% -10%, rgba(199, 0, 71, 0.30), transparent 55%),
    radial-gradient(90% 60% at 100% 0%, rgba(126, 226, 168, 0.10), transparent 60%),
    var(--bg);
  font-size: 15px;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--primary-soft); }

::selection { background: rgba(255, 45, 119, 0.35); }

.app-frame {
  min-height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--bg-2), var(--bg) 40%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 28px 80px rgba(0, 0, 0, 0.55);
  position: relative;
  overflow: hidden;
}

.app-shell {
  min-height: 100dvh;
  padding: calc(14px + var(--safe-top)) 16px calc(108px + var(--safe-bottom));
}

/* ---------- Top bar ---------- */
.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.brand { min-width: 0; display: flex; align-items: center; gap: 10px; }

.brand-logo { height: 34px; width: auto; display: block; user-select: none; }
.brand-logo svg { height: 34px; width: auto; display: block; }

.brand-mark {
  width: 40px; height: 40px; flex: 0 0 auto;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-bright), var(--primary-dark));
  display: grid; place-items: center;
  box-shadow: var(--shadow-primary);
}
.brand-mark svg { width: 24px; height: 24px; }

.brand-title { display: block; font-weight: 800; font-size: 16px; letter-spacing: -0.01em; line-height: 1.05; }
.brand-subtitle { display: block; color: var(--muted); font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 2px; }

.icon-button {
  width: 42px; height: 42px; display: grid; place-items: center;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: transform 0.12s ease, background 0.2s ease;
}
.icon-button:active { transform: scale(0.94); }

.icon-button svg, .tab-button svg, .small-action svg, .button svg,
.field-icon svg, .service-icon svg, .stat-icon svg { width: 20px; height: 20px; stroke-width: 2; }

/* ---------- Chips ---------- */
.demo-chip, .status-chip, .mini-chip, .mode-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px;
  padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 800;
  color: var(--mint); background: rgba(126, 226, 168, 0.12); border: 1px solid rgba(126, 226, 168, 0.28);
  white-space: nowrap;
}
.mini-chip { color: var(--primary-soft); background: rgba(255, 138, 179, 0.12); border-color: rgba(255, 138, 179, 0.3); }
.mode-chip { color: var(--text); background: var(--surface-3); border-color: var(--line); }
.demo-chip::before, .status-chip::before {
  content: ""; width: 7px; height: 7px; border-radius: 99px; background: var(--mint);
  box-shadow: 0 0 0 4px rgba(126, 226, 168, 0.16);
}
.status-chip.pending { color: var(--amber); background: rgba(246, 186, 75, 0.12); border-color: rgba(246, 186, 75, 0.3); }
.status-chip.pending::before { background: var(--amber); box-shadow: 0 0 0 4px rgba(246, 186, 75, 0.16); }

/* ---------- Sections ---------- */
.section { margin: 18px 0; }
.section-header { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 0 2px 12px; }
.section-title { margin: 0; font-size: 19px; line-height: 1.2; font-weight: 850; letter-spacing: -0.02em; }
.section-note { margin: 3px 0 0; color: var(--muted); font-size: 13px; font-weight: 600; }

/* ---------- Hero ---------- */
.hero-panel {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(255, 45, 119, 0.42), transparent 55%),
    linear-gradient(160deg, #241019, #14121a 70%);
  color: #fff; border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line-strong);
}
.hero-panel::after {
  content: ""; position: absolute; inset: auto -50px -60px auto;
  width: 170px; height: 170px; border-radius: 50%;
  border: 28px solid rgba(255, 138, 179, 0.16);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px; margin: 0 0 12px;
  color: var(--primary-soft); font-size: 12px; font-weight: 850;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.hero-title { max-width: 340px; margin: 0; font-size: 30px; line-height: 1.04; font-weight: 900; letter-spacing: -0.03em; }
.hero-copy { max-width: 380px; margin: 12px 0 18px; color: rgba(255, 255, 255, 0.82); font-size: 14px; font-weight: 600; }
.hero-actions, .button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- Buttons ---------- */
.button {
  min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 14px; background: var(--surface-3); color: #fff;
  font-weight: 800; letter-spacing: -0.01em; text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.button:active { transform: translateY(1px) scale(0.99); }
.button.primary { background: linear-gradient(135deg, var(--primary-bright), var(--primary)); color: #fff; box-shadow: var(--shadow-primary); }
.button.primary:active { filter: brightness(1.05); }
.button.mint { background: var(--mint); color: var(--mint-ink); }
.button.secondary { background: rgba(255, 255, 255, 0.08); color: #fff; border: 1px solid var(--line-strong); }
.button.light { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.button.ghost { background: transparent; color: var(--muted); }
.button.warning { background: rgba(246, 186, 75, 0.14); color: var(--amber); border: 1px solid rgba(246, 186, 75, 0.3); }
.button.full { width: 100%; }
.button[disabled] { opacity: 0.45; box-shadow: none; cursor: not-allowed; }

/* ---------- Membership / plans ---------- */
.membership-grid { display: grid; gap: 12px; }
.plan-card, .card, .service-card, .slot-card, .feed-item, .profile-panel,
.appointment-card, .previous-consultation, .video-panel, .metric-card,
.connect-card, .step-card, .waitlist-card, .gp-selected {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.card, .plan-card, .profile-panel { padding: 16px; }
.plan-card { display: grid; gap: 12px; }
.plan-card.recommended {
  border-color: rgba(255, 45, 119, 0.5);
  background: linear-gradient(180deg, #241019 0%, var(--surface) 100%);
  box-shadow: 0 18px 40px rgba(199, 0, 71, 0.25);
}
.plan-top { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.plan-name { margin: 0; font-size: 15px; font-weight: 900; }
.price { margin: 4px 0 0; font-size: 27px; font-weight: 900; letter-spacing: -0.03em; }
.price small { color: var(--muted); font-size: 12px; font-weight: 700; }
.price s { color: var(--muted-2); font-size: 16px; font-weight: 700; }
.plan-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; color: rgba(244, 241, 245, 0.82); font-size: 13px; font-weight: 600; }
.plan-list li { display: grid; grid-template-columns: 18px 1fr; gap: 9px; align-items: start; }
.plan-list li::before {
  content: ""; width: 15px; height: 15px; margin-top: 2px; border-radius: 99px;
  background: var(--mint); box-shadow: inset 0 0 0 4px rgba(126, 226, 168, 0.25);
}

/* ---------- Service grid ---------- */
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.service-card {
  min-height: 134px; padding: 14px; display: grid; gap: 8px; align-content: start;
  text-align: left; color: var(--text); transition: transform 0.12s ease, border-color 0.2s ease;
}
.service-card:active { transform: scale(0.98); }
.service-card.active { border-color: rgba(255, 45, 119, 0.6); background: linear-gradient(180deg, #241019, var(--surface)); }
.service-icon, .stat-icon {
  width: 40px; height: 40px; display: grid; place-items: center;
  color: var(--primary-soft); background: rgba(255, 138, 179, 0.12); border-radius: 12px;
}
.service-card:nth-child(2) .service-icon { color: var(--mint); background: rgba(126, 226, 168, 0.12); }
.service-card:nth-child(3) .service-icon { color: var(--amber); background: rgba(246, 186, 75, 0.14); }
.service-name { margin: 0; font-size: 14px; font-weight: 900; }
.service-meta { margin: 0; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.3; }

/* ---------- Stats ---------- */
.stats-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { padding: 14px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.stat-icon { color: var(--primary-soft); }
.stat-value { display: block; margin-top: 10px; font-size: 19px; line-height: 1; font-weight: 900; }
.stat-label { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Appointments ---------- */
.appointment-card { padding: 16px; display: grid; gap: 14px; }
.appointment-main { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; }
.avatar {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff;
  display: grid; place-items: center; font-weight: 900; border: 1px solid var(--line-strong);
}
.appointment-title, .feed-title { margin: 0; font-size: 15px; font-weight: 900; }
.appointment-meta, .feed-copy, .muted { color: var(--muted); font-size: 13px; font-weight: 600; }
.appointment-meta { margin: 3px 0 0; }

/* ---------- Segmented controls ---------- */
.segmented, .patient-switch {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px;
}
.patient-switch { grid-auto-flow: row; grid-auto-columns: initial; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
.segment {
  min-height: 40px; padding: 8px 10px; border-radius: 10px; background: transparent;
  color: var(--muted); font-weight: 800; transition: background 0.2s ease, color 0.2s ease;
}
.segment.active { background: var(--surface-3); color: var(--text); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 14px; }
.form-section-title {
  margin: 14px 0 0; padding: 12px 0 2px; border-top: 1px solid var(--line);
  color: var(--text); font-size: 14px; line-height: 1.2; font-weight: 900; letter-spacing: -0.01em;
}
.field { display: grid; gap: 6px; min-width: 0; }
.field label { color: rgba(244, 241, 245, 0.82); font-size: 12px; font-weight: 800; overflow-wrap: anywhere; }
.field input, .field select, .field textarea {
  width: 100%; max-width: 100%; min-width: 0; min-height: 48px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--text);
  outline: none; font-size: 16px; line-height: 1.3; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field select { padding-right: 34px; white-space: nowrap; text-overflow: ellipsis; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input[type="date"] { min-height: 50px; line-height: 1.2; }
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(199, 0, 71, 0.25);
}
.checkline {
  display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 11px; align-items: start;
  padding: 13px; color: rgba(244, 241, 245, 0.82); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 12px; font-size: 13px; font-weight: 600; overflow-wrap: anywhere;
}
.checkline input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--primary); }

/* ---------- Slots ---------- */
.slots { display: grid; gap: 10px; }
.slot-card {
  width: 100%; padding: 14px; display: grid; grid-template-columns: 1fr auto; gap: 10px;
  align-items: center; text-align: left; color: var(--text); transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.slot-card.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(199, 0, 71, 0.22); }
.slot-time { display: block; font-size: 15px; font-weight: 900; }
.slot-practitioner { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }

/* ---------- Feed ---------- */
.feed-list, .dependents-list, .consultation-list { display: grid; gap: 12px; }
.feed-item { display: grid; grid-template-columns: 42px 1fr; gap: 12px; padding: 14px; }
.feed-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 138, 179, 0.12); color: var(--primary-soft); }
.feed-item.urgent .feed-icon { color: var(--danger); background: rgba(255, 90, 95, 0.14); }
.feed-item.success .feed-icon { color: var(--mint); background: rgba(126, 226, 168, 0.12); }
.feed-time { display: block; margin-top: 6px; color: var(--muted-2); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Dependents ---------- */
.dependent-card { display: grid; gap: 10px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.dependent-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.small-action {
  width: 36px; height: 36px; display: grid; place-items: center; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; transition: transform 0.12s ease;
}
.small-action:active { transform: scale(0.92); }

/* ---------- Empty state ---------- */
.empty-state { padding: 22px; text-align: center; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty-state h3 { margin: 0; font-size: 16px; font-weight: 900; }
.empty-state p { margin: 7px 0 0; color: var(--muted); font-weight: 600; }

/* ---------- Consultation / video ---------- */
.video-screen { display: grid; gap: 14px; }
.consultation-header { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.video-panel {
  position: relative; min-height: 420px; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, rgba(199, 0, 71, 0.35), transparent 60%), #0c0b10; color: #fff;
}
.video-frame { width: 100%; height: 420px; display: block; border: 0; background: #0c0b10; }
.ot-stage { position: absolute; inset: 0; background: #0a090c; }
.ot-stage .OT_widget-container, .ot-stage .OT_root { width: 100% !important; height: 100% !important; }
.remote-tile { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; }
.remote-avatar {
  width: 112px; height: 112px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center;
  font-size: 38px; font-weight: 900; background: linear-gradient(135deg, var(--primary-bright), var(--primary-dark));
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.5);
}
.video-copy { max-width: 250px; margin: 0 auto; }
.video-copy h2 { margin: 0; font-size: 22px; font-weight: 900; }
.video-copy p { margin: 7px 0 0; color: rgba(255, 255, 255, 0.76); font-weight: 600; }
.local-preview {
  position: absolute; right: 12px; bottom: 86px; width: 96px; height: 128px; overflow: hidden;
  background: #1b1922; border: 2px solid rgba(255, 255, 255, 0.5); border-radius: 14px; box-shadow: 0 16px 30px rgba(0, 0, 0, 0.5);
}
.local-preview video { width: 100%; height: 100%; object-fit: cover; }
.video-controls { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 12px; padding: 16px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.8)); }
.call-button { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 999px; color: #fff; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.22); }
.call-button.end { background: var(--danger); }
.consultation-meta { padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.consultation-tools, .summary-grid { display: grid; gap: 10px; margin-top: 12px; }
.consultation-link { margin-top: 12px; }
.consultation-tools > div, .summary-grid > div { padding: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.consultation-tools p, .summary-grid p { margin: 4px 0 0; color: rgba(244, 241, 245, 0.82); font-size: 13px; font-weight: 600; }
.summary-label { display: block; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.previous-consultation { padding: 16px; display: grid; gap: 12px; }
.previous-head { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; }

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed; left: 50%; bottom: 0; z-index: 20; width: min(520px, 100%); transform: translateX(-50%);
  padding: 8px 12px calc(8px + var(--safe-bottom));
  background: rgba(16, 14, 20, 0.86); border-top: 1px solid var(--line); backdrop-filter: blur(20px);
}
.tab-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; align-items: end; }
.tab-button { min-height: 58px; display: grid; place-items: center; gap: 3px; color: var(--muted); background: transparent; border-radius: 14px; font-size: 11px; font-weight: 800; transition: color 0.2s ease, background 0.2s ease; }
.tab-button.active { color: var(--text); background: rgba(255, 45, 119, 0.12); }
.tab-button.active svg { color: var(--primary-soft); }
.install-tab { min-height: 72px; margin-top: -22px; color: #fff; background: linear-gradient(135deg, var(--primary-bright), var(--primary-dark)); box-shadow: var(--shadow-primary); }
.install-tab svg { width: 24px; height: 24px; }
.install-tab.active, .install-tab:focus { color: #fff; background: linear-gradient(135deg, var(--primary-bright), var(--primary-dark)); }

/* ---------- Toast ---------- */
.imp-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200; height: 38px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  background: linear-gradient(90deg, #f6ba4b, #f59e0b); color: #1a1410; font-size: 13px; font-weight: 800;
}
.imp-banner a { color: #1a1410; text-decoration: underline; }
body.impersonating { padding-top: 38px; }

.toast {
  position: fixed; left: 50%; bottom: calc(88px + var(--safe-bottom)); z-index: 60; width: min(456px, calc(100% - 28px));
  transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none; padding: 14px 16px; border-radius: 14px;
  color: #fff; background: var(--surface-3); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  transition: transform 0.25s cubic-bezier(.2,.9,.3,1.2), opacity 0.2s ease; font-weight: 700;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Sheets ---------- */
.sheet { position: fixed; inset: 0; z-index: 40; display: none; align-items: end; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(2px); }
.sheet.open { display: flex; }
.sheet-panel {
  width: min(520px, 100%); margin: 0 auto; max-height: 92dvh; overflow: auto;
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line-strong); border-bottom: 0;
  border-radius: 24px 24px 0 0; padding: 16px 16px calc(20px + var(--safe-bottom));
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.6); animation: sheet-up 0.32s cubic-bezier(.2,.9,.3,1.05);
}
@keyframes sheet-up { from { transform: translateY(28px); opacity: 0.6; } to { transform: translateY(0); opacity: 1; } }
.sheet-grabber { width: 42px; height: 5px; margin: 0 auto 16px; border-radius: 999px; background: var(--line-strong); }
.install-panel, .booking-confirmation-panel, .support-panel { display: grid; gap: 16px; }

.confirmation-list { display: grid; gap: 9px; margin: 0; }
.confirmation-list div { display: grid; grid-template-columns: minmax(86px, 0.32fr) minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.confirmation-list dt { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.confirmation-list dd { min-width: 0; margin: 0; color: var(--text); font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }

.install-hero { display: grid; grid-template-columns: 58px 1fr; gap: 12px; align-items: center; }
.install-mark { width: 58px; height: 58px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--primary-bright), var(--primary-dark)); border-radius: 16px; box-shadow: var(--shadow-primary); }
.install-mark svg { width: 28px; height: 28px; }
.install-steps { display: grid; gap: 9px; margin: 0; padding: 0; color: rgba(244, 241, 245, 0.82); font-weight: 700; list-style: none; }
.install-steps li { display: grid; grid-template-columns: 28px 40px minmax(0, 1fr); gap: 10px; align-items: center; padding: 11px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.install-step-number { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 999px; color: var(--mint); background: rgba(126, 226, 168, 0.14); font-size: 12px; font-weight: 900; }
.install-step-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--primary-soft); background: rgba(255, 138, 179, 0.12); }
.install-step-icon svg { width: 22px; height: 22px; }
.install-steps strong, .install-steps small { display: block; }
.install-steps strong { color: var(--text); font-size: 13px; font-weight: 900; }
.install-steps small { margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 600; }
.install-demo { padding: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; }
.demo-phone { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.demo-browser-top { min-height: 42px; display: grid; grid-template-columns: 34px 1fr 34px; gap: 8px; align-items: center; padding: 7px 9px; background: var(--surface-3); border-bottom: 1px solid var(--line); }
.demo-browser-top span { width: 30px; height: 30px; display: grid; place-items: center; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.demo-browser-top strong { text-align: center; font-size: 12px; font-weight: 900; }
.demo-screen { min-height: 106px; display: grid; gap: 8px; place-items: center; padding: 14px; }
.demo-screen svg { width: 70px; height: auto; }
.demo-screen img { width: 78px; height: auto; border-radius: 12px; }
.demo-screen div { width: min(190px, 82%); height: 8px; border-radius: 99px; background: var(--surface-3); }
.demo-action-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 8px; background: var(--surface-2); border-top: 1px solid var(--line); }
.demo-action-row span { min-height: 46px; display: grid; place-items: center; gap: 2px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 11px; font-weight: 800; }
.demo-action-row svg { width: 19px; height: 19px; }

/* ---------- Launch banner / countdown ---------- */
.launch-banner {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center;
  padding: 12px 14px; border-radius: 14px; margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(255, 45, 119, 0.18), rgba(126, 226, 168, 0.1));
  border: 1px solid var(--line-strong);
}
.launch-banner .count { font-size: 22px; font-weight: 900; letter-spacing: -0.02em; line-height: 1; }
.launch-banner .count small { display: block; font-size: 10px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 3px; }
.launch-banner p { margin: 0; font-size: 13px; font-weight: 700; }
.launch-banner p span { color: var(--primary-soft); }

/* ---------- Stepper / onboarding ---------- */
.stepper { display: grid; gap: 16px; }
.step-dots { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }
.step-dot { height: 5px; flex: 1; border-radius: 99px; background: var(--surface-3); transition: background 0.3s ease; }
.step-dot.done { background: var(--mint); }
.step-dot.active { background: var(--primary-bright); }
.step-card { padding: 20px; display: grid; gap: 14px; }
.step-kicker { color: var(--primary-soft); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: 0.1em; }
.step-title { margin: 0; font-size: 24px; font-weight: 900; letter-spacing: -0.02em; line-height: 1.08; }
.step-sub { margin: 0; color: var(--muted); font-weight: 600; font-size: 14px; }
.step-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.step-actions.single { grid-template-columns: 1fr; }

/* ---------- GP picker ---------- */
.gp-search { position: relative; }
.gp-results { display: grid; gap: 8px; margin-top: 10px; max-height: 320px; overflow: auto; }
.gp-result { text-align: left; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); display: grid; gap: 3px; }
.gp-result:active { border-color: var(--primary); }
.gp-result strong { font-size: 14px; font-weight: 800; }
.gp-result small { color: var(--muted); font-size: 12px; font-weight: 600; }
.gp-result .gp-code { color: var(--mint); font-weight: 800; font-size: 11px; letter-spacing: 0.04em; }
.gp-selected { padding: 14px; display: grid; gap: 4px; border-color: rgba(126, 226, 168, 0.4); }
.gp-selected strong { font-size: 15px; font-weight: 900; }
.gp-selected .gp-code { color: var(--mint); font-weight: 800; font-size: 12px; }
.terms-doc { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.terms-doc summary { cursor: pointer; padding: 12px 14px; font-weight: 800; font-size: 13px; list-style: none; }
.terms-doc summary::-webkit-details-marker { display: none; }
.terms-doc[open] summary { border-bottom: 1px solid var(--line); }
.terms-body { max-height: 240px; overflow: auto; padding: 12px 14px; white-space: pre-wrap; font-size: 12px; line-height: 1.55; color: var(--muted); }
.toggle-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; font-weight: 700; font-size: 13px; }

/* iOS-style switch */
.switch { position: relative; width: 50px; height: 30px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; }
.switch .track { position: absolute; inset: 0; background: var(--surface-3); border-radius: 99px; transition: background 0.2s ease; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform 0.2s ease; }
.switch input:checked + .track { background: var(--mint); }
.switch input:checked + .track::after { transform: translateX(20px); }

/* ---------- Health / wearables ---------- */
.health-rings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ring-card { padding: 14px 10px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); display: grid; gap: 8px; justify-items: center; }
.ring { width: 72px; height: 72px; }
.ring-value { font-size: 18px; font-weight: 900; }
.ring-label { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.metric-card { padding: 14px; display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; }
.metric-card .metric-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 138, 179, 0.12); color: var(--primary-soft); }
.metric-value { font-size: 20px; font-weight: 900; }
.metric-name { color: var(--muted); font-size: 12px; font-weight: 700; }
.connect-card { padding: 18px; display: grid; gap: 12px; text-align: center; justify-items: center; }
.connect-logos { display: flex; gap: 10px; align-items: center; justify-content: center; }
.connect-logos span { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); }

/* ---------- Support chat ---------- */
.chat-thread { display: grid; gap: 10px; padding: 4px; max-height: 52dvh; overflow: auto; }
.chat-bubble { max-width: 82%; padding: 11px 14px; border-radius: 16px; font-size: 14px; font-weight: 600; line-height: 1.35; }
.chat-bubble.them { justify-self: start; background: var(--surface-3); border-bottom-left-radius: 5px; }
.chat-bubble.me { justify-self: end; background: linear-gradient(135deg, var(--primary-bright), var(--primary)); color: #fff; border-bottom-right-radius: 5px; }
.chat-bubble time { display: block; margin-top: 4px; font-size: 10px; font-weight: 700; opacity: 0.6; }
.chat-input-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }

/* ---------- Waitlist ---------- */
.waitlist-card { padding: 18px; display: grid; gap: 14px; }

/* ---------- Confetti ---------- */
.confetti { position: fixed; inset: 0; z-index: 70; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(108vh) rotate(540deg); opacity: 0.9; } }

/* ---------- Misc ---------- */
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.hidden { display: none !important; }
.center { text-align: center; }
.stack { display: grid; gap: 12px; }
.muted-link { background: none; color: var(--muted-2); font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

@media (min-width: 560px) {
  body { padding: 24px 0; }
  .app-frame { min-height: calc(100dvh - 48px); border-radius: 28px; }
  .bottom-nav { bottom: 24px; border-radius: 0 0 28px 28px; }
}

/* ---------- Desktop: sidebar nav + wider, multi-column content ---------- */
@media (min-width: 900px) {
  body { padding: 0; background: var(--bg); }
  /* Only the main app (which renders the nav) becomes a sidebar layout; landing/onboarding stay centered. */
  .app-frame.has-nav {
    max-width: 1180px; min-height: 100dvh; border-radius: 0; overflow: visible;
    display: grid; grid-template-columns: 248px minmax(0, 1fr);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
  }
  /* Bottom tab bar becomes a sticky left sidebar (same markup) */
  .bottom-nav {
    position: sticky; top: 0; bottom: auto; left: auto; transform: none;
    width: auto; height: 100dvh; order: -1; z-index: 5;
    border-top: 0; border-right: 1px solid var(--line); border-radius: 0;
    padding: 20px 12px; background: rgba(16, 14, 20, 0.5); backdrop-filter: none;
    display: flex; flex-direction: column; gap: 4px;
  }
  .tab-grid { grid-template-columns: 1fr; gap: 4px; align-items: stretch; }
  .tab-button {
    grid-auto-flow: column; grid-template-columns: 24px 1fr; justify-content: start;
    place-items: center start; gap: 13px; min-height: 46px; padding: 0 14px;
    font-size: 14px; font-weight: 700; border-radius: 12px;
  }
  .tab-button:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
  .install-tab { margin-top: 8px; box-shadow: none; }

  .app-shell { min-height: 100dvh; padding: 30px 44px calc(30px + var(--safe-bottom)); max-width: 980px; margin: 0 auto; }

  /* Use the extra width */
  .service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .membership-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-title { font-size: 34px; }
  .button:hover { filter: brightness(1.06); }
  .card:hover { border-color: rgba(255, 255, 255, 0.12); }
}

@media (max-width: 430px) {
  .app-shell { padding-left: 13px; padding-right: 13px; }
  .topbar { grid-template-columns: 1fr auto; }
  .demo-chip { display: none; }
  .brand { gap: 8px; }
  .brand-logo, .brand-logo svg { height: 30px; }
  .two-col { grid-template-columns: 1fr; }
  .service-grid, .stats-row { grid-template-columns: 1fr; }
  .service-card { min-height: 104px; }
  .install-steps li { grid-template-columns: 26px 36px minmax(0, 1fr); padding: 9px; }
  .tab-grid { gap: 4px; }
  .tab-button { font-size: 10px; }
  .hero-title { font-size: 26px; }
}

@media (max-width: 380px) {
  .service-grid, .stats-row, .health-rings { grid-template-columns: 1fr; }
}
