@charset "UTF-8";
:root{font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;color:#343443;background:#253747;font-synthesis:none}*{box-sizing:border-box}body{margin:0;overflow:hidden;width:100%;height:100dvh;overscroll-behavior:none}button,input,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;border:0;color:inherit;touch-action:manipulation}button:disabled{opacity:.4;cursor:default}button:focus-visible,a:focus-visible{outline:3px solid #82d9ea;outline-offset:4px}a{color:inherit;text-decoration:none}h1,h2,p{margin:0}[hidden]{display:none!important}#world,#scene,#sparkles,.vignette,#hover-shade{position:fixed;inset:0;width:100%;height:100%}#scene{display:block;touch-action:none}#sparkles{z-index:20;pointer-events:none}.vignette{z-index:1;pointer-events:none;background:radial-gradient(ellipse at 50% 46%,transparent 36%,#0e192638 100%)}#hover-shade{z-index:2;pointer-events:none;opacity:0;background:radial-gradient(ellipse 170px 240px at var(--hx,50%) var(--hy,50%),transparent 20%,#111d2940 140%);transition:opacity .28s}.hud{position:fixed;z-index:10;top:0;left:0;right:0;display:flex;align-items:center;gap:20px;padding:24px 32px;pointer-events:none}.hud>*{pointer-events:auto}.brand{display:flex;align-items:center;gap:9px;color:#ffe2a3;font-size:23px;font-weight:800;letter-spacing:2px;text-shadow:0 2px 2px #26150f80}.brand-star{font-size:42px;line-height:1;color:#f1c779}.brand small{display:block;font-size:9px;letter-spacing:2.6px;margin-top:4px}.collection-counter{display:flex;align-items:center;gap:7px;padding:8px 14px;background:#25364ed9;color:#f9eac3;border:1px solid #caa365;border-radius:30px;box-shadow:0 3px 8px #08152360;font-size:15px}.collection-counter>span:first-child{color:#fbd079;font-size:21px}.count-total{opacity:.7;font-size:12px}.counter-caption{font-size:11px;margin-left:5px}.top-tools{margin-left:auto;display:flex;align-items:center;gap:12px}.round-button{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 36% 28%,#fff9e8,#efdbac);border:3px solid #c2985c;outline:1px solid #ffe6b3;box-shadow:inset 0 0 0 2px #fff5d5,0 4px 7px #3829194d;color:#4f5360;font-size:24px;transition:transform .18s}.round-button:hover{transform:translateY(-2px)}.round-button:active{transform:translateY(1px) scale(.96)}.pill-button,.gold-button{background:linear-gradient(#fffaf0,#f5e7c4);border:2px solid #bb945c;outline:1px solid #f3d398;border-radius:35px;box-shadow:inset 0 0 0 3px #fff8e3,inset 0 0 0 4px #d8b577,0 4px 8px #38281740;min-height:40px;padding:10px 20px;font-size:14px;font-weight:700;color:#383548}.gold-button{min-height:52px;font-size:18px;padding:13px 30px}.gold-button:hover{background:linear-gradient(#fffdf5,#ffe6a6)}.shelf-intro{position:fixed;z-index:3;top:109px;left:50%;transform:translateX(-50%);text-align:center;color:#fff0d2;width:max-content;max-width:85vw;pointer-events:none;text-shadow:0 3px 8px #111e29a6}.eyebrow{font-size:10px;font-weight:700;letter-spacing:2px;color:#a97841}.shelf-intro .eyebrow{color:#f0d397;font-size:10px;letter-spacing:3px}.shelf-intro h1{font-size:25px;font-weight:550;letter-spacing:2px;margin-top:9px}.shelf-intro p{margin-top:9px;font-size:12px;color:#e4d9be}.world-caption{position:fixed;z-index:2;color:#f1d99e;font-size:11px;letter-spacing:4px;text-shadow:0 2px 3px #251d17;pointer-events:none;transform:translate(-50%,-50%)}.book-picker{position:fixed;bottom:58px;left:50%;transform:translateX(-50%);z-index:5;display:flex;gap:10px}.book-tab{width:206px;min-height:75px;padding:9px 12px;display:flex;align-items:center;gap:11px;background:#fff5dded;border:2px solid #3f4558;border-radius:13px;box-shadow:0 4px 0 #34291d42,0 4px 18px #281c1a38;text-align:left;transition:transform .25s,background .25s,border-color .25s}.book-tab:hover,.book-tab.hovered{transform:translateY(-7px);background:#ffedbc;border-color:#e9bb64}.mini-cover{width:38px;height:54px;flex:none;border-radius:2px 5px 5px 2px;background-image:url('assets/book-covers.png');background-size:300% 100%;box-shadow:2px 3px 3px #1d253044}.book-tab b{display:block;font-size:13px;color:#4b3c34;line-height:1.5}.book-tab small{display:block;margin-top:7px;font-size:10px;color:#957543}.shelf-hint{position:fixed;z-index:3;bottom:23px;width:100%;text-align:center;font-size:11px;color:#ffedd1;text-shadow:0 1px 4px #412511;pointer-events:none}.shelf-hint span{margin:0 11px}.parchment{background:radial-gradient(ellipse at 40% 25%,#fffdf0,#fff4d8 65%,#edd7a6);border:3px solid #c3a46e;outline:2px solid #ffefcc;box-shadow:inset 0 0 0 5px #fff8e5,inset 0 0 0 6px #d7be8790,0 10px 30px #25233155;color:#383548;border-radius:13px}.book-preview{position:fixed;z-index:5;left:50%;bottom:8vh;transform:translateX(-50%);width:380px;max-width:90vw;padding:31px;text-align:center}.book-preview h2{font-size:27px;color:#815124;line-height:1.45;margin:16px 0 7px}.english-subtitle{font-family:Georgia,serif;font-size:17px;color:#917653;font-style:italic}.preview-description{font-size:14px;line-height:1.9;margin-top:17px;color:#75664f}.preview-detail{display:flex;gap:20px;justify-content:center;color:#967c4b;font-size:11px;margin:15px 0 22px}.book-preview .gold-button{width:100%}.gold-button span{color:#b38236;margin-left:15px}.text-button{background:none;display:block;min-height:40px;margin:10px auto 0;padding:8px;font-size:12px;color:#88754c}.story-card{position:fixed;z-index:6;left:4vw;top:26vh;width:min(33vw,435px);max-height:62vh;overflow:auto;padding:29px 30px 23px}.story-card-top{display:flex;align-items:center;justify-content:space-between;color:#9b723d;font-size:10px;font-weight:700;letter-spacing:2px}.story-card-top button{background:#ead7ae;border:1px solid #d0b780;border-radius:50%;width:32px;height:32px;font-size:13px;color:#8b6236}.story-card-top button[aria-pressed=true]{background:#648073;color:#fff5db}.story-card h2{font-family:Georgia,serif;font-size:27px;line-height:1.25;color:#8d562b;margin:12px 0 19px}#story-text{font-family:Georgia,"Times New Roman",serif;font-size:clamp(23px,2.3vw,33px);line-height:1.65;color:#333747}.word{font:inherit;background:none;border-bottom:2px dotted #cda361;margin:0 1px 4px;padding:0 2px;line-height:1.4;border-radius:5px;min-height:38px}.word:hover,.word.spoken{background:#ffe09b;box-shadow:0 2px 0 #d8ae5d}#story-chinese{font-size:14px;line-height:1.9;color:#89724d;margin-top:14px}.card-hint{font-size:10px;color:#ac9366;margin-top:24px;border-top:1px solid #d9c79e;padding-top:13px}.reading-progress{position:fixed;z-index:5;left:50%;top:28px;transform:translateX(-50%);display:flex;gap:8px;padding:7px 15px;background:#24334c83;border-radius:24px;backdrop-filter:blur(5px)}.reading-progress span{font-size:16px;color:#dfc88755}.reading-progress span.done{color:#f5c76a;text-shadow:0 0 8px #ffe2a46b}.reader-controls{position:fixed;z-index:8;bottom:max(26px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:35px}.page-arrow{font-size:40px;color:#6e8e98;width:53px;height:53px;line-height:1}.reading-actions{display:flex;flex-direction:column;align-items:center;gap:10px}.reading-actions>.gold-button{min-width:207px}.small-actions{display:flex;gap:10px}.small-actions .pill-button{font-size:11px;min-height:32px;padding:7px 14px;border-width:1px}.object-label{position:fixed;z-index:9;pointer-events:none;background:#fff5dfef;color:#5f4831;border:2px solid #d4b478;box-shadow:inset 0 0 0 2px #fffcf0,0 4px 12px #281c2740;border-radius:14px;padding:8px 14px;display:flex;align-items:center;gap:9px;transform:translate(-50%,-100%);white-space:nowrap}.object-label b{font-family:Georgia,serif;font-size:21px}.object-label span{font-size:12px;color:#95754f}.object-label small{color:#af833c;font-size:17px}.unfocus{position:fixed;z-index:9;right:28px;top:95px;font-size:12px}.collect-button{position:fixed;z-index:7;right:7vw;bottom:21vh;background:linear-gradient(#ffefb4,#f1ce72);border:2px solid #fff0c3;border-radius:30px;box-shadow:0 0 25px #ffcc6880,0 5px 10px #422c323b;color:#755226;font-size:14px;font-weight:700;min-height:47px;padding:10px 20px}.collect-button span{font-size:21px;margin-right:7px}.toast{position:fixed;z-index:30;top:108px;left:50%;transform:translateX(-50%);padding:12px 22px;background:#fff5dbef;border:1px solid #eac98c;color:#795730;border-radius:25px;font-size:14px;box-shadow:0 5px 20px #1d273e30;max-width:88vw;text-align:center;pointer-events:none}.loading{position:fixed;inset:0;z-index:50;display:flex;flex-direction:column;align-items:center;justify-content:center;background:radial-gradient(ellipse at center,#385260,#1b2a3c);color:#f6dfb3;transition:opacity .6s}.loading h1{font-size:29px;letter-spacing:6px;font-weight:550;margin:15px 0}.loading p{font-size:13px;color:#d9cfb7;max-width:80vw;text-align:center;line-height:1.8}.loading-mark{font-family:Georgia,serif;font-size:80px;color:#f0cc81;filter:drop-shadow(0 0 18px #eecf7059)}.loading-line{width:140px;height:3px;background:#577072;margin-top:25px;border-radius:3px;overflow:hidden}.loading-line span{display:block;width:25%;height:100%;background:#edd198;animation:loading 1.6s ease-in-out infinite}.loading .gold-button{margin-top:25px}.no-script{position:fixed;z-index:90;background:#fff4d4;inset:25%;padding:30px;text-align:center}dialog.parchment{width:min(490px,90vw);max-height:84dvh;overflow:auto;padding:38px;margin:auto}dialog::backdrop{background:#1521349e;backdrop-filter:blur(5px)}dialog h2{font-size:25px;line-height:1.5;color:#815931;margin:15px 0}.dialog-close{position:absolute;right:14px;top:10px;background:none;font-size:27px;min-width:40px;min-height:40px;color:#9e7c49}.dialog-intro{font-size:14px;color:#927650;line-height:1.8}.collection-list{display:flex;gap:10px;margin:26px 0}.treasure-card{flex:1;min-width:0;text-align:center;padding:15px 7px;background:#e6d7b380;border-radius:10px;border:1px solid #cbb68f;color:#9c8e72}.treasure-card.earned{background:#ffedb3;color:#755129;border-color:#d1a246}.treasure-card>span{display:block;font-size:37px;height:51px}.treasure-card b{font-size:12px}.treasure-card small{display:block;font-size:10px;margin-top:8px}.dialog-footnote{font-size:12px;color:#9b8056;line-height:1.9;margin-top:18px}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:25px;padding:20px 0;border-bottom:1px solid #d8c8a4;font-size:14px;color:#756344}.setting-row input{accent-color:#557d73;width:20px;height:20px}.finish-star{font-size:55px;text-align:center;color:#c49340}.finish-star+.eyebrow{text-align:center}#finished-dialog{text-align:center}#finished-message{font-size:14px;color:#88704a;line-height:1.9;margin:18px 0 25px}#finished-dialog .gold-button{width:100%;font-size:16px}@keyframes loading{0%{transform:translateX(-100%)}100%{transform:translateX(500%)}}
@media(max-width:800px){.hud{padding:18px;gap:10px}.brand{font-size:19px;gap:6px}.brand-star{font-size:32px}.brand small{font-size:7px;letter-spacing:1.6px}.top-tools{gap:9px}.round-button{width:40px;height:40px;font-size:21px}.collection-counter{padding:6px 10px;font-size:13px;gap:5px}.counter-caption{display:none}.shelf-intro{top:100px}.shelf-intro h1{font-size:21px}.book-picker{gap:7px;bottom:55px}.book-tab{width:175px;padding:8px;gap:8px;min-height:65px}.book-tab b{font-size:12px}.book-tab small{font-size:9px}.mini-cover{width:32px;height:47px}.story-card{left:20px;width:35vw;padding:19px;top:24vh}.story-card h2{font-size:23px;margin-bottom:13px}#story-text{font-size:23px}.card-hint{font-size:9px;margin-top:14px}.reading-progress{top:76px}.hud .pill-button{font-size:11px;padding:8px 12px;min-height:37px}.collect-button{right:4vw;font-size:12px;padding:9px 15px}.reader-controls{gap:25px;bottom:20px}.unfocus{right:20px;top:80px}.shelf-hint{font-size:10px}.toast{font-size:12px;top:93px}}
@media(max-width:600px) and (orientation:portrait){.hud{padding:15px 13px;gap:8px;flex-wrap:wrap}.brand{font-size:17px;letter-spacing:1px}.brand small{font-size:6px;letter-spacing:1.5px}.brand-star{font-size:29px}.top-tools{gap:7px}.round-button{width:35px;height:35px;border-width:2px;font-size:20px}.collection-counter{font-size:12px;padding:5px 8px}.collection-counter>span:first-child{font-size:17px}.count-total{font-size:10px}.shelf-intro{top:92px;width:90vw;max-width:90vw}.shelf-intro h1{font-size:20px;letter-spacing:1px;line-height:1.5}.shelf-intro .eyebrow{font-size:8px;letter-spacing:1.8px}.shelf-intro p{font-size:10px;line-height:1.8;max-width:260px;margin:6px auto 0}.book-picker{bottom:66px;gap:6px;width:calc(100% - 22px)}.book-tab{min-width:0;flex:1;width:auto;display:block;padding:9px 7px;text-align:center}.mini-cover{display:none}.book-tab b{font-size:11px;line-height:1.6;min-height:34px;display:flex;align-items:center;justify-content:center}.book-tab small{font-size:8px;margin-top:5px}.shelf-hint{font-size:9px;bottom:28px;padding:0 15px;line-height:1.8}.shelf-hint span{margin:0 5px}.book-preview{bottom:8vh;padding:24px;width:310px}.book-preview h2{font-size:24px}.preview-description{font-size:13px}.story-card{left:13px;right:13px;width:auto;top:auto;bottom:132px;max-height:29vh;padding:14px 20px 12px}.story-card-top{font-size:8px;letter-spacing:1px;min-height:23px}.story-card-top button{position:absolute;top:12px;right:14px;width:30px;height:30px}.story-card h2{font-size:21px;margin:3px 32px 8px 0}#story-text{font-size:23px;line-height:1.48}.word{min-height:32px;margin-bottom:2px}#story-chinese{font-size:12px;margin-top:7px}.card-hint{font-size:8px;margin-top:8px;padding-top:7px}.reading-progress{top:76px;padding:5px 10px;gap:7px}.reading-progress span{font-size:13px}.reader-controls{bottom:calc(21px + env(safe-area-inset-bottom));width:calc(100% - 48px);gap:18px;justify-content:center}.reading-actions>.gold-button{min-height:43px;min-width:164px;font-size:16px;padding:10px 20px}.page-arrow{width:44px;height:44px;font-size:32px}.small-actions{gap:8px}.small-actions .pill-button{font-size:10px;min-height:28px;padding:6px 11px}.reading-actions{gap:8px}.collect-button{bottom:calc(30vh + 143px);right:18px;min-height:39px;font-size:11px;padding:7px 12px}.collect-button span{font-size:16px}.object-label b{font-size:18px}.object-label{padding:6px 11px}.unfocus{top:112px;right:15px;font-size:10px;min-height:30px;padding:7px 12px}.hud .pill-button{font-size:0;width:34px;height:34px;padding:0}.hud .pill-button:before{content:'▤';font-size:18px}.toast{top:115px;font-size:12px;width:max-content;padding:9px 16px}.world-caption{font-size:8px;letter-spacing:2px}dialog.parchment{padding:30px 25px}dialog h2{font-size:23px}.collection-list{gap:7px}.treasure-card{padding:13px 5px}.treasure-card b{font-size:11px}}
@media(max-height:560px) and (orientation:landscape){.hud{padding:12px 20px}.brand{font-size:17px}.brand-star{font-size:27px}.brand small{font-size:6px}.round-button{width:34px;height:34px;font-size:20px}.shelf-intro{top:65px}.shelf-intro h1{font-size:18px;margin-top:5px}.shelf-intro p{display:none}.book-picker{bottom:35px}.book-tab{min-height:52px;width:173px;padding:5px 10px}.mini-cover{height:40px;width:28px}.book-tab b{font-size:11px}.book-tab small{font-size:8px;margin-top:3px}.shelf-hint{bottom:11px;font-size:9px}.story-card{top:20vh;width:32vw;max-height:64vh;padding:16px 20px}.story-card h2{font-size:21px;margin:8px 0 10px}#story-text{font-size:21px;line-height:1.5}.word{min-height:29px}.card-hint{font-size:8px;margin-top:10px;padding-top:8px}.reading-progress{top:17px}.reader-controls{bottom:14px;gap:25px;left:65%}.reading-actions>.gold-button{min-height:39px;min-width:158px;padding:9px 22px;font-size:15px}.small-actions .pill-button{font-size:9px;min-height:25px;padding:5px 11px}.reading-actions{gap:6px}.page-arrow{width:42px;height:42px;font-size:31px}.collect-button{bottom:28vh;font-size:11px;min-height:37px;padding:7px 12px}.book-preview{bottom:6vh;padding:20px 28px;width:330px}.book-preview h2{font-size:23px;margin:10px 0 3px}.preview-description{font-size:12px;margin-top:10px}.preview-detail{margin:10px 0 14px}.book-preview .gold-button{min-height:44px;font-size:16px}.text-button{margin-top:5px;min-height:30px}.unfocus{top:67px;font-size:10px;min-height:29px}.toast{top:60px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
.shelf-intro{top:auto;bottom:153px}.shelf-intro .eyebrow,.shelf-intro p{display:none}.shelf-intro h1{font-size:18px;letter-spacing:2px;margin:0;text-shadow:0 2px 7px #432d16}.shelf-intro{color:#fff1d2}
@media(max-width:600px) and (orientation:portrait){.shelf-intro{top:auto;bottom:164px}.shelf-intro h1{font-size:16px;letter-spacing:1px}}
@media(max-height:560px) and (orientation:landscape){.shelf-intro{top:auto;bottom:98px}.shelf-intro h1{font-size:15px}}
.book-tab b{font-size:14px}.book-tab small{font-size:12px}.card-hint{font-size:12px}.small-actions .pill-button{font-size:14px}
@media(max-width:600px) and (orientation:portrait){.book-tab b{font-size:14px;min-height:43px}.book-tab small{font-size:11px;line-height:1.5}.shelf-intro{bottom:178px}.shelf-hint{font-size:11px}.collect-button{font-size:14px}.small-actions .pill-button{font-size:13px}.card-hint{font-size:11px}#story-chinese{font-size:14px}.book-picker{bottom:62px}}
@media(max-height:560px) and (orientation:landscape){.book-tab b{font-size:13px}.book-tab small{font-size:11px}.card-hint{font-size:11px}.small-actions .pill-button{font-size:12px}}

/* The same three-item window drives cards and the physical shelf. */
.book-picker{width:min(840px,94vw);gap:13px;align-items:center;bottom:60px}
.book-tabs{display:flex;gap:9px;flex:1;min-width:0;justify-content:center}
.book-tab{position:relative;flex:1;min-width:0;width:auto;padding:12px 12px 17px;overflow:hidden}
.book-tab[hidden]{display:none!important}
.book-tab:after{content:'';position:absolute;left:12px;right:12px;bottom:7px;height:4px;border-radius:4px;background:linear-gradient(to right,#dba83b var(--progress,0%),#d8ceb5 var(--progress,0%))}
.mini-cover{background-image:url('assets/painted-covers.png');background-size:300% 200%;border-radius:1px;flex-shrink:0}
.book-tab b{font-size:14px;line-height:1.5}.book-tab small{font-size:11px}
#shelf-prev,#shelf-next{flex:0 0 44px;width:44px;height:44px;font-size:31px}
#shelf-prev:disabled,#shelf-next:disabled{opacity:.35;cursor:default}
.shelf-dots{position:absolute;bottom:-24px;left:50%;transform:translateX(-50%);display:flex;gap:9px}
.shelf-dots button{width:12px;height:12px;padding:0;border-radius:50%;border:1.5px solid #634524;background:#ddbc80;cursor:pointer}
.shelf-dots button.active{background:#fff1be;box-shadow:0 0 7px #fff0b2}
.collection-counter{display:flex;gap:12px;align-items:center;padding:7px 12px;background:#25354e;border:1.5px solid #b99e5c;border-radius:24px;color:#fff5db;white-space:nowrap}
.score-part{display:inline-flex;align-items:center;gap:3px;font-size:13px;font-weight:800}
.score-part i{font-style:normal;flex-shrink:0}
.score-part small{font-size:10px;color:#e4dfca}
.collection-counter>.score-part:first-child{font-size:13px}
.score-star{color:#ffd477;font-size:22px;line-height:1}
.score-check{display:inline-flex;align-items:center;justify-content:center;background:#7eb886;border:2px solid #f3edcd;border-radius:50%;color:white;width:18px;height:18px;font-size:13px}
.score-pin{display:inline-block;background:#d77c62;width:15px;height:15px;border:2px solid #fff1d5;border-radius:50% 50% 50% 0;transform:rotate(-45deg);font-size:0;margin:0 3px}
#story-quiz{margin:18px 0;padding:16px 0;border-block:1px solid #dac291}
#story-quiz h3{font-size:18px;margin:0}#quiz-prompt{font-size:22px;color:#514337}#quiz-options{display:flex;gap:12px;justify-content:center}#quiz-options button{min-width:100px;min-height:44px}#quiz-feedback{min-height:22px;font-size:14px;color:#5f713c}
.collection-list{display:grid;grid-template-columns:repeat(3,1fr)}
@media(max-width:600px) and (orientation:portrait){
 .hud{gap:7px}.brand{font-size:15px}.brand-star{font-size:23px}.brand small{font-size:5px}.top-tools{gap:5px}.collection-counter{order:3;gap:14px;padding:5px 10px}.score-part,.collection-counter>.score-part:first-child{font-size:12px}.score-part small{font-size:10px}.score-star{font-size:18px}
 .book-picker{width:calc(100% - 18px);gap:5px;bottom:64px}.book-tabs{gap:5px}.book-tab{padding:10px 4px 17px}.book-tab b{font-size:12px;min-height:38px}.book-tab small{font-size:10px}.book-tab:after{left:5px;right:5px}.mini-cover{display:none}#shelf-prev,#shelf-next{flex-basis:31px;width:31px;height:40px;font-size:27px}.shelf-dots{bottom:-22px}.shelf-intro{bottom:182px}.shelf-hint{bottom:12px;font-size:10px}.reading-progress{top:104px}.unfocus{top:132px}
}
@media(max-height:560px) and (orientation:landscape){.book-picker{bottom:35px;width:min(700px,90vw)}.shelf-dots{bottom:-17px}.shelf-dots button{width:9px;height:9px}.shelf-hint{display:none}.book-tab{padding:7px 10px 15px}.collection-counter{gap:8px;padding:5px 9px}.score-part{font-size:11px}.score-star{font-size:18px}.shelf-intro{bottom:106px}}

#word-card{position:fixed;z-index:16;right:13%;top:22%;width:min(29vw,360px);padding:18px 18px 22px;background:#fff5dc;border:4px double #d9af62;border-radius:24px;box-shadow:0 18px 36px #3e2b2855;text-align:center}#word-art{width:100%;height:auto;border-radius:15px;box-shadow:0 4px 12px #785a3633}#word-name{display:block;font: bold 42px Georgia;color:#31334c;margin-top:12px}#word-close{position:absolute;right:6px;top:4px;border:0;background:#fff5dc;border-radius:50%;width:34px;height:34px;font-size:25px;color:#765b39}@media(max-width:600px){#word-card{right:16%;top:15%;width:68%;padding:12px}#word-name{font-size:32px}}

/* Reading composition: large type at left; the open book owns the foreground. */
@media(min-width:900px) and (min-height:561px){.story-card{left:3.7vw;top:25vh;width:29.3vw;max-width:565px;max-height:60vh;padding:34px 38px 28px}.story-card h2{font-family:"Trebuchet MS","Segoe UI",sans-serif;font-size:clamp(28px,1.9vw,37px);font-weight:800;margin:14px 0 24px}#story-text{font-family:"Trebuchet MS","Segoe UI",sans-serif;font-size:clamp(29px,2vw,40px);line-height:1.58}.card-hint{font-size:12px}.story-card-top{font-size:12px}.word{margin-bottom:5px}.mini-cover{width:44px;height:53px}}
@media(max-width:600px) and (orientation:portrait){#story-text{font-size:25px;line-height:1.5}.story-card h2{font-family:"Trebuchet MS","Segoe UI",sans-serif;font-size:25px}}

.reading-progress{gap:4px;align-items:center;max-width:90vw}.reading-progress .progress-label{font-size:12px;color:#fff6d8;white-space:nowrap;margin-right:7px}.reading-progress .page-dot{width:6px;height:6px;flex:none;border-radius:50%;background:#ffffff40}.reading-progress .page-dot.done{background:#ffd56d}#scene-place{color:#93703e;font-weight:600}#scene-task{display:inline-block;margin-top:5px}

.shelf-group-label{position:absolute;left:calc(50% + 90px);bottom:-25px;font-size:12px;color:#fff4d7;white-space:nowrap;text-shadow:0 1px 3px #614323}
.catalog-dialog{width:min(960px,94vw);max-height:88dvh;padding:32px;border:4px double #d4ae68;border-radius:22px;background:#fff6df;color:#493a31;box-shadow:0 22px 70px #291f2466;overflow:auto;overscroll-behavior:contain}
.catalog-dialog::backdrop{background:#152433aa}.catalog-dialog h2{font-size:28px;margin:0 40px 8px 0}.catalog-dialog>p{color:#876846;margin:8px 0 16px}
.catalog-filters{display:flex;gap:16px;margin:20px 0}.catalog-filters label{display:flex;flex-direction:column;gap:7px;font-size:13px;flex:1}.catalog-filters input,.catalog-filters select{font:inherit;font-size:16px;color:#493a31;background:#fffdf5;border:1px solid #d4b982;border-radius:12px;padding:12px;width:100%;min-height:46px}
.catalog-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.catalog-book{display:flex;align-items:center;gap:12px;text-align:left;padding:12px;background:#f8ebca;border:1px solid #ddc795;border-radius:14px;min-height:126px;transition:background .18s,transform .18s}.catalog-book:hover{background:#f2dfae;transform:translateY(-2px)}.catalog-book b{display:block;font-size:15px;line-height:1.5}.catalog-book small{display:block;font-size:11px;color:#8b704e;line-height:1.5;margin-top:5px}.catalog-cover{display:block;flex:none;width:66px;height:90px;border-radius:2px 5px 5px 2px;box-shadow:2px 3px 6px #654a3c44;background-repeat:no-repeat}.catalog-book>span:last-child{min-width:0}
@media(max-width:700px){.catalog-list{grid-template-columns:repeat(2,minmax(0,1fr))}.catalog-dialog{padding:24px 16px}.catalog-book{padding:9px;gap:8px}.catalog-cover{width:45px;height:65px}.catalog-book b{font-size:13px}.catalog-filters{gap:9px}.catalog-filters label:first-child{flex:1.3}#catalog-button{padding:8px 10px;font-size:12px;min-height:40px}}
@media(max-width:380px){.catalog-list{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.catalog-book{transition:none}.catalog-book:hover{transform:none}}

.page-navigation{display:flex;align-items:center;justify-content:center;gap:9px;padding:5px 12px;border:1px solid #c7a566;border-radius:20px;background:#fff5db;color:#6b4d30;box-shadow:0 2px 6px #50391c25;margin-bottom:6px;pointer-events:auto}
.page-position{display:flex;align-items:center;gap:3px;white-space:nowrap;font-size:12px}
#page-jump{width:36px;padding:3px 0;text-align:center;font:inherit;color:inherit;background:#fffaf0;border:1px solid #dcc290;border-radius:6px;appearance:textfield}
#page-jump::-webkit-inner-spin-button,#page-jump::-webkit-outer-spin-button{appearance:none;margin:0}
#page-slider{width:105px;min-height:28px;accent-color:#a77435;cursor:ew-resize;margin:0}
#page-slider:disabled,#page-jump:disabled{opacity:.55;cursor:wait}
#page-slider:focus-visible,#page-jump:focus-visible{outline:2px solid #795d34;outline-offset:3px}
#story-card{touch-action:pan-y}
.reading-word.spoken{background:#ffdf87;border-radius:4px}
@media(max-width:600px){.page-navigation{padding:2px 9px;gap:6px}#page-slider{width:85px}}
@media(max-width:600px) and (orientation:portrait){#story-card{top:auto;bottom:160px;max-height:42dvh;overflow-y:auto}}

/* A story-specific paper invitation, rather than a formal dialog. */
#book-preview.story-invitation{--invite-wash:#e6edf9;--invite-accent:#6b83ab;width:390px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 120px);overflow-y:auto;bottom:7vh;padding:18px 29px 16px;border:3px solid #c29b67;border-radius:38px 32px 36px 30px;background:radial-gradient(ellipse at 50% 0,var(--invite-wash),transparent 48%),#fff8e6;box-shadow:0 7px 0 #ad8658,0 15px 35px #44301d45,inset 0 0 0 5px #fffcf2;outline:0}
#book-preview.story-invitation:before,#book-preview.story-invitation:after{display:none}
.invitation-art{height:105px;position:relative;display:grid;place-items:center;margin:0 auto 8px;width:240px;isolation:isolate}
.invitation-orbit{position:absolute;width:172px;height:89px;border-radius:50%;background:var(--invite-wash);border:1px dashed var(--invite-accent);transform:rotate(-7deg)}
.invitation-cover{display:block;width:66px;height:88px;border-radius:3px 7px 7px 3px;border:2px solid #ffefce;transform:rotate(-9deg);box-shadow:3px 3px 0 #b79c74,5px 7px 10px #4a3b3430;position:relative;z-index:2}
.invitation-star{position:absolute;color:#d4a34e;font-size:32px;line-height:1;z-index:3;text-shadow:0 2px #fff8e6}
.star-left{left:35px;top:19px;transform:rotate(-12deg)}.star-right{right:35px;top:47px;font-size:26px;transform:rotate(13deg)}
.invitation-cloud{position:absolute;width:60px;height:19px;background:#fffdf4;border-radius:24px;bottom:5px;box-shadow:0 3px 0 #d9c9a766;z-index:3}
.invitation-cloud:before,.invitation-cloud:after{content:'';position:absolute;background:inherit;border-radius:50%;width:25px;height:25px;left:9px;bottom:5px}.invitation-cloud:after{width:32px;height:32px;left:25px;bottom:3px}
.cloud-left{left:41px;transform:scale(.8)}.cloud-right{right:32px;bottom:9px;transform:scale(.65)}
.invitation-kicker{font-size:13px;letter-spacing:2px;font-weight:700;color:var(--invite-accent)}
#book-preview h2{font-family:'Microsoft YaHei','PingFang SC',sans-serif;font-size:27px;font-weight:800;line-height:1.4;margin:10px 0 5px;color:#74512f}
#book-preview .english-subtitle{font-size:15px;line-height:1.5;color:#8a765e}
#book-preview .preview-description{font-size:14px;line-height:1.9;margin:14px 0 12px;text-align:left;background:#ffffff6b;border-radius:16px;padding:10px 14px;color:#746047}
#book-preview .preview-detail{gap:8px;flex-wrap:wrap;margin:10px 0 18px;font-size:11px;color:#827354}
#book-preview .preview-detail span{border:1px dashed #d6bd92;background:#fffaf0;padding:5px 10px;border-radius:12px}
#book-preview #open-book{border:2px solid #b98538;outline:0;background:#f6ce7a;color:#614723;border-radius:20px;box-shadow:0 4px 0 #bd8b44,inset 0 2px 0 #ffe9b6;font-size:19px;min-height:49px;padding:10px 20px;transition:transform .16s,background .16s}
#book-preview #open-book:after{content:' →';margin-left:9px}#book-preview #open-book:hover{background:#ffdb8f;transform:translateY(-2px)}#book-preview #open-book:active{transform:translateY(3px);box-shadow:0 1px 0 #bd8b44}
#book-preview #put-back{font-size:12px;color:#937d60;margin:10px auto 0;min-height:34px;text-decoration:underline;text-decoration-color:#d7c39d;text-underline-offset:4px}
@media(max-width:600px){#book-preview.story-invitation{bottom:5vh;padding:14px 23px 12px;width:340px;max-height:calc(100dvh - 145px)}#book-preview h2{font-size:24px}.invitation-art{height:94px}.invitation-cover{width:60px;height:80px}#book-preview .preview-description{font-size:13px;margin-top:10px}}
@media(max-height:560px) and (orientation:landscape){#book-preview.story-invitation{bottom:12px;max-height:calc(100dvh - 75px);width:420px;padding:12px 25px}.invitation-art{display:none}#book-preview h2{margin:5px 0;font-size:23px}#book-preview .preview-description{margin:7px 0;padding:7px 12px}#book-preview .preview-detail{margin:6px 0 10px}}
@media(prefers-reduced-motion:reduce){#book-preview #open-book{transition:none}}

/* Keep reading controls clear of home indicators and easy to tap. */
@media(pointer:coarse){
 #translate-button{min-width:44px;min-height:44px}
 .small-actions .pill-button,#word-close,#put-back{min-height:44px;min-width:44px}
 #page-slider{min-height:44px}#page-jump{min-height:36px;font-size:16px}
 .hud{padding-top:max(18px,env(safe-area-inset-top));padding-left:max(18px,env(safe-area-inset-left));padding-right:max(18px,env(safe-area-inset-right))}
 .reader-controls{bottom:calc(12px + env(safe-area-inset-bottom))}
}
@media(pointer:coarse) and (max-width:600px) and (orientation:portrait){
 #story-card{bottom:calc(200px + env(safe-area-inset-bottom));max-height:36dvh}
 #story-card .story-card-top{padding-right:30px;min-height:32px}
 #book-preview.story-invitation{bottom:calc(16px + env(safe-area-inset-bottom));max-height:calc(100dvh - 150px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
}
@media(pointer:coarse) and (max-height:560px) and (orientation:landscape){
 #story-card{max-height:calc(100dvh - 95px - env(safe-area-inset-top));top:calc(70px + env(safe-area-inset-top));left:calc(12px + env(safe-area-inset-left));width:38vw}
 .reader-controls{left:70%;width:55vw;gap:12px}
 #story-text{font-size:22px;line-height:1.45}
}
@media(pointer:coarse) and (max-width:600px) and (orientation:portrait){.collect-button{top:calc(148px + env(safe-area-inset-top));bottom:auto;right:14px;min-height:44px}}

/* Let children explore the illustration without a text card covering it. */
body[data-picture-mode="true"] #story-card{visibility:hidden;pointer-events:none}
#picture-mode[aria-pressed="true"]{background:#e3eedc;border-color:#7c9563;color:#49633d}
.small-actions{flex-wrap:wrap;justify-content:center}
@media(pointer:coarse) and (max-width:600px){.small-actions{gap:6px}.small-actions .pill-button{padding-left:10px;padding-right:10px}}
