@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&family=Nunito+Sans:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --bg: #fff8f1;
  --surface: #ffffff;
  --surface-strong: #f0e9ff;
  --ink: #111c3a;
  --muted: #675f7a;
  --line: #eadff4;
  --primary: #6d4adf;
  --primary-strong: #5736c4;
  --accent: #ff970f;
  --accent-strong: #f07800;
  --warning-surface: #fff1dc;
  --warning-ink: #a84d00;
  --input-bg: rgba(255, 255, 255, 0.92);
  --body-gradient: linear-gradient(135deg, rgba(255, 151, 15, 0.1) 0%, rgba(240, 233, 255, 0.52) 34%, rgba(255, 248, 241, 1) 72%);
  --ok: #4b8d66;
  --panel-gradient: linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--surface-strong) 24%, var(--surface)));
  --shadow: 0 18px 50px rgba(60, 36, 112, 0.12);
  --shadow-soft: 0 8px 24px rgba(60, 36, 112, 0.08);
  --radius-card: 8px;
  --radius-control: 12px;
  --radius-button: 14px;
  --motion-gentle: 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --font-family-body: "Nunito Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-family-heading: Nunito, var(--font-family-body);
  --font-family-brand: Nunito, var(--font-family-body);
  --font-weight-body: 400;
  --font-weight-button: 600;
  --font-weight-heading: 700;
  --font-weight-logo: 800;
  font-family: var(--font-family-body);
  font-weight: var(--font-weight-body);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14111b;
  --surface: #201b2a;
  --surface-strong: #2b2438;
  --ink: #f8f4ff;
  --muted: #bdb3cc;
  --line: rgba(248, 244, 255, 0.13);
  --primary: #a892ff;
  --primary-strong: #ded4ff;
  --accent: #ff970f;
  --accent-strong: #ffc06a;
  --warning-surface: rgba(255, 151, 15, 0.12);
  --warning-ink: #ffd197;
  --input-bg: #17131f;
  --body-gradient: linear-gradient(135deg, #17121f 0%, #201a2a 46%, #111018 100%);
  --panel-gradient: linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, transparent), color-mix(in srgb, var(--surface-strong) 44%, var(--surface)));
  --shadow: 0 18px 52px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--body-gradient);
  color: var(--ink);
}

body.progress-active,
body.message-active {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-family-heading);
}

button {
  border: 0;
  cursor: pointer;
  font-weight: var(--font-weight-button);
  transition:
    background var(--motion-gentle),
    border-color var(--motion-gentle),
    color var(--motion-gentle),
    box-shadow var(--motion-gentle),
    transform var(--motion-gentle);
}

button:not(:disabled):hover {
  transform: translateY(-1px);
}

button:not(:disabled):active {
  transform: translateY(0);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

button:focus-visible {
  outline: 3px solid rgba(255, 151, 15, 0.34);
  outline-offset: 2px;
}

.ui-icon {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

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

  button:not(:disabled):hover {
    transform: none;
  }

  .landing-button:hover {
    transform: none;
  }
}

[hidden] {
  display: none !important;
}

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

.landing-body {
  background: var(--bg);
}

.landing-page {
  min-height: 100vh;
  background: var(--bg);
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  padding: 14px 32px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(18px);
}

.landing-home-nav {
  min-height: 96px;
  border-bottom: 0;
  padding: 22px clamp(24px, 3.5vw, 60px);
  background: #ffffff;
  backdrop-filter: none;
}

.landing-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  color: var(--ink);
  font-family: var(--font-family-brand);
  font-size: 24px;
  font-weight: var(--font-weight-logo);
  text-decoration: none;
}

.landing-logo .brand-mark {
  width: 42px;
  height: 42px;
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.landing-home-actions {
  gap: 0;
  color: #06070b;
  font-family: var(--font-family-heading);
  font-size: clamp(15px, 1.1vw, 18px);
  font-weight: 800;
  line-height: 1;
}

.landing-home-link {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 clamp(9px, 0.8vw, 14px);
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.landing-home-link + .landing-home-link::before,
.landing-home-link + .landing-home-language::before,
.landing-home-language + .landing-home-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 1px;
  height: 18px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.42;
}

.landing-home-link:hover {
  color: var(--primary-strong);
}

.landing-home-language {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 8px 0 12px;
}

.language-flag-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.language-flag {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #e8ddf8;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
  font-size: 21px;
  line-height: 1;
}

.language-flag.is-active {
  border-color: color-mix(in srgb, var(--primary) 42%, #e8ddf8);
  background: color-mix(in srgb, var(--surface-strong) 62%, #ffffff);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary) 20%, transparent);
}

.language-flag:hover {
  border-color: color-mix(in srgb, var(--primary) 44%, #e8ddf8);
}

.landing-download-button {
  gap: 8px;
  min-height: 46px;
  border-radius: 999px;
  margin-left: 4px;
  padding: 9px 18px;
  font-size: clamp(14px, 1.1vw, 18px);
  box-shadow: none;
}

.landing-download-button .download-mark {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

.landing-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.landing-menu-toggle span {
  display: block;
  width: 23px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.landing-menu-toggle span + span {
  margin-top: 5px;
}

.landing-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(17, 28, 58, 0.12);
}

.landing-mobile-menu[hidden] {
  display: none;
}

.landing-mobile-menu-panel {
  display: grid;
  align-content: start;
  gap: 28px;
  width: min(100%, 400px);
  min-height: 100%;
  margin-left: auto;
  padding: 28px 26px;
  background: #ffffff;
  box-shadow: -28px 0 70px rgba(17, 28, 58, 0.12);
}

.landing-mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-menu-close {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.landing-menu-close::before,
.landing-menu-close::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 21px;
  width: 21px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.landing-menu-close::before {
  transform: rotate(45deg);
}

.landing-menu-close::after {
  transform: rotate(-45deg);
}

.landing-mobile-menu-links {
  display: grid;
  gap: 4px;
}

.landing-mobile-menu-row,
.landing-mobile-language {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 16px;
  min-height: 62px;
  color: var(--ink);
  font-family: var(--font-family-heading);
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
}

.landing-mobile-login {
  border-top: 1px solid #e7e2dc;
  margin-top: 12px;
  padding-top: 14px;
}

.landing-mobile-language {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  border-top: 1px solid #e7e2dc;
  margin-top: 12px;
  padding-top: 14px;
}

.landing-mobile-language::before {
  content: none;
}

.landing-mobile-language .language-flag-group {
  grid-column: 3;
  justify-self: end;
}

.landing-mobile-language .language-flag {
  width: 42px;
  height: 42px;
  font-size: 22px;
}

.mobile-menu-icon {
  position: relative;
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.mobile-menu-icon svg {
  display: block;
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.05;
}

.mobile-menu-arrow {
  width: 11px;
  height: 11px;
  border-top: 2.5px solid currentColor;
  border-right: 2.5px solid currentColor;
  transform: rotate(45deg);
}

.landing-mobile-download {
  gap: 13px;
  width: 100%;
  min-height: 56px;
  border-radius: 10px;
  margin-top: 20px;
  font-size: 16px;
  box-shadow: 0 18px 30px rgba(255, 151, 15, 0.18);
}

.download-mark {
  display: block;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.6;
}

.landing-mobile-social {
  display: flex;
  justify-content: center;
  gap: 52px;
  margin-top: 24px;
  color: var(--ink);
  font-family: var(--font-family-heading);
  font-size: 21px;
  font-weight: 800;
}

.landing-social-icon {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
}

.landing-social-icon svg {
  display: block;
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

body.landing-menu-open {
  overflow: hidden;
}

.landing-language {
  display: inline-flex;
  align-items: center;
}

.landing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  font-weight: var(--font-weight-button);
  transition:
    background var(--motion-gentle),
    border-color var(--motion-gentle),
    color var(--motion-gentle),
    box-shadow var(--motion-gentle),
    transform var(--motion-gentle);
  white-space: nowrap;
}

.landing-button:hover {
  transform: translateY(-1px);
}

.landing-button-large {
  min-height: 48px;
  padding: 12px 20px;
}

.public-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(540px, 1fr) minmax(500px, 0.82fr);
  align-items: stretch;
  gap: 0;
  width: 100%;
  min-height: min(820px, calc(100svh - 96px));
  margin: 0;
  overflow: clip;
  border-radius: 8px;
  background: #fff8f1;
  box-shadow: none;
}

:root[data-theme="dark"] .public-hero {
  background: #17131f;
}

.public-hero-content {
  display: grid;
  align-content: center;
  gap: 24px;
  z-index: 2;
  width: min(100%, 760px);
  padding: clamp(64px, 8vw, 132px) clamp(24px, 3vw, 52px) clamp(46px, 6vw, 86px) clamp(52px, 5.8vw, 126px);
}

.hero-safety-pill {
  display: none;
  width: fit-content;
  margin: 0;
  border-radius: 999px;
  padding: 9px 15px;
  background: rgba(255, 151, 15, 0.09);
  color: #8f5a34;
  font-size: 13px;
  font-weight: 800;
}

.public-hero-visual {
  position: relative;
  display: flex;
  align-self: stretch;
  align-items: flex-end;
  justify-content: flex-end;
  justify-self: stretch;
  min-width: 0;
  overflow: visible;
  border-left: 0;
  background: transparent;
  padding: 0;
}

.public-hero-shot {
  display: block;
  width: clamp(270px, 30vw, 370px);
  max-width: 100%;
  max-height: min(586px, calc(100svh - 190px));
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 34px;
  background: var(--surface);
  box-shadow: 0 24px 58px rgba(60, 36, 112, 0.22);
  object-fit: contain;
}

.public-hero-scene {
  position: relative;
  z-index: 1;
  display: block;
  width: clamp(640px, 51vw, 800px);
  height: auto;
  max-width: none;
  object-fit: contain;
  object-position: right bottom;
}

:root[data-theme="dark"] .public-hero-shot {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

.public-hero h1 {
  max-width: 850px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(48px, 4vw, 68px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
}

.public-hero-lead {
  max-width: 600px;
  margin: 0;
  color: color-mix(in srgb, var(--ink) 72%, var(--muted));
  font-size: clamp(18px, 1.45vw, 24px);
  line-height: 1.46;
  font-weight: var(--font-weight-body);
}

.public-hero-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  margin-top: 12px;
}

.landing-app-store-button,
.landing-hero-secondary {
  min-height: 58px;
  border-radius: 17px;
  padding: 14px 22px;
  font-family: var(--font-family-heading);
  font-size: clamp(16px, 1.15vw, 20px);
  font-weight: 800;
}

.landing-app-store-button {
  gap: 13px;
  box-shadow: 0 10px 20px rgba(255, 151, 15, 0.18);
}

.landing-hero-secondary {
  border-color: #e5dcf6;
  color: var(--primary-strong);
  box-shadow: 0 3px 0 rgba(109, 74, 223, 0.08);
}

.apple-mark,
.apple-mark svg {
  display: block;
  width: 28px;
  height: 28px;
}

.apple-mark svg {
  fill: currentColor;
}

.public-hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 30px;
  max-width: 620px;
  margin-top: 16px;
  color: #6b625b;
  font-size: clamp(14px, 1vw, 17px);
  font-weight: var(--font-weight-button);
}

.public-hero-points > span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.trust-icon {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  align-items: center;
  justify-content: center;
  color: #9b552b;
}

.trust-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.landing-band {
  padding: 70px 24px;
}

.landing-band-soft {
  background: color-mix(in srgb, var(--surface-strong) 34%, var(--surface));
}

.landing-section-inner {
  display: grid;
  gap: 28px;
  width: min(100%, 1180px);
  margin: 0 auto;
}

.landing-section-heading {
  display: grid;
  gap: 10px;
  max-width: 720px;
}

.landing-section-heading h2,
.landing-final-cta h2 {
  margin: 0;
  color: var(--ink);
  font-size: 36px;
  line-height: 1.12;
  font-weight: var(--font-weight-heading);
  letter-spacing: 0;
}

.landing-section-heading h1,
.landing-copy-stack h1 {
  margin: 0;
  color: var(--ink);
  font-size: 46px;
  line-height: 1.08;
  font-weight: var(--font-weight-heading);
  letter-spacing: 0;
}

.landing-copy-stack h2 {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.18;
  font-weight: var(--font-weight-heading);
  letter-spacing: 0;
}

.landing-section-heading p:not(.eyebrow),
.landing-copy-stack p,
.landing-section-note,
.landing-final-cta p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.58;
  font-weight: var(--font-weight-body);
}

.landing-section-note {
  max-width: 840px;
}

.landing-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.landing-info-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.landing-card-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--primary) 36%, var(--line));
  border-radius: 999px;
  color: var(--primary-strong);
  font-weight: var(--font-weight-heading);
}

.landing-info-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.2;
  font-weight: var(--font-weight-heading);
}

.landing-info-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  font-weight: var(--font-weight-body);
}

