:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #fff3f7;
  line-height: 1.55;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding-bottom: env(safe-area-inset-bottom);
}

button { font: inherit; }

.hero {
  padding: 2rem 1rem 2.25rem;
  color: #fff;
  background: linear-gradient(125deg, #9d174d, #be185d);
}

.hero-inner, main {
  width: min(100% - 1.25rem, 880px);
  margin-inline: auto;
}

.hero-inner { padding: .5rem 0; }
.eyebrow { margin: 0 0 .25rem; color: #9d174d; font-size: .76rem; font-weight: 800; letter-spacing: .09em; }
.hero .eyebrow { color: #fce7f3; }
h1 { max-width: 700px; margin: 0; font-size: clamp(2rem, 8vw, 3rem); line-height: 1.12; }
.hero-inner > p:last-child { max-width: 580px; margin: .75rem 0 0; font-size: 1.08rem; }

main { padding: 1rem 0 2.5rem; }
.card, .privacy-card, .parent-notes {
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid #dce3f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 18px #9d174d0a;
}

.privacy-card { border-color: #fbcfe8; background: #fff1f5; }
.privacy-card p { margin: 0; }
.privacy-card .muted { margin-top: .2rem; font-size: .92rem; }
.section-heading, .mission-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
h2 { margin: 0; font-size: clamp(1.35rem, 5vw, 1.75rem); line-height: 1.25; }
h3 { margin: 0 0 .4rem; font-size: 1.15rem; }
p { margin-top: .5rem; }
.muted { color: #4b5568; }
.path-summary { margin: .2rem 0 0; color: #9d174d; font-size: .9rem; font-weight: 700; text-align: right; }
.stage-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: .65rem; margin-top: 1rem; }

.stage-button {
  min-height: 76px;
  padding: .75rem;
  border: 2px solid #dce3f0;
  border-radius: 12px;
  color: #172033;
  background: #fff9fb;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.stage-button[aria-pressed="true"] { border-color: #be185d; background: #fff1f5; }
.stage-button:focus-visible, .button:focus-visible, summary:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; }
.stage-name { display: block; font-weight: 750; }
.stage-state { display: block; margin-top: .15rem; color: #4b5568; font-size: .88rem; }
.mission-card { padding: 1rem; }
.mission-heading { align-items: center; }
.time-chip { flex: 0 0 auto; padding: .35rem .6rem; border-radius: 999px; color: #9d174d; background: #fce7f3; font-size: .82rem; font-weight: 700; }
.focus-line { margin: .45rem 0 1rem; font-weight: 650; }
.routine { display: grid; grid-template-columns: repeat(2, 1fr); gap: .55rem; margin: 1rem 0 1.25rem; }
.routine div { display: flex; gap: .45rem; align-items: center; padding: .6rem; border-radius: 10px; background: #fff7fa; font-size: .9rem; }
.routine strong { color: #9d174d; }
.mission-part { margin: 1.25rem 0; }
.word-guidance { max-width: 70ch; }
.word-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); gap: .65rem; margin-top: .75rem; }
.word-card { min-width: 0; padding: .8rem; border: 1px solid #dce3f0; border-radius: 12px; background: #fff9fb; }
.word { margin: 0; font-size: 1.18rem; overflow-wrap: anywhere; }
.word-hint { min-height: 3em; margin: .35rem 0; color: #4b5568; font-size: .92rem; }
.chunks { min-height: 1.6em; margin: .3rem 0; color: #9d174d; font-weight: 750; }
.button, .word-actions button {
  min-height: 46px;
  padding: .6rem .85rem;
  border: 2px solid #be185d;
  border-radius: 10px;
  color: #fff;
  background: #be185d;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.button-secondary, .word-actions .button-secondary { color: #9d174d; background: #fff; }
.word-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.word-actions button { min-height: 44px; padding: .5rem .65rem; font-size: .9rem; }
.story-part { padding-top: 1rem; border-top: 1px solid #e5eaf2; }
.story-text { max-width: 70ch; font-size: 1.08rem; }
.story-text p { margin: .7rem 0; }
.talk-prompts { padding-left: 1.4rem; }
.talk-prompts li { padding-left: .2rem; margin: .4rem 0; }
.check-out { margin-top: 1.5rem; padding: 1rem; border-radius: 12px; background: #fff7fa; }
.check-buttons { display: grid; grid-template-columns: 1fr; gap: .55rem; margin-top: .75rem; }
.check-in-status { min-height: 1.6em; margin-bottom: 0; color: #14532d; font-weight: 700; }
.check-in-status[data-kind="warning"] { color: #92400e; }
.sr-status { min-height: 1.4em; margin: .35rem 0; color: #4b5568; font-size: .9rem; }
.parent-notes summary { min-height: 44px; padding: .35rem 0; color: #9d174d; font-weight: 750; cursor: pointer; }
.parent-notes p { max-width: 75ch; }
.parent-notes button { margin-top: .35rem; }
footer { padding: .4rem .3rem; color: #4b5568; text-align: center; font-size: .88rem; }

@media (min-width: 620px) {
  .hero { padding-block: 2.5rem; }
  main { padding-top: 1.25rem; }
  .card, .privacy-card, .parent-notes { padding: 1.3rem; }
  .mission-card { padding: 1.4rem; }
  .routine { grid-template-columns: repeat(4, 1fr); }
  .check-buttons { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
