﻿.game-root.atlas-root{display:grid;grid-template-columns:minmax(0,1fr) 276px;grid-template-rows:55px minmax(0,1fr);height:650px;min-height:0;background:#122831;isolation:isolate}.atlas-root .cinema-vignette{display:none}.atlas-header{grid-column:1/-1;position:relative;inset:auto;display:flex;align-items:center;justify-content:space-between;padding:10px 20px;background:#11252e;color:#edf3ef;z-index:2;pointer-events:auto;border-bottom:1px solid #ffffff14}.atlas-header div{display:flex;flex-direction:column;gap:2px}.atlas-header small{font-size:8px;letter-spacing:.2em;color:#aac3c8}.atlas-header strong{font-size:17px;font-weight:650}.atlas-header>span{font-size:9px;letter-spacing:.1em;color:#c9dcc9}.atlas-viewport{position:relative;grid-row:2;grid-column:1;min-height:0;min-width:0;overflow:hidden;background:#819faa}.atlas-root .world-canvas{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;display:block;touch-action:none}.atlas-console{grid-column:2;grid-row:2;display:flex;flex-direction:column;min-height:0;min-width:0;padding:17px 14px 10px;background:linear-gradient(155deg,#1c353d,#142932);color:#eef2e9;border-left:1px solid #ffffff18;z-index:2}.atlas-readout{display:flex;gap:10px;justify-content:space-between;padding-bottom:12px;border-bottom:1px solid #ffffff16}.atlas-readout>div{min-width:0;display:flex;flex-direction:column;gap:5px}.atlas-readout small{font-size:8px;color:#aabfc1;letter-spacing:.08em;text-transform:uppercase}.atlas-readout strong{font-size:20px;font-weight:650;font-variant-numeric:tabular-nums}.atlas-objective{font-size:11px;line-height:1.65;margin:12px 0;color:#d2ddd7}.atlas-scroll{overflow:auto;overscroll-behavior:contain;min-height:0;flex:1;padding:2px 2px 10px;scrollbar-width:thin;scrollbar-color:#6e999d #173039}.atlas-commands{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.atlas-root button{font:inherit;cursor:pointer}.atlas-console button{border:1px solid #49666d;background:#29434b;color:#eef2eb;border-radius:8px;min-height:40px;padding:7px 6px;line-height:1.3;font-size:10px;transition:background .15s,border-color .15s;touch-action:manipulation}.atlas-console button:hover{background:#36585f}.atlas-console button[aria-pressed=true],.atlas-console button.held{background:#50634b;border-color:#cce39d;color:#f4ffe5}.atlas-console button.primary{background:#c6e6a1;color:#172b25;border-color:#c6e6a1;font-weight:700;grid-column:1/-1;font-size:12px}.atlas-console button:disabled{opacity:.38;cursor:default}.atlas-console button:focus-visible,.atlas-brief button:focus-visible{outline:3px solid #fff6be;outline-offset:2px}.atlas-board{display:grid;grid-template-columns:repeat(var(--cols,7),minmax(0,1fr));gap:3px;margin-top:14px}.atlas-board[hidden]{display:none}.atlas-board button{min-height:29px;padding:4px 1px;border-radius:4px;font-size:10px}.atlas-footer{flex-shrink:0;border-top:1px solid #ffffff18;padding-top:7px}.atlas-footer p{font-size:10px;line-height:1.5;min-height:30px;margin:0 0 7px;color:#bbd4c6}.atlas-footer>div{display:flex;gap:6px}.atlas-footer button{flex:1;min-height:34px}.atlas-footer kbd{font-size:9px;opacity:.7}.atlas-brief{position:absolute;inset:55px 0 0;background:#122b38e8;backdrop-filter:blur(14px);z-index:12;display:grid;place-items:center;padding:20px;overflow:auto}.atlas-brief>div{max-width:650px;width:100%;margin:auto;padding:24px}.atlas-brief small{color:#cee5ab;font-size:9px;letter-spacing:.18em}.atlas-brief h2{font-size:clamp(27px,4vw,44px);line-height:1.1;letter-spacing:-1.5px;margin:14px 0;color:#f3f4e8}.atlas-brief p{font-size:16px;color:#c6d6d6}.atlas-brief ol{padding-left:22px;display:grid;gap:13px;font-size:12px;line-height:1.75;color:#e1e6db;margin:25px 0}.atlas-brief-actions{display:flex;flex-wrap:wrap;gap:10px}.atlas-brief-actions .button{font-size:12px;min-height:43px}.game-stage:is(:fullscreen,.is-fullscreen) .atlas-root{height:calc(100dvh - 51px);grid-template-columns:minmax(0,1fr) 285px}.theatre-mode .atlas-root{height:78dvh}
@media(max-width:1150px){.game-root.atlas-root{grid-template-columns:minmax(0,1fr) 235px}.atlas-console{padding:12px 10px}.atlas-header{padding:10px 14px}}
@media(max-width:650px){.game-root.atlas-root{grid-template-columns:1fr;grid-template-rows:46px minmax(210px,1fr) minmax(170px,230px);height:670px}.atlas-header{padding:7px 12px}.atlas-header strong{font-size:15px}.atlas-header>span{font-size:8px}.atlas-viewport{grid-row:2;grid-column:1}.atlas-console{grid-row:3;grid-column:1;padding:9px 10px 7px;border-left:0;border-top:1px solid #ffffff22;display:grid;grid-template-columns:minmax(0,1fr) 110px;grid-template-rows:auto minmax(0,1fr);gap:7px 9px}.atlas-readout{grid-column:1;grid-row:1;padding:0;border:0;gap:8px}.atlas-readout strong{font-size:16px}.atlas-readout small{font-size:7px}.atlas-objective{display:none}.atlas-scroll{grid-column:1;grid-row:2;padding-bottom:3px}.atlas-footer{grid-column:2;grid-row:1/-1;border:0;padding:0;display:flex;flex-direction:column;justify-content:space-between}.atlas-footer p{font-size:9px;line-height:1.5}.atlas-footer>div{flex-direction:column}.atlas-commands{gap:5px}.atlas-console button{font-size:9px;min-height:36px}.atlas-console button.primary{font-size:10px}.atlas-board{gap:2px;margin-top:8px}.atlas-board button{font-size:9px;min-height:26px;padding:3px 0}.atlas-brief{inset:46px 0 0;padding:10px}.atlas-brief>div{padding:12px}.atlas-brief ol{font-size:11px;gap:12px;margin:18px 0}.atlas-brief p{font-size:13px}.game-stage:is(:fullscreen,.is-fullscreen) .atlas-root{height:calc(100dvh - 47px);grid-template-columns:1fr;grid-template-rows:40px minmax(150px,1fr) minmax(150px,34vh)}}
@media(max-height:550px) and (orientation:landscape){.game-stage:is(:fullscreen,.is-fullscreen) .atlas-root{grid-template-columns:minmax(0,1fr) 225px;grid-template-rows:39px minmax(0,1fr)}.game-stage:is(:fullscreen,.is-fullscreen) .atlas-viewport{grid-column:1;grid-row:2}.game-stage:is(:fullscreen,.is-fullscreen) .atlas-console{grid-column:2;grid-row:2;display:flex;gap:4px;padding:6px 8px}.game-stage:is(:fullscreen,.is-fullscreen) .atlas-readout{padding:0}.game-stage:is(:fullscreen,.is-fullscreen) .atlas-objective{display:none}.game-stage:is(:fullscreen,.is-fullscreen) .atlas-footer p{min-height:0;margin:2px 0;font-size:8px}.game-stage:is(:fullscreen,.is-fullscreen) .atlas-footer>div{flex-direction:row}.game-stage:is(:fullscreen,.is-fullscreen) .atlas-console button{min-height:29px;font-size:9px}.game-stage:is(:fullscreen,.is-fullscreen) .atlas-brief{inset:39px 0 0}.game-stage:is(:fullscreen,.is-fullscreen) .atlas-brief>div{padding:10px}.game-stage:is(:fullscreen,.is-fullscreen) .atlas-brief h2{font-size:25px;margin:8px 0}.game-stage:is(:fullscreen,.is-fullscreen) .atlas-brief ol{font-size:10px;gap:5px;margin:10px 0}}
.game-root.atlas-root{align-items:stretch;justify-items:stretch}.atlas-root>.atlas-header{grid-row:1;align-self:stretch;transform:none;min-height:0}.atlas-root>.atlas-viewport{align-self:stretch;justify-self:stretch}.atlas-root>.atlas-console{align-self:stretch}
.atlas-coordinate-dialog{width:min(620px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:16px;border:1px solid #a9c9b8;border-radius:14px;background:#19323c;color:#e9efde;overflow:hidden}
.atlas-coordinate-dialog[open]{display:flex;flex-direction:column;gap:12px}
.atlas-coordinate-dialog::backdrop{background:#07121acc}
.atlas-coordinate-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.atlas-coordinate-dialog header strong{font-size:17px;line-height:1.3}
.atlas-coordinate-dialog header button{min-height:44px;flex:none}
.atlas-coordinate-dialog p{font-size:12px;line-height:1.6;margin:0}
.atlas-coordinate-scroll{overflow:auto;overscroll-behavior:contain;min-height:0;padding:3px}
.atlas-coordinate-dialog .atlas-board{grid-template-columns:repeat(var(--cols),minmax(44px,1fr));gap:5px;margin:0}
.atlas-coordinate-dialog .atlas-board button{min-width:44px;min-height:44px;padding:6px 2px;font-size:12px}
.atlas-chart-game .atlas-commands{align-content:start}
.atlas-chart-game .atlas-console .atlas-footer>div:not(.atlas-planning-actions) button{min-height:44px;font-size:11px}
@media(max-width:650px) and (orientation:portrait){
 .game-root.atlas-root.atlas-chart-game{height:clamp(420px,calc(100dvh - 155px),760px);grid-template-rows:46px minmax(130px,1fr) min(286px,43dvh);padding-top:0}
 .game-stage:is(:fullscreen,.is-fullscreen) .game-root.atlas-chart-game{height:calc(100dvh - 47px);grid-template-rows:40px minmax(150px,1fr) min(286px,43dvh)}
 .atlas-chart-game .atlas-console{padding:8px 9px;gap:5px}
 .atlas-chart-game .atlas-scroll{padding:2px 2px 4px}
 .atlas-chart-game .atlas-footer{gap:5px}
 .atlas-chart-game .atlas-footer p{font-size:11px;line-height:1.4}
 .atlas-chart-game .atlas-commands{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
 .atlas-chart-game .atlas-console button{min-height:44px}
 .atlas-chart-game .atlas-footer>div:not(.atlas-planning-actions){gap:4px}
}
@media(max-height:550px) and (orientation:landscape){
 .game-stage:is(:fullscreen,.is-fullscreen) .game-root.atlas-chart-game{padding-top:0;grid-template-columns:minmax(0,1fr) 280px}
 .game-stage:is(:fullscreen,.is-fullscreen) .atlas-chart-game .atlas-footer p{font-size:10px;line-height:1.3}
 .game-stage:is(:fullscreen,.is-fullscreen) .atlas-chart-game .atlas-console button{min-height:44px}
 .atlas-chart-game .atlas-coordinate-dialog{padding:12px}
}
.atlas-wayfinder{position:absolute;left:15px;bottom:14px;display:flex;gap:10px;align-items:center;max-width:260px;padding:10px 13px 14px;border:1px solid #95d2c22e;border-radius:9px;background:#071e2bd9;color:#edf5d9;pointer-events:none;box-shadow:0 5px 22px #00131f33;z-index:3}.atlas-wayfinder-arrow{font-size:25px;color:#b0ecce;display:block}.atlas-wayfinder>div{display:grid;gap:4px}.atlas-wayfinder small{font-size:8px;letter-spacing:.14em;color:#99c6c0}.atlas-wayfinder strong{font-size:11px;font-weight:500;font-variant-numeric:tabular-nums}.atlas-wayfinder i{position:absolute;left:13px;right:13px;bottom:6px;height:2px;background:#ffffff18}.atlas-wayfinder b{display:block;height:100%;background:#99dab6;transform-origin:left}.atlas-wayfinder[data-alert=true] b{background:#f0ad79}.atlas-wayfinder[data-alert=true] small{color:#f0ba8b}@media(max-width:650px){.atlas-wayfinder{left:8px;bottom:8px;padding:7px 9px 12px;gap:7px;max-width:230px}.atlas-wayfinder strong{font-size:9px}.atlas-wayfinder small{font-size:7px}.atlas-wayfinder-arrow{font-size:20px}}
.atlas-ranges{display:grid;gap:10px;margin-bottom:12px}.atlas-ranges:empty{display:none}.atlas-ranges label{display:grid;grid-template-columns:1fr auto;gap:5px;font-size:10px;color:#dce6d8}.atlas-ranges output{font-variant-numeric:tabular-nums;color:#e4d6a9}.atlas-ranges input{grid-column:1/-1;width:100%;margin:0;min-height:28px;accent-color:#c6e6a1;touch-action:pan-y}
.atlas-damage-flash{position:absolute;inset:0;pointer-events:none;z-index:4;box-shadow:inset 0 0 65px 15px #e77354;opacity:0}
.atlas-flight-guide{position:absolute;bottom:13px;left:14px;display:flex;gap:21px;padding:10px 14px;background:#142c37d9;border:1px solid #f0e5bd26;border-radius:8px;color:#f7f0da;pointer-events:none;z-index:3}.atlas-flight-guide>div{display:grid;gap:5px}.atlas-flight-guide small{font-size:8px;letter-spacing:.13em;color:#afcac6}.atlas-flight-guide strong{font-size:11px;font-weight:500;font-variant-numeric:tabular-nums}.atlas-flight-guide[data-warning=true]{border-color:#e6a27588}.atlas-flight-marker{position:absolute;transform:translate(-50%,-50%);display:grid;justify-items:center;color:#ffe7a5;pointer-events:none;z-index:2;text-shadow:0 1px 5px #234256}.atlas-flight-marker span{font-size:23px;line-height:1}.atlas-flight-marker small{font-size:9px;background:#203f4a9c;padding:2px 4px;border-radius:3px}.atlas-flight-marker[hidden]{display:none}.atlas-flight-marker.outside span{color:#fff3cf}@media(max-width:650px){.atlas-flight-guide{bottom:7px;left:8px;gap:13px;padding:7px 10px}.atlas-flight-guide strong{font-size:9px}.atlas-flight-guide small{font-size:7px}.atlas-flight-marker small{font-size:8px}}
/* Outline the existing projected target without obscuring the flight path. */
body[data-game=skylinewings] .atlas-flight-marker{color:#fff1bf;text-shadow:-1px 0 #0b2534,1px 0 #0b2534,0 -1px #0b2534,0 1px #0b2534}
body[data-game=skylinewings] .atlas-flight-marker small{color:#fff2ce;background:#142d3cf2;box-shadow:0 0 0 1px #f1d292a6;text-shadow:none}
.atlas-map{position:absolute;top:12px;right:12px;width:128px;height:96px;pointer-events:none;border:1px solid #d5e9d35c;border-radius:8px;box-shadow:0 4px 18px #122c3b33}.atlas-root .atlas-map{z-index:3}@media(max-width:650px){.atlas-map{width:96px;height:72px;top:8px;right:8px}}
@media(prefers-reduced-motion:reduce){.atlas-console button{transition:none}}
@media(max-width:650px) and (orientation:portrait){.atlas-console{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;gap:6px}.atlas-readout{grid-column:1;grid-row:1}.atlas-scroll{grid-column:1;grid-row:2}.atlas-footer{grid-column:1;grid-row:3;display:flex;flex-direction:row;align-items:center;gap:8px}.atlas-footer p{flex:1;min-height:0;margin:0;font-size:10px}.atlas-footer>div{flex-direction:row;flex-shrink:0;max-width:48%}.atlas-footer button{padding:5px 8px}.atlas-console button{min-height:40px;font-size:10px}.atlas-board button{min-height:32px}.atlas-commands{gap:6px}}
@media(max-width:650px){.atlas-live .atlas-commands{grid-template-columns:repeat(3,minmax(0,1fr))}.atlas-live .atlas-commands button.primary{grid-column:auto;font-size:10px}.atlas-live .atlas-commands [data-action=start]{grid-column:1/-1}}
@media(max-width:650px) and (orientation:portrait){.game-stage:is(:fullscreen,.is-fullscreen) .atlas-live{grid-template-rows:40px minmax(150px,1fr) minmax(235px,46vh)}.atlas-live .atlas-console button{min-height:40px;font-size:10px}}
.atlas-target-view{position:absolute;right:12px;top:12px;width:150px;padding:9px;display:grid;gap:7px;background:#142f39dc;border:1px solid #d4dab735;border-radius:9px;color:#eee5c8;pointer-events:none;z-index:3;text-align:center}.atlas-target-view small{font-size:7px;letter-spacing:.12em;color:#b6d1c2}.atlas-target-view canvas{width:100%;height:auto;display:block}.atlas-target-view strong{font-size:9px;font-weight:500;line-height:1.35}@media(max-width:650px){.atlas-target-view{width:90px;padding:6px;right:7px;top:7px;gap:4px}.atlas-target-view small{font-size:5px}.atlas-target-view strong{font-size:7px}}

/* Give unused control space back to the scene on tall phones. */
@media(max-width:650px) and (orientation:portrait){.game-stage:is(:fullscreen,.is-fullscreen) .atlas-live{grid-template-rows:40px minmax(150px,1fr) fit-content(46dvh)}.game-stage:is(:fullscreen,.is-fullscreen) .atlas-live .atlas-console{min-height:180px;max-height:46dvh}}

/* Harborlight / Foundry: keep the actions that actually run the game outside
   the scrolling tools and coordinate grid, including small phone screens. */
.atlas-planning .atlas-footer{display:flex;flex-direction:column;gap:6px}
.atlas-planning .atlas-footer p{margin:0;min-height:0;font-size:11px;line-height:1.45}
.atlas-planning .atlas-footer>.atlas-planning-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;max-width:none;width:100%}
.atlas-planning .atlas-planning-actions button{min-height:44px;font-size:11px;grid-column:auto}
.atlas-planning .atlas-footer>div:not(.atlas-planning-actions){display:flex;flex-direction:row;max-width:none;width:100%}
.atlas-planning .atlas-viewport{cursor:crosshair}
@media(max-width:650px) and (orientation:portrait){
 .game-root.atlas-planning{height:760px;grid-template-rows:46px minmax(210px,1fr) 330px}
 .game-stage:is(:fullscreen,.is-fullscreen) .atlas-root.atlas-planning{grid-template-rows:40px minmax(150px,1fr) minmax(280px,45dvh)}
 .atlas-planning .atlas-footer{align-items:stretch}
 .atlas-planning .atlas-console{gap:6px}
 .atlas-planning .atlas-commands{grid-template-columns:repeat(3,minmax(0,1fr))}
 .atlas-planning .atlas-footer p{font-size:10px}
}
@media(max-height:550px) and (orientation:landscape){
 body[data-game="longbow"] .atlas-root .atlas-console{padding-block:4px}
 .game-stage:is(:fullscreen,.is-fullscreen) .atlas-planning .atlas-footer p{font-size:10px;line-height:1.35}
 .game-stage:is(:fullscreen,.is-fullscreen) .atlas-planning .atlas-planning-actions button{min-height:40px;font-size:10px}
}
/* Timed archery needs an accessible release target, including short fullscreen. */
/* Keep the boxing actions together; moving should not hide guard or dodge. */
body[data-game="ringcraft"] .atlas-commands [data-action="jab"]{order:1}
body[data-game="ringcraft"] .atlas-commands [data-action="cross"]{order:2}
body[data-game="ringcraft"] .atlas-commands [data-action="guard"]{order:3}
body[data-game="ringcraft"] .atlas-commands [data-action="dodge"]{order:4}
body[data-game="ringcraft"] .atlas-commands [data-action="left"]{order:5}
body[data-game="ringcraft"] .atlas-commands [data-action="up"]{order:6}
body[data-game="ringcraft"] .atlas-commands [data-action="down"]{order:7}
body[data-game="ringcraft"] .atlas-commands [data-action="right"]{order:8}
body[data-game="ringcraft"] .atlas-commands [data-action$="2"]{order:9}
body[data-game="ringcraft"] .atlas-commands [data-action="guard2"]{order:10}
body[data-game="ringcraft"] .atlas-commands [data-action="dodge2"]{order:11}
body[data-game="ringcraft"] .atlas-commands [data-hold$="2"]:not([data-action="guard2"]){order:12}
@media(max-width:650px) and (orientation:portrait){
 body[data-game="ringcraft"] .atlas-root .atlas-commands{grid-template-columns:repeat(4,minmax(0,1fr))}
 body[data-game="ringcraft"] .atlas-root .atlas-console button{min-height:44px}
 body[data-game="ringcraft"] .game-root.atlas-root{grid-template-rows:46px minmax(210px,1fr) 220px}
 body[data-game="ringcraft"] .game-root.atlas-root[data-local="true"]{grid-template-rows:46px minmax(210px,1fr) 310px}
 body[data-game="ringcraft"] .game-stage:is(:fullscreen,.is-fullscreen) .atlas-root{grid-template-rows:40px minmax(150px,1fr) 220px}
 body[data-game="ringcraft"] .game-stage:is(:fullscreen,.is-fullscreen) .atlas-root[data-local="true"]{grid-template-rows:40px minmax(150px,1fr) 310px}
}
@media(max-height:550px) and (orientation:landscape){
 body[data-game="ringcraft"] .game-stage:is(:fullscreen,.is-fullscreen) .atlas-root[data-local="true"]{grid-template-columns:minmax(0,1fr) 300px}
 body[data-game="ringcraft"] .game-stage:is(:fullscreen,.is-fullscreen) .atlas-root[data-local="true"] .atlas-commands{grid-template-columns:repeat(4,minmax(0,1fr))}
 body[data-game="ringcraft"] .game-stage:is(:fullscreen,.is-fullscreen) .atlas-root .atlas-console button{min-height:44px}
}
body[data-game="longbow"] .atlas-root .atlas-footer button[data-action="shoot"]{min-height:44px}
body[data-game="longbow"] .atlas-ranges input{min-height:44px}
/* Both angles already have live values in the aiming console.
   Keep their duplicate drag badge off the target and flight guide. */
body[data-game="longbow"] .atlas-viewport .aim-gesture[data-trajectory="true"]>b{display:none}
/* Keep live draw feedback inside the scene, clear of release/status controls
   and the target inset on narrow phones. It never captures pointer input. */
body[data-game="longbow"] .atlas-viewport>.aim-charge{left:12px;transform:none;max-width:calc(100% - 120px)}
@media(max-width:650px) and (orientation:portrait){
 body[data-game="longbow"] .atlas-target-view{top:auto;bottom:7px}
 body[data-game="longbow"] .game-root.atlas-root{grid-template-rows:46px minmax(210px,1fr) 366px}
 body[data-game="longbow"] .game-stage:is(:fullscreen,.is-fullscreen) .atlas-root{grid-template-rows:40px minmax(150px,1fr) minmax(366px,42dvh)}
 body[data-game="longbow"] .atlas-ranges{gap:6px;margin-bottom:4px}
}
@media(max-height:550px) and (orientation:landscape){
 body[data-game="longbow"] .atlas-readout{gap:5px}
 body[data-game="longbow"] .atlas-readout small{font-size:7px;letter-spacing:0;white-space:nowrap}
 body[data-game="longbow"] .atlas-readout strong{font-size:16px;white-space:nowrap}
 body[data-game="longbow"] .atlas-ranges{gap:4px;margin-bottom:4px}
 body[data-game="longbow"] .atlas-ranges label{font-size:9px;gap:0;line-height:1.25}
 body[data-game="longbow"] .direct-aim-hint{font-size:10px;line-height:1.35}
 body[data-game="longbow"] .aim-long-hint{display:none}
 body[data-game="longbow"] .aim-short-hint{display:inline}
 body[data-game="longbow"] .game-root.atlas-root{padding-top:0}
 body[data-game="longbow"] .atlas-ranges{grid-template-columns:repeat(2,minmax(0,1fr))}
 body[data-game="longbow"] .atlas-ranges label:last-child{grid-column:1/-1}
}

/* Coordinate-chart actions retain their touch size in short landscape. */
.game-root.atlas-chart-game .atlas-console button{min-height:44px}
body[data-game=mirrorwake] .atlas-board button{min-height:44px;font-size:11px}

/* 20 September: separate driving, keeper and table control hierarchies. */
body:is([data-game=dunehaul],[data-game=wakecircuit],[data-game=gloves],[data-game=tableeleven]) .atlas-root .atlas-console button{min-height:44px}
body[data-game=tableeleven] .atlas-footer>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
body[data-game=tableeleven] .atlas-footer [data-shell=help]{grid-column:1/-1}
body[data-game=tableeleven] .atlas-footer [data-action=kick2]{background:#c99974;color:#182d34}
body[data-game=tableeleven] .atlas-commands [data-action=auto]{grid-column:1/-1}
body[data-game=tableeleven] .atlas-table-guide[hidden]{display:none}
body[data-game=dunehaul] .atlas-flight-guide[data-risk=true]>div:first-child{border-left:3px solid #e1b984}
body[data-game=dunehaul] .atlas-flight-guide [data-danger=true] strong{color:#f2bd9f}
@media(max-width:650px) and (orientation:portrait){
 body:is([data-game=dunehaul],[data-game=wakecircuit],[data-game=gloves],[data-game=tableeleven]) .game-root.atlas-root{height:clamp(560px,calc(100dvh - 155px),830px);min-height:0;grid-template-rows:46px minmax(190px,1fr) 240px}
 body:is([data-game=dunehaul],[data-game=wakecircuit],[data-game=gloves],[data-game=tableeleven]) .atlas-console{display:flex;gap:5px;padding:9px}
 body:is([data-game=dunehaul],[data-game=wakecircuit],[data-game=gloves],[data-game=tableeleven]) .atlas-footer{display:block;flex:none}
 body:is([data-game=dunehaul],[data-game=wakecircuit],[data-game=gloves],[data-game=tableeleven]) .atlas-footer p{min-height:0;font-size:10px;line-height:1.35;margin-bottom:4px}
 body:is([data-game=dunehaul],[data-game=wakecircuit],[data-game=gloves]) .atlas-commands{grid-template-columns:repeat(3,minmax(0,1fr))}
 body[data-game=tableeleven] .game-root.atlas-root{grid-template-rows:46px minmax(190px,1fr) 285px}
 body[data-game=tableeleven] .game-root.atlas-root[data-local=true]{grid-template-rows:46px minmax(190px,1fr) 355px}
 body[data-game=tableeleven] .atlas-commands{grid-template-columns:repeat(4,minmax(0,1fr))}
 /* Keep row selectors visible by sharing the action row with Mission. */
 body[data-game=tableeleven] #game-root .atlas-footer>div{grid-template-columns:repeat(4,minmax(0,1fr))}
 body[data-game=tableeleven] #game-root .atlas-footer [data-shell=help]{grid-column:4;grid-row:1}
 body[data-game=tableeleven] #game-root[data-local=true] .atlas-footer [data-shell=help]{grid-row:1/span 2}
 body[data-game=tableeleven] #game-root .atlas-footer [data-action=left2]{grid-area:2/1}
 body[data-game=tableeleven] #game-root .atlas-footer [data-action=right2]{grid-area:2/2}
 body[data-game=tableeleven] #game-root .atlas-footer [data-action=kick2]{grid-area:2/3}
 body:is([data-game=dunehaul],[data-game=wakecircuit],[data-game=gloves],[data-game=tableeleven]) .game-stage:is(:fullscreen,.is-fullscreen) .atlas-root{height:calc(100dvh - 51px)}
}

body:is([data-game=dunehaul],[data-game=wakecircuit],[data-game=gloves],[data-game=tableeleven]) .atlas-footer>div{width:100%;max-width:none}

/* Live adventure/sport controls remain reachable while secondary options scroll. */
.atlas-action-deck .atlas-console button{min-height:44px;min-width:44px}
.atlas-action-deck .atlas-console [data-hold]{touch-action:none}
.atlas-action-deck .atlas-footer{display:flex;flex-direction:column;gap:5px;align-items:stretch}
.atlas-action-deck .atlas-footer p{font-size:10px;line-height:1.4;min-height:0;margin:0}
.atlas-action-deck .atlas-footer>.atlas-action-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;max-width:none;gap:5px}
.atlas-action-deck .atlas-action-controls button{flex:none;grid-column:auto;font-size:10px;padding:6px 4px}
.atlas-action-deck .atlas-footer>div:not(.atlas-action-controls){display:flex;flex-direction:row;width:100%;max-width:none}
body[data-game=skyhook] .atlas-action-controls{grid-template-columns:repeat(4,minmax(0,1fr))}
body[data-game=skyhook] #game-root .atlas-action-controls{grid-template-columns:repeat(4,minmax(44px,1fr))}
body[data-game=volleyfall] .atlas-action-deck[data-local=true] .atlas-action-controls{grid-template-columns:repeat(5,minmax(0,1fr))}
body[data-game=volleyfall] .atlas-wayfinder{top:8px;bottom:auto;left:8px;max-width:200px;padding:7px 9px}
@media(max-width:650px) and (orientation:portrait){
 .game-root.atlas-action-deck{height:clamp(540px,calc(100dvh - 155px),820px);min-height:0;grid-template-rows:46px minmax(190px,1fr) 258px}
 .atlas-action-deck .atlas-console{display:flex;gap:5px;padding:8px}
 .atlas-action-deck .atlas-readout{padding:0}
 .atlas-action-deck .atlas-scroll{padding:0 1px;flex:1;min-height:0}
 .atlas-action-deck .atlas-commands{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
 .atlas-action-deck .atlas-footer>div:not(.atlas-action-controls) button{min-height:44px;font-size:10px}
 body:is([data-game=gravitas],[data-game=skylinewings]) .game-root.atlas-action-deck{grid-template-rows:46px minmax(190px,1fr) 218px}
 body:is([data-game=gravitas],[data-game=skylinewings]) .atlas-scroll{display:none}
 body[data-game=volleyfall] .game-root.atlas-action-deck[data-local=true]{grid-template-rows:46px minmax(190px,1fr) 310px}
 .game-stage:is(:fullscreen,.is-fullscreen) .game-root.atlas-action-deck{height:calc(100dvh - 47px)}
 .game-stage:is(:fullscreen,.is-fullscreen) .atlas-action-deck .atlas-console{max-height:none;min-height:0}
}
@media(max-height:550px) and (orientation:landscape){
 .game-stage:is(:fullscreen,.is-fullscreen) .atlas-action-deck{grid-template-columns:minmax(0,1fr) 268px}
 .game-stage:is(:fullscreen,.is-fullscreen) .atlas-action-deck .atlas-console button{min-height:44px}
 .game-stage:is(:fullscreen,.is-fullscreen) .atlas-action-deck .atlas-readout strong{font-size:15px}
 .game-stage:is(:fullscreen,.is-fullscreen) .atlas-action-deck .atlas-footer p{font-size:9px;line-height:1.3}
}
body[data-game=tableeleven] .atlas-footer [data-action=kick],body[data-game=tableeleven] .atlas-footer [data-action=kick2]{grid-column:auto}

.atlas-flight-guide[data-lift=true]:not([data-warning=true]){border-color:#a3d9b3;background:#234737e8}
body[data-game=deepwake] .atlas-commands [data-action=recover]{grid-column:1/-1}
/* Deepwake: keep the three resources together, with speed/readiness below. */
body[data-game=dunehaul] .atlas-root .atlas-readout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 10px}
body[data-game=deepwake] .atlas-root .atlas-readout{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px 8px}
body[data-game=deepwake] .atlas-root .atlas-readout>div{gap:2px}
body[data-game=deepwake] .atlas-root .atlas-readout>div:nth-child(4){grid-column:1/-1;flex-direction:row;align-items:baseline;gap:8px}
body[data-game=deepwake] .atlas-root .atlas-readout>div:nth-child(4)>small{flex:none}
body[data-game=deepwake] .atlas-root .atlas-readout>div:nth-child(4)>strong{flex:1;min-width:0;font-size:12px;line-height:1.35;text-align:right;overflow-wrap:anywhere}
/* Gloves keeps its existing two action rows and Mission within a phone page. */
@media(max-width:650px) and (orientation:portrait){
 body[data-game=gloves] #game-root.atlas-root{height:clamp(476px,calc(100dvh - 155px),820px);min-height:0}
 body[data-game=gloves] .game-stage:is(:fullscreen,.is-fullscreen) #game-root.atlas-root{height:calc(100dvh - 47px)}
}
/* Foundry names the existing tool scroll area without moving its action footer. */
body[data-game=foundry] #game-root .foundry-scroll-hint{display:none;position:sticky;top:0;z-index:1;margin:0;padding:2px 4px;background:#18313b;color:#e6d7b2;font-size:10px;line-height:1.4}
@media(max-width:650px),(max-height:550px) and (orientation:landscape){
 body[data-game=foundry] #game-root .foundry-scroll-hint{display:block}
 body[data-game=foundry] #game-root .atlas-scroll{scrollbar-width:auto;scrollbar-color:#e6bd91 #18313b;scrollbar-gutter:stable;scroll-padding-top:20px}
 body[data-game=foundry] #game-root .atlas-scroll::-webkit-scrollbar{width:7px}
 body[data-game=foundry] #game-root .atlas-scroll::-webkit-scrollbar-thumb{background:#e6bd91;border-radius:4px}
 body[data-game=foundry] #game-root .atlas-scroll::-webkit-scrollbar-track{background:#18313b}
}
@media(max-width:650px) and (orientation:portrait){body[data-game=volleyfall] .game-root.atlas-action-deck{grid-template-rows:46px minmax(190px,1fr) 300px}body[data-game=volleyfall] .game-root.atlas-action-deck[data-local=true]{grid-template-rows:46px minmax(190px,1fr) 344px}body[data-game=deepwake] .game-root.atlas-action-deck{grid-template-rows:46px minmax(190px,1fr) 354px}}
/* Keep the complete secondary control rows visible in advanced missions.
   Mission help belongs beside the title, leaving the scene at its full height. */
@media(max-width:650px) and (orientation:portrait){
 body:is([data-game=deepwake],[data-game=dunehaul],[data-game=wakecircuit],[data-game=skyhook],[data-game=skylinewings]) #game-root{padding-top:0}
 body[data-game=skyhook] #game-root{grid-template-rows:46px minmax(190px,1fr) 258px}
 body:is([data-game=deepwake],[data-game=dunehaul],[data-game=wakecircuit],[data-game=skyhook],[data-game=skylinewings]) #game-root .atlas-header{padding-right:90px}
 body:is([data-game=deepwake],[data-game=dunehaul],[data-game=wakecircuit],[data-game=skyhook],[data-game=skylinewings]) #game-root .atlas-header small{display:none}
 body:is([data-game=deepwake],[data-game=dunehaul],[data-game=wakecircuit],[data-game=skyhook],[data-game=skylinewings]) #game-root .atlas-header strong{margin-top:10px}
 body:is([data-game=deepwake],[data-game=dunehaul],[data-game=wakecircuit],[data-game=skyhook],[data-game=skylinewings]) #game-root .atlas-header>span{position:absolute;left:12px;top:5px;margin:0;font-size:8px}
 body:is([data-game=deepwake],[data-game=dunehaul],[data-game=wakecircuit],[data-game=skyhook],[data-game=skylinewings]) #game-root .atlas-footer>div:not(.atlas-action-controls){position:absolute;right:8px;top:1px;width:76px;z-index:3}
 body:is([data-game=deepwake],[data-game=dunehaul],[data-game=wakecircuit],[data-game=skyhook],[data-game=skylinewings]) #game-root .atlas-footer>div:not(.atlas-action-controls) button{height:44px;min-height:44px;padding:4px;font-size:10px}
}

/* Mechbreak: the fight and movement/fire controls share one phone screen. */
body[data-game=mechbreak] #game-root .atlas-action-controls{grid-template-columns:repeat(4,minmax(44px,1fr))}
body[data-game=mechbreak] #game-root .atlas-action-controls [data-action=shoot]{grid-column:span 2}
body[data-game=mechbreak] #game-root .atlas-action-controls [data-action=upgrade]{grid-column:1/-1}
body[data-game=mechbreak] #game-root .atlas-commands [data-action=target]{min-height:44px}
@media(max-height:550px) and (orientation:landscape){
 body[data-game=mechbreak] .game-stage:is(:fullscreen,.is-fullscreen) #game-root{grid-template-rows:44px minmax(0,1fr)}
 body[data-game=mechbreak] #game-root .atlas-header>span{margin-right:92px}
 body[data-game=mechbreak] #game-root .atlas-readout>div{flex-direction:row;align-items:baseline;gap:4px}
 body[data-game=mechbreak] #game-root .atlas-readout strong{font-size:14px}
 body[data-game=mechbreak] #game-root .atlas-scroll{min-height:48px;padding:2px 0;overflow-y:hidden}
 body[data-game=mechbreak] #game-root .atlas-scroll:has(.atlas-commands:empty){display:none}
 body[data-game=mechbreak] #game-root .atlas-commands{display:flex;gap:4px;width:max-content}
 body[data-game=mechbreak] #game-root .atlas-commands button{width:81px;flex:none;min-height:44px;padding:4px;font-size:9px}
 body[data-game=mechbreak] #game-root .atlas-footer>div:not(.atlas-action-controls){position:absolute;right:8px;top:0;width:84px;z-index:3}
 body[data-game=mechbreak] #game-root .atlas-footer>div:not(.atlas-action-controls) button{height:44px;min-height:44px}
 body[data-game=mechbreak] #game-root .atlas-action-controls button{padding:4px 2px;font-size:9px;min-height:44px}
}
@media(max-width:650px) and (orientation:portrait){
 body[data-game=mechbreak] #game-root.atlas-root{height:clamp(620px,calc(100dvh - 155px),860px);min-height:0!important;grid-template-rows:46px minmax(195px,1fr) 310px}
 body[data-game=mechbreak] .game-stage:is(:fullscreen,.is-fullscreen) #game-root.atlas-root{height:calc(100dvh - 47px)}
}

/* Recovery carries its complete cost below the driving controls. */
body:is([data-game=dunehaul],[data-game=wakecircuit]) .atlas-commands [data-action=recover]{grid-column:1/-1}

/* Gravitas keeps its direction pad and Mission separate from scrolling coaching. */
body[data-game=gravitas] #game-root.atlas-action-deck .atlas-console{display:flex;gap:5px}
body[data-game=gravitas] #game-root.atlas-action-deck .atlas-scroll{display:none}
body[data-game=gravitas] #game-root.atlas-action-deck .atlas-footer{flex:1;min-height:0;justify-content:flex-end}
body[data-game=gravitas] #game-root.atlas-action-deck .atlas-footer p{flex:1;min-height:44px;overflow:auto;overscroll-behavior:contain;margin:0}
body[data-game=gravitas] #game-root.atlas-action-deck .atlas-footer>div{flex-shrink:0}
body[data-game=gravitas] #game-root.atlas-action-deck .atlas-action-controls{grid-template-columns:repeat(3,minmax(44px,1fr)) minmax(64px,1.3fr);grid-template-areas:". up . brake" "left down right recover"}
body[data-game=gravitas] #game-root .atlas-action-controls [data-action=up]{grid-area:up}
body[data-game=gravitas] #game-root .atlas-action-controls [data-action=left]{grid-area:left}
body[data-game=gravitas] #game-root .atlas-action-controls [data-action=down]{grid-area:down}
body[data-game=gravitas] #game-root .atlas-action-controls [data-action=right]{grid-area:right}
body[data-game=gravitas] #game-root .atlas-action-controls [data-action=brake]{grid-area:brake}
body[data-game=gravitas] #game-root .atlas-action-controls [data-action=recover]{grid-area:recover}
@media(max-width:650px) and (orientation:portrait){
 body[data-game=gravitas] #game-root.atlas-action-deck{grid-template-rows:46px minmax(190px,1fr) 282px}
 body[data-game=gravitas] .game-stage:is(:fullscreen,.is-fullscreen) #game-root.atlas-action-deck{grid-template-rows:40px minmax(150px,1fr) min(282px,calc(100dvh - 237px))}
}
/* Harborlight: route tools and the complete coach share the available space.
   Let this portrait console own its content height instead of clipping a
   command row when the route explanation grows. */
@media(max-width:650px) and (orientation:portrait){
 body[data-game=harborlight] #game-root.atlas-root{height:auto;min-height:calc(100dvh - 155px);grid-template-rows:46px minmax(190px,1fr) max-content}
 body[data-game=harborlight] #game-root .atlas-console{grid-template-rows:auto max-content auto}
 body[data-game=harborlight] #game-root .atlas-scroll{overflow:visible}
 body[data-game=harborlight] .game-stage:is(:fullscreen,.is-fullscreen) #game-root.atlas-root{height:calc(100dvh - 47px);min-height:0;grid-template-rows:40px minmax(120px,1fr) max-content}
 body[data-game=harborlight] .game-stage:is(:fullscreen,.is-fullscreen) #game-root .atlas-console{max-height:calc(100dvh - 207px);overflow:auto;overscroll-behavior:contain}
 body[data-game=harborlight] .game-stage:is(:fullscreen,.is-fullscreen) #game-root .atlas-footer{position:sticky;bottom:0;background:#142932;z-index:1}
}

/* Outpost resources stay visible while secondary expedition commands scroll. */
body[data-game=outpost] #game-root .atlas-readout{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 10px}
body[data-game=outpost] #game-root .atlas-readout>div{gap:2px}
body[data-game=outpost] #game-root .atlas-readout :is(small,strong){line-height:1.2}
@media(max-width:650px) and (orientation:portrait){
 body[data-game=outpost] #game-root.atlas-root{height:auto;min-height:calc(100dvh - 155px);grid-template-rows:46px minmax(190px,1fr) max-content}
 body[data-game=outpost] #game-root .atlas-console{grid-template-rows:auto max-content auto}
 body[data-game=outpost] #game-root .atlas-scroll{overflow:visible}
 body[data-game=outpost] .game-stage:is(:fullscreen,.is-fullscreen) #game-root.atlas-root{height:calc(100dvh - 47px);min-height:0;grid-template-rows:40px minmax(120px,1fr) max-content}
 body[data-game=outpost] .game-stage:is(:fullscreen,.is-fullscreen) #game-root .atlas-console{max-height:calc(100dvh - 207px);grid-template-rows:auto minmax(44px,1fr) auto;overflow:auto;overscroll-behavior:contain}
 body[data-game=outpost] .game-stage:is(:fullscreen,.is-fullscreen) #game-root .atlas-scroll{min-height:44px;overflow:auto}
 body[data-game=outpost] .game-stage:is(:fullscreen,.is-fullscreen) #game-root .atlas-footer p{max-height:3.1em;overflow:auto;overscroll-behavior:contain;flex:none}
}

/* Lockstep keeps robot selection and a spatial direction pad outside scrolling help. */
body[data-game=lockstep] #game-root.atlas-action-deck .atlas-console{display:flex;gap:5px}
body[data-game=lockstep] #game-root.atlas-action-deck .atlas-scroll{display:none}
body[data-game=lockstep] #game-root.atlas-action-deck .atlas-footer{flex:1;min-height:0;justify-content:flex-end}
body[data-game=lockstep] #game-root.atlas-action-deck .atlas-footer p{flex:1;min-height:44px;overflow:auto;overscroll-behavior:contain;margin:0}
body[data-game=lockstep] #game-root.atlas-action-deck .atlas-footer>div{flex-shrink:0}
body[data-game=lockstep] #game-root.atlas-action-deck .atlas-action-controls{grid-template-columns:minmax(64px,1.2fr) repeat(3,minmax(44px,1fr));grid-template-areas:"robot-a . up ." "robot-b left down right"}
body[data-game=lockstep] #game-root .atlas-action-controls [data-action=select][data-value="0"]{grid-area:robot-a}
body[data-game=lockstep] #game-root .atlas-action-controls [data-action=select][data-value="1"]{grid-area:robot-b}
body[data-game=lockstep] #game-root .atlas-action-controls [data-action=up]{grid-area:up}
body[data-game=lockstep] #game-root .atlas-action-controls [data-action=left]{grid-area:left}
body[data-game=lockstep] #game-root .atlas-action-controls [data-action=down]{grid-area:down}
body[data-game=lockstep] #game-root .atlas-action-controls [data-action=right]{grid-area:right}
body[data-game=lockstep] #game-root .atlas-action-controls [data-action=select][aria-pressed=true]{border-color:#b5e0dc;box-shadow:inset 0 0 0 1px #b5e0dc}
@media(max-width:650px) and (orientation:portrait){
 body[data-game=lockstep] #game-root.atlas-action-deck{grid-template-rows:46px minmax(190px,1fr) 290px}
 body[data-game=lockstep] .game-stage:is(:fullscreen,.is-fullscreen) #game-root.atlas-action-deck{grid-template-rows:40px minmax(150px,1fr) min(290px,calc(100dvh - 237px))}
}

/* Keep each opposite control pair together on portrait phones. */
@media(max-width:650px){
 body:is([data-game=dunehaul],[data-game=wakecircuit]) #game-root .atlas-commands{grid-template-columns:repeat(6,minmax(0,1fr))}
 body[data-game=dunehaul] #game-root .atlas-commands button{grid-column:span 3}
 body[data-game=dunehaul] #game-root .atlas-commands [data-action=recover]{grid-column:1/-1}
 body[data-game=wakecircuit] #game-root .atlas-commands [data-action=left]{grid-column:1/4;grid-row:1}
 body[data-game=wakecircuit] #game-root .atlas-commands [data-action=right]{grid-column:4/7;grid-row:1}
 body[data-game=wakecircuit] #game-root .atlas-commands [data-action=gas]{grid-column:1/3;grid-row:2}
 body[data-game=wakecircuit] #game-root .atlas-commands [data-action=brake]{grid-column:3/5;grid-row:2}
 body[data-game=wakecircuit] #game-root .atlas-commands [data-action=boost]{grid-column:5/7;grid-row:2}
 body[data-game=wakecircuit] #game-root .atlas-commands [data-action=recover]{grid-column:1/-1;grid-row:3}
}

@media(max-height:550px) and (orientation:landscape){
 body[data-game=wakecircuit] #game-root .atlas-commands{grid-template-columns:repeat(6,minmax(0,1fr))}
 body[data-game=wakecircuit] #game-root .atlas-commands [data-action=left]{grid-column:1/4;grid-row:1}
 body[data-game=wakecircuit] #game-root .atlas-commands [data-action=right]{grid-column:4/7;grid-row:1}
 body[data-game=wakecircuit] #game-root .atlas-commands [data-action=gas]{grid-column:1/3;grid-row:2}
 body[data-game=wakecircuit] #game-root .atlas-commands [data-action=brake]{grid-column:3/5;grid-row:2}
 body[data-game=wakecircuit] #game-root .atlas-commands [data-action=boost]{grid-column:5/7;grid-row:2;font-size:10px}
 body[data-game=wakecircuit] #game-root .atlas-commands [data-action=recover]{grid-column:1/-1;grid-row:3}
}

/* Reserve two footer lines without clipping the three touch-control rows. */
@media(max-width:650px) and (orientation:portrait){
 body[data-game=dunehaul] .game-root.atlas-root{grid-template-rows:46px minmax(190px,1fr) 260px}
}

/* Four concise driving metrics leave all three 44px control rows visible. */
@media(max-width:650px) and (orientation:portrait){
 body[data-game=dunehaul] #game-root .atlas-readout{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding-bottom:5px}
 body[data-game=dunehaul] #game-root .atlas-readout strong{font-size:17px;white-space:nowrap}
 body[data-game=dunehaul] #game-root .atlas-readout small{font-size:7px;letter-spacing:.02em}
 body[data-game=dunehaul] #game-root .atlas-scroll{flex:none;overflow:visible;padding-bottom:2px}
 body[data-game=dunehaul] #game-root .atlas-footer{margin-top:auto}
}
