/* Little Worlds experience layer: cinematic arrival, living map, compact navigation, day/evening lighting.
   Loaded after premium.css. External stylesheet only (CSP). Motion is transform/opacity and lives in
   prefers-reduced-motion: no-preference, so reduced-motion readers get the static composition. */

/* Signature motion language: four named moves, transform/opacity only, all gated by prefers-reduced-motion. */
:root{--motion-lift:.18s;--motion-reveal:.3s;--motion-spotlight:.25s;--motion-zoom:.42s}
html{scroll-padding-top:116px;scroll-padding-bottom:84px}
.mood-switch[hidden],.map-panel[hidden]{display:none!important}

/* ---------- Compact navigation: Prep & Pretend | Worlds | Bundles | Free | More ---------- */
.story-header.site-header{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:nowrap}
.story-header .site-nav{display:flex;flex-wrap:nowrap;align-items:center;gap:4px!important;margin-left:auto;font-weight:800}
.story-header .site-nav>a,.nav-more>summary{
  min-height:44px;display:inline-flex;align-items:center;gap:7px;padding:9px 15px;border-radius:9px;
  color:var(--atelier-ink);font:inherit;font-weight:800;text-decoration:none;cursor:pointer;
}
.story-header .site-nav>a[aria-current="page"]{background:var(--atelier-paper);box-shadow:inset 0 -3px var(--atelier-coral)}
.nav-more,.nav-more:last-child{position:relative;margin:0;padding:0;border:0}
.nav-more>summary{list-style:none;transition:background .2s var(--atelier-ease)}
.nav-more>summary::-webkit-details-marker{display:none}
.nav-more>summary::after{content:"";width:7px;height:7px;border:solid currentColor;border-width:0 2px 2px 0;transform:translateY(-2px) rotate(45deg);transition:transform .2s var(--atelier-ease)}
.nav-more[open]>summary{background:var(--atelier-paper)}
.nav-more[open]>summary::after{transform:translateY(1px) rotate(225deg)}
.nav-more>summary:hover{background:var(--atelier-paper);color:var(--atelier-teal)}
.nav-more>summary:focus-visible,.mood-btn:focus-visible,.story-header .site-nav>a:focus-visible{outline:3px solid var(--atelier-coral);outline-offset:2px}
.nav-more-panel{
  position:absolute;right:0;top:calc(100% + 12px);z-index:95;min-width:244px;display:grid;gap:2px;padding:8px;
  background:var(--atelier-paper);border:1px solid var(--atelier-line);border-radius:14px;box-shadow:var(--atelier-shadow-2);
}
.nav-more-panel a{display:flex;align-items:center;min-height:44px;padding:9px 12px;border-radius:9px;color:var(--atelier-ink);font-weight:700;text-decoration:none}
.nav-more-panel a:hover{background:var(--atelier-sky);color:var(--atelier-teal)}
.nav-more-panel a:focus-visible{outline:3px solid var(--atelier-coral);outline-offset:-3px}