.landing-two-column {
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  align-items: start;
  gap: 42px;
}

.landing-flow,
.landing-copy-stack {
  display: grid;
  gap: 14px;
}

.guide-flow {
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.guide-flow .landing-flow-row {
  grid-template-columns: minmax(0, 1fr);
}

.guide-flow .landing-flow-row > span {
  display: none;
}

.startup-guide-body .eyebrow {
  color: var(--muted);
}

.guide-flow .landing-flow-row {
  padding-bottom: 10px;
}

.guide-flow .landing-flow-row p {
  font-size: 15px;
  line-height: 1.42;
}

.guide-flow strong {
  color: var(--ink);
  font-weight: var(--font-weight-heading);
}

.feedback-form {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.feedback-form label {
  display: grid;
  gap: 7px;
}

.feedback-form label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--font-weight-button);
  text-transform: uppercase;
}

.feedback-form textarea {
  min-height: 180px;
  resize: vertical;
}

.feedback-form .landing-button {
  justify-self: start;
}

.feedback-status {
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 8px;
  padding: 11px 12px;
  background: color-mix(in srgb, var(--surface-strong) 72%, transparent);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.feedback-status.is-success {
  border-color: color-mix(in srgb, #287a49 36%, var(--line));
  background: color-mix(in srgb, #287a49 10%, var(--surface));
  color: #287a49;
}

.feedback-status.is-error {
  border-color: color-mix(in srgb, #b24824 38%, var(--line));
  background: color-mix(in srgb, #b24824 10%, var(--surface));
  color: #b24824;
}

:root[data-theme="dark"] .feedback-status.is-success {
  color: #8ed8a8;
}

:root[data-theme="dark"] .feedback-status.is-error {
  color: #ffb28d;
}

.feedback-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.quiz-layout {
  grid-template-columns: minmax(280px, 0.62fr) minmax(420px, 1fr);
  align-items: start;
  gap: 38px;
}

.quiz-intro {
  position: sticky;
  top: 118px;
}

.quiz-intro .landing-button {
  justify-self: start;
  margin-top: 10px;
}

.quiz-form {
  display: grid;
  gap: 16px;
}

.quiz-question {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.quiz-question-header {
  display: grid;
  gap: 6px;
}

.quiz-question h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0;
}

.quiz-question p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.quiz-option-grid {
  display: grid;
  gap: 10px;
}

.quiz-option-grid.is-split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quiz-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 50px;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: 8px;
  padding: 12px 13px;
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-strong));
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.quiz-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--primary);
  box-shadow: none;
}

.quiz-option-text {
  min-width: 0;
}

.quiz-freeform-label {
  display: grid;
  gap: 7px;
}

.quiz-freeform-label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--font-weight-button);
}

.quiz-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.quiz-form-actions {
  display: grid;
  justify-items: start;
  gap: 12px;
}

.quiz-status {
  width: 100%;
}

.landing-flow-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  padding: 0 0 14px;
}

.landing-flow-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.landing-flow-row > span {
  width: 11px;
  height: 11px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 16%, transparent);
}

.landing-flow-row p {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.5;
  font-weight: var(--font-weight-body);
}

.landing-how-grid {
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1.08fr);
  gap: 48px;
}

.landing-how-intro {
  align-self: start;
}

.landing-how-steps {
  gap: 16px;
}

.landing-how-steps .landing-flow-row,
.landing-how-steps .landing-flow-row:last-child {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.landing-how-steps .landing-flow-row > span {
  display: grid;
  width: 38px;
  height: 38px;
  margin-top: 0;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--primary) 34%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-strong) 54%, var(--surface));
  box-shadow: none;
  color: var(--primary-strong);
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-heading);
}

.landing-flow-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.landing-flow-copy h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
  font-weight: var(--font-weight-heading);
}

.landing-flow-copy p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.52;
}

.landing-control-note {
  display: grid;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  border-radius: 8px;
  padding: 20px;
  background: color-mix(in srgb, var(--warning-surface) 54%, var(--surface));
  box-shadow: var(--shadow-soft);
}

.landing-control-note h3 {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.2;
  font-weight: var(--font-weight-heading);
}

.landing-control-note p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.52;
  font-weight: var(--font-weight-body);
}

.landing-control-note .landing-control-signoff {
  color: var(--ink);
  font-weight: var(--font-weight-heading);
}

.landing-final-cta {
  display: grid;
  grid-template-columns: minmax(0, 760px) auto;
  align-items: center;
  gap: 28px;
  padding: 68px max(24px, calc((100vw - 1180px) / 2));
  background: color-mix(in srgb, var(--warning-surface) 70%, var(--surface));
}

.landing-final-cta > div {
  display: grid;
  gap: 10px;
}

.landing-footer {
  display: grid;
  gap: 14px;
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  padding: 20px 24px 24px;
  background: var(--surface);
  color: color-mix(in srgb, var(--muted) 88%, var(--ink));
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
}

.landing-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  font-family: var(--font-family-heading);
  font-size: 14px;
  font-weight: 800;
}

.landing-footer-links a {
  color: var(--ink);
  text-decoration: none;
}

.landing-footer-links a:hover {
  color: var(--primary-strong);
}

.landing-footer p {
  margin: 0;
}

.startup-guide-body .eyebrow {
  color: var(--primary-strong);
}

.startup-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 0.78fr);
  align-items: stretch;
  width: min(calc(100% - 48px), 1280px);
  min-height: min(560px, calc(100svh - 150px));
  margin: 26px auto 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 96%, transparent) 0%, color-mix(in srgb, #e8f5ef 54%, var(--surface)) 46%, color-mix(in srgb, var(--warning-surface) 62%, var(--surface)) 100%);
  box-shadow: var(--shadow);
}

:root[data-theme="dark"] .startup-hero {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 96%, transparent) 0%, color-mix(in srgb, #14392f 28%, var(--surface)) 50%, color-mix(in srgb, var(--warning-surface) 18%, var(--surface)) 100%);
}

.startup-hero-copy {
  display: grid;
  align-content: center;
  gap: 18px;
  min-width: 0;
  padding: 64px;
}

.startup-hero h1 {
  max-width: 650px;
  margin: 0;
  color: var(--ink);
  font-size: 54px;
  font-weight: var(--font-weight-heading);
  line-height: 1.04;
  letter-spacing: 0;
}

.startup-hero-lead {
  max-width: 600px;
  margin: 0;
  color: color-mix(in srgb, var(--ink) 76%, var(--muted));
  font-size: 19px;
  font-weight: var(--font-weight-body);
  line-height: 1.55;
}

.startup-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.startup-hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  max-width: 620px;
  color: var(--primary-strong);
  font-size: 14px;
  font-weight: var(--font-weight-button);
}

.startup-hero-points span {
  position: relative;
  padding-left: 16px;
}

.startup-hero-points span::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.startup-hero-media {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  border-left: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  background: color-mix(in srgb, var(--warning-surface) 58%, var(--surface));
}

.startup-hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right bottom;
}

.startup-family-band {
  padding-top: 34px;
  padding-bottom: 34px;
}

.startup-family-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.startup-family-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 164px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.startup-family-card:nth-child(1) {
  --startup-card-color: #3a8f78;
}

.startup-family-card:nth-child(2) {
  --startup-card-color: #2f75b5;
}

.startup-family-card:nth-child(3) {
  --startup-card-color: var(--primary);
}

.startup-family-card:nth-child(4) {
  --startup-card-color: #d36f00;
}

.startup-family-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--startup-card-color, var(--primary));
}

.startup-family-card h2 {
  margin: 0;
  color: var(--startup-card-color, var(--primary-strong));
  font-size: 15px;
  font-weight: var(--font-weight-heading);
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
}

.startup-family-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.startup-guide-layout {
  grid-template-columns: minmax(270px, 0.58fr) minmax(0, 1fr);
  align-items: start;
  gap: 42px;
}

.startup-guide-intro {
  align-self: start;
  padding-top: 6px;
}

.startup-steps-band {
  padding-top: 66px;
}

.startup-step-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.startup-step-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  min-height: 198px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.startup-step-card:nth-child(7) {
  grid-column: 1 / -1;
  min-height: 0;
}

.startup-step-card:nth-child(7) .startup-step-copy p {
  max-width: 760px;
}

.startup-step-number {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--primary) 34%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-strong) 44%, var(--surface));
  color: var(--primary-strong);
  font-family: var(--font-family-heading);
  font-size: 14px;
  font-weight: var(--font-weight-heading);
}

.startup-step-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.startup-step-copy h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: var(--font-weight-heading);
  line-height: 1.2;
  letter-spacing: 0;
}

