/* NALAROO Storybook Universe — calm parchment reading experience, isolated from learning UI. */
body.storybook-view{background:#edf1e7;color:#354f43}
body.storybook-view .topbar{display:none!important}
body.storybook-view .shell{width:100%;max-width:none;min-height:100svh;margin:0}
body.storybook-view #main{width:100%;max-width:none;margin:0;padding:0;min-height:100svh}
body.storybook-view .shell>footer{display:none}
.storybook-universe{box-sizing:border-box;min-height:100svh;padding:clamp(16px,3vw,34px) 18px 135px;background:radial-gradient(ellipse at top,#faf5e7 0%,#eef2e6 70%);font:700 16px/1.55 Nunito,system-ui,sans-serif;color:#385044}
.storybook-universe *{box-sizing:border-box}
.storybook-book{width:min(980px,100%);margin:0 auto}
.storybook-back,.storybook-inline-back{font:800 14px Nunito,system-ui,sans-serif;color:#476c53;cursor:pointer;border:1px solid #b2bca3;border-radius:15px;background:#fffaf0;padding:10px 16px;min-height:44px;box-shadow:0 3px 9px #6b6c4424}
.storybook-back{display:block;margin:0 auto 18px;max-width:980px;width:100%;text-align:left}
.storybook-inline-back{margin-bottom:17px}
.storybook-universe button:focus-visible{outline:3px solid #547c5a;outline-offset:3px}
.storybook-heading{text-align:center;padding:26px 20px 22px;border:2px solid #d6c7a9;border-radius:24px;background:linear-gradient(145deg,#fffbf2,#f6ebd7);box-shadow:0 7px 18px #79604418}
.storybook-eyebrow{color:#7c8865;letter-spacing:.08em;text-transform:uppercase;font-size:12px;font-weight:900;margin:0 0 8px}
.storybook-heading h1{font-size:clamp(26px,4vw,41px);line-height:1.2;color:#405d46;margin:0}
.storybook-welcome{font-size:14px;color:#6b705d;margin:12px 0 0}
.storybook-shelf{display:grid;grid-template-columns:1fr 1fr;gap:21px;margin:24px 0}
.storybook-tile{display:flex;flex-direction:column;overflow:hidden;border:2px solid #c5b38e;border-radius:23px;background:#fffaf0;text-align:left;padding:0;cursor:pointer;color:#365042;box-shadow:0 6px 16px #6c654126;min-height:330px;transition:transform .18s,box-shadow .18s}
.storybook-tile:hover,.storybook-item-card:hover{transform:translateY(-3px);box-shadow:0 9px 19px #6c654139}
.storybook-tile-visual{display:block;width:100%;height:235px;object-fit:cover;background:#d9e5ca;overflow:hidden}
.storybook-tile-visual img{display:block;width:100%;height:100%;object-fit:cover}
.storybook-tile-body{display:grid;gap:6px;padding:17px 20px 21px}
.storybook-tile-body strong{font-size:21px;line-height:1.2;color:#385844}
.storybook-tile-body span{font-size:13px;font-weight:700;color:#777660}
.storybook-reading-note{font-size:12px;line-height:1.5;color:#7c796d;margin:16px 0;text-align:center}
.storybook-section-copy{font-size:15px;line-height:1.6;margin:22px auto;color:#65755e;text-align:center;max-width:650px}
.storybook-filters{display:flex;gap:8px;overflow-x:auto;scrollbar-width:thin;padding:5px 1px 13px}
.storybook-filter{flex:0 0 auto;min-height:42px;border:1px solid #b6b69d;border-radius:16px;padding:8px 13px;background:#fffaf0;color:#3e5a44;font:800 13px Nunito,system-ui;cursor:pointer}
.storybook-filter[aria-pressed=true]{background:#d7e8d1;border-color:#729a7a;color:#345b3f}
.storybook-collection-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:12px 0 30px}
.storybook-item-card{display:flex;flex-direction:column;align-items:center;gap:7px;min-width:0;min-height:218px;padding:12px 8px 16px;cursor:pointer;text-align:center;border:1.5px solid #d2c2a5;border-radius:20px;background:#fffcf4;color:#365042;box-shadow:0 3px 10px #74644818;transition:transform .18s,box-shadow .18s}
.storybook-item-art{display:block;width:100%;height:140px;object-fit:contain}
.storybook-item-card strong{font:900 14px/1.3 Nunito,system-ui;overflow-wrap:anywhere}
.storybook-item-card span{font:700 11px Nunito,system-ui;color:#72806b}
.storybook-item-detail{display:grid;grid-template-columns:minmax(200px,.8fr) minmax(0,1.2fr);gap:30px;align-items:start;margin:0;padding:clamp(18px,3vw,35px);background:#fffaf0;border:2px solid #d3bfa0;border-radius:26px;box-shadow:0 7px 23px #6f5a4f1f}
.storybook-item-illustration{display:grid;place-items:center;min-height:260px;padding:10px;background:linear-gradient(160deg,#edf1e3,#f6ead7);border:1px solid #cfbea0;border-radius:20px}
.storybook-item-illustration img{display:block;width:100%;max-width:320px;height:auto;aspect-ratio:1;object-fit:contain}
.storybook-item-prose h1{font-size:clamp(25px,3vw,38px);margin:0 0 20px;line-height:1.15;color:#405f4a}
.storybook-item-prose h2{font-size:19px;margin:14px 0 8px;color:#536f54}
.storybook-story-text{font-size:clamp(16px,1.9vw,20px);font-weight:700;line-height:1.75;color:#4b5d4f;margin:0}
.storybook-lesson{padding:14px 17px;margin:23px 0 0;border:1px solid #bcd2af;border-radius:18px;background:#e9f3df}
.storybook-lesson h2{margin:0 0 6px}.storybook-lesson p{margin:0;font-size:16px}
.storybook-scene{display:grid;gap:7px;margin:14px 0 25px;background:#f2efdc;border:1px solid #d2c6ac;border-radius:18px;overflow:hidden;box-shadow:0 3px 12px #74644820}
.storybook-scene-image{display:block;width:100%;aspect-ratio:16 / 9;height:auto;object-fit:contain;background:#e7eddd}
.storybook-scene-caption{font:800 12px/1.4 Nunito,system-ui,sans-serif;color:#68765f;text-align:center;padding:0 10px 10px}
.storybook-reader:focus-visible{outline:3px solid #638c69;outline-offset:3px}
.storybook-reader{padding:clamp(20px,4vw,48px);margin:0 auto;max-width:800px;min-height:285px;border:2px solid #d5be9e;border-radius:21px;background:#fffcf5;box-shadow:0 5px 18px #866e5421;text-align:center}
.storybook-page-number{font-size:12px;color:#8c8b74;letter-spacing:.08em;margin:0 0 12px}
.storybook-reader h2{font-size:clamp(22px,3vw,32px);line-height:1.2;color:#486447;margin:0 0 22px}
.storybook-reader .storybook-story-text{max-width:670px;margin:0 auto}
.storybook-turns{display:flex;justify-content:space-between;gap:12px;margin-top:34px}
.storybook-action{border:1px solid #557b5b;border-radius:14px;padding:12px 17px;min-height:44px;background:#638c69;color:white;font:900 14px Nunito,system-ui;cursor:pointer}
.storybook-action.secondary{background:#fff9ea;color:#4b6950;border-color:#b9bb9b}
.storybook-action:disabled{opacity:.45;cursor:default}
.integrated-world .world-storybook-plaza{
 position:absolute;z-index:4;left:var(--ix);top:var(--iy);width:var(--iw);height:var(--ih);
 transform:translate(-50%,-50%);box-shadow:none!important;background:transparent!important;
 border:0!important;border-radius:40%;padding:0;margin:0;cursor:pointer;min-width:44px;min-height:44px
}
.integrated-world .world-storybook-plaza::before{content:'';position:absolute;inset:3% 12% 18%;border:2px solid transparent;border-radius:48%;pointer-events:none;transition:border-color .18s,background .18s}
.integrated-world .world-storybook-plaza:hover::before,.integrated-world .world-storybook-plaza:focus-visible::before{border-color:#faf0ca;background:#fcf9d52a}
.integrated-world .world-storybook-plaza:focus-visible{outline:3px solid #fff6d4;outline-offset:2px}
.integrated-world .storybook-plaza-label{position:absolute;bottom:-7%;left:50%;transform:translateX(-50%);padding:5px 11px;border:1px solid #ad9770;border-radius:15px;background:#fffaf0f2;color:#395948;font:900 clamp(10px,1.05vw,15px)/1.2 Nunito,system-ui;white-space:nowrap;box-shadow:0 2px 8px #4d412c2e;pointer-events:none}
@media(orientation:portrait){
 .integrated-world .world-storybook-plaza{left:var(--imx);top:var(--imy);width:var(--imw);height:var(--imh)}
 .integrated-world .storybook-plaza-label{font-size:clamp(9px,2.1vw,12px);padding:4px 8px}
}
@media(min-width:701px) and (any-pointer:coarse){
 .integrated-world .world-storybook-plaza{left:var(--itlx);top:var(--itly);width:var(--itlw);height:var(--itlh)}
}
@media(min-width:701px) and (any-pointer:coarse) and (orientation:portrait){
 .integrated-world .world-storybook-plaza{left:var(--itpx);top:var(--itpy);width:var(--itpw);height:var(--itph)}
}
@media(max-width:700px){
 .storybook-universe{padding:12px 12px 116px}
 .storybook-shelf{grid-template-columns:1fr;gap:15px}
 .storybook-tile{min-height:0}
 .storybook-tile-visual{height:185px}
 .storybook-collection-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
 .storybook-item-card{min-height:188px}
 .storybook-item-art{height:115px}
 .storybook-item-detail{grid-template-columns:1fr;gap:12px}
 .storybook-item-illustration{min-height:180px}
 .storybook-item-illustration img{max-width:220px}
 .storybook-turns{gap:7px}
 .storybook-turns button{font-size:12px;padding:10px 11px}
}
@media(prefers-reduced-motion:reduce){.storybook-tile,.storybook-item-card,.integrated-world .world-storybook-plaza::before{transition:none}}

/* Books are for illustrated village stories; collectible lore lives in Toko/Ransel. */
.storybook-shelf.storybook-stories{grid-template-columns:minmax(0,1fr);max-width:640px;margin-inline:auto}
