/* Wondora
   Layout: one soft column on phones that opens into gentle two and three
   column rows on tablets and computers. Chunky rounded shapes, Vanilla ground. */

@font-face { font-family: 'Fredoka'; src: url('../fonts/fredoka.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('../fonts/nunito.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('../fonts/nunito-italic.woff2') format('woff2'); font-weight: 200 1000; font-style: italic; font-display: swap; }
@font-face { font-family: 'Andika'; src: url('../fonts/andika-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Andika'; src: url('../fonts/andika-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --bubblegum: #F7A8C1;
  --pistachio: #C6DB8C;
  --honey: #FFD166;
  --apricot: #F9B482;
  --vanilla: #FFF8EE;
  --cocoa: #4A3024;
  --berry: #B83D6A;
  --berry-deep: #9A2F57;
  --cocoa-soft: #6E5446;      /* secondary text, 7:1 on vanilla */
  --cream: #FFF1DE;
  --bubblegum-wash: #FDE4EC;
  --pistachio-wash: #EEF4D8;
  --honey-wash: #FFF0C7;
  --apricot-wash: #FDE6D3;
  --line: #EADBC8;
  --focus: #4A3024;

  --font-head: 'Fredoka', 'Nunito', ui-rounded, 'Arial Rounded MT Bold', system-ui, sans-serif;
  --font-body: 'Nunito', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-book: 'Andika', 'Nunito', system-ui, sans-serif;

  --r-s: 14px; --r-m: 22px; --r-l: 32px; --r-xl: 44px;
  --shadow: 0 6px 0 rgba(74, 48, 36, .08), 0 14px 30px rgba(74, 48, 36, .08);
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --wrap: 1120px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
body { margin: 0; background: var(--vanilla); color: var(--cocoa); font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.65rem, 4.2vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.6vw, 1.45rem); }
p { margin: 0; }
a { color: var(--berry); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--berry-deep); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
.wd-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wd-skip { position: absolute; left: 12px; top: -60px; background: var(--cocoa); color: var(--vanilla); padding: 10px 16px; border-radius: 12px; z-index: 100; font-weight: 700; }
.wd-skip:focus { top: calc(env(safe-area-inset-top, 0px) + 10px); color: var(--vanilla); }

.wd-wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.wd-narrow { max-width: 760px; }

/* Buttons */
.wd-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 52px; padding: 12px 24px; border-radius: 999px; border: 0; background: var(--berry); color: #fff; font-family: var(--font-head); font-weight: 600; font-size: 1.08rem; text-decoration: none; cursor: pointer; box-shadow: 0 4px 0 var(--berry-deep); transition: transform .15s ease, box-shadow .15s ease; -webkit-tap-highlight-color: transparent; }
.wd-btn:hover { color: #fff; background: var(--berry-deep); }
.wd-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--berry-deep); }
.wd-btn--soft { background: #fff; color: var(--berry); box-shadow: 0 4px 0 var(--line); border: 2px solid var(--line); }
.wd-btn--soft:hover { background: var(--bubblegum-wash); color: var(--berry-deep); }
.wd-btn--small { min-height: 44px; padding: 8px 18px; font-size: 1rem; }
.wd-btn svg { width: 1.2em; height: 1.2em; }
.wd-btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--vanilla); }
.wd-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(255, 248, 238, .96); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 2px solid var(--line); }
.wd-header__in { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.wd-header__logo { display: inline-flex; padding: 4px 0; flex: 0 0 auto; }
.wd-header__logo .wd-logo { height: 40px; width: auto; display: block; }
.wd-nav { margin-left: auto; }
.wd-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.wd-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 12px; border-radius: 999px; color: var(--cocoa); text-decoration: none; font-weight: 700; font-size: .98rem; }
.wd-nav a:hover { background: var(--bubblegum-wash); }
.wd-nav a[aria-current="page"] { background: var(--honey-wash); box-shadow: inset 0 0 0 2px var(--honey); }
.wd-header__cta { flex: 0 0 auto; }
.wd-menu-btn { display: none; margin-left: auto; min-width: 48px; min-height: 48px; border-radius: 16px; border: 2px solid var(--line); background: #fff; color: var(--cocoa); font: 700 1rem var(--font-head); cursor: pointer; padding: 0 12px; gap: 8px; align-items: center; }
.wd-menu-btn svg { width: 22px; height: 22px; }
@media (max-width: 1020px) {
  .wd-menu-btn { display: inline-flex; }
  .wd-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--vanilla); border-bottom: 2px solid var(--line); padding: 8px var(--gutter-r) 18px var(--gutter); margin: 0; box-shadow: 0 20px 30px rgba(74,48,36,.08); }
  .wd-nav.is-open { display: block; }
  .wd-nav ul { flex-direction: column; gap: 4px; }
  .wd-nav a { width: 100%; font-size: 1.1rem; padding: 10px 16px; }
  .wd-header__cta { order: 3; }
  .wd-menu-btn { order: 2; }
}
@media (max-width: 520px) {
  .wd-header__cta .wd-btn { padding: 8px 14px; font-size: .95rem; min-height: 44px; }
  .wd-header__logo .wd-logo { height: 32px; }
  .wd-menu-btn .wd-menu-word { display: none; }
}
@media (max-width: 360px) { .wd-header__cta .wd-btn { padding: 8px 10px; font-size: .88rem; } }