.startup-step-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.startup-final-cta {
  background:
    linear-gradient(135deg, color-mix(in srgb, #e8f5ef 48%, var(--surface)) 0%, color-mix(in srgb, var(--warning-surface) 70%, var(--surface)) 100%);
}

:root[data-theme="dark"] .startup-final-cta {
  background:
    linear-gradient(135deg, color-mix(in srgb, #14392f 24%, var(--surface)) 0%, color-mix(in srgb, var(--warning-surface) 18%, var(--surface)) 100%);
}

.landing-final-cta .startup-final-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.auth-page {
  align-items: start;
  --bg: #fbf6ef;
  --surface: #fffdf9;
  --surface-strong: #f7efe5;
  --ink: #1f2527;
  --muted: #6f665d;
  --line: rgba(88, 75, 60, 0.14);
  --primary: #6d4adf;
  --primary-strong: #5736c4;
  --accent: #c86f43;
  --accent-strong: #ad5f38;
  --input-bg: var(--surface-strong);
  background: var(--bg);
}

:root[data-theme="dark"] .auth-page {
  --bg: #151416;
  --surface: #211f22;
  --surface-strong: #2a2524;
  --ink: #fffaf2;
  --muted: #c8bfb4;
  --line: rgba(255, 247, 236, 0.14);
  --primary: #a892ff;
  --primary-strong: #ded4ff;
  --accent: #c86f43;
  --accent-strong: #e29a72;
  --input-bg: var(--surface-strong);
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
  padding: clamp(4px, 1.1vw, 8px) clamp(18px, 3vw, 24px) 72px;
  row-gap: clamp(16px, 4vh, 26px);
}

.auth-page-header {
  display: flex;
  min-height: clamp(52px, 8vw, 70px);
  width: min(100%, 1080px);
  align-items: center;
  justify-self: center;
  justify-content: flex-start;
}

.auth-logo-link {
  display: inline-flex;
  min-height: clamp(48px, 7vw, 58px);
  align-items: center;
  border-radius: 8px;
  text-decoration: none;
}

.auth-logo-link:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 34%, transparent);
  outline-offset: 6px;
}

.auth-logo-image {
  display: block;
  width: clamp(124px, 15vw, 154px);
  height: auto;
  max-height: clamp(44px, 6vw, 54px);
  object-fit: contain;
}

.auth-logo-image-dark {
  display: none;
}

:root[data-theme="dark"] .auth-logo-image-light {
  display: none;
}

:root[data-theme="dark"] .auth-logo-image-dark {
  display: block;
}

.auth-layout {
  display: grid;
  gap: 20px;
  width: min(100%, 430px);
  justify-self: center;
}

.auth-screen-intro {
  display: grid;
  gap: 8px;
  width: 100%;
  padding-bottom: 4px;
}

.auth-screen-intro h1 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.24;
  font-weight: var(--font-weight-heading);
  letter-spacing: 0;
}

.auth-screen-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.46;
  font-weight: var(--font-weight-button);
}

.landing-voice-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 650px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  border-radius: 8px;
  padding: 14px 16px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: var(--shadow-soft);
}

.landing-voice-mark {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.landing-voice-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.landing-voice-copy strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: var(--font-weight-heading);
}

.landing-voice-copy span {
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--font-weight-body);
  line-height: 1.35;
}

.voice-bars {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 58px;
  height: 36px;
}

.voice-bars span {
  width: 5px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent), var(--primary));
}

.voice-bars span:nth-child(1) {
  height: 14px;
}

.voice-bars span:nth-child(2) {
  height: 28px;
}

.voice-bars span:nth-child(3) {
  height: 20px;
}

.voice-bars span:nth-child(4) {
  height: 32px;
}

.voice-bars span:nth-child(5) {
  height: 16px;
}

.landing-proof-grid {
  display: grid;
  grid-column: 1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 720px;
}

.landing-proof-item {
  display: grid;
  gap: 6px;
  min-height: 142px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  border-radius: 8px;
  padding: 14px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.landing-proof-item > span {
  width: fit-content;
  border-radius: 6px;
  padding: 4px 7px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: var(--font-weight-button);
  text-transform: uppercase;
}

.landing-proof-item strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
  font-weight: var(--font-weight-heading);
}

.landing-proof-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
  font-weight: var(--font-weight-body);
}

.landing-longform {
  display: grid;
  grid-column: 1;
  gap: 22px;
  width: 100%;
  min-width: 0;
  max-width: 720px;
  padding-bottom: 20px;
}

.landing-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.landing-section {
  display: grid;
  align-content: start;
  gap: 10px;
}

.landing-section h2,
.landing-section h3 {
  max-width: 680px;
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.16;
  font-weight: var(--font-weight-heading);
  letter-spacing: 0;
}

.landing-section p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  font-weight: var(--font-weight-body);
}

.landing-why {
  border-top: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  padding-top: 18px;
}

.landing-benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-width: 700px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.landing-benefits li {
  position: relative;
  min-height: 48px;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
  border-radius: 8px;
  padding: 10px 10px 10px 28px;
  background: color-mix(in srgb, var(--surface) 64%, transparent);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.42;
  font-weight: var(--font-weight-body);
}

.landing-benefits li::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.landing-community {
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 8px;
  padding: 16px;
  background: color-mix(in srgb, var(--warning-surface) 40%, transparent);
}

.auth-mobile-note {
  width: fit-content;
  margin: 2px 0 0;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 8px;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--warning-surface) 66%, transparent);
  color: var(--warning-ink);
  font-size: 13px;
  font-weight: var(--font-weight-button);
}

.auth-card {
  position: relative;
  top: auto;
  grid-column: auto;
  grid-row: auto;
  justify-self: center;
  overflow: hidden;
  display: grid;
  gap: 20px;
  width: 100%;
  max-width: none;
  border: 0;
  border-radius: 8px;
  padding: 24px;
  background: var(--surface);
  box-shadow: 0 10px 20px rgba(53, 41, 29, 0.035);
}

.auth-card::before {
  display: none;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-strong);
}

.auth-tabs button {
  min-height: 40px;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: var(--font-weight-button);
}

.auth-tabs button.is-active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: none;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-name-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.auth-form h1,
.auth-form h2 {
  margin: 2px 0 4px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.24;
  font-weight: var(--font-weight-heading);
  letter-spacing: 0;
}

.auth-form label {
  display: grid;
  gap: 8px;
}

.auth-form label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--font-weight-button);
  text-transform: uppercase;
}

.auth-form input {
  min-height: 56px;
  border-color: var(--line);
  border-radius: 12px;
  padding: 0 16px;
  background: var(--surface-strong);
  box-shadow: none;
  color: var(--ink);
  font-weight: var(--font-weight-button);
}

.auth-helper {
  margin: -4px 0 2px;
  color: var(--muted);
  font-size: 14px;
  font-weight: var(--font-weight-body);
  line-height: 1.35;
}

.auth-form .primary {
  width: 100%;
  min-height: 56px;
  justify-content: center;
  background: var(--primary);
  box-shadow: none;
  font-size: 17px;
}

.auth-form .primary:hover {
  background: var(--primary-strong);
}

.auth-code-button {
  display: inline-flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-color: color-mix(in srgb, var(--primary) 26%, var(--line));
  background: color-mix(in srgb, var(--surface-strong) 44%, var(--surface));
  color: var(--primary-strong);
  font-size: 15px;
}

.auth-code-button:hover {
  border-color: color-mix(in srgb, var(--primary) 44%, var(--line));
  background: color-mix(in srgb, var(--surface-strong) 72%, var(--surface));
}

.auth-consent {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: var(--font-weight-body);
  line-height: 1.35;
}

.auth-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--font-weight-body);
}

.auth-message.is-error {
  color: #b24824;
}

:root[data-theme="dark"] .auth-message.is-error {
  color: #ffb28d;
}

.auth-link-button {
  width: fit-content;
  min-height: 42px;
  justify-self: center;
  border-radius: 10px;
  padding: 8px;
  background: transparent;
  color: var(--primary);
  font-size: 17px;
  font-weight: var(--font-weight-button);
}

.auth-link-button:hover {
  color: var(--accent-strong);
}

.app-shell {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  backdrop-filter: blur(18px);
  color: var(--ink);
}

.brand {
  display: grid;
  gap: 16px;
  padding: 2px 0 6px;
}

.brand-lockup {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-family-brand);
  font-size: 31px;
  font-weight: var(--font-weight-logo);
  line-height: 1;
}

.app-brand-logo {
  width: min(100%, 154px);
}

.brand-lockup-large {
  gap: 16px;
  font-size: var(--auth-logo-font-size);
}

.brand-lockup span {
  color: var(--ink);
  letter-spacing: 0;
}

:root[data-theme="dark"] .brand-lockup span {
  color: #ffffff;
}

.brand-mark {
  display: block;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  filter: drop-shadow(0 10px 22px rgba(255, 151, 15, 0.14));
}

.brand-lockup-large .brand-mark {
  width: var(--auth-logo-mark-size);
  height: var(--auth-logo-mark-size);
}

.brand p,
.view-header h2,
.view-header p,
.panel h3 {
  margin: 0;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 9px;
  background: color-mix(in srgb, var(--surface-strong) 54%, var(--surface));
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--font-weight-button);
}

.user-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  box-shadow: var(--shadow-soft);
}

#signedInUser {
  display: block;
  max-width: 230px;
  overflow: hidden;
  color: var(--primary-strong);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-button {
  width: fit-content;
  min-height: 32px;
  margin-top: 2px;
  border-radius: var(--radius-control);
  padding: 6px 10px;
  font-size: 12px;
  justify-content: center;
}

.mode-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  margin-top: 4px;
  border-radius: var(--radius-button);
  padding: 12px 14px;
  font-size: 14px;
  font-weight: var(--font-weight-button);
  justify-content: center;
  box-shadow: 0 14px 28px rgba(255, 151, 15, 0.28);
}

.mode-button .ui-icon,
#exitKidModeButton .ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.app-shell.kid-mode {
  grid-template-columns: minmax(0, 1fr);
}

.app-shell.kid-mode .sidebar {
  display: none;
}

.app-shell.kid-mode .content {
  width: 100%;
  max-width: none;
}

.app-shell.kid-mode .view:not(#kidView) {
  display: none !important;
}

.app-shell.kid-mode #kidView {
  display: block;
}

.app-shell.kid-mode #kidView .view-header {
  align-items: flex-start;
}

.app-shell.kid-mode #exitKidModeButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  box-shadow: 0 14px 30px rgba(109, 74, 223, 0.28);
}

:root[data-theme="dark"] .app-shell.kid-mode #exitKidModeButton {
  color: #181123;
  box-shadow: 0 14px 30px rgba(168, 146, 255, 0.22);
}

.nav-tabs {
  display: grid;
  gap: 12px;
}

.nav-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 13px 12px;
  border-radius: var(--radius-button);
  background: color-mix(in srgb, var(--surface) 54%, transparent);
  color: var(--muted);
  text-align: left;
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: var(--font-weight-button);
  overflow: hidden;
}

.nav-tab.is-active,
.nav-tab:hover {
  background: var(--surface);
  color: var(--primary-strong);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 30%, var(--line)), var(--shadow-soft);
}

.nav-tab.is-active::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: var(--accent);
}

.nav-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 74%, transparent);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: var(--font-weight-heading);
}

.nav-icon .ui-icon {
  width: 16px;
  height: 16px;
}

.nav-tab.is-active .nav-icon,
.nav-tab:hover .nav-icon {
  border-color: color-mix(in srgb, var(--primary) 44%, var(--line));
  background: color-mix(in srgb, var(--surface-strong) 46%, var(--surface));
  color: var(--primary-strong);
}

.settings-panel,
.api-base {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  color: var(--muted);
  font-size: 13px;
}

.settings-panel {
  gap: 14px;
  margin-top: auto;
}

.api-base {
  margin-top: auto;
}

.api-base input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 9px 10px;
  background: var(--input-bg);
  color: var(--ink);
}

.content {
  width: min(1440px, 100%);
  padding: 28px;
  overflow: auto;
}

body.has-unsaved-changes .content {
  padding-bottom: 112px;
}

.app-notice {
  margin-bottom: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--warning-surface);
  color: var(--warning-ink);
  font-weight: var(--font-weight-button);
}

