@font-face {
  font-family: Nunito;
  src: url('fonts/nunito-cyrillic.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Nunito;
  src: url('fonts/nunito-latin.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2190-2199, U+2212, U+FFFD;
}

:root { font: 1rem/1.5 Nunito, 'Segoe UI', system-ui, sans-serif; }
*, *::before, *::after { box-sizing: border-box; }
body {
  --ink: #251a43;
  --muted: #554a6e;
  --page: #f1edff;
  --paper: #fff;
  --line: #e3d8fc;
  --action: #522596;
  --night: #21134f;
  --accent: #ffdc80;
  --radius: 24px;
  --shadow: 0 6px 22px #331c5012;
  --gutter: clamp(15px, 5vw, 36px);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  overflow-wrap: anywhere;
}
main { flex: 1; }
.shell { width: min(100% - 2 * var(--gutter), 68rem); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; inline-size: 1px; block-size: 1px; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip:focus { position: absolute; z-index: 5; inset: 8px auto auto 8px; padding: 10px 14px; color: #fff; background: #29204a; border-radius: 8px; }
:where(a, button, summary, select, input):focus-visible { outline: 3px solid #2377b5; outline-offset: 3px; }
:where(.site-header, .world-hero, .site-footer, .page-heading):focus-within :focus-visible { outline-color: #75bafa; }
.menu-panel :focus-visible { outline-color: #235a9e; }
a { color: inherit; text-underline-offset: .18em; }
button, select, input { font: inherit; min-width: 0; }
button, summary { cursor: pointer; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
img { display: block; max-width: 100%; }
svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.icon-library { position: absolute; inline-size: 0; block-size: 0; overflow: hidden; }
ul { list-style: none; margin: 0; padding: 0; }
li, label { min-width: 0; }
h1, h2, p, figure, dl, dd { margin: 0; }
h1 { font-size: clamp(2rem, 8.8vw, 3.2rem); line-height: 1.02; letter-spacing: -.042em; font-weight: 900; text-wrap: balance; }
h2 { font-size: clamp(1.3rem, 4.8vw, 1.8rem); line-height: 1.2; letter-spacing: -.025em; font-weight: 900; }
h3 { margin: 0; }

.site-header { background: var(--night); color: #fff; z-index: 2; }
.header-row { display: flex; justify-content: space-between; align-items: center; min-height: 60px; position: relative; gap: 6px; }
.brand { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; font-size: clamp(1.17rem, 5.3vw, 1.45rem); font-weight: 900; text-decoration: none; letter-spacing: -.036em; }
.brand img { object-fit: contain; }
.desktop-nav, .desktop-wide, .hero-desktop-only,
.wide-collection-previews, .wide-collection-action { display: none; }
.header-tools { display: flex; gap: 5px; flex: none; }
.header-search, .site-menu > summary { display: flex; min-width: 44px; min-height: 44px; justify-content: center; align-items: center; border-radius: 13px; border: 1px solid #ffffff31; text-decoration: none; }
.site-menu > summary { padding-inline: 8px; gap: 5px; font-weight: 800; font-size: .85rem; }
.site-menu[open] > summary, .header-search:hover { background: #ffffff22; }
.menu-panel { width: min(100%, 20rem); position: absolute; inset: calc(100% - 3px) 0 auto auto; display: grid; gap: 3px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); border-radius: 18px; padding: 8px; box-shadow: 0 14px 40px #10062245; }
.menu-panel { max-height: min(75vh, 25rem); overflow: auto; }
.menu-panel:has(.task-menu[open]) { max-height: calc(100dvh - 72px); }
.menu-panel a { display: flex; align-items: center; min-height: 44px; padding: 7px 10px; font-weight: 800; text-decoration: none; border-radius: 10px; }
.menu-panel a:hover { background: var(--page); }
.task-menu > summary { display: flex; align-items: center; min-height: 44px; gap: 8px; font-weight: 800; }
.task-menu-chevron { width: .47em; height: .47em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-.12em) rotate(45deg); }
.task-menu[open] > summary .task-menu-chevron { transform: translateY(.12em) rotate(225deg); }
.menu-panel .task-menu > summary { justify-content: space-between; padding: 7px 12px 7px 10px; border-radius: 10px; }
.menu-panel .task-menu > summary:is(:hover, .task-menu-current), .menu-panel .task-menu[open] > summary { background: var(--page); }
.menu-panel .task-menu[open] > summary { position: sticky; top: 0; z-index: 1; }
.menu-panel .task-menu-links { margin: 3px 3px 6px 12px; padding-inline-start: 7px; border-inline-start: 2px solid var(--line); }
.task-menu-links [aria-current] { font-weight: 900; }
.site-footer { color: #fff; background: var(--night); margin-top: 40px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; padding-block: 12px; gap: 3px 15px; }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 0 16px; }
.footer-row a { min-height: 44px; display: inline-flex; align-items: center; }

.world-hero { color: #fff; position: relative; isolation: isolate; overflow: clip; }
.hero-copy { position: relative; min-width: 0; padding-top: 18px; }
.hero-copy > p { max-width: 38ch; margin-top: 8px; font-size: 1rem; line-height: 1.44; }
.hero-copy > p { color: #edeafa; }
.home-content { display: grid; align-content: start; gap: 20px; padding-block: 20px 4px; }
.home-content > *, .listing-content > *, .detail-content > * { min-width: 0; }
.search-form { min-height: 56px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px; background: #fff; color: #281941; border: 1px solid #bdb0d7; padding: 5px; border-radius: 17px; position: relative; max-width: 42rem; width: 100%; }
.search-form > svg { display: none; position: absolute; left: 13px; pointer-events: none; }
.search-form input { min-height: 44px; width: 100%; color: inherit; border: 0; background: transparent; padding-inline: 8px; border-radius: 8px; }
.search-form input::placeholder { color: #5e536f; opacity: 1; }
.search-form button { border: 0; border-radius: 12px; background: var(--action); color: #fff; font-weight: 900; min-height: 44px; padding: 5px 12px; }
.hero-copy .search-form { margin-top: 12px; }
.hero-copy .search-form button { background: var(--accent); color: #27183c; }
.button, .text-action { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 7px; padding: 8px 12px; font-weight: 900; text-align: center; text-decoration: none; border-radius: 12px; border: 1px solid transparent; max-width: 100%; }
.primary { color: #fff; background: var(--action); }
.secondary { color: var(--action); background: var(--paper); border-color: var(--line); }
.button:hover, .search-form button:hover { filter: brightness(.93); }
.text-action { color: var(--action); padding-inline: 0; text-decoration: underline; text-decoration-thickness: 1px; }

.tone-pink { --tint: #f9dded; --tile: #f1b8dc; }
.tone-yellow { --tint: #ffefc9; --tile: #ffdc79; }
.tone-mint { --tint: #dcf3e8; --tile: #a8e4ce; }
.tone-rose { --tint: #ffe1df; --tile: #fac1c0; }
.tone-lavender { --tint: #efe5ff; --tile: #dac6ff; }
.tone-blue { --tint: #e0edff; --tile: #b9dafa; }
.category-grid { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; }
.category-link { display: flex; flex-direction: column; gap: 5px; align-items: center; justify-content: start; height: 100%; padding: 8px 4px; text-align: center; text-decoration: none; font-weight: 900; font-size: .86rem; line-height: 1.2; border-radius: 14px; }
.category-link:hover { background: var(--tint); }
.category-icon { display: grid; width: 63px; height: 63px; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 26%, #fff, var(--tile)); box-shadow: 0 3px 10px #6240a838; }
.category-icon img { width: 47px; height: 47px; object-fit: contain; }
.category-panel .text-action, .latest-section .text-action { margin-top: 5px; }

.collection-grid { display: grid; gap: 10px; margin-top: 13px; }
.collection-card { --collection-tint: #ece4fc; display: flex; min-height: 103px; align-items: center; justify-content: space-between; height: 100%; padding: 12px 13px; gap: 9px; border-radius: var(--radius); background: var(--collection-tint); text-decoration: none; color: #281b46; }
.collection-card:hover strong, .result-card:hover strong { text-decoration: underline; }
.collection-stories { --collection-tint: #e5e7ff; --collection-art: url('art/story-forest.webp'); }
.collection-coloring { --collection-tint: #f6e4fc; --collection-art: url('art/colored-pencils.webp'); }
.collection-crafts { --collection-tint: #ffe9e7; --collection-art: url('art/party-flags.webp'); }
.collection-activities { --collection-tint: #e0f2e9; --collection-art: url('art/icon-activities.webp'); }
.collection-space { --collection-tint: #e7e9ff; --collection-art: url('art/castle-planet.webp'); }
.collection-school { --collection-tint: #fff1d9; --collection-art: url('art/icon-tracing.webp'); }
.collection-copy { display: grid; align-content: center; gap: 3px; }
.collection-copy strong { font-size: 1.06rem; line-height: 1.15; font-weight: 900; }
.collection-copy > span { font-size: .875rem; line-height: 1.35; }
.round-arrow { display: grid; place-items: center; width: 29px; height: 29px; background: #ffffffc7; color: #332157; flex: none; border-radius: 50%; font-size: .95rem; font-weight: 900; }
.age-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.age-list a { display: flex; align-items: center; gap: 8px; min-height: 44px; border-radius: 25px; padding: 7px 13px; text-decoration: none; color: var(--action); background: var(--paper); border: 1px solid var(--line); }
.age-list a:hover { text-decoration: underline; }
.age-list .age-primary { background: var(--accent); border-color: transparent; color: var(--ink); }
.age-list [aria-current] { background: var(--action); border-color: transparent; color: #fff; font-weight: 800; }
.task-type-nav .age-list { margin-top: 0; gap: 6px; font-size: .9rem; }

.page-heading { padding: 10px 0 25px; border-radius: 0 0 24px 24px; background: radial-gradient(ellipse at 90% 90%, #563b9b, transparent 65%), var(--night); color: #fff; }
.page-heading .shell { position: relative; }
.page-heading h1 { margin-top: 9px; }
.page-heading p { max-width: 60ch; margin-top: 10px; color: #ede9fa; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: inherit; font-size: .875rem; }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.heading-icon { position: absolute; inset: 38px 0 auto auto; width: 58px; height: 58px; border-radius: 50%; padding: 5px; background: var(--tint, #fff3); }
.category-page .page-heading h1 { padding-right: 62px; }
.listing-content, .detail-content { padding-top: 17px; display: grid; align-content: start; gap: 13px; }
.listing-content > .search-form { max-width: none; }
.filters { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.filters summary { min-height: 48px; display: flex; align-items: center; gap: 8px; font-weight: 900; padding-inline: 12px; }
.filters summary::after { content: '+'; margin-left: auto; font-size: 1.15rem; }
.filters[open] summary::after { content: '−'; }
.filters form { padding: 0 12px 12px; }
.field-row { display: grid; gap: 8px; }
.field-row label { display: grid; gap: 3px; color: var(--muted); font-weight: 800; font-size: .9rem; }
.field-row select { min-height: 45px; width: 100%; padding: 5px 7px; color: var(--ink); background: var(--page); border: 1px solid #bcb1d0; border-radius: 9px; }
.filter-active { padding: 2px 7px; border-radius: 12px; background: var(--page); color: var(--muted); font-size: .75rem; }
.filter-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.result-count { font-weight: 800; color: var(--muted); font-size: .9rem; }
.result-list { display: grid; gap: 8px; }
.latest-section .result-list, .collection-group .result-list, .detail-related .result-list { margin-top: 12px; }
.result-card { display: grid; grid-template-columns: 83px minmax(0, 1fr) 15px; gap: 8px; align-items: center; min-height: 98px; height: 100%; padding: 7px; text-decoration: none; background: var(--paper); border-radius: 15px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.card-image { display: grid; place-items: center; background: var(--page); border-radius: 10px; height: 80px; overflow: hidden; }
.card-image img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.dictation-result-graphic { display: block; width: 100%; height: 100%; }
.card-image .dictation-result-graphic { width: calc(100% - 8px); height: calc(100% - 8px); }
.story-thumbnail img { object-fit: cover; }
.card-image .fallback { width: 45px; height: 45px; object-fit: contain; }
.card-copy { display: grid; gap: 2px; padding-block: 3px; }
.card-copy strong { font-size: 1rem; line-height: 1.2; font-weight: 900; }
.card-meta, .card-description { font-size: .78rem; line-height: 1.36; color: var(--muted); }
.card-arrow { color: var(--action); font-weight: 900; }
.collection-group, .listing-related, .detail-related, .detail-collections { margin-top: 12px; }
.notice { display: grid; gap: 10px; justify-items: start; padding: 20px 15px; border-radius: 19px; background: var(--paper); box-shadow: var(--shadow); }
.notice p { color: var(--muted); }
.pagination { display: flex; flex-wrap: wrap; gap: 6px; }
.pagination a { min-width: 44px; min-height: 44px; display: grid; place-items: center; border-radius: 9px; padding: 3px; color: var(--action); background: var(--paper); font-weight: 900; }
.pagination [aria-current] { background: var(--action); color: #fff; text-decoration: none; }
.error-content { padding-top: 28px; }

.detail-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 14px; }
.detail-meta li { padding: 3px 8px; font-size: .75rem; font-weight: 900; border-radius: 20px; border: 1px solid currentColor; }
.material-layout { display: grid; gap: 13px; align-items: start; }
.material-preview { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; text-align: center; }
.material-preview img { width: 100%; height: clamp(145px, 64vw, 435px); object-fit: contain; }
.material-preview figcaption { margin-top: 5px; font-size: .83rem; color: var(--muted); }
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.actions .primary { grid-column: 1 / -1; grid-row: 1; }
.actions .button { padding-inline: 5px; font-size: .88rem; }
.actions .material-answer, .material-action-note { grid-column: 1 / -1; }
.material-action-note { margin: 0; padding: 6px 5px; font-weight: 700; }
.reader { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.story-cover { width: 100%; aspect-ratio: 2; height: auto; object-fit: cover; object-position: center 74%; border-radius: var(--radius) var(--radius) 0 0; }
.story-copy { max-width: 64ch; font: 1.07rem/1.69 Georgia, 'Times New Roman', serif; padding: 16px clamp(12px, 4vw, 36px) 0; margin-inline: auto; }
.story-copy p + p { margin-top: .85em; }
.story-scene { margin: 1.1em 0; }
.story-scene img { display: block; width: 100%; height: auto; border-radius: 12px; }
.story-scene figcaption { margin-top: .4em; font: .85rem/1.4 Nunito, system-ui, sans-serif; }
.additional-cover { margin-block: .85em; aspect-ratio: 2.65; object-position: center; border-radius: 12px; }
.story-audio, .reader-actions { padding: 14px; }
.reader-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.story-audio audio { max-width: 100%; }
.sample-note { font-size: .875rem; padding: 7px 10px; border-radius: 8px; background: #fff3d1; color: #43301b; }
.attribution { padding: 12px; color: var(--muted); font-size: .875rem; background: var(--paper); border-radius: var(--radius); }
.attribution h2 { font-size: 1rem; }
.attribution dt, .attribution dd { display: inline; }
.attribution dt { font-weight: 900; margin-right: .5ch; }

.query-examples { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 8px; }
.query-examples a { display: inline-flex; align-items: center; min-height: 44px; padding: 3px 9px; background: #322858; border: 1px solid #a79dcd78; border-radius: 20px; text-decoration: none; font-size: .875rem; font-weight: 800; }
.query-examples a:hover { background: #4b3b79; }

.world-art { position: relative; height: clamp(120px, 40vw, 210px); isolation: isolate; pointer-events: none; }
.world-kids { position: absolute; inset: auto auto 0 -10px; height: 100%; width: auto; max-width: 80%; object-fit: contain; object-position: bottom left; z-index: 1; mask-image: radial-gradient(ellipse at 49% 85%, #000 47%, transparent 75%); }
.world-planet { position: absolute; inset: 3% -12px auto auto; height: 86%; width: auto; max-width: 54%; object-fit: contain; object-position: right center; mask-image: radial-gradient(ellipse at 50% 50%, #000 42%, transparent 73%); }

.age-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 7px 9px;
  border: 1px solid #ded3f7;
  border-radius: 16px;
  background: #eae2fb;
  margin-top: 14px;
  color: #41217e;
}
.age-section h2 { font-size: .9rem; }
.age-list { margin-top: 0; gap: 6px; }
.age-list a { padding-inline: 8px; font-size: .875rem; }

.hero-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); }
.hero-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  grid-area: 1 / 1 / 3 / 2;
  margin-inline: -50vw;
  z-index: -1;
  background: radial-gradient(ellipse at 68% 91%, #5d40a8, transparent 52%),
    radial-gradient(ellipse at 76% 16%, #453180, transparent 50%), var(--night);
}
.hero-copy { grid-area: 1 / 1; }
.world-art { grid-area: 2 / 1; }
.age-section { grid-area: 3 / 1; }
.age-section :focus-visible, .search-form :focus-visible { outline-color: #2377b5; }
.listing-content .listing-results { display: grid; gap: 13px; }
.material-info { display: grid; gap: 12px; min-width: 0; }
.material-info:has(.button:only-child) .button { grid-column: 1 / -1; }
.material-notes, .prose-panel { padding: 14px; background: var(--paper); border-radius: var(--radius); }
.material-notes p + p, .prose-panel > * + * { margin-top: .8em; }
.prose-panel { max-width: 68ch; }
.prose-panel ul { list-style: disc; padding-inline-start: 1.35rem; }
.ad-slot { display: grid; place-items: center; min-height: 4rem; margin: 1.1rem 0; color: var(--muted); background: #ebe6f6; border: 1px dashed #c4b7dd; border-radius: .85rem; font-size: .85rem; }

@media (max-width: 370px) {
  .age-section { flex-direction: column; align-items: start; }
}
@media (min-width: 365px) {
  .search-form > svg { display: block; }
  .search-form input { padding-left: 34px; }
}
@media (min-width: 620px) {
  .category-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .collection-grid, .result-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-row { grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr)); }
  .material-layout:has(.material-preview):has(.material-info) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reader { width: min(100%, 48rem); margin-inline: auto; }
  .reader .story-cover { max-height: 230px; }
}
@media (900px <= width < 1024px) {
  .hero-copy { padding-block: 42px; }
  .hero-copy > p { font-size: 1.125rem; }
  .hero-copy :is(.search-form, .query-examples) { max-width: min(52%, 500px); }
  .hero-stage::before { grid-row: 1 / 2; }
  .world-art { position: absolute; grid-row: 1 / 2; inset: 0 0 0 auto; width: min(46%, 450px); height: auto; }
  .world-kids { width: 80%; height: auto; }
  .world-planet { top: 22%; width: 54%; height: auto; }
  .collection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  body {
    --desktop-gutter: clamp(26px, 4.5vw, 64px);
    --desktop-gap: clamp(16px, 2.2vw, 32px);
    background: #f4f1fc;
  }
  .shell { width: min(calc(100% - var(--desktop-gutter) * 2), 82rem); }
  .header-row { gap: 14px; min-height: 68px; }
  .site-header { border-bottom: 1px solid #ffffff21; }
  .site-footer { margin-top: 58px; background: #21174a; }
  .desktop-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
  .desktop-nav > a, .desktop-nav .task-menu > summary {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-inline: clamp(5px, .65vw, 12px);
    border-radius: 9px;
    color: #f0eafb;
    font-size: .875rem;
    font-weight: 800;
    text-decoration: none;
  }
  .desktop-nav > a:is(:hover, [aria-current]), .desktop-nav .task-menu > summary:is(:hover, .task-menu-current),
  .desktop-nav .task-menu[open] > summary { background: #ffffff22; color: #fff; }
  .desktop-nav .task-menu { position: relative; }
  .desktop-nav .task-menu-links {
    position: absolute;
    z-index: 1;
    inset: calc(100% + 4px) auto auto 50%;
    transform: translateX(-50%);
    width: 18rem;
    max-height: min(75vh, 31rem);
    overflow: auto;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 14px 40px #10062245;
  }
  .desktop-nav .task-menu-links a { display: flex; align-items: center; min-height: 40px; padding: 6px 10px; border-radius: 8px; font-size: .925rem; font-weight: 800; line-height: 1.25; text-decoration: none; }
  .desktop-nav .task-menu-links a:is(:hover, [aria-current]), .menu-panel .task-menu-links a[aria-current] { background: var(--page); }
  .desktop-nav .task-menu-links a:focus-visible { outline-color: #235a9e; outline-offset: -3px; }

  .page-heading { position: relative; isolation: isolate; padding: 16px 0 clamp(29px, 3.45vw, 48px); }
  .page-heading h1 { max-width: 26ch; font-size: clamp(2.4rem, 4vw, 3.7rem); text-wrap: pretty; }
  .page-heading p { max-width: 60ch; margin-top: 13px; font-size: 1.08rem; }
  .heading-icon { inset: auto 1.4% 7% auto; width: 104px; height: 104px; padding: 11px; }
  .category-page .page-heading h1 { padding-right: 0; }
  :is(.listing-content, .detail-content) { gap: 22px; padding-top: 26px; }
  .listing-results > * { min-width: 0; }
  .listing-results .result-count { font-size: 1rem; }
  .result-list { gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .listing-results .notice { padding: 28px; }
  .listing-content .search-form { max-width: 60rem; }
  .filters { max-width: 60rem; }
  .filter-active { color: #fff; background: #59389a; }
  .collection-group { display: grid; gap: 12px; margin-top: 0; }
  .collection-group .result-list { margin-top: 0; }
  .pagination { margin-top: 7px; }
  :is(.detail-related, .detail-collections, .listing-related) { margin-top: 9px; }
  .collection-card { min-height: 116px; }

  .material-preview { padding: 15px; }
  .material-preview img { height: clamp(330px, 42vw, 575px); object-fit: contain; }
  .actions { align-self: start; padding: 15px; gap: 9px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
  .actions .button { min-height: 48px; padding-inline: 10px; }
  .attribution { padding: 15px; }
  .reader { width: min(100%, 49rem); overflow: hidden; }
  .reader .story-cover { max-height: 310px; }
  .story-copy { width: min(100%, 60ch); padding-top: 23px; font-size: 1.15rem; }
  .reader-actions { padding: 20px clamp(20px, 5vw, 58px); }
  .reader .attribution { border-top: 1px solid var(--line); border-radius: 0; }
  .site-menu, .hero-mobile-only { display: none; }
  .hero-desktop-only { display: inline; }
  .desktop-wide { display: block; }
  .category-page .listing-results, .search-page .listing-results { gap: 16px; }
  .material-layout { gap: var(--desktop-gap); }
  .material-layout:has(.material-preview):has(.material-info) { grid-template-columns: minmax(0, 1fr) minmax(17rem, .53fr); }
  .detail-content > p { max-width: 68ch; }

  .page-heading {
    --page-art: url('art/castle-planet.webp');
    background: radial-gradient(ellipse at 76% 35%, #5271a4 0, #373181 28%, #23134f 68%);
    padding-block: 20px clamp(37px, 4.8vw, 68px);
    border-radius: 0;
  }
  .page-heading::after {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0 var(--desktop-gutter) 0 auto;
    width: min(26vw, 360px);
    background: var(--page-art) center / contain no-repeat;
    mask-image: radial-gradient(ellipse at 52% 50%, #000 34%, transparent 73%);
    pointer-events: none;
  }
  .collection-heading { --page-art: var(--collection-art); }
  .story-page .detail-heading { --page-art: url('art/children-and-book.webp'); }
  .heading-icon { right: 25%; width: 74px; height: 74px; }
  .page-heading p { max-width: min(62ch, 66%); }
  .page-heading h1 { max-width: min(24ch, 68%); }
  .collection-page .listing-results .result-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-page .listing-results .result-card { grid-template-columns: 115px minmax(0, 1fr) 20px; gap: 14px; min-height: 130px; padding: 10px; }
  .collection-page .listing-results .card-image { height: 108px; }
  .material-preview { background: #e8e4fb; }
  .reader { box-shadow: 0 12px 38px #5337a81c; }

  .home-page {
    --home-panel: #fcfaff;
  }
  .hero-stage::before { display: none; }
  .world-hero {
    background: radial-gradient(ellipse at 90% 13%, #302069, transparent 55%),
      radial-gradient(ellipse at 68% 111%, #6344ad, transparent 65%), #20174e;
    padding-bottom: 16px;
  }
  .hero-stage {
    grid-template-columns: minmax(0, 45%) minmax(0, 55%);
    grid-template-rows: 1fr auto auto 1fr;
    min-height: clamp(350px, 30vw, 450px);
  }
  .hero-copy { grid-area: 2 / 1; padding-top: 22px; }
  .hero-copy h1 { font-size: clamp(2.65rem, 4.45vw, 4.5rem); }
  .hero-copy > p { max-width: 38ch; margin-block: 10px 14px; color: #eee8fb; font-size: clamp(.98rem, 1.25vw, 1.14rem); }
  .home-search { max-width: 35rem; }
  .home-search .search-form { max-width: none; margin-top: 0; }
  .home-search .search-form button { padding-inline: 20px; }
  .home-search .query-examples { gap: 6px; margin-top: 10px; }
  .home-search .query-examples a { padding-inline: 14px; }
  .hero-stage .age-section {
    grid-area: 3 / 1;
    align-self: start;
    padding: 8px 0 22px;
    margin-top: 13px;
    gap: 8px 14px;
    border: 0;
    border-top: 1px solid #ac9dd461;
    border-radius: 0;
    background: transparent;
    color: #f3edff;
  }
  .age-section h2 { font-size: .94rem; }
  .age-section .age-list a { padding-inline: 12px; }
  .world-art { grid-area: 1 / 2 / -1 / 3; height: 100%; overflow: clip; }
  .world-kids {
    inset: auto auto 0 -3%;
    width: min(82%, 595px);
    height: auto;
    max-width: none;
    mask-image: radial-gradient(ellipse at 50% 58%, #000 49%, transparent 73%);
  }
  .world-planet { inset: 5% -4% auto auto; width: min(63%, 397px); height: auto; max-width: none; }
  .home-content { position: relative; margin-top: -16px; row-gap: clamp(20px, 2vw, 30px); padding-top: 0; }
  .home-content h2 { font-size: clamp(1.35rem, 2.05vw, 1.85rem); }
  .home-content .category-panel {
    padding: 15px 26px 4px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--home-panel);
    box-shadow: 0 8px 24px #3218540d;
  }
  .category-panel .text-action { margin: 0; line-height: 1.2; }
  .category-grid { gap: 6px; margin-top: 9px; }
  .category-link { font-size: .94rem; }
  .category-icon { width: 70px; height: 70px; }
  .category-icon img { width: 53px; height: 53px; }
  .collection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-content .collection-grid { gap: 12px; }
  .home-content .collection-card {
    min-height: 131px;
    background: linear-gradient(125deg, #ffffff62, transparent 65%), var(--collection-tint);
    padding: 16px;
    border: 1px solid #593d7918;
    border-radius: 18px;
  }
  .home-content .collection-copy { gap: 6px; max-width: 38ch; }
  .home-content .collection-copy strong { font-size: 1.13rem; }
  .home-content .latest-section .result-list { gap: 10px; }

  @media (max-width: 1150px) {
    .hero-stage { grid-template-columns: minmax(0, 48%) minmax(0, 52%); }
    .world-planet { inset-inline-end: 0; }
  }

  .listing-content .filters { width: 100%; }
  .filters summary { padding-inline: 15px; }
  .filters form { padding-inline: 15px; }

  :is(.category-page, .search-page) .listing-results .result-list {
    gap: clamp(12px, 1.35vw, 20px);
  }
  :is(.category-page, .search-page) .listing-results .result-card {
    grid-template: auto 1fr auto / minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 10px;
    border-radius: 18px;
  }
  :is(.category-page, .search-page) .listing-results .card-image {
    height: clamp(194px, 18vw, 255px);
    padding: 7px;
  }
  :is(.category-page, .search-page) .listing-results .card-image img { object-fit: contain; }
  :is(.category-page, .search-page) .listing-results .card-copy { gap: 5px; padding: 0 5px; }
  :is(.category-page, .search-page) .listing-results .card-copy strong { font-size: 1.15rem; }
  :is(.category-page, .search-page) .listing-results .card-meta { font-size: .875rem; }
  :is(.category-page, .search-page) .listing-results .card-arrow { display: none; }
  :is(.category-page, .search-page) .listing-results .card-action {
    display: block;
    border-top: 1px solid var(--line);
    padding: 8px 5px 3px;
    color: var(--action);
    font-size: .925rem;
    font-weight: 900;
  }
}

@media (min-width: 1600px) {
  body {
    --wide-shell: clamp(82rem, 82vw, 142rem);
    --wide-text: clamp(1rem, calc(.64rem + .35vw), 1.25rem);
    --wide-gap: clamp(1.25rem, 1.65vw, 2.75rem);
    --wide-icon: clamp(4.375rem, calc(1.7rem + 3vw), 6.5rem);
    --desktop-gap: var(--wide-gap);
    font-size: var(--wide-text);
  }

  .shell { width: min(calc(100% - var(--desktop-gutter) * 2), var(--wide-shell)); }
  .header-row { min-height: clamp(68px, 4vw, 92px); }
  .brand { font-size: clamp(1.45rem, calc(.85rem + .6vw), 1.9rem); }
  .desktop-nav { gap: clamp(3px, .55vw, 14px); }
  .desktop-nav > a, .desktop-nav .task-menu > summary { font-size: calc(var(--wide-text) * .94); }
  .header-search { min-width: 50px; min-height: 50px; }

  .hero-stage { min-height: clamp(450px, 23.5vw, 530px); }
  .hero-copy { padding-top: 26px; }
  .hero-copy h1 { font-size: clamp(4.5rem, calc(1.75rem + 2.75vw), 6.25rem); }
  .hero-copy > p { font-size: calc(var(--wide-text) * 1.12); }
  .home-search { max-width: 44rem; }
  .world-art { width: 100%; max-width: 54rem; justify-self: center; }
  .world-kids { inset-block-end: 5%; }
  .world-planet { width: min(63%, 420px); inset-inline-end: 0; }
  .search-form { min-height: clamp(56px, 3.45vw, 76px); }
  .search-form button { min-height: clamp(44px, 2.8vw, 62px); padding-inline: min(1.25vw, 28px); }
  .hero-stage .age-section { margin-top: 16px; padding-block: 10px 26px; }
  .hero-stage :is(.query-examples a, .age-list a, .age-section h2) { font-size: calc(var(--wide-text) * .94); }

  :is(.home-content, .listing-content, .detail-content) h2 {
    font-size: clamp(1.85rem, calc(1rem + .9vw), 2.55rem);
  }
  .home-content { row-gap: var(--wide-gap); }
  .home-content .category-panel { padding: 20px clamp(26px, 1.7vw, 44px) 8px; }
  .home-content .category-grid { gap: clamp(6px, 1vw, 20px); }
  .home-content .category-link { gap: 9px; font-size: var(--wide-text); }
  .home-content .category-icon { width: var(--wide-icon); height: var(--wide-icon); }
  .home-content .category-icon img {
    width: clamp(53px, calc(24px + 2vw), 72px);
    height: clamp(53px, calc(24px + 2vw), 72px);
  }
  .collection-grid, .home-content .collection-grid { gap: var(--wide-gap); }
  .home-content .collection-card { padding: clamp(16px, 1.05vw, 25px); }
  .home-content .collection-card { min-height: clamp(131px, 8vw, 205px); }
  .home-content .collection-copy strong { font-size: calc(var(--wide-text) * 1.14); }
  .collection-copy > span { font-size: calc(var(--wide-text) * .96); }
  .round-arrow { width: 34px; height: 34px; }
  .home-content .latest-section .result-list { gap: var(--wide-gap); grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-content .latest-section .result-card {
    grid-template-columns: clamp(85px, 5.2vw, 130px) minmax(0, 1fr) auto;
    padding: 10px;
  }
  .home-content .latest-section .card-image { height: clamp(90px, 5.4vw, 140px); }

  .page-heading h1 { font-size: clamp(3.7rem, calc(2rem + 1.7vw), 4.85rem); }
  .page-heading p { font-size: calc(var(--wide-text) * 1.04); }
  .page-heading::after { inset-inline-end: max(var(--desktop-gutter), calc((100% - var(--wide-shell)) / 2)); }
  :is(.listing-content, .detail-content) { gap: var(--wide-gap); padding-top: clamp(26px, 1.6vw, 40px); }
  .listing-content .search-form, .filters { max-width: 69rem; }
  .filters summary { min-height: clamp(48px, 2.55vw, 64px); }
  .card-copy strong { font-size: calc(var(--wide-text) * 1.1); }
  :is(.card-meta, .card-description, .card-action) { font-size: calc(var(--wide-text) * .89); }
  :is(.category-page, .search-page) .listing-results .result-list { gap: var(--wide-gap); }
  :is(.category-page, .search-page) .listing-results .result-card { padding: clamp(10px, .85vw, 22px); }
  :is(.category-page, .search-page) .listing-results .card-image { height: clamp(255px, 14.5vw, 330px); }
  :is(.category-page, .search-page) .listing-results .card-copy strong { font-size: calc(var(--wide-text) * 1.16); }
  :is(.category-page, .search-page) .listing-results .card-meta { font-size: calc(var(--wide-text) * .91); }
  .collection-page .listing-results .result-list { gap: var(--wide-gap); }
  .collection-page .listing-results .result-card {
    grid-template-columns: clamp(115px, 8vw, 210px) minmax(0, 1fr) 20px;
    padding: 12px;
  }
  .collection-page .listing-results .card-image { height: clamp(108px, 8vw, 200px); }

  .material-layout:has(.material-preview):has(.material-info) {
    grid-template-columns: minmax(0, min(63%, 61rem)) minmax(17rem, 24rem);
    justify-content: center;
  }
  .material-preview img { height: clamp(575px, 27vw, 730px); }
  .actions .button { min-height: clamp(48px, 2.65vw, 64px); font-size: calc(var(--wide-text) * .94); }
  .story-copy { width: min(100%, 60ch, 39rem); font-size: clamp(1.15rem, calc(.95rem + .2vw), 1.28rem); }

  /* Four cards per full row. A final row of three shares the available width. */
  .home-content .collection-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .home-content .collection-grid > li { grid-column: span 3; }
  .home-content .collection-grid:has(> li:nth-child(4n + 3):last-child) > li:nth-last-child(-n + 3) {
    grid-column: span 4;
  }

  .home-content .collection-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 12px;
    align-items: start;
    justify-content: stretch;
  }
  .home-content .collection-card:not(:has(.wide-collection-previews)) {
    align-self: start;
    min-height: 0;
    height: auto;
    grid-template-rows: auto auto;
  }
  .home-content .collection-card:not(:has(.wide-collection-previews)) .wide-collection-action { grid-row: 2; }
  .home-content .collection-card .round-arrow { display: none; }
  .wide-collection-previews {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-row: 2;
    align-items: start;
    gap: 10px;
  }
  .wide-collection-previews:has(> .wide-collection-preview:only-child) {
    grid-template-columns: minmax(0, clamp(10rem, 11vw, 17rem));
    justify-content: center;
    text-align: center;
  }
  .wide-collection-preview { display: grid; gap: 5px; font-size: calc(var(--wide-text) * .8); line-height: 1.3; }
  .wide-collection-preview picture { display: contents; }
  .wide-collection-preview :is(img, .dictation-result-graphic) {
    width: 100%;
    height: clamp(8rem, 7.75vw, 12rem);
    padding: 4px;
    border: 1px solid #ffffffc7;
    border-radius: 12px;
    background: #fff9;
    object-fit: contain;
  }
  .wide-collection-preview img.preview-unavailable { visibility: hidden; }
  .wide-collection-action { display: block; grid-row: 3; color: var(--action); font-weight: 900; }

  @supports (grid-template-rows: subgrid) {
    .home-content .collection-grid > li {
      display: grid;
      grid-row: span 3;
      grid-template-rows: subgrid;
    }
    .home-content .collection-card {
      grid-row: 1 / -1;
      grid-template-rows: subgrid;
    }
  }
}
.home-campaign-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e0d8fe;
  border-radius: 14px;
  background: #f2edff;
}
.home-campaign-links a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  border-radius: 8px;
  padding: 6px 12px;
  color: #342166;
  font-weight: 900;
}
.home-campaign-links a:hover { background: #e6dcff; }
.campaign-search-links {
  margin: 8px 0 0;
  padding-inline-start: 22px;
  list-style: disc;
}
.campaign-search-links a { color: #492b83; text-decoration: underline; }