/* Sections */
main { display: block; }
.wd-section { padding-block: clamp(48px, 8vw, 96px); }
.wd-section--tint { background: var(--cream); }
.wd-section--pink { background: var(--bubblegum-wash); }
.wd-section--green { background: var(--pistachio-wash); }
.wd-section--honey { background: var(--honey-wash); }
.wd-section__head { display: grid; gap: 12px; max-width: 720px; margin-bottom: clamp(24px, 4vw, 40px); }
.wd-section__head p { font-size: 1.15rem; color: var(--cocoa-soft); }
.wd-eyebrow { font-family: var(--font-head); font-weight: 600; color: var(--berry); font-size: 1rem; letter-spacing: .02em; }
.wd-lead { font-size: clamp(1.1rem, 2.4vw, 1.3rem); color: var(--cocoa-soft); max-width: 40em; }
.wd-prose { display: grid; gap: 1em; max-width: 42em; }
.wd-prose h2 { margin-top: .6em; }
.wd-prose h3 { margin-top: .4em; }
.wd-prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: .4em; }

/* Wavy divider between bands */
.wd-wave { display: block; width: 100%; height: 36px; }

/* Hero */
.wd-hero { padding-block: clamp(28px, 6vw, 72px) clamp(40px, 7vw, 88px); }
.wd-hero__grid { display: grid; gap: clamp(24px, 5vw, 56px); align-items: center; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.wd-hero__text { display: grid; gap: 20px; min-width: 0; }
.wd-hero__logo .wd-logo { height: clamp(56px, 10vw, 84px); width: auto; }
.wd-hero__line { font-family: var(--font-head); font-weight: 500; color: var(--berry); font-size: 1.15rem; }
.wd-hero__pic { border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow); background: var(--bubblegum-wash); }
.wd-hero__pic svg { display: block; width: 100%; height: auto; }
.wd-reassure { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 0; margin: 0; list-style: none; color: var(--cocoa-soft); font-weight: 700; font-size: .98rem; }
.wd-reassure li { display: inline-flex; align-items: center; gap: 6px; }
.wd-reassure li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--pistachio); box-shadow: 0 0 0 3px var(--pistachio-wash); }
@media (max-width: 820px) { .wd-hero__grid { grid-template-columns: 1fr; } .wd-hero__pic { order: -1; } }

