/* A fixed, three-layer MASTER stage. All overrides are scoped to this presentation. */
body.master-layer-active{background:#152f37;overflow:hidden}
.master-layer-active>.site-header,.master-layer-active>footer{display:none}
.master-layer-active main#app{max-width:none;width:100%;margin:0;padding:0}
.master-layer-stage{position:relative!important;isolation:isolate;width:100%!important;max-width:none!important;height:100vh;height:100dvh;min-height:0!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;overflow:hidden;background:#223f42;color:#fff;animation:none!important;transform:none!important;transition:none!important}
.master-layer-stage>.master-layer-scene{position:absolute;inset:0;z-index:0;width:100%;height:100%;margin:0!important;pointer-events:none}
.master-layer-scene .master-battle-field{position:absolute;inset:0;display:block;width:100%;height:100%!important;background-size:cover;background-position:center bottom;overflow:hidden}
.master-layer-scene .master-battle-field::after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#08192708,#08192712 45%,#08192733)}
.master-layer-scene .master-battle-frame{position:absolute;left:var(--master-layer-x);top:10%;transform:translateX(-50%);display:block;width:70%;max-width:none;height:84%!important;border:0;box-shadow:none;background:transparent;overflow:visible;z-index:1}
.master-layer-scene .master88-portrait{width:100%;height:100%;padding:0!important;overflow:visible}
.master-layer-scene .master88-portrait img{width:100%;height:100%;max-width:none;max-height:none;object-fit:contain;object-position:center top;filter:drop-shadow(0 6px 5px #071e314d);animation:none!important}
.master-layer-scene .master88-fallback{width:260px;max-width:90%;margin:20vh auto 0;background:#142b3de8;border:2px solid #fff;border-radius:8px}
.master-layer-ui{position:absolute;inset:0;z-index:2;padding:max(10px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));pointer-events:none}
.master-layer-ui button,.master-layer-ui a,.master-layer-ui summary,.master-layer-ui select,.master-layer-content{pointer-events:auto;touch-action:manipulation}
.master-layer-toolbar{display:flex;align-items:center;gap:12px;min-height:56px}
.master-layer-toolbar .topline{display:flex;gap:8px;flex:none;margin:0!important}.master-layer-toolbar .topline>strong,.master-layer-toolbar .topline>span{display:none}
.master-layer-toolbar .btn{min-height:44px;padding:8px 12px;font-size:16px;line-height:1.3;background:#091522d9;color:#fff;border:2px solid #d6e5ea;border-radius:8px}
.master-layer-toolbar .master-battle-heading{flex:1;display:block;min-width:0;background:#091522d9;border:1px solid #d6e5ea99;border-radius:8px;padding:5px 12px;text-align:left;line-height:1.4}
.master-layer-toolbar .master-battle-heading strong{display:block;font-size:21px}.master-layer-toolbar .master-battle-heading span{display:block;font-size:14px}
.master-layer-content{position:absolute;top:84px;bottom:max(14px,env(safe-area-inset-bottom));right:max(18px,env(safe-area-inset-right));width:51%;display:flex;flex-direction:column;gap:12px;min-height:0;color:#fff}
.master-layer-question-copy{flex:none;max-height:46%;overflow-y:auto;overscroll-behavior:contain;scrollbar-color:#cadde5 #10203199;scrollbar-width:thin;border-radius:9px}
.master-layer-read-more{align-self:flex-end;flex:none;max-width:180px;min-height:44px;margin:-6px 3px;padding:5px 10px;font-size:14px;line-height:1.3;border:1px solid #d8e7ed;border-radius:6px;background:#0c2034e6;color:#fff}
.master-layer-read-more[hidden]{display:none}
.master-layer-answers{min-height:0;max-height:62%;margin-top:auto;overflow-y:auto;overscroll-behavior:contain;padding:3px;scrollbar-color:#cadde5 #10203199;scrollbar-width:thin}
.master-layer-content .panel{display:block!important;min-width:0;margin:0!important;padding:14px 18px!important;background:rgba(5,14,27,.82)!important;color:#fff;border:2px solid #e5edf4!important;border-radius:9px;box-shadow:none!important}
.master-layer-content .panel .question{font-size:30px;line-height:1.65;color:#fff;margin:6px 0!important}
.master-layer-content .panel>.eyebrow{font-size:14px;color:#d6e4ef}
.master-layer-content .master-battle-dialogue{flex:none;min-height:0!important;padding:9px 14px!important;background:rgba(4,9,17,.85);border:2px solid #fff;outline:0;box-shadow:none;margin:0 0 10px;border-radius:6px}
.master-layer-content .master-battle-dialogue p{font-size:18px;line-height:1.5}
.master-layer-question-copy>.master-battle-dialogue{display:flex;align-items:center;min-height:78px!important}
.master-layer-content .choices{display:flex!important;flex-direction:column;gap:10px!important;background:transparent!important;padding:0;margin:0;min-width:0}
.master-layer-content .choice{display:flex;align-items:center;width:100%;min-height:62px;padding:12px 16px;font-size:22px!important;line-height:1.5;text-align:left;color:#fff;background:rgba(5,14,27,.80);border:2px solid #d6e4ed;border-radius:10px;box-shadow:none;opacity:1;overflow-wrap:anywhere}
.master-layer-content .choice b{display:flex;align-items:center;justify-content:center;flex:none;width:34px;min-width:34px;height:34px;font-size:19px;color:#112b3d;background:#f0f5f7;border-radius:50%;margin-right:12px}
.master-layer-content .choice.selected,.master-layer-content .choice:focus-visible{outline:3px solid #ffe487;outline-offset:-3px;border-color:#ffe487;background:rgba(23,41,61,.85);box-shadow:inset 7px 0 0 #ffe487}
.master-layer-content .choice:hover:not(:disabled){border-color:#ffe487;background:rgba(23,41,61,.85)}
.master-layer-content .choice.is-correct{border-color:#8dffb7;box-shadow:0 0 0 2px #8dffb766,inset 5px 0 0 #8dffb7;background:rgba(8,37,29,.84)}
.master-layer-content .choice.is-wrong{border-color:#ffacac;background:rgba(51,13,27,.84)}
.master-layer-content .choice em{display:block;font-size:15px;color:#bdffd3;font-style:normal}.master-layer-content .choice.is-wrong em{color:#ffc2c2}
.master-layer-content .master-layer-answered-choices{margin-top:14px}
.master-layer-content .master-layer-picked{padding:10px 12px;border:2px solid #93edb4;border-radius:8px;background:#0a3028d9;box-shadow:0 0 0 2px #93edb433}
.master-layer-content .master-layer-picked[data-answer-state="incorrect"]{border-color:#ffb5b5;background:#3d1525d9;box-shadow:none}
.master-layer-content .master-layer-right-answer{padding:10px 12px;border-left:4px solid #93edb4;background:#102c35cc}
.master-layer-content .feedback{font-size:24px;color:#fff;margin:0 0 10px;padding:10px 12px;background:#154234e6;border:1px solid #9edec0;border-radius:8px}.master-layer-content h2{font-size:23px;color:#fff}.master-layer-content p{font-size:18px;line-height:1.7;color:#fff;overflow-wrap:anywhere}
.master-layer-content .discovery-mini{background:#102b3de8;border-color:#9ebecb;color:#fff}.master-layer-content .discovery-mini .eyebrow{color:#e2dca3}
.master-layer-content .source-note{font-size:13px;color:#d7e5ec}.master-layer-content .btn{font-size:18px;min-height:48px;white-space:normal}
.master-layer-content .notice{background:#3d2c17;color:#fff;border:1px solid #e1c586}
.master-layer-content .iroha-before,.master-layer-content .iroha-after,.master-layer-content .iroha-meaning,.master-layer-content .iroha-life{background:rgba(12,30,40,.85);color:#fff;border-color:#bcd4e0}
.master-layer-content .iroha-original,.master-layer-content .iroha-reading summary,.master-layer-content .iroha-song-label,.master-layer-content .iroha-reading-text,.master-layer-content .iroha-recall-note{color:#fff}
.master-layer-content .iroha-original{font-size:22px;line-height:1.7}.master-layer-content .iroha-reading{font-size:17px}
.master-layer-intro-content{left:6%;right:6%;width:auto;top:auto;bottom:max(24px,env(safe-area-inset-bottom));max-height:40%;overflow-y:auto}
.master-layer-intro-content .master-battle-dialogue{min-height:150px!important;padding:18px 24px!important;background:rgba(4,9,17,.88);border-width:3px}
.master-layer-intro-content .master-battle-text{font-size:24px;line-height:1.6;min-height:3.2em}.master-layer-intro-content .master-battle-help{font-size:15px}
.master-layer-information{overflow-y:auto;overscroll-behavior:contain;padding:3px;border-radius:9px}
.master-layer-information .master-battle-dialogue{min-height:150px!important;padding:16px!important}.master-layer-information .master-battle-text{font-size:22px}
.master-layer-information .panel{padding:18px!important}.master-layer-information .score{color:#ffe393}
.master-layer-information .final85-rewards{background:rgba(40,31,10,.86);border:1px solid #f1d17f;color:#fff8db}
.master-layer-information .final85-rewards h2{color:#ffe393}.master-layer-information>.eyebrow{color:#fff0bd;background:#101d2bd9;padding:6px 10px}
.master-layer-information .master-result-msg{background:#122d3de0;color:#fff;border:1px solid #b6cfdb}
.master-layer-information>h1{padding:12px;margin:0;background:#071421d9;color:#fff;font-size:26px}.master-layer-information .final89-checklist li{background:#102c3de8;color:#fff}
@media(max-width:899px), (orientation:portrait){
 .master-layer-scene .master-battle-frame{left:var(--master-layer-portrait-x);top:32%;width:100%;height:80%!important}
 .master-layer-toolbar{gap:8px}.master-layer-toolbar .master-battle-heading strong{font-size:20px}.master-layer-toolbar .master-battle-heading span{font-size:13px}
 .master-layer-toolbar .btn{font-size:14px;padding:6px 8px}.master-layer-toolbar .topline{gap:6px}
 .master-layer-content{left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));width:auto;top:86px;gap:10px}
 .master-layer-question-copy{max-height:31%}.master-layer-answers{max-height:45%;width:100%;margin-top:auto}
 .master-layer-content .choice{font-size:24px!important;min-height:64px}.master-layer-content .panel .question{font-size:28px}
 .master-layer-intro-content{left:4%;right:4%;top:auto;bottom:max(22px,env(safe-area-inset-bottom));max-height:38%}
 .master-layer-information{top:auto;bottom:max(16px,env(safe-area-inset-bottom));max-height:43%;background:transparent}
}
@media(max-width:600px){
 .master-layer-ui{padding:8px}.master-layer-toolbar{gap:6px;min-height:52px}.master-layer-toolbar .master-battle-heading{padding:5px 8px}.master-layer-toolbar .master-battle-heading strong{font-size:17px}.master-layer-toolbar .master-battle-heading span{font-size:11px}.master-layer-toolbar .topline .btn:not(#home){display:none}
 .master-layer-toolbar .btn{font-size:13px;padding:6px;min-width:44px}.master-layer-sound{max-width:64px}
 .master-layer-content{top:80px;left:8px;right:8px;bottom:10px}.master-layer-content .panel{padding:10px 12px!important}.master-layer-content .panel .question{font-size:22px}
 .master-layer-content .choice{font-size:20px!important;min-height:60px;padding:10px 12px}.master-layer-content .choice b{margin-right:9px}.master-layer-content .iroha-original{font-size:18px}
 .master-layer-content .master-battle-dialogue p{font-size:18px}.master-layer-intro-content{top:auto;bottom:16px}.master-layer-intro-content .master-battle-dialogue{padding:14px!important}.master-layer-intro-content .master-battle-text{font-size:21px}
 .master-layer-information{top:auto;bottom:14px;max-height:45%}.master-layer-information .master-battle-text{font-size:21px}
}
@media(prefers-reduced-motion:reduce){.master-layer-scene img{animation:none!important}}