.mood-switch{display:inline-flex;padding:3px;gap:2px;background:rgba(198,225,229,.5);border-radius:999px}
.mood-btn{
  display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:6px 13px;border:0;border-radius:999px;
  background:transparent;color:var(--atelier-ink);font:inherit;font-size:.85rem;font-weight:800;cursor:pointer;
  transition:background .2s var(--atelier-ease),color .2s var(--atelier-ease);
}
.mood-btn:hover{background:rgba(255,253,245,.7)}
.mood-btn[aria-pressed="true"]{background:var(--atelier-ink);color:#fffdf5}

/* ---------- Cinematic arrival (home) ---------- */
.book-site .book-workspace:has(.book-engine.is-cover){padding:0!important;min-height:0;overflow:visible}
.book-site .book-workspace:has(.book-engine.is-cover)::before,
.book-site .book-workspace:has(.book-engine.is-cover)::after{display:none}
.book-site .book-engine.is-cover{max-width:none!important;width:100%;min-height:0;margin:0;filter:none;perspective:none;touch-action:pan-y pinch-zoom}
.book-site .book-engine.is-cover::after,.book-site .is-cover .book-spread::after,.is-cover .book-bookmark{display:none}
.book-site .is-cover .book-spread{max-width:none;min-height:0;border-radius:0!important;background:#9ed0dc;box-shadow:none!important;transform:none!important}
.book-site .cover-page{
  position:relative;display:block;isolation:isolate;overflow:hidden;aspect-ratio:auto!important;padding:0!important;
  min-height:clamp(540px,calc(100svh - 122px),1100px)!important;
}
.cover-page picture{position:absolute;inset:0;z-index:-2;display:block}
.book-site .cover-page .cover-art{position:absolute;inset:0;z-index:auto;width:100%;height:100%;object-fit:cover;object-position:center 42%}
/* Soft depth at the foot of the scene; evening wash sits above it. */
.cover-page::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(180deg,transparent 52%,rgba(18,63,87,.30))}
.cover-page::after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:0;mix-blend-mode:multiply;transition:opacity .28s var(--atelier-ease);background:linear-gradient(180deg,#2c3a82,#4a4a92 55%,#7a4f7c)}
.arrival-card{
  position:absolute;left:clamp(18px,5vw,76px);bottom:clamp(18px,6vh,64px);z-index:2;width:min(480px,calc(100% - 36px));
  padding:clamp(22px,2.6vw,34px);background:rgba(255,253,245,.95);border:1px solid rgba(255,255,255,.7);border-radius:20px;
  box-shadow:0 26px 70px rgba(18,63,87,.34),0 4px 14px rgba(18,63,87,.16);
}
.book-site .arrival-card .cover-title{max-width:none;filter:none}
.book-site .arrival-card .cover-title h1{font-size:clamp(2.2rem,4.1vw,3.5rem)!important;line-height:1!important;margin:0 0 12px;color:var(--atelier-ink)}
.book-site .arrival-card .cover-title p{font-size:1.02rem!important;line-height:1.45;margin:0 0 20px;color:var(--atelier-ink-soft)}
.arrival-card .cover-foot{align-items:stretch;gap:0}
.arrival-card .cover-open{justify-content:center;min-width:0;min-height:52px;font-size:1.05rem;width:100%}
.arrival-card .cover-open::before{display:none!important}
.cover-links{display:flex;flex-wrap:wrap;gap:0 22px;margin:8px 0 0}
.cover-links a{display:inline-flex;align-items:center;min-height:44px;color:var(--atelier-ink);font-size:.92rem;font-weight:800;text-decoration:underline;text-underline-offset:4px}
.cover-links a:hover{color:var(--atelier-teal)}
.arrival-card .cover-bottom{margin:2px 0 0;font-size:.74rem;letter-spacing:.06em;text-transform:uppercase;color:var(--atelier-ink-soft)}
.book-workspace:has(.is-cover) .book-hint{display:none}
.book-workspace:has(.is-cover) .book-controls{position:static;margin:18px auto}
/* Portrait screens use the printed cover, whose top is open paper: the title sits there and the actions sit on a card below. */
@media(max-aspect-ratio:5/4){
  .book-site .cover-page{min-height:clamp(560px,calc(100svh - 178px),1000px)!important}
  .arrival-card{display:contents}
  .book-site .arrival-card .cover-title{position:absolute;top:clamp(18px,5vh,56px);left:18px;right:18px;z-index:2;text-align:center}
  .book-site .arrival-card .cover-title h1{font-size:clamp(2rem,9vw,3.4rem)!important;margin-bottom:10px}
  .book-site .arrival-card .cover-title p{font-size:.98rem!important;margin:0 auto;max-width:34ch}
  .arrival-card .cover-foot{position:absolute;left:50%;bottom:12px;z-index:2;width:min(520px,calc(100% - 24px));padding:16px 18px 8px;transform:translateX(-50%);background:rgba(255,253,245,.95);border-radius:16px;box-shadow:0 18px 44px rgba(18,63,87,.3)}
  .cover-links{justify-content:center}
  .arrival-card .cover-bottom{display:none}
}
@media(max-height:560px) and (min-width:701px){
  .arrival-card{padding:16px 22px}.book-site .arrival-card .cover-title p{display:none}
}

/* ---------- Living map (desktop; phones keep the direct link grid) ---------- */
.world-map>svg.map-ambient{position:absolute;inset:0;z-index:2;width:100%!important;height:100%!important;overflow:hidden;pointer-events:none}
.map-dusk{position:absolute;inset:0;z-index:1;pointer-events:none;opacity:0;mix-blend-mode:multiply;transition:opacity .28s var(--atelier-ease);background:linear-gradient(180deg,#23336d,#3d4580 55%,#6a4a78)}
.map-veil{position:absolute;inset:0;z-index:3;pointer-events:none;opacity:0;transition:opacity .25s var(--atelier-ease);background:rgba(14,38,56,.38)}
.amb-cloud{fill:#fff;opacity:.5}
.amb-route{fill:none;stroke:rgba(255,255,255,.75);stroke-width:3;stroke-dasharray:4 13;stroke-linecap:round;opacity:.6}
.amb-plane{opacity:0}
.amb-plane path{fill:#fffdf5;stroke:#123f57;stroke-width:.9;stroke-linejoin:round}
.amb-letter{opacity:0}
.amb-letter rect{fill:#fffdf5;stroke:#123f57;stroke-width:2}
.amb-letter path{fill:none;stroke:#123f57;stroke-width:2;stroke-linejoin:round}
.amb-bakery{opacity:.24}
.amb-ripple{fill:none;stroke:#fff;stroke-width:3;stroke-linecap:round;opacity:.5}
.amb-night{opacity:0;transition:opacity .28s var(--atelier-ease)}
.amb-lighthouse{transform-origin:184px 716px;opacity:.55}
/* Five quiet world gestures. SVG is decorative and never intercepts clicks. */
.amb-little-worlds{pointer-events:none}
.amb-steam{fill:none;stroke:#fff8e6;stroke-width:3.2;stroke-linecap:round;opacity:0}
.amb-awning{fill:none;stroke:#f7d4a0;stroke-width:3.2;stroke-linecap:round;opacity:.12}
.amb-drop{stroke:#b9e6f5;stroke-width:3.6;stroke-linecap:round;opacity:0}
.amb-wheel{fill:none;stroke:#f8e0ad;stroke-width:2.4;opacity:0}
.amb-fire-road{fill:none;stroke:#e8f2f4;stroke-width:1.5;stroke-linecap:round;opacity:.1}
.amb-post-spark{stroke:#fff7d5;stroke-width:2.2;stroke-linecap:round;fill:none;opacity:0;transform-box:fill-box;transform-origin:center}


/* Spotlight and dimming: native hover and keyboard focus, no script needed. */
.world-map .map-stop{transition:opacity var(--motion-spotlight) var(--atelier-ease),background-color .18s}
.world-map .map-stop::before{
  content:"";position:absolute;left:50%;top:50%;z-index:-1;width:300px;height:300px;margin:-150px 0 0 -150px;border-radius:50%;pointer-events:none;
  background:radial-gradient(circle,rgba(255,249,224,.78) 0,rgba(255,249,224,.3) 38%,transparent 68%);
  opacity:0;transform:scale(.7);transition:opacity .25s var(--atelier-ease),transform .35s var(--atelier-ease-out);
}
.world-map .map-stop:is(:hover,:focus-visible){background:var(--atelier-paper);box-shadow:0 0 0 3px rgba(255,255,255,.75),0 10px 26px rgba(18,63,87,.38)}
.world-map .map-stop:is(:hover,:focus-visible)::before{opacity:1;transform:scale(1)}
.world-map:has(.map-stop:hover) .map-veil,
.world-map:has(.map-stop:focus-visible) .map-veil{opacity:1}
.world-map:has(.map-stop:hover) .map-stop:not(:hover),
.world-map:not(:has(.map-stop:hover)):has(.map-stop:focus-visible) .map-stop:not(:focus-visible){opacity:.42}
.world-map.has-panel .map-peek{display:none!important}

.map-panel{
  display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px 24px;max-width:960px;min-height:164px;
  margin:22px auto 0;padding:16px 22px;background:var(--atelier-paper);border:1px solid var(--atelier-line);border-radius:14px;box-shadow:var(--atelier-shadow-1);color:var(--atelier-ink);
}
.map-panel-img{width:92px;height:auto;aspect-ratio:600/776;object-fit:contain;border-radius:6px;box-shadow:0 6px 16px rgba(18,63,87,.2)}
.map-panel-copy{display:grid;gap:5px;min-width:0}
.map-panel-name{margin:0;font-family:Bree,Georgia,serif;font-size:1.45rem;line-height:1.15}
.map-panel-headline{margin:0;font-weight:800;color:var(--atelier-teal)}
.map-panel-desc{margin:0;font-size:.92rem;line-height:1.45;color:var(--atelier-ink-soft)}
.map-panel-meta{margin:2px 0 0;font-size:.82rem;font-weight:800}
.map-panel-enter{white-space:nowrap;align-self:center}
.map-panel:not([data-world]){display:flex;justify-content:center}
.map-panel-empty{margin:0;max-width:52ch;text-align:center;color:var(--atelier-ink-soft);font-weight:700}
@media(max-width:700px){
  .world-map>svg.map-ambient,.map-dusk,.map-veil,.map-panel{display:none!important}
  .world-map .map-stop::before{display:none}
}
@media(min-width:701px) and (max-width:1050px){
  .map-panel{grid-template-columns:auto minmax(0,1fr);}
  .map-panel-enter{grid-column:1/-1;justify-self:start}
}

/* ---------- Motion: transform/opacity only, and only when motion is welcome ---------- */
@media(prefers-reduced-motion:no-preference){
  .book-site .cover-page .cover-art{animation:arrival-image-reveal .72s var(--atelier-ease-out) both}
  .arrival-card{animation:arrival-rise .58s .18s var(--atelier-ease-out) both}
  @media(max-aspect-ratio:5/4){.arrival-card{animation:none}.arrival-card .cover-title{animation:arrival-rise .52s .12s var(--atelier-ease-out) both}.arrival-card .cover-foot{animation:arrival-foot .52s .22s var(--atelier-ease-out) both}}
  .amb-cloud-a{animation:amb-drift 28s linear infinite alternate}
  .amb-cloud-b{animation:amb-drift 34s linear -9s infinite alternate-reverse}
  .amb-plane{animation:amb-fly 15s linear infinite}
  .amb-letter{animation:amb-mail 8s ease-out infinite}
  .amb-letter-b{animation-delay:4s}
  .amb-bakery{animation:amb-warm 5.5s linear infinite alternate}
  .amb-ripple{animation:amb-ripple 7s linear infinite alternate}
  .amb-ripple-1{animation-delay:-2.3s}
  .amb-ripple-2{animation-delay:-4.6s}
  .amb-lighthouse{animation:amb-beam 10s linear infinite alternate}
  /* Rare, staggered world gestures. Cycle lengths 19/21/23/26s share no common
     factor, so they do not resynchronise and rarely overlap. Each is visible for
     only a small fraction of its cycle; the rest of the time it is invisible. */
  .amb-beacon{transform-origin:705px 586px;animation:amb-pulse 23s ease-in-out infinite}
  .amb-stall{animation:amb-stallglow 19s ease-in-out infinite;opacity:0}
  .amb-stall-b{animation-duration:21s;animation-delay:-8s}
  .amb-star{animation:amb-twinkle 9s ease-in-out infinite}
  .amb-star-b{animation-duration:11s;animation-delay:-3s}
  .amb-star-c{animation-duration:13s;animation-delay:-6s}
  .amb-shoot{animation:amb-shoot 26s linear infinite}
  .amb-paw{animation:amb-paw 21s ease-in-out infinite}
  /* Staggered micro-gestures, opacity/transform only, long rest intervals. */
  .amb-steam{animation:amb-steam-rise 17s ease-out infinite}
  .amb-steam-b{animation-delay:-8s;animation-duration:19s}
  .amb-awning{animation:amb-awning-breeze 23s ease-in-out infinite}
  .amb-drop{animation:amb-rain-fall 29s ease-in infinite}
  .amb-drop-b{animation-delay:-8s}.amb-drop-c{animation-delay:-16s}
  .amb-wheel{animation:amb-wheel-turn 31s ease-in-out infinite}
  .amb-wheel-b{animation-delay:-1.4s}
  .amb-post-spark{animation:amb-post-glint 27s ease-in-out infinite}

  .map-panel[data-world]>*{animation:panel-in .3s var(--atelier-ease-out) both}
}
@keyframes arrival-image-reveal{from{opacity:.62}to{opacity:1}}
@keyframes arrival-foot{from{opacity:0;transform:translate(-50%,8px)}to{opacity:1;transform:translateX(-50%)}}
@keyframes arrival-rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes amb-drift{from{transform:translateX(-34px)}to{transform:translateX(34px)}}
@keyframes amb-fly{0%{transform:translate(60px,330px);opacity:0}8%{opacity:1}84%{opacity:1}100%{transform:translate(420px,90px);opacity:0}}
@keyframes amb-mail{0%{transform:translateY(12px);opacity:0}14%{opacity:1}70%{opacity:1}100%{transform:translateY(-58px);opacity:0}}
@keyframes amb-warm{from{opacity:.16}to{opacity:.42}}
@keyframes amb-ripple{from{transform:translateX(-12px);opacity:.25}to{transform:translateX(12px);opacity:.6}}
@keyframes amb-beam{from{transform:rotate(-7deg)}to{transform:rotate(7deg)}}
@keyframes amb-pulse{0%,6%{opacity:0}8%{opacity:.85}11%{opacity:.2}14%{opacity:.7}17%{opacity:0}100%{opacity:0}}
@keyframes amb-stallglow{0%,28%{opacity:0}40%{opacity:.34}52%{opacity:.18}64%{opacity:0}100%{opacity:0}}
@keyframes amb-twinkle{0%,100%{opacity:.28}50%{opacity:.9}}
@keyframes amb-shoot{0%,64%{opacity:0;transform:translate(0,0)}66%{opacity:.9}70%{opacity:.55}72%{opacity:0;transform:translate(-26px,18px)}100%{opacity:0;transform:translate(0,0)}}
@keyframes amb-paw{0%,38%,100%{opacity:0;transform:translateY(5px)}42%{opacity:.5;transform:translateY(0)}48%{opacity:.5}54%{opacity:0;transform:translateY(-3px)}}
@keyframes amb-steam-rise{0%,22%,100%{opacity:0;transform:translateY(6px)}27%{opacity:.65}39%{opacity:.52;transform:translateY(-9px)}47%{opacity:0;transform:translateY(-15px)}}
@keyframes amb-awning-breeze{0%,56%,100%{opacity:.12;transform:translateY(0)}61%{opacity:.62;transform:translateY(-3px)}67%{opacity:.5;transform:translateY(0)}73%{opacity:.12}}
@keyframes amb-rain-fall{0%,68%,100%{opacity:0;transform:translateY(-5px)}72%{opacity:.72}80%{opacity:.5;transform:translateY(10px)}86%{opacity:0;transform:translateY(14px)}}
@keyframes amb-wheel-turn{0%,74%,100%{opacity:0;transform:translateX(-5px)}78%{opacity:.68}84%{opacity:.68;transform:translateX(4px)}89%{opacity:0;transform:translateX(8px)}}
@keyframes amb-post-glint{0%,48%,100%{opacity:0;transform:scale(.45)}52%{opacity:.6;transform:scale(1)}57%{opacity:.38;transform:scale(.8)}62%{opacity:0;transform:scale(.45)}}
@keyframes panel-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* ---------- Storytime evening: environment and map lighting only ----------
   Product previews, book pages and the wordmark keep their true colors. */
html[data-mood="evening"]{background:#1d2c52}
html[data-mood="evening"] body.story-site,html[data-mood="evening"] .story-site{background:#1d2c52!important}
html[data-mood="evening"] .book-workspace{background:linear-gradient(180deg,#2a3e72,#1d2c52 72%)}
html[data-mood="evening"] .book-workspace::before{background:radial-gradient(ellipse at center,rgba(255,196,110,.2),rgba(255,196,110,.05) 55%,transparent 74%)}
html[data-mood="evening"] .story-header.site-header{background:rgba(250,238,208,.94)}
/* Explicit opaque controls prevent the evening header's translucent/blurred
   backdrop from swallowing small text and selected/unselected labels. */
html[data-mood="evening"] .story-header .approved-wordmark-tagline{color:#123f57;opacity:1}
html[data-mood="evening"] .story-header .mood-switch{background:#dbe8e5}
html[data-mood="evening"] .story-header .mood-btn{background:#fffdf5;color:#123f57}
html[data-mood="evening"] .story-header .mood-btn[aria-pressed="true"]{background:#123f57;color:#fffdf5}
html[data-mood="evening"] .story-header .mood-btn:hover{background:#eef4ee;color:#123f57}
html[data-mood="evening"] .story-header .mood-btn[aria-pressed="true"]:hover{background:#123f57;color:#fffdf5}

html[data-mood="evening"] .book-hint{color:#d8e0f2!important}
html[data-mood="evening"] .book-controls{background:#2a3f72;box-shadow:0 5px 15px rgba(0,0,0,.28)}
html[data-mood="evening"] .book-controls label,html[data-mood="evening"] #book-status{color:#f3e7c8}
html[data-mood="evening"] .story-footer,html[data-mood="evening"] .story-footer-nav{background:#16223f;color:#d8e0f2;border-color:rgba(216,224,242,.25)}
html[data-mood="evening"] .story-footer a,html[data-mood="evening"] .story-footer summary,html[data-mood="evening"] .story-footer h2{color:#ffe3a1}
html[data-mood="evening"] .book-engine{filter:drop-shadow(0 26px 30px rgba(0,0,0,.4))}
html[data-mood="evening"] .cover-page::after{opacity:1}
html[data-mood="evening"] .map-dusk{opacity:.82}
html[data-mood="evening"] .amb-night{opacity:1}
html[data-mood="evening"] .amb-cloud{opacity:.22}
html[data-mood="evening"] .amb-bakery{opacity:.1}
html[data-mood="evening"] .amb-ripple{stroke:#cfd8ff;opacity:.35}
html[data-mood="evening"] .map-veil{background:rgba(6,14,38,.45)}

/* ---------- Phones: brand and lighting on the first row, one compact nav row beneath ---------- */
@media(max-width:700px){
  html{scroll-padding-top:140px}
  .story-header.site-header{display:flex!important;flex-wrap:wrap;align-items:center;gap:6px 8px;padding:9px 12px!important;min-height:0}
  .story-header .brand{order:1;flex:1 1 auto;min-width:0;width:auto;margin:0}
  .mood-switch{order:2;flex:0 0 auto}
  .mood-btn{padding:6px 9px;min-height:44px;font-size:.78rem;gap:5px}
  .story-header .site-nav{order:3;flex:1 0 100%;display:flex!important;grid-template-columns:none!important;margin:0;justify-content:space-between;gap:2px!important;padding:3px;width:100%;min-width:0}
  .story-header .site-nav>a,.nav-more>summary{flex:1 1 auto;justify-content:center;min-height:44px;padding:8px 6px;font-size:.92rem;line-height:1.2;white-space:nowrap;overflow-wrap:normal;grid-column:auto}
  .nav-more{flex:1 1 auto}.nav-more>summary{width:100%}
  .nav-more-panel{right:-6px;min-width:min(260px,calc(100vw - 36px))}
}

/* =====================================================================================
   Sprint B: Product Theatre, guided chooser, signature pages, sampler envelope, world zoom
   ===================================================================================== */

/* ---------- Product Theatre: real pages on stage, a compact buyer rail beside them ---------- */
.book-site .sample-world.theatre{display:grid;grid-template-columns:minmax(0,1.62fr) minmax(290px,1fr);align-items:stretch}
.theatre .theatre-stage{
  display:grid!important;grid-template-columns:200px minmax(0,1fr);grid-template-areas:"head head" "choices floor" "disc disc";
  align-items:start;align-content:start;gap:18px 26px;padding:30px 32px 22px!important;min-height:0;
}
.theatre .theatre-stage>*{order:0!important}
.theatre-head{grid-area:head;display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:6px 18px}
.book-site .theatre .world-title{display:flex;align-items:center;gap:12px;margin:0;padding:0;background:none;flex:1 1 auto;min-width:0}
.book-site .theatre .world-title :is(h1,h2){font-size:clamp(2rem,3vw,2.7rem)!important;line-height:1.02;margin:0;max-width:none}
.book-site .theatre .world-headline{flex:1 0 100%;order:3;margin:0;padding:0;background:none;font-family:Bree,Georgia,serif;font-size:1.12rem;color:var(--atelier-teal)}
.theatre-buy-jump{
  display:inline-flex;align-items:center;min-height:40px;padding:6px 13px;border:1px solid var(--atelier-line);border-radius:999px;
  background:var(--atelier-paper);color:var(--atelier-ink);font-size:.84rem;font-weight:800;text-decoration:none;white-space:nowrap;
}
.theatre-buy-jump:hover{color:var(--atelier-teal);border-color:var(--atelier-teal)}
.theatre-buy-jump:focus-visible{outline:3px solid var(--atelier-coral);outline-offset:2px}

.theatre .sample-choices{grid-area:choices;display:grid;gap:6px;margin:0;padding:0;border:0;background:none}
.theatre .sample-choices button{
  display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:10px;min-height:66px;padding:7px 9px;margin:0;
  border:1px solid transparent;border-radius:10px;background:rgba(255,253,245,.55);text-align:left;color:var(--atelier-ink);cursor:pointer;
}
.theatre .sample-choices button>img{width:44px;height:57px;object-fit:contain;background:#fff;border-radius:3px;box-shadow:0 2px 6px rgba(18,63,87,.16)}
.theatre .sample-choices strong{font-size:.86rem;line-height:1.2}
.theatre .sample-choices small{display:block;font-size:.74rem;line-height:1.25;color:var(--atelier-ink-soft)}
.theatre .sample-choices button:hover{background:var(--atelier-paper);border-color:var(--atelier-line)}
.theatre .sample-choices button[aria-pressed="true"]{background:var(--atelier-paper);border-color:var(--atelier-ink);padding:7px 9px;box-shadow:inset 3px 0 var(--atelier-coral)}
.theatre .sample-choices button:first-child strong{color:var(--atelier-coral)}
.theatre .sample-choices button:focus-visible{outline:3px solid var(--atelier-coral);outline-offset:2px}

.theatre-floor{grid-area:floor;position:relative;display:grid;place-items:center;min-height:0;padding:6px 0 0;isolation:isolate}
.theatre-layers{position:absolute;inset:4% 0 auto;z-index:-1;display:flex;justify-content:center;pointer-events:none}
.theatre-layers img{width:min(38%,250px);height:auto;background:#fff;border-radius:2px;box-shadow:0 8px 18px rgba(18,63,87,.16);opacity:.92}
.theatre-layers img:first-child{transform:translate(-44%,22px) rotate(-6deg)}
.theatre-layers img:last-child{transform:translate(44%,30px) rotate(5deg)}
.theatre .sample-window{width:100%;display:grid;place-items:center}
.book-site .theatre .sample-stage .scene-sheet.featured-sheet{width:min(100%,400px);box-shadow:0 22px 44px rgba(18,63,87,.24),0 4px 10px rgba(18,63,87,.12)}
.theatre .sample-panel>p{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px;margin:14px 0 0;font-size:.8rem;font-weight:700;color:var(--atelier-ink-soft)}
.signature-badge,.signature-kicker{
  display:inline-block;padding:3px 9px;border-radius:999px;background:var(--atelier-coral);color:#fff;
  font-size:.7rem;font-weight:900;letter-spacing:.06em;text-transform:uppercase;line-height:1.4;
}
.theatre .sample-disclosure{grid-area:disc;margin:4px 0 0!important;max-width:none!important;text-align:center;font-size:.74rem!important}

.book-site .theatre .theatre-rail{display:flex;flex-direction:column;gap:14px;padding:30px 28px 44px!important;background:var(--tint,#eaf4f1)!important}
.book-site .theatre .world-story{margin:0;padding:0;background:none;font-size:.93rem;line-height:1.5;max-width:none}
.signature-callout{display:grid;grid-template-columns:72px minmax(0,1fr);gap:14px;align-items:center;padding:12px;border:1px solid var(--atelier-line);border-radius:12px;background:var(--atelier-paper)}
.signature-thumb{display:block;padding:0;border:0;background:#fff;border-radius:4px;cursor:zoom-in;box-shadow:0 4px 12px rgba(18,63,87,.18)}
.signature-thumb img{display:block;width:72px;height:auto;aspect-ratio:600/776;object-fit:contain}
.signature-thumb:focus-visible{outline:3px solid var(--atelier-coral);outline-offset:3px}
.signature-callout p{display:grid;gap:4px;margin:0;justify-items:start}
.signature-callout strong{font-family:Bree,Georgia,serif;font-size:1.2rem;line-height:1.15;color:var(--atelier-ink)}
.signature-callout small{font-size:.78rem;line-height:1.35;color:var(--atelier-ink-soft)}
.book-site .theatre .world-purchase{display:grid;gap:8px;margin:0;padding:14px 0 0;border-top:1px solid var(--atelier-line);background:none}
.book-site .theatre .book-world-price{margin:0;font-size:1.45rem}
.book-site .theatre .world-editions{margin:0;font-size:.8rem}
.book-site .theatre .buy-buttons{display:flex;flex-wrap:wrap;gap:8px}
.book-site .theatre .buy-buttons .button{flex:1 1 140px;justify-content:center;min-height:46px;font-size:.92rem;padding:10px 14px}
.book-site .theatre .buyer-jump-link{font-size:.86rem;font-weight:800}
.book-site .theatre .book-kit-details{margin:0;padding:4px 0 0!important}
.book-site .theatre .book-kit-details>summary{padding:6px 0}
/* The book spine follows the theatre's column boundary instead of the 50% gutter. */
.book-spread:has(>.theatre)::after,.book-spread:has(.sample-world.theatre)::after{display:none}
.book-site .theatre .theatre-rail::before{content:'';position:absolute;top:0;bottom:0;left:-20px;width:40px;background:linear-gradient(90deg,transparent,#705d3520 43%,#fff8e1 50%,#705d3520 57%,transparent);z-index:5;pointer-events:none}
.book-site .theatre .license-note{margin:0}

@media(max-width:1050px){
  .book-site .sample-world.theatre{grid-template-columns:minmax(0,1.4fr) minmax(260px,1fr)}
  .theatre .theatre-stage{grid-template-columns:minmax(0,1fr);grid-template-areas:"head" "floor" "choices" "disc";padding:26px 22px 20px!important}
  .theatre .sample-choices{grid-template-columns:repeat(5,minmax(0,1fr))}
  .theatre .sample-choices button{grid-template-columns:1fr;justify-items:center;text-align:center;gap:5px;min-height:0;padding:7px 4px}
  .theatre .sample-choices button[aria-pressed="true"]{padding:7px 4px;box-shadow:inset 0 -3px var(--atelier-coral)}
  .theatre .sample-choices small{display:none}
  .theatre .sample-choices strong{font-size:.74rem}
}
@media(max-width:860px){
  .book-site .sample-world.theatre{display:flex;flex-direction:column}
  .book-site .theatre .world-invitation.theatre-rail{display:flex}
  .book-site .theatre .theatre-stage{order:-1}
  .book-site .theatre .theatre-rail::before{display:none}
  .theatre .theatre-rail>.world-purchase{order:-2;border-top:0;padding-top:0}
  .theatre .theatre-rail>.buyer-jump-link{order:-1}
}
@media(max-width:700px){
  .theatre .theatre-stage{padding:22px 14px 16px!important;gap:14px}
  .book-site .theatre .world-title :is(h1,h2){font-size:2.05rem!important}
  .theatre-layers{display:none}
  .book-site .theatre .sample-stage .scene-sheet.featured-sheet{width:min(100%,330px)}
  .theatre .sample-choices{gap:5px}
  .theatre .sample-choices button>img{width:34px;height:44px}
  .theatre .sample-choices strong{font-size:.68rem;line-height:1.2}
  .book-site .theatre .theatre-rail{padding:22px 18px 40px!important}
  .theatre-buy-jump{order:2}
}

/* ---------- Living map: signature page in the information panel ---------- */
.map-panel-sig{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:2px 0 0;font-size:.86rem;font-weight:800;color:var(--atelier-ink)}
.map-panel-sig>span{padding:2px 8px;border-radius:999px;background:var(--atelier-coral);color:#fff;font-size:.68rem;letter-spacing:.06em;text-transform:uppercase}
.chooser-jump{font-weight:800;color:var(--atelier-ink);text-decoration:underline;text-underline-offset:4px;white-space:nowrap}
.chooser-jump:hover{color:var(--atelier-teal)}

/* ---------- Guided chooser: "Show me what I need" ---------- */
.chooser{max-width:960px;margin:26px auto 0;padding:24px 26px 26px;background:var(--atelier-paper);border:1px solid var(--atelier-line);border-radius:16px;box-shadow:var(--atelier-shadow-1);color:var(--atelier-ink);text-align:left;scroll-margin-top:120px}
.chooser-head h2{margin:0 0 4px;font-size:1.65rem!important;line-height:1.15}
.chooser-head p{margin:0;color:var(--atelier-ink-soft);font-size:.95rem}
.chooser-app[hidden]{display:none!important}
.chooser-app{margin-top:18px}
.chooser-fallback{margin-top:16px;padding-top:14px;border-top:1px solid var(--atelier-line)}
.chooser-fallback-title{margin:0 0 6px;font-size:.88rem;font-weight:800}
.chooser-fallback ul{display:flex;flex-wrap:wrap;gap:4px 18px;margin:0;padding:0;list-style:none}
.chooser-fallback a{display:inline-flex;align-items:center;min-height:40px;color:var(--atelier-ink);font-weight:700;font-size:.9rem;text-decoration:underline;text-underline-offset:3px}
.chooser.is-ready .chooser-fallback-title{font-weight:700;color:var(--atelier-ink-soft)}
.chooser-progress{margin:0 0 4px;font-size:.74rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:var(--atelier-coral)}
.chooser-question{margin:0 0 14px;font-size:1.3rem;line-height:1.2;outline:none}
/* Focus moves here programmatically so screen readers hear the next question; it is not a control. */
.chooser-question[tabindex]:focus-visible{outline:none}
.chooser-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px}
.chooser-option{
  display:grid;gap:3px;align-content:start;min-height:64px;padding:12px 14px;border:1px solid var(--atelier-line);border-radius:12px;
  background:#fff;color:var(--atelier-ink);font:inherit;text-align:left;cursor:pointer;
}
.chooser-option strong{font-size:1rem}
.chooser-option small{font-size:.8rem;line-height:1.35;color:var(--atelier-ink-soft)}
.chooser-option:hover{border-color:var(--atelier-teal);background:var(--atelier-sky)}
.chooser-option[aria-pressed="true"]{border-color:var(--atelier-ink);box-shadow:inset 0 0 0 1px var(--atelier-ink)}
.chooser-option:focus-visible,.chooser-back:focus-visible,.chooser-change:focus-visible,.chooser-go:focus-visible{outline:3px solid var(--atelier-coral);outline-offset:2px}
.chooser-back,.chooser-change{min-height:44px;margin-top:14px;padding:8px 14px;border:1px solid var(--atelier-line);border-radius:999px;background:transparent;color:var(--atelier-ink);font:inherit;font-weight:800;cursor:pointer}
.chooser-back:hover,.chooser-change:hover{background:var(--atelier-sky)}
.chooser-answers{display:flex;flex-wrap:wrap;gap:6px 16px;margin:0 0 14px;padding:0;list-style:none;font-size:.86rem}
.chooser-answers li{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.chooser-answers li>span{color:var(--atelier-ink-soft)}
.chooser-change{margin:0;min-height:36px;padding:4px 11px;font-size:.8rem}
.chooser-result-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:12px;margin:0;padding:0;list-style:none}
.chooser-result{display:grid;grid-template-columns:86px minmax(0,1fr);gap:14px;align-items:start;padding:14px;border:1px solid var(--atelier-line);border-radius:14px;background:#fff}
.chooser-result>img{width:86px;height:auto;aspect-ratio:600/776;object-fit:contain;background:#fff;border-radius:3px;box-shadow:0 5px 14px rgba(18,63,87,.2)}
.chooser-result-copy{display:grid;gap:5px;min-width:0}
.chooser-kicker{margin:0;font-size:.7rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:var(--atelier-coral)}
.chooser-result h4{margin:0;font-family:Bree,Georgia,serif;font-size:1.15rem;line-height:1.15}
.chooser-facts{margin:0;font-size:.82rem;font-weight:800}
.chooser-note{margin:0;font-size:.8rem;line-height:1.4;color:var(--atelier-ink-soft)}
.chooser-go{justify-self:start;margin-top:4px;min-height:44px;font-size:.88rem;padding:9px 14px}
@media(max-width:700px){
  .chooser{margin-top:18px;padding:18px 16px 20px}
  .chooser-options{grid-template-columns:1fr}
  .chooser-result{grid-template-columns:70px minmax(0,1fr)}
  .chooser-result>img{width:70px}
}

/* ---------- Free sampler story object: real sampler pages in an illustrated envelope ---------- */
.book-resource .sampler-envelope{display:block;padding:26px 18px 16px;background:var(--atelier-sky);border-radius:16px}
.envelope-scene{position:relative;width:min(100%,500px);aspect-ratio:500/470;margin:0 auto;isolation:isolate}
.envelope-back{position:absolute;left:0;right:0;bottom:0;height:60%;z-index:0;border-radius:12px;background:#d9bf8c}
.book-resource .sampler-envelope .envelope-pages{position:absolute;left:6%;right:6%;top:0;bottom:16%;z-index:1;display:flex;justify-content:center;gap:3%}
.book-resource .sampler-envelope .envelope-pages img{width:45%;height:auto;margin:0!important;align-self:flex-start;background:#fff;box-shadow:0 10px 22px rgba(18,63,87,.22)}
.book-resource .sampler-envelope .envelope-pages img:first-child{transform:translateY(5%) rotate(-5deg)}
.book-resource .sampler-envelope .envelope-pages img:nth-child(2){transform:translateY(1%) rotate(4deg)}
.envelope-front{
  position:absolute;left:0;right:0;bottom:0;height:46%;z-index:2;border-radius:0 0 12px 12px;
  background:linear-gradient(180deg,#f6e6c2,#efd9a9);clip-path:polygon(0 0,50% 34%,100% 0,100% 100%,0 100%);
  box-shadow:inset 0 -2px 6px rgba(18,63,87,.08);
}
.envelope-stamp{position:absolute;right:7%;bottom:16%;display:grid;place-items:center;width:62px;height:72px;border:3px dashed var(--atelier-coral);border-radius:4px;background:#fffdf5;color:var(--atelier-coral);font-family:Bree,Georgia,serif;font-size:1.05rem;transform:rotate(4deg)}
.envelope-address{position:absolute;left:9%;bottom:20%;font-family:Bree,Georgia,serif;font-size:clamp(1rem,2.4vw,1.3rem);line-height:1.15;color:var(--atelier-ink)}
.envelope-lines{position:absolute;left:9%;bottom:10%;width:42%;height:12px;border-top:2px solid rgba(18,63,87,.25);border-bottom:2px solid rgba(18,63,87,.25)}
.book-resource .sampler-envelope figcaption{padding-top:14px;text-align:center}

/* ---------- World zoom: same-document View Transition (book.js marks one element per side) ---------- */
.vt-zoom{view-transition-name:world-zoom}

/* ---------- Motion: Paper lift, Page reveal, Map spotlight (above), World zoom ---------- */
@media(prefers-reduced-motion:no-preference){
  .theatre .sample-choices button,.chooser-option,.chooser-result,.signature-thumb,.theatre-layers img{transition:transform var(--motion-lift) var(--atelier-ease)}
  .theatre.is-browsing .sample-panel:not([hidden]),.chooser-step,.chooser-results{animation:page-reveal var(--motion-reveal) var(--atelier-ease-out) both}
  .book-resource .sampler-envelope .envelope-pages img{animation:envelope-reveal .6s .15s var(--atelier-ease-out) both}
  .book-resource .sampler-envelope .envelope-pages img:nth-child(2){animation-delay:.27s}
  ::view-transition-group(world-zoom){animation-duration:var(--motion-zoom);animation-timing-function:var(--atelier-ease-out)}
  ::view-transition-old(root),::view-transition-new(root){animation-duration:.24s}
}

@media(prefers-reduced-motion:no-preference) and (hover:hover) and (pointer:fine){
  .theatre .sample-choices button:hover,.chooser-option:hover,.chooser-result:hover,.signature-thumb:hover{transform:translateY(-2px)}
}
@media(prefers-reduced-motion:reduce){
  ::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}
}
@keyframes page-reveal{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes envelope-reveal{from{opacity:0;translate:0 26%}to{opacity:1;translate:0 0}}
