:root{color-scheme:light;--paper:#fff8e9;--ink:#373b32;--muted:#71634e;--green:#315d53;--green-deep:#23483f;--clay:#a65232;--gold:#ba8f4c;--line:#dac9a8;--shadow:0 14px 40px -14px #452f254d;font-family:"Avenir Next",Avenir,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);background:#d4b38b;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;min-width:320px}button,a{touch-action:manipulation;-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:disabled{opacity:.4;cursor:default}button,a{color:inherit}a{text-underline-offset:4px}button:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--clay);outline-offset:5px}[hidden]{display:none!important}::selection{background:#e3d09c;color:#283f34}html{scrollbar-color:#b5976e #eee0c7}.icon-library{position:absolute;width:0;height:0;overflow:hidden}.icon{width:22px;height:22px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.skip-link{position:absolute;top:-80px;left:24px;z-index:20;background:var(--paper);padding:12px}.skip-link:focus{top:12px}
.experience{position:relative;min-height:680px;height:100svh;isolation:isolate;overflow:hidden}.world{position:absolute;inset:0;z-index:-2}.world canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab}.world canvas:active{cursor:grabbing}.masthead{position:absolute;left:3.2%;right:3.2%;top:25px;display:flex;align-items:center;justify-content:space-between;gap:20px;z-index:4}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;font-size:19px;font-weight:700;color:#314b40;text-shadow:0 1px 3px #fff5d5}.brand .icon{width:30px;height:30px}.header-actions{display:flex;align-items:center;gap:9px}.quiet-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:0;min-height:44px;padding:10px 14px;border-radius:12px;background:#fff8e9e8;color:#584b37;font-size:13px;font-weight:600;transition:background 160ms ease-out}.quiet-button:hover:not(:disabled){background:#fffdf7}.quiet-button[aria-pressed=true]{background:var(--green);color:var(--paper)}
.cover-intro{position:absolute;top:25%;left:6%;width:32%;max-width:430px}.cover-intro h1{font-family:Georgia,"Times New Roman",serif;font-weight:500;font-size:clamp(48px,5.3vw,76px);letter-spacing:-.035em;line-height:1.08;margin:0;color:#294b42;text-wrap:balance}.cover-intro em{font-style:normal;color:#aa5837}.intro-chinese{font-size:20px;margin:20px 0 0;color:#3b5142;font-weight:600}.intro-description{color:#66563d;font-size:16px;line-height:1.9;margin:24px 0}.button{display:inline-flex;align-items:center;justify-content:center;gap:10px;border:0;min-height:48px;padding:13px 22px;border-radius:12px;font-size:15px;font-weight:650;transition:background 160ms ease-out,color 160ms ease-out}.primary-button,.listen-button{color:var(--paper);background:var(--green)}.primary-button{min-height:56px;min-width:185px;font-size:17px}.primary-button:hover:not(:disabled),.listen-button:hover:not(:disabled){background:var(--green-deep)}.edition-note{color:#75654d;font-size:11px;margin:20px 0}
.reading-card{position:absolute;top:26%;left:4%;width:31%;max-width:420px;min-height:295px;padding:26px 29px 22px;background:var(--paper);border-radius:5px 15px 15px 5px;box-shadow:var(--shadow);z-index:2}.reading-card::after{content:"";position:absolute;inset:9px;border:1px solid #d2b98480;border-radius:2px 8px 8px 2px;pointer-events:none}.reading-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#866338;font-size:11px;line-height:1.5;margin-bottom:27px}.reading-heading span:first-child{font-variant-numeric:tabular-nums;white-space:nowrap}.story-text{font-size:clamp(26px,2.5vw,36px);line-height:1.52;font-weight:500;letter-spacing:-.02em;min-height:115px;white-space:pre-line;text-wrap:pretty}.story-text p{margin:0}.wordless-note{color:var(--muted);font-size:18px;line-height:1.9;margin:10px 0 25px}.narration-controls{display:flex;align-items:center;gap:12px;margin-top:28px}.round-button{display:inline-flex;align-items:center;justify-content:center;width:46px;height:46px;border:1px solid var(--line);border-radius:50%;background:#fff9ec;color:#715434;flex-shrink:0}.round-button:hover:not(:disabled){background:#efddb9}.audio-status{font-size:11px;line-height:1.6;color:var(--muted);min-height:18px;margin:12px 0 0}.audio-status.error{color:#a33829}.reading-card.arrive{animation:paper-arrive 380ms cubic-bezier(.16,1,.3,1)}@keyframes paper-arrive{from{transform:translateY(9px);opacity:.6}to{transform:translateY(0);opacity:1}}
.scene-invitation{position:absolute;right:8%;bottom:20%;text-align:center;z-index:2}.call-cat{background:#fff8e9e8;color:#755132;font-size:13px;min-height:44px;padding:11px 17px}.call-cat:hover:not(:disabled){background:#fffdf7}.scene-invitation p{color:#6e573c;font-size:11px;margin:9px 0 0;text-shadow:0 1px 3px #ffedc8}.book-controls{position:absolute;bottom:37px;left:50%;transform:translateX(-50%);width:min(680px,76%);display:flex;align-items:center;justify-content:space-between;gap:24px;border-radius:16px;background:#fff8e9f5;box-shadow:0 9px 28px -12px #46301f80;padding:13px 20px;z-index:3}.book-controls .quiet-button{background:transparent;font-size:12px;padding:8px 5px}.page-controls{display:flex;align-items:center;gap:23px}.page-arrow{width:49px;height:49px}.page-arrow:last-child{background:#315d53;color:var(--paper);border-color:transparent}.page-arrow:last-child:hover:not(:disabled){background:var(--green-deep)}.progress{display:flex;flex-direction:column;align-items:center;gap:9px;min-width:95px}.progress>span{font-size:13px;color:#715434;font-variant-numeric:tabular-nums}.page-dots{display:flex;gap:4px}.page-dot{width:4px;height:4px;background:#cbb997;border-radius:3px}.page-dot.current{width:13px;background:var(--green)}.credit-footer{position:absolute;bottom:15px;left:3%;display:flex;gap:9px;align-items:center;color:#66543e;font-size:10px}.credit-footer img{display:block;max-width:65px;max-height:24px;object-fit:contain}.credit-footer a{min-height:28px;display:flex;align-items:center}
.load-error{position:absolute;left:7%;top:60%;background:var(--paper);padding:20px;border-radius:12px;z-index:6;color:#9b402b}.load-error button{margin-left:15px}.scene-fallback{position:absolute;top:15%;right:6%;width:52%;height:65%;display:flex;flex-direction:column;align-items:center;justify-content:center}.scene-fallback img{max-width:100%;max-height:85%;object-fit:contain;border-radius:12px}.scene-fallback p{font-size:12px;background:var(--paper);padding:12px;border-radius:8px}.fallback-mode .world{display:none}
dialog{width:min(720px,90vw);max-height:88svh;border:0;border-radius:16px;background:var(--paper);padding:24px 30px;color:var(--ink);box-shadow:0 24px 70px #38251670}dialog::backdrop{background:#332a2280}.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:16px}.dialog-heading h2{font-size:20px;margin:0;font-weight:650}dialog h3{font-size:27px;font-family:Georgia,serif;font-weight:500}dialog p{font-size:14px;line-height:1.9}dialog a{color:var(--green)}#original-image{display:block;max-width:100%;max-height:62svh;object-fit:contain;margin:auto}.dialog-note{color:var(--muted);font-size:12px!important}
@media(min-width:901px) and (max-height:720px){.experience{min-height:600px}.cover-intro{top:23%}.cover-intro h1{font-size:57px}.intro-description{margin:17px 0}.reading-card{top:23%;padding:22px 26px 19px}.story-text{font-size:29px;min-height:100px}.reading-heading{margin-bottom:19px}.book-controls{bottom:30px;padding:10px 17px}.scene-invitation{bottom:22%}.credit-footer{bottom:5px}}
@media(max-width:1050px) and (orientation:landscape){.reading-card{left:3%;width:33%;padding:22px}.story-text{font-size:27px}.scene-invitation{right:5%;bottom:22%}.header-actions{gap:5px}.quiet-button{padding:10px}.cover-intro{left:5%;width:35%}.cover-intro h1{font-size:50px}.book-controls{width:69%;left:60%}.credit-footer span{display:none}}
@media(max-width:900px) and (orientation:portrait){.experience{height:auto;min-height:100svh;padding-top:57svh;overflow:visible;padding-bottom:72px}.world{height:58svh;bottom:auto}.masthead{top:18px;left:5%;right:5%;gap:10px}.brand{font-size:16px;gap:7px}.brand .icon{width:25px;height:25px}.header-actions{gap:6px}.quiet-button{font-size:12px;padding:9px 11px}.header-actions .quiet-button span{display:none}.header-actions .quiet-button{width:42px;min-height:42px;padding:8px}.header-actions #about{width:auto}.cover-intro{position:relative;top:auto;left:auto;margin:-2svh 7% 0;width:86%;max-width:none;text-align:center;padding-bottom:20px}.cover-intro h1{font-size:42px;line-height:1.15}.cover-intro h1 br{display:none}.cover-intro h1 em{margin-left:.2em}.intro-chinese{font-size:17px;margin:10px 0}.intro-description{font-size:14px;margin:14px 0}.intro-description br{display:none}.edition-note{margin:14px 0}.reading-card{position:relative;top:auto;left:auto;margin:0 5%;width:90%;max-width:none;min-height:0;padding:22px 27px}.reading-heading{margin-bottom:18px}.story-text{font-size:28px;min-height:0;line-height:1.5}.narration-controls{margin-top:20px}.audio-status{margin-top:9px}.scene-invitation{top:calc(57svh - 88px);bottom:auto;right:6%;}.scene-invitation p{font-size:10px}.call-cat{font-size:12px;min-height:40px;padding:9px 13px}.book-controls{position:relative;bottom:auto;left:auto;transform:none;width:90%;margin:18px auto 0;padding:12px 16px;gap:14px}.page-controls{gap:14px}.book-controls>.quiet-button span{display:none}.progress{min-width:70px}.credit-footer{bottom:17px;left:7%;}.scene-fallback{top:90px;right:8%;width:84%;height:calc(57svh - 130px)}.scene-fallback p{font-size:10px}.load-error{top:65%;left:5%;right:5%}}
@media(max-width:400px){.page-controls{gap:10px}.book-controls{padding:10px}.progress{min-width:60px}.page-dots{gap:3px}.page-dot{width:3px}.story-text{font-size:25px}.reading-card{padding:22px}.brand{font-size:14px}.masthead{left:4%;right:4%}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
.reading-card.wordless{min-height:0}.reading-card.wordless .wordless-note{margin:27px 0 20px}.reading-card.wordless .audio-status{display:block}
/* The library controls stay below the covers, leaving the 3D shelf touchable. */
.library-intro{position:absolute;left:50%;bottom:25px;transform:translateX(-50%);width:min(760px,88%);z-index:2;text-align:center}
.library-intro h1{font-size:24px;line-height:1.3;letter-spacing:-.025em;color:#294b42;font-weight:650;margin:0}
.library-description{font-size:12px;line-height:1.7;color:#655139;margin:3px 0 0}
.library-selection{display:grid;grid-template-columns:48px minmax(0,1fr) auto 48px;align-items:center;gap:18px;padding:12px 16px;background:#fff8e9f5;box-shadow:var(--shadow);border-radius:16px}
.library-arrow{width:48px;height:48px;background:#f3e4c7;border:0;color:#6b4f2e}
.library-selected-copy{min-width:0;text-align:left}
.library-book-name{font:500 26px/1.2 Georgia,serif;color:#294b42;margin:0;text-wrap:balance}
.library-book-name:lang(zh-CN){font-family:inherit;font-size:21px;font-weight:600}
.library-book-status{font-size:11px;line-height:1.6;color:#6d5b43;margin:7px 0 0}
.library-selection .primary-button{min-width:148px;min-height:48px;padding:11px 17px;font-size:15px}
.library-intro[data-available=false] .primary-button:disabled{opacity:1;color:#786548;background:#eee2c8}
.library-selectors{position:relative;display:flex;justify-content:flex-start;gap:3px;width:max-content;max-width:100%;margin:7px auto 0;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;padding:3px 4px;scrollbar-color:#ae8e64 transparent}
.library-slot{display:flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;padding:0;background:transparent;border:0;border-radius:9px}
.library-slot-spine{display:flex;align-items:center;justify-content:center;width:23px;height:31px;border-radius:2px 4px 4px 2px;background:color-mix(in srgb,var(--binding,#496e61) 37%,#fff8e9);color:#294b42;box-shadow:2px 3px 5px #51391f35;font-size:10px;font-weight:650;font-variant-numeric:tabular-nums;border:1px solid var(--binding,#496e61);opacity:1;transition:opacity 150ms ease-out,transform 150ms ease-out}
.library-slot[aria-pressed=true]{background:#fff6e1}
.library-slot[aria-pressed=true] .library-slot-spine{background:#315d53;color:#fff8e9;border-color:#315d53;opacity:1;transform:translateY(-2px)}
.library-slot:hover:not(:disabled) .library-slot-spine{opacity:1}
.world canvas[data-shelf=true]{cursor:grab}.world canvas[data-pulling=true]{cursor:grabbing}
@media(max-width:900px) and (orientation:portrait){
 body[data-book-state=shelf] .experience{height:100svh;min-height:780px;padding:0;overflow:hidden}
 body[data-book-state=shelf] .world{height:100%}
 body[data-book-state=shelf] .library-intro{position:absolute;left:50%;bottom:55px;transform:translateX(-50%);margin:0;padding:0}
 .library-intro{position:relative;left:auto;bottom:auto;transform:none;width:90%;margin:0 auto;padding-bottom:12px}
 .library-intro h1{font-size:25px}
 .library-description{font-size:12px;margin:8px 0 0}
 .library-selection{grid-template-columns:44px minmax(0,1fr) 44px;gap:10px;padding:14px 12px}
 .library-arrow{width:44px;height:44px}
 .library-selected-copy{text-align:center}
 .library-selection #take-book{grid-column:2;grid-row:2;justify-self:center;margin-top:4px}
 .library-selection #library-next{grid-column:3;grid-row:1}
 .library-book-name{font-size:25px}
 .library-selectors{margin-top:10px}
 .header-actions #return-book{width:42px;padding:8px}
}
@media(min-width:600px) and (max-width:900px) and (orientation:portrait){.book-controls #close-book span{display:inline}.header-actions #return-book{width:auto;padding:9px 11px}.header-actions #return-book span{display:inline}.library-selection{grid-template-columns:48px minmax(0,1fr) auto 48px;gap:18px}.library-selection #take-book{grid-column:3;grid-row:1;margin:0}.library-selection #library-next{grid-column:4}.library-selected-copy{text-align:left}}
@media(max-height:720px) and (orientation:landscape){.library-intro{bottom:15px}.library-intro h1{font-size:20px}.library-description{margin:3px 0 0}.library-selection{padding:9px 13px}.library-selectors{margin-top:3px}.library-book-name{font-size:23px}}
@media(min-width:901px),(orientation:landscape){.cover-intro{padding:25px;background:#fff8e9f2;box-shadow:var(--shadow);border-radius:5px 15px 15px 5px}.cover-intro h1{font-size:clamp(42px,4.5vw,66px)}}
body[data-book-state=shelf]{background:#e2dac5}

body[data-book-state=shelf] .brand{background:#fff8e9e8;padding:8px 12px;border-radius:12px;text-shadow:none}
.music-section{margin-top:14px;padding-top:7px;border-top:1px solid var(--line)}
.music-controls{display:flex;align-items:center;justify-content:space-between;gap:16px}
.music-button{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:6px 2px;border:0;border-radius:8px;background:transparent;color:var(--muted);font-size:12px;font-weight:600;white-space:nowrap}
.music-button[aria-pressed=true]{color:var(--green)}
.music-button:hover{background:#eee4cf}
.music-button .icon{width:18px;height:18px}
.music-volume{display:flex;align-items:center;min-height:44px;width:96px;flex-shrink:0}
.music-volume input{width:100%;height:44px;margin:0;accent-color:var(--green);cursor:pointer;touch-action:pan-y}
.music-volume input:focus-visible{outline:3px solid var(--clay);outline-offset:5px;border-radius:3px}
.music-status{font-size:10px;line-height:1.6;color:var(--muted);margin:0}
.music-status.error{color:#a33829}
.story-word{display:inline;padding:0;border:0;border-radius:4px;background:transparent;font:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;text-decoration:underline dotted #b68e56;text-decoration-thickness:1px;text-underline-offset:6px}
.story-word:hover:not(:disabled),.story-word.selected{background:#f2dca6;color:#30483b;text-decoration-color:transparent}
.story-word:disabled{opacity:1}
.word-hint{font-size:11px;line-height:1.6;color:var(--muted);margin:11px 0 -10px}
.word-popover{position:fixed;z-index:10;width:340px;max-width:calc(100vw - 24px);max-height:calc(100svh - 24px);overflow:auto;overscroll-behavior:contain;background:#fffaf0;color:var(--ink);padding:17px 20px 18px;border-radius:14px;box-shadow:0 12px 40px -8px #452f256b}
.word-popover-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.word-popover h2{font-size:27px;line-height:1.3;margin:0;font-weight:650;letter-spacing:-.02em}
.word-popover-heading .quiet-button{width:44px;padding:8px;background:transparent}
#word-meaning{font-size:20px;line-height:1.5;font-weight:600;margin:9px 0 6px}
#word-note{font-size:13px;line-height:1.8;margin:0;color:var(--muted)}
.word-pronunciation{display:flex;align-items:center;gap:12px;margin-top:14px}
.word-pronunciation .quiet-button{flex-shrink:0;padding:9px 11px;background:#e9eedf;color:var(--green);font-size:12px}
#word-status{font-size:10px;line-height:1.6;color:var(--muted);margin:0}
.word-example-section{border-top:1px solid var(--line);margin-top:16px;padding-top:9px}
.word-example-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}
.word-example-section .quiet-button{background:transparent;color:var(--green);padding:8px 2px;font-size:13px}
.word-example-section .quiet-button:hover{background:#e9eedf}
#word-example-count{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
#word-example-text{font-size:21px;line-height:1.5;font-weight:500;margin:10px 0 5px}
#word-example-text mark{background:#f2dca6;color:#30483b;border-radius:3px;padding:0 2px}
#word-example-translation{font-size:13px;line-height:1.8;color:var(--muted);margin:0 0 6px}

/* Room controls remain separate from the reading text and shelf navigation. */
.room-explorer{position:absolute;right:3.2%;top:82px;z-index:5;max-width:calc(100% - 32px)}
.room-explorer>summary{display:flex;list-style:none;width:max-content;margin-left:auto;cursor:pointer;font-size:12px;min-height:44px;touch-action:manipulation}
.room-explorer>summary::-webkit-details-marker{display:none}
.room-explorer>summary:focus-visible{outline:3px solid var(--clay);outline-offset:4px}
.room-explorer[open]>summary{background:var(--green);color:var(--paper)}
.room-explorer-panel{width:250px;max-width:100%;margin-top:8px;padding:16px;background:var(--paper);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);max-height:min(460px,55svh);overflow:auto}
.room-explorer-panel p{font-size:12px;line-height:1.7;color:var(--muted);margin:0 0 10px}
.room-object-list{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.room-object-button{min-height:44px;padding:8px;border:1px solid var(--line);border-radius:8px;background:#f6eddc;font-size:13px;color:var(--green-deep)}
.room-object-button:hover{background:#e5ddbc}
.object-feedback,.object-hover{position:absolute;top:82px;left:3.2%;z-index:4;margin:0;padding:10px 14px;max-width:calc(96% - 156px);font-size:13px;line-height:1.6;color:var(--green-deep);background:#fff8e9f5;border:1px solid #dac9a8;border-radius:9px;box-shadow:0 5px 18px #452f2514;pointer-events:none}
.object-hover{font-size:12px;z-index:3}.object-feedback:empty{display:none}
@media(max-width:600px){.room-explorer{top:74px;right:16px}.object-feedback,.object-hover{top:128px;left:16px;max-width:calc(100% - 32px)}.room-explorer-panel{max-height:45svh}}

.quiet-button[aria-pressed=true]:hover:not(:disabled){background:var(--green-deep)}

/* Remember the place; collect only words the reader explicitly marks. */
.header-actions #open-vocabulary{position:absolute;right:112px;top:57px;width:auto;min-height:44px;padding:10px 12px;gap:7px}
.header-actions #open-vocabulary span{display:inline}
#open-vocabulary .icon{width:19px;height:19px}
.vocabulary-badge{min-width:19px;text-align:center;color:var(--paper);background:var(--green);border-radius:4px;padding:1px 5px;font-size:11px;font-variant-numeric:tabular-nums}
.restart-book{margin-left:10px;min-height:48px;background:transparent;text-decoration:underline;text-underline-offset:4px}
.resume-note{font-size:12px;line-height:1.7;color:#5b4d37;margin:13px 0 0}
.reading-save-status{font-size:10px;line-height:1.6;color:var(--muted);margin:-17px 0 18px}
.reading-save-status.error,#word-storage-warning,.vocabulary-summary .error{color:#9a3928}
.page-dot.visited{background:#78968a}.page-dot.current{background:var(--green)}
.story-word.is-unfamiliar{background:#efe2bc;text-decoration-style:solid;text-decoration-color:#a17a34}
.story-word.is-unfamiliar.selected{background:#f2dca6}
.word-save-section{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
#word-save{width:100%;min-height:44px;background:#eee3c9;color:#4e513b}
#word-save[aria-pressed=true]{background:var(--green);color:var(--paper)}
#word-save:hover:not(:disabled){background:#e3d5b4}#word-save[aria-pressed=true]:hover:not(:disabled){background:var(--green-deep)}
#word-save-status,#word-storage-warning{font-size:11px;line-height:1.7;margin:7px 0 0}
#word-save-status:empty{display:none}
.vocabulary-dialog{width:min(620px,calc(100vw - 32px));max-height:calc(100svh - 48px);padding:26px 30px;overflow:auto;overscroll-behavior:contain}
.vocabulary-dialog .dialog-heading{align-items:flex-start;gap:16px;margin-bottom:18px}
.vocabulary-dialog .dialog-heading h2{margin:0;font:650 27px/1.3 "Avenir Next","PingFang SC",sans-serif;letter-spacing:-.02em}
.vocabulary-book-title{font:15px/1.5 Georgia,serif;color:var(--muted);margin:6px 0 0}
.vocabulary-summary{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px 18px;padding-bottom:14px;border-bottom:1px solid var(--line)}
#vocabulary-count{font-size:13px;font-weight:600;color:var(--green);font-variant-numeric:tabular-nums}
#vocabulary-storage{font-size:11px;line-height:1.7;color:var(--muted);margin:0}
#vocabulary-empty{font-size:16px;line-height:1.9;color:var(--muted);padding:28px 0;margin:0;max-width:34em}
.vocabulary-item{padding:22px 0;border-bottom:1px solid var(--line)}
.vocabulary-item-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}
.vocabulary-item .vocabulary-word{font-size:28px;line-height:1.3;letter-spacing:-.02em;margin:0;font-weight:650;color:var(--green-deep)}
.vocabulary-item .vocabulary-meaning{font-size:17px;line-height:1.6;margin:5px 0 13px}
.vocabulary-item .vocabulary-context{font-size:18px;line-height:1.6;margin:0;color:var(--ink)}
.vocabulary-item .vocabulary-source{font-size:11px;line-height:1.6;color:var(--muted);margin:6px 0 12px}
.vocabulary-item-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between}
.vocabulary-item .quiet-button{min-height:44px;background:#e9eedf;color:var(--green-deep);font-size:12px}
.vocabulary-item .quiet-button:hover{background:#dce5cd}
.vocabulary-item .quiet-button.is-playing{background:var(--green);color:var(--paper)}
.vocabulary-feedback{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-top:14px}
#vocabulary-status{font-size:12px;line-height:1.7;color:var(--muted);margin:0}
#vocabulary-undo{flex-shrink:0;background:#eee3c9;min-height:44px}
@media(max-width:900px) and (orientation:portrait){.header-actions #open-vocabulary{top:64px}.reading-save-status{margin:-9px 0 13px}}
@media(max-width:600px){.header-actions #open-vocabulary{top:56px;right:108px}.vocabulary-dialog{padding:20px;max-height:calc(100svh - 24px)}.vocabulary-summary{display:block}#vocabulary-storage{margin-top:6px}.vocabulary-item .vocabulary-word{font-size:25px}.restart-book{margin-left:5px}.room-explorer{z-index:5}}

/* Reading and page navigation share one card. These selectors override the
   former floating toolbar at every viewport size, including portrait. */
.reading-card .book-controls {
  position:static;
  inset:auto;
  transform:none;
  width:100%;
  margin:8px 0 0;
  padding:8px 0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  display:block;
}
.reading-card .page-controls {
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:12px;
  width:100%;
}
.reading-card .page-arrow {
  width:auto;
  height:auto;
  min-height:48px;
  min-width:44px;
  padding:10px;
  gap:6px;
  border-radius:10px;
  font-size:13px;
  white-space:nowrap;
}
.reading-card #next { color:var(--paper); background:var(--green); border-color:var(--green); }
.reading-card #next:hover:not(:disabled) { background:var(--green-deep); }
.reading-card .reading-utilities {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:4px;
}
.reading-utilities .quiet-button {
  min-width:44px;
  min-height:44px;
  padding:8px 4px;
  background:transparent;
  font-size:12px;
}

/* The left page holds the text; the standing artwork and models are on the
   right. Narrow portrait screens keep the scene above the complete card. */
@media (min-width:901px), (orientation:landscape) {
  body[data-book-state="open"] .reading-card {
    top:29%;
    left:auto;
    right:calc(50% + 16px);
    width:38%;
    max-width:480px;
    min-height:0;
    max-height:calc(71% - 28px);
    padding:14px 24px;
    overflow-y:auto;
    overscroll-behavior:contain;
    scrollbar-width:thin;
    scrollbar-color:#c7b58e transparent;
    scroll-padding-block:14px;
  }
  body[data-book-state="open"] .reading-heading { margin-bottom:3px; }
  body[data-book-state="open"] .reading-save-status { margin:0 0 8px; }
  body[data-book-state="open"] .story-text {
    min-height:0;
    font-size:clamp(26px,2.2vw,32px);
    line-height:1.45;
  }
  body[data-book-state="open"] .word-hint { margin:4px 0 0; }
  body[data-book-state="open"] .narration-controls { margin-top:8px; }
  body[data-book-state="open"] .audio-status { margin-top:3px; }
  body[data-book-state="open"] .music-section { margin-top:6px; padding-top:4px; }
  body[data-book-state="open"] .reading-card.wordless .wordless-note { margin:5px 0 10px; }
  body[data-book-state="open"] .scene-invitation { right:8%; bottom:6%; }
}

@media (max-width:1100px) and (orientation:landscape) {
  body[data-book-state="open"] .reading-card { padding-inline:21px; }
  .reading-card .page-controls { gap:8px; }
  .reading-card .page-arrow { padding-inline:8px; }
}

@media (max-width:900px) and (orientation:portrait) {
  body[data-book-state="open"] .header-actions .quiet-button,
  body[data-book-state="open"] .call-cat { min-width:44px; min-height:44px; }
  body[data-book-state="open"] .experience { padding-top:50svh; }
  body[data-book-state="open"] .scene-invitation { top:calc(50svh - 56px); left:8%; right:auto; }
  body[data-book-state="open"] .scene-invitation p { display:none; }
}

.scene-word-label {
  position:fixed;
  z-index:6;
  width:max-content;
  max-width:calc(100vw - 24px);
  display:grid;
  grid-template-columns:1fr 44px;
  padding:4px;
  border-radius:12px;
  background:var(--paper);
  color:var(--green-deep);
  box-shadow:0 8px 24px -8px #45341d66;
}
.scene-word-listen {
  display:flex;
  gap:10px;
  align-items:center;
  min-height:52px;
  padding:6px 10px;
  border:0;
  border-radius:8px;
  color:inherit;
  background:transparent;
  text-align:left;
}
.scene-word-listen>span { display:flex; flex-direction:column; gap:1px; }
.scene-word-listen strong { font-size:24px; line-height:1.2; font-weight:650; }
.scene-word-listen [data-scene-meaning] { font-size:12px; line-height:1.5; color:var(--muted); }
.scene-word-close { width:44px; height:44px; padding:12px; color:inherit; border:0; border-radius:8px; background:transparent; }
.scene-word-label p { grid-column:1/-1; font-size:11px; line-height:1.5; margin:0; padding:0 10px 6px; color:var(--muted); }
.scene-word-listen:hover,.scene-word-close:hover { background:#eee3c9; }
.scene-word-label.is-speaking .scene-word-listen { color:var(--paper); background:var(--green); }
.scene-word-label.is-speaking [data-scene-meaning] { color:var(--paper); }

@media (max-width:400px) {
  .reading-card .page-controls { gap:6px; }
  .reading-card .page-arrow { flex-direction:column; gap:2px; min-height:58px; padding:6px 4px; font-size:12px; }
  .reading-card .page-arrow .icon { width:17px; height:17px; }
  .reading-card .progress { min-width:0; }
}

/* Keep the sentence and its three reading actions together. */
body[data-book-state="open"] .reading-card { padding:24px 26px 16px; }
body[data-book-state="open"] .reading-heading { margin-bottom:18px; }
body[data-book-state="open"] .story-text { font-size:clamp(30px,2.8vw,38px); line-height:1.58; min-height:0; }
.story-sentence { display:block; }
.story-text .story-paragraph + .story-paragraph { margin-top:.4em; }
.reading-guidance { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; column-gap:12px; margin-top:8px; }
body[data-book-state="open"] .reading-guidance .word-hint { margin:0; }
.continuous-option { display:inline-flex; align-items:center; gap:7px; min-height:44px; cursor:pointer; color:var(--green); font-size:12px; white-space:nowrap; }
.continuous-option input { width:18px; height:18px; margin:0; accent-color:var(--green); cursor:pointer; }
.continuous-option input:focus-visible { outline:3px solid var(--clay); outline-offset:4px; }
.continuous-option:has(input:disabled) { opacity:.5; cursor:default; }
.reading-actions { display:flex; align-items:center; gap:12px; margin-top:8px; }
body[data-book-state="open"] .reading-actions .narration-controls { margin:0; flex:1; }
.reading-actions .listen-button { width:100%; padding:12px 14px; white-space:nowrap; }
.reading-card .reading-actions .book-controls { width:auto; margin:0; padding:0; }
.reading-card .reading-actions .page-controls { display:flex; gap:8px; }
.reading-card .reading-actions #previous { width:48px; padding:12px; }
.reading-card .reading-actions #previous>span { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.reading-card .reading-actions .page-arrow { min-height:48px; flex-direction:row; gap:5px; font-size:13px; }
.reading-card .reading-actions #next { min-width:96px; }
.reading-card .reading-utilities { margin-top:16px; padding-top:8px; border-top:1px solid var(--line); }
.reading-card .reading-utilities .quiet-button { padding-inline:4px; }
.reading-settings { padding:4px 0 2px; }
body[data-book-state="open"] .reading-settings .music-section { border-top:0; margin:0; padding:0; }
.reading-setting-actions { display:flex; gap:12px; }
.reading-setting-actions .quiet-button { background:transparent; padding-inline:4px; font-size:12px; }
#reading-settings-toggle[aria-expanded="true"] { color:var(--green); }
.story-word.is-reading { background:#f2dca6; color:#294b42; text-decoration-color:transparent; }
.story-word.is-linked { background:#e3ebda; color:#294b42; text-decoration:underline solid var(--green); text-decoration-thickness:2px; }
.story-word.selected { background:#f2dca6; }
.word-continue { width:100%; min-height:48px; margin-top:16px; background:var(--green); color:var(--paper); flex-shrink:0; }
.word-continue:hover:not(:disabled) { background:var(--green-deep); }
.word-popover { display:flex; flex-direction:column; overflow:hidden; }
.word-popover-heading { flex-shrink:0; }
.word-popover-content { min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#c7b58e transparent; }
.story-question h2 { margin:0 0 12px; font-size:clamp(28px,2.6vw,36px); line-height:1.4; font-weight:650; color:var(--green-deep); text-wrap:balance; }
.story-question h2:focus { outline:none; }
.story-question p { margin:6px 0; font-size:14px; line-height:1.6; color:var(--muted); }
.story-question .question-feedback { color:var(--green-deep); }
.question-feedback:empty { display:none; }
.question-help { display:flex; justify-content:space-between; gap:12px; }
.question-help .quiet-button { min-height:44px; padding-inline:0; background:transparent; text-decoration:underline; text-underline-offset:4px; font-size:13px; }
.question-alternatives summary { min-height:44px; display:list-item; align-content:center; cursor:pointer; color:var(--green); font-size:13px; }
.question-alternatives summary:focus-visible { outline:3px solid var(--clay); outline-offset:3px; }
.question-choices { display:flex; flex-wrap:wrap; gap:8px; padding:0 0 8px; }
.question-choice { min-height:44px; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:var(--paper); color:var(--green-deep); font:inherit; font-size:15px; cursor:pointer; }
.question-choice:hover { background:#e3ebda; }
.question-option { display:flex; align-items:center; gap:8px; min-height:44px; color:var(--green-deep); cursor:pointer; font-size:14px; }
.question-option input { width:18px; height:18px; margin:0; accent-color:var(--green); }
.question-option input:focus-visible { outline:3px solid var(--clay); outline-offset:4px; }
#question-description { font-size:12px; line-height:1.6; margin:0 0 12px; }
.reading-card.has-question .reading-guidance { margin-top:0; }
::selection { background:#e8cf94; color:#294b42; }
@media (max-width:1100px) and (orientation:landscape) {
  body[data-book-state="open"] .reading-card { padding:20px 21px 12px; }
  .reading-actions { gap:8px; }
  .reading-actions .listen-button { padding:12px 9px; font-size:14px; gap:6px; }
  .reading-card .reading-actions #next { min-width:86px; padding-inline:8px; }
}
@media (max-width:600px) and (orientation:portrait) {
  body[data-book-state="open"] .reading-card { padding:22px 20px 12px; }
  .reading-actions { gap:8px; }
  .reading-actions .listen-button { padding:12px 8px; font-size:14px; gap:6px; }
  .reading-card .reading-actions .page-controls { gap:6px; }
  .reading-card .reading-actions #next { min-width:86px; padding-inline:7px; }
}
