/* Hallmark · shape: Storybook shelf · genre: playful · theme: custom · job: buy · idea: "Every book opens a tiny world" · vibe: "paper worlds for curious little readers"
 * paper: oklch(96.8% 0.034 83) · accent: oklch(68.5% 0.164 35) · display: Baloo 2 · body: Hanken Grotesk · hero: left story and right pop-up book · nav: wordmark with story destinations and quiet basket · footer: compact publisher colophon · imagery: original generated book art · signature: animated paper story world
 * axes: light/rounded-sans/chromatic-coral · posture: Full-palette, teal field, coral signal, butter seal, teal ink · contrast: pass · fold: pass · hero-review: ship, 0 findings · finish-review: subagent, ship, 0 findings · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H5 E4 S4 R4 V4 · weakest: S, replaced generic benefits with a working Malay story reader */
/* Hallmark · waive 80 · original picture-book artwork requested by the user · paper world and book covers are the fictional children's books being demonstrated */
/* Hallmark · dismissed 3 · the equal columns show three purchasable book covers with prices, not icon feature tiles */
@import url('./tokens.css');
@import url('./base.css');
html { scroll-behavior: smooth; }
body { font-synthesis: none; }
button, a { -webkit-tap-highlight-color: var(--color-transparent); }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
button:active, .button:active { transform: translateY(1px); }
button[aria-busy=true] { cursor: progress; }
.icon { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sprite { position: absolute; width: 0; height: 0; }
.skip { position: fixed; inset: var(--space-md) auto auto var(--space-md); transform: translateY(-200%); z-index: 500; background: var(--color-ink); color: var(--color-paper); padding: var(--space-sm) var(--space-md); }
.skip:focus-visible { transform: none; }
.announcement { min-height: 34px; display: flex; align-items: center; justify-content: center; gap: var(--space-xs); background: var(--color-teal); color: var(--color-paper); font-size: var(--text-xs); padding: var(--space-2xs) var(--space-md); text-align: center; }
.announcement .icon { width: 14px; height: 14px; }
.header { position: relative; z-index: var(--z-sticky-nav); }
.nav { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); }
.brand { display: flex; gap: var(--space-xs); align-items: center; text-decoration: none; font-family: var(--font-display); font-size: 27px; font-weight: 700; line-height: 1; }
.brand .icon { width: 36px; height: 36px; color: var(--color-teal); stroke-width: 1.8; }
.nav-links { display: flex; gap: var(--space-xl); align-items: center; }
.nav-links a, .footer a { font-size: var(--text-sm); text-decoration: none; white-space: nowrap; }
.nav-links a:hover, .footer a:hover { text-decoration: underline; }
.nav-actions { display: flex; align-items: center; gap: var(--space-sm); }
.basket-button { display: inline-flex; align-items: center; gap: var(--space-xs); border: 1px solid var(--color-rule); border-radius: var(--radius-pill); background: var(--color-transparent); color: var(--color-ink); padding: var(--space-xs) var(--space-md); min-height: 44px; font-size: var(--text-sm); white-space: nowrap; }
.basket-button:hover { background: var(--color-paper-2); }
.basket-count { font-weight: 700; }
.menu-button { display: none; }
.hero-scene { position: relative; isolation: isolate; overflow: clip; background: var(--color-paper); color: var(--color-ink); transition: background-color 800ms ease, color 800ms ease; }
.hero-scene[data-hero-theme="night"] { background: #102f3b; color: #fff3d8; --color-focus: #ffe09a; }
.hero { position: relative; z-index: 1; min-height: 614px; display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); align-items: center; gap: clamp(32px,4vw,64px); padding-top: var(--space-xl); padding-bottom: var(--space-2xl); }
.opening-copy { position: relative; z-index: 2; min-width: 0; }
h1 { font-size: var(--text-display); line-height: .99; letter-spacing: -.04em; font-weight: 700; max-width: 10ch; }
.opening-copy p { max-width: 34ch; font-size: var(--text-lg); margin-top: var(--space-lg); color: var(--color-ink-2); line-height: 1.55; }
.hero-scene .opening-copy p, .hero-scene .text-button { transition: color 800ms ease; }
.hero-scene[data-hero-theme="night"] .opening-copy p { color: #e0e9e5; }
.hero-scene[data-hero-theme="night"] .text-button { color: #fff3d8; }
.hero-scene .hero-actions .button-primary { transition: background-color 800ms ease, color 800ms ease; }
.hero-scene[data-hero-theme="night"] .hero-actions .button-primary { background: #b84931; color: #fff3d8; }
.hero-scene[data-hero-theme="night"] .hero-actions .button-primary:hover { background: #9d3c29; }
.hero-mode-switch { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 20px; border: 1px solid var(--color-rule); border-radius: var(--radius-pill); background: rgb(255 255 255 / .2); }
.hero-mode-switch button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 5px 13px; border: 0; border-radius: var(--radius-pill); background: transparent; color: inherit; font-size: var(--text-sm); font-weight: 700; }
.hero-mode-switch .icon { width: 18px; height: 18px; }
.hero-mode-switch button[aria-pressed="true"] { background: var(--color-teal); color: var(--color-paper); }
.hero-scene[data-hero-theme="night"] .hero-mode-switch { border-color: #748b90; background: rgb(255 255 255 / .05); }
.hero-scene[data-hero-theme="night"] .hero-mode-switch button[aria-pressed="true"] { background: #fff3d8; color: #102f3b; }
.hero-actions { display: flex; align-items: center; gap: var(--space-lg); margin-top: var(--space-xl); flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm); border: 1px solid var(--color-transparent); border-radius: var(--radius-pill); padding: var(--space-sm) var(--space-lg); min-height: 50px; font-size: var(--text-md); font-weight: 700; text-decoration: none; white-space: nowrap; line-height: 1.4; }
.button-primary { background: var(--color-accent); color: var(--color-accent-ink); transition: background-color var(--dur-short) var(--ease-out); }
.button-primary:hover { background: var(--color-accent-hover); }
.button-quiet { background: var(--color-transparent); color: var(--color-ink); border-color: var(--color-rule); }
.button-quiet:hover { background: var(--color-paper-2); }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); border: 0; background: var(--color-transparent); color: var(--color-ink); min-height: 44px; padding: 0; font-size: var(--text-sm); text-decoration: underline; text-underline-offset: .24em; white-space: nowrap; }
.text-button:hover { text-decoration-thickness: 2px; }
.hero-art { position: relative; margin: 0; min-width: 0; width: 100%; max-width: 760px; justify-self: center; }
.hero-book-float { position: relative; display: grid; aspect-ratio: 3 / 2; width: 100%; animation: book-drift 4s ease-in-out infinite; }
.hero-art .hero-world { grid-area: 1 / 1; display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; animation: none; transition: opacity 800ms ease, transform 800ms cubic-bezier(.22,.61,.36,1); }
.hero-world-day { opacity: 1; transform: translateX(0); }
.hero-world-night { opacity: 0; transform: translateX(28px); }
.hero-scene[data-hero-theme="night"] .hero-world-day { opacity: 0; transform: translateX(-28px); }
.hero-scene[data-hero-theme="night"] .hero-world-night { opacity: 1; transform: translateX(0); }
.hero-art figcaption { position: static; margin-top: 24px; padding-inline: var(--space-sm); text-align: center; font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); line-height: 1.4; }
.float-star { position: absolute; color: var(--color-accent); animation: star-drift 4s var(--ease-in-out) infinite; }
.float-star .icon { width: 34px; height: 34px; fill: currentColor; stroke-width: 0; }
.star-one { top: 7%; left: 17%; }
.star-two { top: 17%; right: 8%; animation-delay: -3s; color: var(--color-teal); transform: scale(.7); }
.hero-scene[data-hero-theme="night"] .star-two { color: #ffe09a; }
.hero-sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; color: #f8dfa0; transition: opacity 800ms ease; }
.hero-scene[data-hero-theme="night"] .hero-sky { opacity: 1; }
.hero-sky span { position: absolute; font-size: 15px; line-height: 1; animation: sky-twinkle 4s ease-in-out infinite; }
.hero-sky span:nth-child(1) { left: 5%; top: 8%; }
.hero-sky span:nth-child(2) { left: 34%; top: 10%; animation-delay: -1s; }
.hero-sky span:nth-child(3) { left: 62%; top: 7%; animation-delay: -2s; }
.hero-sky span:nth-child(4) { left: 93%; top: 18%; animation-delay: -3s; }
.hero-sky span:nth-child(5) { left: 49%; top: 50%; font-size: 9px; }
.hero-sky span:nth-child(6) { left: 7%; top: 83%; animation-delay: -2s; }
.hero-sky span:nth-child(7) { left: 86%; top: 89%; animation-delay: -1s; }
.hero-sky span:nth-child(8) { left: 37%; top: 91%; font-size: 9px; }
.hero-sky span:nth-child(9) { left: 78%; top: 35%; font-size: 10px; animation-delay: -3s; }
.hero-sky span:nth-child(10) { left: 96%; top: 65%; font-size: 9px; }
.hero-scene:not(.is-running) .hero-book-float, .hero-scene:not(.is-running) .float-star, .hero-scene:not(.is-running) .hero-sky span { animation-play-state: paused; }
.section-head h2, h2 { font-size: var(--text-section); font-weight: 700; line-height: 1.1; letter-spacing: -.025em; }
@keyframes book-drift { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-9px) rotate(.5deg); } }
@keyframes star-drift { 0%,100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-14px) rotate(9deg); } }
@keyframes sky-twinkle { 0%,100% { opacity: .35; } 50% { opacity: .8; } }
@media(max-width: 40rem) {
  .hero-sky span:nth-child(1) { top: 3%; }
  .hero-sky span:nth-child(2) { left: 95%; top: 24%; }
  .hero-sky span:nth-child(3) { left: 88%; top: 52%; }
  .hero-sky span:nth-child(8) { left: 3%; top: 94%; }
  .hero-sky span:nth-child(9) { left: 95%; top: 42%; }
}
@media(min-width: 90rem) { .hero { min-height: 660px; } }
@media(max-width: 70rem) { .nav-links { gap: var(--space-lg); } .hero-actions { gap: var(--space-md); } }
@media(max-width: 60rem) { .nav { min-height: 80px; } .nav-links { display: none; position: absolute; inset: 100% var(--space-lg) auto; padding: var(--space-lg); background: var(--color-paper-2); border-radius: var(--radius-card); } .nav-links.is-open { display: grid; } .menu-button { display: grid; place-items: center; width: 44px; min-height: 44px; padding: 0; border: 0; background: var(--color-transparent); color: var(--color-ink); } .hero { min-height: 570px; } .hero-actions { flex-direction: column; align-items: flex-start; gap: var(--space-sm); } .hero-art figcaption { font-size: var(--text-md); } }
@media(max-width: 40rem) { .announcement { font-size: 12px; } .brand { font-size: 22px; } .brand .icon { width: 29px; height: 29px; } .basket-button { padding: var(--space-xs) var(--space-sm); } .basket-label { display: none; } .hero { grid-template-columns: minmax(0,1fr); padding-top: var(--space-xl); padding-bottom: var(--space-xl); gap: var(--space-lg); } h1 { font-size: clamp(3.5rem,14.6vw,4.5rem); max-width: 10ch; } .opening-copy p { font-size: 18px; max-width: 30ch; margin-top: var(--space-md); } .hero-actions { flex-direction: row; align-items: center; gap: var(--space-md); margin-top: var(--space-lg); } .hero-actions .button { padding-inline: var(--space-md); font-size: var(--text-sm); } .hero-actions .text-button { font-size: var(--text-xs); gap: var(--space-2xs); } .hero-art { max-width: 540px; margin-top: var(--space-sm); } .hero-art figcaption { margin-top: 20px; } }
@media(prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
@media(min-width: 90rem) { .hero { min-height: 740px; } }
.wonder-band { background: var(--color-teal); color: var(--color-paper); padding-block: var(--space-xl); }
.wonder-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xl); }
.wonder-inner h2 { font-size: 3rem; line-height: 1.12; flex: 0 0 65%; }
.wonder-topics { display: grid; align-items: center; gap: var(--space-md); }
.wonder-topics span { display: flex; align-items: center; gap: var(--space-xs); font-size: var(--text-sm); }
.wonder-topics .icon { color: var(--color-butter); }
.section-space { padding-top: var(--space-3xl); padding-bottom: var(--space-3xl); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-xl); margin-bottom: var(--space-xl); }
.section-head h2 { max-width: 15ch; }
.section-head p { max-width: 29ch; color: var(--color-ink-2); font-size: var(--text-md); }
.filters { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-bottom: var(--space-xl); }
.filter { display: inline-flex; align-items: center; min-height: 44px; border-radius: var(--radius-pill); border: 1px solid var(--color-rule); background: var(--color-transparent); color: var(--color-ink); padding: var(--space-xs) var(--space-lg); font-size: var(--text-sm); white-space: nowrap; }
.filter:hover { background: var(--color-paper-2); }
.filter.is-selected { background: var(--color-teal); color: var(--color-paper); border-color: var(--color-teal); }
.book-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--gap-columns); align-items: start; }
.book-product { min-width: 0; }
.cover-frame { position: relative; display: block; width: 100%; padding: var(--space-lg) var(--space-xl); border: 0; border-radius: var(--radius-card); background: var(--color-paper-2); color: var(--color-ink); }
.cover-preview { position: absolute; inset: auto var(--space-md) var(--space-md) auto; min-height: 44px; font-size: var(--text-sm); padding: var(--space-xs) var(--space-md); background: var(--color-paper); }
.book-cover { display: block; position: relative; background-image: url('assets/story-worlds.webp'); background-size: 300% 100%; aspect-ratio: 2 / 3; box-shadow: 5px 8px 12px var(--color-shadow); text-align: center; overflow: clip; }
.cover-rimba, .art-rimba { background-position: left center; color: var(--color-ink); }
.cover-bulan, .art-bulan { background-position: center center; color: var(--color-moon); }
.cover-timo, .art-timo { background-position: right center; color: var(--color-ink); }
.cover-title { position: absolute; inset: var(--space-md) var(--space-xs) auto; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem,2.05vw,1.85rem); line-height: 1.05; }
.cover-publisher { position: absolute; inset: auto 0 var(--space-sm); color: var(--color-paper); font-family: var(--font-display); font-weight: 700; font-size: var(--text-xs); }
.cover-timo .cover-publisher { color: var(--color-ink); }
.book-meta { display: flex; justify-content: space-between; gap: var(--space-xs); margin-top: var(--space-xs); color: var(--color-muted); font-size: var(--text-xs); }
.book-product h3 { font-size: var(--text-title); line-height: 1.3; margin-top: var(--space-lg); }
.book-buy { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); margin-top: var(--space-sm); }
.price { font-size: var(--text-lg); font-weight: 700; font-variant-numeric: tabular-nums; }
.add-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2xs); border: 1px solid var(--color-rule); border-radius: var(--radius-pill); background: var(--color-transparent); color: var(--color-ink); padding: var(--space-xs) var(--space-md); font-size: var(--text-sm); white-space: nowrap; }
.add-button:hover { background: var(--color-paper-2); }
.demo-price { font-size: var(--text-xs); color: var(--color-muted); margin-top: var(--space-xl); }
.reading-section { padding-block: var(--space-3xl); background: var(--color-coral-light); color: var(--color-ink); }
.reading-section .section-head h2 { max-width: 19ch; }
.story-spread { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); min-height: 400px; }
.story-picture { position: relative; min-height: 420px; background-image: url('assets/story-worlds.webp'); background-size: 300% auto; background-position-y: 65%; border-radius: var(--radius-card) 0 0 var(--radius-card); }
.story-picture-note { position: absolute; inset: var(--space-lg) var(--space-xl) auto; font-family: var(--font-display); font-weight: 700; font-size: 2rem; line-height: 1.1; max-width: 9ch; }
.story-page { position: relative; background: var(--color-paper); color: var(--color-ink); padding: var(--space-xl) var(--space-2xl); display: flex; flex-direction: column; justify-content: center; border-radius: 0 var(--radius-card) var(--radius-card) 0; }
.story-star { width: 28px; height: 28px; fill: var(--color-butter); stroke: var(--color-ink); margin-bottom: var(--space-lg); }
.story-text { min-height: 194px; }
.story-text h3 { font-size: 2rem; line-height: 1.2; margin-bottom: var(--space-md); }
.story-text p { max-width: 45ch; font-size: var(--text-lg); line-height: 1.65; }
.story-controls { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); margin-top: var(--space-lg); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.icon-button { width: 44px; min-height: 44px; padding: 0; display: inline-grid; place-items: center; border: 1px solid var(--color-rule); border-radius: var(--radius-pill); background: var(--color-transparent); color: var(--color-ink); }
.icon-button:hover:not(:disabled) { background: var(--color-paper-2); }
.reverse { transform: rotate(180deg); }
.reading-note { text-align: center; margin-top: var(--space-lg); font-size: var(--text-sm); }
.about-section { padding-block: var(--space-3xl); background: var(--color-teal); color: var(--color-paper); }
.about-layout { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--gap-columns); align-items: center; }
.about-layout h2 { max-width: 16ch; }
.about-layout p { max-width: 40ch; margin-top: var(--space-lg); font-size: var(--text-md); }
.conversation-list { margin: 0; }
.conversation-list > div { padding-block: var(--space-lg); border-bottom: 1px solid color-mix(in oklab,var(--color-paper) 25%,var(--color-transparent)); }
.conversation-list > div:first-child { padding-top: 0; }
.conversation-list dt { font-family: var(--font-display); font-size: 1.65rem; font-weight: 700; line-height: 1.3; }
.conversation-list dd { margin: var(--space-xs) 0 0; font-size: var(--text-sm); }
.gift-section { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--gap-columns); align-items: center; }
.gift-art { position: relative; min-height: 400px; display: flex; align-items: center; justify-content: center; }
.mini-cover { width: 36%; flex-shrink: 0; }
.mini-cover:nth-child(1) { transform: rotate(-13deg) translateX(17%); }
.mini-cover:nth-child(2) { position: relative; z-index: 2; transform: translateY(-20px); }
.mini-cover:nth-child(3) { transform: rotate(13deg) translateX(-17%); }
.mini-cover .cover-title { font-size: 1.25rem; }
.gift-copy { padding-left: var(--space-xl); }
.gift-copy h2 { max-width: 13ch; }
.gift-copy > p { max-width: 34ch; margin-top: var(--space-lg); }
.gift-price { display: flex; align-items: center; gap: var(--space-md); margin-block: var(--space-lg); }
.gift-price strong { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.gift-price span { color: var(--color-muted); font-size: var(--text-xs); }
.faq-section { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: var(--gap-columns); padding-bottom: var(--space-3xl); }
.faq-section h2 { max-width: 12ch; }
.faq-list details { border-bottom: 1px solid var(--color-rule); }
.faq-list details:first-child { border-top: 1px solid var(--color-rule); }
.faq-list summary { min-height: 72px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); font-size: var(--text-md); font-weight: 700; padding-block: var(--space-md); list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .icon { transition: transform 280ms ease; }
.faq-list details[open]:not(.is-closing) summary .icon { transform: rotate(45deg); }
.faq-list details.is-animating { overflow: clip; }
.faq-list p { padding: 0 var(--space-xl) var(--space-lg) 0; max-width: 60ch; color: var(--color-ink-2); font-size: var(--text-md); }
.footer { background: var(--color-paper-2); color: var(--color-ink); padding-top: var(--space-2xl); padding-bottom: var(--space-lg); }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xl); padding-bottom: var(--space-2xl); }
.footer-top > p { font-size: var(--text-sm); }
.footer nav { display: flex; gap: var(--space-lg); }
.footer-bottom { display: flex; justify-content: space-between; gap: var(--space-lg); border-top: 1px solid var(--color-rule); padding-top: var(--space-lg); font-size: var(--text-xs); color: var(--color-muted); }
dialog { position: fixed; color: var(--color-ink); background: var(--color-paper); border: 0; border-radius: var(--radius-card); padding: 0; max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; }
dialog::backdrop { background: var(--color-overlay); }
body:has(dialog[open]) { overflow-y: hidden; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); padding: var(--space-md) var(--space-lg); font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; }
.reader-dialog { width: min(920px,calc(100% - 40px)); }
.modal-spread { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.modal-art { min-height: 370px; background-image: url('assets/story-worlds.webp'); background-size: 300% auto; background-position-y: 65%; }
.modal-page { padding: var(--space-xl); display: flex; flex-direction: column; justify-content: space-between; }
.modal-text h2 { font-size: 2rem; margin-bottom: var(--space-lg); }
.modal-text p { font-size: var(--text-lg); line-height: 1.65; }
.reader-footer { padding: var(--space-md) var(--space-lg); display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); font-size: var(--text-xs); }
.cart-dialog { width: min(520px,calc(100% - 32px)); }
.cart-dialog .dialog-heading h2 { font-size: 1.65rem; }
#cart-items { padding: 0 var(--space-lg); }
.empty-cart { text-align: center; padding-block: var(--space-xl); }
.empty-cart .icon { margin: 0 auto var(--space-md); width: 48px; height: 48px; }
.empty-cart p { margin-bottom: var(--space-lg); }
.cart-item { display: grid; grid-template-columns: 60px minmax(0,1fr) auto; gap: var(--space-md); align-items: center; padding-block: var(--space-lg); border-top: 1px solid var(--color-rule); }
.cart-thumb { width: 60px; height: 85px; background-image: url('assets/story-worlds.webp'); background-size: 300% 100%; }
.cart-item h3 { font-size: 1.15rem; line-height: 1.2; }
.cart-item-price { font-size: var(--text-sm); margin-top: var(--space-2xs); }
.quantity { display: flex; align-items: center; gap: var(--space-2xs); margin-top: var(--space-xs); }
.quantity button { min-height: 44px; width: 44px; }
.quantity output { min-width: 24px; text-align: center; font-variant-numeric: tabular-nums; }
.remove-item { border: 0; border-radius: 0; background: var(--color-transparent); color: var(--color-muted); text-decoration: underline; min-height: 44px; padding: 0; font-size: var(--text-xs); }
.cart-line-total { font-size: var(--text-sm); font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-totals { padding: var(--space-lg); border-top: 1px solid var(--color-rule); }
.cart-totals > div { display: flex; justify-content: space-between; margin-bottom: var(--space-lg); font-variant-numeric: tabular-nums; }
.cart-totals .button { width: 100%; }
.cart-totals [data-checkout] { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.cart-totals .cart-image-actions { display: flex; justify-content: flex-start; flex-wrap: wrap; gap: var(--space-sm) var(--space-md); margin: var(--space-sm) 0 0; }
.cart-image-actions button { border: 0; padding: var(--space-xs) 0; background: transparent; color: inherit; font-size: var(--text-sm); text-decoration: underline; text-underline-offset: .2em; }
.cart-image-help { margin-top: var(--space-xs); font-size: var(--text-xs); color: var(--color-ink-2); }
.cart-thumb-set { display: flex; align-items: center; background-image: none; }
.cart-thumb-set span { display: block; width: 44%; height: 75%; flex-shrink: 0; background-image: url('assets/story-worlds.webp'); background-size: 300% 100%; box-shadow: 1px 2px 4px var(--color-shadow); }
.cart-thumb-set span:first-child { transform: rotate(-12deg); }
.cart-thumb-set span:nth-child(2) { margin-left: -15%; z-index: 1; transform: translateY(-6%); }
.cart-thumb-set span:last-child { margin-left: -15%; transform: rotate(12deg); }
.cart-note { padding: var(--space-lg); padding-top: 0; font-size: var(--text-sm); min-height: 1lh; }
.noscript-note { padding: var(--space-lg); background: var(--color-butter); color: var(--color-ink); }
.gift-section { padding-bottom: var(--space-4xl); }
.faq-section { padding-bottom: var(--space-4xl); }
@media(max-width: 70rem) { .wonder-topics { gap: var(--space-lg); } .cover-frame { padding-inline: var(--space-lg); } .story-page { padding-inline: var(--space-xl); } .story-text p { font-size: 18px; } .gift-copy { padding-left: 0; } }
@media(max-width: 60rem) { .wonder-inner { align-items: flex-start; } .wonder-topics { display: grid; gap: var(--space-sm); } .book-grid { gap: var(--gap-columns); } .cover-frame { padding: var(--space-md); } .cover-title { font-size: 1.35rem; inset-block-start: var(--space-sm); } .book-meta { flex-direction: column; gap: 0; } .book-product h3 { font-size: 1.35rem; } .section-head { align-items: flex-start; } .story-picture { min-height: 400px; } .story-page { padding: var(--space-lg); } .story-text { min-height: 220px; } .story-text h3 { font-size: 1.65rem; } .story-text p { font-size: var(--text-md); } .gift-art { min-height: 340px; } .mini-cover .cover-title { font-size: var(--text-md); } .footer-top { flex-wrap: wrap; } .footer-bottom { flex-direction: column; gap: var(--space-xs); } }
@media(max-width: 40rem) { .wonder-band { padding-block: var(--space-xl); } .wonder-inner { flex-direction: column; gap: var(--space-lg); } .wonder-inner h2 { font-size: 1.85rem; } .wonder-topics { display: flex; flex-wrap: wrap; gap: var(--space-md); } .wonder-topics span { font-size: var(--text-xs); gap: var(--space-2xs); } .wonder-topics .icon { width: 18px; height: 18px; } .section-space, .reading-section, .about-section { padding-block: var(--space-2xl); } .section-head { flex-direction: column; gap: var(--space-md); margin-bottom: var(--space-lg); } .section-head h2 { max-width: 18ch; } .section-head p { max-width: 34ch; } .filters { gap: var(--space-xs); margin-bottom: var(--space-lg); } .filter { padding-inline: var(--space-sm); font-size: var(--text-xs); } .book-grid { grid-template-columns: minmax(0,1fr); gap: var(--space-xl); } .cover-frame { padding: var(--space-lg) var(--space-xl); } .book-cover { max-width: 260px; margin-inline: auto; } .cover-title { font-size: 1.8rem; inset-block-start: var(--space-md); } .book-meta { flex-direction: row; font-size: var(--text-sm); margin-top: var(--space-md); } .book-product h3 { font-size: 1.65rem; } .book-buy { margin-top: var(--space-xs); } .demo-price { font-size: var(--text-sm); } .story-spread { grid-template-columns: minmax(0,1fr); } .story-picture { min-height: 300px; border-radius: var(--radius-card) var(--radius-card) 0 0; background-size: 300% 135%; background-position-y: 55%; } .story-picture-note { font-size: 1.65rem; inset: var(--space-lg) var(--space-lg) auto; } .story-page { border-radius: 0 0 var(--radius-card) var(--radius-card); padding: var(--space-lg); } .story-star { margin-bottom: var(--space-md); } .story-text { min-height: 196px; } .story-text h3 { font-size: 1.85rem; } .story-text p { font-size: 18px; } .reading-note { text-align: left; } .about-layout { grid-template-columns: minmax(0,1fr); gap: var(--space-xl); } .conversation-list dt { font-size: 1.4rem; } .gift-section { grid-template-columns: minmax(0,1fr); gap: var(--space-lg); } .gift-art { min-height: 350px; } .mini-cover { width: 35%; margin-inline: 0; } .mini-cover .cover-title { font-size: 1rem; inset: var(--space-xs) var(--space-2xs) auto; } .gift-copy h2 { max-width: 16ch; } .faq-section { grid-template-columns: minmax(0,1fr); gap: var(--space-xl); padding-bottom: var(--space-2xl); } .faq-section h2 { max-width: 18ch; } .faq-list summary { font-size: var(--text-md); } .footer { padding-top: var(--space-xl); } .footer-top { align-items: flex-start; flex-direction: column; gap: var(--space-lg); padding-bottom: var(--space-xl); } .footer nav { flex-wrap: wrap; gap: var(--space-lg); } .footer a { font-size: var(--text-md); } .footer-bottom { font-size: var(--text-xs); } .modal-spread { grid-template-columns: minmax(0,1fr); } .modal-art { min-height: 205px; background-size: 300% 180%; background-position-y: 57%; } .modal-page { padding: var(--space-lg); min-height: 320px; } .modal-text h2 { font-size: 1.65rem; margin-bottom: var(--space-sm); } .modal-text p { font-size: var(--text-md); } .dialog-heading { padding: var(--space-sm) var(--space-md); font-size: var(--text-md); } .reader-footer { padding: var(--space-md); flex-wrap: wrap; gap: var(--space-sm); } .reader-footer .button { min-height: 44px; font-size: var(--text-sm); } .cart-item { grid-template-columns: 48px minmax(0,1fr) auto; gap: var(--space-sm); } .cart-thumb { width: 48px; height: 72px; } }

/* One scroll reveal, played once per element. Content remains visible without JS. */
.motion-reveal {
  transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.js .motion-reveal.is-pending { opacity: 0; transform: translate3d(0,var(--reveal-distance),0); }
.js .motion-reveal.is-revealed { opacity: 1; transform: none; }
.js .motion-reveal:focus-within { opacity: 1; transform: none; transition: none; }
.book-product .book-cover {
  transform-origin: center 80%;
  transition: transform var(--dur-book-hover) var(--ease-out);
}
.book-product:nth-child(odd) { --book-hover-angle: -1.5deg; }
.book-product:nth-child(even) { --book-hover-angle: 1.5deg; }
.book-product:focus-within .book-cover {
  transform: translateY(var(--book-hover-lift)) rotate(var(--book-hover-angle)) scale(1.025);
}
@media (hover: hover) and (pointer: fine) {
  .book-product:hover .book-cover {
    transform: translateY(var(--book-hover-lift)) rotate(var(--book-hover-angle)) scale(1.025);
  }
}
@media (prefers-reduced-motion: reduce) {
  .js .motion-reveal, .js .motion-reveal.is-pending, .js .motion-reveal.is-revealed {
    opacity: 1; transform: none; transition: none;
  }
  .book-product .book-cover, .book-product:hover .book-cover, .book-product:focus-within .book-cover {
    transform: none; transition: none;
  }
}

/* Six registered chest poses, scrubbed by scroll before the books rise. */
.treasure-scroll-track { position: relative; width: 100%; align-self: stretch; }
.treasure-scroll-track.is-scrubbing::after { content: ''; display: block; height: var(--treasure-scroll-distance,clamp(720px,130svh,1280px)); }
.treasure-stage.gift-art {
  display: block;
  width: 100%;
  max-width: min(620px,calc((100svh - 32px) * .76));
  min-height: 0;
  aspect-ratio: .76;
  margin-inline: auto;
  isolation: isolate;
}
.treasure-scroll-track.is-scrubbing .treasure-stage { position: sticky; top: var(--treasure-pin-top,16px); }
.treasure-objects { position: absolute; inset: 19.15% 0 0; }
.treasure-ta-da { position: absolute; left: 21%; top: 0; width: 58%; height: auto; overflow: visible; transform-origin: center 60%; fill: var(--color-accent); filter: drop-shadow(0 2px 0 #075055); }
.treasure-ta-da text { font-family: var(--font-display); font-size: 64px; font-weight: 700; letter-spacing: .01em; }
.treasure-stage.is-ready:not(.is-celebrating) .treasure-ta-da { opacity: 0; }
.treasure-chest { position: absolute; left: 10.75%; width: 78.5%; aspect-ratio: 1; bottom: 7%; z-index: 6; pointer-events: none; transform-origin: center 80%; }
.treasure-sparkles { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.treasure-spark { position: absolute; left: 50%; top: 68%; width: clamp(18px,6%,34px); height: auto; color: #e6ad36; fill: currentColor; stroke: none; opacity: 0; transform-origin: center; filter: drop-shadow(0 2px 0 rgb(7 80 85 / .2)); }
.treasure-spark:nth-child(3n + 2) { color: var(--color-accent); }
.treasure-spark:nth-child(3n) { color: var(--color-teal); }
.treasure-frame {
  position: absolute;
  inset: 0;
  background-image: url('assets/treasure-opening-sprites.webp');
  background-size: 300% 200%;
  background-repeat: no-repeat;
  opacity: 0;
  transform-origin: 0 0;
}
.frame-0 { background-position: 0 0; }
.frame-1 { background-position: 50% 0; transform: translate(.935%,-.775%) scale(1.00851); }
.frame-2 { background-position: 100% 0; transform: translate(2.276%,-1.961%) scale(1.01935); }
.frame-3 { background-position: 0 100%; transform: translate(-.417%,10.991%) scale(1.00424); }
.frame-4 { background-position: 50% 100%; transform: translate(1.339%,11.017%) scale(1.00637); }
.frame-body { background-position: 100% 100%; transform: translate(2.688%,10.134%) scale(1.01499); opacity: 1; }
.treasure-books { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.treasure-stage .mini-cover { position: absolute; top: 3%; left: 34.5%; width: 31%; aspect-ratio: 2 / 3; max-width: none; margin: 0; transform-origin: center bottom; opacity: 1; }
.treasure-stage .treasure-book-face { width: 100%; height: 100%; max-width: none; margin: 0; }
@media(min-width: 40.001rem) {
  .gift-copy { position: sticky; top: clamp(24px,20svh,180px); align-self: start; margin-top: clamp(80px,16svh,144px); }
}
.treasure-stage .mini-cover:nth-child(1) { z-index: 1; transform: translate3d(-64%,8%,0) rotate(-13deg); }
.treasure-stage .mini-cover:nth-child(2) { z-index: 3; transform: translate3d(0,-3%,0); }
.treasure-stage .mini-cover:nth-child(3) { z-index: 2; transform: translate3d(64%,8%,0) rotate(13deg); }
@media(max-width: 40rem) { .treasure-stage .mini-cover .cover-title { font-size: clamp(.8rem,3.5vw,1.1rem); } }
