/* VerbalFix
   Look: "Mint & Marigold", Midnight layout. A teal stage with Lumi the robot
   on top, calm solid cards below, a floating dark bar for the main actions.
   Feedback never uses red. Clear words are green with a solid underline;
   words to polish are marigold with a dotted underline, so the two stay
   distinguishable without colour. Lumi keeps the same colours in both themes. */

@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-latin-800-normal.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}

:root {
  --bg: #FFF8E8;
  --surface: #FFFFFF;
  --ink: #10302A;
  --ink-soft: #4B6B63;
  --line: #E8DDBB;
  --primary: #0C8571;
  --on-primary: #FFFFFF;
  --primary-text: #0B6F5E;
  --soft: #CFEFE3;
  --stage1: #0A5A4C;
  --stage2: #0C8571;
  --stage-glow: rgba(255, 201, 51, 0.28);
  --accent: #FFC933;
  --on-accent: #10302A;
  --good: #17794A;
  --good-bg: #DDF3E6;
  --good-ink: #0E3D27;
  --amber: #8A5200;
  --amber-bg: #FFE3A3;
  --amber-ink: #3A2400;
  --amber-dot: #F2A900;
  --lit: #FFE9A8;
  --nav: #10302A;

  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Devanagari", "Noto Sans Gujarati", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0C1F1B;
  --surface: #12302A;
  --ink: #F2FFF9;
  --ink-soft: #9CC4B9;
  --line: #1F4A40;
  --primary: #12806F;
  --primary-text: #7FE0CB;
  --soft: #17433B;
  --stage1: #06302A;
  --stage2: #0D6256;
  --stage-glow: rgba(255, 201, 51, 0.18);
  --good: #7BDDA6;
  --good-bg: #1B4A39;
  --good-ink: #E7FFF1;
  --amber: #FFCB66;
  --amber-bg: #5B4510;
  --amber-ink: #FFF1CF;
  --amber-dot: #FFCB66;
  --lit: #5B4A14;
  --nav: #06302A;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0C1F1B;
    --surface: #12302A;
    --ink: #F2FFF9;
    --ink-soft: #9CC4B9;
    --line: #1F4A40;
    --primary: #12806F;
    --primary-text: #7FE0CB;
    --soft: #17433B;
    --stage1: #06302A;
    --stage2: #0D6256;
    --stage-glow: rgba(255, 201, 51, 0.18);
    --good: #7BDDA6;
    --good-bg: #1B4A39;
    --good-ink: #E7FFF1;
    --amber: #FFCB66;
    --amber-bg: #5B4510;
    --amber-ink: #FFF1CF;
    --amber-dot: #FFCB66;
    --lit: #5B4A14;
    --nav: #06302A;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}
.screen :focus-visible { box-shadow: 0 0 0 6px var(--on-accent); }
.stage :focus-visible, .dock :focus-visible, .nav :focus-visible { box-shadow: none; }

[tabindex="-1"]:focus { outline: none; box-shadow: none; }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */

.screen {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 0 28px;
}
.screen.has-dock { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }

.pad { display: flex; flex-direction: column; gap: 12px; padding: 14px 12px 0; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 16px;
  background: var(--soft); color: var(--primary-text);
  font-weight: 800; cursor: pointer; text-decoration: none;
}
.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.marigold { background: var(--accent); color: var(--on-accent); }
.btn.plain { background: none; padding: 0 10px; min-height: 44px; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* Round buttons that sit on the teal stage */
.round {
  flex: none; display: grid; place-items: center;
  width: 52px; height: 52px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .18); color: #FFFFFF; text-decoration: none;
}
.round svg { width: 24px; height: 24px; }
.round.small { width: 44px; height: 44px; }
.round.small svg { width: 22px; height: 22px; }
.round.main {
  width: 76px; height: 76px;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, .18);
}
.round.main svg { width: 32px; height: 32px; }

/* ---------- The teal stage ---------- */

.stage {
  position: relative; isolation: isolate; overflow: hidden;
  margin: 12px 12px 0; padding: 14px 16px 18px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  border-radius: 36px; color: #FFFFFF;
  background: linear-gradient(160deg, var(--stage1), var(--stage2));
}
.stage::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 50%; top: 56px; width: 320px; height: 320px; margin-left: -160px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--stage-glow), rgba(0, 0, 0, 0));
}
.stage-top { align-self: stretch; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stage h1 { font-size: 1.75rem; line-height: 1.15; font-weight: 800; text-align: center; letter-spacing: -0.01em; }

.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.2rem; line-height: 1; letter-spacing: -0.01em; }
.brand svg { flex: none; }
.brand b { font-weight: 800; background: var(--accent); color: var(--on-accent); padding: .1em .32em .06em; margin-left: .08em; border-radius: .4em; }