.lock-notice {
  position: sticky;
  top: 14px;
  z-index: 35;
  align-items: center;
  gap: 10px;
  border-color: color-mix(in srgb, var(--accent) 54%, var(--line));
  box-shadow: 0 10px 28px rgba(168, 77, 0, 0.12);
}

.lock-notice:not([hidden]) {
  display: flex;
}

.lock-notice::before {
  content: "!";
  display: inline-grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--warning-ink);
  color: var(--warning-surface);
  font-size: 14px;
  font-weight: var(--font-weight-heading);
}

.app-notice.app-confirm {
  display: flex;
}

.save-bar {
  position: fixed;
  right: 28px;
  bottom: 22px;
  z-index: 70;
  display: flex;
  width: min(430px, calc(100vw - 56px));
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.save-bar span {
  font-weight: var(--font-weight-button);
  line-height: 1.25;
}

.save-bar .primary {
  flex: 0 0 auto;
}

.app-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notice-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-hero {
  position: relative;
  overflow: hidden;
  min-height: 124px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--panel-gradient);
  box-shadow: var(--shadow);
}

.section-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
}

.parent-hero {
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--warning-surface) 72%, transparent));
}

.kid-hero {
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface-strong) 92%, transparent), color-mix(in srgb, var(--surface) 82%, transparent));
}

.audio-hero {
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 95%, transparent), color-mix(in srgb, var(--surface-strong) 78%, transparent));
}

.memory-hero {
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface-strong) 88%, transparent), color-mix(in srgb, var(--warning-surface) 42%, var(--surface)));
}

.admin-hero {
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--accent) 12%, var(--surface-strong)));
}

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: var(--font-weight-button);
  text-transform: uppercase;
}

.view-header h2 {
  margin-top: 4px;
  font-size: 36px;
  font-weight: var(--font-weight-heading);
  line-height: 1.15;
}

.hero-caption {
  max-width: 560px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 17px;
  font-weight: var(--font-weight-body);
  line-height: 1.35;
}

.trust-line {
  display: inline-flex;
  max-width: 620px;
  margin: 12px 0 0;
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--line));
  border-radius: 8px;
  padding: 7px 10px;
  background: color-mix(in srgb, var(--surface-strong) 44%, transparent);
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: var(--font-weight-body);
  line-height: 1.3;
}

.header-actions,
.panel-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions {
  flex: 0 0 auto;
}

.primary,
.secondary,
.danger {
  min-height: 42px;
  border-radius: var(--radius-button);
  padding: 11px 18px;
  font-weight: var(--font-weight-button);
}

.primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(255, 151, 15, 0.24);
}

.primary:hover {
  background: var(--accent-strong);
}

.secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--primary-strong);
  box-shadow: var(--shadow-soft);
}

.danger {
  background: var(--warning-surface);
  color: var(--warning-ink);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 8px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel-gradient);
  box-shadow: var(--shadow-soft);
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: color-mix(in srgb, var(--primary) 48%, var(--line));
}

.metric-card:nth-child(2)::before {
  background: color-mix(in srgb, var(--ok) 62%, var(--line));
}

.metric-card:nth-child(3)::before {
  background: color-mix(in srgb, var(--accent) 68%, var(--line));
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--font-weight-button);
  text-transform: uppercase;
}

.metric-card strong {
  color: var(--primary-strong);
  font-size: 32px;
  font-weight: var(--font-weight-heading);
  line-height: 1;
}

.admin-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.admin-panel {
  display: grid;
  gap: 16px;
}

.admin-user-list {
  display: grid;
  gap: 10px;
}

.admin-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: var(--shadow-soft);
}

.admin-user-row.is-selected {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  background: color-mix(in srgb, var(--surface-strong) 44%, var(--surface));
}

.admin-user-row.is-deactivated {
  background: color-mix(in srgb, var(--warning-surface) 22%, var(--surface));
}

.admin-user-row strong,
.admin-user-row span,
.admin-user-row time {
  display: block;
}

.admin-user-row strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: var(--font-weight-heading);
}

.admin-user-row span,
.admin-user-row time {
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--font-weight-body);
}

.admin-user-badges,
.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-user-badges {
  margin-top: 8px;
}

.admin-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 8px;
  background: color-mix(in srgb, var(--ok) 14%, var(--surface));
  color: var(--ok-ink);
  font-size: 12px;
  font-weight: var(--font-weight-button);
}

.admin-status-pill.is-deactivated {
  background: var(--warning-surface);
  color: var(--warning-ink);
}

.admin-status-pill.is-current {
  background: color-mix(in srgb, var(--primary) 13%, var(--surface));
  color: var(--primary-strong);
}

.admin-user-meta {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

.admin-user-actions {
  justify-content: end;
  margin-top: 4px;
}

.admin-action-button {
  min-height: 32px;
  border-radius: var(--radius-control);
  padding: 6px 10px;
}

#adminCollapseActivityButton {
  min-height: 36px;
  border-radius: var(--radius-control);
  padding: 8px 12px;
}

.admin-activity-panel {
  display: grid;
  gap: 16px;
}

.admin-activity-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-summary-card {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.admin-summary-card span,
.admin-summary-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--font-weight-button);
  text-transform: uppercase;
}

.admin-summary-card strong {
  min-width: 0;
  overflow: hidden;
  color: var(--primary-strong);
  font-size: 22px;
  font-weight: var(--font-weight-heading);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-activity-grid {
  display: grid;
  gap: 10px;
}

.admin-activity-grid h4 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: var(--font-weight-heading);
}

.admin-detail-list {
  display: grid;
  max-height: 360px;
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
}

.admin-detail-row {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.admin-detail-row strong,
.admin-detail-row span {
  display: block;
}

.admin-detail-row strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: var(--font-weight-heading);
}

.admin-detail-row span,
.admin-detail-row p,
.admin-detail-row time {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--font-weight-body);
  line-height: 1.35;
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  height: calc(100vh - 270px);
  min-height: 520px;
}

.setup-side {
  display: grid;
  align-content: start;
  gap: 20px;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  padding-right: 4px;
  scroll-padding-top: 16px;
  scrollbar-color: rgba(109, 74, 223, 0.42) rgba(240, 233, 255, 0.68);
  scrollbar-width: thin;
}

.setup-side::-webkit-scrollbar {
  width: 10px;
}

.setup-side::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(240, 233, 255, 0.68);
}

.setup-side::-webkit-scrollbar-thumb {
  border: 2px solid rgba(240, 233, 255, 0.68);
  border-radius: 999px;
  background: rgba(109, 74, 223, 0.42);
}

.setup-side::-webkit-scrollbar-thumb:hover {
  background: rgba(109, 74, 223, 0.62);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--panel-gradient);
  box-shadow: var(--shadow);
}

.panel h3 {
  font-size: 17px;
}

.field-grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.profile-panel {
  position: static;
}

.memory-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  height: calc(100vh - 232px);
  min-height: 560px;
}

.memory-form-panel,
.memory-library-panel {
  min-height: 0;
}

.memory-form-panel {
  align-self: start;
}

.memory-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.memory-form-grid .wide {
  grid-column: 1 / -1;
}

.memory-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.memory-list {
  display: grid;
  align-content: start;
  gap: 12px;
  max-height: calc(100vh - 360px);
  min-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-color: rgba(109, 74, 223, 0.42) rgba(240, 233, 255, 0.68);
  scrollbar-width: thin;
}

.memory-list::-webkit-scrollbar {
  width: 10px;
}

.memory-list::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(240, 233, 255, 0.68);
}

.memory-list::-webkit-scrollbar-thumb {
  border: 2px solid rgba(240, 233, 255, 0.68);
  border-radius: 999px;
  background: rgba(109, 74, 223, 0.42);
}

.memory-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow-soft);
}

.memory-card.is-disabled {
  opacity: 0.68;
}

.memory-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.memory-card-title {
  min-width: 0;
}

.memory-card-header strong,
.memory-card-header span,
.memory-card p,
.memory-card small {
  display: block;
}

.memory-card-header strong {
  color: var(--primary-strong);
  font-size: 16px;
  font-weight: var(--font-weight-heading);
}

.memory-card-header span,
.memory-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--font-weight-body);
  line-height: 1.35;
}

.memory-card p {
  margin: 0;
  color: var(--ink);
  font-weight: var(--font-weight-body);
  line-height: 1.45;
}

.memory-card-actions {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
}

.memory-actions-menu {
  position: relative;
  display: grid;
  justify-items: end;
}

.memory-menu-trigger {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary-strong);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.memory-menu-trigger::-webkit-details-marker {
  display: none;
}

.memory-menu-trigger::marker {
  content: "";
}

.memory-menu-trigger .ui-icon {
  width: 18px;
  height: 18px;
}

.memory-actions-menu[open] .memory-menu-trigger,
.memory-menu-trigger:hover {
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
  background: color-mix(in srgb, var(--surface-strong) 52%, var(--surface));
}

.memory-menu-panel {
  display: grid;
  gap: 7px;
  width: min(210px, calc(100vw - 64px));
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-strong);
}

.memory-menu-action,
.memory-card-actions button {
  min-height: 34px;
  border-radius: var(--radius-control);
  padding: 7px 10px;
}

.memory-menu-action {
  justify-content: center;
  width: 100%;
  font-size: 13px;
  text-align: center;
}

.media-view-button.memory-menu-action {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.memory-menu-action.upload-control {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 7px 10px;
  background: var(--surface);
  color: var(--primary-strong);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.memory-menu-action.upload-control input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.memory-disabled {
  color: var(--warning-ink) !important;
}

.memory-media {
  display: grid;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.memory-media-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.memory-media-head strong {
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: var(--font-weight-heading);
}

.memory-media-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--font-weight-body);
}

.memory-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  align-items: stretch;
  gap: 10px;
}

.memory-media-item {
  display: grid;
  grid-template-rows: auto minmax(38px, auto);
  position: relative;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.memory-media-item img,
.memory-media-item video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--surface-strong);
  object-fit: cover;
}

.memory-media-item video {
  background: #0d1018;
  object-fit: contain;
}

.memory-media-item figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 7px;
}

.memory-media-item figcaption span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-media-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.media-view-button,
.memory-media-item figcaption button {
  min-height: 30px;
  border-radius: var(--radius-control);
  padding: 5px 8px;
  font-size: 11px;
}

.pin-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-pin-controls {
  justify-content: flex-end;
  margin-bottom: 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  border-radius: 8px;
  padding: 8px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow-soft);
}

.pin-controls button {
  min-height: 38px;
  border-radius: var(--radius-button);
  padding: 8px 12px;
}

.pin-status {
  margin-left: auto;
  border-radius: 8px;
  padding: 6px 8px;
  background: var(--warning-surface);
  color: var(--warning-ink);
  font-size: 12px;
  font-weight: var(--font-weight-button);
}

body:not(.parent-locked) .pin-status {
  background: var(--surface-strong);
  color: var(--primary-strong);
}

.top-pin-controls .pin-status {
  margin-left: 0;
}

.meal-plan-panel {
  display: grid;
  gap: 14px;
}

.meal-plan-panel p,
.routine-pack-panel p {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--font-weight-body);
  line-height: 1.35;
}

.meal-plan-list {
  display: grid;
  gap: 10px;
}

.meal-plan-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.meal-plan-row span {
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: var(--font-weight-heading);
}

