.answer-mode-picker{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0}.answer-mode-picker button{padding:11px 18px;border:1px solid #d8cabb;background:#fffaf1;color:#89746a;border-radius:12px;font-size:15px}.answer-mode-picker button[aria-pressed=true]{background:#69536e;color:white;border-color:#69536e}.answer-mode-picker>span{font-size:13px;color:#8f808b;margin-left:8px}.choice-dock{background:#fffaf1;border:1px solid #d8cabb;border-radius:16px;padding:12px 16px;margin-top:12px}.choice-dock>p{margin:0 0 10px;font-size:15px;color:#5d495e;min-height:20px}.answer-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.answer-choices>button{min-height:48px;padding:10px 12px;font-size:16px;font-weight:700;border:1px solid #d4c3d6;border-radius:12px;color:#4d3e51;background:#fff;overflow-wrap:anywhere;line-height:1.3;touch-action:manipulation}.answer-choices>button:not(:disabled):active{background:#eee0ee;transform:scale(.98)}.answer-choices>button:disabled{opacity:.45}.answer-choices>p{grid-column:1/-1;margin:0;padding:27px;text-align:center;font-size:15px}.sky-skip-button{font-size:12px;padding:6px 10px;margin-top:8px}.sky-journey select{font-size:15px;padding:8px}.choice-dock[hidden],.answer-form[hidden],.sky-answer[hidden]{display:none!important}
/* Use the visible viewport, excluding the software keyboard, just like the K-history game. */
@media(max-width:800px),(max-height:550px){
 body[data-combat=game],body[data-combat=sky]{overflow:hidden;overscroll-behavior:none}
 body[data-combat=game]>.topbar,body[data-combat=sky]>.topbar,body[data-combat=game]>footer,body[data-combat=sky]>footer{display:none}
 body[data-combat=game] #game,body[data-combat=sky] #sky.sky-battle{position:fixed;inset:auto 0 auto;top:var(--combat-top,0px);height:var(--combat-height,100dvh);width:100%;max-width:100%;z-index:40;padding:max(5px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));margin:0;background:#faf5e8;display:flex;flex-direction:column;gap:5px;overflow:hidden;box-sizing:border-box}
 body[data-combat=game] .battle-header,body[data-combat=sky] .sky-heading{margin:0;min-height:38px;flex:none;gap:8px;align-items:center}
 body[data-combat=game] .battle-header h2,body[data-combat=sky] .sky-heading h2{font-size:16px;line-height:1.15;margin:2px 0}
 body[data-combat=game] .battle-header .eyebrow,body[data-combat=sky] .sky-heading .eyebrow{font-size:10px;letter-spacing:0}
 body[data-combat=game] .battle-actions,body[data-combat=sky] .sky-controls{display:flex;flex-direction:row;gap:5px}
 body[data-combat=game] .battle-actions button,body[data-combat=sky] .sky-controls button{font-size:11px;padding:8px;min-height:32px;white-space:nowrap}
 body[data-combat=game] .battle-stats{margin:0;padding:5px 8px;min-height:42px;gap:12px;flex:none;font-size:11px}
 body[data-combat=game] .battle-stats b{font-size:15px}body[data-combat=game] .battle-stats span,body[data-combat=game] .battle-stats label{font-size:10px}
 body[data-combat=game] #heroTrait,body[data-combat=game] #battleProgress,body[data-combat=game] #expeditionStatus,body[data-combat=game] .arena-caption,body[data-combat=game] .castle-banner{display:none}
 body[data-combat=game] #arena,body[data-combat=sky] #skyStage{height:auto;min-height:110px;max-height:none;aspect-ratio:auto;flex:1 1 0;border-radius:14px;margin:0;width:100%}
 body[data-combat=game] #answerForm,body[data-combat=sky] #skyAnswerForm{flex:none;margin:0;padding:8px;border-radius:12px}
 body[data-combat=game] #answerForm label,body[data-combat=sky] #skyAnswerForm label{font-size:12px;margin:0 0 5px}
 body[data-combat=game] #answerForm input,body[data-combat=sky] #skyAnswerForm input{font-size:18px;min-height:42px;padding:8px;line-height:1.3}
 body[data-combat=game] #answerForm button,body[data-combat=sky] #skyAnswerForm button{padding:8px;min-width:56px;font-size:13px}
 body[data-combat=game] #reveal{font-size:10px!important;min-width:40px!important}
 body[data-combat=game] #feedback,body[data-combat=sky] #skyFeedback{flex:none;min-height:18px;height:32px;overflow:auto;font-size:12px;line-height:1.35;margin:0;padding:0 4px}
 body[data-combat=game] .choice-dock,body[data-combat=sky] .choice-dock{flex:none;margin:0;padding:8px;border-radius:12px}
 body[data-combat=game] .choice-dock>p,body[data-combat=sky] .choice-dock>p{font-size:13px;line-height:1.25;margin:0 0 6px;min-height:16px;max-height:34px;overflow:auto}
 body[data-combat=game] .answer-choices,body[data-combat=sky] .answer-choices{gap:6px}
 body[data-combat=game] .answer-choices>button,body[data-combat=sky] .answer-choices>button{font-size:15px;min-height:46px;padding:7px 9px}
 body[data-combat=sky] .sky-phase-track{flex:none;margin:0;gap:5px}
 body[data-combat=sky] .sky-phase-track span{font-size:11px;padding:7px 3px}
 body[data-combat=sky] .sky-hud{flex:none;margin:0;gap:8px;align-items:center}
 body[data-combat=sky] .sky-hud>label{font-size:10px;width:115px}.sky-hud progress{height:6px}
 body[data-combat=sky] .sky-hud>div b{font-size:12px;line-height:1.3}body[data-combat=sky] #skyClock{font-size:12px}
 body[data-combat=sky] .sky-phase-bottom{flex:none;margin:0;gap:0;font-size:12px;line-height:1.2}
 body[data-combat=sky] #skyAbility{display:none}
 body[data-combat=sky] #skyStage{background-size:cover;background-position:center}
 body[data-combat=sky] .sky-question{left:3%;top:5%;width:51%;min-height:0;padding:7px 5px;border-radius:12px}
 body[data-combat=sky] .sky-question b{font-size:clamp(21px,6vw,30px);margin:4px 0;line-height:1.2}
 body[data-combat=sky] .sky-question span{font-size:17px;line-height:1.2}body[data-combat=sky] .sky-question #skyHangul{font-size:12px}
 body[data-combat=sky] .sky-question small{font-size:11px}
 body[data-combat=sky] .sky-hero{left:var(--fit-hx);top:var(--fit-hy);bottom:auto;width:var(--fit-hs);height:var(--fit-hs)}
 body[data-combat=sky] .sky-hero>span{font-size:10px;padding:3px}
 body[data-combat=sky] .sky-boss{left:var(--fit-bx);top:var(--fit-by);bottom:auto;width:var(--fit-bs);height:var(--fit-bs)}
 body[data-combat=sky] .sky-stage>.sky-boss-vital{right:3%;top:5%;width:39%;font-size:10px;padding:6px}
 body[data-combat=game] .marching.duel .hero-anchor{left:var(--fit-hx);top:var(--fit-hy);bottom:auto;width:var(--fit-hs);height:var(--fit-hs);transform:none}
 body[data-combat=game] .marching.duel .marching-actor{left:var(--fit-bx);top:var(--fit-by);bottom:auto;width:var(--fit-bs);height:var(--fit-bs);transform:none}
 body[data-combat=game] .marching.duel .marching-actor .enemy{left:var(--fit-qx);top:var(--fit-qy);bottom:auto;width:var(--fit-qw);transform:none;margin:0}
 body[data-combat=game] .marching.duel .word-panel{min-height:0;padding:7px;margin:0}
 body[data-combat=game] .marching.duel .word-panel b{font-size:25px;line-height:1.2}
 body[data-combat=game] .marching.duel .word-panel .kana{font-size:17px;margin:3px 0}
 body[data-combat=game] .marching.duel .word-panel .timer{font-size:11px!important}
 body[data-combat=game] .guardian-vital{left:0;top:calc(8px - var(--fit-by));bottom:auto;transform:none;width:var(--fit-bs);max-width:none;padding:5px;font-size:10px}
 body[data-combat=game] .guardian-vital>div{display:block;font-size:9px;line-height:12px}
 body[data-combat=game] .guardian-vital strong{float:right;font-size:11px}
 body[data-combat=game] .guardian-vital small{display:none}
 body[data-combat=game] .guardian-vital progress{height:6px;margin:3px 0}
 body[data-combat=game] .actor-label{font-size:10px;padding:3px 7px;bottom:-15px}
 body[data-combat=game] .marching:not(.duel) .hero-anchor{width:min(19vw,90px);height:25%;top:57%;left:50%;transform:translate(-50%,-50%);bottom:auto}
 body[data-combat=game] .marching:not(.duel) .marching-actor{width:48px;height:12%;}
 body[data-combat=game] .marching:not(.duel) .marching-actor .enemy{width:110px}
 body[data-combat=game] .marching:not(.duel) .word-panel{min-height:0;padding:5px 4px;margin-bottom:2px}
 body[data-combat=game] .marching:not(.duel) .word-panel b{font-size:20px;line-height:1.1}
 body[data-combat=game] .marching:not(.duel) .word-panel .kana{font-size:14px;line-height:1.1;margin:2px 0}
 body[data-combat=game] .marching:not(.duel) .word-panel .hangul{font-size:10px;line-height:1.1}
 body[data-combat=game] .marching:not(.duel) .word-panel .timer{font-size:10px;margin-top:2px;line-height:1.1}
 body[data-combat=game] .marching:not(.duel) .word-panel .pos{display:none}
 body[data-combat=game] .marching:not(.duel) [data-lane="0"]{--start-x:21%;--move-x:1%;--start-y:45%;--move-y:1%}
 body[data-combat=game] .marching:not(.duel) [data-lane="2"]{--start-x:79%;--move-x:-1%;--start-y:45%;--move-y:1%}
 body[data-combat=game] .marching:not(.duel) [data-lane="1"]{--start-x:79%;--move-x:-1%;--start-y:94%;--move-y:-2%}
 body[data-combat=game] .marching:not(.duel) [data-lane="3"]{--start-x:21%;--move-x:1%;--start-y:94%;--move-y:-2%}
 body.short-combat[data-combat] .sky-phase-track{display:none}
 body.short-combat[data-combat] .sky-question small{display:none}
 body.short-combat[data-combat] .sky-question b{font-size:22px}
 body.short-combat[data-combat] .sky-question span{font-size:15px}
 body.short-combat[data-combat] .sky-cover h2{font-size:20px;margin:0 0 5px}
 body.short-combat[data-combat] .sky-cover p{font-size:12px;line-height:1.3;margin:5px}
 body.short-combat[data-combat] .sky-cover>b{font-size:28px}
 body.short-combat[data-combat] .sky-hero{top:var(--fit-hy)}
 body.short-combat[data-combat] .sky-hud>div b{font-size:11px}
 body.short-combat[data-combat] .sky-skip-button{padding:3px 8px;margin:4px 0 0;min-height:26px}
 body.short-combat[data-combat=game] .marching:not(.duel) .word-panel .hangul{display:none}
 body.short-combat[data-combat=game] .marching:not(.duel) .word-panel .kana{display:none}
 body.short-combat[data-combat=game] .marching:not(.duel) .marching-actor{height:14%}
 body.short-combat[data-combat=game] .marching:not(.duel) .marching-actor .enemy{width:110px}
 body.tiny-combat[data-combat] .battle-header .eyebrow,body.tiny-combat[data-combat] .sky-heading .eyebrow{display:none}
 body.tiny-combat[data-combat] .answer-choices{grid-template-columns:repeat(4,minmax(0,1fr))}
 body.tiny-combat[data-combat] .answer-choices>button{font-size:12px;min-height:40px}
 body.tiny-combat[data-combat] .sky-hud>div b{display:none}
}
@media(max-width:800px),(max-height:550px){
 body[data-combat=game] #game .battle-header{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;height:39px;min-height:39px}
 body[data-combat=game] #game .battle-header>div:first-child{min-width:0;flex:1}
 body[data-combat=game] #game .battle-actions{width:auto;flex:0 0 auto;margin:0}
 body[data-combat=game] #leave{font-size:0!important;min-width:40px}
 body[data-combat=game] #leave:after{content:'후퇴';font-size:11px}
 body[data-combat=game] #hpLabel,body[data-combat=game] #objectiveLabel{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body.short-combat[data-combat=game] .marching:not(.duel) .word-panel .kana{display:block;font-size:12px}
 body.short-combat[data-combat=game] .marching:not(.duel) .word-panel .hangul{display:block;font-size:9px}
 body.short-combat[data-combat] .sky-question{padding:5px}
 body.short-combat[data-combat] .sky-question #skyKana,body.short-combat[data-combat] .sky-question #skyHangul{display:inline-block;font-size:13px;margin:0 3px;line-height:1.15}
 body.short-combat[data-combat] .sky-question b{font-size:20px;margin:3px 0}
}
@media(max-width:800px),(max-height:550px){
 body[data-combat=game] #answerForm>div{display:grid;grid-template-columns:minmax(0,1fr) 52px 40px;gap:5px;flex-wrap:nowrap}
 body[data-combat=game] #answerForm input{width:100%;min-width:0}
 body[data-combat=game] #answerForm button{width:100%;min-width:0!important;margin:0}
 body[data-combat=game] #reveal{font-size:10px!important;padding:4px!important}
 body.short-combat[data-combat=game] .marching:not(.duel) [data-lane="0"],body.short-combat[data-combat=game] .marching:not(.duel) [data-lane="2"]{--start-y:50%;--move-y:0%}
 body.short-combat[data-combat=game] .marching:not(.duel) [data-lane="1"],body.short-combat[data-combat=game] .marching:not(.duel) [data-lane="3"]{--start-y:98%;--move-y:0%}
 body.short-combat[data-combat=game] .marching:not(.duel) .word-panel .kana,body.short-combat[data-combat=game] .marching:not(.duel) .word-panel .hangul{display:inline!important;margin:0 2px!important;font-size:11px;line-height:1.15}
}
/* Duel prompts have a dedicated strip outside the illustrated battlefield. */
#duelQuestionDock,#skyQuestion.duel-question-dock,#gateQuestionDock{position:relative;inset:auto;transform:none;width:100%;min-height:0;flex:none;display:block;box-sizing:border-box;margin:8px 0;padding:0;border:0;border-radius:14px;background:#fffaf0;color:#685941;text-align:center;z-index:auto}
#duelQuestionDock[hidden]{display:none}
#duelQuestionDock .enemy{position:relative;inset:auto;transform:none;display:block;width:100%;max-width:none;padding:0;margin:0;border:0;background:none;box-shadow:none;text-align:center}
#duelQuestionDock .word-panel{display:grid;grid-template-columns:minmax(0,1fr) 145px;column-gap:18px;align-items:center;min-height:105px;margin:0;padding:10px 18px;border:1px solid #d5c19e;border-radius:14px;box-shadow:none}
#duelQuestionDock .word-panel:after{display:none}
#duelQuestionDock .pos{grid-column:1;display:block;font-size:10px;margin:0;line-height:1.3}
#duelQuestionDock b{grid-column:1;font-size:28px;line-height:1.2;overflow-wrap:anywhere}
#duelQuestionDock .kana,#duelQuestionDock .hangul{grid-column:1;display:block;font-size:15px;line-height:1.25;margin:0;overflow-wrap:anywhere}
#duelQuestionDock .hangul{font-size:11px}
#duelQuestionDock .timer{grid-column:2;grid-row:1/4;align-self:center;font-size:14px;margin:0;font-weight:800;color:#a44e42}
#duelQuestionDock progress{grid-column:2;grid-row:4;width:100%;height:5px;margin:0}
.marching.duel #targetCastle{top:3%;right:12%;width:52%;height:75%;opacity:1}
.marching.duel .castle-banner{top:4%;right:3%}
.marching.duel .guardian-vital{bottom:auto;top:calc(-1 * (100% + 14px));}
#skyQuestion.duel-question-dock,#gateQuestionDock{border:1px solid #d5c19e;padding:9px 16px;min-height:90px}
#skyQuestion.duel-question-dock b,#gateQuestionDock>b{font-size:28px;line-height:1.2;margin:2px 0;overflow-wrap:anywhere}
#skyQuestion.duel-question-dock span,#gateQuestionDock>span{font-size:16px;line-height:1.25;overflow-wrap:anywhere}
#skyQuestion.duel-question-dock small,#gateQuestionDock>small{font-size:11px}
#gateQuestionDock>strong{font-size:12px;color:#a44e42}
@media(max-width:800px),(max-height:550px){
 #duelQuestionDock,#skyQuestion.duel-question-dock,#gateQuestionDock{margin:0;border-radius:12px}
 #duelQuestionDock .word-panel{min-height:82px;padding:6px 9px;grid-template-columns:minmax(0,1fr) 83px;column-gap:8px;border-radius:12px}
 #duelQuestionDock b{font-size:24px}
 #duelQuestionDock .pos{font-size:9px}
 #duelQuestionDock .kana{font-size:15px}
 #duelQuestionDock .hangul{font-size:10px}
 #duelQuestionDock .timer{font-size:11px}
 body[data-combat=game] .marching.duel #targetCastle{top:2%;right:6%;width:68%;height:70%;opacity:1}
 #skyQuestion.duel-question-dock,#gateQuestionDock{min-height:0;padding:6px 10px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 8px;align-items:center}
 #skyQuestion.duel-question-dock>b,#gateQuestionDock>b{grid-column:1;grid-row:1/3;font-size:24px;margin:0}
 #skyQuestion.duel-question-dock>span,#gateQuestionDock>span{grid-column:2;font-size:14px}
 #skyQuestion.duel-question-dock>small{display:none}
 #gateQuestionDock>small,#gateQuestionDock>strong{grid-column:2;font-size:10px}
}
@media(max-height:520px){
 #duelQuestionDock .word-panel{min-height:68px;padding:4px 7px}
 #duelQuestionDock b{font-size:21px}
 #duelQuestionDock .pos{display:none}
 #duelQuestionDock .kana{font-size:13px}
 #duelQuestionDock .hangul{font-size:10px}
 #duelQuestionDock .timer{grid-row:1/3}
 #duelQuestionDock progress{grid-row:3}
 body[data-combat=game] #arena,body[data-combat=sky] #skyStage{min-height:85px}
 body[data-combat=game] #answerForm label{display:none}
}
/* The prompt already names the active word; keep choices for answers only. */
#game:has(#arena.duel) #gameChoiceTarget{display:none}
.marching.duel .guardian-vital{top:calc(100% + 3px);bottom:auto;padding:5px 8px}
.marching.duel .guardian-vital small{display:none}
@media(max-width:800px),(max-height:550px){body[data-combat=game] .marching.duel .guardian-vital{top:calc(100% + 3px);left:0;bottom:auto;padding:4px 6px}}
@media(max-height:520px){
 body[data-combat=game] .marching.duel .guardian-vital{display:none}
 body[data-combat=game] #feedback,body[data-combat=sky] #skyFeedback{height:18px;min-height:18px;font-size:10px}
 body[data-combat=game][data-input-mode=choice] .answer-choices{grid-template-columns:repeat(4,minmax(0,1fr))}
 body[data-combat=game][data-input-mode=choice] .answer-choices>button{font-size:12px;min-height:40px;padding:5px}
}

/* Choice result stays beside the answers. Combat and next-answer input keep running. */
.choice-feedback{display:flex;align-items:center;gap:14px;min-width:0;height:108px;box-sizing:border-box;padding:12px 16px;margin:0 0 8px;border:2px solid #a3b2ac;border-radius:14px;background:#f4f5ef;color:#304d43;overflow:auto;flex:none;text-align:left}.choice-feedback[hidden]{display:none!important}.choice-feedback[data-result=correct]{background:#e7f6e9;border-color:#277746;color:#145629}.choice-feedback[data-result=wrong]{background:#fff0e7;border-color:#b94032;color:#83271f}.choice-feedback-verdict{font-size:24px;line-height:1.25;flex:none;max-width:135px}.choice-feedback-answer{min-width:0;display:flex;flex-direction:column;gap:3px}.choice-feedback-word{font-size:17px;line-height:1.35;overflow-wrap:anywhere}.choice-feedback-meaning{font-size:27px;line-height:1.3;color:#173d32;overflow-wrap:anywhere}.choice-feedback-answer small{font-size:14px;line-height:1.3;color:#744a44}.choice-feedback-hint{font-size:16px;line-height:1.5}.choice-click-mark{position:fixed;z-index:1000;pointer-events:none;transform:translate(-50%,-50%);border:2px solid #fff;border-radius:12px;padding:7px 14px;box-shadow:0 3px 10px #132b3540;font-size:22px;line-height:1.3;font-weight:900;white-space:nowrap;animation:choice-mark .65s ease-out forwards}.choice-click-mark.is-correct{background:#226f3c;color:#fff}.choice-click-mark.is-wrong{background:#b6382b;color:#fff}@keyframes choice-mark{0%{opacity:1;transform:translate(-50%,-40%) scale(.9)}25%,75%{opacity:1;transform:translate(-50%,-60%) scale(1)}100%{opacity:0;transform:translate(-50%,-90%) scale(1)}}
@media(max-width:800px),(max-height:550px){.choice-feedback{height:100px;padding:9px 11px;gap:10px;margin:0 0 6px}.choice-feedback-verdict{font-size:20px;max-width:90px}.choice-feedback-meaning{font-size:23px}.choice-feedback-word{font-size:15px}.choice-feedback-answer small{font-size:12px}.choice-feedback-hint{font-size:14px}.choice-click-mark{font-size:19px;padding:5px 10px}}
@media(max-height:520px){.choice-feedback{height:76px;padding:5px 8px;gap:8px;margin:0 0 4px}.choice-feedback-verdict{font-size:17px}.choice-feedback-meaning{font-size:20px}.choice-feedback-word{font-size:13px}.choice-feedback-answer small{font-size:11px}.choice-feedback-hint{font-size:13px}}
@media(prefers-reduced-motion:reduce){.choice-click-mark{animation:none}}