/* Qasaskids — shared styles. Bangla and English, phone to big screen. */
:root{
  --night:#0b1a33; --night-2:#06102a; --ink:#2D1450; --ink-soft:#4A3A63; --cream:#FFFBF2; --cream-2:#FFF8EE;
  --sun:#FFD23F; --sun-dark:#D9A400; --clay:#E07B5A; --clay-dark:#B85A3C; --forest:#2A5A45; --forest-dark:#173A2B; --plum:#6B2D8A;
  --wood:#B9773F; --wood-dark:#8E5427; --wood-in:#5a3418; --plank-top:#D89A5C;
  --font-display:'Fredoka', 'Baloo Da 2', system-ui, sans-serif;
  --font-body:'Nunito', 'Hind Siliguri', system-ui, sans-serif;
  --font-story:'Fraunces', Georgia, serif;
  --radius:28px; --gutter:clamp(16px, 4vw, 64px);
}
html[lang="bn"]{ --font-display:'Baloo Da 2', 'Fredoka', system-ui, sans-serif; --font-body:'Hind Siliguri', 'Nunito', system-ui, sans-serif; --font-story:'Baloo Da 2', Georgia, serif; }
*{ box-sizing:border-box; }
html,body{ margin:0; }
body{ background:var(--night); color:var(--cream-2); font-family:var(--font-body); font-size:18px; line-height:1.5; -webkit-font-smoothing:antialiased; min-height:100svh; overflow-x:hidden; }
img{ max-width:100%; display:block; }
a{ color:inherit; }
button{ font:inherit; cursor:pointer; }
:focus-visible{ outline:3px solid var(--sun); outline-offset:3px; border-radius:12px; }
[hidden]{ display:none !important; }
.sr-only{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* ---------- animation ---------- */
@keyframes fadeUp{ from{opacity:0; transform:translateY(28px)} to{opacity:1; transform:none} }
@keyframes popIn{ from{opacity:0; transform:translateY(26px) scale(.88)} to{opacity:1; transform:none} }
@keyframes ffdrift{ 0%{transform:translate(0,0)} 25%{transform:translate(14px,-22px)} 50%{transform:translate(-8px,-36px)} 75%{transform:translate(-18px,-14px)} 100%{transform:translate(0,0)} }
@keyframes fftwinkle{ 0%,100%{opacity:.25} 50%{opacity:1} }
@keyframes ctaGlow{ 0%,100%{box-shadow:0 8px 0 var(--sun-dark),0 0 0 0 rgba(255,210,63,.55)} 50%{box-shadow:0 8px 0 var(--sun-dark),0 0 0 20px rgba(255,210,63,0)} }
@keyframes slowZoom{ from{transform:scale(1.07)} to{transform:scale(1)} }
@keyframes lantern{ 0%,100%{transform:rotate(-6deg)} 50%{transform:rotate(6deg)} }
@keyframes swing{ 0%,100%{transform:rotate(-2.5deg)} 50%{transform:rotate(2.5deg)} }
@keyframes modalIn{ from{opacity:0; transform:translateY(30px) scale(.94)} to{opacity:1; transform:none} }
@keyframes floatBook{ 0%,100%{transform:translateY(0) rotate(-1deg)} 50%{transform:translateY(-12px) rotate(1deg)} }
@keyframes halo{ 0%,100%{opacity:.7; transform:scale(1)} 50%{opacity:1; transform:scale(1.06)} }
@keyframes kenburns{ 0%{transform:scale(1.02) translate(0,0)} 50%{transform:scale(1.14) translate(-3%,-1.5%)} 100%{transform:scale(1.06) translate(2%,-1%)} }
@keyframes pulse{ 0%,100%{box-shadow:0 6px 0 var(--clay-dark),0 0 0 0 rgba(224,123,90,.5)} 50%{box-shadow:0 6px 0 var(--clay-dark),0 0 0 16px rgba(224,123,90,0)} }
.anim-up{ animation:fadeUp .8s ease-out both; }
.d1{animation-delay:.15s} .d2{animation-delay:.3s} .d3{animation-delay:.45s} .d4{animation-delay:.6s}
@media (prefers-reduced-motion: reduce){ *,*::before,*::after{ animation-duration:.01ms !important; animation-iteration-count:1 !important; transition:none !important; } }

/* ---------- backgrounds ---------- */
.bg-soft{ position:fixed; inset:0; z-index:-2; background:var(--night) url('../img/bg-soft.jpg') center/cover no-repeat; }
.bg-soft::after{ content:''; position:absolute; inset:0; background:rgba(6,14,34,.55); }
.fireflies{ position:fixed; inset:0; pointer-events:none; z-index:-1; overflow:hidden; }
.firefly{ position:absolute; border-radius:50%; background:radial-gradient(circle,#FFF6C8 0%,#FFD45A 45%,rgba(255,200,60,0) 72%); box-shadow:0 0 14px 4px rgba(255,210,90,.45); animation:ffdrift var(--d) ease-in-out var(--dl) infinite, fftwinkle var(--t) ease-in-out var(--dl) infinite; }

/* ---------- header ---------- */
.site-header{ position:relative; z-index:5; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px var(--gutter); flex-wrap:wrap; }
.brand{ display:flex; align-items:center; gap:12px; text-decoration:none; color:var(--cream-2); }
.brand-mark{ width:48px; height:48px; border-radius:15px; background:var(--sun); display:grid; place-items:center; flex:none; }
.brand-mark svg{ transform-origin:50% 0; animation:lantern 3s ease-in-out infinite; }
.brand-name{ font-family:'Fredoka', system-ui, sans-serif; font-weight:600; font-size:clamp(22px,2.4vw,30px); }
.header-actions{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.glass{ background:rgba(255,255,255,.12); -webkit-backdrop-filter:blur(18px) saturate(1.4); backdrop-filter:blur(18px) saturate(1.4); border:1.5px solid rgba(255,255,255,.3); box-shadow:inset 0 1px 0 rgba(255,255,255,.3), 0 12px 30px -14px rgba(0,0,0,.5); }
.lang-toggle{ display:flex; padding:5px; border-radius:999px; gap:4px; }
.lang-toggle button{ border:0; background:transparent; color:var(--cream-2); font-weight:800; font-size:16px; padding:8px 14px; border-radius:999px; min-height:40px; }
.lang-toggle button[aria-pressed="true"]{ background:rgba(255,255,255,.92); color:var(--ink); }
.lang-toggle .bn{ font-family:'Baloo Da 2', sans-serif; }
.icon-btn{ width:48px; height:48px; border-radius:50%; display:grid; place-items:center; color:var(--cream-2); border:1.5px solid rgba(255,255,255,.3); background:rgba(255,255,255,.12); }
.icon-btn .off{ display:none; } .icon-btn.is-off .on{ display:none; } .icon-btn.is-off .off{ display:block; }

/* ---------- buttons ---------- */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:12px; border:0; border-radius:999px; text-decoration:none; font-family:var(--font-display); font-weight:600; transition:transform .15s ease; min-height:48px; }
.btn:hover{ transform:translateY(-2px); }
.btn:active{ transform:translateY(2px); }
.btn-sun{ background:var(--sun); color:var(--ink); box-shadow:0 7px 0 var(--sun-dark); padding:14px 30px; font-size:20px; }
.btn-sun.big{ font-size:clamp(22px,2.4vw,32px); padding:clamp(16px,1.6vw,22px) clamp(32px,3vw,50px); animation:ctaGlow 2.4s ease-in-out 1.4s infinite; }
.btn-outline{ border:2px solid var(--sun); color:var(--sun); background:rgba(6,14,34,.35); padding:10px 24px; font-size:18px; }
.btn-clay{ background:var(--clay); color:#fff; box-shadow:0 6px 0 var(--clay-dark); padding:14px 28px; font-size:20px; }
.btn-forest{ background:var(--forest); color:#fff; box-shadow:0 6px 0 var(--forest-dark); padding:16px 32px; font-size:22px; }
.btn-light{ background:#fff; color:var(--ink); border:2px solid #E8DCF5; padding:12px 24px; font-family:var(--font-body); font-weight:800; font-size:18px; }
.btn-cream{ background:var(--cream-2); color:var(--ink); padding:12px 22px; font-family:var(--font-body); font-weight:800; font-size:18px; }

/* ---------- home ---------- */
.home{ position:relative; min-height:100svh; display:flex; flex-direction:column; overflow:hidden; }
.home-bg{ position:absolute; inset:0; z-index:-2; }
.home-bg img{ width:100%; height:100%; object-fit:cover; animation:slowZoom 9s ease-out both; }
.home-bg::after{ content:''; position:absolute; inset:0; background:linear-gradient(180deg, rgba(6,14,34,.85) 0%, rgba(6,14,34,.45) 40%, rgba(6,14,34,0) 66%); }
.home .fireflies{ position:absolute; }
.hero{ flex:1; display:flex; flex-direction:column; align-items:center; text-align:center; gap:clamp(16px,2vw,28px); padding:clamp(24px,5vh,60px) var(--gutter) 40px; }
.hero h1{ margin:0; font-family:var(--font-display); font-weight:600; font-size:clamp(40px,6.2vw,96px); line-height:1.08; color:#fff; text-shadow:0 6px 30px rgba(0,0,0,.45); max-width:16ch; }
.hero h1 .accent{ color:var(--sun); }
.hero p{ margin:0; font-size:clamp(18px,1.7vw,28px); max-width:38ch; color:#E8EEFF; text-shadow:0 2px 12px rgba(0,0,0,.5); }

/* ---------- footer ---------- */
.site-footer{ position:relative; z-index:2; display:flex; justify-content:center; flex-wrap:wrap; gap:8px 22px; padding:18px var(--gutter) 22px; font-size:16px; font-weight:700; color:#E3E9F7; }
.site-footer a{ text-decoration:none; } .site-footer a:hover{ text-decoration:underline; }

/* ---------- shelf ---------- */
.shelf-page{ min-height:100svh; display:flex; flex-direction:column; position:relative; }
.canopy{ position:absolute; left:0; right:0; top:0; height:300px; background:url('../img/canopy.svg') top center/auto 300px repeat-x; pointer-events:none; z-index:0; opacity:.95; }
.shelf-head{ position:relative; z-index:2; display:flex; flex-direction:column; align-items:center; gap:18px; padding:8px var(--gutter) 0; }
.sign{ position:relative; background:#C98A4E; border:4px solid #8A5226; border-radius:18px; padding:8px 30px; box-shadow:0 10px 0 rgba(0,0,0,.2); transform-origin:50% -40px; animation:swing 4s ease-in-out infinite; }
.sign::before,.sign::after{ content:''; position:absolute; top:-40px; width:4px; height:38px; background:#4A3020; }
.sign::before{ left:22%; } .sign::after{ right:22%; }
.sign h1{ margin:0; font-family:var(--font-display); font-weight:600; font-size:clamp(26px,3vw,42px); color:#FFF8EE; white-space:nowrap; }
.age-filter{ display:flex; flex-wrap:wrap; justify-content:center; gap:4px; padding:6px; border-radius:999px; }
.age-filter button{ border:0; background:transparent; color:#FFF3DD; font-weight:800; font-size:clamp(15px,1.3vw,20px); padding:10px clamp(12px,1.4vw,24px); border-radius:999px; min-height:44px; }
.age-filter button[aria-pressed="true"]{ background:rgba(255,255,255,.92); color:var(--ink); box-shadow:0 6px 16px -6px rgba(0,0,0,.45); }

.room{ position:relative; z-index:1; flex:1; display:flex; flex-direction:column; justify-content:flex-end; margin-top:34px; }
.cases{ position:relative; display:flex; justify-content:center; align-items:flex-end; gap:clamp(24px,8vw,220px); padding:0 var(--gutter); }
.trunk{ position:absolute; left:50%; bottom:0; width:clamp(90px,12vw,220px); height:calc(100% + 340px); transform:translateX(-50%); background:linear-gradient(90deg,#3A2618,#5E3F2B 50%,#3A2618); border-radius:40% 40% 0 0 / 12% 12% 0 0; opacity:.85; z-index:-1; }
.lamp{ position:absolute; left:50%; top:-60px; transform:translateX(-50%); width:70px; z-index:2; }
.case{ position:relative; width:min(640px, 100%); padding:20px 18px 0; background:linear-gradient(180deg,var(--wood),var(--wood-dark)); border-radius:16px 16px 6px 6px; box-shadow:0 30px 40px -24px rgba(0,0,0,.7); }
.case::before{ content:''; position:absolute; left:-10px; right:-10px; top:-10px; height:26px; background:#C98A4E; border-radius:10px; }
.row{ position:relative; }
.row-inner{ display:flex; justify-content:space-around; align-items:flex-end; gap:14px; min-height:270px; padding:30px 10px 0; background:linear-gradient(180deg,#4E2E14,#6E421E); border-radius:8px 8px 0 0; }
.plank{ position:relative; margin:0 -26px; height:76px; background:linear-gradient(180deg,#C88648 0%,#B06A30 14%,#8A4B1E 86%,#5E3112 100%); border-radius:10px; box-shadow:inset 0 6px 0 var(--plank-top); display:flex; justify-content:space-around; align-items:flex-start; padding:12px 36px 0; gap:14px; }
.plank span{ flex:1; max-width:180px; text-align:center; font-weight:800; font-size:clamp(14px,1.1vw,18px); line-height:1.2; color:#fff; text-shadow:0 2px 4px rgba(60,25,5,.6); overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.cubbies{ display:grid; grid-template-columns:1fr 1fr; gap:14px; padding:14px 0 18px; }
.cubby{ height:86px; background:linear-gradient(180deg,#4E2E14,#6E421E); border-radius:8px; display:flex; align-items:flex-end; justify-content:center; padding-bottom:10px; }
.cubby i{ display:block; width:72%; height:52px; background:#D9CDB5; border-radius:8px; box-shadow:0 -10px 0 -4px #E6DBC5; position:relative; }
.cubby i::after{ content:''; position:absolute; left:50%; top:20px; width:48px; height:12px; margin-left:-24px; border-radius:6px; background:#B9AB8F; }
.floor{ position:relative; height:clamp(120px,16vh,200px); background:repeating-linear-gradient(180deg, rgba(74,46,24,.5) 0 2px, transparent 2px 30px), linear-gradient(180deg,#8A5A33,#5E3B20); box-shadow:inset 0 14px 0 #3E2716; }
.floor-inner{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; padding-top:14px; }

.book{ position:relative; width:clamp(120px,9.2vw,176px); aspect-ratio:176/242; flex:none; text-decoration:none; display:block; border:0; padding:0; background:transparent; text-align:left; animation:popIn .6s cubic-bezier(.2,1.4,.4,1) both; transition:transform .18s ease; }
.book img,.book .face{ width:100%; height:100%; object-fit:cover; border-radius:5px 16px 16px 5px; box-shadow:inset 11px 0 0 rgba(0,0,0,.22), 0 18px 24px -12px rgba(0,0,0,.65); }
.book::before{ content:''; position:absolute; left:0; top:0; bottom:0; width:10px; border-radius:5px 0 0 5px; background:rgba(40,20,10,.35); z-index:1; }
.book .face{ display:flex; flex-direction:column; justify-content:space-between; padding:18px 14px 14px 22px; }
.book .face b{ font-family:var(--font-display); font-weight:600; font-size:clamp(17px,1.3vw,24px); line-height:1.15; color:var(--ink); }
.book .lock{ align-self:center; width:44px; height:44px; border-radius:50%; background:rgba(31,74,55,.9); display:grid; place-items:center; }
.book .listen{ position:absolute; left:50%; bottom:12px; transform:translateX(-50%); white-space:nowrap; background:var(--clay); color:#fff; font-size:clamp(13px,1vw,16px); font-weight:800; padding:6px 14px; border-radius:999px; box-shadow:0 3px 0 var(--clay-dark); z-index:2; }
.book.soon{ border:3px dashed rgba(255,243,221,.55); border-radius:16px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; text-align:center; color:#FFF3DD; font-family:var(--font-display); font-weight:600; font-size:clamp(16px,1.2vw,21px); line-height:1.2; padding:0 14px; animation-delay:1s; }
.book.soon::before{ display:none; }
.book.empty{ visibility:hidden; }
.pager{ display:flex; align-items:center; gap:10px; padding:8px; border-radius:999px; }
.pager button{ width:48px; height:48px; border-radius:50%; border:0; background:transparent; color:#FFF3DD; font-family:var(--font-display); font-weight:600; font-size:22px; display:grid; place-items:center; }
.pager .arrow{ background:rgba(255,255,255,.18); }
.pager button[aria-current="page"]{ background:var(--sun); color:var(--ink); }
.pager button:disabled{ opacity:.35; cursor:default; }
.pager-text{ margin:0; font-size:15px; font-weight:800; color:rgba(255,243,221,.85); }

/* ---------- modals ---------- */
.modal{ position:fixed; inset:0; z-index:50; background:rgba(6,14,34,.7); display:grid; place-items:center; padding:var(--gutter); }
.modal[hidden]{ display:none; }
.modal-card{ width:min(620px,100%); max-height:92svh; overflow:auto; background:var(--cream); color:var(--ink); border-radius:32px; padding:clamp(28px,4vw,48px); text-align:center; display:flex; flex-direction:column; align-items:center; gap:16px; box-shadow:0 30px 60px -20px rgba(0,0,0,.6); animation:modalIn .35s ease-out both; }
.modal-card h2{ margin:0; font-family:var(--font-display); font-weight:600; font-size:clamp(28px,3vw,40px); }
.modal-card p{ margin:0; font-size:20px; color:var(--ink-soft); }
.modal-icon{ width:80px; height:80px; border-radius:50%; background:#FFE7A3; display:grid; place-items:center; }
.price{ font-family:var(--font-display); font-weight:600; font-size:28px; color:#B4532F !important; }
.modal-actions{ display:flex; gap:14px; flex-wrap:wrap; justify-content:center; margin-top:6px; }
.note-card{ text-align:left; align-items:flex-start; background:#FFF6DE; background-image:repeating-linear-gradient(180deg, rgba(0,0,0,0) 0 41px, rgba(160,120,60,.18) 41px 43px); transform:rotate(-1deg); position:relative; color:#3A2A1C; width:min(760px,100%); }
.note-card::before{ content:''; position:absolute; left:50%; top:-16px; width:120px; height:34px; margin-left:-60px; background:rgba(255,214,120,.75); border-radius:6px; transform:rotate(2deg); }
.note-card h2{ color:#6B3A12; }
.note-card p{ color:#3A2A1C; font-size:21px; line-height:1.6; }

/* ---------- story: cover ---------- */
.story-page{ min-height:100svh; display:flex; flex-direction:column; }
.cover-view{ flex:1; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:center; gap:clamp(24px,5vw,90px); padding:12px var(--gutter) 24px; max-width:1500px; width:100%; margin:0 auto; }
.cover-art{ position:relative; justify-self:end; width:min(470px,100%); }
.cover-art::before{ content:''; position:absolute; inset:-25%; border-radius:50%; background:radial-gradient(circle, rgba(255,214,130,.42), rgba(255,214,130,0) 62%); animation:halo 4s ease-in-out infinite; z-index:-1; }
.cover-book{ display:block; position:relative; aspect-ratio:470/650; animation:floatBook 5s ease-in-out 1s infinite; }
.cover-book::after{ content:''; position:absolute; left:4.6%; top:2.4%; width:100%; height:100%; border-radius:8px 26px 26px 8px; background:#F3E6C8; box-shadow:6px 0 0 #E2CFA6, 12px 4px 0 #D3BC8E; z-index:-1; }
.cover-book img{ width:100%; height:100%; object-fit:cover; border-radius:8px 26px 26px 8px; box-shadow:inset 22px 0 0 rgba(0,0,0,.25), 0 40px 60px -24px rgba(0,0,0,.7); }
.cover-book .spine{ position:absolute; left:0; top:0; bottom:0; width:5.5%; border-radius:8px 0 0 8px; background:rgba(40,20,10,.4); }
.cover-book .cover-title{ position:absolute; left:10%; right:6%; top:6%; text-align:center; font-family:var(--font-story); font-weight:700; font-size:clamp(28px,3.2vw,50px); line-height:1.05; color:#FFF8EE; text-shadow:0 3px 12px rgba(0,0,0,.4); }
.cover-info{ display:flex; flex-direction:column; gap:22px; max-width:680px; }
.kicker{ margin:0; font-size:18px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:var(--sun); }
html[lang="bn"] .kicker{ letter-spacing:0; text-transform:none; font-size:20px; }
.cover-info h1{ margin:0; font-family:var(--font-story); font-weight:700; font-size:clamp(40px,5vw,84px); line-height:1.05; }
.cover-info p.blurb{ margin:0; font-size:clamp(18px,1.6vw,26px); color:#E3E9F7; }
.cover-cta{ display:flex; align-items:center; gap:22px; flex-wrap:wrap; }
.meta{ font-size:18px; font-weight:800; color:#E3E9F7; }
.chips{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.chip{ border:2px solid rgba(255,248,238,.5); background:transparent; color:#FFF8EE; border-radius:999px; padding:10px 22px; font-size:18px; font-weight:800; min-height:44px; }
.chip[aria-pressed="true"]{ background:#FFF8EE; color:var(--ink); border-color:#FFF8EE; }
.chip.bn{ font-family:'Baloo Da 2', sans-serif; }
.cover-foot{ display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; padding:0 var(--gutter) 22px; }
.cover-foot .site-footer{ padding:0; }
.note-btn{ display:inline-flex; align-items:center; gap:10px; color:#FFF8EE; border-radius:999px; padding:10px 22px; font-size:18px; font-weight:800; min-height:44px; }

/* ---------- story: reader ---------- */
.reader-view{ flex:1; display:flex; flex-direction:column; padding:0 var(--gutter) 24px; }
.reader-top{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 0; flex-wrap:wrap; }
.dots{ display:flex; align-items:center; gap:10px; font-weight:800; color:#FFF8EE; }
.dots i{ display:block; width:12px; height:12px; border-radius:999px; background:rgba(255,255,255,.35); transition:width .3s ease; }
.dots i.on{ background:var(--sun); } .dots i.cur{ width:34px; }
.book-spread{ position:relative; display:grid; grid-template-columns:1fr 1fr; width:min(1660px,100%); margin:0 auto; border-radius:36px; overflow:hidden; box-shadow:0 40px 80px -30px rgba(0,0,0,.7), 0 14px 0 #E2CFA6; animation:modalIn .7s cubic-bezier(.2,1,.3,1) both; color:var(--ink); }
.page{ padding:clamp(24px,3.4vw,60px) clamp(22px,3.6vw,70px); display:flex; flex-direction:column; gap:16px; min-height:min(78svh,880px); }
.page.left{ background:linear-gradient(90deg,#FFFBF2 80%,#F3E9D3); }
.page.right{ background:linear-gradient(90deg,#EFE3C8,#FFFBF2 18%); }
.scene{ position:relative; border-radius:24px; overflow:hidden; background:var(--night); aspect-ratio:688/600; box-shadow:0 18px 30px -18px rgba(45,20,80,.5); }
.scene img,.scene video{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transform-origin:40% 50%; animation:kenburns 22s ease-in-out infinite; }
.scene.paused img{ animation-play-state:paused; }
.scene .fireflies{ position:absolute; z-index:1; }
.scene .tag{ position:absolute; left:16px; top:16px; z-index:2; display:inline-flex; align-items:center; gap:8px; padding:7px 14px; border-radius:999px; color:#fff; font-size:15px; font-weight:800; }
.scene .bar{ position:absolute; left:0; right:0; bottom:0; height:6px; background:rgba(255,255,255,.18); z-index:2; }
.scene .bar i{ display:block; height:100%; width:0; background:var(--sun); transition:width .3s linear; }
.page h1{ margin:0; font-family:var(--font-story); font-weight:700; font-size:clamp(28px,2.6vw,46px); line-height:1.1; }
.small{ margin:0; font-size:17px; color:var(--ink-soft); }
.small b{ color:var(--plum); }
.story-text{ margin:0; font-family:var(--font-story); font-weight:600; font-size:clamp(22px,1.9vw,36px); line-height:1.62; }
html[lang="bn"] .story-text{ line-height:1.75; }
.story-text .cap{ float:left; font-size:3.4em; line-height:.82; padding:8px 12px 0 0; color:var(--plum); }
.story-text .w{ color:#7A6A92; transition:color .2s, background .2s; border-radius:8px; }
.story-text .w.read{ color:var(--ink); }
.story-text .w.now{ color:var(--ink); background:#FFE58A; box-shadow:0 0 0 4px #FFE58A; }
.notice{ margin:0; font-size:15px; font-weight:700; color:var(--plum); background:#F1E8FB; border-radius:12px; padding:8px 14px; }
.player{ margin-top:auto; display:flex; flex-direction:column; gap:16px; }
.progress{ display:flex; align-items:center; gap:14px; font-size:16px; font-weight:800; color:var(--ink-soft); }
.progress .track{ flex:1; height:12px; border-radius:999px; background:#EADFF7; overflow:hidden; }
.progress .track i{ display:block; height:100%; width:0; background:var(--plum); transition:width .3s linear; }
.controls{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.controls .mid{ display:flex; align-items:center; gap:18px; }
.round{ width:56px; height:56px; border-radius:50%; border:0; background:#F1E8FB; display:grid; place-items:center; }
.round:disabled{ opacity:.35; cursor:default; }
.play{ width:88px; height:88px; border-radius:50%; border:0; background:var(--clay); display:grid; place-items:center; box-shadow:0 6px 0 var(--clay-dark); }
.play.playing{ animation:pulse 2.2s ease-in-out infinite; }
.play .i-play{ display:none; } .play.paused .i-play{ display:block; } .play.paused .i-pause{ display:none; }
.end-card{ width:min(1080px,100%); text-align:left; display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:40px; align-items:start; }
.end-card .left{ display:flex; flex-direction:column; gap:16px; align-items:flex-start; }
.end-card h2{ font-family:var(--font-story); font-size:clamp(30px,3.4vw,50px); line-height:1.1; }
.source-box{ border-radius:20px; background:#F1E8FB; padding:20px 24px; display:flex; flex-direction:column; gap:6px; width:100%; }
.source-box b{ font-size:16px; letter-spacing:.06em; text-transform:uppercase; color:var(--plum); }
.source-box span{ font-family:var(--font-story); font-weight:600; font-size:24px; color:var(--ink); }
.up-next{ display:flex; flex-direction:column; gap:14px; border-left:2px dashed #E8DCF5; padding-left:36px; }
.up-next img{ width:100%; aspect-ratio:3/4; max-height:300px; object-fit:cover; border-radius:6px 20px 20px 6px; box-shadow:inset 12px 0 0 rgba(0,0,0,.22), 0 18px 30px -14px rgba(0,0,0,.5); }
.up-next strong{ font-family:var(--font-display); font-weight:600; font-size:26px; }

/* ---------- sign up + info ---------- */
.center-page{ min-height:100svh; display:flex; flex-direction:column; }
.logo-big{ display:flex; flex-direction:column; align-items:center; gap:4px; text-align:center; padding:8px var(--gutter) 22px; }
.logo-big b{ font-family:'Fredoka', sans-serif; font-weight:700; font-size:clamp(40px,4vw,60px); color:#F6E3B4; }
.logo-big span{ font-size:20px; font-weight:700; color:#E9DCC0; }
.card{ width:min(640px, calc(100% - 2 * var(--gutter))); margin:0 auto; background:var(--cream); color:#1F3A2E; border-radius:36px; padding:clamp(28px,4vw,48px); box-shadow:0 40px 80px -30px rgba(0,0,0,.7); animation:modalIn .7s cubic-bezier(.2,1.1,.4,1) .1s both; display:flex; flex-direction:column; gap:16px; }
.card h1{ margin:0; font-family:var(--font-display); font-weight:600; font-size:clamp(36px,4vw,52px); color:#1F4A37; }
.card p{ margin:0; font-size:19px; color:#3E5248; }
.card label{ font-size:19px; font-weight:800; color:#1F4A37; margin-top:4px; }
.card input[type="email"]{ height:64px; border-radius:18px; border:2px solid #E2D6B6; background:#FBF4E2; padding:0 20px; font:inherit; font-size:20px; color:#1F3A2E; }
.code-row{ display:flex; gap:10px; justify-content:space-between; }
.code-row input{ width:100%; max-width:72px; height:84px; text-align:center; border-radius:18px; border:2px solid #E2D6B6; background:#FBF4E2; font-family:'Fredoka', sans-serif; font-size:36px; color:#1F3A2E; }
.divider{ display:flex; align-items:center; gap:14px; color:#6C7A72; font-weight:700; }
.divider::before,.divider::after{ content:''; flex:1; height:2px; background:#EAE0C8; }
.link-btn{ border:0; background:transparent; color:var(--forest); font-weight:800; text-decoration:underline; padding:6px; font-size:18px; }
.toast{ margin:0; border-radius:14px; padding:12px 16px; background:#FFF0B8; color:#5A4200 !important; font-weight:700; }
.toast.err{ background:#FFE1D8; color:#8A2A12 !important; }
.info-wrap{ width:min(1120px, calc(100% - 2 * var(--gutter))); margin:0 auto 24px; }
.info-tabs{ display:flex; flex-wrap:wrap; gap:4px; padding:6px; border-radius:999px; width:max-content; max-width:100%; margin:0 auto 22px; }
.info-tabs a{ text-decoration:none; padding:10px 20px; border-radius:999px; font-weight:800; color:#FFF3DD; }
.info-tabs a[aria-current="page"]{ background:rgba(255,255,255,.92); color:#1F4A37; }
.prose{ background:var(--cream); color:#1F3A2E; border-radius:36px; padding:clamp(28px,4vw,60px) clamp(22px,5vw,72px); box-shadow:0 40px 80px -30px rgba(0,0,0,.7); animation:modalIn .7s cubic-bezier(.2,1.1,.4,1) both; }
.prose h1{ margin:0 0 18px; font-family:var(--font-display); font-weight:600; font-size:clamp(34px,4vw,56px); color:#1F4A37; }
.prose h2{ margin:30px 0 10px; font-family:var(--font-display); font-weight:600; font-size:clamp(22px,2.2vw,30px); color:#1F4A37; }
.prose p,.prose li{ font-size:19px; line-height:1.7; color:#34443C; }
.prose ul{ padding-left:26px; }
html[lang="en"] [lang="bn"].for-lang, html[lang="bn"] [lang="en"].for-lang{ display:none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px){
  .cases{ flex-direction:column; align-items:center; }
  .trunk,.lamp{ display:none; }
  .case{ width:min(560px,100%); }
  .row-inner{ min-height:230px; }
  .book{ width:clamp(100px, min(30vw, 14vh), 160px); }
  .cover-view{ grid-template-columns:1fr; text-align:center; justify-items:center; }
  .cover-art{ justify-self:center; width:min(340px,78vw); }
  .cover-info{ align-items:center; } .cover-cta,.chips{ justify-content:center; }
  .book-spread{ grid-template-columns:1fr; }
  .page{ min-height:0; }
  .page.right{ background:#FFFBF2; }
  .end-card{ grid-template-columns:1fr; } .up-next{ border-left:0; border-top:2px dashed #E8DCF5; padding:24px 0 0; }
}
@media (max-width: 560px){
  body{ font-size:17px; }
  .site-header{ padding-top:12px; }
  .brand-mark{ width:42px; height:42px; }
  .row-inner{ gap:8px; padding:24px 6px 0; }
  .plank{ margin:0 -18px; padding:12px 18px 0; height:70px; }
  .cubbies{ display:none; }
  .controls .mid{ gap:10px; } .play{ width:76px; height:76px; } .round{ width:50px; height:50px; }
  .code-row input{ height:68px; font-size:30px; }
}

/* ---------- account & payment ---------- */
.who{ margin:0; color:var(--ink-soft, #4A5A52); }
.who-email{ word-break:break-all; }
.pay-options{ display:flex; flex-direction:column; gap:12px; width:100%; }
.pay-btn{ flex-direction:column; align-items:center; gap:2px; padding-top:14px; padding-bottom:14px; text-align:center; }
.pay-btn .pay-main{ font-size:20px; }
.pay-btn .pay-sub{ font-size:14px; font-weight:700; opacity:.8; }
.thanks-toast{ position:fixed; left:50%; bottom:28px; transform:translateX(-50%); z-index:80; max-width:min(560px, calc(100vw - 32px));
  padding:16px 22px; border-radius:20px; font-weight:800; font-size:18px; color:#1F3A2E; text-align:center;
  background:rgba(255,248,230,.92); box-shadow:0 14px 40px rgba(31,58,46,.25); animation:toastIn .5s cubic-bezier(.2,1.4,.4,1) both; transition:opacity .6s, transform .6s; }
.thanks-toast.out{ opacity:0; transform:translate(-50%, 20px); }
@keyframes toastIn{ from{ opacity:0; transform:translate(-50%, 30px) scale(.9); } }

/* =========================================================
   Fit the screen: laptops (14-inch and up) show each page in one screen,
   phones follow the reference layout. Sizes follow screen height as well as width.
   ========================================================= */
body{ overflow-x:clip; }
.story-page,.center-page,.shelf-page,.home{ overflow-x:clip; }
.story-text{ position:relative; }
#coverView{ overflow:clip; } /* the glow behind the book shouldn't make the page scroll */

@media (min-width: 1001px){
  .site-header{ padding-top:clamp(10px,1.8vh,18px); padding-bottom:clamp(10px,1.8vh,18px); }
  .brand-mark{ width:clamp(40px,5.4vh,48px); height:clamp(40px,5.4vh,48px); }
  .icon-btn{ width:clamp(42px,5.4vh,48px); height:clamp(42px,5.4vh,48px); }
  .hero{ padding-top:clamp(12px,4vh,60px); gap:clamp(12px,2.4vh,28px); }
  .hero h1{ font-size:clamp(40px, min(6.2vw, 10.5vh), 96px); }
  .hero p{ font-size:clamp(17px, min(1.7vw, 3vh), 28px); }
  .btn-sun.big{ font-size:clamp(20px, min(2.4vw, 4vh), 32px); padding:clamp(12px,2vh,22px) clamp(30px,3vw,50px); }
  .site-footer{ padding-top:clamp(10px,1.8vh,18px); padding-bottom:clamp(12px,2vh,22px); }
  .shelf-head{ gap:clamp(8px,1.6vh,18px); }
  .sign{ padding:clamp(4px,.8vh,8px) 30px; }
  .sign h1{ font-size:clamp(24px, min(3vw, 5vh), 42px); }
  .age-filter button{ min-height:clamp(36px,5vh,44px); padding-top:clamp(6px,1vh,10px); padding-bottom:clamp(6px,1vh,10px); }
  .room{ margin-top:clamp(20px,4vh,34px); }
  .lamp{ width:clamp(48px,7vh,70px); top:clamp(-60px,-6vh,-40px); }
  .case{ padding-top:clamp(14px,2vh,20px); }
  .row-inner{ min-height:0; padding-top:clamp(14px,3vh,30px); }
  .book{ width:clamp(92px, min(9.2vw, 16vh), 176px); }
  .plank{ height:clamp(58px,8vh,76px); padding-top:clamp(8px,1.3vh,12px); }
  .cubbies{ padding:clamp(8px,1.4vh,14px) 0 clamp(10px,1.8vh,18px); }
  .cubby{ height:clamp(44px,8vh,86px); }
  .cubby i{ height:62%; }
  .cubby i::after{ top:38%; }
  .floor{ height:clamp(96px,13vh,200px); }
  .pager button{ width:clamp(40px,5.2vh,48px); height:clamp(40px,5.2vh,48px); }
  .cover-view{ padding-top:4px; padding-bottom:clamp(10px,2vh,24px); }
  .cover-art{ width:min(470px, 100%, calc((100svh - 250px) * .723)); }
  .cover-book .cover-title{ font-size:clamp(24px, min(3.2vw, 5.4vh), 50px); }
  .cover-info{ gap:clamp(10px,2.2vh,22px); }
  .cover-info h1{ font-size:clamp(36px, min(5vw, 9vh), 84px); }
  .cover-info p.blurb{ font-size:clamp(17px, min(1.6vw, 2.8vh), 26px); }
  .cover-foot{ padding-bottom:clamp(10px,2vh,22px); }
  .reader-view{ height:100svh; padding-bottom:clamp(18px,3vh,28px); }
  .reader-top{ padding:clamp(8px,1.4vh,14px) 0; }
  .book-spread{ flex:1; min-height:0; grid-template-rows:minmax(0,1fr); }
  .page{ min-height:0; overflow:hidden; padding:clamp(18px,3.4vh,60px) clamp(22px,3.4vw,70px); gap:clamp(8px,1.6vh,16px); }
  .scene{ aspect-ratio:auto; flex:1 1 0; min-height:120px; }
  .page h1{ font-size:clamp(24px, min(2.6vw, 4.6vh), 46px); }
  .story-text{ flex:0 1 auto; min-height:0; overflow-y:auto; scrollbar-width:thin; font-size:clamp(20px, min(1.9vw, 3.6vh), 36px); }
  .player{ gap:clamp(8px,1.6vh,16px); }
  .play{ width:clamp(62px,9vh,88px); height:clamp(62px,9vh,88px); }
  .round{ width:clamp(44px,6.4vh,56px); height:clamp(44px,6.4vh,56px); }
  .logo-big{ padding-bottom:clamp(8px,2vh,22px); padding-top:0; }
  .logo-big b{ font-size:clamp(30px, min(4vw, 6vh), 60px); }
  .logo-big span{ font-size:clamp(15px,2.2vh,20px); }
  .card{ padding:clamp(22px,3.6vh,48px) clamp(28px,4vw,48px); gap:clamp(8px,1.5vh,16px); }
  .card h1{ font-size:clamp(28px, min(4vw, 5.4vh), 52px); }
  .card p,.card label{ font-size:clamp(16px,2.2vh,19px); }
  .card input[type="email"]{ height:clamp(48px,6.6vh,64px); }
  .card .btn-forest{ padding-top:clamp(10px,1.6vh,16px); padding-bottom:clamp(10px,1.6vh,16px); font-size:clamp(18px,2.4vh,22px); }
  .card .btn-light{ padding-top:clamp(8px,1.3vh,12px); padding-bottom:clamp(8px,1.3vh,12px); }
  .code-row input{ height:clamp(60px,9vh,84px); }
  .modal-icon{ width:clamp(56px,8vh,80px); height:clamp(56px,8vh,80px); }
  .price{ font-size:clamp(20px,3vh,28px); }
  .pay-btn{ padding-top:clamp(8px,1.4vh,14px); padding-bottom:clamp(8px,1.4vh,14px); }
  .center-page > .site-footer{ margin-top:auto; padding-top:clamp(8px,1.4vh,18px); padding-bottom:clamp(8px,1.6vh,22px); }
}
/* short laptop screens (e.g. 1366×768 with the browser bar) */
@media (min-width: 1001px) and (max-height: 800px){
  .cubbies{ display:none; }
  .logo-big span{ display:none; }
}
@media (min-width: 1001px) and (max-height: 700px){
  .logo-big{ display:none; }
}

/* tablets and phones: story cover and reader fit one screen */
@media (max-width: 1000px){
  .cover-view{ align-content:center; gap:clamp(12px,2.4vh,28px); padding:4px var(--gutter) 12px; }
  .cover-art{ width:min(340px, 78vw, calc((100svh - 380px) * .723)); }
  .cover-info{ gap:clamp(10px,1.8vh,18px); }
  .cover-info h1{ font-size:clamp(30px, min(6vw, 5.5vh), 56px); }
  .cover-foot{ justify-content:center; padding-bottom:12px; }
  .reader-view{ height:100svh; padding:0 12px 12px; }
  .reader-top{ padding:8px 0; flex-wrap:nowrap; }
  .book-spread{ flex:1; min-height:0; grid-template-rows:minmax(0,1fr) auto; border-radius:24px; box-shadow:0 30px 60px -30px rgba(0,0,0,.7); }
  .page.left{ padding:0; min-height:0; background:var(--night); }
  .page.left > :not(.scene){ display:none; }
  .scene{ height:100%; aspect-ratio:auto; border-radius:0; box-shadow:none; }
  .page.right{ padding:14px 18px 16px; gap:10px; }
  .story-text{ font-size:clamp(19px, min(3.2vw, 2.9vh), 28px); max-height:calc(3 * 1.75em); overflow-y:auto; }
  .notice{ font-size:13px; padding:6px 12px; }
  .player{ gap:10px; }
  .progress{ font-size:14px; gap:10px; }
  .progress .track{ height:10px; }
  .end-card{ gap:20px; }
  .cubbies{ display:none; }
  .room{ margin-top:18px; }
}
@media (max-width: 560px){
  .site-header{ padding:10px var(--gutter); gap:10px; }
  .brand-mark{ width:38px; height:38px; border-radius:12px; }
  .brand-mark svg{ width:22px; height:22px; }
  .brand-name{ font-size:21px; }
  .header-actions{ gap:6px; }
  .lang-toggle{ padding:3px; }
  .lang-toggle button{ padding:6px 10px; min-height:36px; font-size:15px; }
  .icon-btn{ width:42px; height:42px; }
  .header-actions .btn{ padding:8px 14px !important; font-size:16px !important; min-height:40px; }
  .shelf-head{ gap:10px; }
  .sign{ padding:4px 20px; }
  .sign h1{ font-size:24px; }
  .age-filter button{ padding:6px 11px; min-height:38px; font-size:15px; }
  .room{ margin-top:16px; }
  .case{ padding:14px 12px 0; }
  .row-inner{ min-height:0; gap:8px; padding:12px 4px 0; justify-content:space-between; }
  .row-inner .book{ width:calc((100% - 16px) / 3); max-width:112px; }
  .book .face{ padding:10px 8px 8px 14px; }
  .book .face b{ font-size:14px; }
  .book .lock{ width:32px; height:32px; }
  .book .lock svg{ width:16px; height:16px; }
  .book .listen{ font-size:11px; padding:4px 8px; bottom:8px; }
  .book.soon{ font-size:13px; padding:0 6px; }
  .book.soon svg{ width:24px; height:24px; }
  .plank{ height:58px; margin:0 -14px; padding:9px 12px 0; gap:6px; }
  .plank span{ font-size:12.5px; }
  .floor{ height:84px; }
  .floor-inner{ padding-top:8px; }
  .pager{ gap:6px; padding:5px; }
  .pager button{ width:40px; height:40px; font-size:18px; }
  #storyTitle,#storyBlurb{ display:none; }
  .cover-art{ width:min(300px, 70vw, calc((100svh - 385px) * .723)); }
  .cover-cta{ gap:12px; }
  .chips{ gap:8px; }
  .chip{ padding:6px 16px; min-height:38px; font-size:16px; }
  .cover-foot{ flex-direction:column; gap:8px; }
  .note-btn{ padding:8px 16px; font-size:16px; min-height:40px; }
  .site-footer{ font-size:14px; gap:6px 16px; padding:10px var(--gutter) 14px; }
  .reader-top .btn-cream{ padding:8px 12px; min-height:42px; }
  .reader-top .btn-cream span{ display:none; }
  .dots{ gap:6px; } .dots i{ width:9px; height:9px; } .dots i.cur{ width:24px; } .dots span{ display:none; }
  .page.right{ padding:12px 14px 14px; }
  .controls{ flex-wrap:nowrap; gap:8px; }
  #speedBtn{ padding:8px 10px; font-size:14px; min-height:40px; }
  #partLabel{ font-size:13px; }
  .controls .mid{ gap:8px; } .play{ width:62px; height:62px; } .round{ width:44px; height:44px; }
  .play svg{ width:28px; height:28px; }
  .logo-big{ display:none; } /* the brand is already in the header */
  .logo-big b{ font-size:34px; }
  .logo-big span{ font-size:15px; }
  .card{ border-radius:28px; padding:22px 20px; gap:12px; }
  .card h1{ font-size:30px; }
  .card p,.card label{ font-size:16px; }
  .card input[type="email"]{ height:52px; font-size:18px; }
  .card .btn-forest{ padding:12px 24px; font-size:19px; }
  .code-row{ gap:6px; }
  .code-row input{ height:58px; font-size:26px; border-radius:14px; }
  .modal-icon{ width:60px; height:60px; }
  .price{ font-size:21px; }
  .pay-btn .pay-main{ font-size:18px; }
  .info-tabs a{ padding:8px 14px; font-size:15px; }
  .prose{ border-radius:26px; }
  .prose p,.prose li{ font-size:17px; }
}

/* ---------- taller shelves + book interactions ---------- */
.room{ justify-content:safe flex-end; }
.cases.fitted .book{ width:var(--book-w) !important; max-width:none !important; }
.cases.fitted .row-inner{ min-height:0; }
.row-inner{ perspective:900px; }
@media (min-width: 1001px){
  .cases{ gap:clamp(20px, calc(8vw - 60px), 200px); }
  .case{ width:min(720px, 100%); }
  .book .face b{ font-size:clamp(15px, calc(var(--book-w, 140px) * .13), 26px); }
  .book .listen{ font-size:clamp(12px, calc(var(--book-w, 140px) * .085), 17px); }
}
@media (max-width: 1000px){ .case{ width:min(760px,100%); } }
.book{ transform-origin:50% 100%; }
.book.opening{ animation:bookOpen .52s cubic-bezier(.3,1.3,.5,1) forwards !important; z-index:6; }
@keyframes bookOpen{
  0%{ transform:none; }
  45%{ transform:translateY(-8px) scale(1.03); }
  100%{ transform:translateY(-12px) scale(1.07) rotateY(-30deg); filter:drop-shadow(0 0 30px rgba(255,214,120,.95)); opacity:.9; }
}
.book.wiggle{ animation:bookWiggle .42s ease both !important; }
@keyframes bookWiggle{ 0%,100%{ transform:none; } 20%{ transform:rotate(-6deg); } 40%{ transform:rotate(5deg); } 60%{ transform:rotate(-3deg); } 80%{ transform:rotate(2deg); } }
.book:active:not(.opening){ transform:translateY(-4px) scale(.97); }
/* sign with today's listeners */
.sign.has-count h1{ display:flex; align-items:baseline; gap:.32em; }
.sign .count{ font-family:var(--font-display); font-weight:700; color:#FFE58A; font-size:1.15em; text-shadow:0 2px 0 rgba(90,50,10,.4); font-variant-numeric:tabular-nums; }
@media (max-width: 560px){ .sign.has-count h1{ font-size:20px; } }
.cases.roomy .cubbies{ display:grid !important; }
.cases.roomy .cubby{ height:var(--cubby-h, 64px) !important; }

/* ---------- hover = the same lift as clicking ---------- */
/* once a book has popped in, its entrance animation is removed so hover and click poses can show */
.book.popped{ animation:none; }
.book:not(.soon):not(.empty){ transition:translate .35s cubic-bezier(.3,1.5,.5,1), scale .35s cubic-bezier(.3,1.5,.5,1), rotate .35s cubic-bezier(.3,1.5,.5,1), filter .3s ease; }
.book.opening{ translate:0 -24px; scale:1.12; rotate:-3deg; filter:drop-shadow(0 0 18px rgba(255,214,120,.75)); }
@media (hover: hover){
  a.book:hover{ translate:0 -24px; scale:1.12; rotate:-3deg; filter:drop-shadow(0 0 18px rgba(255,214,120,.75)); z-index:4; }
  button.book[data-lock]:hover{ translate:0 -6px; filter:drop-shadow(0 0 12px rgba(255,214,120,.45)); z-index:4; }
}

/* =========================================================
   Story: "What did you learn?" quiz — shown on the right page after the last part
   ========================================================= */
@keyframes quizIn{ from{opacity:0; transform:translateY(16px)} to{opacity:1; transform:none} }
@keyframes quizShake{ 0%,100%{transform:translateX(0)} 20%{transform:translateX(-8px)} 40%{transform:translateX(8px)} 60%{transform:translateX(-5px)} 80%{transform:translateX(5px)} }
@keyframes quizPop{ 0%{transform:scale(.6); opacity:0} 60%{transform:scale(1.15); opacity:1} 100%{transform:scale(1)} }
@keyframes confettiFall{ 0%{transform:translateY(-30px) rotate(0); opacity:0} 10%{opacity:1} 100%{transform:translateY(105vh) rotate(var(--r)); opacity:.9} }
.book-spread.quiz-on .page.right > :not(.quiz){ display:none !important; }
.quiz{ flex:1; min-height:0; display:flex; flex-direction:column; }
.quiz-step,.quiz-done{ flex:1; min-height:0; display:flex; flex-direction:column; gap:clamp(10px,1.8vh,18px); overflow-y:auto; scrollbar-width:thin; animation:quizIn .45s ease-out both; padding:4px; margin:-4px; }
.quiz-head{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.quiz-kicker{ color:#B4532F; }
.quiz-count{ font-weight:800; }
.quiz-dots{ display:flex; gap:8px; }
.quiz-dots i{ display:block; height:10px; width:10px; border-radius:999px; background:#EADFF7; transition:width .3s ease, background .3s; }
.quiz-dots i.on{ background:var(--plum); } .quiz-dots i.cur{ width:30px; background:var(--clay); }
.quiz-question{ margin:0; font-family:var(--font-story); font-weight:700; color:var(--ink); font-size:clamp(24px, min(2.2vw, 4vh), 40px); line-height:1.2; outline:none; }
.quiz-choices{ display:flex; flex-direction:column; gap:clamp(10px,1.6vh,14px); }
.quiz-choice{ display:flex; align-items:center; gap:16px; width:100%; min-height:clamp(60px,8.6vh,76px); padding:10px 18px 10px 12px; text-align:left; border-radius:22px; border:3px solid #E8DCF5; background:#fff; color:var(--ink); font-family:var(--font-display); font-weight:600; font-size:clamp(19px, min(1.6vw, 3vh), 26px); line-height:1.2; box-shadow:0 5px 0 #E8DCF5; transition:transform .15s ease, border-color .2s, background .2s, box-shadow .2s; }
.quiz-choice:hover:not(:disabled){ transform:translateY(-2px); border-color:#CDB6EC; }
.quiz-choice:active:not(:disabled){ transform:translateY(3px); box-shadow:0 2px 0 #E8DCF5; }
.quiz-choice .letter{ flex:none; width:clamp(40px,5.6vh,48px); height:clamp(40px,5.6vh,48px); border-radius:50%; display:grid; place-items:center; background:#F1E8FB; color:var(--plum); font-size:.95em; }
.quiz-choice .txt{ flex:1; }
.quiz-choice .mark{ flex:none; width:36px; height:36px; border-radius:50%; display:none; place-items:center; color:#fff; font-size:22px; font-family:var(--font-body); font-weight:900; }
.quiz-choice.right{ border-color:#3E9A6B; background:#E6F6EC; box-shadow:0 5px 0 #3E9A6B; cursor:default; }
.quiz-choice.right .letter{ background:#3E9A6B; color:#fff; }
.quiz-choice.right .mark{ display:grid; background:#3E9A6B; animation:quizPop .4s ease-out both; }
.quiz-choice.right .mark::before{ content:'✓'; }
.quiz-choice.wrong{ opacity:.55; border-style:dashed; box-shadow:none; cursor:default; }
.quiz-choice.wrong .mark{ display:grid; background:#C9B9DA; }
.quiz-choice.wrong .mark::before{ content:'✕'; font-size:18px; }
.quiz-choice:disabled:not(.right):not(.wrong){ opacity:.6; cursor:default; }
.quiz-choice.shake{ animation:quizShake .45s ease-in-out; }
.quiz-open{ display:flex; flex-direction:column; gap:10px; }
.quiz-open textarea{ width:100%; resize:none; border-radius:20px; border:3px solid #E8DCF5; background:#fff; color:var(--ink); padding:14px 18px; font-family:var(--font-body); font-size:clamp(18px,2.4vh,22px); font-weight:700; line-height:1.4; }
.quiz-open textarea:focus{ outline:none; border-color:var(--plum); }
.quiz-feedback{ margin:0; min-height:1.5em; font-family:var(--font-display); font-weight:600; font-size:clamp(18px,2.6vh,22px); }
.quiz-feedback.good{ color:#2C7A52; animation:quizPop .35s ease-out both; }
.quiz-feedback.try{ color:#B4532F; }
.quiz-actions{ margin-top:auto; display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:6px; }
.quiz-skip{ flex:0 1 auto; text-align:left; border:0; background:none; padding:8px 4px; color:var(--ink-soft); font-weight:800; font-size:16px; text-decoration:underline; text-underline-offset:4px; }
#quizNext{ white-space:nowrap; min-height:clamp(52px,7.4vh,64px); font-size:clamp(19px,2.6vh,22px); padding-left:30px; padding-right:24px; }
#quizNext:disabled{ opacity:.4; cursor:default; transform:none; }
#quizNext.ready{ animation:pulse 2.2s ease-in-out infinite; }
/* end screen */
.quiz-done{ position:relative; align-items:center; text-align:center; justify-content:center; }
.quiz-done-title{ margin:0; font-family:var(--font-story); font-weight:700; color:var(--ink); font-size:clamp(28px, min(2.8vw, 5vh), 48px); line-height:1.12; outline:none; }
.quiz-score{ margin:0; font-family:var(--font-display); font-weight:600; color:var(--plum); font-size:clamp(19px,2.8vh,24px); }
.quiz-stars{ display:flex; gap:10px; justify-content:center; }
.quiz-stars svg{ width:clamp(44px,7vh,64px); height:clamp(44px,7vh,64px); fill:#F3E9D3; stroke:#E2CFA6; stroke-width:1.2; stroke-linejoin:round; animation:quizPop .5s ease-out both; animation-delay:calc(var(--k) * .15s + .2s); }
.quiz-stars svg.full{ fill:var(--sun); stroke:var(--sun-dark); filter:drop-shadow(0 4px 10px rgba(255,210,63,.55)); }
.quiz-done .source-box{ text-align:left; max-width:560px; }
.quiz-done .source-box span{ font-size:clamp(19px,2.6vh,24px); }
.quiz-end-actions{ display:flex; gap:14px; flex-wrap:wrap; justify-content:center; margin-top:4px; }
.quiz-done > :not(.confetti){ position:relative; z-index:1; }
.confetti{ position:absolute; inset:0; z-index:0; overflow:hidden; pointer-events:none; }
.confetti i{ position:absolute; top:0; width:10px; height:16px; border-radius:3px; opacity:0; animation:confettiFall var(--dur) ease-in var(--dl) 1 both; }
.book-spread.quiz-on .page.right{ position:relative; }
@media (max-width: 1000px){
  .book-spread.quiz-on{ grid-template-rows:minmax(0,1fr); }
  .book-spread.quiz-on .page.left{ display:none; }
  .book-spread.quiz-on .page.right{ min-height:0; padding:18px 18px 16px; }
}
@media (max-width: 560px){
  .quiz-choice{ gap:12px; border-radius:18px; }
  .quiz-end-actions .btn{ flex:1 1 auto; }
}