/* Cards and grids */
.wd-grid { display: grid; gap: clamp(16px, 2.5vw, 24px); }
.wd-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wd-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wd-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .wd-grid--3, .wd-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .wd-grid--3, .wd-grid--2, .wd-grid--4 { grid-template-columns: 1fr; } }
.wd-card { background: #fff; border-radius: var(--r-l); padding: clamp(20px, 3vw, 28px); border: 2px solid var(--line); display: grid; gap: 10px; align-content: start; min-width: 0; }
.wd-card p { color: var(--cocoa-soft); }
.wd-card--pink { background: var(--bubblegum-wash); border-color: #F8CDDB; }
.wd-card--green { background: var(--pistachio-wash); border-color: #DCE8B8; }
.wd-card--honey { background: var(--honey-wash); border-color: #FBE3A0; }
.wd-card--apricot { background: var(--apricot-wash); border-color: #F8D2B4; }
.wd-step-pic { width: 88px; height: 88px; }

/* Stages */
.wd-stage { text-align: center; justify-items: center; }
.wd-stage-bunny { width: 150px; height: 160px; }
.wd-stage__age { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; background: #fff; border-radius: 999px; padding: 4px 16px; border: 2px solid var(--line); }
.wd-stage ul { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.wd-stage li { background: rgba(255,255,255,.7); border-radius: 999px; padding: 3px 12px; font-size: .95rem; font-weight: 700; color: var(--cocoa-soft); }
.wd-note { font-size: .98rem; color: var(--cocoa-soft); background: #fff; border-radius: var(--r-m); padding: 14px 18px; border: 2px dashed var(--line); }

/* Categories */
.wd-cat { grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 4px 16px; }
.wd-cat-pic { width: 72px; height: 72px; grid-row: span 3; border-radius: 22px; }
.wd-cat h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wd-soon { display: inline-block; font: 700 .78rem var(--font-body); letter-spacing: .04em; text-transform: uppercase; background: var(--cocoa); color: var(--vanilla); border-radius: 999px; padding: 3px 10px; }
.wd-cat p { font-size: .98rem; }

/* Free book feature */
.wd-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: center; background: #fff; border-radius: var(--r-xl); padding: clamp(16px, 3vw, 32px); border: 2px solid var(--line); }
.wd-feature__cover { border-radius: var(--r-l); overflow: hidden; aspect-ratio: 4 / 3; position: relative; background: var(--bubblegum-wash); }
.wd-feature__cover svg { width: 100%; height: 100%; display: block; }
.wd-feature__text { display: grid; gap: 14px; min-width: 0; }
.wd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wd-chip { background: var(--honey-wash); border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: .92rem; }
.wd-chip--pink { background: var(--bubblegum-wash); }
.wd-chip--green { background: var(--pistachio-wash); }
@media (max-width: 760px) { .wd-feature { grid-template-columns: 1fr; } }

/* Differences list */
.wd-diff { grid-template-columns: 52px minmax(0, 1fr); align-items: start; gap: 6px 14px; }
.wd-diff__dot { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; grid-row: span 2; font-family: var(--font-head); font-weight: 600; font-size: 1.3rem; }
.wd-diff__dot svg { width: 28px; height: 28px; }

/* Call to action band */
.wd-cta { background: var(--honey-wash); border-radius: var(--r-xl); padding: clamp(28px, 5vw, 56px); display: grid; gap: 18px; justify-items: start; position: relative; overflow: hidden; }
.wd-cta__bunny { position: absolute; right: clamp(8px, 4vw, 48px); bottom: -10px; width: clamp(90px, 18vw, 170px); height: auto; }
.wd-cta > *:not(.wd-cta__bunny) { position: relative; max-width: min(36em, 72%); }
@media (max-width: 560px) { .wd-cta > *:not(.wd-cta__bunny) { max-width: 100%; } .wd-cta__bunny { position: static; justify-self: end; margin-top: -10px; } }

/* Page intro */
.wd-intro { padding-block: clamp(36px, 7vw, 80px) clamp(20px, 4vw, 40px); display: grid; gap: 16px; }

/* Lists of steps on How it works */
.wd-steps { display: grid; gap: 16px; counter-reset: s; }
.wd-steps li { list-style: none; }
.wd-move { display: grid; grid-template-columns: 96px minmax(0,1fr); gap: 8px 18px; align-items: center; }
.wd-move .wd-step-pic { grid-row: span 2; width: 96px; height: 96px; background: #fff; border-radius: 26px; padding: 6px; }

/* Placeholder boxes on About */
.wd-placeholder { border: 3px dashed var(--berry); border-radius: var(--r-l); background: #fff; padding: 20px 22px; display: grid; gap: 8px; }
.wd-placeholder__tag { font: 700 .8rem var(--font-body); text-transform: uppercase; letter-spacing: .06em; color: var(--berry); }
.wd-placeholder p { color: var(--cocoa-soft); }

/* Screen time */
.wd-guide { display: grid; gap: 12px; }
.wd-guide dl { margin: 0; display: grid; gap: 10px; }
.wd-guide dt { font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; }
.wd-guide dd { margin: 0 0 6px; color: var(--cocoa-soft); }
.wd-sources { display: grid; gap: 8px; padding-left: 1.2em; margin: 0; }
.wd-five { counter-reset: c; display: grid; gap: 12px; padding: 0; margin: 0; }
.wd-five li { list-style: none; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 2px 14px; align-items: start; }
.wd-five li b { grid-row: span 2; width: 44px; height: 44px; border-radius: 14px; background: var(--bubblegum-wash); display: grid; place-items: center; font-family: var(--font-head); font-size: 1.25rem; }

/* Privacy */
.wd-privacy-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.wd-privacy-list li { background: #fff; border: 2px solid var(--line); border-radius: var(--r-m); padding: 16px 18px; display: grid; gap: 4px; }
.wd-privacy-list strong { font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; }
.wd-status { min-height: 1.6em; font-weight: 700; color: var(--cocoa); }

/* Library */
.wd-playroom { position: relative; background: linear-gradient(#FDE9DF 0 72%, #EBCDB5 72% 100%); border-radius: var(--r-xl); padding: clamp(12px, 3vw, 32px) clamp(10px, 3vw, 32px) clamp(28px, 5vw, 56px); overflow: hidden; }
.wd-playroom::before { content: ""; position: absolute; inset: auto 0 0; height: 28%; background: repeating-linear-gradient(90deg, rgba(74,48,36,.05) 0 2px, transparent 2px 90px); pointer-events: none; }
.wd-bunting { display: block; width: min(100%, 640px); height: auto; margin: 0 auto 4px; }
.wd-shelf { position: relative; background: #C99C76; border-radius: 28px; padding: clamp(10px, 2vw, 18px); box-shadow: inset 0 0 0 6px #B78A64, 0 10px 0 #A87C58, 0 20px 30px rgba(74,48,36,.15); max-width: 980px; margin: 0 auto; }
.wd-shelf::before { content: ""; position: absolute; left: 6%; right: 6%; top: -14px; height: 18px; background: #B78A64; border-radius: 12px 12px 0 0; }
.wd-cubbies { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(8px, 1.6vw, 14px); }
.wd-cubby { flex: 0 0 calc((100% - 2 * clamp(8px, 1.6vw, 14px)) / 3); background: #8E6447; border-radius: 18px; padding: clamp(8px, 1.4vw, 12px) clamp(8px, 1.4vw, 12px) 0; box-shadow: inset 0 6px 10px rgba(0,0,0,.25), inset 0 -8px 0 #A97B5A; min-width: 0; }
@media (min-width: 640px) { .wd-cubby { flex-basis: calc((100% - 3 * clamp(8px, 1.6vw, 14px)) / 4); } }
@media (min-width: 900px) { .wd-cubby { flex-basis: calc((100% - 5 * clamp(8px, 1.6vw, 14px)) / 6); } }
.wd-book-btn { display: block; width: 100%; border: 0; padding: 0; margin: 0; background: none; cursor: pointer; text-align: left; border-radius: 12px 12px 6px 6px; position: relative; color: var(--cocoa); font: inherit; -webkit-tap-highlight-color: transparent; text-decoration: none; transform-origin: bottom center; transition: transform .2s ease; }
.wd-book-btn:hover { transform: translateY(-3px); color: var(--cocoa); }
.wd-book-btn:focus-visible { outline: 4px solid var(--honey); outline-offset: 2px; }
.wd-book-cover { position: relative; display: block; aspect-ratio: 200 / 260; border-radius: 10px 12px 4px 4px; overflow: hidden; background: var(--cream); box-shadow: inset 6px 0 0 rgba(74,48,36,.18), 0 3px 0 rgba(0,0,0,.18); }
.wd-book-cover svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wd-book-cover .wd-scene { height: 100%; width: auto; left: 50%; transform: translateX(-50%); max-width: none; }
.wd-book-title { position: absolute; left: 6px; right: 6px; top: 6px; background: rgba(255, 248, 238, .94); border-radius: 8px; padding: 4px 6px; font-family: var(--font-head); font-weight: 600; font-size: clamp(.7rem, 1.6vw, .9rem); line-height: 1.15; text-align: center; }
.wd-book-flag { position: absolute; left: 6px; bottom: 8px; font: 800 .62rem var(--font-body); letter-spacing: .05em; text-transform: uppercase; background: var(--cocoa); color: var(--vanilla); border-radius: 999px; padding: 2px 7px; }
.wd-book-flag--free { background: var(--berry); color: #fff; }
.wd-toys { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; max-width: 980px; margin: 18px auto 0; position: relative; }
.wd-toy { width: clamp(56px, 12vw, 110px); height: auto; }
.wd-library-note { text-align: center; margin-top: 22px; color: var(--cocoa-soft); font-weight: 700; }

/* Dialog (coming soon summary, gate) */
.wd-dialog { border: 0; padding: 0; border-radius: var(--r-l); max-width: min(460px, calc(100vw - 32px)); width: 100%; background: var(--vanilla); color: var(--cocoa); box-shadow: 0 30px 60px rgba(74,48,36,.3); }
.wd-dialog::backdrop { background: rgba(74, 48, 36, .45); }
.wd-dialog__in { padding: 24px; display: grid; gap: 14px; }
.wd-dialog__cover { width: 120px; border-radius: 12px; overflow: hidden; aspect-ratio: 200/260; }
.wd-dialog__cover svg { width: 100%; height: 100%; display: block; }
.wd-dialog__top { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 400px) { .wd-dialog__top { grid-template-columns: 1fr; } }

/* Footer */
.wd-footer { background: var(--cocoa); color: var(--vanilla); padding-block: 48px calc(32px + env(safe-area-inset-bottom, 0px)); margin-top: 0; }
.wd-footer a { color: var(--vanilla); }
.wd-footer a:hover { color: var(--honey); }
.wd-footer__grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr)); }
.wd-footer__brand { display: grid; gap: 10px; align-content: start; }
.wd-footer__badge { background: var(--vanilla); border-radius: 22px; padding: 10px 16px; display: inline-flex; justify-self: start; }
.wd-footer__badge .wd-logo { height: 36px; width: auto; }
.wd-footer h2 { font-size: 1.1rem; margin-bottom: 8px; color: var(--honey); }
.wd-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wd-footer li a { display: inline-block; padding: 6px 0; }
.wd-footer__legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255,248,238,.2); font-size: .95rem; opacity: .9; }
@media (max-width: 720px) { .wd-footer__grid { grid-template-columns: 1fr 1fr; } .wd-footer__brand { grid-column: 1 / -1; } }

/* 404 */
.wd-lost { text-align: center; display: grid; justify-items: center; gap: 16px; padding-block: clamp(48px, 10vw, 120px); }
.wd-lost svg.wd-stage-bunny { width: 180px; height: 190px; }

/* ===================== Reader ===================== */
.wd-reader-open { overflow: hidden; }
.wd-reader-open .wd-site { display: none; }
.wd-reader { position: fixed; inset: 0; z-index: 50; background: #F6ECDD; display: grid; grid-template-rows: auto minmax(0, 1fr); padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); color: var(--cocoa); overscroll-behavior: contain; }
.wd-reader__bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; min-height: 60px; }
.wd-reader__title { font-family: var(--font-head); font-weight: 600; font-size: 1rem; flex: 1; min-width: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-reader__title:focus { outline: none; }
.wd-reader__count { font-weight: 700; font-size: .9rem; color: var(--cocoa-soft); }
.wd-icon-btn { min-width: 48px; min-height: 48px; border-radius: 16px; border: 2px solid var(--line); background: #fff; color: var(--cocoa); display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; font: 700 .95rem var(--font-head); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.wd-icon-btn svg { width: 24px; height: 24px; }
.wd-icon-btn[aria-pressed="false"] { color: var(--cocoa-soft); }

.wd-reader__body { position: relative; display: grid; grid-template-columns: var(--zone) minmax(0, 1fr) var(--zone); min-height: 0; --zone: 52px; }
@media (min-width: 700px) { .wd-reader__body { --zone: 76px; } }
.wd-zone { border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--cocoa); padding: 0; height: 100%; -webkit-tap-highlight-color: transparent; border-radius: 0; }
.wd-zone span { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.8); display: grid; place-items: center; border: 2px solid var(--line); }
.wd-zone svg { width: 24px; height: 24px; }
.wd-zone:disabled { cursor: default; }
.wd-zone:disabled span { opacity: .25; }
.wd-zone:focus-visible { outline-offset: -6px; }
.wd-stage-area { position: relative; min-width: 0; min-height: 0; overflow: hidden; touch-action: pan-y; }
.wd-track { position: absolute; inset: 0; display: flex; will-change: transform; }
.wd-spread { flex: 0 0 100%; height: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; padding: 4px 0 12px; }
.wd-spread--two { gap: 0; }
.wd-spread--two .wd-page:first-child { border-radius: 26px 6px 6px 26px; box-shadow: inset -14px 0 18px -14px rgba(74,48,36,.25), var(--shadow); }
.wd-spread--two .wd-page:last-child { border-radius: 6px 26px 26px 6px; box-shadow: inset 14px 0 18px -14px rgba(74,48,36,.25), var(--shadow); }
.wd-page { background: var(--vanilla); border-radius: 26px; box-shadow: var(--shadow); overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 12px; padding: 12px; min-width: 0; min-height: 0; -webkit-overflow-scrolling: touch; }
.wd-page:focus { outline: none; }
.wd-pic-wrap { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; flex: 0 0 auto; background: var(--cream); touch-action: pan-y; }
.wd-pic-wrap .wd-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wd-words { font-family: var(--font-book); font-size: clamp(1.2rem, 4.4vw, 1.6rem); line-height: 1.45; padding: 4px 6px 0; }
.wd-words--long { font-size: clamp(1.08rem, 3.6vw, 1.35rem); }
.wd-tip { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; background: #fff; border-radius: 18px; padding: 12px 14px; border: 2px solid var(--line); font-size: .98rem; margin-top: auto; }
.wd-tip__label { font: 700 .72rem var(--font-body); text-transform: uppercase; letter-spacing: .06em; color: var(--berry); grid-column: 1 / -1; }
.wd-tip p { grid-column: 1 / -1; color: var(--cocoa); }
.wd-tip__more { grid-column: 1 / -1; justify-self: start; background: none; border: 0; color: var(--berry); font: 700 .92rem var(--font-body); padding: 6px 0; min-height: 32px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.wd-tips-off .wd-tip { display: none; }

/* Slide: groove, arrows and the big tab with a finger hole */
.wd-picbox { display: flex; flex-direction: column; flex: 0 0 auto; min-width: 0; }
.wd-slide { position: relative; height: 72px; margin: 4px 40px 0; }
.wd-groove { position: absolute; left: -12px; right: -12px; top: 14px; height: 44px; border-radius: 999px; background: rgba(74, 48, 36, .58); box-shadow: inset 0 4px 8px rgba(0,0,0,.35), 0 0 0 3px rgba(255,248,238,.9); cursor: pointer; }
.wd-groove__arrows { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-evenly; padding: 0 30px; pointer-events: none; }
.wd-groove__arrows svg { width: 16px; height: 16px; fill: rgba(255,248,238,.9); }
.wd-groove { background: #8A6A58; box-shadow: inset 0 4px 8px rgba(0,0,0,.35), 0 0 0 3px #fff, 0 0 0 5px var(--line); }
.wd-tab { position: absolute; top: 2px; left: 0; width: 68px; height: 68px; margin-left: -34px; border-radius: 22px; background: var(--berry); border: 4px solid #fff; box-shadow: 0 5px 0 var(--berry-deep), 0 8px 16px rgba(0,0,0,.25); cursor: grab; touch-action: none; display: grid; place-items: center; -webkit-tap-highlight-color: transparent; }
.wd-tab::after { content: ""; width: 28px; height: 28px; border-radius: 50%; background: #F6ECDD; box-shadow: inset 0 4px 6px rgba(0,0,0,.35); }
.wd-tab:active { cursor: grabbing; }
.wd-tab:focus-visible, .wd-wheel:focus-visible, .wd-spot:focus-visible { outline: 4px solid var(--honey); outline-offset: 3px; }
.wd-animate .wd-tab { transition: left .35s ease; }
@media (max-width: 420px) { .wd-slide { height: 64px; margin: 2px 34px 0; } .wd-tab { width: 60px; height: 60px; margin-left: -30px; top: 2px; border-radius: 20px; } .wd-tab::after { width: 24px; height: 24px; } .wd-groove { height: 38px; top: 13px; } .wd-wheel__knob { width: 42px; height: 42px; margin: -17px 0 0 -21px; } .wd-wheel__ring { border-width: 7px; } }

/* Wheel */
.wd-wheel { position: absolute; left: var(--wx); top: var(--wy); width: var(--ws); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; touch-action: none; cursor: grab; -webkit-tap-highlight-color: transparent; }
.wd-wheel__ring { position: absolute; inset: 0; border-radius: 50%; border: 10px solid rgba(255, 248, 238, .85); box-shadow: 0 0 0 3px rgba(74,48,36,.5), inset 0 0 0 3px rgba(74,48,36,.5); }
.wd-wheel__spin { position: absolute; inset: 0; }
.wd-wheel__knob { position: absolute; left: 50%; top: 0; width: 52px; height: 52px; margin: -21px 0 0 -26px; border-radius: 50%; background: var(--berry); border: 4px solid #fff; box-shadow: 0 4px 0 var(--berry-deep), 0 6px 12px rgba(0,0,0,.25); display: grid; place-items: center; }
.wd-wheel__knob::after { content: ""; width: 20px; height: 20px; border-radius: 50%; background: #F6ECDD; box-shadow: inset 0 3px 5px rgba(0,0,0,.35); }
.wd-wheel__arrows { position: absolute; inset: 0; pointer-events: none; }

/* Sound spot */
.wd-spot { position: absolute; left: var(--sx); top: var(--sy); width: var(--ss); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 5px solid #fff; background: rgba(255, 209, 102, .22); box-shadow: 0 0 0 3px rgba(74,48,36,.55), inset 0 0 0 3px rgba(74,48,36,.25); cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; display: grid; place-items: end center; }
.wd-spot__icon { width: 30px; height: 30px; border-radius: 50%; background: #fff; display: grid; place-items: center; margin-bottom: -14px; box-shadow: 0 0 0 3px rgba(74,48,36,.55); }
.wd-spot__icon svg { width: 18px; height: 18px; }
.wd-spot:active { background: rgba(255, 209, 102, .45); }

/* Talk together + credits pages */
.wd-talk { display: grid; gap: 14px; padding: 6px; }
.wd-talk h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
.wd-talk ol { margin: 0; padding-left: 1.3em; display: grid; gap: 10px; font-family: var(--font-book); font-size: clamp(1.1rem, 3.6vw, 1.35rem); }
.wd-credits { flex: 1; display: grid; place-content: center; justify-items: center; text-align: center; gap: 14px; padding: 20px 10px; background: var(--vanilla); }
.wd-credits .wd-logo { width: min(260px, 80%); height: auto; }
.wd-credits p { font-size: 1.1rem; }
.wd-credits__end { display: grid; gap: 10px; justify-items: center; margin-top: 12px; }

/* Grown-ups menu */
.wd-menu { position: fixed; inset: 0; z-index: 60; background: rgba(74, 48, 36, .45); display: grid; align-items: end; justify-items: center; padding: 12px; padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)); }
.wd-menu[hidden] { display: none; }
.wd-menu__panel { background: var(--vanilla); border-radius: 30px; width: min(480px, 100%); max-height: calc(100% - 20px); overflow-y: auto; padding: 22px; display: grid; gap: 14px; box-shadow: 0 30px 60px rgba(0,0,0,.25); }
@media (min-height: 600px) and (min-width: 700px) { .wd-menu { align-items: center; } }
.wd-menu__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wd-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 10px 14px; min-height: 60px; font-weight: 700; cursor: pointer; width: 100%; font: 700 1rem var(--font-body); color: var(--cocoa); text-align: left; }
.wd-toggle__sw { width: 54px; height: 32px; border-radius: 999px; background: #D9CBBB; position: relative; flex: 0 0 auto; transition: background .2s; }
.wd-toggle__sw::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 2px 4px rgba(0,0,0,.2); }
.wd-toggle[aria-checked="true"] .wd-toggle__sw { background: var(--berry); }
.wd-toggle[aria-checked="true"] .wd-toggle__sw::after { transform: translateX(22px); }
.wd-toggle small { display: block; font-weight: 600; color: var(--cocoa-soft); font-size: .85rem; }
.wd-menu__actions { display: grid; gap: 10px; }
.wd-menu__actions .wd-btn { width: 100%; }

/* Hold-to-leave gate */
.wd-hold { position: relative; overflow: hidden; width: 100%; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; }
.wd-hold__fill { position: absolute; inset: 0; background: rgba(255,255,255,.28); transform-origin: left center; transform: scaleX(var(--hold, 0)); pointer-events: none; }
.wd-hold__label { position: relative; }
.wd-hold-hint { font-size: .9rem; color: var(--cocoa-soft); text-align: center; }

/* Phone held sideways: picture beside the words */
@media (orientation: landscape) and (max-height: 560px) {
  .wd-reader__bar { min-height: 48px; padding: 4px 10px; }
  .wd-reader__body { --zone: 64px; }
  .wd-spread:not(.wd-spread--two) .wd-page { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-rows: minmax(0, auto) minmax(0, 1fr); align-items: start; height: 100%; column-gap: 14px; }
  .wd-spread:not(.wd-spread--two) .wd-picbox { grid-row: 1 / 3; height: 100%; min-height: 0; position: sticky; top: 0; }
  .wd-spread:not(.wd-spread--two) .wd-pic-wrap { aspect-ratio: auto; flex: 1 1 auto; min-height: 0; }
  .wd-spread:not(.wd-spread--two) .wd-tip { margin-top: 0; }
  .wd-spread:not(.wd-spread--two) .wd-words { font-size: 1.15rem; }
  .wd-spread:not(.wd-spread--two) .wd-credits, .wd-spread:not(.wd-spread--two) .wd-talk { grid-column: 1 / -1; }
}
/* Two pages side by side: keep each page compact */
.wd-spread--two .wd-words { font-size: clamp(1.05rem, 1.7vw, 1.4rem); }
.wd-spread--two .wd-tip { font-size: .92rem; }