.routine-pack-panel {
  display: grid;
  gap: 14px;
}

.custom-routine-form {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.routine-form-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.routine-form-title strong {
  font-size: 14px;
  font-weight: var(--font-weight-heading);
}

.routine-form-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 74%, transparent);
  color: var(--accent-strong);
}

.routine-form-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.custom-routine-form label {
  gap: 6px;
}

.custom-routine-form textarea {
  min-height: 92px;
}

.custom-routine-form .primary {
  min-height: 42px;
}

.routine-packs-list {
  display: grid;
  gap: 10px;
}

.routine-pack-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.routine-pack-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.routine-pack-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.routine-pack-card strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: var(--font-weight-heading);
  min-width: 0;
}

.routine-pack-title-row > span {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 999px;
  padding: 4px 8px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: var(--font-weight-button);
}

.routine-pack-description {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--font-weight-body);
  line-height: 1.35;
}

.routine-pack-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.routine-pack-preview span {
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  background: color-mix(in srgb, var(--surface-strong) 50%, transparent);
  color: var(--muted);
  font-size: 11px;
  font-weight: var(--font-weight-body);
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.routine-pack-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.routine-pack-actions span {
  color: var(--primary-strong);
  font-weight: var(--font-weight-heading);
}

.routine-pack-actions button {
  min-height: 34px;
  border-radius: var(--radius-control);
  padding: 7px 10px;
}

.routine-pack-card.is-imported {
  border-color: color-mix(in srgb, var(--ok) 32%, var(--line));
}

.parent-locked .answers-panel,
.parent-locked .audio-library-panel,
.parent-locked .routine-pack-panel {
  border-color: #ffd59a;
}

:root[data-theme="dark"] .parent-locked .answers-panel,
:root[data-theme="dark"] .parent-locked .audio-library-panel,
:root[data-theme="dark"] .parent-locked .routine-pack-panel {
  border-color: rgba(255, 151, 15, 0.38);
}

.parent-locked .answers-list,
.parent-locked .audio-list,
.parent-locked .routine-packs-list {
  opacity: 0.68;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--font-weight-button);
}

label small {
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--font-weight-body);
  line-height: 1.35;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 12px 13px;
  background: var(--input-bg);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(109, 74, 223, 0.12);
}

.field-invalid {
  border-color: #d94f2a;
  outline: 3px solid rgba(217, 79, 42, 0.14);
}

.field-error {
  display: block;
  color: #b24824;
  font-size: 12px;
  font-weight: var(--font-weight-button);
  line-height: 1.3;
}

:root[data-theme="dark"] input:focus,
:root[data-theme="dark"] select:focus,
:root[data-theme="dark"] textarea:focus {
  outline-color: rgba(168, 146, 255, 0.22);
}

textarea {
  min-height: 86px;
  resize: vertical;
}

.answers-panel {
  display: flex;
  height: 100%;
  min-height: 0;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.answers-panel-head {
  position: sticky;
  top: 0;
  z-index: 2;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px 14px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(14px);
}

.answers-toolbar {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
}

.answers-toolbar label {
  width: min(260px, 100%);
}

.answers-title-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-title-row {
  flex: 0 0 auto;
  justify-content: space-between;
  margin-bottom: 14px;
}

.count-pill {
  display: grid;
  min-width: 30px;
  min-height: 30px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--primary-strong);
  font-weight: var(--font-weight-heading);
}

.answers-list,
.audio-list {
  display: grid;
  gap: 12px;
}

.answers-list {
  position: relative;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 16px 20px 20px;
  scroll-padding-top: 16px;
  scrollbar-color: rgba(109, 74, 223, 0.42) rgba(240, 233, 255, 0.68);
  scrollbar-width: thin;
}

.answers-list::-webkit-scrollbar {
  width: 10px;
}

.answers-list::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(240, 233, 255, 0.68);
}

.answers-list::-webkit-scrollbar-thumb {
  border: 2px solid rgba(240, 233, 255, 0.68);
  border-radius: 999px;
  background: rgba(109, 74, 223, 0.42);
}

.answers-list::-webkit-scrollbar-thumb:hover {
  background: rgba(109, 74, 223, 0.62);
}

.answer-card,
.audio-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: var(--shadow-soft);
  transition:
    border-color var(--motion-gentle),
    box-shadow var(--motion-gentle),
    background var(--motion-gentle);
}

.answer-card:hover,
.audio-card:hover {
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: 0 12px 30px rgba(60, 36, 112, 0.1);
}

.answer-card-header,
.audio-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.answer-card-title {
  font-weight: var(--font-weight-heading);
}

.answer-card-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.answer-card-actions .secondary,
.answer-card-actions .danger {
  min-height: 36px;
  padding: 8px 11px;
}

.ai-draft-button {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-strong) 52%, var(--surface));
}

.answer-rewrite {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-strong) 42%, var(--surface));
}

.answer-rewrite > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: var(--font-weight-button);
  white-space: nowrap;
}

.rewrite-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.rewrite-button {
  min-height: 32px;
  border-radius: var(--radius-control);
  padding: 7px 10px;
  border-color: color-mix(in srgb, var(--primary) 22%, var(--line));
  font-size: 0.78rem;
}

.answer-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.answer-form-grid .wide {
  grid-column: 1 / -1;
}

.inline-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.kid-layout {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(320px, 0.9fr);
  gap: 22px;
  align-items: start;
}

.kid-buttons-wrap {
  display: flex;
  max-height: calc(100vh - 232px);
  min-height: 520px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--panel-gradient);
  box-shadow: var(--shadow-soft);
}

.board-label,
.response-header,
.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.board-label,
.response-header {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.board-label span,
.response-header span,
.library-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--font-weight-button);
  text-transform: uppercase;
}

.board-label strong,
.response-header strong {
  display: grid;
  min-width: 34px;
  min-height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--warning-surface);
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: var(--font-weight-heading);
}

.family-updates-panel,
.kid-updates-panel {
  margin-bottom: 22px;
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  background: color-mix(in srgb, var(--surface-strong) 42%, var(--surface));
}

.kid-updates-panel {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  background: color-mix(in srgb, var(--warning-surface) 44%, var(--surface));
}

.family-updates-list {
  display: grid;
  gap: 12px;
}

.family-update-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.family-update-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-strong) 72%, var(--surface));
  color: var(--primary-strong);
  font-family: var(--font-family-heading);
  font-size: 18px;
  font-weight: var(--font-weight-heading);
}

.kid-update-icon {
  background: color-mix(in srgb, var(--warning-surface) 72%, var(--surface));
  color: var(--accent-strong);
}

.family-update-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.family-update-copy strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.28;
  font-weight: var(--font-weight-heading);
}

.family-update-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  font-weight: var(--font-weight-body);
}

.family-update-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.family-update-actions .primary,
.family-update-actions .secondary {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 13px;
}

.kid-ask-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 14px;
}

.kid-ask-form input {
  min-height: 44px;
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}

.kid-ask-form .primary {
  min-height: 44px;
  padding: 10px 14px;
}

.kid-buttons {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scroll-padding-top: 8px;
  scrollbar-color: rgba(109, 74, 223, 0.42) rgba(240, 233, 255, 0.68);
  scrollbar-width: thin;
}

.kid-buttons::-webkit-scrollbar {
  width: 10px;
}

.kid-buttons::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(240, 233, 255, 0.68);
}

.kid-buttons::-webkit-scrollbar-thumb {
  border: 2px solid rgba(240, 233, 255, 0.68);
  border-radius: 999px;
  background: rgba(109, 74, 223, 0.42);
}

.kid-buttons::-webkit-scrollbar-thumb:hover {
  background: rgba(109, 74, 223, 0.62);
}

.kid-question-section {
  display: grid;
  gap: 12px;
}

.kid-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}

.kid-section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--font-weight-button);
  text-transform: uppercase;
}

.kid-section-title strong {
  display: grid;
  min-width: 28px;
  min-height: 28px;
  place-items: center;
  border-radius: 8px;
  background: var(--warning-surface);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: var(--font-weight-heading);
}

.kid-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.kid-meal-plan-list {
  display: grid;
  gap: 8px;
}

.kid-meal-row {
  display: grid;
  grid-template-columns: minmax(118px, 0.36fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border-radius: 8px;
  padding: 9px 12px;
  background: var(--surface);
}

.kid-meal-day {
  min-width: 0;
  overflow: hidden;
  color: var(--primary);
  font-size: 13px;
  font-weight: var(--font-weight-button);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kid-meal-text {
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: var(--font-weight-button);
  line-height: 1.35;
}

.kid-question-button {
  position: relative;
  display: grid;
  box-sizing: border-box;
  grid-template-rows: 38px minmax(0, 1fr) 28px;
  align-content: start;
  gap: 14px;
  height: 166px;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  text-align: left;
  transition:
    border-color var(--motion-gentle),
    transform var(--motion-gentle),
    background var(--motion-gentle),
    box-shadow var(--motion-gentle);
}

.kid-question-button:hover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--surface-strong) 54%, var(--surface));
  box-shadow: 0 14px 28px rgba(65, 45, 120, 0.12);
}

.kid-question-button:focus-visible {
  outline: 3px solid rgba(255, 151, 15, 0.35);
  outline-offset: 2px;
}

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

.kid-button-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--primary) 32%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  color: var(--primary-strong);
  font-size: 16px;
  font-weight: var(--font-weight-heading);
  box-shadow: none;
}

:root[data-theme="dark"] .kid-button-icon {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
}

.kid-button-icon .ui-icon {
  width: 20px;
  height: 20px;
}

.family-update-icon .ui-icon {
  width: 19px;
  height: 19px;
}

.kid-question-button strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 23px;
  font-weight: var(--font-weight-heading);
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.kid-button-category {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--font-weight-button);
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.kid-ask-phrases {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  height: 28px;
  min-height: 0;
  margin-top: auto;
  overflow: hidden;
}

.kid-ask-phrases span {
  display: flex;
  min-width: 0;
  max-width: 100%;
  height: 28px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 7px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: var(--font-weight-body);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kid-ask-phrases.is-empty {
  display: flex;
  height: 28px;
  align-items: center;
  margin-top: auto;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--font-weight-body);
}

.kid-phrase-overlay {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 3;
  max-height: calc(100% - 24px);
  overflow-y: auto;
  border: 1px solid rgba(109, 74, 223, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--surface) 94%, white);
  box-shadow: 0 16px 34px rgba(48, 34, 90, 0.2);
  color: var(--ink);
  font-size: 13px;
  font-weight: var(--font-weight-body);
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity var(--motion-gentle), transform var(--motion-gentle);
}

.kid-question-button:hover .kid-phrase-overlay,
.kid-question-button:focus-visible .kid-phrase-overlay {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

:root[data-theme="dark"] .kid-phrase-overlay {
  border-color: rgba(248, 244, 255, 0.16);
  background: color-mix(in srgb, var(--surface-strong) 94%, black);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38);
}

.tone-orange {
  background: var(--warning-surface);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
}

.tone-purple {
  background: var(--surface-strong);
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
}

.tone-lavender {
  background: color-mix(in srgb, var(--surface-strong) 62%, var(--surface));
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
}

