@font-face {
  font-family: NotoSansKR;
  src: url('/assets/assets/fonts/NotoSansKR.ttf') format('truetype');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --cream: #fff6ee;
  --paper: #fffcf4;
  --ink: #55434e;
  --muted: #7c6a72;
  --rose: #a95d63;
  --rose-soft: #fae7e4;
  --butter: #f5d58a;
  --mint: #d8ede0;
  --line: #e6d8ce;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 1rem/1.75 NotoSansKR, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; word-break: keep-all; overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
a { color: var(--rose); text-underline-offset: .2em; }
img, svg { max-width: 100%; }
img { display: block; height: auto; }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 3px solid #8c4e6b; outline-offset: 5px; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { line-height: 1.4; font-weight: 800; }
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.04em; }
h2 { font-size: 2rem; letter-spacing: -.035em; }
h3 { font-size: 1.5rem; letter-spacing: -.025em; }
em { color: var(--rose); font-style: normal; }
.page, .site-header-inner, .site-footer { width: min(1160px, calc(100% - 80px)); margin-inline: auto; }
.page { padding-block: 36px 44px; }
.site-header-inner { width: min(1280px, calc(100% - 80px)); min-height: 122px; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px; text-decoration: none; color: #29304b; font-size: 1.875rem; font-weight: 900; letter-spacing: -1.4px; flex-shrink: 0; }
.brand img { width: 76px; height: 76px; object-fit: contain; }
.site-nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px; }
.site-nav a { display: flex; align-items: center; justify-content: center; min-height: 48px; text-align: center; text-decoration: none; color: var(--ink); font-size: 1rem; font-weight: 700; line-height: 1.4; padding: 14px 16px; border-radius: 14px; }
.site-nav a:hover { background: var(--rose-soft); color: var(--rose); }
.site-nav a[aria-current='page'] { background: var(--rose); color: white; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 4px 30px; display: flex; justify-content: space-between; align-items: center; gap: 24px; font-size: .8125rem; }
.footer-brand, .footer-contact { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; }
.footer-brand strong { font-size: 1.1875rem; font-weight: 700; letter-spacing: -.4px; }
.footer-brand span, .footer-contact small { color: var(--muted); }
.footer-contact > span:last-child { color: var(--muted); font-size: .6875rem; }
.footer-contact { justify-content: flex-end; }
.footer-contact a { text-decoration: none; }
.skip-link { position: absolute; z-index: 10; top: -100px; left: 16px; padding: 12px 20px; background: var(--paper); border: 1px solid var(--rose); border-radius: 12px; }
.skip-link:focus { top: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 14px 24px; border: 1px solid transparent; border-radius: 99px; background: var(--rose); color: white; font-size: .875rem; font-weight: 700; line-height: 1.5; text-align: center; text-decoration: none; }
.button:hover { filter: brightness(.97); }
.button-butter { background: var(--butter); color: #675235; }
.button-soft { background: #fae7e4; border-color: #e6d8ce; color: var(--rose); }
.pill { display: inline-flex; align-items: center; gap: 6px; width: fit-content; margin: 0; border-radius: 99px; padding: 7px 14px; background: var(--rose-soft); color: #8b6171; font-size: .75rem; font-weight: 600; line-height: 1.6; }
.eyebrow { color: var(--rose); font-size: .75rem; font-weight: 800; letter-spacing: .1em; line-height: 1.7; }
.fine-print { color: var(--muted); font-size: .75rem; line-height: 1.8; }
.muted { color: var(--muted); font-size: .9375rem; line-height: 1.85; }

/* The public home keeps the same artwork, copy and invented dialogue as Flutter. */
.home-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; }
.hero-copy h1 { margin-top: 22px; line-height: 1.35; }
.hero-copy h1 em { text-decoration: underline; text-decoration-color: #eac4d0; text-decoration-thickness: 2px; text-underline-offset: 7px; }
.hero-description { margin-top: 24px; color: var(--muted); font-size: .875rem; line-height: 1.95; }
.hero-actions { display: flex; gap: 12px; margin-top: 26px; }
.hero-actions .button { flex: 1; padding: 16px 10px; min-height: 54px; font-size: .875rem; }
.hero-copy > .fine-print { margin-top: 14px; }
.hero-illustration { position: relative; padding-top: 50px; padding-bottom: 24px; width: 100%; }
.hero-art { position: relative; z-index: 1; width: 100%; }
.hero-art-backdrop { position: absolute; inset: 80px 10px 35px 20px; background: #f4e3ce; border-radius: 48% 52% 44% 56% / 59% 42% 58% 41%; transform: rotate(-3deg); }
.speech-label { position: relative; z-index: 2; padding: 11px 15px; border: 1px solid #e1d4bf; border-radius: 18px; font-size: .875rem; font-weight: 700; line-height: 1.5; text-align: center; box-shadow: 0 3px 0 #e7d8c15c; }
.speech-label::after { content: ''; position: absolute; bottom: -7px; left: 28px; width: 12px; height: 12px; background: inherit; border-right: 1px solid #e1d4bf; border-bottom: 1px solid #e1d4bf; transform: rotate(45deg); }
.hero-illustration > .speech-label { position: absolute; }
.speech-discovery { top: 10px; left: 8px; max-width: 52%; background: var(--mint); }
.speech-explanation { top: 10px; right: 8px; max-width: 40%; background: var(--butter); }
.speech-explanation::after { left: auto; right: 28px; }
.speech-question { bottom: 0; left: 45%; transform: translateX(-50%); background: var(--rose-soft); }
.speech-question::after { top: -7px; bottom: auto; transform: rotate(225deg); }
.picture-book { margin-top: 46px; container-type: inline-size; }
.book-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-inline: 26px; position: relative; z-index: 2; }
.book-tab { position: relative; display: flex; justify-content: center; align-items: center; gap: 12px; min-height: 90px; padding: 14px 16px; background: #f5e7c8; border: 1px solid #e6d6c8; border-radius: 21px 21px 0 0; }
.book-tab:nth-child(2) { background: #e7e0ef; }
.book-tab:nth-child(3) { background: #e0ebdf; }
.book-tab[aria-selected='true'] { background: var(--paper); border-bottom-color: var(--paper); }
.book-tab[aria-selected='true']::after { content: ''; position: absolute; height: 7px; left: 0; right: 0; bottom: -6px; background: var(--paper); }
.tab-number { display: flex; width: 32px; height: 32px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 50%; background: #ffffff80; font-size: .875rem; font-weight: 800; }
.book-tab strong { display: block; font-size: 1.0625rem; }
.book-tab small { display: block; margin-top: 5px; color: var(--muted); font-size: .75rem; font-weight: 400; }
.book-spread { display: grid; grid-template-columns: 1fr 1fr; position: relative; border: 1px solid #e6d6c8; border-radius: 20px; background: var(--paper); box-shadow: 0 6px 0 #f1e5d9, 0 11px 0 #e5d1bd, 0 16px 24px #55434e12; }
.book-spread::after { content: ''; pointer-events: none; position: absolute; left: calc(50% - 15px); width: 30px; top: 0; bottom: 0; background: linear-gradient(90deg, transparent, #c2a98824 48%, #e4daca80 50%, transparent); }
.paper-page { padding: 29px 24px 25px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 1px solid var(--line); }
.paper-page h2 { font-size: 1.375rem; color: #826d57; }
.paper-question { margin-top: 16px; color: #8c6e4e; font-size: .9375rem; }
.paper-demo { height: 216px; width: 100%; }
.paper-demo [data-paper-folded] { display: none; }
.paper-demo.is-folded [data-paper-flat] { display: none; }
.paper-demo.is-folded [data-paper-folded] { display: initial; }
.paper-page .button { min-height: 44px; padding: 11px 18px; font-size: .8125rem; }
.paper-status { margin-top: 12px; font-size: .8125rem; }
.paper-page > .fine-print { margin-top: 6px; font-size: .6875rem; }
.conversation-page { position: relative; min-width: 0; padding: 27px; display: flex; flex-direction: column; justify-content: center; }
.conversation-stack { display: grid; align-items: center; }
.stage-panel { grid-area: 1 / 1; border-radius: 8px; }
/* Keep the tallest conversation's natural height, including enlarged text.
   Hidden panels remain outside focus and accessibility through visibility/inert. */
.conversation-stack > .stage-panel[hidden] { display: block !important; visibility: hidden; pointer-events: none; }
.book-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.book-turn-overlay { position: absolute; z-index: 3; inset: 1px; border-radius: 19px; overflow: hidden; pointer-events: none; perspective-origin: 50% 50%; }
.book-turn-leaf { position: absolute; inset: 0 0 0 50%; transform-origin: left center; transform-style: preserve-3d; will-change: transform; }
.book-turn-face { position: absolute; inset: 0; background: var(--paper); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.book-turn-face > .paper-page, .book-turn-face > .conversation-page { width: 100%; height: 100%; }
.book-turn-back { transform: rotateY(180deg); }
.book-turn-shade { position: absolute; inset: 0; background: #72563c; opacity: 0; pointer-events: none; }
.book-turn-overlay.is-compact { inset: 0; border-radius: 0 0 19px 19px; perspective-origin: left center; }
.book-turn-overlay.is-compact .book-turn-leaf { left: 0; }
.book-spread.is-turning > .paper-page { pointer-events: none; }
[data-paper-toggle][aria-disabled='true'] { cursor: wait; }
.conversation + .conversation { margin-top: 14px; }
.speaker-name { display: block; margin-left: 44px; margin-bottom: 6px; font-size: .6875rem; font-weight: 700; color: #806f77; }
.conversation-row { display: flex; align-items: center; gap: 8px; }
.avatar { width: 36px; height: 36px; flex-shrink: 0; object-fit: contain; border-radius: 50%; }
.conversation-row p { padding: 12px 16px; background: #eef4f6; border: 1px solid #e7e3dc; border-radius: 6px 20px 20px; font-size: .875rem; line-height: 1.7; }
.conversation-yul .conversation-row p { background: #fff0d4; }
.conversation-child .speaker-name { text-align: right; margin-right: 44px; margin-left: 0; }
.conversation-child .conversation-row { flex-direction: row-reverse; }
.conversation-child .avatar { transform: scaleX(-1); background: #fae7e4; }
.conversation-child .conversation-row p { background: #fae7e4; border-radius: 20px 6px 20px 20px; }
.conversation-note { margin-top: 19px; font-size: .6875rem; }
.home-invitation { margin-top: 38px; text-align: center; }
.home-invitation p { color: #a27669; font-size: 1.125rem; letter-spacing: .03em; }
.home-invitation .button { margin-top: 18px; }

/* The book responds to its reading width, as the Flutter LayoutBuilder does. */
@container (max-width: 649px) {
  .book-tabs { gap: 6px; padding-inline: 8px; }
  .book-tab { padding: 12px 6px; flex-direction: column; gap: 6px; min-height: 108px; }
  .book-tab strong { font-size: .875rem; }
  .book-tab small { font-size: .625rem; }
  .tab-number { width: 25px; height: 25px; font-size: .75rem; }
  .book-spread { grid-template-columns: 1fr; }
  .book-spread::after { content: none; }
  .paper-page { border-right: 0; border-bottom: 1px solid var(--line); padding-inline: 18px; }
  .conversation-page { padding-inline: 20px; }
  .conversation-row p { font-size: .8125rem; }
}

/* A single bound volume, with the current two vision chapters. */
body[data-page='vision'] .page { padding-block: 6px 36px; }
.vision-heading { text-align: center; }
.vision-heading .pill { border: 1px solid #a95d631f; padding: 7px 16px; }
.vision-heading h1 { margin-top: 16px; font-size: 2.125rem; line-height: 1.3; }
.vision-book { display: grid; grid-template-columns: 1fr 1fr; margin: 32px 0 14px; position: relative; }
.vision-book-cover { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; filter: drop-shadow(0 10px 12px #55434e24); }
.vision-leaf { min-width: 0; padding: 72px 44px; text-align: center; position: relative; display: flex; flex-direction: column; }
.vision-leaf + .vision-leaf { border-left: 0; }
.vision-leaf h2 { font-size: 1.5rem; line-height: 1.35; letter-spacing: -.03em; margin-top: 7px; margin-bottom: 18px; }
.vision-leaf p:not(.chapter) { font-size: 1rem; line-height: 1.75; margin-top: 12px; letter-spacing: -.0125em; }
.vision-leaf-future { justify-content: space-between; }
.vision-leaf h2 + p { margin-top: 0 !important; }
.chapter { color: var(--rose); font-size: .6875rem; line-height: 1.5; font-weight: 700; letter-spacing: .2em; }
.vision-leaf .emphasis { color: var(--rose); font-weight: 700; }
.vision-leaf > .vision-statement { font-size: 1.3125rem !important; line-height: 1.45 !important; font-weight: 800; color: var(--rose); letter-spacing: -.03em; }
.vision-closing { padding-block: 16px; }
.vision-illustration { position: relative; height: 220px; flex-shrink: 0; }
.vision-illustration img { position: relative; width: 100%; height: 220px; object-fit: contain; }
.vision-illustration::before { content: ''; position: absolute; inset: 30% 3% 0; background: #eee8fa66; border-radius: 50%; }
.vision-illustration-learning { transform: translateY(-14px); margin-bottom: 14px; }
.vision-illustration-future { margin-top: 0; }
.vision-illustration-future::before { background: #d8ede066; }
.book-page-number { position: absolute; bottom: 26px; left: 44px; color: #b5a49a; font-size: .625rem; letter-spacing: .2em; }
.vision-leaf + .vision-leaf .book-page-number { right: 44px; left: auto; }

/* Program introduction and illustrative thought route. */
body[data-page='program'] .page { padding-block: 36px 64px; }
.program-labels { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin-bottom: 20px; }
.fact { background: var(--paper); border: 1px solid var(--line); color: var(--muted); }
.program-hero { display: grid; grid-template-columns: 1.85fr 1fr; grid-template-rows: auto auto; gap: 36px 28px; align-items: end; }
.program-copy h1 { font-size: 3.0625rem; line-height: 1.3; }
.program-lead { margin-top: 23px; line-height: 1.9; }
.program-copy > .muted { margin-top: 16px; font-size: .875rem; }
.program-illustration { grid-column: 2; grid-row: 1 / 3; justify-self: center; position: relative; width: min(90%,360px); padding-top: 61px; margin-bottom: 16px; transform: translate(-18px,-12px); }
.program-illustration::before { content: ''; position: absolute; left: 12%; right: 0; top: calc(61px + 12%); bottom: 6.5%; border-radius: 160px; background: var(--butter); }
.program-illustration img { position: relative; width: 100%; aspect-ratio: 1.06; object-fit: contain; transform: translateY(-6.5%); }
.program-illustration > .speech-label { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: max-content; max-width: 100%; background: var(--mint); font-size: .875rem; font-weight: 800; padding: 10px 12px; border: 0; border-radius: 17px; box-shadow: 0 4px 14px #55434e0d; }
.program-illustration > .speech-label::after { left: calc(50% - 5px); width: 10px; height: 10px; border: 0; bottom: -5px; }
.program-route-heading .fine-print { margin-top: 12px; font-size: .8125rem; }
.thought-route { --marker-size: calc(1.375rem + 30px); list-style: none; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; margin: 24px 0 0; padding: 28px; background: #fcf1d6; border: 1px solid var(--line); border-radius: 28px; }
.thought-stop { position: relative; }
.stop-number { position: relative; z-index: 1; display: grid; place-items: center; width: var(--marker-size); height: var(--marker-size); margin-inline: auto; border-radius: 50%; border: 4px solid var(--paper); background: var(--butter); font-size: 1.375rem; line-height: 1; font-weight: 800; box-shadow: 0 2px 0 var(--line); }
.thought-connector { position: absolute; top: 0; left: 50%; width: calc(100% + 24px); max-width: none; height: var(--marker-size); pointer-events: none; }
.thought-stop:nth-child(2) .stop-number, .thought-stop:nth-child(2) .thought-answer { background: var(--mint); }
.thought-stop:nth-child(3) .stop-number, .thought-stop:nth-child(3) .thought-answer { background: var(--rose-soft); }
.thought-stop h3 { margin-top: 20px; font-size: 1.1875rem; }
.stop-caption { margin-top: 4px; font-size: .8125rem; color: var(--muted); }
.thought-stop > .dialogue-label { margin-top: 20px; color: var(--rose); }
.dialogue-label { font-size: .75rem; font-weight: 700; }
.dialogue-label + p { margin-top: 5px; font-size: .9375rem; font-weight: 600; line-height: 1.7; }
.thought-answer { padding: 16px; margin-top: 14px; background: var(--butter); border: 1px solid var(--line); border-radius: 20px 20px 5px 20px; }
.program-rhythm { margin-top: 48px; }
.program-rhythm h2 { margin-top: 14px; }
.program-rhythm > .muted { margin-top: 12px; }
.activity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 24px; }
.activity-card { padding: 28px; border: 1px solid var(--line); border-radius: 32px 18px; background: var(--rose-soft); }
.activity-card-heading { display: flex; align-items: center; justify-content: space-between; color: var(--rose); }
.activity-number { color: var(--rose); font-size: 2.375rem; line-height: 1; letter-spacing: -2px; font-weight: 900; }
.activity-rhythm { margin-top: 8px; color: var(--rose); font-size: .8125rem; font-weight: 700; line-height: 1.7; }
.activity-card h3 { margin-top: 18px; font-weight: 900; }
.activity-card > .activity-rhythm + p { margin-top: 19px; font-size: .875rem; line-height: 1.85; }
.activity-turns { margin-top: 22px; padding: 16px; border: 1px solid var(--line); border-radius: 17px; background: #fffcf4a6; }
.activity-turns strong { color: var(--rose); font-size: 1rem; font-weight: 800; }
.activity-turns p { margin-top: 6px; font-size: .75rem; }
.activity-card h4 { font-size: 1rem; line-height: 1.6; margin-top: 20px; padding-top: 20px; border-top: 1px solid #a95d6333; }
.activity-card > .fine-print { margin-top: 6px; }
.activity-weekly { background: #faedd0; }
.activity-weekly .activity-number, .activity-weekly .activity-card-heading, .activity-weekly .activity-rhythm, .activity-weekly .activity-turns strong { color: #806543; }
.activity-weekly h4 { border-color: #80654333; }
.program-rhythm > .fine-print { margin-top: 14px; }
.program-invitations { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 32px; margin-top: 44px; background: var(--paper); border: 1px solid var(--line); border-radius: 28px; }
.program-invitations h2 { font-size: 1.3125rem; line-height: 1.5; }
.program-invitations p { margin-top: 8px; font-size: .8125rem; }
.program-invitations .button { margin-top: 19px; }

/* Approved public story previews are progressively loaded by the read-only RPC. */
body[data-page='curriculum'] .page { padding-block: 32px 64px; }
.curriculum-intro h1 { margin-top: 18px; font-size: 1.75rem; line-height: 1.4; letter-spacing: -1px; }
.curriculum-intro .muted { margin-top: 14px; }
.published-stories { margin-top: 32px; }
.stories-status { color: var(--muted); font-size: .8125rem; margin-bottom: 16px; }
.stories-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.story-card { position: relative; width: 100%; min-width: 0; padding: 18px; background: #fffaf3; border: 1px solid var(--line); border-radius: 28px; text-align: left; }
.story-card:hover { border-color: #c19294; box-shadow: 0 6px 20px #55434e0a; }
.story-badge { display: table; margin-left: auto; margin-bottom: 12px; border-radius: 20px; padding: 6px 10px; background: #eee8fa; color: #796087; font-size: .6875rem; font-weight: 700; }
.story-badge.is-weekly { background: #faedd0; color: #806543; }
.story-card-illustration { width: 100%; aspect-ratio: 5/3; border-radius: 18px; background: var(--paper); overflow: hidden; display: grid; place-items: center; }
.story-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.story-placeholder { color: var(--muted); font-size: .8125rem; padding: 24px; text-align: center; }
.story-card-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: 3em; font-size: 1rem; font-weight: 800; line-height: 1.5; margin-top: 16px; }
.story-card-summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: 3.4em; color: var(--muted); font-size: .8125rem; line-height: 1.7; margin-top: 8px; }
.story-card-link { display: block; color: var(--rose); font-size: .8125rem; font-weight: 700; margin-top: 18px; }
.story-card-arrow { float: right; font-size: 1.125rem; line-height: 1.2; }
.stories-pagination { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 24px; }
.stories-pagination .button { width: 48px; padding: 10px; }
.preview-notice { margin-top: 20px; }
.benefits { margin-top: 46px; }
.benefits h2 { font-size: 1.5rem; }
.benefit-list { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 20px 0 14px; gap: 12px; }
.benefit-list li { border-radius: 99px; padding: 8px 14px; background: var(--rose-soft); color: #8b6171; font-size: .8125rem; }
.benefit-list li::before { content: '✓'; padding-right: 7px; }
.benefits > .fine-print { font-size: .6875rem; }
.story-dialog { width: min(700px,calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 80px #55434e33; }
.story-dialog::backdrop { background: #31263280; }
.story-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.story-dialog-header h2 { font-size: 1.1875rem; font-weight: 700; line-height: 1.45; }
.icon-button { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); }
#story-label { margin-top: 10px; color: var(--rose); font-weight: 700; }
.story-dialog-illustration { height: 200px; margin-top: 20px; display: grid; place-items: center; overflow: hidden; }
.story-dialog-illustration .story-image { height: 200px; min-height: 0; object-fit: contain; }
#story-panel-title { font-size: 1rem; font-weight: 700; line-height: 1.5; margin-top: 20px; }
#story-panel-text { margin-top: 12px; margin-bottom: 20px; font-size: 1rem; line-height: 1.9; white-space: pre-line; }
.story-dialog > .fine-print:last-of-type { font-size: .6875rem; line-height: 1.7; }
.story-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.story-dialog-actions .button { padding: 10px 16px; background: transparent; color: var(--rose); border: 0; }
.story-preparation { margin-top: 18px; padding-inline: 8px; font-size: .875rem; line-height: 1.7; white-space: pre-line; }
.story-preparation h4 { margin-bottom: 8px; }
.story-preparation p + p { margin-top: 8px; color: var(--muted); font-size: .8125rem; }
.story-preparation ul { padding-left: 20px; }


@media (max-width: 1099px) {
  .page, .site-header-inner, .site-footer { width: calc(100% - 48px); }
  .site-header-inner { gap: 16px; min-height: 102px; }
  .brand { font-size: 1.75rem; }
  .brand img { width: 64px; height: 64px; }
  .site-nav { gap: 2px; }
  .site-nav a { padding-inline: 8px; font-size: .9375rem; }
  .hero-actions .button { font-size: .8125rem; }
  .speech-label { font-size: .75rem; padding: 10px 12px; }
  .book-tabs { gap: 12px; padding-inline: 20px; }
}

@media (max-width: 899px) {
  .site-header-inner { width: calc(100% - 16px); padding-block: 8px; gap: 0; flex-wrap: wrap; }
  .brand { min-height: 84px; }
  .site-nav { display: grid; width: 100%; grid-template-columns: 1fr 2fr 2fr 2fr; gap: 4px; }
  .site-nav a { padding: 8px 4px; font-size: .875rem; }
}

@media (max-width: 947px) {
  .site-footer { align-items: flex-start; flex-direction: column; gap: 12px; }
  .footer-contact { align-self: flex-end; }
}

@media (max-width: 389px) {
  .site-nav a { font-size: .8125rem; }
}

@media (max-width: 359px) {
  .site-nav a { font-size: .75rem; }
}

@media (max-width: 839px) {
  .home-hero { grid-template-columns: 1fr; gap: 26px; }
  .hero-copy { max-width: 620px; }
  .hero-copy h1 { font-size: 2.5rem; }
  .hero-actions { max-width: 520px; }
  .hero-illustration { max-width: 560px; justify-self: center; }
  .speech-label { font-size: .875rem; }
  .program-hero { display: flex; flex-direction: column; gap: 28px; align-items: stretch; }
  .program-copy h1 { font-size: 2.1875rem; }
  .program-illustration { order: 1; width: min(100%,256px); align-self: center; margin-bottom: 0; transform: translate(-10px,-8px); }
  .program-route-heading { order: 2; }
  .program-route-heading h2 { font-size: 1.75rem; }
}

@media (max-width: 649px) {
  h2 { font-size: 1.75rem; }
  .book-tabs { gap: 6px; padding-inline: 8px; }
  .book-tab { padding: 12px 6px; flex-direction: column; gap: 6px; min-height: 108px; }
  .book-tab strong { font-size: .875rem; }
  .book-tab small { font-size: .625rem; }
  .tab-number { width: 25px; height: 25px; font-size: .75rem; }
  .book-spread { grid-template-columns: 1fr; }
  .book-spread::after { content: none; }
  .paper-page { border-right: 0; border-bottom: 1px solid var(--line); padding-inline: 18px; }
  .conversation-page { padding-inline: 20px; }
  .conversation-row p { font-size: .8125rem; }
}

@media (max-width: 599px) {
  .page, .site-header-inner, .site-footer { width: calc(100% - 32px); }
  .site-header-inner { width: calc(100% - 16px); }
  .page { padding-top: 28px; }
  .hero-copy h1 { font-size: 2.125rem; }
  .hero-kicker { font-size: .6875rem; }
  .hero-actions .button { padding-inline: 8px; font-size: .75rem; }
  .hero-illustration { padding-top: 46px; }
  .speech-label { font-size: .75rem; }
  .picture-book { margin-top: 36px; }
  .thought-route { padding: 20px; }
  .activity-card { padding: 22px; }
  .program-invitations { padding: 24px; }
  .activity-card h3 { font-size: 1.375rem; }
  .story-dialog { padding: 20px; max-height: calc(100dvh - 32px); }
  .footer-contact { gap: 8px 12px; }
}

@media (max-width: 359px) {
  .hero-actions { flex-direction: column; }
  .hero-kicker { border-radius: 16px; }
  .speaker-name { margin-left: 38px; }
  .conversation-child .speaker-name { margin-right: 38px; }
  .avatar { width: 30px; height: 30px; }
  .conversation-row p { padding: 10px 12px; }
  .speech-label { font-size: .6875rem; padding: 8px 10px; }
}

/* Match the Flutter content-width breakpoints after the page gutters. */
@media (max-width: 947px) {
  .stories-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 887px) {
  .vision-book { grid-template-columns: 1fr; gap: 20px; }
  .vision-book-cover { display: none; }
  .vision-leaf { padding: 44px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 4px 0 var(--line); }
  .vision-leaf + .vision-leaf { border: 1px solid var(--line); }
  .vision-leaf > p:not(.chapter) { max-width: 560px; align-self: center; }
  .vision-illustration-future { margin-top: 8px; }
  .book-page-number { bottom: 14px; left: 22px; }
  .vision-leaf + .vision-leaf .book-page-number { right: 22px; }
}

@media (max-width: 863px) {
  .thought-route { grid-template-columns: 1fr; gap: 30px; }
  .thought-stop { padding-left: calc(var(--marker-size) + 14px); }
  .stop-number { position: absolute; left: 0; margin: 0; }
  .thought-connector { display: none; }
  .thought-stop:not(:last-child)::before { content: ''; position: absolute; top: var(--marker-size); left: calc(var(--marker-size) / 2 - 1px); width: 2px; height: calc(100% + 30px - var(--marker-size)); background: repeating-linear-gradient(to bottom, #a95d6361 0 4px, transparent 4px 12px); }
  .thought-stop h3 { margin-top: 0; }
  .thought-answer { max-width: 520px; }
}

@media (max-width: 807px) {
  .vision-heading h1 span { display: block; }
}

@media (max-width: 791px) {
  .program-invitations { grid-template-columns: 1fr; gap: 28px; }
  .program-invitations > section + section { padding-top: 28px; border-top: 1px solid var(--line); }
}

@media (max-width: 787px) {
  .activity-grid { grid-template-columns: 1fr; }
}

@media (max-width: 627px) {
  .stories-grid { grid-template-columns: 1fr; }
}

@media (max-width: 451px) {
  .vision-heading h1 { font-size: 1.75rem; }
}

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

@media print {
  .site-nav, .hero-actions, .home-invitation, .book-tabs, [data-paper-toggle], .story-dialog, .skip-link { display: none !important; }
  body { background: white; }
  .page, .site-header-inner, .site-footer { width: 100%; }
  .conversation-stack { display: block; }
  .conversation-stack > .stage-panel[hidden] { display: block !important; visibility: visible; margin-top: 24px; }
  .book-turn-overlay, .book-status { display: none !important; }
  .book-spread, .vision-book { box-shadow: none; }
}
