/* V22: responsive presentation. Indoor logical grids and gameplay remain 13 × 9. */
:root{--v22-edge:#ffffff28;--v22-panel:#10283bea;--v22-gold:#ffdc92;--v22-safe-bottom:env(safe-area-inset-bottom,0px)}
.shell{max-width:1440px}.layout{grid-template-columns:minmax(0,1fr) 300px}.map-frame{padding:6px;background:#0b2131;border-color:#ffffff30}.map-stage{aspect-ratio:13/9;border:0;border-radius:13px;background:#101e2b}.map-stage #world{width:100%;height:100%;aspect-ratio:auto;object-fit:contain;background:#101e2b}.map-stage #v17MiniMap{width:64px;height:64px;aspect-ratio:1;top:62px;right:10px;bottom:auto;left:auto;opacity:.9}.site-header .brand{font-size:28px}.site-header .tagline{letter-spacing:1.4px}.site-header{margin-bottom:10px}.card{border-color:#ffffff28}.help-card{display:none}.companion-body img{object-fit:contain}.area-label{top:10px;max-width:calc(100% - 148px);font-size:11px;padding:7px 10px;pointer-events:none}.v18-clock,.v19-weather{display:none!important}.nearby-hint{bottom:12px;max-width:calc(100% - 20px);font-size:11px}.v22-toolbar{position:absolute;right:9px;top:9px;display:flex;gap:5px;z-index:7}.v22-toolbar button,.v22-nav button{background:var(--v22-panel);color:#fff6e5;border:1px solid var(--v22-edge);min-height:42px;border-radius:11px;font-size:12px;font-weight:750;padding:8px 12px;box-shadow:0 3px 12px #0004}.v22-toolbar button:hover,.v22-nav button:hover{border-color:var(--v22-gold)}.v22-nav{display:flex;gap:6px;margin-top:8px}.v22-nav button{flex:1}.v22-control-dock{position:relative;flex-shrink:0}.v22-drag{display:none}.v22-stick{display:none;width:116px;height:116px;position:relative;border-radius:50%;background:#13384bc9;border:2px solid #c4dce55e;touch-action:none;user-select:none}.v22-stick:before{content:'✦';position:absolute;inset:0;display:grid;place-items:center;color:#dbdfd955;font-size:70px}.v22-stick span{position:absolute;left:34px;top:34px;width:44px;height:44px;background:linear-gradient(#b2cccf,#538c9d);border:2px solid #e2f2e4;border-radius:50%;box-shadow:0 5px 10px #0005;pointer-events:none}.v22-joystick .move-controls{display:none}.v22-joystick .v22-stick{display:block}.v22-display-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.v22-display-grid button{min-height:48px;padding:12px;border-radius:12px;border:1px solid #7898a3;background:#22485d;color:#fff4de;font-weight:700}.v22-display-grid button[aria-pressed=true]{background:#ffdc92;color:#142b39}.v22-setting{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0;border-bottom:1px solid #ffffff20}.v22-setting select{background:#102b40;color:#fff;padding:10px;border:1px solid #7094a4;border-radius:9px;font:inherit}.v22-menu-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.v22-menu-grid button{min-height:52px;border:1px solid #7a9aa9;border-radius:12px;background:#234b60;color:#fff3d9;font-weight:750}.v22-menu-grid button:first-child{background:#ffdc92;color:#102a3c}.v22-toast{position:fixed;left:50%;bottom:calc(20px + var(--v22-safe-bottom));transform:translateX(-50%);background:#10283bf5;color:#fff1cd;border:1px solid #e4c78588;border-radius:12px;padding:12px 18px;z-index:160;max-width:90vw;font-size:13px;pointer-events:none}.modal{overscroll-behavior:contain;scroll-padding-top:70px;border:1px solid #8baab7;max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));border-radius:18px}.modal-head{top:-14px;min-height:51px}.modal-close{min-height:44px;flex-shrink:0}.modal button{min-height:44px}.modal-back{padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}.dialogue{font-size:15px;line-height:1.65}.battle-actions{position:sticky;bottom:-14px;background:#10283bf5;padding:10px 0;margin-bottom:0;z-index:4}.battle-actions button{min-height:48px}.guide-row{overflow-wrap:anywhere}.v22-reduced *,.v22-reduced *::before,.v22-reduced *::after{animation-duration:.001ms!important;transition-duration:.001ms!important}button:focus-visible,[tabindex]:focus-visible{outline:3px solid #ffe4a0;outline-offset:3px}
@media(max-width:860px){.shell{padding:8px}.layout{display:block}.right-side{display:none}.site-header{align-items:center}.site-header .brand{font-size:24px}.counters>div{font-size:11px;padding:6px}.counters .sound-btn{font-size:0;width:38px;height:38px}.counters .sound-btn:before{font-size:17px;content:'⚙'}.counters #muteBtn:before{content:'♫'}.tagline{font-size:8px}.map-stage{height:clamp(390px,64dvh,760px);aspect-ratio:auto}.map-frame{padding:0;border-radius:14px;overflow:hidden}.narrative{font-size:12px;padding:8px 12px;min-height:36px}.v17-now-playing{font-size:10px}.v17-objective{font-size:11px;padding:7px 10px}.underworld{background:none;border:0;padding:0;margin:0;height:0}.v22-control-dock{position:absolute;left:12px;bottom:48px;z-index:8}.v22-drag{display:block;width:100%;background:#132d40dd;color:#eddfb4;font-size:10px;letter-spacing:1px;border:1px solid #ffffff35;border-radius:8px;min-height:26px;margin-bottom:4px;touch-action:none;cursor:grab}.move-controls{grid-template-columns:repeat(3,42px)!important;grid-template-rows:repeat(2,42px)!important;gap:4px!important}.move-controls .dir{min-width:42px;min-height:42px;background:#163d52d9;border:1px solid #c0dce18a}.quick-actions{position:absolute;right:12px;bottom:48px;width:106px;z-index:7;display:flex;flex-direction:column;gap:6px}.quick-actions button{background:#17364beb;min-height:42px;padding:8px;font-size:11px}.quick-actions #unstuckBtn{display:none}.quick-actions .action-primary{min-height:50px}.nearby-hint{bottom:12px;background:#122a3ce8;font-size:10px;padding:6px 8px;line-height:1.35}.v22-nav{margin:7px 0 0}.v22-nav button{font-size:11px;padding:8px 4px}footer{font-size:9px}.v22-stick{width:116px;height:116px}.map-stage #v17MiniMap{width:52px;height:52px}.battle-land{min-height:240px}}
body.v22-immersive{overflow:hidden}body.v22-immersive .site-header,body.v22-immersive .right-side,body.v22-immersive footer,body.v22-immersive .v17-now-playing,body.v22-immersive .v17-objective,body.v22-immersive .narrative{display:none}body.v22-immersive .map-stage{position:fixed;inset:0;width:100%;height:100dvh;border:0;border-radius:0;z-index:10}body.v22-immersive .v22-toolbar{top:max(10px,env(safe-area-inset-top));right:max(10px,env(safe-area-inset-right))}body.v22-immersive .area-label{top:max(10px,env(safe-area-inset-top));left:max(10px,env(safe-area-inset-left))}body.v22-immersive .v22-nav{position:fixed;bottom:var(--v22-safe-bottom);left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));z-index:12;margin:0;padding:5px;background:#0d2533a8;border-radius:12px}body.v22-immersive .v22-control-dock{position:absolute;left:max(12px,env(safe-area-inset-left));bottom:calc(86px + var(--v22-safe-bottom));z-index:12}body.v22-immersive .quick-actions{position:absolute;right:max(12px,env(safe-area-inset-right));bottom:calc(86px + var(--v22-safe-bottom));width:106px;z-index:11;display:flex;flex-direction:column;gap:6px}body.v22-immersive .quick-actions #unstuckBtn{display:none}body.v22-immersive .quick-actions button{min-height:42px}body.v22-immersive .nearby-hint{bottom:calc(55px + var(--v22-safe-bottom))}body.v22-immersive .v22-drag{display:block}body.v22-immersive .underworld{height:0;padding:0;border:0;margin:0}body.v22-immersive #v17MiniMap{top:65px}
@media(max-height:560px) and (orientation:landscape){.site-header{display:none}.shell{padding:5px 8px}.map-stage{height:calc(100dvh - 64px);min-height:220px}.v17-now-playing,.v17-objective,.narrative,footer{display:none}.v22-nav{margin-top:5px}.v22-control-dock{bottom:42px}.quick-actions{bottom:42px}.map-stage #v17MiniMap{display:none}.modal{max-height:94dvh}.battle-land{min-height:200px}.battle-unit img{width:100px;height:100px}.battle-unit.foe img{width:85px;height:85px}.v22-stick{width:100px;height:100px}.v22-stick span{left:27px;top:27px}.v22-stick:before{font-size:56px}}

.v22-lead{position:absolute;top:51px;left:10px;max-width:calc(100% - 90px);background:#10283bdf;border:1px solid #ffffff30;border-radius:9px;color:#ffe5b1;padding:6px 9px;font-size:10px;font-weight:700;min-height:30px;z-index:3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}body.v22-immersive .v22-lead{top:calc(max(10px,env(safe-area-inset-top)) + 43px)}

@media(max-width:860px){.quick-actions #mapBtn,.quick-actions #v19Features{display:none}}
body.v22-immersive .quick-actions #mapBtn,body.v22-immersive .quick-actions #v19Features{display:none}
