/* Only phone-sized touch devices in landscape receive this alternate layout. */
body.phone-overlay-v258 .play{--game-stage-width:min(100vw,calc(100dvh * 1.8285714));grid-template-rows:minmax(0,1fr)!important}
body.phone-overlay-v258 .viewport{grid-row:1!important;width:var(--game-stage-width)!important;align-self:center}
body.phone-overlay-v258 #dialogueDock{position:absolute!important;grid-row:auto!important;z-index:60;left:50%;bottom:max(12px,calc((100dvh - var(--game-stage-width) / 1.8285714) / 2 + 12px));transform:translateX(-50%);width:calc(var(--game-stage-width) - 40px)!important;height:112px!important;max-height:40dvh;padding:0!important;background:transparent!important;pointer-events:none}
body.phone-overlay-v258 #dialogueDock>*{pointer-events:auto}
body.phone-overlay-v258 #dialogueDock>.dialogue-idle{display:none!important}
body.phone-overlay-v258 #dialogueDock>#dialog{inset:0!important;width:100%!important;height:100%!important;padding:8px 12px!important;grid-template-columns:58px minmax(0,1fr)!important;gap:10px!important;background:#fff9e9f2!important}
body.phone-overlay-v258 #dialogueDock #portrait{width:58px!important;height:88px!important}
body.phone-overlay-v258 #dialogueDock>#dialog>.speech{padding:0!important;grid-template-rows:18px minmax(0,1fr) 28px!important;gap:2px!important}
body.phone-overlay-v258 #dialogueDock #speaker{font-size:14px!important}
body.phone-overlay-v258 #dialogueDock #line{font-size:15px!important;line-height:1.45!important;max-height:44px!important;overflow:hidden!important;margin:0!important}
body.phone-overlay-v258 #dialogueDock #nextLine{min-width:98px!important;min-height:26px!important;padding:3px 8px!important;font-size:12px!important}
body.phone-overlay-v258 .bottom-hud{display:none!important}
body.phone-overlay-v258 #defenseDockV142{inset:auto 0 0!important;width:100%!important;height:102px!important;padding:8px!important;grid-template-columns:1fr!important;grid-template-rows:1fr!important;gap:0!important;display:none!important;background:#fff9e9f5!important}
body.phone-overlay-v258.phone-defense-open-v258 #defenseDockV142{display:grid!important}
body.phone-overlay-v258 #defenseDockV142 .defense-tools{grid-row:1!important;grid-column:1!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:12px!important;margin:0!important;padding:0!important}
body.phone-overlay-v258 #defenseDockV142 .defense-choice-v146{display:flex!important;gap:6px!important;flex:0 1 auto!important;min-width:0!important}
body.phone-overlay-v258 #defenseDockV142 .defense-copy-v146{display:none!important}
body.phone-overlay-v258 #defenseDockV142 .defense-orders{display:flex!important;gap:6px!important;margin-left:4px!important}
body.phone-overlay-v258 #defenseDockV142 :is(#unit-guard,#unit-scout,#unit-supply,#defenseSpeedV122,#defensePowerV122){width:64px!important;min-width:64px!important;max-width:64px!important;height:74px!important;flex:0 0 64px!important;margin:0!important;padding:3px!important}
body.phone-overlay-v258 #defenseDockV142 .defense-unit-art{width:52px!important;height:62px!important;flex-basis:52px!important}
body.phone-overlay-v258 #defenseDockV142 .defense-detail-v142{display:none!important}
body.phone-overlay-v258 #phoneDefenseToggleV258{position:absolute;left:24px;top:24px;z-index:80;min-width:78px!important;min-height:36px!important;padding:4px 9px!important;font-size:13px!important}
body.phone-overlay-v258 .defense-field>#defenseMoneyV119{position:absolute!important;right:26px!important;top:24px!important;z-index:79!important;pointer-events:none}
body.phone-overlay-v258 #dialogueDock:has(#endingDockV167){height:102px!important}
body.phone-overlay-v258 #endingDockV167{inset:0!important;padding:8px!important}
body.phone-overlay-v258:has(#dialog:not(.hidden)) #mobileInputV207{visibility:hidden!important}
body.phone-overlay-v258.phone-defense-open-v258 #defenseReset{visibility:hidden!important}
body.phone-overlay-v258 #defenseDockV142 :is(#unit-guard,#unit-scout,#unit-supply){flex-direction:column!important;gap:0!important}
body.phone-overlay-v258 #defenseDockV142 :is(#unit-guard,#unit-scout,#unit-supply)::after{font-size:11px;line-height:14px;white-space:nowrap}
body.phone-overlay-v258 #unit-guard::after{content:'궁수 · 4'}
body.phone-overlay-v258 #unit-scout::after{content:'척후 · 3'}
body.phone-overlay-v258 #unit-supply::after{content:'보급 · 4'}
body.phone-overlay-v258 #defenseDockV142 .defense-unit-art{height:48px!important;flex-basis:48px!important}
/* V259: a single illustrated chapter scroll, then an unobstructed phone scene. */
body.phone-overlay-v258 .viewport>.chapter-label{display:none!important}
body.phone-overlay-v258 #chapterIntro{background:#17232270!important;backdrop-filter:none!important;overflow:hidden!important;justify-content:center!important;align-items:center!important;padding:24px!important}
body.phone-overlay-v258 #chapterIntro>*:not(#enterChapter){display:none!important}
body.phone-overlay-v258 #chapterIntro #enterChapter{position:relative;isolation:isolate;display:flex!important;align-items:center;justify-content:center;width:min(540px,90%)!important;min-width:0!important;max-width:none!important;min-height:146px!important;height:auto!important;margin:0!important;padding:30px 64px!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;color:#59452e!important;font-size:clamp(24px,4vw,34px)!important;line-height:1.45!important;word-break:keep-all;white-space:normal;transform:none!important}
body.phone-overlay-v258 #chapterIntro #enterChapter::before{content:'';position:absolute;inset:0;z-index:-1;border-style:solid;border-color:transparent;border-width:0 52px;border-image-source:url('assets/chapter-scroll-v60.0366965253cf.webp');border-image-slice:0 120 fill;border-image-repeat:stretch;pointer-events:none}
body.phone-overlay-v258 #chapterIntro #enterChapter:active{filter:brightness(.96)}
body.phone-overlay-v258 #chapterIntro #enterChapter:focus-visible{outline:2px solid #fff9e9;outline-offset:6px}
