* { margin:0; padding:0; box-sizing:border-box; }

:root {
  --bg:       #09090B;
  --s1:       #111114;
  --s2:       #18181B;
  --s3:       #27272A;
  --s4:       #3F3F46;
  --t1:       #FAFAFA;
  --t2:       #A1A1AA;
  --t3:       #52525B;
  --accent:   #818CF8;
  --accent-d: #4F46E5;
  --lo:       #4ADE80;
  --mid:      #FBBF24;
  --hi:       #F87171;
  --r-phone:  44px;
  --phone-w: min(375px, calc(100vw - 48px));
  --font:     'Plus Jakarta Sans', sans-serif;
  --mono:     'JetBrains Mono', monospace;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  font-family: var(--font);
  color: var(--t1);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Page Header */
.page-header {
  text-align: center;
  margin-bottom: 52px;
}
.page-header .eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--t3);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.page-header h1 {
  font-size: 28px;
  font-weight: 600;
  color: var(--t1);
  letter-spacing: -.03em;
}
.page-header h1 span { color: var(--accent); }
.page-header p {
  margin-top: 8px;
  color: var(--t2);
  font-size: 14px;
}

/* Floating Prototype Navigator */
#proto-nav {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
#proto-toggle {
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15,15,20,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 100px;
  padding: 9px 18px 9px 14px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
  transition: border-color .2s, color .2s;
  white-space: nowrap;
  user-select: none;
}
#proto-toggle:hover { border-color: rgba(129,140,248,.5); color: rgba(255,255,255,.85); }
#proto-toggle .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: proto-pulse 2s ease-in-out infinite;
}
@keyframes proto-pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.4; transform:scale(.7); }
}
#proto-tray {
  pointer-events: all;
  background: rgba(15,15,20,.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  padding: 12px 14px;
  display: none;
  flex-direction: column;
  gap: 4px;
  min-width: 230px;
  box-shadow: 0 24px 64px rgba(0,0,0,.6);
}
#proto-tray.open { display: flex; }
.proto-group-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
  padding: 6px 8px 4px;
}
.proto-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: var(--font);
}
.proto-item:hover  { background: rgba(255,255,255,.07); }
.proto-item.active { background: rgba(129,140,248,.15); }
.proto-item .pi-icon  { display:none; }
.proto-item .pi-label { font-size:13px; font-weight:500; color:rgba(255,255,255,.75); flex:1; }
.proto-item.active .pi-label { color: var(--accent); }
.proto-item .pi-badge {
  font-family: var(--mono);
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.3);
  white-space: nowrap;
}
.proto-divider { height:1px; background:rgba(255,255,255,.07); margin:4px 0; }
.nav-btn { display: none; }

/* Phone Frame */
.phones-grid {
  display: contents;
}

.phone-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.screen, .onboarding, .ble-screen, .dashboard, .trends-screen, .ai-screen, .settings-screen, .paywall-screen {
  animation: none;
}
@keyframes screenFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.screen-animate {
  animation: screenFadeIn 0.22s ease-out forwards;
}
.phone-label {
  display: none;
}

.phone {
  width: min(390px, 100vw);
  height: min(844px, 100vh);
  background: #000;
  border-radius: clamp(0px, calc((100vw - 390px) * 999), var(--r-phone));
  border: 1px solid var(--s3);
  box-shadow: 0 48px 100px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.04);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* Dynamic island */
.phone::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 34px;
  background: #000;
  border-radius: 20px;
  z-index: 100;
}

.screen {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  background: var(--s1);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.screen::-webkit-scrollbar { display: none; }
.screen--flex {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Status Bar */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 62px 28px 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--t2);
}
.status-right { display:flex; gap:6px; align-items:center; }

/* SCREEN 1 — ONBOARDING */
.onboarding {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding: 20px 32px 40px;
  display: flex;
  flex-direction: column;
  background: #000;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.onboarding::-webkit-scrollbar { display: none; }

.ob-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 48px;
  padding-left: 4px;
}
.ob-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ob-icon svg { width:16px; height:16px; }
.ob-logo-text { white-space: nowrap;
  font-size: 16px;
  font-weight: 600;
  color: var(--t1);
  letter-spacing: -.02em;
}

