:root{color-scheme:dark;--night:#101f30;--deep:#0a1726;--ink:#172b3b;--muted:#a9becb;--gold:#ecc780;--ice:#eef4f5;--teal:#84d0cd;--line:#354958;--serif:"Yu Mincho","Hiragino Mincho ProN","Noto Serif JP",serif;--sans:"BIZ UDPGothic","Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;font-family:var(--sans);font-size:16px;color:#eef4f5;background:var(--night)}
*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.6}button,a,summary,input{touch-action:manipulation}button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible{outline:3px solid #448ca6;outline-offset:4px}button{transition:background .15s,transform .15s}button:active:not(:disabled){transform:translateY(1px)}button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;flex-shrink:0}button{border:0}h1,h2,h3,p{margin:0}[hidden]{display:none!important}.app-shell{max-width:1240px;margin:auto;padding:30px 40px 20px}.masthead{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:25px}.brand{display:flex;gap:16px;align-items:center}.brand-mark{font-family:var(--serif);font-size:2.4rem;color:var(--gold);border:1px solid #827657;border-radius:50%;width:56px;height:56px;display:grid;place-items:center;padding-bottom:3px}h1{font-family:var(--serif);font-size:1.75rem;font-weight:700;letter-spacing:.12em}.brand p{color:var(--muted);font-size:.875rem;margin-top:7px;letter-spacing:.04em}.quiet-button{min-height:46px;border:1px solid #49606d;background:transparent;color:#e6edf0;border-radius:9px;padding:10px 16px;display:flex;gap:9px;align-items:center;justify-content:center;font-size:.9375rem}.quiet-button:hover{background:#213b4c}.scene{height:340px;border:1px solid #49606c;border-radius:18px 18px 0 0;position:relative;isolation:isolate;overflow:hidden;background:#203b4b}.forest{position:absolute;width:100%;height:100%;object-fit:cover;object-position:center 75%;inset:0;z-index:-3}.scene-shade{position:absolute;inset:0;background:linear-gradient(180deg,#081521aa 0%,transparent 47%,#07142277 73%,#071422e8 100%);z-index:-2}.scene-top{position:absolute;inset:22px 27px auto;display:flex;justify-content:space-between;align-items:flex-start;gap:15px}.timer{display:flex;align-items:center;gap:14px;border-radius:10px;background:#102432e8;padding:10px 16px;border:1px solid #70889277}.timer>span{font-size:.875rem;color:#c5d6df}.timer strong{font-variant-numeric:tabular-nums;font-size:1.8rem;font-weight:500;line-height:1.1;letter-spacing:.04em}.character{position:absolute;bottom:63px;left:56%;transform:translateX(-50%);will-change:left;transition:left .2s linear;pointer-events:none}.character img{display:block;object-fit:contain;width:100%;height:100%;filter:drop-shadow(0 8px 8px #02111c88)}.rider{width:205px;height:170px;z-index:2}.erlking{width:162px;height:191px;left:85%;bottom:60px;z-index:1;opacity:.9}.scene.running .rider img{animation:gallop .42s ease-in-out infinite alternate}.scene.running .erlking img{animation:float 1.8s ease-in-out infinite alternate}.scene.caught .rider img{filter:drop-shadow(0 0 16px #a6d1df)}.scene.cleared .erlking{opacity:0;transition:opacity 1s}.scene-bottom{position:absolute;inset:auto 27px 21px;display:flex;align-items:end;justify-content:space-between;gap:22px}.distance{width:min(300px,65%)}.distance>div:first-child{display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:.8125rem;margin-bottom:9px}.distance strong{font-size:.8125rem;font-weight:400;color:var(--teal)}.distance-track{height:6px;background:#647b835e;border-radius:10px;overflow:hidden}.distance-track>span{display:block;height:100%;width:72%;border-radius:10px;background:var(--teal);transition:width .18s linear,background .2s}.correct-count{font-size:.875rem;color:#cee0e5}.correct-count strong{font-size:1.65rem;font-weight:500;margin:0 6px;color:#fff;font-variant-numeric:tabular-nums}.journey-track{position:absolute;inset:auto 0 0;height:4px;background:#122d39}.journey-track span{height:100%;display:block;width:0;background:var(--gold);transition:width .18s linear}.scene-overlay{position:absolute;inset:0;display:grid;place-items:center;background:#0b1c3077;z-index:4;backdrop-filter:blur(3px)}.scene-overlay span{font-family:var(--serif);font-size:1.6rem;letter-spacing:.16em;background:#132b3ceb;border:1px solid #678495;padding:16px 28px;border-radius:10px}.play-panel{background:var(--ice);color:var(--ink);border-radius:0 0 18px 18px;min-height:270px;padding:29px 34px 31px}.welcome{display:grid;grid-template-columns:1fr auto;gap:22px 42px;align-items:center}.welcome h2{font-family:var(--serif);font-size:1.65rem;letter-spacing:.04em;margin-bottom:14px}.welcome p{font-size:1rem;line-height:1.9;color:#4c626e;max-width:680px}.rules{display:flex;gap:17px;margin-top:21px;flex-wrap:wrap;font-size:.875rem;color:#47606b}.rules span{display:flex;align-items:center;gap:8px}.rule-dot{width:7px;height:7px;border-radius:50%;display:inline-block;background:#397c79}.rules span:last-child .rule-dot{background:#a3505b}.start-controls{min-width:238px;display:flex;flex-direction:column;gap:16px;align-items:stretch}.primary{background:var(--gold);color:#23313a;border:1px solid #d1ab67;min-height:58px;padding:16px 30px;font-size:1.0625rem;font-weight:bold;border-radius:9px;box-shadow:0 3px 0 #cfaa65}.primary:hover{background:#f4d79e}.setting{display:flex;align-items:center;gap:10px;font-size:.875rem;line-height:1.5;color:#4b626c;cursor:pointer}.setting input{accent-color:#376873;width:20px;height:20px;flex-shrink:0}.welcome-note{grid-column:1/-1;border-top:1px solid #d2dde1;padding-top:17px;color:#647985;font-size:.8125rem;line-height:1.7}.quiz-top{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:16px}.question-meta{display:flex;align-items:center;gap:12px;color:#5e737e;font-size:.875rem}.question-number{font-size:1.25rem;color:#213c4c;font-variant-numeric:tabular-nums}.category{border-left:1px solid #c3d3da;padding-left:12px}.quiz-actions{display:flex;gap:8px}.small-button{background:transparent;border:1px solid #bfd0d7;color:#385766;border-radius:7px;min-height:42px;padding:8px 12px;font-size:.875rem;display:flex;align-items:center;justify-content:center;gap:7px}.small-button:hover{background:#dce8ec}.question{font-size:1.3rem;line-height:1.65;font-weight:700;letter-spacing:.015em;min-height:43px;margin-bottom:21px}.answers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.answer{display:flex;gap:13px;align-items:center;text-align:left;min-height:74px;background:white;border:1.5px solid #b8cad3;border-bottom:3px solid #afc3ce;color:var(--ink);border-radius:9px;padding:15px;font-size:1.0625rem;line-height:1.5;overflow-wrap:anywhere}.answer:hover{border-color:#487e91;background:#f5fcff}.answer-number{flex-shrink:0;border-radius:50%;width:29px;height:29px;display:grid;place-items:center;background:#e7eff2;color:#426474;font-size:.875rem}.quiz-hint{font-size:.8125rem;color:#607986;line-height:1.5;margin-top:16px}.feedback-header{display:flex;align-items:center;gap:10px;font-size:.9375rem;font-weight:bold;color:#246863;margin-bottom:12px}.feedback-header.loss{color:#994556}.feedback-symbol{display:grid;place-items:center;width:29px;height:29px;border-radius:50%;background:#d0e8e4;font-size:1.25rem}.loss .feedback-symbol{background:#f1dfe2}.feedback h2,.result h2{font-family:var(--serif);font-size:1.55rem;line-height:1.55}.explanation{font-size:1rem;line-height:1.9;color:#435c68;margin-top:13px;max-width:850px}.feedback-bottom{display:flex;gap:20px;justify-content:space-between;align-items:center;margin-top:24px}.feedback-bottom p{font-size:.8125rem;color:#647a84;line-height:1.7}.feedback-bottom .primary{min-width:205px;min-height:50px;padding:12px 25px}.secondary{background:white;color:#35596b;border:1px solid #b7cbd5;border-radius:9px;padding:13px 22px;min-height:50px}.secondary:hover{background:#dfebee}.result-top{display:flex;justify-content:space-between;align-items:flex-start;gap:25px}.result-score{color:#4b6571;font-size:.875rem;white-space:nowrap;text-align:right}.result-score strong{display:block;color:#2e5567;font-size:2.2rem;font-weight:500;margin-top:3px}.result-actions{display:flex;gap:12px;margin-top:22px;flex-wrap:wrap}.result-actions .primary{min-height:51px;padding:12px 24px}.review{border-top:1px solid #cedce0;margin-top:24px;padding-top:17px;font-size:.9375rem}.review summary{cursor:pointer;padding:5px 0;color:#385965}.review article{margin-top:16px;padding:0 0 15px;border-bottom:1px solid #d5e0e3}.review article h3{font-size:.9375rem;line-height:1.7}.review article p{font-size:.875rem;line-height:1.8;color:#536d79;margin-top:6px}.review .wrong-answer{color:#994556}.footer{display:flex;justify-content:space-between;gap:20px;margin-top:19px;color:#9db3c0;font-size:.8125rem;line-height:1.75}.footer p:first-child{color:#c2d0d8}.pause-panel{text-align:center;padding:12px 0}.pause-panel h2{font-family:var(--serif);font-size:1.55rem}.pause-panel p{color:#576f7c;line-height:1.8;margin:13px 0 22px}.pause-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap}dialog{color:var(--ink);background:#f3f7f7;border:1px solid #718793;border-radius:17px;width:min(730px,calc(100% - 30px));max-height:86dvh;padding:0;box-shadow:0 25px 80px #00122266}dialog::backdrop{background:#04111dbb;backdrop-filter:blur(6px)}.dialog-heading{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:24px 29px 20px;background:#e6eff1;border-bottom:1px solid #c6d7de;position:sticky;top:0;z-index:1}.small-label{font-size:.8125rem;color:#5b737f}.dialog-heading h2{font-family:var(--serif);font-size:1.45rem;margin-top:6px}.dialog-close{font-size:1.8rem;min-width:44px;min-height:44px;border-radius:50%;background:#d3e2e7;color:#294d60}.study-content{padding:8px 29px 25px}.study-content article{padding:20px 0;border-bottom:1px solid #d3e1e5}.study-content article>span{font-size:.8125rem;color:#387b83}.study-content h3{font-size:1.0625rem;line-height:1.6;margin-top:7px}.study-content article p{font-size:.9375rem;line-height:1.95;color:#496570;margin-top:8px}.story-note{font-size:.875rem;line-height:1.85;color:#64564d;background:#efe9de;padding:14px 17px;border-left:3px solid #b89963;margin-top:21px}.sources{margin-top:20px;font-size:.875rem;line-height:1.8;color:#536d78}.sources summary{cursor:pointer;min-height:36px}.sources a{color:#2c6078;text-underline-offset:3px;overflow-wrap:anywhere}.sources li{margin-bottom:9px}.sources ul{padding-left:22px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@keyframes gallop{from{transform:translateY(0) rotate(-1deg)}to{transform:translateY(-6px) rotate(1deg)}}@keyframes float{from{transform:translateY(0)}to{transform:translateY(-12px)}}
@media(min-width:1440px){.app-shell{padding-top:39px}.scene{height:390px}.rider{width:232px;height:190px}.erlking{height:212px;width:185px}.play-panel{padding-top:34px;padding-bottom:35px}}
@media(max-width:850px){.app-shell{padding:23px 24px}.scene{height:310px}.welcome{grid-template-columns:1fr}.start-controls{flex-direction:row;align-items:center;min-width:0;gap:24px}.start-controls .primary{min-width:240px}.welcome-note{grid-column:auto}.answers{gap:10px}.answer{padding:12px 10px;font-size:1rem;gap:9px}.play-panel{padding:25px}.footer{flex-direction:column;gap:4px}.rider{width:175px;height:151px}.erlking{width:140px;height:172px}}
@media(max-width:560px){.app-shell{padding:18px 14px}.masthead{margin-bottom:18px;gap:8px}.brand{gap:10px}.brand-mark{width:40px;height:40px;font-size:1.8rem;flex-shrink:0}h1{font-size:1.22rem;letter-spacing:.06em}.brand p{font-size:.75rem;line-height:1.6;margin-top:4px;letter-spacing:0}.masthead .quiet-button{padding:9px 10px;font-size:.8125rem;gap:5px;min-height:42px;flex-shrink:0}.masthead .quiet-button svg{display:none}.scene{height:276px;border-radius:13px 13px 0 0}.scene-top{inset:17px 17px auto}.timer{flex-direction:column;gap:4px;padding:8px 10px;min-width:87px}.timer>span{font-size:.75rem}.timer strong{font-size:1.45rem}.rider{width:137px;height:126px;bottom:60px}.erlking{width:104px;height:141px;bottom:60px}.scene-bottom{inset:auto 17px 19px;gap:14px}.distance{width:63%}.distance>div:first-child,.distance strong{font-size:.75rem}.correct-count{font-size:.8125rem;white-space:nowrap}.correct-count strong{font-size:1.4rem;margin:0 3px}.play-panel{padding:23px 19px 25px;border-radius:0 0 13px 13px}.welcome{gap:19px}.welcome h2{font-size:1.35rem;line-height:1.55;margin-bottom:10px}.welcome p{font-size:.9375rem;line-height:1.85}.rules{margin-top:16px;font-size:.8125rem;gap:11px}.start-controls{flex-direction:column;gap:15px;align-items:stretch}.start-controls .primary{width:100%;min-width:0}.setting{font-size:.8125rem;align-self:center}.welcome-note{font-size:.75rem;line-height:1.8}.question-meta{gap:8px;font-size:.8125rem}.question-number{font-size:1.0625rem}.category{padding-left:8px}.quiz-top{gap:8px;margin-bottom:17px;align-items:start}.quiz-actions{gap:6px}.small-button{font-size:.8125rem;padding:7px 9px;min-height:40px}.small-button svg{width:15px;height:15px}.question{font-size:1.15rem;line-height:1.65;margin-bottom:18px;min-height:0}.answers{grid-template-columns:1fr;gap:11px}.answer{min-height:62px;padding:12px 14px;font-size:1rem;gap:14px}.quiz-hint{font-size:.75rem}.feedback h2,.result h2{font-size:1.35rem}.explanation{font-size:.9375rem;line-height:1.85}.feedback-bottom{flex-direction:column;align-items:stretch;gap:16px;margin-top:21px}.feedback-bottom p{font-size:.75rem}.feedback-bottom .primary{width:100%}.result-top{gap:12px}.result-score strong{font-size:1.8rem}.result-score{font-size:.75rem}.footer{font-size:.75rem;margin-top:16px}.dialog-heading{padding:20px}.dialog-heading h2{font-size:1.2rem}.study-content{padding:4px 21px 23px}.scene-overlay span{font-size:1.3rem}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.bgm-toggle{display:flex;align-items:center;justify-content:center;gap:9px;min-height:46px;padding:11px 14px;border:1px solid #70889277;border-radius:10px;color:#edf5f5;background:#102432e8;font-size:.875rem}.bgm-toggle:hover{background:#254859}.bgm-toggle[aria-pressed="false"]{color:#d5e0e5;background:#152b36e8}.bgm-toggle[aria-pressed="false"] svg{opacity:.55}.audio-credit{margin-top:17px;color:#536d78;font-size:.875rem;line-height:1.85}.audio-credit summary{cursor:pointer;min-height:36px}.audio-credit a{color:#2c6078;text-underline-offset:3px}.audio-credit p{margin-top:8px}
@media(max-width:560px){.bgm-toggle{min-height:44px;padding:9px 11px;font-size:.8125rem;gap:6px}.bgm-toggle svg{width:18px;height:18px}}

.erlking{width:180px;height:139px;bottom:85px}
@media(min-width:1440px){.erlking{width:200px;height:155px;bottom:89px}}
@media(max-width:850px){.erlking{width:153px;height:118px;bottom:81px}}
@media(max-width:560px){.erlking{width:117px;height:100px;bottom:79px}}

/* Match the text-size preference selected in Ossia. */
html.ossia-large{font-size:125%}
