:root{--ink:#251c15;--paper:#f7edcf;--red:#b42d27;--gold:#c89435;--navy:#273a40;--muted:#796b57;--hand:'Hiragino Maru Gothic ProN','YuKyokasho Yoko','Comic Sans MS',cursive;--choice-scale:1}*{box-sizing:border-box}body{margin:0;background:#273a40;color:var(--ink);font-family:ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif}.app-shell{min-height:100dvh;max-width:540px;margin:auto;background:radial-gradient(circle at 50% -15%,#fff8e7 0,var(--paper) 47%,#e8d7ae 100%);padding:20px 16px 32px;box-shadow:0 0 44px #0006}.top{display:flex;align-items:flex-start;justify-content:space-between;border-bottom:1px solid #c7ad76;padding-bottom:13px;margin-bottom:17px}.brand{font-size:27px;letter-spacing:.18em;font-weight:800}.sub{font-size:11px;letter-spacing:.13em;color:var(--muted);margin-top:4px}.book{border:1px solid #806236;padding:7px 10px;background:#fff8e9;font-size:13px;color:var(--ink);cursor:pointer}.scene{min-height:calc(100dvh - 118px);display:flex;flex-direction:column}.seal{color:#8d2e25;border:2px solid #8d2e25;display:inline-block;padding:2px 7px;transform:rotate(-4deg);font-weight:bold}.intro{text-align:center;padding:20px 9px}.master{font-size:68px;line-height:1;margin:7px 0;color:#73532c}.speech{position:relative;background:#fffaf0;border:1px solid #bda779;border-radius:4px;padding:17px 18px;line-height:1.8;text-align:left;box-shadow:2px 3px 0 #b99d7044}.speech:before{content:'白澤';position:absolute;top:-14px;left:14px;background:#5f472a;color:#fff8e9;font-size:12px;padding:2px 8px;letter-spacing:.15em}.primary{background:#9c3029;color:#fff9e9;border:0;padding:14px 18px;font:700 16px inherit;letter-spacing:.1em;cursor:pointer;margin-top:18px}.primary:active{transform:translateY(1px)}.choices{display:grid;gap:11px;margin-top:10px}.choice{background:#fff9e9;border:1px solid #b89b68;padding:16px;text-align:left;cursor:pointer}.choice small{display:block;color:var(--muted);margin-top:4px}.stars{color:#bb8423;letter-spacing:.1em}.guide{font-size:13px;color:var(--muted);margin:0 0 12px}.lesson-body{overflow:auto;max-height:48dvh;font-size:17px;line-height:2.05;padding:2px 4px 8px}.lesson-body ruby{ruby-position:over}.lesson-body rt{font-size:.55em;color:#745f45}.note{background:#fffdf5;border:1px solid #c6b087;padding:18px 15px;line-height:2.1;font-family:var(--hand);font-size:18px;min-height:260px}.word{border:0;background:transparent;padding:1px 0;font:inherit;color:inherit;cursor:pointer;border-radius:2px}.word:active,.word.active{background:#eadfbf}.word.corrected{text-decoration:line-through;text-decoration-thickness:1.5px;text-decoration-color:#513a2b;color:#695c4f}.correction{position:relative;display:inline}.rednote{font-family:var(--hand);color:var(--red);font-weight:bold;font-size:.85em;display:inline-block;position:absolute;left:2px;top:-1.3em;white-space:nowrap;transform:rotate(-6deg);text-decoration:none!important}.editbar{position:sticky;bottom:0;margin-top:auto;background:#f2e4c2;border-top:1px solid #bfa474;padding:10px 0 0}.editbar label{font-size:12px;color:#6e5b41}.inputrow{display:flex;gap:7px;margin-top:5px}.inputrow input{min-width:0;flex:1;border:1px solid #96784a;background:#fffdf7;padding:10px;font:18px var(--hand)}.smallbtn{border:1px solid #856338;background:#fff8e9;padding:8px 10px;color:#372b20;cursor:pointer}.submit{width:100%;margin-top:10px}.result{text-align:center;padding:10px}.score{font-size:54px;color:#9c3029;font-weight:bold;margin:5px 0}.result .speech{text-align:left;margin:20px 0}.result-card{border:1px solid #ba9b67;background:#fff8e7;padding:14px;text-align:left;line-height:1.9}.encyclopedia-list{display:grid;gap:10px}.entry{background:#fff9e9;border:1px solid #c4aa75;padding:12px}.entry .icon{float:right;font-size:35px;color:#a07839}.status{font-size:12px;color:#806638}.locked{opacity:.55}.portrait{float:right;width:52px;height:52px;object-fit:cover;border:1px solid #aa8b5b}

/* 三択画面だけは375×667の固定舞台を単一scaleで表示する。 */
.choice-scene{position:fixed;top:0;left:50%;width:375px;height:667px;overflow:hidden;background:url('images/background.png') center/cover no-repeat;transform:translateX(-50%) scale(var(--choice-scale));transform-origin:top center}.choice-master{position:absolute;top:12px;left:12px;width:160px;height:auto}.choice-speech{position:absolute;top:21px;left:178px;width:185px;display:grid;place-items:center}.choice-speech img{grid-area:1/1;width:100%;height:auto}.choice-speech p{grid-area:1/1;z-index:1;margin:0;padding:0 14px;text-align:center;font-size:12px;font-weight:bold;line-height:1.45}.scroll-choices{position:absolute;top:184px;left:27.5px;width:320px;display:flex;flex-direction:column;gap:10px}.scroll-choice{position:relative;display:grid;place-items:center;width:320px;aspect-ratio:2172 / 724;height:auto;padding:0;border:0;background:transparent;cursor:pointer}.scroll-choice img{grid-area:1/1;width:100%;height:100%;object-fit:contain}.scroll-choice .scroll-copy{grid-area:1/1;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;padding:15px 45px 12px;text-align:center;gap:6px}.scroll-choice strong{display:block;font-family:ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif;font-size:18px;line-height:1;white-space:nowrap}.scroll-choice small{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:6px;margin:0;font-size:14px;line-height:1;white-space:nowrap}.scroll-choice small .stars{display:inline-block}.pass-button{position:absolute;top:542px;left:50%;transform:translateX(-50%);padding:6px 18px;border:1px solid #684c2d;border-radius:4px;background:#f5e3bb;color:#34251b;font:700 15px ui-serif,'Hiragino Mincho ProN',serif;white-space:nowrap;cursor:pointer}.pass-button:disabled{opacity:.45}.zukan-button{position:absolute;top:570px;left:50%;width:188px;height:63px;padding:0;border:0;background:transparent;transform:translateX(-50%);cursor:pointer}.zukan-button img{display:block;width:100%;height:100%;object-fit:contain}.back-title{position:absolute;top:640px;left:50%;padding:0;border:0;background:transparent;transform:translateX(-50%);color:#4a3019;font:700 14px ui-serif,'Hiragino Mincho ProN',serif;white-space:nowrap;cursor:pointer}.title-resume{margin-top:10px}

@media(min-width:600px){body{padding:16px}.app-shell{border-radius:12px;min-height:calc(100dvh - 32px)}}
.choice-speech p{font-size:10.8px}.pass-button{top:536px;transform:translateX(-50%) scale(.9)}.scroll-choice small{font-family:ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif}
.choice-master{top:12px;left:203px;width:160px;height:160px;overflow:hidden;border:3px double #4a3019;background:#f7edcf}.choice-master img{position:absolute;top:-12%;left:-18%;width:215%;height:auto;max-width:none}.choice-speech{top:52px;left:12px;width:185px}.choice-speech img{transform:scaleX(-1)}.choice-speech p{padding:0 22px}
.choice-master img{top:-2%;left:-4%;width:172%;height:auto}
.choice-master img{top:0;left:0;width:155%}.choice-speech p{transform:translateY(-5px)}.scroll-choice .topic-suffix{display:inline;font-size:85%;vertical-align:baseline}.pass-button{top:528px}
:root{--choice-stage-height:667px;--choice-scroll-top:184px;--choice-pass-top:528px;--choice-zukan-top:570px;--choice-back-top:640px}.choice-scene{height:var(--choice-stage-height)}.scroll-choices{top:var(--choice-scroll-top)}.pass-button{top:var(--choice-pass-top)}.zukan-button{top:var(--choice-zukan-top)}.back-title{top:var(--choice-back-top)}
.app-shell:has(.choice-scene){background:transparent;box-shadow:none}
:root{--lesson-stage-height:667px;--lesson-extra:0px}.app-shell:has(.lesson-scene){background:transparent;box-shadow:none}.lesson-scene{position:fixed;top:0;left:50%;width:375px;height:var(--lesson-stage-height);overflow:hidden;background:url('images/background.png') center/cover no-repeat;transform:translateX(-50%) scale(var(--choice-scale));transform-origin:top center}.lesson-master{position:absolute;top:12px;left:253px;width:110px;height:110px;overflow:hidden;border:3px double #4a3019;background:#f7edcf}.lesson-master img{position:absolute;top:0;left:0;width:155%;height:auto;max-width:none}.lesson-speech{position:absolute;top:18px;left:12px;width:225px;display:grid;place-items:center}.lesson-speech>img{grid-area:1/1;width:100%;height:auto;transform:scaleX(-1)}.lesson-speech>div{grid-area:1/1;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;padding:0 25px;text-align:center;font-family:ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif}.lesson-speech strong{font-size:17px;line-height:1.1;white-space:nowrap}.lesson-speech strong span{font-size:85%;vertical-align:baseline}.lesson-speech small{display:flex;align-items:center;gap:6px;margin-top:6px;font-size:14px;line-height:1;white-space:nowrap}.lesson-paper{position:absolute;top:136px;left:14px;width:347px;height:calc(400px + var(--lesson-extra));margin:0;overflow-y:auto;padding:16px 14px;background:#f7edcf;border:3px double #4a3019;color:#251c15;font:16px/1.8 ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif;scroll-behavior:smooth}.lesson-paper ruby{ruby-position:over}.lesson-paper rt{font-size:.55em;color:#745f45}.lesson-memo{position:absolute;top:calc(548px + var(--lesson-extra));left:50%;width:188px;height:63px;padding:0;border:0;background:transparent;transform:translateX(-50%);visibility:hidden;cursor:pointer}.lesson-memo.is-ready{visibility:visible}.lesson-memo img{display:block;width:100%;height:100%;object-fit:contain}.lesson-retire{position:absolute;top:calc(640px + var(--lesson-extra));left:50%;padding:0;border:0;background:transparent;transform:translateX(-50%);color:#4a3019;font:700 14px ui-serif,'Hiragino Mincho ProN',serif;white-space:nowrap;cursor:pointer}.lesson-dialog{position:absolute;inset:0;z-index:10;display:grid;place-items:center;background:#0006}.lesson-dialog>div{width:300px;padding:22px 20px 16px;background:#f7edcf;border:4px double #4a3019;color:#251c15;text-align:center;font:16px/1.6 ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif}.lesson-dialog p{margin:0}.lesson-dialog small{display:block;margin-top:8px;font-size:12px}.lesson-dialog footer{display:flex;justify-content:center;gap:22px;margin-top:18px}.lesson-dialog button{min-width:66px;padding:6px 10px;border:1px solid #684c2d;background:#f5e3bb;color:#34251b;font:700 14px ui-serif,'Hiragino Mincho ProN',serif;cursor:pointer}
.lesson-title-label{position:absolute;top:126px;left:50%;z-index:2;padding:2px 12px 3px;border:2px double #4a3019;background:#4a3019;color:#f7edcf;transform:translateX(-50%);font:700 12px/1.2 ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif;white-space:nowrap}.lesson-retire{top:calc(631px + var(--lesson-extra))}
.app-shell:has(.record-scene){background:transparent;box-shadow:none}.record-scene{position:fixed;top:0;left:50%;width:375px;height:var(--lesson-stage-height);overflow:hidden;background:url('images/background.png') center/cover no-repeat;transform:translateX(-50%) scale(var(--choice-scale));transform-origin:top center}.record-person{position:absolute;top:12px;left:253px;width:110px;height:110px;overflow:hidden;border:3px double #4a3019;background:#f7edcf}.record-person img{width:100%;height:100%;object-fit:cover;object-position:center top}.record-speech{position:absolute;top:18px;left:12px;width:225px;display:grid;place-items:center}.record-speech img{grid-area:1/1;width:100%;transform:scaleX(-1)}.record-speech p{grid-area:1/1;z-index:1;margin:0;padding:0 25px;text-align:center;font:700 13px/1.45 ui-serif,'Hiragino Mincho ProN',serif}.record-label{position:absolute;top:126px;left:50%;z-index:2;padding:2px 12px 3px;border:2px double #4a3019;background:#4a3019;color:#f7edcf;transform:translateX(-50%);font:700 12px/1.2 ui-serif,'Hiragino Mincho ProN',serif;white-space:nowrap}.record-paper{position:absolute;top:136px;left:14px;width:347px;height:calc(400px + var(--lesson-extra));overflow-y:auto;padding:24px 14px;background:#f7edcf;border:3px double #4a3019;font:18px/2.7 'Yomogi','YuKyokasho Yoko',cursive;overflow-wrap:anywhere}.record-paper .word,.record-paper .rednote{font-family:'Yomogi','YuKyokasho Yoko',cursive}.record-paper .rednote{top:-1.5em}.record-submit{position:absolute;top:calc(548px + var(--lesson-extra));left:50%;width:188px;height:63px;padding:0;border:0;background:transparent;transform:translateX(-50%);cursor:pointer}.record-submit img{width:100%;height:100%;object-fit:contain}.record-retire{position:absolute;top:calc(631px + var(--lesson-extra));left:50%;padding:0;border:0;background:transparent;transform:translateX(-50%);color:#4a3019;font:700 14px ui-serif,'Hiragino Mincho ProN',serif;white-space:nowrap;cursor:pointer}.record-dialog{position:absolute;inset:0;z-index:10;display:grid;place-items:center;background:#0006}.record-dialog>div{width:300px;padding:22px 20px 16px;background:#f7edcf;border:4px double #4a3019;color:#251c15;text-align:center;font:16px/1.6 ui-serif,'Hiragino Mincho ProN',serif}.record-dialog p{margin:0}.record-dialog small{display:block;margin-top:8px;font-size:12px}.record-dialog input{display:block;width:100%;margin-top:10px;padding:8px;font:18px 'Yomogi',cursive}.record-dialog footer{display:flex;justify-content:center;gap:12px;margin-top:18px}.record-dialog button{min-width:60px;padding:6px 10px;border:1px solid #684c2d;background:#f5e3bb;color:#34251b;font:700 14px ui-serif,'Hiragino Mincho ProN',serif;cursor:pointer}
.record-scene .record-speech{grid-template-columns:minmax(0,1fr)}.record-scene .record-speech>img{grid-area:1/1;width:100%;height:auto;min-width:0;transform:scaleX(-1)}.record-scene .record-speech>p{grid-area:1/1;z-index:1;width:100%;min-width:0;padding:0 25px;text-align:center;overflow-wrap:anywhere}.record-scene .record-person{width:110px;height:110px;overflow:hidden}.record-scene .record-person>img{display:block;width:100%;height:100%;object-fit:cover;object-position:center top}
.record-paper{line-height:2.16;padding-top:18px}.record-paper .word.corrected{text-decoration-color:var(--red)}.record-scene .record-speech>p{white-space:pre-line}
.record-paper{overflow:hidden;padding:0 14px 8px}.record-paper-scroll{height:calc(100% - 12px);margin-top:12px;overflow-y:auto;overflow-x:hidden;padding:12px 6px 6px;line-height:2.16;overflow-wrap:anywhere}.record-paper .correction.has-edit{display:inline-grid;grid-template-columns:minmax(0,auto);max-width:100%;vertical-align:baseline;padding:0 4px}.record-paper .correction.has-edit>.word,.record-paper .correction.has-edit>.rednote{grid-area:1/1;min-width:0}.record-paper .correction.has-edit>.word{justify-self:start;align-self:end;white-space:nowrap}.record-paper .correction.has-edit>.rednote{position:static;align-self:end;justify-self:start;max-width:100%;white-space:normal;overflow-wrap:anywhere;line-height:1.1;transform:translateY(-1.35em) rotate(-6deg);transform-origin:left bottom}
.record-paper-scroll{height:calc(100% - 18px);margin-top:18px}.record-paper .correction.has-edit>.rednote{transform:translateY(calc(-1.35em - 6px)) rotate(-6deg)}
.record-paper .rednote{font-family:'Klee One','YuKyokasho Yoko',cursive;font-weight:600}
@font-face{font-family:'Yomogi';src:url('fonts/Yomogi-Regular.ttf') format('truetype');font-style:normal;font-weight:400;font-display:swap}@font-face{font-family:'Klee One';src:url('fonts/KleeOne-SemiBold.ttf') format('truetype');font-style:normal;font-weight:600;font-display:swap}
.record-dialog input{font-family:'Klee One','YuKyokasho Yoko',cursive;font-weight:600}
.app-shell:has(.result-scene){background:transparent;box-shadow:none}.result-scene{position:fixed;top:0;left:50%;width:375px;height:var(--lesson-stage-height);overflow:hidden;background:url('images/background.png') center/cover no-repeat;transform:translateX(-50%) scale(var(--choice-scale));transform-origin:top center}.result-portrait{position:absolute;top:12px;left:253px;width:110px;height:110px;overflow:hidden;border:3px double #4a3019;background:#f7edcf}.result-portrait img{position:absolute;top:0;left:0;width:155%;height:auto}.result-bubble{position:absolute;top:18px;left:12px;width:225px;display:grid;grid-template-columns:minmax(0,1fr);place-items:center}.result-bubble img{grid-area:1/1;width:100%;height:auto;transform:scaleX(-1)}.result-bubble p{grid-area:1/1;z-index:1;width:100%;margin:0;padding:0 25px;text-align:center;font:700 11px/1.45 ui-serif,'Hiragino Mincho ProN',serif;overflow-wrap:anywhere}.checking-label,.result-view{position:absolute;top:45%;left:50%;transform:translate(-50%,-50%);white-space:nowrap}.checking-label{color:#4a3019;font:700 26px ui-serif,'Hiragino Mincho ProN',serif}.result-view{padding:10px 24px;border:4px double #f7edcf;background:#4a3019;color:#f7edcf;font:700 17px ui-serif,'Hiragino Mincho ProN',serif;cursor:pointer}.result-heading{position:absolute;top:145px;width:100%;text-align:center;color:#4a3019;font-size:20px;font-weight:bold}.result-score{position:absolute;top:174px;left:0;width:100%;height:95px;text-align:center;color:#b42d27}.result-score strong{font-size:68px}.result-score span{font-size:22px}.result-stamp{position:absolute;top:0;left:245px;width:95px;height:95px;object-fit:contain;opacity:0;animation:result-stamp .25s ease-out .5s forwards}.result-reward{position:absolute;top:275px;left:25px;width:325px;height:210px;text-align:center;color:#4a3019;font-size:14px;font-weight:bold}.result-reward img,.result-placeholder{display:block;width:160px;height:155px;object-fit:contain;margin:auto}.result-placeholder{display:grid;place-items:center;border:3px double #9a7951;background:#f7edcf;color:#806b50}.result-reward p{margin:8px 0}.result-next,.result-book{position:absolute;left:50%;width:188px;height:63px;padding:0;border:0;background:transparent;transform:translateX(-50%);cursor:pointer}.result-next{top:calc(481px + var(--lesson-extra) * .75)}.result-book{top:calc(545px + var(--lesson-extra) * .85)}.result-next img,.result-book img{width:100%;height:100%;object-fit:contain}.result-title{position:absolute;top:calc(631px + var(--lesson-extra));left:50%;transform:translateX(-50%);padding:0;border:0;background:transparent;color:#4a3019;font:700 14px ui-serif,'Hiragino Mincho ProN',serif;white-space:nowrap;cursor:pointer}.record-leave{animation:record-slide .45s ease-in forwards}@keyframes record-slide{to{transform:translateY(-80px);opacity:0}}@keyframes result-stamp{from{opacity:0;transform:rotate(-14deg) scale(1.5)}to{opacity:1;transform:rotate(-10deg) scale(1)}}@media(prefers-reduced-motion:reduce){.record-leave{animation-duration:.01s}.result-stamp{animation-duration:.01s}}
.checking-dots{position:absolute;left:100%;top:0;width:1.5em;text-align:left}.result-portrait img[src*='hakutakku_good'],.result-portrait img[src*='hakutaku_soso'],.result-portrait img[src*='hakutaku_bad']{mix-blend-mode:multiply}.result-stamp{left:260px}.result-reward p{text-shadow:-1px -1px 0 #fff9e8,1px -1px 0 #fff9e8,-1px 1px 0 #fff9e8,1px 1px 0 #fff9e8}.result-bubble p{overflow-wrap:normal;word-break:normal;line-break:strict}
.result-reward .result-down{width:112px;height:auto;max-height:155px;object-fit:contain;position:absolute;top:60%;left:50%;transform:translate(-50%,-50%)}
.result-failed::before{content:'';position:absolute;inset:0;background:#000;opacity:0;pointer-events:none;animation:result-darken .5s ease .5s forwards}.result-failed .result-heading,.result-failed .result-title{color:#f7edcf}.result-failed .result-reward .result-down{width:145.6px;max-height:201.5px}@keyframes result-darken{to{opacity:.7}}@media(prefers-reduced-motion:reduce){.result-failed::before{animation-duration:.01s}}
.result-failed::before{animation-name:result-blackout}@keyframes result-blackout{to{opacity:1}}
.result-placeholder[hidden]{display:none}
.result-reward img[hidden]{display:none}
body.test-mode::after{content:'TEST MODE';position:fixed;right:8px;bottom:8px;z-index:1000;padding:3px 5px;background:#263a40d9;color:#fff;font:700 10px/1 sans-serif;letter-spacing:.05em;pointer-events:none}.choice-scene .choice-master{-webkit-touch-callout:none;user-select:none}
.app-shell:has(.book-scene){background:transparent;box-shadow:none}.book-scene{position:fixed;top:0;left:50%;width:375px;height:var(--lesson-stage-height);overflow:hidden;background:url('images/bg_hakutakuzu.png') center/100% 100% no-repeat;transform:translateX(-50%) scale(var(--choice-scale));transform-origin:top center;color:#4a3019}.book-heading{position:absolute;top:20px;left:46px;right:20px;display:flex;align-items:baseline;justify-content:space-between}.book-heading h1{margin:0;font-size:23px;letter-spacing:.12em}.book-heading p{margin:0;font-size:12px;font-weight:bold}.book-filter{position:absolute;top:56px;left:48px;font-size:12px;display:flex;gap:5px;align-items:center}.book-filter input{accent-color:#76502b}.book-grid{position:absolute;top:88px;left:46px;right:20px;bottom:calc(105px + var(--lesson-extra)*.12);display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:8px}.book-card{min-width:0;min-height:0;border:1px solid #9c744a;background:#fff9e57d;padding:4px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#4a3019;font-family:ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif;text-align:center}.book-card[data-action]{cursor:pointer}.book-number{font-size:11px;font-weight:bold}.book-picture{width:min(100%,78px);aspect-ratio:1;display:grid;place-items:center;margin:3px 0;background:#f9efdaaa;border:1px solid #c6a477}.book-image{width:100%;height:100%;object-fit:contain}.book-image.book-status-icon{width:72%;height:72%}.book-image[hidden],.book-placeholder[hidden]{display:none}.book-placeholder{font-size:12px}.book-name{font-size:12px;line-height:1.25;overflow-wrap:anywhere}.book-pagination{position:absolute;bottom:52px;left:46px;right:20px;display:flex;align-items:center;justify-content:center;gap:24px;font-size:13px;font-weight:bold}.book-pagination button,.book-back{border:1px solid #8a663b;background:#f8edcf;color:#4a3019;padding:5px 12px;font:700 13px ui-serif,'Hiragino Mincho ProN',serif;cursor:pointer}.book-pagination button:disabled{opacity:.4}.book-back{position:absolute;bottom:14px;left:calc(50% + 13px);transform:translateX(-50%)}
.book-heading{left:52px;right:35px}.book-filter{left:52px}.book-grid{left:51px;right:34px;gap:6px}.book-card{border:0;background:transparent;padding:0}.book-picture{width:min(100%,91px)}.book-image.book-status-icon{width:56px;height:56px;max-width:72%;max-height:72%}.book-pagination{left:51px;right:34px;bottom:70px;gap:22px}.book-pagination button{width:48px;height:32px;border:0;background:transparent;padding:0}.book-pagination button img{width:100%;height:100%;object-fit:contain}.book-pagination button[data-action='book-prev'] img{transform:scaleX(-1)}.book-back{bottom:20px;left:calc(50% + 8px);width:164px;height:45px;border:0;background:transparent;padding:0}.book-back img{width:100%;height:100%;object-fit:contain}
.book-grid{top:84px;bottom:102px;grid-template-rows:repeat(4,minmax(0,1fr));row-gap:3px}.book-picture{width:min(100%,82px);flex-shrink:0;margin:2px 0}
.book-grid{touch-action:pan-y;backface-visibility:hidden}.book-sheet-copy{position:absolute;inset:0;z-index:2;pointer-events:none;background:url('images/bg_hakutakuzu.png') center/100% 100% no-repeat;clip-path:inset(0 0 0 24px);transform-origin:24px center;backface-visibility:hidden}.book-sheet-copy::after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,rgba(65,38,12,.25),transparent 18%,transparent 65%,rgba(65,38,12,.12));box-shadow:inset -12px 0 18px -15px #503219}.book-sheet-copy.turn-next{animation:book-paper-forward .4s ease-in-out forwards}.book-sheet-copy.turn-prev{animation:book-paper-backward .4s ease-in-out forwards}.book-turning .book-card,.book-turning .book-pagination,.book-turning .book-filter,.book-turning .book-back{pointer-events:none}@keyframes book-paper-forward{from{transform:perspective(900px) rotateY(0deg);filter:brightness(1)}to{transform:perspective(900px) rotateY(-90deg);filter:brightness(.72)}}@keyframes book-paper-backward{from{transform:perspective(900px) rotateY(-90deg);filter:brightness(.72)}to{transform:perspective(900px) rotateY(0deg);filter:brightness(1)}}@media(prefers-reduced-motion:reduce){.book-sheet-copy{animation-duration:.01s!important}}
.book-card{justify-content:flex-start}.book-picture{width:min(100%,94px);margin:0 0 2px}.book-name{min-height:15px}
.book-card{justify-content:flex-start}.book-picture{width:min(100%,82px);flex:0 0 auto}.book-name{display:flex;align-items:center;justify-content:center;width:100%;height:30px;min-height:30px;flex:0 0 30px;text-align:center;line-height:15px;overflow-wrap:anywhere}
.book-detail-overlay{position:absolute;inset:0;z-index:10;display:flex;align-items:center;justify-content:center;background:#0009}.book-detail-open{animation:book-detail-in .18s ease-out}.book-detail-closing{animation:book-detail-out .18s ease-in forwards;pointer-events:none}.book-detail-window{display:flex;flex-direction:column;align-items:stretch;width:calc(100% - 46px);height:calc(100% - 48px);max-height:620px;min-height:0;padding:14px 16px;background:#f7edcf;border:4px double #4a3019;box-shadow:0 5px 18px #0006;color:#251c15;font-family:ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif}.book-detail-header{display:flex;flex-direction:column;align-items:center;gap:2px;flex:none;text-align:center}.book-detail-header span{font-size:12px}.book-detail-header strong{font-size:18px;line-height:1.2}.book-detail-header small{font-size:12px}.book-detail-picture{width:150px;height:150px;flex:none;align-self:center;margin:8px 0;background:#fff8e9;border:1px solid #b69a70;display:grid;place-items:center}.book-detail-picture img{width:100%;height:100%;object-fit:contain}.book-detail-picture img[src$='icon_unknown.png']{width:72%;height:72%}.book-detail-picture img[hidden],.book-detail-placeholder[hidden]{display:none}.book-detail-placeholder{font-size:13px;color:#806b50}.book-detail-text{flex:1 1 auto;min-height:0;width:100%;overflow-y:auto;padding:10px 12px;background:#fffaf0;border:1px solid #c5ad83;font-size:15px;line-height:1.8;overflow-wrap:anywhere}.book-detail-text rt{font-size:.55em}.book-detail-nav{display:flex;align-items:center;justify-content:center;gap:12px;flex:none;margin-top:10px;font-size:13px;font-weight:bold}.book-detail-nav button{cursor:pointer}.book-detail-nav button:not(.book-detail-close){width:38px;height:28px;padding:0;border:0;background:transparent}.book-detail-nav button img{width:100%;height:100%;object-fit:contain}.book-detail-nav button[data-action='detail-prev'] img{transform:scaleX(-1)}.book-detail-nav button:disabled{opacity:.35;cursor:default}.book-detail-close{margin-left:8px;padding:5px 12px;border:1px solid #684c2d;background:#f5e3bb;color:#34251b;font:700 13px ui-serif,'Hiragino Mincho ProN',serif}@keyframes book-detail-in{from{opacity:0}to{opacity:1}}@keyframes book-detail-out{from{opacity:1}to{opacity:0}}@media(prefers-reduced-motion:reduce){.book-detail-open,.book-detail-closing{animation-duration:.01s}}
.book-detail-window{padding:10px 16px}.book-detail-picture{width:240px;height:240px;max-width:100%;margin:6px 0}.book-detail-nav{display:grid;grid-template-columns:48px 1fr 48px;grid-template-rows:48px auto;column-gap:8px;row-gap:3px;width:100%;margin-top:4px;text-align:center}.book-detail-nav button:not(.book-detail-close){width:48px;height:48px;display:grid;place-items:center}.book-detail-nav button:not(.book-detail-close) img{width:38px;height:28px}.book-detail-close{grid-column:1 / -1;justify-self:center;margin:0;padding:5px 18px;border:3px double #684c2d;background:#f7edcf}
.book-detail-scroll{position:relative;flex:1 1 auto;min-height:0;width:100%}.book-detail-scroll .book-detail-text{height:100%;padding-right:20px;scrollbar-width:none}.book-detail-scroll .book-detail-text::-webkit-scrollbar{display:none}.book-detail-scrollbar{position:absolute;top:5px;right:5px;bottom:5px;width:4px;border-radius:3px;background:#d7c4a0;pointer-events:none}.book-detail-scrollbar[hidden]{display:none}.book-detail-scrollbar span{display:block;width:100%;border-radius:3px;background:#8a633d}.book-detail-close{background:#4a3019;color:#f7edcf;border-color:#c7a66a}
.book-detail-picture{background:transparent;border:0}
.result-good .result-reward{top:270px;height:224px}.result-good .result-reward>img{width:192px;height:186px}.result-good .result-reward p{margin:4px 0}.result-good .result-next{top:calc(497px + var(--lesson-extra) * .75)}.result-good .result-book{top:calc(560px + var(--lesson-extra) * .85)}
.result-scene:has(.result-score) .result-bubble p{transform:translateY(-5px)}.result-stamp{animation-delay:1s}
.app-shell:has(.title-scene){background:transparent;box-shadow:none}.title-scene{position:fixed;top:0;left:50%;width:375px;height:var(--lesson-stage-height);overflow:hidden;background:url('images/title_bg.png') center/cover no-repeat;transform:translateX(-50%) scale(var(--choice-scale));transform-origin:top center;color:#382617;font-family:ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif}.title-scene button{font-family:inherit}.title-link{border:0;background:transparent;padding:4px;color:#352719;font-size:13px;font-weight:700;text-decoration:underline;text-underline-offset:3px;text-shadow:0 1px 2px #fff2d0}.title-link:disabled,.title-footer button:disabled{opacity:1;cursor:default}.title-about{position:absolute;top:10px;right:16px}.title-logo{position:absolute;top:42px;left:20px;width:335px;height:auto}.title-hakutaku{position:absolute;top:calc(153px + var(--lesson-extra) * .12);left:47.5px;width:280px;height:280px;object-fit:contain}.title-start,.title-zukan{position:absolute;left:50%;width:205px;height:auto;aspect-ratio:3/1;transform:translateX(-50%);padding:0;border:0;background:transparent;cursor:pointer}.title-start{top:calc(426px + var(--lesson-extra) * .55)}.title-zukan{top:calc(489px + var(--lesson-extra) * .67)}.title-start img,.title-zukan img{display:block;width:100%;height:100%;object-fit:contain}.title-help{position:absolute;top:calc(556px + var(--lesson-extra) * .78);left:50%;transform:translateX(-50%)}.title-footer{position:absolute;bottom:18px;left:14px;right:14px;display:flex;align-items:center;justify-content:center;gap:15px;white-space:nowrap;font-size:12px;font-weight:700;text-shadow:0 1px 2px #fff2d0}.title-footer button:not(.title-link){border:0;background:transparent;padding:2px;color:#382617;font-size:11px;font-weight:700}.title-footer .title-link{font-size:12px}
.title-start{top:calc(435px + var(--lesson-extra) * .55)}.title-zukan{top:calc(503px + var(--lesson-extra) * .67)}.title-help{top:calc(575px + var(--lesson-extra) * .78)}
.title-footer{padding:3px 5px;border-radius:4px;background:#f7edcfcc}
.title-scene .title-link{color:#fff;text-shadow:-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000,0 0 3px #000}.title-footer{background:transparent}.title-scene .title-bgm{font-size:12px;cursor:pointer}
.title-bgm{position:absolute;top:10px;left:16px}.title-footer{bottom:18px;flex-direction:column;gap:2px;background:transparent;padding:0}.title-footer-links{display:flex;align-items:center;justify-content:center;gap:24px}.title-footer .title-help{position:static;transform:none}.title-copyright{color:#fff;font-size:10px;line-height:1.3;text-align:center;text-shadow:-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000,0 0 3px #000}
.lesson-scene.writing-depart>*{animation:writing-fade-out .5s ease forwards;pointer-events:none}.writing-view{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:10px;white-space:nowrap;color:#4a3019;font:700 20px/1.4 ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif;text-shadow:0 1px 2px #fff8e9}.writing-view img{display:block;width:180px;height:auto;object-fit:contain}.writing-view>div{position:relative}.writing-dots{position:absolute;left:100%;top:0;width:1.5em;text-align:left}.writing-view.writing-finish{animation:writing-fade-out .5s ease forwards}@keyframes writing-fade-out{to{opacity:0}}@media(prefers-reduced-motion:reduce){.lesson-scene.writing-depart>*,.writing-view.writing-finish{animation-duration:.01s}}
body:has(.prologue-scene){background:#000}.app-shell:has(.prologue-scene){background:transparent;box-shadow:none}.prologue-scene{position:fixed;top:0;left:50%;width:375px;height:var(--lesson-stage-height);overflow:hidden;background:#000;color:#fff;transform:translateX(-50%) scale(var(--choice-scale));transform-origin:top center;cursor:pointer;font-family:ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif}.prologue-text{position:absolute;top:24px;left:20px;right:20px;font-size:13px;line-height:1.65;letter-spacing:0}.prologue-text p{margin:0 0 11px}.prologue-text .prologue-final{margin-top:20px;margin-bottom:0}.prologue-prompt{position:absolute;bottom:22px;left:0;width:100%;text-align:center;font-size:13px;animation:prologue-blink 1.5s ease-in-out infinite}@keyframes prologue-blink{0%,100%{opacity:1}50%{opacity:.25}}@media(prefers-reduced-motion:reduce){.prologue-prompt{animation:none}}
.prologue-text{top:50%;transform:translateY(-50%);text-align:left}.prologue-text rt{font-size:.55em;line-height:1}
body.prologue-transition{background:#000}.prologue-leaving .prologue-text,.prologue-leaving .prologue-prompt{animation:prologue-leave .8s ease forwards}.title-scene.title-entering{animation:title-appear .5s ease forwards;pointer-events:none}@keyframes prologue-leave{from{opacity:1}to{opacity:0}}@keyframes title-appear{from{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){.prologue-leaving .prologue-text,.prologue-leaving .prologue-prompt,.title-scene.title-entering{animation-duration:.01s}}
.result-scene .result-stamp{animation:none;opacity:0}.result-scene.stamp-revealed .result-stamp{animation:result-stamp .25s ease-out 0s forwards}.result-scene.stamp-static .result-stamp{animation:none;opacity:1;transform:rotate(-10deg)}.result-failed::before{animation:none;opacity:0}.result-failed.stamp-revealed::before{animation:result-blackout .5s ease 0s forwards}.result-failed.stamp-static::before{animation:none;opacity:1}@media(prefers-reduced-motion:reduce){.result-scene.stamp-revealed .result-stamp,.result-failed.stamp-revealed::before{animation-duration:.01s}}
.result-failed.result-darkening::before{animation:result-blackout var(--result-dark-duration,.5s) linear forwards}@media(prefers-reduced-motion:reduce){.result-failed.result-darkening::before{animation-duration:.01s}}

/* タイトルのモード選択 */
.title-scene .title-hakutaku{top:calc(145px + var(--lesson-extra) * .12);left:61.5px;width:252px;height:252px}.title-scene .title-start{top:calc(400px + var(--lesson-extra) * .48)}.title-scene .title-modes{position:absolute;top:calc(464px + var(--lesson-extra) * .57);left:50%;display:flex;gap:4px;transform:translateX(-50%)}.title-scene .title-modes button{width:160px;aspect-ratio:3/1;padding:0;border:0;background:transparent;cursor:pointer}.title-scene .title-modes button:disabled{filter:grayscale(1) brightness(.7);opacity:1;cursor:default}.title-scene .title-modes img{display:block;width:100%;height:100%;object-fit:contain}.title-scene .title-zukan{top:calc(518px + var(--lesson-extra) * .68)}

.choice-scene .scroll-choice strong,.choice-scene .scroll-choice small{color:var(--ink)}

/* 画面全体の操作を固定し、文章と入力欄だけを操作可能にする。 */
html,body{height:100%;overflow:hidden;overscroll-behavior:none}body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:manipulation}img{-webkit-user-drag:none;user-drag:none}input,textarea,[contenteditable]{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default;touch-action:manipulation}.lesson-paper,.record-paper-scroll,.book-detail-text{touch-action:pan-y;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.book-grid{touch-action:pan-y}.scroll-choices{transform:scale(var(--choice-compact,1));transform-origin:top center}

/* 短い表示領域では、要素を行に割り当てて余白と画像を伸縮する。 */
.compact-height .title-scene{display:grid;grid-template-columns:1fr;grid-template-rows:36px minmax(65px,100px) minmax(0,1fr) 56px 46px 56px 53px;justify-items:center;padding:0 0 6px}
.compact-height .title-logo,.compact-height .title-hakutaku,.compact-height .title-start,.compact-height .title-modes,.compact-height .title-zukan,.compact-height .title-footer{position:static;transform:none;min-height:0;align-self:center}
.compact-height .title-logo{grid-row:2;width:auto;height:auto;max-width:335px;max-height:100%;object-fit:contain}
.compact-height .title-hakutaku{grid-row:3;width:auto;height:auto;max-width:252px;max-height:100%;object-fit:contain}
.compact-height .title-start{grid-row:4;width:168px}
.compact-height .title-modes{grid-row:5}
.compact-height .title-modes button{width:138px}
.compact-height .title-zukan{grid-row:6;width:168px}
.compact-height .title-footer{grid-row:7;align-self:center}
.compact-height .result-scene:has(.result-score){display:grid;grid-template-columns:1fr;grid-template-rows:128px 28px 82px minmax(0,1fr) 55px 55px 30px;justify-items:center;padding-bottom:5px}
.compact-height .result-scene .result-heading,.compact-height .result-scene .result-score,.compact-height .result-scene .result-reward,.compact-height .result-scene .result-next,.compact-height .result-scene .result-book,.compact-height .result-scene .result-title{position:relative;top:auto;left:auto;transform:none;min-height:0;align-self:center}
.compact-height .result-scene .result-heading{grid-row:2}
.compact-height .result-scene .result-score{grid-row:3;height:82px}
.compact-height .result-scene .result-score strong{font-size:60px}
.compact-height .result-scene .result-stamp{width:82px;height:82px}
.compact-height .result-scene .result-reward{grid-row:4;width:325px;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}
.compact-height .result-scene .result-reward>img:not(.result-down),.compact-height .result-scene .result-placeholder{width:auto;max-width:192px;height:auto;max-height:calc(100% - 32px);object-fit:contain;min-height:0}
.compact-height .result-scene .result-reward p{flex:none;margin:4px 0}
.compact-height .result-scene .result-down{max-height:90%}
.compact-height .result-scene .result-next{grid-row:5;width:165px;height:55px}
.compact-height .result-scene .result-book{grid-row:6;width:165px;height:55px}
.compact-height .result-scene .result-title{grid-row:7}
.compact-height .book-detail-picture{width:clamp(110px,calc(240px + var(--lesson-extra)),240px);height:auto;aspect-ratio:1}
.compact-height .book-detail-scroll{min-height:90px}
.compact-height .book-picture{width:min(100%,clamp(48px,calc(82px + var(--lesson-extra) * .2),82px))}
.compact-height .prologue-text{font-size:clamp(10px,calc(13px + var(--lesson-extra) * .025),13px);line-height:1.5}
.compact-height .prologue-text p{margin-bottom:clamp(4px,calc(11px + var(--lesson-extra) * .06),11px)}

/* 妖怪選択の各領域を、端末の表示可能な高さの中に配置する。 */
.choice-scene{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:minmax(85px,23%) minmax(0,1fr) auto 55px 28px;row-gap:3px;padding:4px 10px 8px}
.choice-scene .choice-master,.choice-scene .choice-speech,.choice-scene .scroll-choices,.choice-scene .pass-button,.choice-scene .zukan-button,.choice-scene .back-title{position:relative;top:auto;left:auto;transform:none;min-height:0}
.choice-scene .choice-master{grid-area:1 / 2;justify-self:end;align-self:center;width:clamp(85px,calc(var(--choice-stage-height) * .22),135px);height:auto;aspect-ratio:1}
.choice-scene .choice-speech{grid-area:1 / 1;justify-self:start;align-self:center;width:min(100%,185px)}
.choice-scene .choice-speech p{transform:translateY(-5px)}
.choice-scene .scroll-choices{grid-area:2 / 1 / 3 / -1;justify-self:center;align-self:stretch;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;gap:3px}
.choice-scene .scroll-choice{width:clamp(180px,calc((var(--choice-stage-height) - 245px) * .95),320px);max-width:100%;flex:0 1 auto;min-height:0}
.choice-scene .pass-button{grid-area:3 / 1 / 4 / -1;justify-self:center;align-self:center;padding:5px 16px;font-size:14px}
.choice-scene .zukan-button{grid-area:4 / 1 / 5 / -1;justify-self:center;align-self:center;width:165px;height:55px}
.choice-scene .back-title{grid-area:5 / 1 / 6 / -1;justify-self:center;align-self:center}

/* 選択画面の吹き出しとプロローグ本文。 */
.choice-scene{grid-template-columns:220px 1fr}
.choice-scene .choice-speech{width:220px;max-width:100%}
.prologue-text{left:5px;right:5px;text-align:center;font-size:14.3px}
.prologue-text p{margin-bottom:13px}
.compact-height .prologue-text{font-size:clamp(11px,calc(14.3px + var(--lesson-extra) * .0275),14.3px)}
.compact-height .prologue-text p{margin-bottom:clamp(6px,calc(13px + var(--lesson-extra) * .06),13px)}

/* 講義の見出しの下で本文だけをスクロールする。 */
.lesson-paper{overflow:hidden;padding:0 14px 8px}.lesson-paper-scroll{position:absolute;top:18px;right:14px;bottom:8px;left:14px;height:auto;margin:0;overflow-y:auto;overflow-x:hidden;padding:0 0 16px;scroll-behavior:smooth;touch-action:pan-y;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}

.review-mode-label{position:absolute;top:1px;left:10px;z-index:3;padding:1px 5px;background:#4a3019;color:#fff;font:700 10px/1.2 ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif;white-space:nowrap;pointer-events:none}.choice-scene:has(.review-mode-label) .choice-speech{margin-top:16px}
.choice-complete-content{grid-area:2 / 1 / 3 / -1;align-self:center;justify-self:center;width:min(100%,300px);display:flex;flex-direction:column;align-items:center;gap:16px;text-align:center;color:#4a3019;font:700 15px/1.7 ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif}.choice-complete-content p{margin:0;padding:10px;background:#f7edcfdf;border:3px double #684c2d}.choice-review{width:165px;aspect-ratio:3/1;padding:0;border:0;background:transparent;cursor:pointer}.choice-review img{display:block;width:100%;height:100%;object-fit:contain}

.choice-complete{grid-template-rows:minmax(85px,23%) minmax(0,1fr) auto 55px 55px 28px minmax(0,1fr);row-gap:6px}.choice-complete .choice-complete-content{grid-area:3 / 1 / 4 / -1;font-size:13px;font-weight:400;line-height:1.7}.choice-complete .choice-review{grid-area:4 / 1 / 5 / -1;justify-self:center;align-self:center}.choice-complete .zukan-button{grid-area:5 / 1 / 6 / -1}.choice-complete .back-title{grid-area:6 / 1 / 7 / -1}

.lesson-skip{position:absolute;top:calc(568px + var(--lesson-extra));left:50%;transform:translateX(-50%);padding:2px 0;border:0;background:transparent;color:#4a3019;font:700 14px ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif;text-decoration:underline;text-underline-offset:3px;white-space:nowrap;cursor:pointer}

/* 腕試し百本ノック */
.knock-scene{display:flex;flex-direction:column;align-items:stretch;gap:6px;padding:8px 14px 10px}.knock-label{align-self:flex-start;padding:2px 7px;background:#4a3019;color:#fff;font:700 11px/1.3 ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif}.knock-header{display:flex;flex:none;align-items:center;justify-content:space-between;min-height:51px;padding:0 8px;color:#34251b;font-family:ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif}.knock-header>div:first-child{display:flex;align-items:baseline;gap:12px}.knock-header span{font-size:14px;font-weight:bold}.knock-header strong{font-size:20px}.knock-timer{--timer-progress:1;width:48px;height:48px;flex:none;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#8e382d calc(var(--timer-progress)*100%),#d5c4a5 0);border:2px solid #684c2d}.knock-timer span{display:block;width:33px;height:33px;border-radius:50%;background:#f7edcf}.knock-scene .record-label{position:relative;top:auto;left:auto;transform:none;align-self:center;margin-bottom:-16px;z-index:2}.knock-scene .record-paper{position:relative;top:auto;left:auto;width:100%;height:auto;min-height:0;flex:1 1 0}.knock-controls{flex:none;display:flex;flex-direction:column;align-items:center;gap:7px}.knock-submit,.knock-result-card button{padding:7px 20px;border:4px double #dfc390;background:#4a3019;color:#f7edcf;font:700 15px ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif;cursor:pointer}.knock-retire,.knock-result-card .knock-result-title{padding:2px 0;border:0;background:transparent;color:#4a3019;font:700 14px ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif;text-decoration:underline;cursor:pointer}.knock-warning::after{content:'';position:absolute;inset:0;z-index:15;pointer-events:none;border:7px solid #bd2525;animation:knock-warning .65s steps(2,end) infinite}@keyframes knock-warning{50%{opacity:0}}.knock-wait{position:absolute;inset:0;z-index:5;touch-action:none}.knock-overlay{position:absolute;inset:0;z-index:12;display:grid;place-items:center;background:#f7edcf77;pointer-events:all}.knock-hanamaru{display:block;width:min(75%,270px);height:auto;max-height:60%;object-fit:contain}.knock-answer-dialog>div{display:flex;flex-direction:column;max-height:calc(100% - 40px);min-height:0}.knock-answer-dialog h2{flex:none;margin:0 0 8px;font-size:19px}.knock-answer-dialog ul{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;list-style:none;margin:0;padding:0;text-align:left}.knock-answer-dialog li{padding:8px 2px;border-top:1px solid #c4a77e;font-size:13px;line-height:1.5;overflow-wrap:anywhere}.knock-answer-dialog li>strong{color:#a32e25}.knock-answer-dialog li p{margin:3px 0}.knock-context strong{color:#a32e25}.knock-answer-dialog footer{flex:none;margin-top:10px}.app-shell:has(.knock-result-scene){background:transparent;box-shadow:none}.knock-result-scene{position:fixed;top:0;left:50%;width:375px;height:var(--lesson-stage-height);overflow:hidden;background:url('images/background.png') center/cover no-repeat;transform:translateX(-50%) scale(var(--choice-scale));transform-origin:top center;display:grid;place-items:center;padding:20px}.knock-result-card{width:min(100%,310px);max-height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:24px 18px;background:#f7edcfed;border:4px double #4a3019;text-align:center;color:#4a3019;font-family:ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif}.knock-result-label{font-size:12px}.knock-result-card h1,.knock-result-card p{margin:0}.knock-result-card h1{font-size:22px}.knock-result-score{font-size:52px;line-height:1;color:#b42d27;font-weight:bold}.knock-result-score small{font-size:18px}.knock-result-card .knock-result-title{font-size:14px}

/* 百本ノックのタイマーと結果表示。 */
.knock-scene .knock-timer{--timer-progress:100%;--timer-color:#4e8b4c;width:56px;height:56px;background:conic-gradient(var(--timer-color) var(--timer-progress),#d5c4a5 0)}
.knock-scene .knock-submit,.knock-result-card .knock-retry{display:block;width:165px;aspect-ratio:3/1;padding:0;border:0;background:transparent;cursor:pointer}.knock-scene .knock-submit img,.knock-result-card .knock-retry img{display:block;width:100%;height:100%;object-fit:contain}
.knock-answer-dialog .knock-context strong{color:#a32e25;text-decoration:underline;text-underline-offset:2px}.knock-answer-dialog .knock-answer-input{color:#a32e25}.knock-answer-dialog .knock-answer-correct{color:#39723b;font-size:1.1em;font-weight:700}
.knock-result-card .knock-result-label{font-size:22px;font-weight:700;line-height:1.25}.knock-result-subtitle{font-size:15px}.knock-result-card .knock-result-score{font-size:68px}.knock-new-record{color:#af7800;font-size:18px;font-weight:700;text-shadow:0 1px 0 #f8e4a1}

.knock-scene .knock-retire-dialog{background:#19130f}.knock-scene .knock-label{display:inline-flex;align-items:center;justify-content:center;line-height:1.3}

.knock-scene .knock-label>span{display:block;transform:translateY(1px)}.knock-header>div:first-child>span,.knock-header>div:first-child>strong{text-shadow:-1px 0 #f7edcfe0,1px 0 #f7edcfe0,0 -1px #f7edcfe0,0 1px #f7edcfe0}

/* 妖怪名のルビと固定幅の文字領域。 */
[data-fit-yokai] ruby{ruby-position:over}[data-fit-yokai] rt{font-size:.5em;line-height:1}
.scroll-choice{grid-template-columns:minmax(0,1fr)}.scroll-choice .scroll-copy{min-width:0}.scroll-choice .scroll-copy strong{width:100%;max-width:100%;min-width:0;overflow:hidden;line-height:1.2}
.lesson-speech strong{display:block;width:100%;min-width:0;overflow:hidden;line-height:1.25}
.book-name>span[data-fit-yokai]{display:block;width:100%;max-height:30px;overflow:hidden;text-align:center}
.book-detail-header strong[data-fit-yokai]{display:block;width:100%;max-width:100%;white-space:nowrap;overflow:hidden;line-height:1.35}
.result-reward p[data-fit-yokai]{width:100%;max-height:3.5em;overflow:hidden;line-height:1.5}
.knock-header>div:first-child{min-width:0;flex:1 1 auto}.knock-header>div:first-child>span{flex:none}.knock-header strong[data-fit-yokai]{display:block;min-width:0;max-width:100%;overflow:hidden;white-space:nowrap;line-height:1.35}
.scroll-choice{min-width:0}.scroll-choice .scroll-copy strong{padding-top:.45em;line-height:1.25}.lesson-speech strong{padding-top:.45em}.book-name>span[data-fit-yokai]{line-height:1.2}.book-detail-header strong[data-fit-yokai],.knock-header strong[data-fit-yokai]{padding-top:.4em}.result-reward p[data-fit-yokai]{padding-top:.4em}

/* 原稿に記載された段落内改行を本文に反映する。 */
.lesson-paper-scroll,.record-paper-scroll,.book-detail-text{white-space:pre-wrap}
.result-scene .test-answer-link{position:absolute;top:145px;right:14px;z-index:3;padding:3px;border:0;background:transparent;color:#4a3019;font:700 12px ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif;text-decoration:underline;text-shadow:0 0 3px #f7edcf;cursor:pointer}.result-failed .test-answer-link{color:#f7edcf;text-shadow:0 0 3px #4a3019}

/* 腕試しの開始前案内 */
.app-shell:has(.knock-intro-scene){background:transparent;box-shadow:none}.knock-intro-scene{position:fixed;top:0;left:50%;width:375px;height:var(--lesson-stage-height);overflow:hidden;background:url('images/background.png') center/cover no-repeat;transform:translateX(-50%) scale(var(--choice-scale));transform-origin:top center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(3px,calc(8px + var(--lesson-extra) * .03),10px);padding:10px 18px;color:#34251b;font-family:ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif;text-align:center}.knock-intro-scene h1{flex:none;margin:0;font-size:24px;line-height:1.25;font-weight:800;text-shadow:0 1px 3px #f7edcf}.knock-intro-description{flex:none;width:100%;padding:8px 10px;background:#f7edcfe8;border:3px double #684c2d;font-size:clamp(11px,calc(13px + var(--lesson-extra) * .01),13px);line-height:1.55;text-align:left}.knock-intro-stat{flex:none;width:210px;padding:4px 10px;border:3px double #684c2d;background:#f7edcfea;display:flex;flex-direction:column;align-items:center;gap:1px;line-height:1.1}.knock-intro-stat span{font-size:12px;font-weight:700}.knock-intro-stat strong{font-size:27px}.knock-intro-stat strong small{font-size:13px}.knock-intro-high{color:#b42d27}.knock-intro-message{min-height:1.4em;flex:none;font-size:12px;font-weight:700;line-height:1.4;text-shadow:0 0 3px #f7edcf}.knock-intro-start{flex:none;min-width:160px;padding:8px 24px;border:4px double #d7b564;border-radius:5px;background:#285d36;color:#fff5d8;font:700 18px ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif;cursor:pointer}.knock-intro-hint{flex:none;font-size:10px;font-weight:700;text-shadow:0 0 3px #f7edcf}.knock-intro-title{flex:none;padding:3px;border:0;background:transparent;color:#4a3019;font:700 14px ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif;text-decoration:underline;cursor:pointer}

.knock-intro-scene{gap:clamp(6px,calc(13px + var(--lesson-extra) * .03),17px)}.knock-intro-description{line-height:1.7}.knock-intro-stats{flex:none;display:flex;align-items:center;justify-content:center;width:min(100%,310px);padding:6px 8px;border:3px double #684c2d;background:#f7edcfea}.knock-intro-stats .knock-intro-stat{flex:1 1 0;width:auto;min-width:0;padding:2px 0;border:0;background:transparent}.knock-intro-divider{flex:none;font-size:25px;color:#684c2d}.knock-intro-message{text-align:center}.knock-intro-hint{margin-top:-8px;font-weight:400}

.knock-intro-description{border-color:transparent;background:transparent;text-align:center;text-shadow:-1px -1px 2px #f7edcf,1px -1px 2px #f7edcf,-1px 1px 2px #f7edcf,1px 1px 2px #f7edcf}.knock-intro-chance{display:inline-block;color:#b42d27;font-weight:700;animation:knock-intro-chance 1s ease-in-out infinite}@keyframes knock-intro-chance{0%,100%{opacity:1}50%{opacity:.5}}@media(prefers-reduced-motion:reduce){.knock-intro-chance{animation:none}}

/* タイトル画面の白澤解説 */
.title-about-overlay{position:absolute;inset:0;z-index:30;display:flex;align-items:center;justify-content:center;background:#0009}.title-about-window{display:flex;flex-direction:column;width:calc(100% - 40px);height:calc(100% - 40px);max-height:600px;min-height:0;padding:16px 16px 12px;border:4px double #4a3019;background:#f7edcf;box-shadow:0 5px 18px #0006;color:#251c15;font-family:ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif}.title-about-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;padding:0 6px;text-align:left;font-size:14px;line-height:1.8;overflow-wrap:anywhere}.title-about-scroll h2{margin:0 0 10px;font-size:19px;line-height:1.45;font-weight:700}.title-about-scroll p{margin:0 0 16px}.title-about-scroll h2:not(:first-child){margin-top:24px}.title-about-scroll .title-about-source{text-align:right;margin:4px 0 0;font-size:12px}.title-about-footer{flex:none;display:flex;justify-content:center;padding-top:12px}.title-about-footer button{padding:6px 20px;border:3px double #c7a66a;background:#4a3019;color:#f7edcf;font:700 14px ui-serif,'Hiragino Mincho ProN','Yu Mincho',serif;cursor:pointer}

.book-progress{text-align:right;line-height:1.2}.book-preparing{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:#827e73}.book-preparing svg{width:30px;height:33px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;opacity:.7}.book-preparing>span{font-size:10px;line-height:1.1;color:#827e73}
.book-heading{align-items:flex-start}