.ob-hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ob-ring-wrap {
  position: relative;
  width: 200px;
  height: 200px;
}
.ob-ring-wrap svg {
  width: 200px;
  height: 200px;
}
.ob-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.ob-score {
  font-family: var(--mono);
  font-size: 42px;
  font-weight: 500;
  color: var(--lo);
  line-height: 1;
}
.ob-score-lbl {
  font-size: 10px;
  color: var(--t3);
  letter-spacing: .1em;
  text-transform: uppercase;
}

@keyframes dash-anim {
  0% { stroke-dashoffset: 502; }
  100% { stroke-dashoffset: 125; }
}
.arc-fg { animation: dash-anim 2s ease-out forwards; }

.ob-copy {
  margin-bottom: 36px;
}
.ob-headline {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.2;
  color: var(--t1);
  margin-bottom: 12px;
}
.ob-sub {
  font-size: 14px;
  color: var(--t2);
  line-height: 1.7;
}

.ob-cta-wrap { display: flex; flex-direction: column; gap: 10px; }

.btn-primary {
  background: var(--t1);
  color: #000;
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  letter-spacing: -.01em;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--s3);
  color: var(--t2);
  border-radius: 14px;
  padding: 15px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  width: 100%;
  cursor: pointer;
}

/* BLE PAIRING SCREENS */
.ble-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0 24px 24px;
  overflow-y: auto;
}
.ble-step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 0 28px;
}
.ble-step-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--s3);
  transition: background .3s;
}
.ble-step-dot.active { background: var(--accent); }
.ble-step-dot.done   { background: var(--lo); }

.ble-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}
.ble-pulse {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: rgba(129,140,248,.12);
  border: 2px solid rgba(129,140,248,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: ble-pulse 2s ease-in-out infinite;
}
@keyframes ble-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(129,140,248,.25); }
  50%      { box-shadow: 0 0 0 16px rgba(129,140,248,0); }
}
.ble-pulse svg { width: 40px; height: 40px; }

.ble-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--t1);
  text-align: center;
  letter-spacing: -.03em;
  margin-bottom: 10px;
}
.ble-sub {
  font-size: 13px;
  color: var(--t2);
  text-align: center;
  line-height: 1.55;
  margin-bottom: 28px;
}
.ble-device-card {
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color .2s;
}
.ble-device-card:hover { border-color: var(--accent); transform: translateY(-1px); transition: border-color .2s, transform .15s; }
.ble-device-card:active { transform: scale(0.98); }
.ble-device-card.selected { border-color: var(--accent); background: rgba(129,140,248,.08); }
.ble-device-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(129,140,248,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.ble-device-info { flex: 1; }
.ble-device-name { font-size: 14px; font-weight: 600; color: var(--t1); }
.ble-device-rssi { font-size: 11px; color: var(--t3); margin-top: 2px; }
.ble-signal-bars { display: flex; gap: 2px; align-items: flex-end; }
.ble-signal-bars span {
  width: 4px; border-radius: 2px; background: var(--lo);
}
.ble-scanning {
  font-size: 12px; color: var(--t3);
  text-align: center;
  margin-bottom: 20px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.ble-scanning::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.2} }

.ble-success-check {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(74,222,128,.12);
  border: 2px solid rgba(74,222,128,.4);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  font-size: 36px;
}
.ble-detail-row {
  display: flex; justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--s3);
  font-size: 13px;
}
.ble-detail-row:last-of-type { border-bottom: none; }
.ble-detail-label { color: var(--t3); }
.ble-detail-val { color: var(--t1); font-weight: 500; }
.ble-detail-val.ok { color: var(--lo); }
.ble-gdpr-note {
  font-size: 10.5px; color: var(--t3); text-align: center;
  line-height: 1.5; margin: 16px 0 20px;
}
.ble-spacer { flex: 1; }

/* SCREEN 2 — DASHBOARD */
.dashboard {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding: 16px 24px 32px;
  background: var(--s1);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.dashboard::-webkit-scrollbar { display: none; }

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.dash-greeting {
  font-size: 12px;
  color: var(--t3);
  margin-bottom: 3px;
  letter-spacing: .01em;
}
.dash-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--t1);
  letter-spacing: -.02em;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--s3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--t1);
}

/* Stress card */
.stress-card {
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 12px;
  position: relative;
}
.stress-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.stress-label {
  font-size: 12px;
  color: var(--t3);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-family: var(--mono);
}
.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--lo);
  font-family: var(--mono);
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lo);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink {
  0%,100% { opacity:1; }
  50% { opacity:.3; }
}

