/* ID + class deliberately outranks the legacy view styles without changing their geometry. */
:is(#mathSprintScreen,#mathInvaderScreen,#englishChoiceScreen,#sentenceOrderScreen,#timedChoiceScreen,#multiSelectScreen,#asyncChoiceScreen).yt-game{background:radial-gradient(ellipse at top left,#dbecdf,transparent 60%),#f5f3e8;color:#17362f}
:is(#mathSprintScreen,#mathInvaderScreen,#englishChoiceScreen,#sentenceOrderScreen,#timedChoiceScreen,#multiSelectScreen,#asyncChoiceScreen,#kanjiDefenseScreen).yt-game header{position:relative;top:0;background:transparent;gap:6px;padding:3px 0 8px;flex-wrap:wrap}
:is(#mathSprintScreen,#mathInvaderScreen,#englishChoiceScreen,#sentenceOrderScreen,#timedChoiceScreen,#multiSelectScreen,#asyncChoiceScreen).yt-game header h1{font-size:clamp(18px,4vw,26px);color:#17362f}
:is(#mathSprintScreen,#mathInvaderScreen,#englishChoiceScreen,#sentenceOrderScreen,#timedChoiceScreen,#multiSelectScreen,#asyncChoiceScreen,#kanjiDefenseScreen).yt-game header button{font-size:12px;padding:5px 8px;min-height:44px}
:is(#mathSprintScreen,#englishChoiceScreen,#sentenceOrderScreen,#timedChoiceScreen,#multiSelectScreen,#asyncChoiceScreen).yt-game :is(.ms-play,.ec-play,.so-play,.tc-play,.ac-play){grid-template-columns:1fr;gap:8px}
.yt-game .gt-stage{margin:4px 0 8px}.yt-game .gt-help{display:none}.gt-scene{height:146px}
.gt-scene-metric{position:absolute;top:0;left:0;right:0;padding:5px 8px;font-size:12px;color:#fff7df;background:#193e35e6;z-index:3}
.gt-scene .gt-scene-label{font-size:11px;min-height:27px}.gt-world-actions{display:flex;gap:6px;margin-top:6px}
.yt-game .gt-world-actions .gt-button{flex:1;font-size:12px;padding:5px 8px;background:#fff9e8;color:#23483b;border:1px solid #97ab97;min-height:44px}
.yt-game .gt-world-actions [aria-pressed=true]{background:#315e4d;color:white;border-color:#224936;box-shadow:inset 0 -3px #122d24}
.yt-game .gt-world-actions button:disabled{opacity:.55}.gt-world-actions [data-visited=true]{background:#d8e8d6!important;color:#23483b!important}
.gt-map-actions{position:absolute;inset:33px 6px auto;display:grid;grid-template-columns:repeat(5,1fr);gap:4px;z-index:4;margin:0}
.yt-game .gt-map-actions .gt-button{padding:4px 1px;font-size:11px;min-width:0}.gt-explore .gt-actor{bottom:26px}
.gt-explore{height:168px;background:repeating-linear-gradient(25deg,transparent 0 28px,#a9bf8b40 29px 31px),linear-gradient(#deebc5,#c6d6a2)}
#asyncChoiceScreen.yt-game .gt-map-actions .gt-button{padding:4px 1px;font-size:11px;min-width:0;min-height:44px;white-space:nowrap}
#asyncChoiceScreen.yt-game .gt-explore .gt-actor{height:42px;width:46px;bottom:29px}
.gt-explore .gt-world-objects{inset:93px 10% 42px;border-bottom:2px dashed #6b8c6399}
.gt-scene[data-mode=danger]{border-color:#b26642}.gt-scene[data-mode=fever]{border-color:#eab950;box-shadow:inset 0 0 24px #ffe58d77}
.gt-scene[data-mode=climax] .gt-scene-metric{background:#75552b}.gt-rival{position:absolute;bottom:52px;font-size:9px;background:#ffffffa0;color:#536862;padding:2px;border-radius:6px;opacity:.6;transition:left .2s linear}
.gt-race .gt-actor[data-reaction=idle]{animation:gt-run var(--stride,.5s) ease-in-out infinite alternate}.gt-race .gt-world-objects{background:repeating-linear-gradient(90deg,transparent 0 25px,#fff4c344 26px 28px);animation:gt-course 1.5s linear infinite}
.gt-lantern::before{background:#ffe889;opacity:var(--light);box-shadow:0 0 38px 18px #ffe889}.gt-lantern .gt-world-objects{opacity:1;inset:40px 8% 30px}.gt-lantern .gt-world-piece{opacity:.2}.gt-lantern .gt-collected{opacity:1;color:#fff4b3!important}
.gt-board-caption{height:53px}.gt-board-caption .gt-scene-label{min-height:24px}.gt-board-caption .gt-scene-metric{font-size:11px}
.gt-boss{position:absolute;top:6px;left:20%;width:60%;height:24px;z-index:1;font-size:12px;text-align:center;color:#fff8e2;border:2px solid #f7d084;border-radius:8px;background:linear-gradient(90deg,#ad6138 var(--hp),#25384c var(--hp));pointer-events:none}
.gt-boss::before{content:'';position:absolute;width:116px;height:48px;left:50%;top:32px;transform:translateX(-50%);background:linear-gradient(#9cbbc5,#527482);clip-path:polygon(0 70%,18% 30%,35% 30%,42% 0,58% 0,65% 30%,82% 30%,100% 70%,65% 100%,35% 100%)}
.gt-boss::after{content:'';position:absolute;width:26px;height:8px;left:calc(50% - 13px);top:54px;background:#ffd981;box-shadow:-34px 4px #a2d9df,34px 4px #a2d9df,0 0 14px #ffc37a}
.yt-game .gt-priority{box-shadow:0 0 0 3px #f0bc49!important}.yt-game .gt-priority::after{content:'優先';position:absolute;right:0;top:-12px;font-size:9px;background:#ffdb85;color:#533d16;border-radius:3px;padding:1px 4px}
.gt-particles{position:absolute;inset:35px 15% 30px;pointer-events:none;z-index:4;opacity:0}.gt-particles i{position:absolute;left:calc(var(--i)*14%);top:var(--row);width:5px;height:5px;background:#ffe88c;border-radius:1px;transform:rotate(45deg)}
.gt-scene:is([data-reaction=correct],[data-reaction=boost]) .gt-particles{animation:gt-sparks .45s ease-out}.gt-actor[data-reaction=partial]{animation:gt-hop .45s ease-out}
.gt-star-map{position:absolute;width:190px;height:120px;left:50%;top:19px;transform:translateX(-50%);z-index:1}.gt-star{fill:#344e65;stroke:#8294a2;stroke-width:1;transition:fill .15s}.gt-star.selected{fill:#f4d774;stroke:#fff7be;filter:drop-shadow(0 0 3px #ffe899)}.gt-star.correct{fill:#91e2b1}.gt-star.wrong{fill:#eaa393}.gt-star-map text{font:6px system-ui;fill:#17372e;pointer-events:none}.gt-star-link{stroke:#ffe38e;stroke-width:1.3;stroke-dasharray:100;animation:gt-line .2s ease-out}.gt-craft .gt-actor{left:12%!important;width:55px;height:53px}.gt-craft .gt-world-objects{display:none}
#englishChoiceScreen.yt-game .ec-choice{min-height:62px;border:2px solid #b9a575;background:linear-gradient(90deg,#e1c592 5%,#fff4dd 5%,#fff4dd 94%,#e1c592 94%);box-shadow:inset 0 0 0 4px #f5e2bb;text-align:left;padding-left:18px}
#englishChoiceScreen.yt-game .ec-choice::before{content:'◈ ';color:#a47631}
#englishChoiceScreen.yt-game .ec-choice[data-status=correct]{background:#d8eec5;box-shadow:inset 0 0 0 4px #f5e2bb,0 0 10px #a3cd79;animation:gt-door .35s ease-out}
#englishChoiceScreen.yt-game .ec-choice[data-status=incorrect]{background:#f2d4c4}
#sentenceOrderScreen.yt-game .so-chunks{gap:7px;margin:8px 0;padding:9px 7px;background:linear-gradient(transparent 45%,#3e809044 46%,#3e809044 65%,transparent 66%);border-radius:12px}
#sentenceOrderScreen.yt-game .so-chunk{position:relative;touch-action:none;user-select:none;padding:9px 8px 9px 23px;background:linear-gradient(#f5dfb6,#e2c594);border-color:#987a4a;box-shadow:0 4px #9b784b;font-size:16px;transition:box-shadow .12s,background .12s;cursor:grab}
.so-chunk::before{content:attr(data-slot);position:absolute;top:5px;left:5px;font-size:10px;color:#7f6843}.so-chunk.gt-dragging{z-index:12;box-shadow:0 9px 12px #19332f66!important;cursor:grabbing}.so-chunk.gt-drop-target{outline:3px dashed #288a7b;outline-offset:3px}.so-chunk.gt-snapped{background:#cdebb5!important;animation:gt-snap .3s ease-out}
#sentenceOrderScreen.yt-game .so-help{font-size:12px;margin:4px 0}#sentenceOrderScreen.yt-game .so-feedback{min-height:25px;margin:7px 0}#sentenceOrderScreen.yt-game .so-moves{margin:8px 0}
#multiSelectScreen.yt-game .ms-choice{position:relative;padding:9px 12px 9px 34px;border-radius:16px;font-size:15px;min-height:48px}#multiSelectScreen.yt-game .ms-choice::before{content:'☆';position:absolute;left:9px;color:#9b8145}#multiSelectScreen.yt-game .ms-choice[aria-pressed=true]::before{content:'★'}
.gt-rank{display:block;font-size:25px;color:#567064}.gt-rank[data-rank=A]{color:#9d741f}.gt-rank[data-rank=S]{color:#ab681e;text-shadow:0 0 12px #ffdc83}
.yt-game .gt-result{padding:16px;margin:8px auto}.yt-game .gt-result h2{font-size:18px}.gt-result>.gt-portrait{width:105px;height:93px}.gt-final-score{font-size:29px;margin:3px}.gt-result h3{font-size:15px}.gt-result p{margin:6px 0;line-height:1.5;font-size:12px}.gt-result p.gt-replay-goal{font-size:14px;font-weight:700}.gt-result-actions{margin:12px 0 8px;gap:8px}.gt-result-actions button{font-size:14px!important}.gt-result .gt-reward{padding:6px}.gt-result .gt-record{font-size:15px!important}.gt-result-details{margin-top:8px;padding-top:0}
.gt-growth-result{margin:10px auto 8px;max-width:340px;padding:9px 12px;background:#e5eedc;border-radius:12px}.gt-growth-result>strong{font-size:17px}.gt-xp-track{height:10px;border-radius:6px;background:#bbcbb7;overflow:hidden;margin:7px 0}.gt-xp-track span{display:block;height:100%;background:linear-gradient(90deg,#589e78,#c6d95c);border-radius:6px}.gt-growth-result[data-level-up=true]{box-shadow:0 0 0 2px #dfb955;background:#fff0c2}.gt-result>.gt-level-up{animation:gt-level-up .85s ease-in-out 2;filter:drop-shadow(0 0 16px #edc64b)}
.yt-friend-growth{display:grid;gap:6px;min-width:0}.yt-friend-growth strong{font-size:18px}.yt-friend-growth small{font-size:12px}.yt-xp{height:10px;width:min(250px,100%);accent-color:#589e78}
.yt-game[data-paused=true] *{animation-play-state:paused!important}
.yt-game .gt-learning-save-alert:not([hidden]){display:flex;align-items:center;justify-content:space-between;gap:8px;margin:8px 0;padding:9px 12px;border:2px solid #a44c30;border-radius:10px;background:#fff1e8;color:#632817}
.yt-game .gt-learning-save-alert p{margin:0;font-size:14px;line-height:1.45}
.yt-game .gt-learning-save-alert button{flex:none;min-height:44px}
@media(max-width:390px){.yt-game .gt-learning-save-alert:not([hidden]){flex-wrap:wrap}.yt-game .gt-learning-save-alert button{width:100%}}
.yt-game .gt-how-to{margin:6px 0;padding:0 10px;border:1px solid #9caf9a;border-radius:10px;background:#fff9e8;color:#294538}
.yt-game .gt-how-to summary{display:list-item;min-height:44px;padding:10px 4px;cursor:pointer;font-size:14px;font-weight:700}
.yt-game .gt-how-to ol{margin:0 0 10px;padding-left:1.6em;font-size:14px;line-height:1.6}
.yt-game .gt-how-to li+li{margin-top:4px}
.gt-constellations{position:absolute;right:7px;top:32px;display:grid;gap:3px;z-index:2}.gt-constellations span{font-size:14px;line-height:18px;color:#73858b}.gt-constellations .gt-constellation-done{color:#ffe68a;text-shadow:0 0 7px #ffe49a;animation:gt-snap .35s ease-out}
#mathInvaderScreen.yt-game .mi-board{background:repeating-linear-gradient(90deg,transparent 0 calc(33.333% - 1px),#718faf55 calc(33.333% - 1px) 33.333%),linear-gradient(#172f49,#496b85);border-color:#748e99}
#mathInvaderScreen.yt-game .mi-enemy{border-radius:14px 14px 6px 6px;border-bottom:5px solid #a68449;box-shadow:0 3px 0 #16314b}
@media(max-width:580px){.gt-scene{height:125px}.gt-explore{height:168px}.gt-board-caption{height:53px}.gt-scene .gt-scene-label{font-size:10px}.gt-star-map{height:97px;top:20px}.gt-hud{padding:5px 0}.gt-hud strong{font-size:16px}.gt-hud .gt-skill{min-height:44px!important}.gt-scene-metric{font-size:11px}.gt-race .gt-actor{width:57px;height:54px}
#mathInvaderScreen.yt-game .mi-board{height:185px}#mathInvaderScreen.yt-game .mi-pad{grid-template-columns:repeat(6,1fr)}#mathInvaderScreen.yt-game .mi-pad button{padding:4px;font-size:18px}#mathInvaderScreen.yt-game .mi-enemy{font-size:13px;overflow:visible}
#kanjiDefenseScreen.yt-game .kd-board{height:235px}
#multiSelectScreen.yt-game .ms-feedback{min-height:26px;margin:5px 0}#multiSelectScreen.yt-game .ms-prompt{font-size:17px;margin:5px 0}#multiSelectScreen.yt-game .ms-help{font-size:12px;margin:4px 0}}
@media(max-height:680px){.gt-scene{height:95px}.gt-explore{height:140px}.gt-board-caption{height:49px}.gt-star-map{height:68px}.gt-world-actions{margin-top:3px}}
.gt-goal-picker{margin:4px 0 8px;border:1px solid #a4b8a8;border-radius:9px;padding:8px;background:#fffaf0}.gt-goal-picker summary{cursor:pointer;min-height:32px;display:flex;align-items:center;font-size:14px;font-weight:700}.gt-goal-picker summary:focus-visible{outline:3px solid #19766d}.gt-goal-picker p{font-size:13px;line-height:1.5;margin:8px 0}.gt-goal-actions{display:flex;flex-wrap:wrap;gap:6px}.gt-goal-actions .gt-button{flex:1 1 95px;min-height:44px;font-size:13px;padding:8px}.gt-goal-actions [aria-pressed=true]{background:#d9efdf;border-color:#28734a}.gt-goal-status{font-size:13px;line-height:1.5;margin:5px 0}.gt-goal-status[data-status=achieved],.gt-challenge-result[data-status=achieved]{color:#165e4e;font-weight:700}.gt-challenge-result{font-size:15px;line-height:1.5}
.yt-game .gt-goal-picker summary{min-height:44px}.yt-game .gt-goal-actions .gt-button{font-size:13px;padding:8px;min-height:44px}
@media(max-width:360px){.yt-game .gt-goal-actions .gt-button{flex-basis:100%}}
@media(prefers-reduced-motion:reduce){.yt-game *, .yt-game *::before,.yt-game *::after{animation:none!important;transition:none!important}}
@keyframes gt-run{to{transform:translate(-50%,-3px) rotate(3deg)}}
@keyframes gt-course{to{background-position:-56px 0}}
@keyframes gt-sparks{0%{opacity:1;transform:scale(.7)}100%{opacity:0;transform:scale(1.3) translateY(-18px)}}
@keyframes gt-line{from{stroke-dashoffset:100}to{stroke-dashoffset:0}}
@keyframes gt-snap{50%{transform:translateY(3px) scale(1.03,.97)}}
@keyframes gt-level-up{40%{transform:translateY(-12px) scale(1.1) rotate(4deg)}70%{transform:scale(1.05,.95)}}
@keyframes gt-door{45%{transform:perspective(400px) rotateY(-9deg);filter:brightness(1.1)}}

/* Place the question and its actions inside each game world. Review keeps the plain learning layout. */
section.yt-game[id] .gt-scene:not(.gt-board-caption){height:clamp(300px,43vh,400px);border-width:3px;box-shadow:0 8px 0 #193e3520,0 16px 28px #193e3520}
section.yt-game[id] .gt-scene.gt-explore{height:clamp(350px,49vh,440px)}
section#multiSelectScreen.yt-game .gt-scene.gt-craft{height:clamp(365px,51vh,450px)}
section#timedChoiceScreen.yt-game .gt-scene.gt-lantern{height:clamp(310px,45vh,410px)}
section.yt-game[id] .gt-scene-label{font-weight:700;min-height:29px}
section.yt-game[id] .gt-scene>.gt-embedded{position:absolute;z-index:6;box-sizing:border-box;margin:0;max-width:560px}
section.yt-game[id] .gt-scene>:is(.ms-question,.ec-prompt,.so-prompt,.tc-prompt,.ms-prompt,.ac-prompt){top:42px;left:50%;width:calc(100% - 30px);transform:translateX(-50%);padding:7px 12px;border:2px solid #fff7d2a8;border-radius:12px;background:#132f31d9;color:#fff8dc;text-shadow:0 1px #10232b;box-shadow:0 5px 15px #10232b44;text-align:center;line-height:1.25;overflow-wrap:anywhere}
section#mathSprintScreen.yt-game .gt-scene>.ms-question{font-size:clamp(28px,7vw,40px)!important;top:45px;width:max-content;min-width:170px}
section#mathSprintScreen.yt-game .gt-scene>.ms-answer-row{top:116px;left:50%;width:min(90%,420px);transform:translateX(-50%);padding:7px;border:2px solid #ffe9b7;border-radius:14px;background:#173b35e0;box-shadow:0 6px 18px #08221f66}
section#mathSprintScreen.yt-game .gt-race .gt-actor{width:72px;height:70px}
section#mathSprintScreen.yt-game .ms-pad{grid-template-columns:repeat(5,minmax(0,1fr));max-width:520px;margin:10px auto!important}
section#mathSprintScreen.yt-game .ms-pad button{min-height:44px!important}
section#englishChoiceScreen.yt-game .gt-scene>.ec-prompt{font-size:clamp(27px,7vw,39px);top:44px}
section.yt-game[id] .gt-scene>:is(.ec-choices,.tc-choices,.ac-choices,.ms-choices){left:50%;bottom:37px;width:calc(100% - 22px);transform:translateX(-50%);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:8px;border:2px solid #fff0ca8c;border-radius:15px;background:#102d32a8;box-shadow:0 6px 18px #0a202c66}
section.yt-game[id] .gt-scene>:is(.ec-choices,.tc-choices,.ac-choices,.ms-choices) button{min-width:0;min-height:52px;padding:7px 8px;font-size:clamp(14px,3.5vw,18px);line-height:1.25;overflow-wrap:anywhere}
section#englishChoiceScreen.yt-game .gt-scene>.ec-choices button{min-height:62px}
section#englishChoiceScreen.yt-game .gt-treasure .gt-world-objects{inset:94px 8% 200px}
section#englishChoiceScreen.yt-game .gt-treasure .gt-actor{bottom:198px}
section#sentenceOrderScreen.yt-game .gt-scene>.so-prompt{font-size:15px;top:42px}
section#sentenceOrderScreen.yt-game .gt-scene>.so-chunks{left:50%;bottom:39px;width:calc(100% - 20px);transform:translateX(-50%);max-height:55%;overflow:auto;padding:9px 7px;border:2px solid #ffe9b59c;border-radius:14px;background:#123d4fbe}
section#sentenceOrderScreen.yt-game .gt-scene>.so-chunks .so-chunk{min-height:52px;flex:1 1 calc(50% - 8px)}
section#sentenceOrderScreen.yt-game .gt-bridge .gt-world-objects{inset:95px 5% 145px}
section#sentenceOrderScreen.yt-game .gt-bridge .gt-actor{bottom:155px}
section#timedChoiceScreen.yt-game .gt-scene>.tc-prompt{font-size:clamp(25px,6vw,37px);top:79px}
section#timedChoiceScreen.yt-game .gt-scene>.tc-timer-label{top:36px;right:15px;z-index:7;color:#fff5ce;font-size:13px;background:#152b45c9;padding:3px 8px;border-radius:8px}
section#timedChoiceScreen.yt-game .gt-scene>.tc-timer-track{top:62px;left:50%;width:min(85%,420px);transform:translateX(-50%);z-index:7}
section#timedChoiceScreen.yt-game .gt-lantern .gt-world-objects{inset:130px 9% 175px}
section#multiSelectScreen.yt-game .gt-scene>.ms-prompt{font-size:clamp(17px,4vw,25px);top:41px}
section#multiSelectScreen.yt-game .gt-scene>.ms-choices{grid-template-columns:repeat(2,minmax(0,1fr));max-height:65%;overflow:auto}
section#multiSelectScreen.yt-game .gt-scene>.ms-choices button{min-height:49px;padding:7px 8px 7px 30px;font-size:14px}
section#multiSelectScreen.yt-game .gt-craft .gt-star-map{width:230px;height:115px;top:98px}
section#multiSelectScreen.yt-game .gt-craft .gt-route-sky{inset:87px 7% auto;width:86%;height:130px}
section#multiSelectScreen.yt-game .gt-craft .gt-actor{bottom:204px}
section#asyncChoiceScreen.yt-game .gt-scene>.ac-prompt{top:92px;font-size:clamp(19px,4.5vw,29px);max-height:80px;overflow:auto}
section#asyncChoiceScreen.yt-game .gt-explore .gt-world-objects{inset:155px 9% 180px}
section#asyncChoiceScreen.yt-game .gt-explore .gt-actor{bottom:176px}
section.yt-game[id] :is(.ec-play,.so-play,.tc-play,.ms-play,.ac-play){margin-top:8px;gap:0}
section.yt-game[id] :is(.ec-help,.so-help,.tc-help,.ms-help,.ac-help){font-size:12px;margin:4px 0 7px}
section.yt-game[id] :is(.ec-feedback,.so-feedback,.tc-feedback,.ms-feedback,.ac-feedback){min-height:24px;margin:5px 0}
section#mathInvaderScreen.yt-game .mi-board,section#kanjiDefenseScreen.yt-game .kd-board{height:clamp(300px,45vh,440px);box-shadow:0 8px 0 #193e3520,0 16px 28px #193e3520}
section#mathInvaderScreen.yt-game .mi-controls,section#kanjiDefenseScreen.yt-game .kd-controls{margin:-4px 0 0;padding:10px;border:2px solid #8fb5cc;border-radius:0 0 14px 14px;background:#183b51;color:#fff7db;box-shadow:0 7px 14px #09223033}
section#mathInvaderScreen.yt-game .mi-selected,section#kanjiDefenseScreen.yt-game .kd-target{color:#fff0ba;font-size:20px;line-height:1.3}
section#mathInvaderScreen.yt-game .mi-pad{grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;margin:8px 0}
section#mathInvaderScreen.yt-game .mi-pad button{min-width:0;min-height:44px}
section.yt-game[id] :is(.mi-board,.kd-board) :is(.gt-scene-metric,.gt-scene-label){display:none}
section.yt-game[id] .gt-goal-picker{color:#17362f}
section.yt-game[id] :is(.mi-board,.kd-board)[data-mode=danger]{border-color:#e49860;box-shadow:0 0 0 3px #e4986066}
@media(max-width:580px){section.yt-game[id] .gt-scene:not(.gt-board-caption){height:300px}section.yt-game[id] .gt-scene.gt-explore{height:360px}section#multiSelectScreen.yt-game .gt-scene.gt-craft{height:380px}section#timedChoiceScreen.yt-game .gt-scene.gt-lantern{height:320px}section#mathInvaderScreen.yt-game .mi-board,section#kanjiDefenseScreen.yt-game .kd-board{height:280px}}
@media(max-height:680px){section.yt-game[id] .gt-scene:not(.gt-board-caption){height:260px}section.yt-game[id] .gt-scene.gt-explore{height:320px}section#multiSelectScreen.yt-game .gt-scene.gt-craft{height:340px}section#timedChoiceScreen.yt-game .gt-scene.gt-lantern{height:280px}section#mathInvaderScreen.yt-game .mi-board,section#kanjiDefenseScreen.yt-game .kd-board{height:250px}}

/* The whole viewport is the playfield. Navigation stays above it; play controls stay inside it. */
section.yt-game.gt-fullscreen-play{padding:0!important;overflow:hidden!important;background:#193b3b}
section.yt-game.gt-fullscreen-play header{position:fixed!important;inset:0 0 auto!important;z-index:100!important;height:56px;box-sizing:border-box;margin:0!important;padding:5px 9px!important;background:#102d32ed!important;color:#fff7dc!important;backdrop-filter:blur(8px)}
section.yt-game.gt-fullscreen-play header h1{color:#fff7dc!important;font-size:clamp(17px,4.5vw,23px)!important}
section.yt-game.gt-fullscreen-play .gt-sound:not([hidden]){position:fixed;z-index:101;top:56px;right:8px;max-width:calc(100vw - 16px);padding:10px;border:2px solid #f4d99b;border-radius:10px;background:#fff9e8;color:#17362f;box-shadow:0 12px 28px #071e22aa}
section.yt-game.gt-fullscreen-play .gt-stage{position:fixed;inset:0;z-index:2;margin:0!important;pointer-events:none}
section.yt-game.gt-fullscreen-play .gt-scene:not(.gt-board-caption),section#mathInvaderScreen.yt-game.gt-fullscreen-play .mi-board,section#kanjiDefenseScreen.yt-game.gt-fullscreen-play .kd-board{position:fixed;inset:0;width:100vw;height:100dvh!important;max-width:none;margin:0;border:0;border-radius:0;box-shadow:none;pointer-events:auto}
section.yt-game.gt-fullscreen-play .gt-scene.gt-board-caption{display:none!important}
section.yt-game.gt-fullscreen-play .gt-scene-metric,section.yt-game.gt-fullscreen-play .gt-scene-label{display:none}
section.yt-game.gt-fullscreen-play .gt-goal-status{display:none}
section.yt-game.gt-fullscreen-play .gt-in-world{position:absolute;z-index:8;box-sizing:border-box}
section.yt-game.gt-fullscreen-play .gt-how-to{position:fixed;z-index:101;top:62px;left:8px;width:30%;margin:0;padding:0 5px;background:#fff9e8ee;color:#24453a}
section.yt-game.gt-fullscreen-play .gt-how-to summary{min-height:46px;padding:10px 2px;font-size:12px;line-height:1.2}
section.yt-game.gt-fullscreen-play .gt-how-to[open]{z-index:20;width:min(94%,460px);max-height:65dvh;overflow:auto;box-shadow:0 12px 30px #071e22aa}
section.yt-game.gt-fullscreen-play .gt-goal-picker{top:62px;right:8px;width:calc(70% - 20px);margin:0;padding:3px 7px;background:#fff9e8f0}
section.yt-game.gt-fullscreen-play .gt-goal-picker summary{min-height:46px;font-size:12px;line-height:1.2}
section.yt-game.gt-fullscreen-play .gt-goal-picker[open]{z-index:20;left:8px;width:calc(100% - 16px);max-height:65dvh;overflow:auto;box-shadow:0 12px 30px #071e22aa}
section.yt-game.gt-fullscreen-play .gt-hud{top:119px;left:8px;right:8px;display:flex;align-items:center;gap:6px;margin:0;padding:4px 8px;border-radius:9px;background:#143534cf;color:#fff8dd;min-height:36px;font-size:12px}
section.yt-game.gt-fullscreen-play .gt-hud .gt-friend-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
section.yt-game.gt-fullscreen-play .gt-hud .gt-skill{position:static!important;flex:0 0 100px;min-width:0;min-height:36px!important;max-width:100px;padding:3px 5px!important;font-size:10px!important;line-height:1.1}
section.yt-game.gt-fullscreen-play .gt-hud .gt-skill meter{display:none}
section.yt-game.gt-fullscreen-play :is(.ms-progress,.ec-progress,.so-progress,.tc-progress,.ac-progress,.mi-hud,.kd-hud){top:158px;left:8px;right:8px;margin:0!important;padding:3px 6px;border-radius:8px;background:#13353bc4;color:#fff7d8;font-size:12px;min-height:30px;z-index:9}
section.yt-game.gt-fullscreen-play .gt-play-controls{top:196px;left:9px;right:9px;bottom:63px;display:flex!important;flex-direction:column;gap:7px;overflow:auto;overscroll-behavior:contain;padding:5px 3px 8px;scrollbar-width:thin}
section.yt-game.gt-fullscreen-play .gt-play-controls :is(.ms-help,.ec-help,.so-help,.tc-help,.ac-help){display:none}
section.yt-game.gt-fullscreen-play .gt-play-controls :is(.ms-question,.ec-prompt,.so-prompt,.tc-prompt,.ms-prompt,.ac-prompt){position:static;transform:none;width:100%;max-width:none;margin:0;padding:9px 10px;border:2px solid #fff1c9a8;border-radius:12px;background:#122e36de;color:#fff8dd;text-align:center;font-size:clamp(19px,5vw,31px);line-height:1.25;box-shadow:0 5px 15px #071f2b55}
section#mathSprintScreen.yt-game.gt-fullscreen-play .gt-play-controls .ms-question{font-size:clamp(31px,8vw,46px)!important}
section.yt-game.gt-fullscreen-play .gt-play-controls :is(.ec-choices,.tc-choices,.ac-choices,.ms-choices,.so-chunks){position:static;transform:none;width:100%;max-width:none;margin:auto 0 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:8px;border:2px solid #fff0ca8c;border-radius:14px;background:#102d32bd;box-shadow:0 6px 18px #0a202c66}
section.yt-game.gt-fullscreen-play .gt-play-controls :is(.ec-choices,.tc-choices,.ac-choices,.ms-choices) button{min-width:0;min-height:54px;font-size:clamp(14px,3.7vw,18px);line-height:1.2;overflow-wrap:anywhere}
section#sentenceOrderScreen.yt-game.gt-fullscreen-play .gt-play-controls .so-chunks{display:flex;flex-wrap:wrap;max-height:48%;overflow:auto}
section.yt-game.gt-fullscreen-play .gt-play-controls :is(.ms-feedback,.ec-feedback,.so-feedback,.tc-feedback,.ac-feedback){min-height:22px;margin:0;padding:2px 6px;border-radius:7px;background:#102d32cc;color:#fff8dd;font-size:12px}
section.yt-game.gt-fullscreen-play .gt-play-controls [data-action=next],section.yt-game.gt-fullscreen-play .gt-play-controls [data-action=submit]{align-self:stretch;min-height:42px}
section.yt-game.gt-fullscreen-play .gt-world-actions{position:absolute;z-index:9;left:7px;right:7px;bottom:7px;margin:0;display:flex;gap:5px;pointer-events:auto}
section.yt-game.gt-fullscreen-play .gt-world-actions .gt-button{min-height:48px;font-size:clamp(11px,2.9vw,14px);padding:4px 3px;line-height:1.15}
section#asyncChoiceScreen.yt-game.gt-fullscreen-play .gt-map-actions{top:auto;inset:auto 7px 7px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr))}
section#mathSprintScreen.yt-game.gt-fullscreen-play .gt-play-controls .ms-answer-row{position:static;transform:none;width:100%;margin:0;padding:6px;border:2px solid #ffe9b7;border-radius:12px;background:#173b35e0}
section#mathSprintScreen.yt-game.gt-fullscreen-play .gt-play-controls .ms-pad{margin:auto 0 0!important;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
section#mathSprintScreen.yt-game.gt-fullscreen-play .gt-play-controls .ms-pad button{min-height:44px;padding:3px}
section#timedChoiceScreen.yt-game.gt-fullscreen-play .gt-play-controls :is(.tc-timer-label,.tc-timer-track){position:static;width:auto;height:auto;overflow:visible;clip-path:none;white-space:normal;margin:0;color:#fff7dc}
section#timedChoiceScreen.yt-game.gt-fullscreen-play .gt-play-controls .tc-timer-track{width:100%}
section#multiSelectScreen.yt-game.gt-fullscreen-play .gt-play-controls .ms-choices{max-height:50%;overflow:auto}
section#multiSelectScreen.yt-game.gt-fullscreen-play .gt-play-controls .ms-choices button{min-height:46px;padding:5px 6px 5px 28px;font-size:13px}
section.yt-game.gt-fullscreen-play :is(.gt-treasure,.gt-bridge,.gt-craft,.gt-explore,.gt-lantern,.gt-race) .gt-actor{bottom:31%!important}
section#multiSelectScreen.yt-game.gt-fullscreen-play .gt-craft .gt-route-sky{inset:27% 7% auto;width:86%;height:32%}
section#multiSelectScreen.yt-game.gt-fullscreen-play .gt-craft .gt-star-map{top:27%;height:30%}
section#multiSelectScreen.yt-game.gt-fullscreen-play .gt-craft .gt-actor{bottom:40%!important}
section.yt-game.gt-fullscreen-play .gt-learning-save-alert:not([hidden]){position:fixed;z-index:24;bottom:60px;left:8px;right:8px}
section.yt-game.gt-fullscreen-play .gt-result:not([hidden]){position:fixed;z-index:22;inset:56px 0 0;overflow:auto;margin:0!important;max-width:none}
section.yt-game.gt-fullscreen-play :is(.mi-board,.kd-board) .gt-play-controls{top:auto;bottom:61px;left:8px;right:8px;padding:7px;border:2px solid #8fb5cc;border-radius:12px;background:#14364ce8;color:#fff7dc;max-height:34dvh}
section#mathInvaderScreen.yt-game.gt-fullscreen-play .mi-controls .mi-pad{grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;margin:3px 0}
section#mathInvaderScreen.yt-game.gt-fullscreen-play .mi-controls .mi-pad button{min-height:42px;padding:2px}
section#mathInvaderScreen.yt-game.gt-fullscreen-play .mi-instruction,section#kanjiDefenseScreen.yt-game.gt-fullscreen-play .kd-instruction{top:193px;left:9px;right:9px;margin:0;padding:4px 8px;border-radius:7px;background:#132f3ad9;color:#fff8dd;font-size:12px;min-height:25px}
section#kanjiDefenseScreen.yt-game.gt-fullscreen-play .kd-instruction{top:207px}
section#mathInvaderScreen.yt-game.gt-fullscreen-play{background:repeating-linear-gradient(90deg,transparent 0 calc(33.333% - 1px),#718faf55 calc(33.333% - 1px) 33.333%),linear-gradient(#172f49,#496b85)}
section#kanjiDefenseScreen.yt-game.gt-fullscreen-play{background:linear-gradient(#88c7ec 0%,#d8f1d0 72%,#76583d 73%,#3c2b20 100%)}
section#mathInvaderScreen.yt-game.gt-fullscreen-play .mi-board,section#kanjiDefenseScreen.yt-game.gt-fullscreen-play .kd-board{position:fixed;inset:auto 0 auto;width:100vw;overflow:visible;border:0;border-radius:0;box-shadow:none;background:transparent}
section#mathInvaderScreen.yt-game.gt-fullscreen-play .mi-board{top:250px;height:max(60px,calc(100dvh - 570px))!important}
section#kanjiDefenseScreen.yt-game.gt-fullscreen-play .kd-board{top:255px;height:max(70px,calc(100dvh - 475px))!important}
section.yt-game.gt-fullscreen-play :is(.mi-board,.kd-board) .gt-in-world,section.yt-game.gt-fullscreen-play :is(.mi-board,.kd-board) .gt-world-actions{position:fixed}
section#mathInvaderScreen.yt-game.gt-fullscreen-play .mi-board::after{bottom:0}
section#kanjiDefenseScreen.yt-game.gt-fullscreen-play .kd-board::after{bottom:0}
section#mathInvaderScreen.yt-game.gt-fullscreen-play .mi-board .gt-board-actor,section#kanjiDefenseScreen.yt-game.gt-fullscreen-play .kd-board .gt-board-actor{bottom:0!important}
section.yt-game.gt-fullscreen-play .gt-result:not([hidden]),section.yt-game.gt-fullscreen-play .mi-result:not([hidden]),section.yt-game.gt-fullscreen-play .kd-result:not([hidden]){background:#fffaf0;color:#17362f}
@media(max-height:680px){section.yt-game.gt-fullscreen-play .gt-play-controls{top:180px;bottom:53px}section.yt-game.gt-fullscreen-play .gt-hud{top:112px}section.yt-game.gt-fullscreen-play :is(.ms-progress,.ec-progress,.so-progress,.tc-progress,.ac-progress,.mi-hud,.kd-hud){top:150px}section#sentenceOrderScreen.yt-game.gt-fullscreen-play .so-chunks{flex-shrink:0;max-height:160px;min-height:126px}section#sentenceOrderScreen.yt-game.gt-fullscreen-play .so-chunk{min-height:43px;padding-block:5px}}
@media(max-width:360px){section.yt-game.gt-fullscreen-play header{flex-wrap:nowrap!important}section.yt-game.gt-fullscreen-play header h1{font-size:16px!important;min-width:0}section.yt-game.gt-fullscreen-play header button{min-width:44px!important;min-height:42px!important;padding:3px!important;font-size:10px!important}section.yt-game.gt-fullscreen-play .gt-header-actions{display:flex;gap:3px;flex:none}}
@media(min-width:600px){section#mathInvaderScreen.yt-game.gt-fullscreen-play .mi-controls{left:50%;right:auto;width:min(calc(100vw - 16px),520px);transform:translateX(-50%)}}
.gt-build-review{margin:10px 0;padding:10px;border:1px solid #a4b8a8;border-radius:10px;background:#fffaf0;text-align:center}.gt-build-review .gt-build-open{min-height:48px;font-size:15px!important;font-weight:700}.gt-build-review p.gt-build-note{font-size:12px;margin:6px 0 0}.gt-build-review p.gt-build-count{font-size:12px;margin:0 0 4px;color:#4b5d52}.gt-build-review p.gt-build-prompt{font-size:16px;font-weight:700;margin:4px 0}.gt-build-review p.gt-build-sentence{font-size:15px;margin:4px 0}.gt-build-sentence b{color:#b4441c;font-size:18px;padding:0 2px}.gt-build-slots,.gt-build-tiles{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:8px 0}.gt-build-slot,.gt-build-tile{min-width:46px;min-height:50px;font-size:24px;font-weight:700;border-radius:9px;border:2px solid #7d9585;background:#fff;color:#1f2d24;cursor:pointer;padding:0 6px}.gt-build-slot{border-style:dashed;background:#f2f6f1}.gt-build-slot:disabled{cursor:default;color:#1f2d24;opacity:1}.gt-build-tile:disabled{opacity:.3;cursor:default}.gt-build-tile[data-hint=true]{border-color:#e0a100;background:#fff3c4;box-shadow:0 0 0 4px #ffd75e;animation:gt-build-glow 1.1s ease-in-out infinite alternate}.gt-build-slot:focus-visible,.gt-build-tile:focus-visible{outline:3px solid #19766d;outline-offset:2px}.gt-build-review[data-status=solved] .gt-build-slot{border-style:solid;border-color:#28734a;background:#d9efdf}.gt-build-review p.gt-build-say{font-size:14px;min-height:1.5em;margin:6px 0}.gt-build-review[data-status=done] .gt-build-prompt{color:#165e4e}@keyframes gt-build-glow{to{box-shadow:0 0 0 7px #ffe9a3}}@media (prefers-reduced-motion:reduce){.gt-build-tile[data-hint=true]{animation:none}}.gt-build-review[data-script=equation] .gt-build-slots{flex-wrap:nowrap;gap:4px}.gt-build-review[data-script=equation] .gt-build-slot{min-width:36px;padding:0 3px}.gt-build-review p.gt-build-hint{font-size:12px;margin:2px 0 4px;color:#4b5d52;line-height:1.5}.gt-build-review[data-frame=true] .gt-build-slots{align-items:flex-end;gap:4px 6px}.gt-build-group{display:inline-flex;flex-direction:column;align-items:center;gap:2px}.gt-build-group-slots{display:flex;gap:3px}.gt-build-kanji{font-size:16px;font-weight:700;color:#b4441c;line-height:1.2}.gt-build-fixed{font-size:22px;font-weight:700;color:#4b5d52;padding:0 1px 12px}.gt-build-review[data-frame=true] .gt-build-slot{min-width:38px;padding:0 3px}
.gt-sticker-notice{margin:8px auto;padding:8px 12px 8px 44px;max-width:28em;border-radius:12px;background:#fff6d6;color:#3a2a00;font-weight:800;position:relative;text-align:left}.gt-sticker-notice::before{content:'';position:absolute;left:10px;top:50%;width:24px;height:24px;margin-top:-12px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff,#c9d2d9 60%,#8d99a3)}.gt-sticker-notice[data-tier=gold]::before{background:radial-gradient(circle at 35% 30%,#fff8d6,#ffd34d 55%,#c98d00)}.gt-sticker-notice[data-tier=review]::before{background:conic-gradient(#ff6b6b,#ffd43b,#51cf66,#4dabf7,#b197fc,#ff6b6b)}
.gt-sticker-notice[data-tier=outfit]::before{background:radial-gradient(circle at 35% 30%,#fff,#ffc2d4 60%,#e05780)}
.gt-sticker-notice[data-tier=secret]::before{background:radial-gradient(circle at 35% 30%,#fff,#b7d7ff 60%,#3d7bd9)}
.gt-sticker-notice[data-tier=title]::before{background:radial-gradient(circle at 35% 30%,#fff,#ffd6a5 55%,#f08c00)}
.gt-party-notice{margin:6px auto;max-width:28em;font-size:14px;line-height:1.5;font-weight:700;color:#5a3d00}
.gt-move-toast{position:fixed;left:50%;top:118px;transform:translateX(-50%);z-index:40;margin:0;max-width:min(92vw,30em);padding:8px 16px;border-radius:999px;background:#fff3cf;color:#4a3200;border:2px solid #d99a00;font-weight:800;font-size:15px;line-height:1.4;text-align:center;pointer-events:none;box-shadow:0 4px 0 #0002}

/* パーティ: the supporters beside the companion name in the HUD (2026-10-03) */
.gt-party{display:inline-flex;gap:2px;align-items:center;flex:none}
.gt-party .gt-party-face{width:26px;height:26px;display:inline-block;overflow:hidden;border-radius:6px;background:#ffffff22}
.gt-party .gt-party-face img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}
.gt-party .gt-party-face .gt-image-fallback{font-size:8px}
.gt-party.gt-party-side{position:absolute;right:-2px;bottom:-2px;gap:0;pointer-events:none;z-index:1}
.gt-party.gt-party-side .gt-party-face{width:40%;max-width:26px;min-width:16px;height:auto;aspect-ratio:1;background:transparent;filter:drop-shadow(0 1px 0 #000a)}
.gt-buddy-wrap{display:contents}
