/* Shared book colours and motion. Subject colours apply to books, never answer status. */
.nell-book-card,.nell-book-scene,.nell-book-toolbar{--nell-book-color:#193f64;--nell-book-spine:#102b46;--nell-book-tint:#edf3f9}
.nell-book-card{display:flex;align-items:center;gap:22px;margin:16px 0 4px;padding:18px;border:1px solid #d8e3e8;border-radius:12px;background:var(--nell-book-tint);color:#153447;min-width:0;box-sizing:border-box}
.nell-book-cover{display:flex;flex-direction:column;align-items:center;justify-content:center;flex-shrink:0;box-sizing:border-box;width:86px;height:126px;padding:10px 8px 10px 14px;border-radius:2px 7px 7px 2px;background:linear-gradient(90deg,var(--nell-book-spine),var(--nell-book-color) 12%,var(--nell-book-color));box-shadow:4px 3px 0 #d8e3e8,7px 7px 15px #102f4620;color:white;transform:rotate(-4deg);text-align:center}
.nell-book-cover>span{font:9px/1.3 system-ui;letter-spacing:3px}.nell-book-cover>i{font:italic 12px/1.2 Georgia,serif;margin:9px 0}.nell-book-cover>b{font:26px/1.2 Georgia,serif}.nell-book-cover>small{font:7px/1.4 system-ui;letter-spacing:.4px;margin-top:11px}
.nell-book-card-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px}.nell-book-card-copy>small{font:11px/1.4 system-ui;color:#516878}.nell-book-card-copy>strong{font:normal 22px/1.2 Georgia,serif;overflow-wrap:anywhere}.nell-book-card-copy>span{font:12px/1.5 system-ui;color:#516878}.nell-book-card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:5px}.nell-book-card-actions>button{font:13px/1.4 system-ui;min-height:42px;white-space:normal;text-align:left}
.nell-book-gesture>div{overflow:hidden;box-sizing:border-box;min-width:0;max-width:100%;will-change:width,height}
.nell-book-scene{position:relative;width:100%;margin-top:16px;box-sizing:border-box;border:1px solid #d8e3e8;border-radius:12px;background:radial-gradient(ellipse at 50% 65%,var(--nell-book-tint),#f8fbfc);overflow:hidden}
.nell-book-canvas{display:flex;align-items:center;justify-content:center;height:var(--nell-book-height,280px);padding:15px 12px 8px;perspective:1400px}
.nell-book-volume{position:relative;width:min(92%,calc(var(--nell-book-height,280px)*1.42));aspect-ratio:1.64;perspective:1400px;transform-style:preserve-3d;filter:drop-shadow(0 12px 10px #15344735)}
.nell-book-pages{position:absolute;inset:0;display:flex;border-radius:4px 8px 8px 4px;background:white;box-shadow:0 3px 0 #d8e3e8,0 6px 0 #5c7180;overflow:hidden}.nell-book-pages>div{box-sizing:border-box;width:50%;padding:10% 4%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:linear-gradient(90deg,#f8fbfc,#fff 87%,#d8e3e8)}.nell-book-pages>div+div{background:linear-gradient(90deg,#d8e3e8,#fff 12%,#fff 97%,#e3f4f1)}.nell-book-pages span{font:8px/1.4 system-ui;letter-spacing:1px;color:#5c7180}.nell-book-pages b{font:normal clamp(13px,2.1vw,22px)/1.15 Georgia,serif;color:#153447;margin:12px 0;overflow-wrap:anywhere}.nell-book-pages i{font:italic 10px/1.4 Georgia,serif;color:#5c7180}
.nell-book-lid{position:absolute;right:0;top:0;width:50%;height:100%;transform-origin:left center;transform-style:preserve-3d;border-radius:1px 7px 7px 1px}.nell-book-front,.nell-book-back{box-sizing:border-box;position:absolute;inset:0;backface-visibility:hidden;border-radius:1px 7px 7px 1px}.nell-book-front{display:flex;flex-direction:column;align-items:center;justify-content:center;background:linear-gradient(90deg,var(--nell-book-spine),var(--nell-book-color) 10%,var(--nell-book-color));color:#fff;outline:1px solid #ffffff65;outline-offset:-12px;box-shadow:4px 1px 0 #d8e3e8}.nell-book-front>span{font:11px/1.4 system-ui;letter-spacing:4px}.nell-book-front>i{font:italic 15px/1.3 Georgia,serif;margin:16px 0 10px}.nell-book-front>strong{font:normal 42px/1.1 Georgia,serif}.nell-book-front>small{font:8px/1.4 system-ui;letter-spacing:1px;margin-top:18px}.nell-book-back{transform:rotateY(180deg);background:#f7f3e9;border:7px solid var(--nell-book-color);border-right-width:2px}
.nell-book-scene>p{font:11px/1.5 system-ui;color:#5c7180;text-align:center;margin:0!important;padding:2px 12px 13px;white-space:normal}
.nell-book-scene.is-closed .nell-book-volume{transform:translateX(-25%)}.nell-book-scene.is-open .nell-book-lid{transform:rotateY(-180deg)}
.nell-book-scene.is-opening .nell-book-lid{animation:nell-book-open 3s linear both}.nell-book-scene.is-closing .nell-book-lid{animation:nell-book-close 3s linear both}.nell-book-scene.is-opening .nell-book-volume{animation:nell-book-center 3s linear both}.nell-book-scene.is-closing .nell-book-volume{animation:nell-book-shelve 3s linear both}.nell-book-scene.is-paused *{animation-play-state:paused!important}
@keyframes nell-book-open{from{transform:rotateY(0)}to{transform:rotateY(-180deg)}}@keyframes nell-book-close{from{transform:rotateY(-180deg)}to{transform:rotateY(0)}}@keyframes nell-book-center{from{transform:translateX(-25%)}to{transform:translateX(0)}}@keyframes nell-book-shelve{from{transform:translateX(0)}to{transform:translateX(-25%)}}
.nell-book-scene.is-still *{animation:none!important}.nell-book-scene.is-still.is-opening .nell-book-lid{transform:rotateY(-180deg)}.nell-book-scene.is-still.is-opening .nell-book-volume{transform:translateX(0)}.nell-book-scene.is-still.is-closing .nell-book-lid{transform:rotateY(0)}.nell-book-scene.is-still.is-closing .nell-book-volume{transform:translateX(-25%)}
.nell-book-message{display:flex;align-items:flex-start;gap:12px;margin:24px 0}.nell-book-message>img{border-radius:50%;object-fit:cover;flex-shrink:0}.nell-book-bubble{padding:18px 22px;background:#fff;border:1px solid #d8e3e8;border-radius:4px 20px 20px 20px;min-width:0;max-width:100%;color:#153447}.nell-book-author{font:12px/1.4 system-ui;color:#5c7180}.nell-book-bubble>p{line-height:1.6}.nell-book-lobby[hidden],.nell-book-reader[hidden]{display:none!important}.nell-book-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;position:sticky;top:0;z-index:3;background:#f8fbfc;border-top:4px solid var(--nell-book-color);border-bottom:1px solid #d8e3e8;padding:12px 0;margin-bottom:20px}.nell-book-toolbar>span{font:12px/1.4 system-ui;color:#516878}.nell-book-reader{scroll-margin-top:20px}.nell-book-reader>[data-close-book]{margin:24px 0}.nell-book-reader [data-book-content]{min-width:0}.nell-book-reader img,.nell-book-reader video{max-width:100%;height:auto}
@media(max-width:600px){.nell-book-card{gap:14px;padding:13px;align-items:flex-start}.nell-book-cover{width:62px;height:98px;padding:8px}.nell-book-cover>span{font-size:7px}.nell-book-cover>i{font-size:10px;margin:6px 0}.nell-book-cover>b{font-size:23px}.nell-book-cover>small{font-size:6px;margin-top:8px}.nell-book-card-copy>strong{font-size:18px}.nell-book-card-copy>span{font-size:11px}.nell-book-card-copy>small{font-size:10px}.nell-book-card-actions>button{font-size:12px}.nell-book-message{gap:7px}.nell-book-message>img{width:27px;height:27px}.nell-book-bubble{padding:13px 12px}.nell-book-canvas{padding:10px 8px 5px}.nell-book-front{outline-offset:-7px}.nell-book-front>span{font-size:7px;letter-spacing:2px}.nell-book-front>i{font-size:10px;margin:9px 0 6px}.nell-book-front>strong{font-size:27px}.nell-book-front>small{font-size:6px;letter-spacing:.4px;margin-top:10px}.nell-book-pages b{font-size:13px;margin:7px 0}.nell-book-pages span{font-size:6px}.nell-book-pages i{font-size:8px}.nell-book-back{border-width:5px;border-right-width:2px}.nell-book-scene>p{font-size:10px}}
@media(prefers-reduced-motion:reduce){.nell-book-scene *{animation:none!important;transition:none!important}}
/* Only the right page is visible beneath a closed cover; its inside becomes the left page. */
.nell-book-pages{background:none;box-shadow:none;overflow:visible}.nell-book-pages>div:first-child{visibility:hidden}.nell-book-pages>div+div{border-radius:0 7px 7px 0;box-shadow:0 3px 0 #d8e3e8,0 6px 0 #5c7180}
/* Nellie is already present beside the animated book; keep its cover unobstructed. */
body:has(.nell-book-scene) #nell-companion{visibility:hidden}
/* One illustration family for current and older learning books. */
.nell-illustrated-title{display:grid;grid-template-columns:minmax(0,1fr) minmax(200px,.7fr);gap:28px;align-items:center}
.nell-illustrated-title>div{min-width:0}
.nell-unit-illustration{width:100%;max-width:330px;margin:0;justify-self:end;align-self:center}
.nell-unit-illustration>img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;border-radius:4px}
@media(max-width:700px){.nell-illustrated-title{display:flex;flex-direction:column;align-items:stretch;gap:20px}.nell-unit-illustration{max-width:220px;align-self:flex-end}}