.stress-body {
  display: flex;
  align-items: center;
  gap: 24px;
}
.stress-gauge { flex-shrink: 0; position: relative; width: 100px; height: 100px; }
.stress-gauge svg { width: 100px; height: 100px; }
.gauge-score {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.gauge-num {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 500;
  color: var(--lo);
  line-height: 1;
}
.gauge-unit {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--t3);
  letter-spacing: .08em;
}

.stress-info { flex: 1; }
.stress-status {
  font-size: 18px;
  font-weight: 600;
  color: var(--t1);
  letter-spacing: -.02em;
  margin-bottom: 6px;
}
.stress-status-desc {
  font-size: 12px;
  color: var(--t2);
  line-height: 1.6;
}

/* Stat row */
.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.stat-card {
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: 16px;
  padding: 18px;
}
.stat-card-lbl {
  font-size: 11px;
  color: var(--t3);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-family: var(--mono);
  margin-bottom: 8px;
}
.stat-card-val {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 500;
  color: var(--t1);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-card-sub {
  font-size: 11px;
  color: var(--t2);
}

/* Activity card */
.activity-card {
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 12px;
}
.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.activity-title {
  font-size: 12px;
  color: var(--t3);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-family: var(--mono);
}
.activity-range {
  font-size: 11px;
  color: var(--t3);
}
.mini-chart { width: 100%; height: 60px; }

/* Insight card */
.insight-card {
  background: rgba(129,140,248,.08);
  border: 1px solid rgba(129,140,248,.2);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.insight-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 6px;
}
.insight-text {
  font-size: 13px;
  color: var(--t2);
  line-height: 1.6;
}
.insight-text strong { color: var(--t1); font-weight: 600; }

/* Bottom Nav */
.bottom-nav {
  flex-shrink: 0;
  background: rgba(17,17,20,.92);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--s3);
  display: flex;
  padding: 12px 8px 28px;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.nav-item svg {
  width: 22px;
  height: 22px;
  stroke: var(--t3);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-item.active svg { stroke: var(--accent); }

.nav-item-lbl {
  font-size: 10px;
  color: var(--t3);
  font-family: var(--mono);
}
.nav-item.active .nav-item-lbl { color: var(--accent); }

/* SCREEN 3 — TRENDS */
.trends-screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding: 16px 24px 32px;
  background: var(--s1);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.trends-screen::-webkit-scrollbar { display: none; }

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--t1);
  letter-spacing: -.02em;
  margin-bottom: 20px;
}

.period-toggle {
  display: flex;
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 20px;
  width: 100%;
}
.period-btn { flex: 1; text-align: center; }
.period-btn {
  padding: 7px 20px;
  border-radius: 8px;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--t3);
  cursor: pointer;
}
.period-btn.active {
  background: var(--s3);
  color: var(--t1);
}

.chart-card {
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 12px;
}
.chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.chart-big-num {
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 500;
  color: var(--t1);
  line-height: 1;
}
.chart-big-sub {
  font-size: 12px;
  color: var(--t2);
  margin-top: 4px;
}
.chart-badge {
  font-family: var(--mono);
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(74,222,128,.1);
  color: var(--lo);
  border: 1px solid rgba(74,222,128,.2);
}
.trend-chart { display:none; }
.chart-canvas-wrap { position:relative; width:100%; height:160px; margin-top:4px; }
.chart-canvas-wrap canvas { width:100%; height:100%; display:block; }
.chart-tooltip {
  position:absolute;
  background:rgba(20,22,30,.92);
  border:1px solid rgba(129,140,248,.3);
  border-radius:8px;
  padding:5px 10px;
  font-family:var(--mono);
  font-size:10px;
  color:#fff;
  pointer-events:none;
  display:none;
  white-space:nowrap;
  transform:translate(-50%,-110%);
}

.events-list { margin-top: 4px; }
.events-title {
  font-size: 11px;
  color: var(--t3);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-family: var(--mono);
  margin-bottom: 12px;
}
.event-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--s3);
}
.event-item:last-child { border-bottom: none; }
.event-item {
  cursor: pointer;
  transition: background .15s, border-radius .15s;
}
.event-item.active {
  background: rgba(129,140,248,.10);
  border-radius: 12px;
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
}
.event-item.active .event-desc { color: var(--t1); }
.event-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.event-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--t3);
  width: 48px;
  flex-shrink: 0;
}
.event-desc {
  flex: 1;
  font-size: 13px;
  color: var(--t2);
}
.event-delta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--lo);
}

