/* Sparklins home v2.4 · "Shop-first storybook".
   Hero (layered playroom) → needs + finder → play kits → one pinned peak (trace)
   → bedtime band (drag the sun, no pin) → free library + Box → questions → The End. */

.home main { overflow-x: clip; }
.small { font-size: 0.92rem; }
.page { margin: 0; background: #fff; border-radius: 22px; box-shadow: var(--sc-e3), 0 0 0 10px #FFFBF2, 0 0 0 11px var(--line); overflow: hidden; }
.spread--sunk { background: var(--paper-sunk); }
.btn--big { min-height: 56px; padding: 14px 28px; font-size: 1.12rem; }
.btn--ghost-night { --b: transparent; --t: var(--on-plum); box-shadow: inset 0 0 0 2px #8A78A2; }
.eyebrow--star { color: var(--star); }
.sec-title { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.4rem); }

/* ------------------------------------------------------------ 1 · hero ---- */
.hero { position: relative; padding: calc(var(--hdr-h) + clamp(18px, 3vw, 40px)) 0 0; background:
  radial-gradient(80% 70% at 80% 30%, #FFE9B8 0%, rgba(255,233,184,0) 60%),
  radial-gradient(60% 60% at 0% 100%, #FDE0CF 0%, rgba(253,224,207,0) 70%), var(--paper); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero__kicker { margin: 0 0 16px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: var(--r-pill); background: var(--paper-raised); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 800; font-size: 0.85rem; color: var(--ink); }
.hero__kicker::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--star); box-shadow: 0 0 0 2px var(--ink); }
.hero__title { font-size: clamp(2.5rem, 1.2rem + 3.3vw, 4.3rem); font-weight: 700; line-height: 0.98; letter-spacing: -0.025em; color: var(--ink); }
.hero__title span { display: inline; background: linear-gradient(transparent 70%, color-mix(in oklab, var(--star) 70%, transparent) 70%, color-mix(in oklab, var(--star) 70%, transparent) 92%, transparent 92%); padding: 0 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero__lede { margin: 20px 0 28px; font-size: clamp(1.06rem, 0.98rem + 0.4vw, 1.3rem); line-height: 1.55; max-width: 34ch; color: var(--ink); font-weight: 600; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__fine { margin: 16px 0 0; font-weight: 800; font-size: 0.92rem; color: var(--ink-muted); }

/* The stage: four planes that share one box and move at different rates.
   back: the playroom (framed) · mid: the real product photo · near: the Sparklin ·
   fore: the toy strip, which overlaps both and gives the depth its edge. */
.stage { --mx: 0; --my: 0; --s: 0; position: relative; aspect-ratio: 1.08 / 1; isolation: isolate; }
.stage > * { position: absolute; transform: translate3d(calc(var(--mx) * var(--d, 0) * -18px), calc(var(--my) * var(--d, 0) * -12px + var(--s) * var(--d, 0) * -70px), 0); will-change: transform; }
.stage [data-depth="0.25"] { --d: 0.25; } .stage [data-depth="0.5"] { --d: 0.5; } .stage [data-depth="0.6"] { --d: 0.6; } .stage [data-depth="0.7"] { --d: 0.7; } .stage [data-depth="0.9"] { --d: 0.9; } .stage [data-depth="1.25"] { --d: 1.25; }
.stage__room { inset: 0 0 16% 8%; border-radius: 40px 40px 40px 120px; overflow: hidden; box-shadow: var(--sc-e3); background: #F9E8C8; }
.stage__room img { width: 100%; height: 100%; object-fit: cover; object-position: 78% 60%; }
.stage__photo { margin: 0; left: 0; bottom: 9%; width: 47%; aspect-ratio: 4 / 5; padding: 10px 10px 34px; background: #fff; border-radius: 16px; box-shadow: 0 2px 4px rgba(53,42,70,0.12), 0 26px 40px -14px rgba(53,42,70,0.38); rotate: -5deg; z-index: 2; }
.stage__photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
.stage__mascot { right: 0; bottom: 13%; width: 37%; z-index: 3; }
.stage__mascot img { width: 100%; height: auto; filter: drop-shadow(0 16px 18px rgba(53,42,70,0.22)); }
.stage__bubble { position: absolute; left: -8%; top: -6%; padding: 8px 16px; border-radius: 18px 18px 4px 18px; background: var(--paper-raised); border: 2px solid var(--honey); font-family: var(--sc-font-display); font-weight: 600; font-size: clamp(0.9rem, 0.7rem + 0.5vw, 1.15rem); color: var(--ink); white-space: nowrap; box-shadow: var(--sc-e1); }
.stage__fore { left: -6%; width: 112%; bottom: -7%; height: auto; max-width: none; z-index: 4; pointer-events: none; }
.stage__stk { width: 15%; height: auto; z-index: 1; filter: drop-shadow(0 6px 8px rgba(53,42,70,0.18)); animation: float 6s ease-in-out infinite; }
.stage__stk--rainbow { left: 2%; top: 4%; }
.stage__stk--kite { right: 4%; top: -4%; width: 12%; animation-delay: -2.5s; }
@keyframes float { 50% { translate: 0 -10px; rotate: 4deg; } }

/* trust strip: one honest row of facts */
.trust { list-style: none; margin: clamp(28px, 3.5vw, 44px) auto 0; padding: 18px clamp(16px, 2vw, 28px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; background: var(--paper-raised); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: 0 -1px 0 var(--line), var(--sc-e1); position: relative; z-index: 5; }
.trust li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; }
.trust svg { width: 40px; height: 40px; padding: 8px; border-radius: 50%; background: var(--star); fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.trust strong { display: block; font-family: var(--sc-font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.2; }
.trust span { display: block; font-size: 0.9rem; color: var(--ink-muted); font-weight: 700; line-height: 1.35; }

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__copy { max-width: 40rem; }
  .stage { width: min(100%, 560px); justify-self: center; margin-top: 8px; }
  .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
}
@media (max-width: 560px) {
  .hero { padding-top: calc(var(--hdr-h) + 18px); }
  .hero__title { font-size: clamp(2.3rem, 10.4vw, 3rem); }
  .hero__lede { margin: 14px 0 20px; font-size: 1.04rem; }
  .hero__ctas .btn { flex: 1 1 100%; }
  .hero__fine { text-align: center; font-size: 0.86rem; }
  .stage__bubble { display: none; }
  .trust { grid-template-columns: 1fr 1fr; padding: 16px 14px; gap: 14px 10px; }
  .trust li { grid-template-columns: 34px 1fr; gap: 8px; }
  .trust svg { width: 34px; height: 34px; padding: 7px; }
  .trust strong { font-size: 0.95rem; }
  .trust span { display: none; }
  .trust li { align-items: center; }
}

/* ------------------------------------------------------------ 2 · needs + finder ---- */
.needs { padding: clamp(64px, 9vw, 120px) 0; background: var(--paper-raised); }
.needs__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.needs__doors h2 { font-size: clamp(2rem, 1.2rem + 2.4vw, 3.1rem); }
.needs__sub { margin: 12px 0 24px; font-size: 1.1rem; color: var(--ink); font-weight: 600; }
.doors { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.door { position: relative; display: flex; flex-direction: column; align-items: flex-start; width: 100%; min-height: 176px; padding: 18px 18px 16px; border-radius: var(--r-lg); border: 2px solid transparent; text-align: left; text-decoration: none; color: var(--ink); cursor: pointer; font: inherit; overflow: hidden; transition: transform 160ms var(--sc-ease-out), border-color 160ms var(--sc-ease-out), box-shadow 160ms var(--sc-ease-out); }
.door img { position: absolute; right: -8px; bottom: -10px; width: 92px; height: auto; transition: transform 220ms var(--sc-ease-out); }
.door__q { font-family: var(--sc-font-display); font-weight: 600; font-size: 1.4rem; line-height: 1.1; max-width: 9ch; }
.door__a { margin: 6px 0 14px; max-width: 62%; font-weight: 700; font-size: 0.95rem; line-height: 1.35; color: var(--ink); }
.door i { position: relative; margin-top: auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--paper-raised); font-style: normal; font-weight: 800; box-shadow: var(--sc-e1); }
.door--bored { background: #FFE6A6; } .door--feel { background: #FDD5C6; } .door--bed { background: #E2D8F3; } .door--make { background: #D4ECD3; }
.door:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .door:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: var(--sticker); } .door:hover img { transform: rotate(-6deg) scale(1.06); } }
.door.is-on { border-color: var(--ink); box-shadow: var(--sticker); }

.finder { background: var(--paper); border-radius: var(--r-xl); padding: clamp(20px, 3vw, 34px); box-shadow: var(--sc-e2), inset 0 0 0 1.5px var(--line); scroll-margin-top: calc(var(--hdr-h) + 12px); }
.finder.is-flash { animation: flash 900ms var(--sc-ease-out); }
@keyframes flash { 30% { box-shadow: var(--sc-e2), inset 0 0 0 4px var(--star); } }
.finder__head h3 { font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem); }
.finder__head p { margin: 6px 0 18px; color: var(--ink-muted); font-weight: 700; }
.finder__set { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.finder__set legend { font-weight: 800; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px; }
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.picks--age .pick { width: 48px; height: 48px; padding: 0; border-radius: 50%; font-size: 1.05rem; }
.finder__result { margin-top: 6px; }
.rec { display: grid; grid-template-columns: 132px 1fr; gap: 18px; align-items: start; padding: 16px; border-radius: var(--r-lg); background: var(--paper-raised); box-shadow: var(--sc-e1), inset 0 0 0 1.5px var(--line); animation: rec-in 320ms var(--sc-ease-out); }
@keyframes rec-in { from { opacity: 0; transform: translateY(8px); } }
.rec__art { position: relative; aspect-ratio: 1; border-radius: var(--r-md); display: grid; place-items: center; background: var(--tint, #FFE6A6); overflow: hidden; }
.rec__art img { width: 78%; height: auto; }
.rec__for { margin: 0 0 6px; display: inline-block; padding: 3px 10px; border-radius: var(--r-pill); background: #E2D8F3; color: var(--ink); font-weight: 800; font-size: 0.78rem; }
.rec h4 { margin: 0; font-family: var(--sc-font-display); font-weight: 600; font-size: clamp(1.3rem, 1rem + 0.8vw, 1.6rem); line-height: 1.1; text-transform: none; letter-spacing: -0.01em; color: var(--ink); }
.rec__meta { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 4px; font-weight: 700; font-size: 0.92rem; color: var(--ink); }
.rec__meta li { display: flex; gap: 8px; align-items: baseline; }
.rec__meta li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--honey); translate: 0 -1px; }
.rec__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rec__how { grid-column: 1 / -1; }
.rec__how[hidden] { display: none; }
.finder__more { margin: 16px 0 0; font-size: 0.95rem; color: var(--ink-muted); font-weight: 600; }

.act { margin-top: 4px; border-top: 2px dashed var(--line); padding-top: 16px; }
.act ol { margin: 6px 0 0; padding-left: 1.3em; display: grid; gap: 6px; }
.act h5 { margin: 14px 0 4px; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); font-family: var(--sc-font-text); font-weight: 800; }
.act h5:first-child { margin-top: 0; }
.act__builds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.act__safe { margin: 14px 0 0; padding: 10px 14px; background: var(--tangerine-soft); border-radius: var(--r-sm); font-size: 0.92rem; }
.act__safe strong { color: var(--tangerine); }
.act__pair { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; margin-top: 14px; padding: 12px; border-radius: var(--r-md); background: var(--paper-sunk); }
.act__pair img { width: 56px; height: 70px; object-fit: cover; border-radius: 8px; }
.act__pair p { margin: 0; font-size: 0.92rem; line-height: 1.4; }

@media (max-width: 960px) { .needs__grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .doors { gap: 10px; }
  .door { min-height: 150px; padding: 14px; }
  .door__q { font-size: 1.2rem; }
  .door__a { font-size: 0.86rem; }
  .door img { width: 70px; }
  .door i { display: none; }
  .door { min-height: 158px; }
  .door__a { max-width: 100%; margin-bottom: 52px; }
  .door img { width: 64px; }
  .rec { grid-template-columns: 84px 1fr; gap: 12px; padding: 12px; }
  .rec__btns .btn { flex: 1 1 auto; }
  .act__pair { grid-template-columns: 52px 1fr; } .act__pair .btn { grid-column: 1 / -1; }
  .picks--age .pick { width: 44px; height: 44px; }
  .picks--age { gap: 6px; }
}
@media (max-width: 420px) { .finder { padding: 18px 14px; } .picks--age .pick { width: 40px; height: 40px; min-width: 40px; min-height: 40px; font-size: 1rem; } }

/* ------------------------------------------------------------ 3 · shop ---- */
.shop { padding: clamp(64px, 9vw, 120px) 0; background: var(--paper); }
.shop__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px 32px; margin-bottom: 28px; }
.shop__head h2 { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.4rem); max-width: 16ch; }
.shop__head p { margin: 12px 0 0; font-size: 1.1rem; max-width: 46ch; font-weight: 600; }
.shop__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 24px); }
.kit { display: flex; flex-direction: column; background: var(--paper-raised); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sc-e2), inset 0 0 0 1px var(--line); transition: transform 200ms var(--sc-ease-out), box-shadow 200ms var(--sc-ease-out); }
@media (hover: hover) and (pointer: fine) { .kit:hover { transform: translateY(-4px); box-shadow: var(--sc-e3), inset 0 0 0 1px var(--line); } .kit:hover .kit__media img { transform: scale(1.04); } }
.kit.is-hidden { display: none; }
.kit__media { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--paper-sunk); overflow: hidden; }
.kit__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--sc-ease-out); }
.kit__age { position: absolute; top: 12px; left: 12px; padding: 4px 12px; border-radius: var(--r-pill); background: var(--star); color: var(--on-star); font-family: var(--sc-font-display); font-weight: 700; font-size: 0.88rem; box-shadow: var(--sticker); }
.kit__age--soon { background: var(--tangerine-soft); color: var(--tangerine); box-shadow: none; }
.kit__flag { position: absolute; right: 12px; bottom: 12px; padding: 4px 12px; border-radius: var(--r-pill); background: var(--ink); color: var(--on-plum); font-weight: 800; font-size: 0.8rem; }
.kit__media--box { display: grid; place-items: center; background: radial-gradient(70% 70% at 50% 40%, #3A2D52, var(--night)); }
.kit__media--box img { width: 64%; height: auto; object-fit: contain; }
.kit__body { display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 20px; flex: 1; }
.kit__body h3 { font-size: 1.22rem; line-height: 1.15; }
.kit__body h3 a { text-decoration: none; color: inherit; }
.kit__body p { margin: 0; color: var(--ink-muted); font-size: 0.95rem; line-height: 1.5; font-weight: 600; }
.kit__builds { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.kit__builds li { padding: 3px 10px; border-radius: var(--r-pill); background: var(--meadow-soft); color: var(--meadow); font-weight: 800; font-size: 0.8rem; }
.kit__foot { margin-top: auto; padding-top: 12px; display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.price small { display: block; margin-top: 4px; font-family: var(--sc-font-text); font-size: 0.72rem; font-weight: 700; color: var(--ink-muted); }
.kit__soon { font-weight: 800; font-size: 0.9rem; color: var(--ink-muted); align-self: center; }
.shop__note { margin: 26px 0 0; text-align: center; font-weight: 700; color: var(--ink); }
@media (max-width: 1100px) { .shop__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .shop__grid { grid-template-columns: 1fr; }
  .kit { display: grid; grid-template-columns: 128px 1fr; }
  .kit__media { aspect-ratio: auto; height: 100%; min-height: 200px; }
  .kit__age { top: 8px; left: 8px; font-size: 0.78rem; padding: 3px 9px; }
  .kit__flag { display: none; }
  .kit__body { padding: 14px; gap: 6px; }
  .kit__body h3 { font-size: 1.08rem; }
  .kit__body p { font-size: 0.88rem; }
  .kit__foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .kit__foot .btn { width: 100%; }
  .shop__head .picks { width: 100%; }
}

/* ------------------------------------------------------------ 4 · trace (the one pin) ---- */
.trace { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; gap: clamp(24px, 5vw, 80px); padding: calc(var(--hdr-h) + 20px) clamp(18px, 6vw, 96px) 28px; background: var(--paper-sunk); }
.trace__mat svg { width: 100%; height: auto; display: block; }
.dough { stroke-dasharray: 1 1; }
.dough--A { stroke-dashoffset: calc(1 - clamp(0, (var(--sc-p, 0) - 0.04) / 0.46, 1)); }
.dough--a { stroke-dashoffset: calc(1 - clamp(0, (var(--sc-p, 0) - 0.46) / 0.28, 1)); }
.trace__copy h2 { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.4rem); margin-bottom: 18px; }
.trace__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.trace__steps li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; font-size: 1.05rem; line-height: 1.5; }
.trace__steps b { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--star); box-shadow: inset 0 0 0 2px var(--ink); font-family: var(--sc-font-display); font-weight: 700; }
.trace__buy { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.trace__price { font-weight: 800; color: var(--ink-muted); }
@media (max-width: 860px) {
  .trace { grid-template-columns: 1fr; gap: 14px; align-content: center; padding-top: calc(var(--hdr-h) + 10px); }
  .trace__mat { max-width: 360px; width: 100%; justify-self: center; }
  .trace__steps { gap: 8px; }
  .trace__steps li { font-size: 0.9rem; line-height: 1.42; grid-template-columns: 30px 1fr; gap: 10px; }
  .trace__buy { margin-top: 14px; }
  .trace__steps b { width: 30px; height: 30px; }
  .trace__copy h2 { font-size: 1.9rem; margin-bottom: 10px; }
  .trace__copy .eyebrow { display: none; }
}
@media (max-width: 860px) and (max-height: 760px) { .trace__mat { max-width: 300px; } }
@media (max-width: 860px) and (max-height: 680px) { .trace__mat { max-width: 230px; } .trace__steps li { font-size: 0.88rem; } }

/* ------------------------------------------------------------ 5 · bedtime band ---- */
.bedband { background: var(--night); }
.bed { --n: 0; position: relative; height: clamp(560px, 82vh, 780px); overflow: hidden; background: color-mix(in oklab, #2A2140 calc(clamp(0, (var(--n) - 0.3) / 0.4, 1) * 100%), #FDF1D8); }
.scene { position: absolute; bottom: 0; left: var(--anchor-x, 50%); width: max(100%, calc(82vh * 2.3333)); aspect-ratio: 21 / 9; transform: translateX(calc(var(--anchor-x, 50%) * -1)); }
.scene .layer { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.scene img.layer, .scene .layer > img:not(.sparklin) { width: 100%; height: 100%; object-fit: cover; max-width: none; }
.scene .l-near > img:not(.sparklin) { position: absolute; inset: 0; }
.sparklin { position: absolute; max-width: none; height: auto; }
.bed .night { opacity: clamp(0, (var(--n) - 0.3) / 0.4, 1); }
.bed .l-fore.night { opacity: clamp(0, (var(--n) - 0.46) / 0.12, 1); }
.bed .l-fore:not(.night) { opacity: calc(1 - clamp(0, (var(--n) - 0.46) / 0.12, 1)); }
.bed .dusk { background: radial-gradient(120% 90% at 85% 60%, rgba(252,170,138,0.85), rgba(230,124,77,0.55) 45%, rgba(53,42,70,0) 80%); opacity: calc(sin(var(--n) * 3.1416) * 0.9); mix-blend-mode: multiply; }
.bed .stars i { position: absolute; width: 10px; height: 10px; background: var(--star); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); opacity: clamp(0, (var(--n) - 0.55) * 3, 1); animation: twinkle 3.2s ease-in-out infinite; }
.bed .stars i:nth-child(2n) { animation-delay: -1.1s; width: 7px; height: 7px; }
.bed .stars i:nth-child(3n) { animation-delay: -2s; width: 13px; height: 13px; }
@keyframes twinkle { 50% { transform: scale(0.6); } }
.sparklin--day { left: 54.2%; bottom: 54.6%; width: 12.2%; opacity: calc(1 - clamp(0, (var(--n) - 0.4) / 0.14, 1)); }
.sparklin--night { left: 53.5%; bottom: 52%; width: 15%; opacity: clamp(0, (var(--n) - 0.5) / 0.14, 1); transform: translateY(calc((1 - clamp(0, (var(--n) - 0.5) / 0.3, 1)) * 14%)); }
.bed__scrim { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(70% 90% at 12% 40%, color-mix(in oklab, #FDF1D8 calc((1 - clamp(0, (var(--n) - 0.3) / 0.4, 1)) * 92%), rgba(30,23,41, calc(clamp(0, (var(--n) - 0.3) / 0.4, 1) * 0.88))) 0%, transparent 70%); }
.sun { position: absolute; z-index: 25; left: var(--sun-x, 80%); top: var(--sun-y, 16%); width: clamp(84px, 9vw, 140px); aspect-ratio: 1; padding: 0; border: 0; background: transparent; border-radius: 50%; cursor: grab; touch-action: none; transform: translate(-50%, -50%); opacity: calc(1 - clamp(0, (var(--n) - 0.7) * 5, 1)); }
.sun img { width: 100%; height: 100%; filter: drop-shadow(0 6px 14px rgba(222,133,31,0.35)); animation: sun-pulse 3s ease-in-out infinite; }
@keyframes sun-pulse { 50% { scale: 1.06; } }
.sun:active { cursor: grabbing; }
.sun:focus-visible { outline: 3px solid var(--ink); outline-offset: 6px; }
.bed__day, .bed__night { position: absolute; z-index: 20; left: clamp(18px, 6vw, 96px); top: 50%; width: min(34rem, 46vw); }
.bed__day { transform: translateY(-50%); opacity: calc(1 - clamp(0, var(--n) * 2.2, 1)); pointer-events: var(--day-pe, auto); }
.bed__day h2 { font-size: clamp(2.2rem, 1.3rem + 2.8vw, 3.8rem); color: var(--ink); }
.bed__day p { margin: 14px 0 22px; font-size: 1.15rem; line-height: 1.5; font-weight: 700; color: var(--ink); max-width: 32ch; }
.tuck { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 26px 0 20px; border: 2px solid var(--ink); border-radius: var(--r-pill); background: var(--star); color: var(--ink); font-family: var(--sc-font-display); font-weight: 600; font-size: 1.12rem; white-space: nowrap; cursor: pointer; box-shadow: var(--sticker), var(--sc-e2); }
.tuck svg { color: var(--plum); }
.bed__night { transform: translateY(calc(-50% + (1 - var(--panel, 0)) * 18px)); opacity: var(--panel, 0); pointer-events: var(--night-pe, none); color: var(--on-plum); }
.tonight { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; padding: 10px; border-radius: var(--r-lg); background: var(--night-raised); text-decoration: none; color: var(--on-plum); box-shadow: 0 0 0 1.5px #4A3C62; }
.tonight img { width: 150px; height: 100px; object-fit: cover; border-radius: 14px; }
.tonight strong { display: block; font-family: var(--sc-font-display); font-weight: 600; font-size: clamp(1.3rem, 1rem + 0.9vw, 1.7rem); line-height: 1.12; color: var(--on-plum); }
.tonight em { display: block; margin-top: 4px; font-style: normal; font-weight: 700; color: var(--night-ink-muted); }
.bed__first { margin: 16px 0 20px; font-size: 1.1rem; line-height: 1.55; color: var(--on-plum); max-width: 38ch; }
.bed__ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.bed__again { margin-top: 14px; padding: 6px 2px; border: 0; background: none; color: var(--night-ink-muted); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bed__night .btn:focus-visible, .bed__again:focus-visible { outline-color: var(--star); }
@media (max-width: 860px) {
  .bed { height: clamp(600px, 92svh, 760px); }
  .scene { --anchor-x: 60%; width: max(100%, calc(56svh * 2.3333)); }
  .bed__scrim { background: linear-gradient(to bottom, color-mix(in oklab, #FDF1D8 calc((1 - clamp(0, (var(--n) - 0.3) / 0.4, 1)) * 94%), rgba(30,23,41, calc(clamp(0, (var(--n) - 0.3) / 0.4, 1) * 0.9))) 0%, transparent 62%); }
  .bed__day, .bed__night { left: 18px; right: 18px; width: auto; top: 28px; }
  .bed__day { transform: none; }
  .bed__night { transform: translateY(calc((1 - var(--panel, 0)) * 18px)); }
  .bed__day h2 { font-size: 2rem; }
  .bed__day p { font-size: 1rem; margin: 10px 0 16px; }
  .tonight { grid-template-columns: 96px 1fr; }
  .tonight img { width: 96px; height: 72px; }
  .bed__first { font-size: 0.98rem; margin: 12px 0 14px; }
  .sun { width: 78px; }
}

/* ------------------------------------------------------------ 6 · free library + box ---- */
.free { padding: clamp(64px, 9vw, 120px) 0; background: var(--paper); }
.free__head { margin-bottom: 28px; }
.free__head h2 { font-size: clamp(2rem, 1.2rem + 2.4vw, 3.2rem); }
.free__head p { margin: 10px 0 0; font-size: 1.1rem; font-weight: 600; }
.free__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.free__card { display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 22px; border-radius: var(--r-lg); background: var(--paper-raised); box-shadow: var(--sc-e1), inset 0 0 0 1px var(--line); }
.free__card h3 { font-size: 1.35rem; margin-top: 6px; }
.free__card p { margin: 0 0 8px; color: var(--ink-muted); font-weight: 600; line-height: 1.5; flex: 1; }
.free__card .btn { align-self: flex-start; }
.free__art { height: 160px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; gap: 6px; overflow: hidden; }
.free__card--act .free__art { background: #FFE6A6; } .free__card--story .free__art { background: #E2D8F3; } .free__card--tools .free__art { background: #D4ECD3; }
.free__card--act .free__art img { width: 30%; height: auto; }
.free__card--act .free__art img:nth-child(2) { translate: 0 -10px; }
.free__art--photo img { width: 100%; height: 100%; object-fit: cover; }
.free__card--tools .free__art img { height: 88%; width: auto; }

.box { margin-top: clamp(28px, 4vw, 48px); display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 0.8fr); gap: clamp(18px, 3vw, 40px); align-items: center; padding: clamp(22px, 3vw, 40px); border-radius: var(--r-xl); background: radial-gradient(80% 120% at 0% 0%, #3A2D52, var(--night)); color: var(--on-plum); scroll-margin-top: calc(var(--hdr-h) + 12px); }
.box__pose { width: 150px; height: auto; }
.box h2 { font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.4rem); color: var(--on-plum); }
.box__copy > p:not(.eyebrow) { margin: 10px 0 0; color: var(--on-plum); line-height: 1.55; }
.wait__label { display: block; font-weight: 800; font-size: 0.85rem; margin-bottom: 8px; color: var(--on-plum); }
.wait__row { display: flex; flex-wrap: wrap; gap: 10px; }
.wait select { min-height: 48px; padding: 0 40px 0 16px; border-radius: var(--r-pill); border: 2px solid #8A78A2; background: var(--night-raised); color: var(--on-plum); font-weight: 800; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFF2DF' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; }
.wait select:focus-visible, .box .btn:focus-visible { outline-color: var(--star); }
.wait__fine { margin: 10px 0 0; font-size: 0.85rem; color: var(--night-ink-muted); }
@media (max-width: 960px) { .free__grid { grid-template-columns: 1fr; } .free__card { display: grid; grid-template-columns: 120px 1fr; column-gap: 16px; align-items: start; } .free__art { grid-row: 1 / span 3; height: 120px; } .free__card h3 { margin-top: 0; } .free__card .btn { grid-column: 2; } .box { grid-template-columns: 1fr; } .box__pose { width: 110px; } }
@media (max-width: 560px) { .free__card { grid-template-columns: 88px 1fr; padding: 14px; } .free__art { height: 88px; } .free__card h3 { font-size: 1.12rem; } .free__card p { font-size: 0.9rem; } .wait__row .btn, .wait select { width: 100%; } }

/* ------------------------------------------------------------ 7 · questions ---- */
.ask { padding: clamp(64px, 9vw, 120px) 0; background: var(--paper-raised); }
.ask__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.ask__head img { width: 120px; height: auto; margin-bottom: 12px; }
.ask__head h2 { font-size: clamp(2rem, 1.2rem + 2.4vw, 3.2rem); }
.ask__head p { margin: 14px 0 0; font-size: 1.05rem; line-height: 1.6; font-weight: 600; }
.ask__list details { border-bottom: 1.5px solid var(--line); }
.ask__list details:first-child { border-top: 1.5px solid var(--line); }
.ask__list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 4px; font-family: var(--sc-font-display); font-weight: 600; font-size: 1.15rem; color: var(--ink); }
.ask__list summary::-webkit-details-marker { display: none; }
.ask__list summary::after { content: "+"; flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--star); font-size: 1.3rem; line-height: 1; }
.ask__list details[open] summary::after { content: "–"; }
.ask__list p { margin: 0 4px 18px; line-height: 1.6; color: var(--ink); max-width: 60ch; }
@media (max-width: 860px) { .ask__grid { grid-template-columns: 1fr; } .ask__head img { width: 90px; } .ask__list summary { font-size: 1.04rem; } }

/* ------------------------------------------------------------ 8 · the end ---- */
.theend { padding: clamp(80px, 12vw, 150px) 0 clamp(64px, 9vw, 110px); text-align: center; background: var(--night); color: var(--on-plum); }
.theend__inner { display: grid; justify-items: center; }
.theend__pose { width: 150px; height: auto; margin-bottom: 18px; }
.theend__title { margin: 0; font-family: var(--sc-font-display); font-weight: 700; font-size: clamp(3.6rem, 2rem + 7vw, 8rem); line-height: 0.95; color: var(--star); letter-spacing: -0.02em; }
.theend__line { margin: 14px 0 28px; font-size: 1.25rem; font-weight: 600; color: var(--on-plum); }
.theend__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.theend .btn:focus-visible { outline-color: var(--star); }
@media (max-width: 560px) { .theend__ctas .btn { flex: 1 1 100%; } }

/* ------------------------------------------------------------ reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .stage > * { transform: none !important; }
  .stage__stk, .sun img { animation: none; }
  .dough { stroke-dashoffset: 0 !important; }
  .rec { animation: none; }
}

/* v2.5: popular topics on home, three-up shop grid, shop card heading */
.popular { margin-top: clamp(24px, 3vw, 36px); }
.popular h3 { font-size: 1.15rem; margin-bottom: 12px; }
.shop__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .shop__grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .shop__grid--3 { grid-template-columns: 1fr; } }
.kit__h { font-size: 1.22rem; line-height: 1.15; }
.kit__h a { text-decoration: none; color: inherit; }
