/* Reserve the map's actual viewport below its header and above its status. */
#action-dialog[data-ui-theme=v43]:has(.atlas-map)[open]{display:flex;flex-direction:column;box-sizing:border-box}
#action-dialog[data-ui-theme=v43]:has(.atlas-map)>.panel-header{flex:0 0 auto;box-sizing:border-box}
#action-dialog[data-ui-theme=v43]:has(.atlas-map)>.panel-content{display:flex;flex:1 1 0;min-height:0;max-height:none;overflow:hidden;padding:0}
#action-dialog .atlas-map{display:grid;grid-template-rows:minmax(0,1fr) auto;flex:1;min-height:0;height:100%;width:100%}
#action-dialog .atlas-stage{aspect-ratio:auto;min-height:0;max-height:none;height:auto}
#action-dialog .atlas-status{box-sizing:border-box;flex-shrink:0}
#action-dialog .atlas-selection{box-sizing:border-box;max-height:calc(100% - 24px);overflow:auto;overscroll-behavior:contain}
@media(max-width:760px){#action-dialog .atlas-selection{max-width:calc(100% - 16px);max-height:calc(100% - 16px)}}
/* On phones the destination card has its own space below the map. */
@media(max-width:760px){
 #action-dialog[data-ui-theme=v43]:has(.atlas-map)[open]{height:fit-content;max-height:83dvh}
 #action-dialog[data-ui-theme=v43]:has(.atlas-map)>.panel-content{display:block;flex:0 1 auto}
 #action-dialog .atlas-map{display:block;height:auto}
 #action-dialog .atlas-stage{display:grid;grid-template-rows:minmax(0,1fr) auto}
 #action-dialog .world-atlas{position:relative;inset:auto;height:min(300px,calc((100vw - 36px)*.75));max-height:calc(83dvh - 130px)}
 #action-dialog .atlas-stage:has(.atlas-selection:not([hidden])) .world-atlas{max-height:calc(83dvh - 285px)}
 #action-dialog .atlas-selection{position:relative;left:auto;bottom:auto;grid-row:2;width:auto;max-width:none;margin:8px;max-height:164px}
}