.langs { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .18); }
.lang {
  min-height: 38px; padding: 0 12px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: #FFFFFF; font-weight: 700; font-size: .875rem;
}
.lang[aria-pressed="true"] { background: #FFFFFF; color: var(--stage1); }

.say-pill {
  max-width: 30ch; padding: 10px 16px; border-radius: 22px;
  background: rgba(255, 255, 255, .18); font-weight: 700; font-size: .95rem; line-height: 1.35; text-align: center;
}
.round-row { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 4px; }
.stage-note { color: #E6FFF7; font-size: .875rem; text-align: center; }

/* ---------- Lumi ---------- */

.lumi-wrap { --s: 132px; position: relative; flex: none; width: calc(var(--s) + 20px); height: calc(var(--s) + 20px); display: grid; place-items: center; }
.lumi-wrap.mid { --s: 104px; }
.lumi-wrap.sm { --s: 84px; }
.lumi { position: relative; width: var(--s); height: var(--s); }
.lumi svg { display: block; width: 100%; height: 100%; }
.lumi-wrap .ring {
  position: absolute; inset: 4px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0;
}
.lumi-wrap .ring.r2 { border-color: #CFEFE3; }
.lumi-wrap.always .ring, .lumi-wrap[data-state="speak"] .ring, .lumi-wrap[data-state="listen"] .ring {
  animation: ring 2.6s ease-out infinite;
}
.lumi-wrap.always .ring.r2, .lumi-wrap[data-state="speak"] .ring.r2, .lumi-wrap[data-state="listen"] .ring.r2 { animation-delay: 1.3s; }
.lumi-wrap.always .lumi { animation: bob 3.4s ease-in-out infinite; }
.lumi-wrap[data-state="speak"] .lumi { animation: talk 1.1s ease-in-out infinite; }

@keyframes ring { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes talk { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* ---------- Home ---------- */

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { padding: 14px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.stat strong { font-size: 1rem; line-height: 1.25; font-weight: 800; }
.meter { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--good); }
.dots { display: flex; gap: 5px; }
.dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line); }
.dot.on { background: var(--amber-dot); border-color: var(--amber-dot); }

.continue {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  padding: 18px 18px 18px 20px; border-radius: 28px;
  background: var(--primary); color: var(--on-primary);
}
.continue .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.continue .small { font-size: .875rem; opacity: .92; }
.continue h2 { font-size: 1.3rem; line-height: 1.25; font-weight: 800; }
.continue .sub { font-size: .875rem; font-weight: 700; }
.go-circle { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.go-circle svg { width: 24px; height: 24px; }

.level { margin-top: 12px; }
.level h2, .lessons-h { font-size: 1.2rem; line-height: 1.25; font-weight: 800; }
.level .note { color: var(--ink-soft); font-size: .9rem; }
.lessons-h { padding: 18px 12px 0; }
.lesson-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lesson-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 64px; padding: 10px 14px; border-radius: 22px;
  text-decoration: none; background: var(--surface); border: 1px solid var(--line); text-align: left; cursor: pointer;
}
.lesson-row .text { flex: 1; min-width: 0; }
.lesson-row .t { font-weight: 800; display: block; }
.lesson-row .b { color: var(--ink-soft); font-size: .9rem; display: block; }
.lesson-row .prog-t { color: var(--ink-soft); font-size: .9rem; white-space: nowrap; font-weight: 700; }
.lesson-row .prog-t.done { color: var(--good); }
.lesson-row .chev { width: 18px; height: 18px; color: var(--ink-soft); flex: none; }

.polish-box { padding: 16px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); }
.polish-box h2 { font-size: 1.1rem; font-weight: 800; }
.polish-box p { color: var(--ink-soft); font-size: .9rem; margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; padding: 0; list-style: none; }
.chip {
  min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  background: var(--amber-bg); border: 0; font-weight: 800; color: var(--amber-ink);
}

.foot { margin: 22px 12px 0; display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--ink-soft); }
.foot .btn.plain { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 4px; font-weight: 500; }

/* ---------- Floating bars ---------- */

.nav, .dock {
  position: fixed; z-index: 5; left: 50%; transform: translateX(-50%);
  width: min(calc(100% - 24px), 536px);
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border-radius: 36px; background: var(--nav); color: #FFFFFF;
}
.nav a {
  flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; border-radius: 28px; background: none; color: #FFFFFF; text-decoration: none;
  font-size: .75rem; font-weight: 700; cursor: pointer;
}
.nav a svg { width: 22px; height: 22px; }
.nav a[aria-current="page"] { background: var(--accent); color: var(--on-accent); }

.dock { flex-wrap: wrap; }
.dock-side { flex: 1; display: flex; min-width: 0; }
.dock-side.end { justify-content: flex-end; }
.dock-btn {
  min-height: 52px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px;
  border: 0; border-radius: 26px; background: rgba(255, 255, 255, .14); color: #FFFFFF;
  font-size: .875rem; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap;
  min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.dock-btn svg { width: 20px; height: 20px; flex: none; }
.dock-btn.hl { background: #FFFFFF; color: #10302A; }
.dock-btn.wide { flex: 1; justify-content: center; }
.dock-btn[disabled] { opacity: .5; cursor: default; }

.mic {
  flex: none; width: 76px; height: 76px; margin: -14px 0; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--accent); color: var(--on-accent); display: grid; place-items: center;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, .18);
}
.mic svg { width: 32px; height: 32px; }
.mic.on { animation: breathe 1.8s ease-in-out infinite; }
.mic[disabled] { opacity: .55; cursor: default; }
@keyframes breathe {
  0%   { box-shadow: 0 0 0 8px rgba(255, 255, 255, .18), 0 0 0 8px rgba(255, 201, 51, .55); }
  70%  { box-shadow: 0 0 0 8px rgba(255, 255, 255, .18), 0 0 0 24px rgba(255, 201, 51, 0); }
  100% { box-shadow: 0 0 0 8px rgba(255, 255, 255, .18), 0 0 0 8px rgba(255, 201, 51, 0); }
}

/* ---------- Practice ---------- */

.stage.practice { align-items: stretch; gap: 12px; }
.prac-top { display: flex; align-items: center; gap: 12px; }
.prac-title { flex: 1; min-width: 0; }
.prac-title h1 { font-size: 1.2rem; line-height: 1.2; text-align: left; }
.prog { margin-top: 7px; display: flex; align-items: center; gap: 8px; font-size: .75rem; color: #E6FFF7; }
.prog-bar { flex: 1; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .22); }
.prog-bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.coach { display: flex; align-items: center; gap: 10px; }
.coach .status {
  flex: 1; min-width: 0; padding: 10px 14px; border-radius: 20px 20px 20px 6px;
  background: rgba(255, 255, 255, .18); font-size: .95rem; line-height: 1.35; font-weight: 700;
}
.status.ok { color: var(--accent); }

.sentence-card { padding: 20px 18px 16px; border-radius: 30px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.sentence {
  font-weight: 700; font-size: clamp(1.45rem, 6.2vw, 1.85rem); line-height: 1.65; letter-spacing: -0.01em;
  overflow-wrap: break-word;
}
.w {
  display: inline; padding: 0 2px; margin: 0 -1px;
  background: transparent; border: 0; border-radius: 6px; cursor: pointer;
  font: inherit; color: inherit;
  transition: background-color .35s ease;
}
.w.lit { background: var(--lit); }
.w.good { box-shadow: inset 0 -3px 0 var(--good); border-radius: 6px 6px 0 0; }
.w.polish {
  padding: 0 5px; margin: 0 -2px; border-radius: 8px;
  background: var(--amber-bg); color: var(--amber-ink);
  text-decoration: underline dotted var(--amber) 3px; text-underline-offset: 7px;
}
.legend { display: flex; align-items: center; gap: 16px; font-size: .8rem; color: var(--ink-soft); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { display: block; width: 18px; height: 0; border-top: 3px solid var(--good); }
.legend .dotted { border-top: 3px dotted var(--amber); }

.heard, .hint {
  padding: 12px 14px; border-radius: 24px; font-size: .9rem; line-height: 1.5; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--line);
}
.heard:empty, .hint:empty { display: none; }

/* ---------- Finish ---------- */

.fin-stage { padding-bottom: 22px; }
.fin-stage .lead { color: #E6FFF7; text-align: center; max-width: 34ch; }
.tally { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.tally div { padding: 14px 16px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); }
.tally strong { display: block; font-size: 1.7rem; line-height: 1.1; font-weight: 800; }
.tally span { color: var(--ink-soft); font-size: .9rem; }
.keep-phrase { font-size: 1.15rem; font-weight: 800; line-height: 1.35; margin: 4px 0 10px; }
.about-card { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.about-card .go-circle { background: var(--primary); color: var(--on-primary); }
.fin-h { font-size: 1.1rem; font-weight: 800; margin-top: 8px; }
.fin-p { color: var(--ink-soft); font-size: .9rem; }
.actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

/* ---------- Talk ---------- */

.talk-pick .stage { padding-bottom: 20px; }
.talk-pick .lead { color: #E6FFF7; text-align: center; max-width: 34ch; }
.pick-h { font-size: 1.1rem; font-weight: 800; margin: 6px 4px 0; }
.topics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.topic {
  width: 100%; min-height: 68px; padding: 10px 16px; cursor: pointer; text-align: left;
  border: 1px solid var(--line); border-radius: 22px; background: var(--surface);
  font-weight: 800; font-size: 1rem; color: var(--ink);
}
.topic:hover, .topic:focus-visible { border-color: var(--primary); }
.note-soft { color: var(--ink-soft); padding: 0 4px; }

.topic-chip { padding: 8px 16px; border-radius: 999px; background: #FFFFFF; color: var(--stage1); font-size: .875rem; font-weight: 800; }
.auto {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 6px 0 14px;
  border: 0; border-radius: 999px; cursor: pointer; background: rgba(255, 255, 255, .18); color: #FFFFFF; font-size: .8rem; font-weight: 700;
}
.auto .auto-v { padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .28); }
.auto[aria-pressed="true"] .auto-v { background: var(--accent); color: var(--on-accent); }

.toggles { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.msg.bot { position: relative; padding-right: 54px; }
.play {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--soft); color: var(--primary-text);
}
.play svg { width: 20px; height: 20px; }
.topic .sug { display: block; margin-top: 4px; width: max-content; padding: 1px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 800; }
.talk-stage { gap: 6px; }
.talk-stage .status {
  min-height: 1.4em; max-width: 34ch; text-align: center; font-size: .9rem; font-weight: 700; line-height: 1.35;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.talk-stage .status > span:last-child { flex: 0 1 auto; }
.wavebars { display: inline-flex; align-items: flex-end; gap: 3px; height: 14px; flex: none; }
.wavebars i { display: block; width: 3px; height: 8px; border-radius: 2px; background: var(--accent); animation: wave 1s ease-in-out infinite; }
.wavebars i:nth-child(2) { animation-delay: .15s; }
.wavebars i:nth-child(3) { animation-delay: .3s; }
.wavebars i:nth-child(4) { animation-delay: .45s; }
.wavebars i:nth-child(5) { animation-delay: .6s; }
@keyframes wave { 0%, 100% { height: 5px; } 50% { height: 14px; } }

.log { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 8px; }
.msg {
  max-width: 82%; padding: 11px 15px; border-radius: 20px;
  font-size: 1rem; line-height: 1.4; overflow-wrap: anywhere;
}
.msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.me { align-self: flex-end; background: var(--primary); color: var(--on-primary); border-bottom-right-radius: 6px; }
.msg.live { opacity: .8; font-style: italic; }

.fix {
  align-self: flex-end; width: min(100%, 340px);
  padding: 12px 14px; border-radius: 24px;
  background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px;
}
.fix p { margin: 0; }
.fix-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.fix-k { color: var(--ink-soft); font-size: .75rem; min-width: 52px; }
.fix .said, .fix .better { font-size: 1rem; line-height: 1.7; }
.fix .said {
  background: var(--amber-bg); color: var(--amber-ink);
  text-decoration: underline dotted var(--amber) 2px; text-underline-offset: 5px;
  padding: 2px 8px; border-radius: 8px;
}
.fix .better {
  background: var(--good-bg); color: var(--good-ink); box-shadow: inset 0 -3px 0 var(--good);
  padding: 2px 8px; border-radius: 8px 8px 0 0; font-weight: 800;
}
.fix-why { font-size: .875rem; line-height: 1.4; }
.fix-hint { font-size: .875rem; line-height: 1.5; color: var(--ink-soft); }
.fix-hear { align-self: flex-start; min-height: 40px; padding: 0 14px; border-radius: 14px; font-size: .875rem; }

.talk-dock .dock-links { display: contents; }
.typebox { display: flex; gap: 8px; flex: 1 1 100%; order: -1; }
.typein {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 16px;
  border: 2px solid transparent; border-radius: 24px;
  background: #FFFFFF; color: #10302A; font: inherit;
}
.typein::placeholder { color: #4B6B63; }
.typein:focus { outline: none; border-color: var(--accent); }
.typebox .btn { border-radius: 24px; background: var(--accent); color: var(--on-accent); }
.talk-dock.typing { border-radius: 32px; }

/* ---------- Shared bits for Welcome, Me and Premium ---------- */

.card { padding: 16px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.card-h { font-size: 1.05rem; line-height: 1.3; font-weight: 800; }
.card-p { color: var(--ink-soft); font-size: .9rem; }
.sec-h { font-size: 1.2rem; line-height: 1.25; font-weight: 800; padding: 10px 4px 8px; }
section + section { margin-top: 6px; }
section > .card + .card { margin-top: 10px; }
.note-soft.center { text-align: center; }
.center { text-align: center; }

.field-in {
  width: 100%; min-height: 56px; padding: 0 18px; border-radius: 20px;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 1.1rem; font-weight: 700;
}
.field-in.small { min-height: 44px; width: 11rem; max-width: 100%; font-size: 1rem; border-radius: 16px; padding: 0 14px; }
.field-in::placeholder { color: var(--ink-soft); font-weight: 500; }
.field-in:focus-visible { border-color: var(--primary); }
.field { display: block; }

/* Radio cards (welcome) */
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 16px;
  border-radius: 22px; border: 2px solid var(--line); background: var(--surface); color: var(--ink);
  text-align: left; cursor: pointer;
}
.opt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.opt-t { font-weight: 800; font-size: 1.05rem; line-height: 1.3; }
.opt-d { color: var(--ink-soft); font-size: .9rem; line-height: 1.35; }
.opt-tick {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--line); color: transparent;
}
.opt-tick svg { width: 16px; height: 16px; }
.opt[aria-checked="true"] { border-color: var(--primary); background: var(--soft); }
.opt[aria-checked="true"] .opt-tick { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

.steps { display: flex; gap: 6px; }
.steps i { width: 24px; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .28); }
.steps i.past { background: rgba(255, 255, 255, .7); }
.steps i.now { background: var(--accent); width: 34px; }
.skip { min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .18); color: #FFFFFF; font-weight: 700; cursor: pointer; }
.sum h1 { font-size: 1.5rem; line-height: 1.2; font-weight: 800; }
.sum p { color: var(--ink-soft); }
.welcome .stage h1.say-pill, .prem .stage h1.say-pill { font-size: 1rem; line-height: 1.35; }

.other-h { padding: 18px 12px 0; color: var(--ink-soft); font-weight: 800; font-size: .9rem; }
.you-chip { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 800; vertical-align: middle; }

/* Segmented control */
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 18px; background: var(--soft); }
.seg-b {
  flex: 1 1 auto; min-height: 44px; padding: 0 12px; border: 0; border-radius: 14px; cursor: pointer;
  background: transparent; color: var(--primary-text); font-weight: 700; font-size: .9rem;
}
.seg-b[aria-checked="true"] { background: var(--primary); color: var(--on-primary); }

/* Switch */
.sw {
  flex: none; position: relative; width: 56px; height: 32px; padding: 0; border: 0; border-radius: 99px; cursor: pointer;
  background: var(--line); transition: background .15s;
}
.sw i { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.sw[aria-checked="true"] { background: var(--primary); }
.sw[aria-checked="true"] i { transform: translateX(24px); }
.sw { min-height: 32px; }

/* Settings rows */
.sets { gap: 0; padding: 4px 16px; }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.srow:first-child { border-top: 0; }
.srow.wide { flex-direction: column; align-items: stretch; gap: 8px; }
.srow-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.srow-l { font-weight: 800; }
.srow-n { color: var(--ink-soft); font-size: .85rem; line-height: 1.35; }
.saved { min-height: 1.4em; padding: 0 4px; color: var(--good); font-weight: 700; font-size: .9rem; }
.btns { gap: 8px; }
.btns .btn { width: 100%; justify-content: flex-start; }

/* Me */
.me-stage { padding-bottom: 14px; }
.me-top { display: flex; align-items: center; gap: 6px; align-self: stretch; }
.me-id { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.me-id h1 { text-align: left; font-size: 1.5rem; overflow-wrap: anywhere; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-s { padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .2); font-size: .8rem; font-weight: 800; }

.prem-card {
  display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 24px; text-decoration: none;
  background: var(--accent); color: var(--on-accent);
}
.prem-ic { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--on-accent); color: var(--accent); }
.prem-ic svg { width: 24px; height: 24px; }
.prem-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prem-h { font-weight: 800; font-size: 1.1rem; line-height: 1.25; }
.prem-p { font-size: .9rem; line-height: 1.35; }
.prem-go { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; margin-top: 4px; }
.prem-go svg { width: 18px; height: 18px; }

.stats3 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 10px; }
.stat-l { color: var(--ink-soft); font-size: .8rem; font-weight: 700; }
.stats3 .stat strong { font-size: 1.4rem; }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 130px; }
.wk { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; min-width: 0; }
.wk-n { font-size: .75rem; font-weight: 800; min-height: 1em; }
.wk-bar { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.wk-bar i { display: block; width: 70%; max-width: 28px; border-radius: 8px 8px 4px 4px; background: var(--primary); }
.wk-bar i.today { background: var(--accent); box-shadow: 0 0 0 2px var(--on-accent) inset; }
.wk-bar i.zero { background: var(--line); }
.wk-d { font-size: .75rem; color: var(--ink-soft); font-weight: 700; }
.lvrow { display: grid; grid-template-columns: 6.5rem 1fr 3rem; align-items: center; gap: 10px; }
.lvrow-n { font-weight: 700; font-size: .9rem; }
.lvrow-c { color: var(--ink-soft); font-size: .85rem; text-align: right; font-weight: 700; }

/* Premium */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 22px 10px 14px;
  border-radius: 24px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
}
.plan[aria-checked="true"] { border-color: var(--primary); background: var(--soft); }
.plan-n { font-weight: 700; color: var(--ink-soft); }
.plan-p { font-size: 1.7rem; font-weight: 800; line-height: 1.2; }
.plan-u { font-size: .8rem; color: var(--ink-soft); }
.plan-tag {
  position: absolute; top: -12px; padding: 3px 12px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 800;
}
.bens { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ben { display: flex; gap: 12px; align-items: flex-start; }
.ben > span:last-child { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ben strong { font-weight: 800; }
.ben span span, .ben > span > span { color: var(--ink-soft); font-size: .9rem; line-height: 1.4; }
.ben-ic { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--good-bg); color: var(--good); margin-top: 1px; }
.ben-ic svg { width: 16px; height: 16px; }
.cmp { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cmp th, .cmp td { padding: 10px 6px; border-top: 1px solid var(--line); text-align: center; vertical-align: middle; }
.cmp thead th { border-top: 0; font-size: .85rem; }
.cmp tbody th { text-align: left; font-weight: 700; }
.cmp .pro { color: var(--primary-text); }
.cmp td.yes { color: var(--good); }
.cmp td.no { color: var(--ink-soft); }
.cmp td svg { width: 20px; height: 20px; }
.cmp td { overflow-wrap: anywhere; }
.stage-gap { width: 44px; }
.prem-dock .dock-btn.wide { flex: 1; }

@media (max-width: 380px) {
  .lvrow { grid-template-columns: 5rem 1fr 2.6rem; }
  .plan-p { font-size: 1.45rem; }
}

/* ---------- Dialog ---------- */

dialog {
  max-width: min(480px, calc(100vw - 32px));
  border: 0; border-radius: 28px; padding: 24px;
  background: var(--surface); color: var(--ink);
}
dialog::backdrop { background: rgba(6, 48, 42, .6); }
dialog h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 10px; }
dialog p { margin-bottom: 12px; }
dialog .btn { margin-top: 6px; width: 100%; }
.dlg-row { display: flex; flex-direction: column; gap: 6px; }

/* ---------- Larger screens ---------- */

@media (min-width: 700px) {
  body { font-size: 1.0625rem; }
  .screen { max-width: 600px; }
  .nav, .dock { width: min(calc(100% - 24px), 576px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .lumi-wrap[data-state="listen"] .ring { opacity: .5; }
  .mic.on { box-shadow: 0 0 0 8px rgba(255, 255, 255, .18), 0 0 0 14px rgba(255, 201, 51, .5); }
}
