/* Arked Khandaq: responsive controls and a readable, scrollable game shell. */
body.adventure-mode:has(#khGame)>main{max-width:none;width:100%;height:100dvh;margin:0;padding:0;overflow:hidden}
#khGame{height:100dvh;display:flex;flex-direction:column;gap:6px;padding:max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));color:#17483d;background:linear-gradient(#d9efdf,#fff8e7);font-family:Nunito,system-ui,sans-serif}
#khGame *{box-sizing:border-box}#khHeader{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px}#khHeader h1{font:900 clamp(16px,3vw,23px)/1.1 Nunito,sans-serif;letter-spacing:0;margin:0}#khHeader button,#khControls button{min-width:48px;min-height:48px;border-radius:16px;font-weight:900}#khExit{padding:6px 12px}#khHud{display:flex;justify-content:center;align-items:center;gap:clamp(8px,3vw,28px);font-weight:900;font-size:clamp(14px,2vw,16px)}#khHearts{color:#d95668;letter-spacing:2px}#khSegment{font-size:14px;font-weight:800;text-align:center}#khProgress{width:min(100%,450px);height:7px;margin:auto;accent-color:#32885e}#khObjective{min-height:22px;margin:0;text-align:center;font-weight:800;font-size:clamp(13px,2vw,15px);line-height:1.35}#khViewport{position:relative;flex:1;min-height:120px;max-height:calc(100dvh - 155px);overflow:hidden;border:2px solid #e5c688;border-radius:18px;background:#d5e5cf;box-shadow:0 3px 0 #9f805066}#khCanvas{width:100%;height:100%}#khCanvas canvas{display:block;margin:auto}#khControls{display:flex;justify-content:space-between;align-items:center;gap:12px}#khControls>div{display:flex;gap:8px}#khControls button{background:#fffdf2e8;border:2px solid #b9d7c2;color:#235e49;font-size:21px;touch-action:none;user-select:none;-webkit-user-select:none}#khControls button.pressed{background:#ffdc7b;transform:none}#khJump{padding:6px 15px!important;font-size:15px!important;background:#ffdc7b!important;border-color:#e4bd61!important}#khFeedback{position:absolute;inset:0;display:grid;place-items:center;background:#23473c99;z-index:3;padding:12px}#khFeedback[hidden]{display:none}#khFeedback>div{width:min(420px,100%);max-height:100%;overflow:auto;padding:20px;text-align:center;border-radius:22px;background:#fff9e9;box-shadow:0 14px 40px #142f2b55}#khFeedback h2{font:900 24px/1.2 Nunito,sans-serif;margin:0 0 8px}#khFeedback p{line-height:1.4;margin:8px 0}#khFeedback button{min-height:46px;border-radius:99px;margin:5px;background:#ffdb7d;color:#624815}
.kh-header-actions{display:flex;align-items:center;gap:6px;flex-shrink:0}#khHeader h1{min-width:0}#khSound{padding:4px;font-size:19px}
.kh-dialog{text-align:center;max-width:500px;margin:auto}.kh-dialog h2{margin:6px 0 12px}.kh-dialog p{line-height:1.4}.kh-dialog button{min-height:44px}.kh-options{display:grid;gap:8px}.kh-options button{text-align:left}.kh-correct{background:#d9f2dc!important}.kh-wrong{background:#ffe2dc!important}#khQuizFeedback{font-weight:800;line-height:1.45}#khQuizContinue{margin-top:8px}.kh-modal-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}
@media(orientation:landscape) and (max-height:550px){#khGame{gap:2px;padding-block:4px}#khHeader{min-height:44px}#khObjective{font-size:13px;min-height:18px}#khSegment{font-size:13px}#khViewport{max-height:none}#khControls{position:absolute;bottom:max(8px,env(safe-area-inset-bottom));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));pointer-events:none;z-index:2}#khControls>div,#khControls button{pointer-events:auto}#khHud{font-size:14px}#khFeedback>div{padding:10px}}

/* Match the shared arcade play surface: the world fills the viewport and
   the HUD and touch controls float above it, without concealing the route. */
body.adventure-mode #khGame{position:relative;display:block;width:100%;height:100dvh;padding:0;overflow:hidden;background:#e7f1df}
body.adventure-mode #khViewport{position:absolute;inset:0;width:100%;height:100%;min-height:0;max-height:none;border:0;border-radius:0;box-shadow:none}
body.adventure-mode #khCanvas{position:absolute;inset:0;width:100%;height:100%}
body.adventure-mode #khHud{position:absolute;z-index:4;top:calc(10px + max(env(safe-area-inset-top,0px),var(--jejak-app-inset-top,0px)));left:calc(14px + max(env(safe-area-inset-left,0px),var(--jejak-app-inset-left,0px)));right:calc(14px + max(env(safe-area-inset-right,0px),var(--jejak-app-inset-right,0px)));display:flex;justify-content:flex-end;align-items:center;gap:8px;min-height:28px;font:900 12px/1 Nunito,system-ui,sans-serif;color:#553c26;text-shadow:0 1px 2px #fff9e8;pointer-events:none}
body.adventure-mode #khHearts{margin-right:auto;color:#e95356;font-size:22px;letter-spacing:1px;white-space:nowrap;text-shadow:0 1px 1px #fff7df}
body.adventure-mode #khScrollCount{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:100px;height:44px;min-height:44px;padding:0;border:0;background:none;box-shadow:none;color:#62401e;text-shadow:0 1px #fff8dc;white-space:nowrap}
body.adventure-mode #khScrollCount svg{position:absolute;inset:0;width:100%;height:100%;filter:drop-shadow(0 2px 1px #72511d35)}
body.adventure-mode #khScrollCount b{position:relative;padding-left:13px;font-size:12px}
@media(max-width:420px){body.adventure-mode #khScrollCount{width:84px}body.adventure-mode #khScrollCount b{font-size:11px;padding-left:10px}}
body.adventure-mode #khPoints{white-space:nowrap}
body.adventure-mode #khSegment{position:absolute;z-index:4;top:calc(8px + max(env(safe-area-inset-top,0px),var(--jejak-app-inset-top,0px)));left:calc(78px + max(env(safe-area-inset-left,0px),var(--jejak-app-inset-left,0px)));max-width:calc(100% - 232px);overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;color:#553c26;text-shadow:0 1px 2px #fff9e8;font:900 11px/1.2 Nunito,system-ui,sans-serif;pointer-events:none}
body.adventure-mode #khProgress{position:absolute;z-index:4;top:calc(29px + max(env(safe-area-inset-top,0px),var(--jejak-app-inset-top,0px)));left:calc(78px + max(env(safe-area-inset-left,0px),var(--jejak-app-inset-left,0px)));width:min(140px,calc(100% - 265px));height:8px;margin:0;appearance:none;overflow:hidden;border:1px solid #a77e40;border-radius:9px;background:#fff0cc;box-shadow:inset 0 1px 2px #89683b66;pointer-events:none}
body.adventure-mode #khProgress::-webkit-progress-bar{background:#fff0cc}body.adventure-mode #khProgress::-webkit-progress-value{background:linear-gradient(#ffe895,#e7ab37)}body.adventure-mode #khProgress::-moz-progress-bar{background:linear-gradient(#ffe895,#e7ab37)}
/* Keep the exit and audio controls reachable while the start or retry panel is open. Native quiz dialogs remain above this layer. */
body.adventure-mode #khHeader{position:absolute;z-index:9;top:calc(54px + max(env(safe-area-inset-top,0px),var(--jejak-app-inset-top,0px)));right:calc(12px + max(env(safe-area-inset-right,0px),var(--jejak-app-inset-right,0px)));display:block;min-height:0;pointer-events:none}
body.adventure-mode #khHeader h1{display:none}
body.adventure-mode .kh-header-actions{display:flex;align-items:center;gap:7px;pointer-events:auto}
body.adventure-mode #khHeader button{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;min-height:44px;padding:9px;border:1.5px solid #e8b953;border-radius:50%;background:linear-gradient(#fff9e3,#f4e1aa);color:#4c6250;box-shadow:0 3px 0 #a97831,0 5px 9px #604d2a2b,inset 0 1px 0 #fff;transition:none}
body.adventure-mode #khHeader button[hidden]{display:none!important}
body.adventure-mode #khHeader button:hover:not(:disabled){transform:none;background:#fff5d2}
body.adventure-mode #khHeader button svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
body.adventure-mode #khObjective{position:absolute;z-index:4;top:calc(105px + max(env(safe-area-inset-top,0px),var(--jejak-app-inset-top,0px)));left:calc(12px + max(env(safe-area-inset-left,0px),var(--jejak-app-inset-left,0px)));right:calc(12px + max(env(safe-area-inset-right,0px),var(--jejak-app-inset-right,0px)));min-height:0;margin:0;text-align:center;color:#553c26;text-shadow:0 1px 2px #fff9e8;font:800 12px/1.3 Nunito,system-ui,sans-serif;pointer-events:none}
body.adventure-mode #khControls{position:absolute;z-index:4;bottom:calc(14px + max(env(safe-area-inset-bottom,0px),var(--jejak-app-inset-bottom,0px)));left:calc(16px + max(env(safe-area-inset-left,0px),var(--jejak-app-inset-left,0px)));right:calc(16px + max(env(safe-area-inset-right,0px),var(--jejak-app-inset-right,0px)));display:flex;align-items:flex-end;justify-content:space-between;gap:12px;pointer-events:none}
body.adventure-mode #khControls>div{display:flex;gap:8px;padding:6px;border:1px solid #fff5dca6;border-radius:23px;background:#fff8e3c9;box-shadow:0 3px 14px #32291924;backdrop-filter:blur(5px);pointer-events:auto}
body.adventure-mode #khControls button{display:flex;align-items:center;justify-content:center;width:60px;height:58px;min-width:60px;min-height:58px;padding:12px;border:1.5px solid #d7f2d5;border-radius:17px;background:linear-gradient(150deg,#219b87,#087467 68%,#08655e);color:#fff9dc;box-shadow:0 5px 0 #084e46,0 8px 12px #23362c26,inset 0 1px 0 #ffffff66;font:800 14px/1 Nunito,system-ui,sans-serif;transition:none;pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none}
body.adventure-mode #khControls button:hover:not(:disabled){transform:none}
body.adventure-mode #khLeft,body.adventure-mode #khRight{font-size:0!important}
body.adventure-mode #khLeft::before,body.adventure-mode #khRight::before{font:900 31px/1 Nunito,system-ui,sans-serif;text-shadow:0 1px 0 #003f3840}
body.adventure-mode #khLeft::before{content:'←'}body.adventure-mode #khRight::before{content:'→'}
body.adventure-mode #khControls #khJump{width:auto;min-width:124px;height:64px;padding:12px 20px!important;border:1.5px solid #fff1b8;border-radius:20px;background:linear-gradient(155deg,#ffe798,#ffd163 65%,#edbb4b)!important;color:#64400f;box-shadow:0 5px 0 #ae7422,0 8px 14px #52381529,inset 0 1px 0 #fff9d9;font:900 15px/1 Nunito,system-ui,sans-serif!important}
body.adventure-mode #khControls button.pressed{transform:translateY(3px);background:linear-gradient(150deg,#0e8274,#075f57);box-shadow:0 2px 0 #084e46,inset 0 2px 5px #003c3440}
body.adventure-mode #khControls #khJump.pressed{background:linear-gradient(155deg,#f9d575,#eebf4d)!important;box-shadow:0 2px 0 #ae7422,inset 0 2px 5px #a16a1930}
body.adventure-mode #khControls button:focus-visible,body.adventure-mode #khHeader button:focus-visible{outline:3px solid #fff9dc;outline-offset:4px}
body.adventure-mode #khFeedback{z-index:8;background:#fff9ed4d;backdrop-filter:blur(3px)}
body.adventure-mode #khFeedback>div{border:3px solid #e5ad36;border-radius:24px;background:#fff9ed;box-shadow:0 16px 50px #503c2140;color:#553a20}
body.adventure-mode #khFeedback h2{font-family:'VAG Rounded Black',Nunito,system-ui,sans-serif;color:#583b1d}
body.adventure-mode #khFeedback button{border:1px solid #e8ae36;background:#ffd568;color:#542408;box-shadow:0 4px 0 #b97a20;font-weight:900}
body.adventure-mode dialog#dialog:has(.kh-dialog){width:min(620px,94vw);max-height:94dvh;padding:26px;border:3px solid #e5ad36!important;border-radius:24px!important;background:#fff9ed!important}
body.adventure-mode .kh-dialog h2{color:#16493f!important;line-height:1.25}
body.adventure-mode .kh-options button{text-align:left;background:#fffdf6;border:2px solid #d8b36c;border-radius:15px;padding:12px 15px;min-height:48px;color:#473323}
body.adventure-mode .kh-options button.kh-correct{background:#d5f1dc!important;border-color:#258b5b;color:#185d3b;opacity:1}
body.adventure-mode .kh-options button.kh-wrong{background:#ffe2cd!important;border-color:#c66b3c;opacity:1}
body.adventure-mode #khQuizFeedback{padding:10px 12px;border-radius:12px;background:#ffefbf;color:#594323}
body.adventure-mode #khQuizContinue{width:100%;min-height:46px;background:#ffd568;color:#542408;border-color:#dca741;box-shadow:0 3px 0 #ad761f}
/* Use the Arked 4 question-first layout; show the learning note after an answer. */
body.adventure-mode #khQuiz{max-width:none;text-align:left}
body.adventure-mode #khQuiz h2{font-size:clamp(21px,3vw,29px);margin:10px 0;line-height:1.25}
body.adventure-mode #khQuizFeedback{font-size:14px;font-weight:400;line-height:1.5;margin:12px 0}
body.adventure-mode #khQuizInfo{font-size:14px;line-height:1.45;margin:8px 0}
body.adventure-mode #khQuizSource{font-size:11px;line-height:1.4;margin:10px 0 0;color:#65746b}
/* The answer choices and the learning feedback are successive states of the
   same question. This leaves room for the full note and source on phones. */
body.adventure-mode #khQuizOptions[hidden],body.adventure-mode #khQuizHint[hidden]{display:none}
body.adventure-mode #khQuizSource:not([hidden]){margin-bottom:8px}
/* Center the quiz inside the device's actual safe area, including the inset
   supplied by the Android shell in landscape. */
body.adventure-mode dialog#dialog:has(#khQuiz){
 inset:max(6px,env(safe-area-inset-top,0px),var(--jejak-app-inset-top,0px)) max(6px,env(safe-area-inset-right,0px),var(--jejak-app-inset-right,0px)) max(6px,env(safe-area-inset-bottom,0px),var(--jejak-app-inset-bottom,0px)) max(6px,env(safe-area-inset-left,0px),var(--jejak-app-inset-left,0px));
 max-width:calc(100vw - max(6px,env(safe-area-inset-left,0px),var(--jejak-app-inset-left,0px)) - max(6px,env(safe-area-inset-right,0px),var(--jejak-app-inset-right,0px)));
 max-height:calc(100dvh - max(6px,env(safe-area-inset-top,0px),var(--jejak-app-inset-top,0px)) - max(6px,env(safe-area-inset-bottom,0px),var(--jejak-app-inset-bottom,0px)));
 margin:auto;
}
@media(max-height:450px){
 body.adventure-mode #khQuiz h2{font-size:19px;line-height:1.2;margin:5px 0}
 body.adventure-mode #khQuizFeedback{font-size:12px;line-height:1.3;margin:5px 0;padding:6px 9px}
 body.adventure-mode #khQuizInfo{font-size:12px;line-height:1.3;margin:5px 0}
 body.adventure-mode #khQuizContinue{min-height:44px;padding:7px 10px}
 body.adventure-mode #khQuizSource{font-size:11px;line-height:1.25;margin:5px 0 6px;padding:0;border:0}
}
@media(min-width:500px) and (max-height:450px){body.adventure-mode #khQuiz .kh-options{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}body.adventure-mode #khQuiz .kh-options button{min-height:58px;text-align:center}}
@media(max-width:680px){body.adventure-mode #khControls{left:calc(12px + max(env(safe-area-inset-left,0px),var(--jejak-app-inset-left,0px)));right:calc(12px + max(env(safe-area-inset-right,0px),var(--jejak-app-inset-right,0px)));bottom:calc(12px + max(env(safe-area-inset-bottom,0px),var(--jejak-app-inset-bottom,0px)))}body.adventure-mode #khControls button{width:56px;min-width:56px;height:56px;min-height:56px}body.adventure-mode #khControls #khJump{min-width:112px;height:62px;padding-inline:16px!important}}
/* On narrow portrait screens, give the mission its own line so the full
   status and progress never run underneath the scroll counter. */
@media(max-width:680px) and (orientation:portrait){body.adventure-mode #khSegment{top:calc(45px + max(env(safe-area-inset-top,0px),var(--jejak-app-inset-top,0px)));left:calc(14px + max(env(safe-area-inset-left,0px),var(--jejak-app-inset-left,0px)));max-width:calc(100% - 28px)}body.adventure-mode #khProgress{top:calc(62px + max(env(safe-area-inset-top,0px),var(--jejak-app-inset-top,0px)));left:calc(14px + max(env(safe-area-inset-left,0px),var(--jejak-app-inset-left,0px)));width:140px}body.adventure-mode #khHeader{top:calc(79px + max(env(safe-area-inset-top,0px),var(--jejak-app-inset-top,0px)))}body.adventure-mode #khObjective{top:calc(132px + max(env(safe-area-inset-top,0px),var(--jejak-app-inset-top,0px)))}}
@media(max-height:450px){body.adventure-mode #khControls{bottom:calc(10px + max(env(safe-area-inset-bottom,0px),var(--jejak-app-inset-bottom,0px)))}body.adventure-mode #khControls>div{padding:5px;gap:7px}body.adventure-mode #khControls button{width:52px;min-width:52px;height:50px;min-height:50px;border-radius:15px}body.adventure-mode #khControls #khJump{height:56px;min-width:114px;padding-inline:16px!important}body.adventure-mode #khObjective{top:calc(102px + max(env(safe-area-inset-top,0px),var(--jejak-app-inset-top,0px)))}body.adventure-mode dialog#dialog:has(.kh-dialog){padding:17px 22px}.kh-options{gap:6px}.kh-options button{min-height:44px!important;padding:7px 12px!important;font-size:13px}}
@media(max-width:680px) and (orientation:portrait) and (max-height:450px){body.adventure-mode #khObjective{top:calc(132px + max(env(safe-area-inset-top,0px),var(--jejak-app-inset-top,0px)))}}

/* Match the carved jade-and-gold controls used by Arked 4. */
body.adventure-mode #khControls{
 bottom:calc(clamp(40px,8svh,76px) + max(env(safe-area-inset-bottom,0px),var(--jejak-app-inset-bottom,0px)));
 left:max(16px,env(safe-area-inset-left,0px));right:max(20px,env(safe-area-inset-right,0px));
}
body.adventure-mode #khControls>div{padding:0;border:0;border-radius:0;background:none;box-shadow:none;backdrop-filter:none;gap:8px}
body.adventure-mode #khControls :is(#khLeft,#khRight,#khJump){
 border:2px solid #e9c675;border-color:#e9c675!important;border-radius:50%;
 background:radial-gradient(circle at 35% 22%,#438f80,#22685d 55%,#124a43)!important;
 color:#fff1c5;box-shadow:inset 0 0 0 3px #153f394d,inset 0 3px 3px #fff1c540,0 4px 0 #82612f,0 6px 12px #2c322b40;
 opacity:.95;text-shadow:0 1px 2px #173c35;transition:box-shadow .1s,filter .1s;
}
body.adventure-mode #khControls :is(#khLeft,#khRight){width:64px;height:64px;min-width:64px;min-height:64px;padding:12px}
body.adventure-mode #khControls :is(#khLeft,#khRight)::before{content:none}
body.adventure-mode #khControls button svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;flex:none}
body.adventure-mode #khControls #khJump{width:88px;min-width:88px;height:88px;min-height:88px;padding:10px!important;flex-direction:column;gap:6px;font:800 13px/1 Nunito,system-ui,sans-serif!important}
body.adventure-mode #khControls #khJump svg{width:31px;height:31px}
body.adventure-mode #khControls :is(#khLeft,#khRight,#khJump).pressed{
 transform:translateY(3px);background:radial-gradient(circle at 35% 22%,#327366,#174f46)!important;
 box-shadow:inset 0 2px 6px #102f3970,inset 0 0 0 3px #153f394d,0 1px 0 #82612f;
}
@media(max-width:680px){
 body.adventure-mode #khControls{left:max(14px,env(safe-area-inset-left,0px));right:max(14px,env(safe-area-inset-right,0px))}
 body.adventure-mode #khControls :is(#khLeft,#khRight){width:54px;height:54px;min-width:54px;min-height:54px;padding:10px}
 body.adventure-mode #khControls #khJump{width:80px;min-width:80px;height:80px;min-height:80px;padding:8px!important;gap:5px;font-size:12px!important}
}
@media(max-height:350px){body.adventure-mode #khControls{bottom:calc(24px + max(env(safe-area-inset-bottom,0px),var(--jejak-app-inset-bottom,0px)))}}
@media(orientation:landscape) and (pointer:coarse){body.adventure-mode.arcade-phone #khControls{left:max(12px,env(safe-area-inset-left,0px));right:max(12px,env(safe-area-inset-right,0px));bottom:max(12px,env(safe-area-inset-bottom,0px))}}
@media(orientation:landscape){html.jejak-app body.adventure-mode.arcade-phone #khControls{left:calc(12px + var(--jejak-app-inset-left,0px));right:calc(12px + var(--jejak-app-inset-right,0px));bottom:calc(12px + var(--jejak-app-inset-bottom,0px))}}

/* Context action: one tap starts digging at a marked patch. */
body.adventure-mode #khControls #khDig{position:absolute;right:100px;bottom:56px;width:72px;height:72px;min-width:72px;min-height:72px;padding:8px;border:2px solid #e9c675;border-radius:50%;background:radial-gradient(circle at 35% 22%,#438f80,#22685d 55%,#124a43);color:#fff1c5;box-shadow:inset 0 0 0 3px #153f394d,inset 0 3px 3px #fff1c540,0 4px 0 #82612f,0 6px 12px #2c322b40;display:flex;flex-direction:column;gap:4px;font:800 12px/1 Nunito,system-ui,sans-serif;touch-action:manipulation}
body.adventure-mode #khControls #khDig svg{width:28px;height:28px}
body.adventure-mode #khControls #khDig:disabled{opacity:.7}
body.adventure-mode #khControls #khDig[hidden]{display:none!important}
@media(max-width:680px){body.adventure-mode #khControls #khDig{right:88px;bottom:52px;width:64px;height:64px;min-width:64px;min-height:64px}}

/* Keep game prompts compact in a short landscape WebView.  The overflow
   fallback remains available for unusually large text or very small windows. */
body.adventure-mode #khFeedback{padding:10px max(10px,var(--jejak-app-inset-right,0px)) 10px max(10px,var(--jejak-app-inset-left,0px))}
/* Keep the always-available exit/audio controls above the centred prompt,
   instead of overlapping its heading on short landscape screens. */
body.adventure-mode #khGame:has(#khFeedback:not([hidden])) #khHeader{top:calc(8px + max(env(safe-area-inset-top,0px),var(--jejak-app-inset-top,0px)))}
body.adventure-mode #khFeedback>div{width:min(520px,100%);max-height:calc(100dvh - 20px);padding:16px 20px;overflow:auto}
body.adventure-mode #khFeedback h2{font-size:clamp(20px,3.8vw,27px);line-height:1.18;margin:0 0 6px}
body.adventure-mode #khFeedback p{font-size:14px;line-height:1.35;margin:6px auto;max-width:440px}
body.adventure-mode #khFeedback button{min-height:44px;padding:8px 16px;margin:5px;font-size:14px;line-height:1.2}
body.adventure-mode #khFeedback .kh-restart-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}
body.adventure-mode dialog#dialog:has(.kh-modal-actions){width:min(620px,94vw);max-height:calc(100dvh - 20px);padding:20px 24px;overflow:auto}
body.adventure-mode .kh-dialog:has(.kh-modal-actions) h2{font-size:clamp(21px,4vw,30px);line-height:1.2;margin:0 28px 8px}
body.adventure-mode .kh-dialog:has(.kh-modal-actions) p{font-size:14px;line-height:1.35;margin:8px auto 12px;max-width:430px}
body.adventure-mode .kh-dialog:has(.kh-modal-actions) button{min-height:44px;padding:8px 16px;line-height:1.2}
body.adventure-mode .kh-dialog:has(.kh-modal-actions) #khSaveError{margin:8px 0 0}
@media(max-height:450px){
 body.adventure-mode #khFeedback>div{padding:10px 16px}
 body.adventure-mode #khFeedback h2{font-size:20px;line-height:1.15;margin:0 0 4px}
 body.adventure-mode #khFeedback p{font-size:13px;line-height:1.3;margin:4px auto}
 body.adventure-mode #khFeedback button{min-height:44px;margin:4px;font-size:13px}
 body.adventure-mode dialog#dialog:has(.kh-modal-actions){padding:12px 18px}
 body.adventure-mode .kh-dialog:has(.kh-modal-actions) h2{font-size:21px;margin:0 26px 6px}
 body.adventure-mode .kh-dialog:has(.kh-modal-actions) p{font-size:13px;line-height:1.3;margin:6px auto 8px}
 body.adventure-mode .kh-dialog:has(.kh-modal-actions) button{font-size:13px}
}
