@font-face { font-family: "Baloo 2"; font-style: normal; font-weight: 600 800; font-display: swap;
  src: url("../fonts/baloo2-devanagari.woff2") format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09; }
@font-face { font-family: "Baloo 2"; font-style: normal; font-weight: 600 800; font-display: swap;
  src: url("../fonts/baloo2-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Baloo 2"; font-style: normal; font-weight: 600 800; font-display: swap;
  src: url("../fonts/baloo2-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Baloo 2"; font-style: normal; font-weight: 600 800; font-display: swap;
  src: url("../fonts/baloo2-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Baby Says website. Palette comes from the app icon (blue/red/yellow/green
   tiles) on the cream of the Play feature graphic.
   Layout: one centered column; the home page alternates plain and tinted
   bands, and real app screens sit in phone frames next to the copy. */
:root {
  --brand-blue: #1f63ad;
  --brand-sky: #3a9be8;
  --brand-green: #6cc24a;
  --tile-blue: #3a9be8;
  --tile-red: #f25a4f;
  --tile-yellow: #f5b82e;
  --tile-green: #6cc24a;
  --brand-gradient: linear-gradient(135deg, var(--brand-blue), var(--brand-sky), var(--brand-green));
  --canvas: #fffaf1;
  --tint: #fdf1dc;
  --card: #fcefd4;
  --ink: #2a2118;
  --ink-soft: #5f5448;
  --border: #efe3cc;
  --phone: #1f1a15;
  --radius-lg: 28px;
  --radius-md: 18px;
  --max-width: 1120px;
  --display: "Baloo 2", ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans",
    "Noto Sans Thai", "Noto Sans Devanagari", "Noto Sans Bengali", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", "Noto Sans Thai", "Noto Sans Devanagari", "Noto Sans Bengali", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; font-family: var(--body); background: var(--canvas); color: var(--ink); line-height: 1.6; }
img, video { max-width: 100%; display: block; }
a { color: var(--brand-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Korean wraps between words (spaces), never inside one. */
:lang(ko) { word-break: keep-all; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; text-wrap: balance; }

/* Longhand padding: a shorthand would outrank section padding below. */
.wrap { max-width: var(--max-width); margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 250, 241, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; flex: none; white-space: nowrap; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 1.25rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { height: 36px; width: 36px; border-radius: 10px; }
.lang-select {
  appearance: none; font: inherit; font-size: 0.88rem; font-weight: 700; color: var(--ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235f5448' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid var(--border); border-radius: 999px; padding: 8px 36px 8px 16px; cursor: pointer;
}
.site-nav { display: flex; gap: 2px; margin-right: auto; margin-left: 12px; flex-wrap: wrap; min-width: 0; }
.site-nav a { padding: 7px 12px; border-radius: 999px; font-weight: 700; font-size: 0.9rem; color: var(--ink-soft); white-space: nowrap; }
.site-nav a:hover { background: var(--card); color: var(--ink); text-decoration: none; }
.site-nav a[aria-current="page"] { background: var(--brand-blue); color: #fff; }
.header-cta {
  background: var(--tile-red); color: #fff; font-weight: 800; font-size: 0.9rem;
  padding: 9px 18px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 6px 16px -6px rgba(242, 90, 79, 0.7);
}
.header-cta:hover { text-decoration: none; filter: brightness(1.05); }
.site-nav a:focus-visible, .lang-select:focus-visible, .header-cta:focus-visible,
.store-badge:focus-visible, summary:focus-visible, .text-link:focus-visible { outline: 3px solid var(--brand-sky); outline-offset: 2px; }

/* Shared bits */
.eyebrow {
  margin: 0 0 10px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--tile-red);
}
.fine-print { color: var(--ink-soft); font-size: 0.88rem; margin: 6px 0 0; }
.text-link { font-weight: 700; }
.badge-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 8px; }
.badge-row--center { justify-content: center; }
.store-badge {
  display: inline-flex; align-items: center; gap: 10px; min-width: 172px;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 12px;
  transition: transform 0.15s ease;
}
.store-badge:hover { text-decoration: none; transform: translateY(-2px); }
.store-badge__icon { flex: none; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; }
.store-badge__icon--play {
  clip-path: polygon(18% 4%, 18% 96%, 88% 50%);
  background: conic-gradient(from 205deg at 35% 50%, #00d2ff 0deg, #00f076 90deg, #ffe000 180deg, #ff3a44 270deg, #00d2ff 360deg);
}
.store-badge__icon--apple svg { width: 22px; height: 22px; }
.store-badge__text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store-badge__eyebrow { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.02em; opacity: 0.9; }
.store-badge__title { font-size: 1.15rem; font-weight: 600; }

/* Phone frame around real app screens (600x1333 shots, ~9:20). */
.phone {
  position: relative; width: 100%; max-width: 260px; aspect-ratio: 9 / 20; margin: 0 auto;
  background: var(--phone); border-radius: 40px; padding: 9px;
  box-shadow: 0 34px 60px -28px rgba(42, 33, 24, 0.55), 0 0 0 1px rgba(42, 33, 24, 0.08);
}
.phone img, .phone video { width: 100%; height: 100%; object-fit: cover; border-radius: 31px; background: #fff; }

/* Hero */
.hero { padding-top: 56px; padding-bottom: 64px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); font-weight: 800; margin: 0 0 18px; letter-spacing: -0.01em; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 36em; margin: 0; }
.hero-visual { position: relative; display: flex; justify-content: center; padding: 20px 0; }
.hero-blob {
  position: absolute; inset: 6% 2%; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffe3b0, transparent 60%), radial-gradient(circle at 70% 70%, #cfe8ff, transparent 60%), var(--card);
}
.phone--hero { max-width: 300px; animation: float 7s ease-in-out infinite; }
.sticker {
  position: absolute; background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 800; font-size: 0.9rem;
  box-shadow: 0 12px 24px -12px rgba(42, 33, 24, 0.45); white-space: nowrap;
}
.sticker--word { top: 16%; left: 0; color: var(--brand-blue); transform: rotate(-6deg); }
.sticker--star { bottom: 20%; right: 2%; transform: rotate(5deg); }
.sticker--hello { bottom: 7%; left: 6%; color: var(--tile-red); transform: rotate(-3deg); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Trust strip */
.trust-strip { background: var(--tint); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.trust-strip ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 32px; padding-top: 18px; padding-bottom: 18px; margin-top: 0; margin-bottom: 0; }
.trust-strip li { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.95rem; }

/* Sections */
.section { padding: 88px 0; }
.section--tint { background: var(--tint); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); margin: 0 0 12px; font-weight: 800; }
.section-head p:last-child { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }

/* Peek: three real screens */
.peek-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.peek-item { margin: 0; text-align: center; }
.peek-item:nth-child(2) { transform: translateY(28px); }
.peek-item figcaption { margin-top: 18px; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }

/* Stages: alternating rows */
.stage-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 40px; }
.stage {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr); gap: 40px; align-items: center;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px 48px;
}
.stage:nth-child(even) .stage-copy { order: 2; }
.stage-visual .phone { max-width: 230px; }
.stage-label {
  display: inline-block; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: #fff; padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.stage--blue .stage-label { background: var(--tile-blue); }
.stage--red .stage-label { background: var(--tile-red); }
.stage--yellow .stage-label { background: var(--tile-yellow); color: var(--ink); }
.stage--green .stage-label { background: var(--tile-green); }
.stage h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 10px; font-weight: 800; }
.stage p { color: var(--ink-soft); font-size: 1.05rem; margin: 0 0 16px; max-width: 32em; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 30px; font-weight: 700; }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 0.75rem; color: #fff; background: var(--tile-green);
}

/* Story gallery */
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.story-card { background: #fff; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.story-card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -24px rgba(42, 33, 24, 0.45); }
.story-card img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.story-meta { padding: 16px 18px 18px; }
.story-meta h3 { margin: 0 0 4px; font-size: 1.15rem; font-weight: 800; }
.story-meta p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }

/* Session steps (a real sequence, so they are numbered) */
.step-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.step { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 26px 22px; }
.step-icon { font-size: 2rem; display: block; margin-bottom: 14px; }
.step-num { position: absolute; top: 18px; right: 20px; font-family: var(--display); font-weight: 800; font-size: 1.6rem; color: var(--border); }
.step h3 { margin: 0 0 6px; font-size: 1.2rem; font-weight: 800; }
.step p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* Games */
.games-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.games-visual { display: flex; justify-content: center; gap: 0; }
.games-visual .phone { max-width: 220px; margin: 0; }
.phone--tilt-left { transform: rotate(-5deg) translateX(18px); z-index: 1; }
.phone--tilt-right { transform: rotate(5deg) translate(-18px, 30px); }
.games-copy h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); margin: 0 0 12px; font-weight: 800; }
.lede-sm { color: var(--ink-soft); font-size: 1.05rem; margin: 0 0 24px; }
.game-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.game-list li { display: flex; gap: 12px; align-items: flex-start; }
.game-icon { flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--card); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.game-list h3 { margin: 0 0 2px; font-size: 1.05rem; font-weight: 800; }
.game-list p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }

/* Topics + languages */
.topic-cloud { list-style: none; padding: 0; margin: 0 0 56px; display: flex; flex-wrap: wrap; gap: 10px; }
.topic-cloud li { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 0.95rem; }
.languages-panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; text-align: center; }
.languages-panel h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 10px; font-weight: 800; }
.languages-panel > p:not(.pill-label):not(.eyebrow) { color: var(--ink-soft); max-width: 620px; margin: 0 auto; }
.pill-label { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); margin: 24px 0 10px; }
.language-pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.language-pills span { background: var(--canvas); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; font-size: 0.88rem; font-weight: 700; }
.language-pills.learn span { border-color: var(--brand-sky); color: var(--brand-blue); font-size: 1rem; background: #fff; }

/* Parents */
.parent-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.parent-grid li { background: var(--tint); border-radius: var(--radius-md); padding: 26px 24px; }
.parent-icon { font-size: 1.8rem; display: block; margin-bottom: 12px; }
.parent-grid h3 { margin: 0 0 6px; font-size: 1.15rem; font-weight: 800; }
.parent-grid p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* FAQ */
.faq-wrap { max-width: 820px; }
.faq-list { display: grid; gap: 12px; }
.faq-list details { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0 22px; }
.faq-list summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center;
  padding: 18px 0; font-family: var(--display); font-weight: 800; font-size: 1.15rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; flex: none; font-size: 1.5rem; color: var(--tile-red); transition: transform 0.2s ease; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { margin: 0 0 20px; color: var(--ink-soft); }

/* Download band */
.download { background: var(--ink); color: #fff; padding: 88px 0; text-align: center; }
.download-inner { display: flex; flex-direction: column; align-items: center; }
.download-icon { width: 96px; height: 96px; border-radius: 24px; margin-bottom: 20px; box-shadow: 0 16px 36px -14px rgba(0, 0, 0, 0.7); }
.download h2 { font-size: clamp(1.9rem, 4vw, 3rem); margin: 0 0 12px; font-weight: 800; max-width: 18em; }
.download p { margin: 0; opacity: 0.85; max-width: 34em; }
.download .store-badge { background: #fff; color: var(--ink); }

/* News & About pages (shared header/footer above) */
.section-title { text-align: center; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin: 0 0 12px; }
.section-subtitle { text-align: center; color: var(--ink-soft); margin: 0 auto 32px; max-width: 620px; }
section { padding: 56px 0; }
.home section.section { padding: 88px 0; }
.home section.hero { padding: 56px 0 64px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.feature-card { background: var(--card); border-radius: var(--radius-md); padding: 26px 22px; }
.feature-card .emoji { font-size: 2rem; margin-bottom: 12px; display: block; }
.feature-card h3 { margin: 0 0 8px; font-size: 1.15rem; font-weight: 800; }
.feature-card p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.page-intro { padding-top: 56px; padding-bottom: 8px; text-align: center; }
.page-intro h1 { font-size: clamp(2rem, 4.4vw, 2.9rem); font-weight: 800; margin: 0 0 12px; }
.page-intro p { color: var(--ink-soft); font-size: 1.05rem; max-width: 640px; margin: 0 auto; }
.news-list { display: grid; gap: 20px; max-width: 760px; }
.news-card { background: #fff; border: 1px solid var(--border); border-left: 6px solid var(--brand-sky); border-radius: var(--radius-md); padding: 24px 26px; }
.news-card:nth-child(3n+2) { border-left-color: #f5b82e; }
.news-card:nth-child(3n) { border-left-color: var(--brand-green); }
.news-card time { font-size: 0.85rem; font-weight: 700; color: var(--brand-blue); }
.news-card h2 { font-size: 1.35rem; font-weight: 800; margin: 4px 0 8px; }
.news-card p { margin: 0; color: var(--ink-soft); }
.button { display: inline-block; background: var(--ink); color: #fff; padding: 12px 26px; border-radius: 999px; font-weight: 700; }
.button:hover { opacity: 0.88; text-decoration: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0 40px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; font-size: 0.88rem; color: var(--ink-soft); }
.footer-brand { font-family: var(--display); font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--ink-soft); font-weight: 600; }

/* Tablet */
@media (max-width: 960px) {
  .site-header .wrap { flex-wrap: wrap; row-gap: 8px; }
  .site-nav { order: 3; flex: 1 1 100%; margin: 0; justify-content: center; }
  .site-nav a { padding: 6px 9px; font-size: 0.86rem; }
  .lang-select { margin-left: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-copy { text-align: center; }
  .hero-copy .lede { margin: 0 auto; }
  .hero-copy .badge-row { justify-content: center; }
  .step-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .games-grid { grid-template-columns: 1fr; }
  .parent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage { padding: 32px; gap: 28px; }
}

/* Phone */
@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .lang-select { font-size: 0.82rem; padding: 7px 30px 7px 12px; background-position: right 11px center; }
  .home section.hero { padding: 32px 0 44px; }
  .home section.section, .download { padding: 60px 0; }
  .section-head { margin-bottom: 32px; }
  .phone--hero { max-width: 240px; }
  .sticker { font-size: 0.78rem; padding: 6px 11px; }
  .peek-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .peek-item:nth-child(2) { transform: translateY(14px); }
  .peek-item .phone { border-radius: 22px; padding: 5px; }
  .peek-item .phone img { border-radius: 18px; }
  .peek-item figcaption { font-size: 0.66rem; letter-spacing: 0.06em; margin-top: 12px; }
  .stage { grid-template-columns: 1fr; padding: 26px 20px; }
  .stage:nth-child(even) .stage-copy { order: 0; }
  .stage-visual .phone { max-width: 200px; }
  .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .story-meta { padding: 12px 12px 14px; }
  .story-meta h3 { font-size: 1rem; }
  .step-grid, .parent-grid, .game-list { grid-template-columns: 1fr; }
  .games-visual .phone { max-width: 170px; }
  .languages-panel { padding: 28px 18px; }
  .page-intro { padding-top: 36px; }
  .news-card { padding: 20px; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .phone--hero { animation: none; }
  .story-card, .store-badge { transition: none; }
}

/* "Coming soon" popup (js/coming-soon.js) for links that are not live yet. */
.coming-soon {
  border: 0; border-radius: var(--radius-lg); padding: 32px 28px 26px;
  width: min(380px, calc(100% - 32px)); text-align: center;
  background: var(--canvas); color: var(--ink);
  box-shadow: 0 24px 60px rgba(42, 33, 24, 0.28);
}
.coming-soon::backdrop { background: rgba(42, 33, 24, 0.45); }
.coming-soon[open] { animation: coming-soon-in 0.18s ease-out; }
@keyframes coming-soon-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) { .coming-soon[open] { animation: none; } }
.coming-soon__badge {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
  background: var(--card);
}
.coming-soon__title { margin: 0 0 8px; font-size: 1.4rem; font-weight: 800; }
.coming-soon__body { margin: 0 0 22px; color: var(--ink-soft); }
.coming-soon__close {
  font: inherit; font-weight: 700; color: #fff; background: var(--brand-blue);
  border: 0; border-radius: 999px; padding: 10px 28px; cursor: pointer; min-width: 120px;
}
.coming-soon__close:hover { background: #18528f; }
.coming-soon__close:focus-visible { outline: 3px solid var(--brand-sky); outline-offset: 2px; }

/* Story reader (js/story-reader.js): the card title is a button whose ::after
   covers the whole card, so the picture is tappable too. */
.story-card { position: relative; }
.story-card:focus-within { outline: 3px solid var(--brand-sky); outline-offset: 2px; }
.story-open {
  font: inherit; color: inherit; text-align: left; background: none; border: 0; padding: 0;
  cursor: pointer;
}
.story-open::after { content: ""; position: absolute; inset: 0; }
.story-open:focus-visible { outline: none; }
.story-reader {
  border: 0; border-radius: var(--radius-lg); padding: 18px 18px 14px;
  width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto;
  background: var(--canvas); color: var(--ink);
  box-shadow: 0 24px 60px rgba(42, 33, 24, 0.28);
}
.story-reader::backdrop { background: rgba(42, 33, 24, 0.6); }
.story-reader[open] { animation: coming-soon-in 0.18s ease-out; }
.story-reader__picture { aspect-ratio: 1; border-radius: var(--radius-md); overflow: hidden; background: var(--card); }
.story-reader__picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
.story-reader__title { margin: 16px 4px 4px; font-size: 1.4rem; font-weight: 800; text-align: center; }
.story-reader__text { margin: 14px 4px 4px; font-size: 1.12rem; line-height: 1.6; min-height: 5.4em; }
.story-reader__nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.story-reader__counter { color: var(--ink-soft); font-weight: 700; font-variant-numeric: tabular-nums; }
.story-reader__turn, .story-reader__close {
  font: inherit; font-size: 1.8rem; line-height: 1; color: #fff; background: var(--brand-blue);
  border: 0; border-radius: 50%; width: 48px; height: 48px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.story-reader__turn:hover:not(:disabled), .story-reader__close:hover { background: #18528f; }
.story-reader__turn:disabled { background: var(--border); color: var(--ink-soft); cursor: default; }
.story-reader__turn:focus-visible, .story-reader__close:focus-visible { outline: 3px solid var(--brand-sky); outline-offset: 2px; }
.story-reader__close {
  position: absolute; top: 26px; right: 26px; z-index: 1; width: 40px; height: 40px; font-size: 1.5rem;
  background: rgba(42, 33, 24, 0.55);
}
@media (max-width: 640px) {
  .story-reader { padding: 12px 12px 10px; width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .story-reader__close { top: 20px; right: 20px; }
  .story-reader__text { font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) { .story-reader[open] { animation: none; } }

/* Card autoplay (js/story-cards-play.js): the story's pages over the cover. */
.story-card.is-playing { box-shadow: 0 22px 40px -24px rgba(42, 33, 24, 0.45); border-color: var(--brand-sky); }
.story-card__play { position: absolute; top: 0; left: 0; right: 0; aspect-ratio: 1; overflow: hidden; background: var(--card); }
.story-card__play img { display: block; width: 100%; height: 100%; object-fit: cover; }
.story-card__play img.is-new { animation: story-page-in 0.45s ease-out; }
@keyframes story-page-in { from { opacity: 0; } }
.story-card__progress { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.55); overflow: hidden; }
.story-card__progress span { display: block; height: 100%; width: 0; background: var(--brand-blue); border-radius: inherit; transition: width 0.4s ease; }
.story-reader__mid { display: inline-flex; align-items: center; gap: 12px; }
.story-reader__sound {
  font-size: 1.2rem; line-height: 1; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--border); background: #fff;
}
.story-reader__sound:hover { border-color: var(--brand-sky); }
.story-reader__sound:focus-visible { outline: 3px solid var(--brand-sky); outline-offset: 2px; }

/* "▶ Listen" badge on each story card (js/story-cards-play.js). */
.story-card__listen {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 6px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.94); color: var(--ink); font-weight: 800; font-size: 0.92rem;
  box-shadow: 0 6px 16px -6px rgba(42, 33, 24, 0.45); pointer-events: none;
  transition: transform 0.2s ease;
}
.story-card__listen-icon {
  width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--tile-red); color: #fff; font-size: 0.8rem; padding-left: 2px;
}
.story-card:hover .story-card__listen, .story-card:focus-within .story-card__listen { transform: scale(1.06); }
@media (max-width: 640px) {
  .story-card__listen { top: 8px; left: 8px; padding: 4px 10px 4px 4px; font-size: 0.8rem; gap: 6px; }
  .story-card__listen-icon { width: 24px; height: 24px; font-size: 0.7rem; }
}

/* Reader: story progress, and the word being read (js/story-read-along.js). */
.story-reader__progress { height: 6px; margin: 12px 4px 0; border-radius: 999px; background: var(--border); overflow: hidden; }
.story-reader__progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--brand-blue); }
.read-word { border-radius: 6px; transition: background-color 0.12s ease, color 0.12s ease; }
.read-word.is-reading { background: var(--tile-yellow); color: var(--ink); box-shadow: 0 0 0 3px var(--tile-yellow); }