.tone-warm {
  background: color-mix(in srgb, var(--warning-surface) 50%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}

.tone-memory {
  background: color-mix(in srgb, var(--surface-strong) 56%, var(--surface));
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
}

.tone-default {
  background: var(--surface);
}

.answer-surface {
  position: sticky;
  top: 28px;
  border-color: color-mix(in srgb, var(--primary) 36%, var(--line));
  background: var(--panel-gradient);
}

.kid-answer {
  margin-top: 18px;
  min-height: 220px;
  border-radius: 8px;
  padding: 26px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-strong) 84%, var(--surface)), color-mix(in srgb, var(--surface) 90%, var(--surface-strong)));
  color: var(--ink);
  font-size: 28px;
  line-height: 1.35;
  white-space: pre-line;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 36%, var(--line));
}

.kid-media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.kid-media[hidden] {
  display: none;
}

.kid-media-item {
  position: relative;
  margin: 0;
  min-width: 0;
}

.kid-media-item img,
.kid-media-item video {
  display: block;
  width: 100%;
  max-height: 260px;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  object-fit: cover;
  box-shadow: var(--shadow-soft);
}

.kid-media-item video {
  object-fit: contain;
}

.kid-media-view-button {
  position: absolute;
  top: 8px;
  right: 8px;
  border-color: rgba(255, 255, 255, 0.62);
  border-radius: var(--radius-control);
  background: rgba(15, 19, 35, 0.78);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.empty-state {
  color: var(--muted);
  font-size: 18px;
}

.audio-library-panel {
  display: flex;
  max-height: calc(100vh - 220px);
  min-height: 560px;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.library-toolbar {
  margin-bottom: 0;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
  background: color-mix(in srgb, var(--surface-strong) 42%, var(--surface));
}

.library-toolbar h3 {
  margin: 0;
}

.audio-list {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
  scroll-padding-top: 18px;
  scrollbar-color: rgba(109, 74, 223, 0.42) rgba(240, 233, 255, 0.68);
  scrollbar-width: thin;
}

.audio-list::-webkit-scrollbar {
  width: 10px;
}

.audio-list::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(240, 233, 255, 0.68);
}

.audio-list::-webkit-scrollbar-thumb {
  border: 2px solid rgba(240, 233, 255, 0.68);
  border-radius: 999px;
  background: rgba(109, 74, 223, 0.42);
}

.audio-list::-webkit-scrollbar-thumb:hover {
  background: rgba(109, 74, 223, 0.62);
}

.audio-card {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 340px;
  background: var(--panel-gradient);
}

.audio-card.has-audio {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--line));
}

.audio-card.needs-audio {
  border-color: color-mix(in srgb, var(--accent) 36%, var(--line));
}

.audio-status {
  border-radius: 8px;
  padding: 6px 9px;
  background: var(--surface-strong);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: var(--font-weight-button);
}

.needs-audio .audio-status {
  background: var(--warning-surface);
  color: var(--warning-ink);
}

.audio-card-header > div {
  min-width: 0;
}

.audio-player-box {
  display: flex;
  min-height: 96px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--line));
  border-radius: 8px;
  padding: 14px;
  background: color-mix(in srgb, var(--surface-strong) 52%, var(--surface));
}

.audio-player-box.has-player {
  background: color-mix(in srgb, var(--surface) 82%, var(--surface-strong));
}

.audio-player-box.is-empty {
  gap: 12px;
  border-style: dashed;
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: color-mix(in srgb, var(--warning-surface) 48%, var(--surface));
  color: var(--warning-ink);
}

.audio-player-box.is-empty strong,
.audio-player-box.is-empty span {
  display: block;
}

.audio-player-box.is-empty strong {
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 15px;
  font-weight: var(--font-weight-heading);
}

.audio-player-box.is-empty span {
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--font-weight-body);
  line-height: 1.35;
}

.audio-empty-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  box-shadow: none;
}

.audio-empty-mark::before,
.audio-empty-mark::after {
  content: "";
  position: absolute;
  display: block;
  border-radius: 999px;
  background: var(--accent);
}

.audio-empty-mark::before {
  width: 14px;
  height: 18px;
}

.audio-empty-mark::after {
  width: 22px;
  height: 4px;
  transform: translateY(14px);
}

.record-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--warning-surface) 46%, var(--surface));
}

.record-button,
.stop-button,
.clear-audio-button {
  min-height: 38px;
  border-radius: var(--radius-button);
  padding: 8px 10px;
  font-weight: var(--font-weight-button);
}

.record-button {
  background: var(--accent);
  color: #ffffff;
}

.stop-button {
  background: #2a174f;
  color: #ffffff;
}

.record-button:disabled,
.stop-button:disabled,
.clear-audio-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.recording-time {
  min-width: 50px;
  color: var(--warning-ink);
  font-variant-numeric: tabular-nums;
  font-weight: var(--font-weight-button);
  text-align: right;
}

.record-controls.is-recording {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 151, 15, 0.16);
}

.audio-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.clear-audio-button {
  min-height: 46px;
  justify-self: stretch;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  background: var(--surface);
  color: var(--warning-ink);
}

.upload-control {
  display: flex;
  min-width: 0;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px dashed color-mix(in srgb, var(--primary) 38%, var(--line));
  border-radius: 8px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--surface-strong) 36%, transparent);
}

.upload-control input {
  min-width: 0;
  max-width: 100%;
}

audio {
  display: block;
  width: 100%;
  min-height: 44px;
}

.audio-card-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: var(--font-weight-heading);
}

.audio-meta {
  color: var(--muted);
  font-size: 13px;
}

.progress-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 12, 32, 0.46);
  backdrop-filter: blur(5px);
}

.progress-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  width: min(420px, 100%);
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--line));
  border-radius: 8px;
  padding: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.progress-card strong {
  display: block;
  color: var(--primary-strong);
  font-size: 20px;
  font-weight: var(--font-weight-heading);
  line-height: 1.2;
}

.progress-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: var(--font-weight-body);
  line-height: 1.4;
}

.progress-spinner {
  width: 34px;
  height: 34px;
  border: 4px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: progress-spin 800ms linear infinite;
}

@keyframes progress-spin {
  to {
    transform: rotate(360deg);
  }
}

.message-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 12, 32, 0.48);
  backdrop-filter: blur(5px);
}

body.media-viewer-active {
  overflow: hidden;
}

.media-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  background: rgba(7, 10, 24, 0.94);
  backdrop-filter: blur(10px);
}

.media-viewer[hidden] {
  display: none;
}

.media-viewer-toolbar {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.media-viewer-toolbar strong {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-viewer-toolbar button {
  flex: 0 0 auto;
  border-color: rgba(255, 255, 255, 0.42);
  border-radius: var(--radius-button);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.media-viewer-body {
  display: grid;
  min-height: 0;
  place-items: center;
}

.media-viewer-body img,
.media-viewer-body video {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 96px);
  border-radius: 8px;
  background: #000000;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
}

.media-viewer-body img {
  width: auto;
  height: auto;
}

.media-viewer-body video {
  width: min(100%, 1200px);
}

.message-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  width: min(460px, 100%);
  border: 1px solid color-mix(in srgb, var(--warning-ink) 28%, var(--line));
  border-radius: 8px;
  padding: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.message-badge {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--warning-surface);
  color: var(--warning-ink);
  font-size: 20px;
  font-weight: var(--font-weight-heading);
}

.message-copy strong {
  display: block;
  color: var(--primary-strong);
  font-size: 20px;
  font-weight: var(--font-weight-heading);
  line-height: 1.2;
}

.message-copy p {
  margin: 8px 0 0;
  color: var(--ink);
  font-weight: var(--font-weight-body);
  line-height: 1.45;
  white-space: pre-line;
}

.message-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.message-pin-field {
  display: grid;
  flex: 1 0 100%;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--font-weight-button);
}

.message-pin-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--input-bg);
  color: var(--ink);
  font: inherit;
}

.message-pin-field input:focus {
  border-color: color-mix(in srgb, var(--primary) 48%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent);
  outline: none;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(420px, calc(100vw - 44px));
  border-radius: 8px;
  padding: 12px 14px;
  background: #2a174f;
  color: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--motion-gentle), transform var(--motion-gentle);
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1200px) {
  .public-hero h1 {
    font-size: 48px;
  }

  .public-hero-content {
    padding: 54px;
  }

  .startup-hero h1 {
    font-size: 48px;
  }

  .startup-hero-copy {
    padding: 54px;
  }
}