/* SCREEN 4 — AI */
.ai-screen {
  height: 100%;
  background: var(--s1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ai-header {
  padding: 16px 24px 16px;
  border-bottom: 1px solid var(--s3);
  display: flex;
  align-items: center;
  gap: 12px;
}
.ai-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(129,140,248,.15);
  border: 1px solid rgba(129,140,248,.25);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-avatar svg { width:18px; height:18px; stroke: var(--accent); fill:none; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
.ai-header-text { flex:1; }
.ai-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--t1);
  letter-spacing: -.01em;
}
.ai-sub {
  font-size: 11px;
  color: var(--t3);
  font-family: var(--mono);
}
.premium-pill {
  font-size: 9px;
  font-family: var(--mono);
  padding: 3px 8px;
  border-radius: 100px;
  background: rgba(129,140,248,.1);
  color: var(--accent);
  border: 1px solid rgba(129,140,248,.2);
  letter-spacing: .04em;
}

.chat-messages {
  flex: 1;
  padding: 16px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.chat-messages::-webkit-scrollbar { display: none; }

.msg {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 80%;
}
.msg.ai { align-self: flex-start; }
.msg.user { align-self: flex-end; }

.msg-bubble {
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.55;
}
.msg.ai .msg-bubble {
  background: var(--s2);
  border: 1px solid var(--s3);
  color: var(--t2);
  border-bottom-left-radius: 4px;
}
.msg.user .msg-bubble {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg-bubble strong { color: var(--t1); font-weight: 600; }
.msg.user .msg-bubble strong { color: #fff; }
.msg-time {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--t3);
  padding: 0 4px;
}
.msg.user .msg-time { text-align: right; }

.ai-input-wrap {
  padding: 8px 16px;
  background: rgba(17,17,20,.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--s3);
  flex-shrink: 0;
}
.ai-input-row {
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ai-input-text {
  flex: 1;
  font-size: 13px;
  color: var(--t3);
}
.ai-send {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-send svg { width:14px; height:14px; stroke:#fff; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

/* SCREEN 5 — SETTINGS */
.settings-screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding: 16px 24px 32px;
  background: var(--s1);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.settings-screen::-webkit-scrollbar { display: none; }

.premium-banner {
  background: rgba(129,140,248,.08);
  border: 1px solid rgba(129,140,248,.2);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 24px;
}
.premium-badge {
  font-family: var(--mono);
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 100px;
  background: rgba(129,140,248,.15);
  color: var(--accent);
  border: 1px solid rgba(129,140,248,.3);
  letter-spacing: .06em;
  display: inline-block;
  margin-bottom: 10px;
}
.premium-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--t1);
  letter-spacing: -.02em;
  margin-bottom: 4px;
}
.premium-desc {
  font-size: 12px;
  color: var(--t2);
  line-height: 1.5;
  margin-bottom: 14px;
}
.btn-upgrade {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}

.settings-section { margin-bottom: 24px; }
.settings-section-lbl {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--t3);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding: 0 2px;
}
.settings-group {
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: 16px;
  overflow: hidden;
}
.settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--s3);
}
.settings-row:last-child { border-bottom: none; }
.settings-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--s3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.settings-icon-box svg {
  width: 16px;
  height: 16px;
  stroke: var(--t2);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.settings-row-text { flex: 1; }
.settings-row-name {
  font-size: 14px;
  color: var(--t1);
  font-weight: 500;
  margin-bottom: 2px;
}
.settings-row-desc {
  font-size: 11px;
  color: var(--t3);
}
.settings-arrow { color: var(--t3); font-size: 16px; }

/* Toggle switch */
.toggle-wrap {
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: var(--lo);
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: background .2s;
}
.toggle-wrap.off { background: var(--s3); }
.toggle-knob {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: right .2s;
}
.toggle-wrap.off .toggle-knob { right: auto; left: 3px; }

/* Status badge */
.status-active {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--lo);
  padding: 3px 8px;
  border-radius: 100px;
  background: rgba(74,222,128,.08);
  border: 1px solid rgba(74,222,128,.2);
}

/* SCREEN 6 — PREMIUM PAYWALL */
.premium-screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  background: var(--s1);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.premium-screen::-webkit-scrollbar { display: none; }

.pw-back {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 16px 20px 0;
  cursor: pointer;
  color: var(--t3);
  font-size: 13px;
}
.pw-back svg { width:16px; height:16px; stroke:var(--t3); fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.pw-back:hover { color: var(--t2); }

.pw-hero {
  padding: 24px 24px 0;
  text-align: center;
}
.pw-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(129,140,248,.3) 0%, rgba(79,70,229,.4) 100%);
  border: 1px solid rgba(129,140,248,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.pw-icon svg { width:28px; height:28px; stroke:var(--accent); fill:none; stroke-width:1.5; stroke-linecap:round; }
.pw-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--t1);
  letter-spacing: -.03em;
  margin-bottom: 6px;
}
.pw-title span { color: var(--accent); }
.pw-subtitle {
  font-size: 13px;
  color: var(--t2);
  line-height: 1.6;
  max-width: 260px;
  margin: 0 auto;
}

