@charset "UTF-8";
:root{--paper:#fff8e8;--ink:#3e493c;--muted:#867f6d;--serif:Georgia,"Noto Serif TC","PMingLiU",serif;font-family:Arial,"Microsoft JhengHei",sans-serif;color:var(--ink);background:#eee7d9;font-synthesis:none}*{box-sizing:border-box}body{margin:0;background-image:radial-gradient(#846b3d0d .7px,transparent .7px);background-size:5px 5px}button,input,select{font:inherit;color:inherit}button,a{touch-action:manipulation}button{cursor:pointer;border:0;background:none;min-height:40px}button:disabled{opacity:.25;cursor:default}a{color:inherit}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #ad7937;outline-offset:4px}button:hover:not(:disabled){color:#aa672c}h1,h2,h3,p{margin:0}[hidden]{display:none!important}.reader{width:calc(100% - 80px);max-width:1440px;margin:auto}header{height:68px;display:flex;align-items:center;justify-content:space-between;gap:20px;color:#817661;font-size:11px;letter-spacing:.5px}header a{text-decoration:none}header>span{font-family:var(--serif);font-size:15px;letter-spacing:2px}header button{font-size:11px}.book{position:relative;height:calc(100dvh - 157px);min-height:490px;max-height:840px;border-radius:5px 14px 14px 5px;box-shadow:0 2px 0 #cabc9f,0 5px 0 #fbf5e7,0 7px 0 #cabc9f,0 10px 0 #f4eddf,0 25px 40px #57492f26;background:var(--paper);isolation:isolate;overflow:hidden;outline:none}.book:before{content:'';position:absolute;inset:0 auto 0 0;width:14px;background:linear-gradient(90deg,#191f242b,transparent);z-index:5;pointer-events:none}.scene-art{display:block;width:64%;height:100%;object-fit:cover;object-position:center;position:absolute;left:0;top:0;z-index:-1;touch-action:pan-y}.page-content{height:100%;margin-left:64%;position:relative;display:flex;flex-direction:column;padding:35px 30px;background:radial-gradient(#bdb08e15 .7px,transparent .7px),linear-gradient(90deg,#d8c7a332,transparent 25px),var(--paper);background-size:5px 5px,auto,auto}.page-content:before{content:'';position:absolute;left:-28px;top:0;bottom:0;width:29px;background:linear-gradient(90deg,transparent,#fff8e8b3,var(--paper));pointer-events:none}.cover .scene-art,.ending .scene-art{width:100%}.cover .page-content,.ending .page-content{margin-left:0;background:linear-gradient(90deg,#06192a8c,transparent 65%);padding:7% 6%;color:#fff4cf;justify-content:center;align-items:flex-start}.cover .page-content:before,.ending .page-content:before{display:none}.cover-eyebrow{font-family:var(--serif);font-size:15px;letter-spacing:5px;margin-bottom:26px;color:#e9d4a3}.cover h1{font-family:var(--serif);font-weight:400;font-size:clamp(48px,6vw,90px);letter-spacing:-2px;line-height:1.05;text-shadow:0 2px 4px #00152a33}.cover-zh{font-family:var(--serif);font-size:clamp(23px,2.7vw,40px);letter-spacing:9px;margin-top:22px}.cover-copy{font-family:var(--serif);font-size:15px;line-height:1.9;margin-top:30px;color:#eadbb9;max-width:330px}.open-book{font-family:var(--serif);font-size:16px;letter-spacing:2px;border-bottom:1px solid #dec793;padding:12px 3px;margin-top:35px;color:#ffedba}.open-book:hover{color:white!important}.cover-mark{font-size:11px;letter-spacing:1px;position:absolute;bottom:30px;color:#e4d0a4}.chapter-label{font-family:var(--serif);font-size:12px;letter-spacing:1.5px;color:#927e55;line-height:1.5}.page-title{font-family:var(--serif);font-weight:400;font-size:26px;line-height:1.2;margin:12px 0 25px;color:#57674c}.dialogue-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;justify-content:center;gap:30px;flex:1}.dialogue-text{display:block;text-align:left;width:100%;border-radius:6px}.speaker{display:flex;align-items:center;gap:9px;font-size:11px;color:#896d4d;letter-spacing:.3px;margin-bottom:10px}.portrait{font-size:25px;line-height:1;width:31px;display:inline-block;text-align:center}.your-turn{font-size:9px;border-bottom:1px solid #b5813d;color:#986021;margin-left:auto;padding-bottom:2px}.line-en{font-family:var(--serif);font-size:clamp(20px,2vw,30px);line-height:1.42;letter-spacing:-.2px;display:block;color:#3d493a}.line-zh{font-size:13px;line-height:1.85;color:#8a7c63;display:block;margin-top:12px}.line-cue{font-family:var(--serif);font-size:11px;line-height:1.5;color:#a28a5e;margin-top:10px;display:block}.selected-role .dialogue-text{background:#f0e5c78c;box-shadow:0 0 0 10px #f0e5c78c}.page-number{font-family:var(--serif);text-align:center;font-size:12px;letter-spacing:3px;color:#a18d67;margin-top:25px}.page-content.turn-in{animation:turn-in .28s ease-out}@keyframes turn-in{from{opacity:.35;transform:translateX(8px)}to{opacity:1;transform:none}}.cast-intro{font-family:var(--serif);color:#8a7a5e;font-size:14px;line-height:1.9}.cast-list{display:flex;flex-direction:column;gap:10px;margin:20px 0;flex:1;justify-content:center}.cast-role{display:flex;align-items:center;gap:15px;text-align:left;padding:8px;border-bottom:1px dashed #d5c7a6}.cast-role .portrait{font-size:33px;width:40px}.cast-role strong{display:block;font-family:var(--serif);font-size:19px;font-weight:400}.cast-role small{font-size:11px;color:#918269;display:block;margin-top:4px}.cast-role[aria-pressed=true]{background:#eee2c4}.cast-role[aria-pressed=true]:after{content:'✓';margin-left:auto;color:#947440}.cast-page .page-title{font-size:31px}.ending .page-content{background:linear-gradient(90deg,#10282ccc,transparent)}.ending h2{font-family:var(--serif);font-size:clamp(40px,5vw,72px);font-weight:400;line-height:1.1;max-width:450px}.ending p{font-family:var(--serif);line-height:1.9;color:#ecd7ae;margin:25px 0 0;font-size:17px;max-width:330px}.ending-buttons{display:flex;gap:20px;margin-top:30px;flex-wrap:wrap}.ending-buttons button{color:#ffe8b0;font-family:var(--serif);font-size:15px;border-bottom:1px solid #d7bc82;padding:10px 0}.reading-bar{margin-top:21px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:15px;font-size:12px}.reading-options,.page-controls,.extras{display:flex;align-items:center;gap:15px}.reading-options button{font-size:12px;padding:3px 4px;white-space:nowrap}.reading-options button[aria-pressed=true]{color:#a5672a}.page-controls{gap:18px}.page-controls>button:first-child,.page-controls>button:last-child{font-size:24px;width:42px;height:42px;border:1px solid #c9b99a;border-radius:50%;background:#f6efdf}.page-controls #contents-open{font-family:var(--serif);font-size:13px;min-width:115px}.extras{justify-content:flex-end;font-size:11px;gap:20px}.extras button{border-bottom:1px dotted #b6a383;min-height:30px;padding:0 1px}.reading-note{display:flex;justify-content:center;align-items:center;gap:13px;min-height:32px;font-size:10px;color:#9b8a6c;flex-wrap:wrap;padding:4px 0 9px}.reading-note button{min-height:26px;font-size:10px;color:#95602e}#live-status:empty{display:none}.reader:fullscreen{background:#eee7d9;width:100%;max-width:none;padding:0 28px;overflow:auto}.reader:fullscreen header{height:40px}.reader:fullscreen .book{height:calc(100dvh - 134px);max-height:none}dialog{background:var(--paper);border:1px solid #c7b68f;border-radius:7px 15px 15px 7px;padding:38px;max-width:calc(100vw - 28px);width:520px;max-height:calc(100dvh - 40px);color:var(--ink);box-shadow:0 8px 0 #e1d3b9,0 20px 70px #15213166}dialog::backdrop{background:#2333279c;backdrop-filter:blur(5px)}dialog .close{position:absolute;right:12px;top:8px;font-size:26px;width:40px}dialog h2{font-family:var(--serif);font-size:29px;line-height:1.3;font-weight:400;margin:10px 0 20px}dialog h3{font-family:var(--serif);font-size:24px;line-height:1.4;margin:15px 0}dialog p,dialog li{font-size:13px;line-height:1.9;margin:12px 0}dialog a{font-size:12px;line-height:2;color:#92703f}dialog small,dialog .small-note{font-family:var(--serif);font-size:11px;line-height:1.8;color:#8d8066}.wide-dialog{width:660px}.dialog-buttons{display:flex;gap:12px;flex-wrap:wrap;margin:20px 0 8px}.dialog-buttons button{border:1px solid #c7b38b;border-radius:5px;padding:10px 15px;background:#f0e5ca;font-size:12px}.setting{display:flex;justify-content:space-between;gap:15px;align-items:center;font-size:13px;margin:22px 0 12px}.setting select{max-width:65%;padding:9px 8px;border:1px solid #c7b99b;border-radius:4px;background:#fffaf0;font-size:12px}.range-label{display:flex;align-items:center;gap:10px;font-size:12px;margin:20px 0}.range-label input{min-height:30px;min-width:50px;flex:1;accent-color:#9b774a}.contents-list{display:grid;grid-template-columns:1fr 1fr;gap:8px}.contents-list button{text-align:left;padding:12px 9px;border-bottom:1px solid #dfd3b9;font-size:12px;line-height:1.5}.contents-list button small{display:block;font-size:10px;color:#938568}.contents-list button[aria-current=true]{background:#ecdfc3}.word-list{display:flex;gap:9px;flex-wrap:wrap}.word-list button{padding:10px 14px;border:1px dashed #c1aa7f;border-radius:50% 46% 44% 50%;font-family:var(--serif);font-size:18px;background:#f4e9cf}.word-list button[aria-pressed=true]{background:#e4d4ad}#word-detail{margin-top:20px;border-top:1px solid #d9c9a8;padding-top:5px}#word-title{font-size:38px}#word-example{font-family:var(--serif);font-size:22px;line-height:1.5}.beats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:25px 0}.beats span{display:flex;align-items:center;flex-direction:column;gap:12px;font-size:12px}.beats b{width:48px;height:48px;border:1px solid #c0ac81;background:#f0e2be;border-radius:50%;display:grid;place-items:center;font-family:var(--serif);font-size:26px;font-weight:400}.beats .active b{background:#6c7c59;color:#fff8df}dialog .chant{font-family:var(--serif);font-size:28px;line-height:1.5;padding:15px 22px;border-left:3px solid #d4b66f}.quiz-options{display:flex;flex-direction:column;gap:8px}.quiz-options button{text-align:left;border-bottom:1px dashed #c6b693;padding:12px;font-family:var(--serif);font-size:20px}.quiz-options button:disabled{opacity:1}.quiz-options .correct{background:#e0e8cd}.quiz-options .incorrect{background:#f1d9c8}.notice{position:fixed;bottom:12px;left:50%;transform:translateX(-50%);max-width:90%;width:max-content;background:#394935;color:#fff8e8;padding:12px 18px;border-radius:5px;font-size:12px;z-index:15}.notice:empty{display:none}.skip{position:fixed;top:-90px;left:20px;z-index:10;padding:14px;background:var(--paper)}.skip:focus{top:10px}#print-area{display:none}
.page-content{overflow-y:auto}.cover .page-content,.ending .page-content{overflow:visible}.cover-copy{margin-top:20px}.open-book{margin-top:20px}.cover-eyebrow{margin-bottom:20px}.cast-page .page-content{padding-top:25px;padding-bottom:25px}.cast-page .page-title{font-size:28px;margin-bottom:18px}.cast-list{gap:5px;margin:12px 0}.cast-page .page-number{display:none}.bilingual.story-page .page-content{padding:24px 28px}.bilingual .page-title{font-size:22px;margin:8px 0 14px}.bilingual .dialogue-list{gap:20px}.bilingual .line-en{font-size:23px;line-height:1.35}.bilingual .line-zh{font-size:12px;line-height:1.65;margin-top:8px}.bilingual .line-cue{font-size:10px;margin-top:6px}.bilingual .speaker{margin-bottom:8px}.bilingual .page-number{margin-top:15px}
@media(min-width:1600px){.page-content{padding:45px}.line-en{font-size:31px}.dialogue-list{gap:40px}}
@media(max-width:1050px){.reader{width:calc(100% - 40px)}.page-content{padding:28px 23px}.scene-art{width:59%}.page-content{margin-left:59%}.page-title{font-size:24px}.line-en{font-size:23px}.dialogue-list{gap:23px}.cover-copy{font-size:13px;max-width:260px}.cover h1{font-size:64px}.reading-bar{gap:6px}.reading-options,.extras{gap:9px}.reading-options button,.extras button{font-size:11px}.page-controls{gap:8px}.page-controls #contents-open{min-width:95px}.page-controls>button:first-child,.page-controls>button:last-child{width:36px;height:36px;font-size:20px}#fullscreen span{display:none}header>span{font-size:12px}.cover .page-content{padding:6%}.line-zh{font-size:12px}}
@media(max-width:900px){.reader{width:calc(100% - 24px)}header{height:54px;font-size:10px;gap:8px}header>span{display:none}header button{font-size:10px}.book{height:auto;min-height:0;max-height:none}.scene-art{position:relative;width:100%;height:auto;aspect-ratio:1.5;object-fit:cover;z-index:0}.page-content{height:auto;margin-left:0;padding:23px 25px;background:var(--paper)}.page-content:before{left:0;right:0;top:-25px;height:26px;width:auto;background:linear-gradient(0deg,var(--paper),transparent)}.cover .scene-art,.ending .scene-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:62% center}.cover,.ending{min-height:590px;height:calc(100dvh - 190px);max-height:850px}.cover .page-content,.ending .page-content{height:100%;padding:34px 27px;background:linear-gradient(180deg,#081f33ad,transparent 66%,#081f3370);justify-content:flex-start}.cover-eyebrow{font-size:11px;letter-spacing:3px;margin-bottom:19px}.cover h1{font-size:55px}.cover-zh{font-size:24px;letter-spacing:6px;margin-top:15px}.cover-copy{font-size:12px;line-height:1.8;margin-top:22px;max-width:230px}.open-book{margin-top:23px;font-size:14px}.cover-mark{font-size:10px;bottom:22px}.page-title{font-size:23px;margin:7px 0 24px}.chapter-label{font-size:11px}.dialogue-list{gap:28px}.line-en{font-size:25px;line-height:1.4}.line-zh{font-size:13px}.speaker{font-size:11px}.page-number{margin-top:24px}.cast-page .scene-art{aspect-ratio:1.9;object-position:center 38%}.cast-list{gap:9px;margin:18px 0}.cast-role{padding:7px}.cast-role strong{font-size:19px}.ending .page-content{justify-content:center;background:linear-gradient(90deg,#10272abf,#10272a1a)}.ending h2{font-size:47px;max-width:300px}.ending p{font-size:15px;max-width:250px}.reading-bar{grid-template-columns:1fr;gap:5px;margin-top:20px}.page-controls{grid-row:1;justify-content:center;gap:30px}.page-controls>button:first-child,.page-controls>button:last-child{width:42px;height:42px}.page-controls #contents-open{font-size:14px;min-width:100px}.reading-options{justify-content:center;gap:18px;margin-top:4px}#fullscreen span{display:inline}.reading-options button{font-size:12px}.extras{justify-content:center;gap:35px}.extras button{font-size:11px}.reading-note{font-size:9px;margin-top:8px;min-height:38px;padding-bottom:12px}.reader:fullscreen{padding:0 12px}.reader:fullscreen .book{height:auto;min-height:0}.reader:fullscreen .cover,.reader:fullscreen .ending{height:calc(100dvh - 220px);min-height:570px}.reader:fullscreen header{height:36px}dialog{padding:32px 23px}.contents-list{gap:5px}.contents-list button{padding:10px 6px;font-size:11px}.setting{align-items:flex-start;flex-direction:column;gap:9px}.setting select{max-width:100%;width:100%}.range-label{font-size:11px}.dialog-buttons button{padding:9px 12px}}
@media(max-height:650px) and (min-width:701px){header{height:44px}.book{height:auto;min-height:480px}.page-content{min-height:480px}.line-en{font-size:22px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Classroom projection: Traditional Chinese stays large and high contrast. */
@media screen {
  :root { --zh-font: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif; }
  .reader { max-width: 1800px; }
  .speaker-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; }
  .speaker-zh { font-family: var(--zh-font); font-weight: 700; color: #334232; }
  .story-page .speaker { font-size: 18px; color: #514734; }
  .bilingual.story-page .page-content { padding: 22px 30px; }
  .bilingual.story-page .chapter-label { font-family: var(--zh-font); font-size: 20px; color: #655334; }
  .bilingual.story-page .page-title { font-size: 26px; margin: 8px 0 18px; }
  .bilingual.story-page .dialogue-list { flex: 1 0 auto; gap: 24px; }
  .bilingual.story-page .speaker { font-size: 24px; line-height: 1.3; margin-bottom: 10px; }
  .bilingual.story-page .portrait { font-size: 30px; width: 36px; flex-shrink: 0; }
  .bilingual.story-page .line-en { font-size: clamp(24px, 2vw, 34px); line-height: 1.35; }
  .bilingual.story-page .line-zh { font-family: var(--zh-font); font-size: clamp(24px, 2.1vw, 32px); font-weight: 600; line-height: 1.5; color: #283a29; margin-top: 12px; }
  .bilingual.story-page .line-cue { font-family: var(--zh-font); font-size: 20px; line-height: 1.45; color: #655334; margin-top: 8px; }
  .story-page .your-turn { font-family: var(--zh-font); font-size: 18px; color: #704510; flex-shrink: 0; }
  .bilingual.story-page .page-number { margin-top: 14px; }
  .cast-role small { font-family: var(--zh-font); font-size: 20px; color: #514734; }
}
@media screen and (min-width: 901px) {
  .bilingual.story-page .scene-art { width: 36%; }
  .bilingual.story-page .page-content { margin-left: 36%; }
}
@media screen and (min-width: 901px) and (max-height: 800px) {
  .bilingual.story-page .page-content { padding: 18px 26px; }
  .bilingual.story-page .page-title { font-size: 24px; margin: 6px 0 12px; }
  .bilingual.story-page .line-en, .bilingual.story-page .line-zh { font-size: 24px; }
  .bilingual.story-page .dialogue-list { gap: 18px; }
  .bilingual.story-page .speaker { font-size: 22px; margin-bottom: 6px; }
  .bilingual.story-page .line-cue { font-size: 18px; margin-top: 6px; }
}
@media screen and (max-width: 900px) {
  .bilingual.story-page .page-content { margin-left: 0; padding: 24px; }
  .bilingual.story-page .line-zh { font-size: 24px; }
  .bilingual.story-page .speaker { font-size: 22px; }
}

@page{size:A4;margin:17mm}@media print{body>*{display:none!important}body>#print-area{display:block!important;background:white;color:#000;font-family:Arial,"Microsoft JhengHei",sans-serif}#print-area h1{font-family:Georgia,serif;font-size:30px;margin-bottom:12px}#print-area h2{font-size:21px;margin:15px 0}#print-area p{font-size:11px;line-height:1.6}#print-area .print-scene{break-before:page}#print-area .print-line{break-inside:avoid;margin:12px 0}#print-area .print-line p:first-child{font-size:13px}#print-area .print-cue{font-size:10px;color:#555}dialog{display:none!important}}