@media (max-width: 980px) {
  .landing-nav {
    padding: 14px 22px;
  }

  .public-hero {
    width: calc(100% - 32px);
    min-height: min(620px, calc(100svh - 150px));
    grid-template-columns: minmax(0, 1fr) minmax(270px, 340px);
  }

  .public-hero h1 {
    font-size: 40px;
  }

  .public-hero-lead {
    font-size: 17px;
  }

  .landing-band {
    padding: 56px 20px;
  }

  .landing-card-grid,
  .landing-two-column,
  .landing-final-cta {
    grid-template-columns: minmax(0, 1fr);
  }

  .landing-card-grid {
    gap: 14px;
  }

  .landing-info-card {
    min-height: 0;
  }

  .landing-final-cta {
    align-items: start;
  }

  .auth-screen {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 24px;
  }

  .landing-longform {
    width: 100%;
  }

  .auth-card {
    position: static;
    grid-column: auto;
    grid-row: auto;
    justify-self: center;
  }

  .landing-section h2,
  .landing-section h3,
  .landing-benefits {
    max-width: 720px;
  }

  .app-shell {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .sidebar {
    position: sticky;
    top: 0;
    min-height: 100vh;
    max-height: 100vh;
    z-index: 10;
    gap: 12px;
    overflow-y: auto;
    padding: 12px 8px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
  }

  .brand {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 0;
    text-align: center;
  }

  .brand-lockup {
    display: grid;
    justify-items: center;
    gap: 4px;
    font-size: 13px;
  }

  .app-brand-logo {
    width: min(100%, 132px);
  }

  .brand > div:last-child {
    min-width: 0;
    text-align: center;
  }

  .user-card {
    width: 100%;
    padding: 8px;
    justify-items: center;
  }

  .brand p {
    justify-content: center;
    width: 100%;
    min-height: 24px;
    padding: 3px 8px;
    font-size: 11px;
  }

  #signedInUser {
    max-width: 100%;
    margin-left: 0;
    font-size: 10px;
  }

  .logout-button {
    width: 100%;
    min-height: 30px;
    margin-top: 6px;
    padding: 5px 6px;
  }

  .nav-tabs {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .nav-tab {
    display: grid;
    justify-content: center;
    justify-items: center;
    gap: 5px;
    min-height: 58px;
    padding: 8px 6px;
    text-align: center;
  }

  .nav-tab span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-tab.is-active,
  .nav-tab:hover {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 30%, var(--line)), var(--shadow-soft);
  }

  .settings-panel {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 0;
    padding: 8px;
  }

  .api-base {
    margin-top: 0;
    padding: 8px;
  }

  .setup-grid,
  .memory-layout,
  .kid-layout {
    grid-template-columns: 1fr;
  }

  .admin-activity-grid {
    grid-template-columns: 1fr;
  }

  .setup-grid {
    height: auto;
    min-height: 0;
  }

  .memory-layout {
    height: auto;
    min-height: 0;
  }

  .memory-list {
    max-height: 52vh;
  }

  .setup-side {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .kid-buttons-wrap {
    max-height: 48vh;
    min-height: 360px;
  }

  .metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .answer-surface {
    position: static;
  }
}

@media (max-width: 680px) {
  .landing-body,
  .landing-page {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .landing-nav {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    width: 100vw;
    max-width: 100vw;
    overflow: hidden;
    padding: 14px 16px;
  }

  .landing-nav-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    justify-content: stretch;
  }

  .landing-language {
    grid-column: 1 / -1;
  }

  .landing-language .language-flag-group,
  .landing-nav-actions .landing-button {
    width: 100%;
  }

  .landing-nav-actions .landing-button {
    min-width: 0;
    white-space: normal;
  }

  .landing-nav-actions .landing-button.primary {
    grid-column: 1 / -1;
  }

  .public-hero {
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
    width: calc(100vw - 24px);
    min-height: auto;
    margin: 12px 12px 0;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--surface) 98%, transparent) 0%, color-mix(in srgb, var(--warning-surface) 36%, var(--surface)) 100%);
  }

  .public-hero-content {
    gap: 16px;
    padding: 34px 22px 0;
  }

  .public-hero-visual {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    justify-self: stretch;
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-top: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
    border-left: 0;
    padding: 0;
    position: relative;
  }

  .public-hero-scene {
    width: 100%;
    height: 100%;
    object-position: right center;
  }

  .public-hero h1 {
    font-size: 32px;
    line-height: 1.08;
  }

  .public-hero-lead,
  .landing-section-heading p:not(.eyebrow),
  .landing-copy-stack p,
  .landing-final-cta p {
    font-size: 15px;
  }

  .public-hero-actions,
  .landing-final-cta .landing-button {
    width: 100%;
  }

  .public-hero-actions .landing-button {
    width: 100%;
  }

  .public-hero-points {
    gap: 8px 14px;
    font-size: 13px;
  }

  .startup-hero {
    grid-template-columns: minmax(0, 1fr);
    width: calc(100vw - 24px);
    min-height: auto;
    margin: 12px 12px 0;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--surface) 98%, transparent) 0%, color-mix(in srgb, #e8f5ef 46%, var(--surface)) 100%);
  }

  :root[data-theme="dark"] .startup-hero {
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--surface) 98%, transparent) 0%, color-mix(in srgb, #14392f 26%, var(--surface)) 100%);
  }

  .startup-hero-copy {
    gap: 16px;
    padding: 34px 22px 0;
  }

  .startup-hero h1 {
    font-size: 32px;
    line-height: 1.08;
  }

  .startup-hero-lead {
    font-size: 16px;
  }

  .startup-hero-actions,
  .startup-hero-actions .landing-button {
    width: 100%;
  }

  .startup-hero-media {
    height: 190px;
    border-top: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
    border-left: 0;
  }

  .startup-hero-points {
    gap: 8px 14px;
    font-size: 13px;
  }

  .landing-band.startup-family-band {
    padding: 28px 16px 36px;
  }

  .startup-family-strip,
  .startup-guide-layout,
  .startup-step-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .startup-family-card,
  .startup-step-card,
  .startup-step-card:nth-child(7) {
    min-height: 0;
  }

  .startup-step-card:nth-child(7) {
    grid-column: auto;
  }

  .landing-band.startup-steps-band {
    padding-top: 42px;
  }

  .startup-step-number {
    width: 36px;
    height: 36px;
  }

  .landing-final-cta .startup-final-actions {
    justify-content: stretch;
  }

  .landing-final-cta .startup-final-actions .landing-button {
    width: 100%;
  }

  .landing-band,
  .landing-final-cta {
    padding: 42px 16px;
  }

  .landing-section-heading h2,
  .landing-final-cta h2 {
    font-size: 28px;
  }

  .landing-section-heading h1,
  .landing-copy-stack h1 {
    font-size: 32px;
  }

  .landing-info-card {
    padding: 18px;
  }

  .feedback-form {
    padding: 18px;
  }

  .feedback-form .landing-button {
    width: 100%;
  }

  .landing-flow-row p {
    font-size: 16px;
  }

  .landing-how-grid {
    gap: 24px;
  }

  .landing-how-steps {
    gap: 12px;
  }

  .landing-how-steps .landing-flow-row,
  .landing-how-steps .landing-flow-row:last-child {
    gap: 12px;
    padding: 16px;
  }

  .landing-how-steps .landing-flow-row > span {
    width: 34px;
    height: 34px;
  }

  .landing-flow-copy h3,
  .landing-control-note h3 {
    font-size: 18px;
  }

  .landing-control-note {
    padding: 16px;
  }

  .auth-screen {
    grid-template-columns: minmax(0, 1fr);
    padding: 22px 16px;
  }

  .landing-voice-panel {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .voice-bars {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .landing-proof-grid,
  .landing-details,
  .landing-benefits {
    grid-template-columns: minmax(0, 1fr);
  }

  .landing-section h2,
  .landing-section h3 {
    font-size: 19px;
  }

  .landing-benefits li {
    font-size: 14px;
  }

  .auth-mobile-note {
    font-size: 12px;
  }

  .auth-card {
    padding: 18px;
  }

  .auth-name-grid {
    grid-template-columns: 1fr;
  }

  .brand-lockup-large {
    display: inline-flex;
  }

  .brand-lockup-large span {
    display: inline;
  }

  .app-shell {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .sidebar {
    gap: 10px;
    padding: 10px 6px;
  }

  .content {
    padding: 14px 12px;
  }

  .brand-lockup {
    font-size: 12px;
    gap: 4px;
  }

  .app-brand-logo {
    width: 76px;
  }

  .brand-lockup-large {
    gap: 12px;
  }

  .brand-lockup-large span {
    display: inline;
  }

  .brand p {
    min-height: 22px;
    padding: 3px 5px;
    font-size: 10px;
  }

  .logout-button {
    min-height: 28px;
    font-size: 11px;
  }

  .nav-tab {
    min-height: 54px;
    padding: 7px 4px;
    font-size: 11px;
  }

  .nav-icon {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }

  label {
    font-size: 11px;
  }

  select,
  input,
  textarea {
    padding: 9px 10px;
  }

  .settings-panel {
    grid-template-columns: 1fr;
    padding: 6px;
  }

  .settings-panel select {
    min-height: 36px;
    padding: 7px 6px;
    font-size: 11px;
  }

  .api-base {
    display: none;
  }

  .view-header,
  .header-actions,
  .app-confirm {
    align-items: stretch;
    flex-direction: column;
  }

  .view-header {
    gap: 12px;
    margin-bottom: 14px;
  }

  .section-hero {
    min-height: 0;
    padding: 16px;
  }

  .view-header h2 {
    font-size: 27px;
    line-height: 1.12;
  }

  .hero-caption {
    margin-top: 8px;
    font-size: 14px;
  }

  .trust-line {
    margin-top: 9px;
    padding: 7px 9px;
    font-size: 12px;
  }

  .eyebrow {
    font-size: 11px;
  }

  .header-actions {
    gap: 8px;
  }

  .header-actions button,
  .primary,
  .secondary,
  .danger {
    width: 100%;
    min-height: 40px;
    padding: 9px 12px;
  }

  .metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
  }

  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-card {
    min-height: 74px;
    padding: 10px;
  }

  .metric-label {
    font-size: 10px;
    line-height: 1.2;
  }

  .metric-card strong {
    font-size: 24px;
  }

  .panel {
    padding: 14px;
  }

  .family-updates-panel,
  .kid-updates-panel {
    margin-bottom: 14px;
  }

  .family-update-row {
    gap: 10px;
    padding: 12px;
  }

  .family-update-icon {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .family-update-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .family-update-actions .primary,
  .family-update-actions .secondary {
    width: 100%;
  }

  .kid-ask-form {
    grid-template-columns: 1fr;
  }

  .setup-grid,
  .kid-layout {
    gap: 14px;
  }

  .memory-media-grid {
    grid-template-columns: 1fr;
  }

  .field-grid {
    gap: 11px;
    margin-top: 12px;
  }

  .pin-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .pin-status {
    grid-column: 1 / -1;
    width: 100%;
    margin-left: 0;
    text-align: center;
  }

  .meal-plan-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .memory-form-grid {
    grid-template-columns: 1fr;
  }

  .memory-card-header,
  .memory-card-actions,
  .memory-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .notice-actions {
    width: 100%;
  }

  .notice-actions button {
    flex: 1;
  }

  .save-bar {
    right: 14px;
    bottom: 14px;
    width: calc(100vw - 28px);
  }

  .answer-form-grid {
    grid-template-columns: 1fr;
  }

  .answer-card-header,
  .answer-card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .answers-panel {
    max-height: none;
    min-height: 0;
  }

  .answers-panel-head {
    padding: 14px;
  }

  .answers-title-actions,
  .answers-toolbar {
    align-items: stretch;
    width: 100%;
  }

  .answers-title-actions {
    justify-content: space-between;
  }

  .answers-toolbar label {
    width: 100%;
  }

  .answers-list {
    max-height: 62vh;
    padding: 12px;
  }

  .answer-card,
  .audio-card {
    padding: 13px;
  }

  .admin-user-row {
    grid-template-columns: 1fr;
  }

  .admin-user-meta {
    justify-items: start;
    text-align: left;
  }

  .admin-user-actions {
    justify-content: start;
  }

  .admin-activity-summary {
    grid-template-columns: 1fr;
  }

  .answer-card-header,
  .answer-card-actions {
    gap: 10px;
  }

  .answer-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .answer-rewrite {
    align-items: stretch;
    flex-direction: column;
  }

  .answer-rewrite > span {
    white-space: normal;
  }

  .rewrite-buttons {
    justify-content: flex-start;
  }

  .kid-buttons-wrap {
    max-height: 52vh;
    min-height: 330px;
    padding: 13px;
  }

  .kid-buttons {
    gap: 10px;
    padding-right: 2px;
  }

  .kid-section-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .kid-meal-row {
    grid-template-columns: minmax(105px, 0.42fr) minmax(0, 1fr);
  }

  .kid-question-button {
    grid-template-rows: 34px minmax(0, 1fr) 27px;
    height: 148px;
    padding: 14px;
  }

  .kid-question-button strong {
    font-size: 20px;
  }

  .kid-button-category {
    font-size: 11px;
  }

  .kid-ask-phrases {
    height: 27px;
  }

  .kid-ask-phrases span,
  .kid-ask-phrases.is-empty {
    height: 27px;
  }

  .kid-answer {
    min-height: 150px;
    padding: 18px;
    font-size: 22px;
  }

  .kid-media {
    grid-template-columns: 1fr;
  }

  .kid-media-item img,
  .kid-media-item video {
    max-height: 220px;
  }

  .media-viewer {
    gap: 8px;
    padding: 8px;
  }

  .media-viewer-toolbar strong {
    font-size: 13px;
  }

  .media-viewer-body img,
  .media-viewer-body video {
    max-height: calc(100vh - 74px);
  }

  .audio-list {
    grid-template-columns: 1fr;
    max-height: 58vh;
    padding: 12px;
  }

  .audio-card {
    min-height: 370px;
  }

  .audio-actions {
    grid-template-columns: 1fr;
  }

  .library-toolbar {
    padding: 14px;
  }

  .record-controls {
    grid-template-columns: 1fr 1fr;
  }

  .recording-time {
    grid-column: 1 / -1;
    width: 100%;
    text-align: center;
  }

  .toast {
    right: 14px;
    bottom: 14px;
    max-width: calc(100vw - 28px);
  }
}

@media (max-width: 430px) {
  .public-hero h1 {
    font-size: 29px;
  }

  .public-hero-content {
    padding: 30px 18px 0;
  }

  .public-hero-visual {
    display: flex;
    height: 156px;
    padding: 0;
  }

  .public-hero-scene {
    object-position: 78% center;
  }

  .startup-hero h1 {
    font-size: 29px;
  }

  .startup-hero-copy {
    padding: 30px 18px 0;
  }

  .startup-hero-media {
    height: 156px;
  }

  .startup-family-card,
  .startup-step-card {
    padding: 16px;
  }

  .startup-step-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .startup-step-number {
    width: 34px;
    height: 34px;
  }

  .landing-section-heading h2,
  .landing-final-cta h2 {
    font-size: 25px;
  }

  .auth-screen-intro h1 {
    font-size: 23px;
  }
}

@media (max-width: 1200px) {
  .landing-home-nav {
    min-height: 86px;
  }

  .landing-home-actions {
    flex-wrap: wrap;
    gap: 8px 0;
  }

  .public-hero {
    grid-template-columns: minmax(440px, 0.98fr) minmax(440px, 0.82fr);
  }

  .public-hero h1 {
    font-size: clamp(46px, 4.6vw, 60px);
  }

  .public-hero-content {
    padding: 64px clamp(28px, 5vw, 76px) 54px;
  }
}

@media (max-width: 980px) {
  .landing-home-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 18px 22px;
  }

  .landing-home-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px 0;
    width: 100%;
    font-size: 15px;
  }

  .landing-home-link {
    min-height: 34px;
    border-left-width: 2px;
  }

  .landing-download-button {
    min-height: 40px;
    padding: 9px 18px;
    font-size: 15px;
  }

  .public-hero {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-height: auto;
    margin: 0;
    border-radius: 0;
  }

  .public-hero-content {
    width: min(100%, 760px);
    padding: 58px 28px 14px;
  }

  .public-hero h1 {
    font-size: clamp(40px, 7vw, 56px);
  }

  .public-hero-visual {
    justify-content: center;
    min-height: 0;
    border-top: 0;
    padding: 0 20px;
  }

  .public-hero-scene {
    width: min(100%, 700px);
  }
}

