:root{--navy:#123c5a;--navy2:#082b44;--gold:#f1c85e;--red:#842b35;--parchment:#fff7e5;--ink:#242b31;--line:#927154;--pale:#f1e4ca;font-family:'Trebuchet MS',Verdana,system-ui,sans-serif;color:var(--ink);background:#e5d7c2}
*{box-sizing:border-box}html,body{margin:0;padding:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}body{background:radial-gradient(ellipse at 49% 46%,#faf5eb,#e7dbcb 74%,#d8c8b2)}a{color:inherit;text-decoration:none}button{cursor:pointer;font:inherit}button:focus-visible,a:focus-visible{outline:3px solid #efab27;outline-offset:3px}button:disabled{opacity:.38;cursor:not-allowed}button:disabled:hover{filter:none}.app{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}.appbar{height:65px;min-height:65px;display:flex;align-items:center;justify-content:space-between;gap:14px;background:linear-gradient(115deg,#123a57,#0d2d46);border-bottom:2px solid #e5bb68;color:#fff2d5;padding:7px clamp(8px,2.2vw,28px);z-index:2;box-shadow:0 3px 12px #0d203029}.back-link{border:1px solid #7c91a2;border-radius:10px;min-height:43px;padding:8px 13px;display:flex;align-items:center;gap:10px;font-size:12px;font-weight:850;white-space:nowrap}.back-link span:first-child{font-size:25px;font-weight:400;line-height:1}.back-link:hover,.toolbar-btn:hover{background:#29516c}.title-stack{text-align:center;flex:1;min-width:0}.title-stack .title-small{font-size:9px;font-weight:900;letter-spacing:.15em;color:#eac480}.title-stack .title-small b{padding:0 7px}.title-stack h1{margin:2px 0 1px;font:900 clamp(17px,2.2vw,24px)/1.1 Georgia,'Times New Roman',serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.title-stack p{margin:0;font-size:10px;color:#f3ddbf;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.app-actions{display:flex;align-items:center;gap:6px;flex-shrink:0}.toolbar-btn{height:43px;display:flex;gap:7px;align-items:center;justify-content:center;border:1px solid #7891a3;border-radius:10px;background:transparent;color:#fff6df;font-size:12px;font-weight:900;padding:6px 11px}.toolbar-btn span:first-child{font-size:20px;line-height:1}.toolbar-btn[aria-pressed=true]{background:#94713c}.icon-only{width:43px;padding:6px}.progress-line{height:3px;min-height:3px;background:#e5d1b5;z-index:1}.progress-line span{display:block;width:0%;height:100%;background:#e4aa31;transition:width .24s}.reading-stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden;padding:10px 14px;background:radial-gradient(ellipse at 50% 48%,#fdf7eb,#e9dfce 74%,#e1d0b8)}.book{width:min(calc(100vw - 28px),calc((100dvh - 159px)*1.52),1560px);max-width:100%;max-height:100%;aspect-ratio:1.52;display:flex;align-items:stretch;position:relative;box-shadow:0 18px 37px #38261e37,0 3px 0 #69472f;border:5px solid #603c2b;border-radius:16px;background:#f8efdc;overflow:hidden}.book.double:after{content:'';pointer-events:none;position:absolute;z-index:4;left:50%;top:0;bottom:0;width:18px;transform:translateX(-50%);background:linear-gradient(to right,#432b1b0c,#32201b65 47%,#fff6dc9c 53%,#5f402315);border-radius:50%}.book.single{width:min(calc(100vw - 20px),calc((100dvh - 159px)*.735),780px);aspect-ratio:.735}.comic-page{position:relative;width:50%;height:100%;min-width:0;min-height:0;padding:clamp(6px,1vw,12px);border:1px solid #9e7d58;background:linear-gradient(140deg,#fff9ed,#f6e8ce);box-shadow:inset 0 0 0 3px #e7d1ad;display:flex;flex-direction:column;overflow:hidden}.comic-page:first-child{border-radius:11px 0 0 11px}.comic-page:last-child{border-radius:0 11px 11px 0}.book.single .comic-page{width:100%;border-radius:10px}.page-top{display:flex;justify-content:space-between;align-items:center;gap:9px;flex:0 0 auto;height:33px;margin:0 0 6px;background:#f3d88f;border:1px solid #775035;border-radius:3px;padding:3px 8px}.page-top strong{font:900 clamp(12px,1.5vw,18px)/1.08 Georgia,serif;color:#7c2632;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.page-top small{font-size:9px;font-weight:900;white-space:nowrap;color:#4e4739}.comic-grid{flex:1;min-height:0;display:grid;grid-template-rows:1.1fr 1fr 1fr;gap:6px}.comic-panel{min-width:0;min-height:0;position:relative;isolation:isolate;overflow:hidden;border:2px solid #282927;border-radius:1px;background:#cdbb8c;cursor:zoom-in;padding:0;text-align:left}.comic-panel img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center center;z-index:-1}.comic-panel:hover img{transform:scale(1.02);transition:transform .18s}.caption{position:absolute;top:5px;left:5px;z-index:1;display:block;max-width:68%;background:#fff2be;color:#27211d;border:1.5px solid #3c2b29;padding:5px 7px;font-size:clamp(9px,.81vw,12px);line-height:1.18;font-weight:800;font-style:italic;box-shadow:1px 2px 0 #1f1c1f44}.bubble{position:absolute;bottom:7px;right:8px;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:fit-content;max-width:44%;min-width:95px;background:#fffef9;color:#282828;border:2px solid #303030;padding:8px 10px;border-radius:52% 43% 55% 45%/45% 58% 47% 57%;text-align:center;font-size:clamp(9px,.8vw,12px);font-weight:850;line-height:1.15;box-shadow:1px 2px 0 #09090955}.bubble:after{content:'';position:absolute;right:20px;bottom:-9px;transform:rotate(30deg);width:12px;height:13px;background:#fffef9;border-right:2px solid #333;border-bottom:2px solid #333}.bubble b{display:block;color:#9b3e2d;font-size:9px;letter-spacing:.04em;text-transform:uppercase}.panel-index{position:absolute;left:4px;bottom:4px;color:#58361d;background:#fff5d1;border:1px solid #5b391c;font-size:9px;font-weight:900;line-height:17px;min-width:18px;height:18px;text-align:center;border-radius:50%}.page-foot{height:20px;flex:0 0 20px;display:flex;align-items:center;justify-content:space-between;gap:6px;margin-top:5px;font-size:9px;font-weight:850;letter-spacing:.1em;color:#85563c}.page-foot span:nth-child(2){font-size:12px;color:#52362e}.reader-footer{height:73px;min-height:73px;display:flex;justify-content:center;align-items:center;gap:clamp(10px,2vw,40px);background:#fdf9ee;border-top:1px solid #ceb89b;box-shadow:0 -4px 12px #462c1b17;padding:8px 12px max(8px,env(safe-area-inset-bottom))}.turn-button{border-radius:12px;font-size:13px;font-weight:900;min-height:48px;min-width:135px;border:1px solid #16425e;display:flex;align-items:center;justify-content:center;gap:12px;transition:filter .15s}.turn-button:hover{filter:brightness(1.07)}.turn-button.secondary{background:#153e5c;color:#fff6df}.turn-button.primary{background:linear-gradient(#ffe58c,#e9b440);color:#293840;border-color:#b48a36}.turn-button span{font-size:20px;font-weight:400}.counter-area{min-width:175px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}.counter{font-size:14px;font-weight:900;color:#514437;white-space:nowrap}.counter-caption{font-size:10px;font-weight:750;color:#94785d}.dialog-backdrop{position:fixed;inset:0;z-index:30;display:flex;align-items:center;justify-content:center;padding:14px;background:#081a28ad}.dialog-backdrop.hidden{display:none}.dialog-card{position:relative;background:#fff8e8;border:3px solid #86613f;border-radius:17px;box-shadow:0 28px 58px #0008;width:min(850px,100%);max-height:94dvh;overflow-y:auto;padding:25px 25px 28px;color:#252d2b}.close-dialog{position:sticky;top:0;float:right;width:41px;height:41px;border-radius:50%;background:#fff3d3;color:#423228;border:1px solid #b99e76;font-size:26px;line-height:1;z-index:2}.dialog-content h2{color:#87313a;font:900 29px/1.04 Georgia,serif;margin:4px 0 8px}.dialog-content p{line-height:1.52;color:#62513e;font-size:14px}.tag{font-size:10px;letter-spacing:.14em;text-transform:uppercase;font-weight:950;color:#9d6c39}.dialog-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:19px}.chapter-item{display:flex;align-items:center;gap:10px;text-align:left;border:1px solid #c8a679;border-radius:11px;padding:8px;background:#fffdf6;color:#35291f;min-width:0;min-height:80px}.chapter-item:hover,.chapter-item.selected{background:#ffedbd;border-color:#ba883c}.chapter-item img{width:69px;height:60px;object-fit:cover;border:1px solid #a88556;border-radius:6px;flex:none}.chapter-item .texts{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:850;line-height:1.2}.chapter-item small{font-size:9px;color:#9c6737;letter-spacing:.04em}.tool-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-top:17px}.tool-option,.quiz-choice{border:1px solid #c6a47a;border-radius:11px;background:#fffdf6;text-align:left;padding:16px;min-height:85px;font-weight:900;color:#273f4a}.tool-option:hover,.quiz-choice:hover{background:#ffebae}.tool-option small{display:block;color:#84705f;font-size:11px;font-weight:650;margin-top:7px}.quiz-choice{display:block;width:100%;min-height:47px;margin:8px 0;padding:12px;font-size:13px}.quiz-choice.correct{background:#e1f3d3;border-color:#478453}.quiz-choice.incorrect{background:#fff1eb;border-color:#c96c5b}.quiz-result{background:#f4e0af;border-radius:10px;border:1px solid #b78d50;margin-top:12px;padding:12px;color:#543d28;font-weight:800}.modal-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:18px}.modal-action{border:1px solid #a88150;border-radius:8px;padding:11px 15px;background:#f5cf74;color:#28384a;font-weight:900}.modal-action.secondary{background:#fffaf1}.panel-detail img{display:block;width:100%;max-height:60dvh;object-fit:contain;border:2px solid #44372f;border-radius:7px;background:#d7bb8b}.panel-detail p{margin-top:10px;font-size:16px;color:#2e2e2e}.panel-detail b{color:#8b2a30}.vocab-row{margin:8px 0;padding:12px;background:#fffdf7;border:1px solid #d7bc9e;border-radius:9px}.vocab-row b{color:#8d3037}.vocab-row span{display:block;font-size:13px;color:#675442;margin-top:4px;line-height:1.5}.cast-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.cast-card{padding:12px;border:1px solid #cfae7b;border-radius:12px;background:#fffdf5}.cast-card img{width:100%;height:130px;object-fit:cover;border-radius:8px}.cast-card h3{margin:7px 0;color:#79343b}.cast-card p{font-size:12px}.toast{position:fixed;z-index:38;left:50%;bottom:87px;transform:translateX(-50%);padding:11px 18px;border-radius:22px;background:#1d495b;color:#fff9e1;font-weight:850;font-size:12px;box-shadow:0 5px 24px #0005;text-align:center}.toast.hidden{display:none}
@media(max-width:1099px){.book{width:min(calc(100vw - 20px),calc((100dvh - 159px)*.735),780px);aspect-ratio:.735}.book .comic-page{width:100%}.comic-page{padding:8px}.page-top strong{font-size:clamp(15px,2.3vw,20px)}.caption{font-size:clamp(10px,1.35vw,14px)}.bubble{font-size:clamp(10px,1.25vw,13px)}.book.double:after{display:none}}
@media(max-width:720px){.appbar{height:58px;min-height:58px;gap:6px;padding:5px 8px}.back-link{padding:6px;width:42px;height:42px;min-height:42px;justify-content:center}.back-long{display:none}.title-small{font-size:7px!important;letter-spacing:.05em!important}.title-small b{padding:0 3px!important}.title-stack h1{font-size:clamp(14px,4vw,17px)}.title-stack p{font-size:9px}.app-actions{gap:4px}.toolbar-btn{width:38px;min-width:38px;height:42px;padding:5px;border-radius:8px}.toolbar-btn .desktop-label{display:none}.reading-stage{padding:7px 5px}.book{width:calc(100vw - 10px);height:100%;aspect-ratio:auto;max-height:100%;border-width:3px;border-radius:10px}.comic-page{padding:5px!important}.page-top{height:29px;margin-bottom:4px;padding:3px 5px}.page-top strong{font-size:clamp(11px,3.3vw,14px)}.page-top small{font-size:8px}.comic-grid{gap:4px;grid-template-rows:1.1fr 1fr 1fr}.comic-panel{border-width:1.5px}.caption{max-width:65%;font-size:clamp(8.2px,2.15vw,11px);line-height:1.12;padding:3px 4px;top:3px;left:3px}.bubble{max-width:48%;min-width:76px;font-size:clamp(8px,2vw,11px);padding:6px;right:4px;bottom:5px;line-height:1.1;border-width:1.5px}.bubble b{font-size:7px}.bubble:after{bottom:-7px;width:8px;height:8px}.page-foot{height:16px;flex-basis:16px;margin-top:4px;font-size:7px}.reader-footer{height:66px;min-height:66px;padding:7px 8px max(7px,env(safe-area-inset-bottom));gap:8px}.turn-button{min-width:0;flex:1;min-height:45px;padding:8px;font-size:12px;gap:6px}.counter-area{min-width:90px;flex:0 0 105px}.counter{font-size:11px}.counter-caption{font-size:9px}.dialog-card{padding:16px 14px}.dialog-grid{grid-template-columns:1fr}.tool-grid{grid-template-columns:1fr 1fr;gap:7px}.cast-grid{grid-template-columns:1fr 1fr}.dialog-content h2{font-size:24px}.panel-detail img{max-height:50dvh}}
@media(max-width:365px){.back-link{width:36px}.toolbar-btn{width:34px;min-width:34px}.counter-area{flex:0 0 90px}.turn-button{font-size:11px}.bubble{max-width:43%;min-width:69px;font-size:7.5px}.caption{font-size:8px}.title-stack h1{font-size:13px}.tool-grid{grid-template-columns:1fr}}
@media(max-height:600px){.comic-page{padding:4px}.page-top{height:26px}.page-foot{display:none}.caption{font-size:9px}.bubble{font-size:9px;padding:5px}.appbar{height:53px;min-height:53px}.reader-footer{height:58px;min-height:58px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