/* Rating row */
.pw-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px 24px 0;
  padding: 10px 16px;
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: 12px;
}
.pw-stars { color: #FBBF24; font-size: 13px; letter-spacing: 1px; }
.pw-rating-text { font-size: 12px; color: var(--t2); }
.pw-rating-text strong { color: var(--t1); }

/* Feature comparison */
.pw-features {
  margin: 20px 24px 0;
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: 16px;
  overflow: hidden;
}
.pw-feat-header {
  display: grid;
  grid-template-columns: 1fr 80px 80px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--s3);
  background: var(--s1);
}
.pw-feat-header-lbl {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--t3);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
}
.pw-feat-header-lbl:first-child { text-align: left; }
.pw-feat-header-lbl.accent { color: var(--accent); }

.pw-feat-row {
  display: grid;
  grid-template-columns: 1fr 80px 80px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--s3);
  align-items: center;
}
.pw-feat-row:last-child { border-bottom: none; }
.pw-feat-name {
  font-size: 12px;
  color: var(--t2);
}
.pw-feat-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.pw-check { color: var(--lo); font-size: 15px; }
.pw-cross { color: var(--s4); font-size: 18px; line-height:1; }
.pw-check-accent { color: var(--accent); font-size: 15px; }

/* Pricing plans */
.pw-plans {
  margin: 20px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pw-plan {
  border: 1px solid var(--s3);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  background: var(--s2);
  transition: border-color .15s;
  position: relative;
}
.pw-plan.selected {
  border-color: var(--accent);
  background: rgba(129,140,248,.06);
}
.pw-plan-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--s4);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s;
}
.pw-plan.selected .pw-plan-radio {
  border-color: var(--accent);
  background: var(--accent);
}
.pw-plan.selected .pw-plan-radio::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}
.pw-plan-info { flex: 1; }
.pw-plan-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--t1);
  margin-bottom: 2px;
}
.pw-plan-desc {
  font-size: 11px;
  color: var(--t3);
}
.pw-plan-price {
  text-align: right;
}
.pw-plan-amount {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--t1);
}
.pw-plan-period {
  font-size: 10px;
  color: var(--t3);
}
.pw-best-badge {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: 9px;
  padding: 2px 10px;
  border-radius: 100px;
  letter-spacing: .06em;
  white-space: nowrap;
}

/* CTA */
.pw-cta {
  margin: 20px 24px 0;
}
.pw-cta-btn {
  width: 100%;
  background: var(--accent);
  border: none;
  border-radius: 14px;
  padding: 16px;
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: -.01em;
  position: relative;
  overflow: hidden;
}
.pw-cta-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.12) 0%, transparent 60%);
}
.pw-trust {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.pw-trust-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--t3);
  font-family: var(--mono);
}
.pw-trust-item svg { width:10px; height:10px; stroke:var(--t3); fill:none; stroke-width:2; stroke-linecap:round; }

/* Review */
.pw-review {
  margin: 20px 24px 32px;
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: 14px;
  padding: 16px;
}
.pw-review-stars { color: #FBBF24; font-size: 12px; margin-bottom: 8px; }
.pw-review-text {
  font-size: 12px;
  color: var(--t2);
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 10px;
}
.pw-review-author {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pw-review-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--s3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--t2);
}
.pw-review-name {
  font-size: 11px;
  color: var(--t3);
  font-family: var(--mono);
}