@media (max-width: 680px) {
  .landing-home-nav {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    padding: 14px 16px;
  }

  .landing-home-actions {
    display: flex;
    grid-template-columns: none;
    flex-wrap: nowrap;
    gap: 0;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .landing-home-actions::-webkit-scrollbar {
    display: none;
  }

  .landing-home-link {
    flex: 0 0 auto;
    min-height: 34px;
    border-left: 0;
    padding: 0 11px;
    font-size: 14px;
  }

  .landing-download-button {
    flex: 0 0 auto;
    width: auto;
    min-height: 36px;
    padding: 8px 14px;
    font-size: 14px;
    white-space: nowrap;
  }

  .public-hero {
    width: 100%;
    margin: 0;
    background: #fff8f1;
  }

  .public-hero-content {
    gap: 17px;
    padding: 42px 20px 8px;
  }

  .public-hero h1 {
    max-width: 330px;
    font-size: clamp(36px, 10vw, 44px);
    line-height: 1.04;
  }

  .public-hero-lead {
    font-size: 18px;
  }

  .public-hero-actions,
  .public-hero-actions .landing-button {
    width: 100%;
  }

  .public-hero-actions {
    flex-wrap: wrap;
  }

  .landing-app-store-button,
  .landing-hero-secondary {
    min-height: 50px;
    padding: 12px 14px;
    font-size: 16px;
  }

  .apple-mark,
  .apple-mark svg {
    width: 23px;
    height: 23px;
  }

  .public-hero-points {
    gap: 10px 14px;
    max-width: 320px;
    margin-top: 4px;
    font-size: 13px;
  }

  .trust-icon {
    width: 20px;
    height: 20px;
  }

  .public-hero-visual {
    height: auto;
    min-height: 0;
    padding: 0 10px 0;
  }

  .public-hero-scene {
    width: min(100%, 520px);
    object-position: center bottom;
  }
}

@media (max-width: 430px) {
  .public-hero h1 {
    max-width: 292px;
    font-size: clamp(33px, 9.2vw, 36px);
  }

  .public-hero-points {
    max-width: 320px;
  }

  .public-hero-content {
    padding: 34px 18px 6px;
  }

  .public-hero-visual {
    height: auto;
  }
}

@media (max-width: 680px) {
  .landing-home-nav {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    position: sticky;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 12px 16px;
    background: #fff8f1;
  }

  .landing-logo {
    min-width: 0;
  }

  .landing-home-nav .auth-logo-image {
    width: 112px;
    max-height: 44px;
  }

  .landing-home-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
    overflow: visible;
    justify-self: end;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin-left: 0;
    padding-bottom: 0;
  }

  .landing-home-link {
    display: none;
  }

  .landing-home-language {
    display: none;
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0;
  }

  .landing-home-language::before {
    display: none;
  }

  .landing-home-language .language-flag {
    width: 38px;
    height: 38px;
    min-height: 40px;
    font-size: 20px;
  }

  .landing-home-actions .landing-download-button {
    display: inline-flex;
    flex: 0 1 auto;
    width: auto;
    min-width: 0;
    max-width: min(156px, calc(100vw - 188px));
    min-height: 40px;
    border-radius: 11px;
    margin-left: 0;
    padding: 9px 13px;
    font-size: 13px;
    gap: 7px;
  }

  .landing-home-actions .landing-download-button .download-mark {
    width: 16px;
    height: 16px;
  }

  .landing-home-actions .landing-download-button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .landing-menu-toggle {
    display: grid;
    flex: 0 0 auto;
  }

  .landing-mobile-menu {
    background: #ffffff;
  }

  .landing-mobile-menu-panel {
    width: 100%;
    min-height: 100dvh;
    align-content: normal;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 30px;
    padding: 36px 32px 32px;
    box-shadow: none;
  }

  .landing-mobile-menu-links {
    align-content: start;
    gap: 0;
    overflow-y: auto;
  }

  .landing-mobile-menu-row {
    grid-template-columns: 32px minmax(0, 1fr) 12px;
    gap: 16px;
    min-height: 60px;
    font-size: 15px;
  }

  .mobile-menu-icon {
    width: 28px;
    height: 28px;
  }

  .mobile-menu-icon svg {
    width: 26px;
    height: 26px;
    stroke-width: 2.05;
  }

  .mobile-menu-arrow {
    width: 9px;
    height: 9px;
    border-top-width: 2px;
    border-right-width: 2px;
  }

  .landing-mobile-language {
    display: grid;
  }

  .landing-mobile-login {
    margin-top: 16px;
    padding-top: 18px;
  }

  .landing-mobile-download {
    min-height: 54px;
    margin-top: 20px;
    border-radius: 11px;
    font-size: 16px;
  }

  .landing-mobile-social {
    align-self: end;
    gap: 48px;
    margin-top: 24px;
    padding-bottom: 8px;
  }

  .public-hero {
    display: grid;
    min-height: auto;
    background: #fff8f1;
  }

  .public-hero-content {
    align-content: start;
    gap: 16px;
    min-height: auto;
    padding: 28px 34px 10px;
  }

  .hero-safety-pill {
    display: inline-flex;
    max-width: calc(100vw - 68px);
    margin-bottom: 4px;
    font-size: 10px;
    white-space: nowrap;
  }

  .public-hero h1 {
    max-width: 292px;
    font-size: 38px;
    line-height: 1.02;
  }

  .public-hero-lead {
    max-width: 250px;
    font-size: 15px;
    line-height: 1.42;
  }

  .public-hero-actions {
    align-items: flex-start;
    flex-direction: column;
    flex-wrap: nowrap;
    width: auto;
    margin-top: 20px;
  }

  .public-hero-actions .landing-button {
    width: auto;
  }

  .landing-app-store-button {
    min-width: 232px;
    min-height: 52px;
    border-radius: 13px;
    padding: 12px 18px;
    font-size: 14px;
  }

  .landing-hero-secondary {
    min-width: 158px;
    min-height: 50px;
    border-radius: 13px;
    padding: 12px 16px;
    font-size: 14px;
  }

  .landing-hero-secondary::after {
    content: "";
    width: 10px;
    height: 10px;
    margin-left: 10px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
  }

  .public-hero-points {
    position: static;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    max-width: none;
    margin: 4px 0 0;
    font-size: 11px;
  }

  .public-hero-points > span {
    gap: 7px;
  }

  .trust-icon {
    width: 18px;
    height: 18px;
  }

  .public-hero-visual {
    display: flex;
    justify-content: center;
    padding: 0 14px 10px;
  }

  .public-hero-scene {
    width: min(100%, 520px);
    object-position: center bottom;
  }
}

@media (max-width: 430px) {
  .landing-home-nav {
    gap: 7px;
    padding: 10px 12px;
  }

  .landing-home-nav .auth-logo-image {
    width: 98px;
  }

  .landing-home-actions {
    gap: 6px;
  }

  .landing-home-language .language-flag {
    width: 36px;
    height: 36px;
    min-height: 36px;
  }

  .landing-menu-toggle {
    width: 38px;
    height: 38px;
  }

  .landing-menu-toggle span {
    width: 20px;
    height: 2px;
  }

  .landing-home-actions .landing-download-button {
    min-height: 36px;
    border-radius: 10px;
    max-width: min(142px, calc(100vw - 159px));
    padding: 8px 10px;
    font-size: 12px;
    gap: 6px;
  }

  .landing-home-actions .landing-download-button .download-mark {
    width: 14px;
    height: 14px;
  }

  .landing-mobile-menu-panel {
    gap: 28px;
    padding: 34px 24px 28px;
  }

  .landing-mobile-menu-row {
    min-height: 58px;
    font-size: 14px;
  }

  .landing-mobile-download {
    min-height: 52px;
    font-size: 15px;
  }

  .public-hero {
    min-height: auto;
  }

  .public-hero-content {
    min-height: auto;
    padding: 22px 28px 22px;
  }

  .hero-safety-pill {
    max-width: calc(100vw - 56px);
    font-size: 10px;
  }

  .public-hero h1 {
    max-width: 250px;
    font-size: 33px;
  }

  .public-hero-lead {
    max-width: 226px;
    font-size: 13px;
  }

  .public-hero-actions {
    margin-top: 18px;
  }

  .landing-app-store-button {
    min-width: 204px;
    min-height: 48px;
    padding: 11px 15px;
    font-size: 13px;
  }

  .landing-hero-secondary {
    min-width: 148px;
    min-height: 48px;
    font-size: 13px;
  }

  .public-hero-points {
    left: 28px;
    right: 20px;
    bottom: 20px;
    font-size: 10px;
  }

  .trust-icon {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 980px) {
  .quiz-intro {
    position: static;
  }

  .quiz-option-grid.is-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .quiz-contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .quiz-question {
    padding: 18px;
  }

  .quiz-form-actions,
  .quiz-form-actions .landing-button {
    width: 100%;
  }

  .quiz-status {
    font-size: 13px;
  }
}
