/* Give the city and the controls distinct, usable spaces on phones. */
@media(max-width:700px) and (orientation:portrait){
 #exchange .atlas-ui{padding:12px 12px max(12px,env(safe-area-inset-bottom));gap:0}
 #exchange .atlas-head{gap:12px;min-height:40px}
 #exchange .atlas-kicker{font-size:20px;max-width:none;white-space:nowrap}
 #exchange .atlas-head label{min-width:0;max-width:57%}
 #exchange .atlas-head select{width:100%;min-height:40px;font-size:14px;padding:8px 26px 8px 10px}
 #exchange #atlasCity{font-size:clamp(27px,8vw,38px);margin:12px 118px 5px 0;line-height:1.05}
 #exchange #cityStoreCount{font-size:11px;line-height:1.35;max-width:calc(100% - 110px)}
 #exchange #cameraTools{top:64px;right:12px;border-radius:22px;padding:0;gap:0}
 #exchange #cameraTools button{min-width:32px;min-height:40px;padding:5px;font-size:14px}
 #exchange .atlas-dock{display:flex;flex-direction:column;align-items:stretch;flex-wrap:nowrap;gap:6px;width:100%;min-height:0}
 #exchange #atlasPlaces{order:0;max-width:100%;margin:0;gap:5px;flex-wrap:nowrap}
 #exchange #atlasPlaces button{font-size:12px;min-height:36px;padding:7px 10px}
 #exchange #networkPanel{width:100%;padding:12px;border-radius:20px;max-height:52dvh;background:linear-gradient(135deg,#081911f5,#10271ff2);box-shadow:0 -8px 28px #0005;scroll-padding:12px}
 #exchange #networkPanel h2{font-size:clamp(22px,6.1vw,28px);line-height:1.02;letter-spacing:0;margin:0 0 10px;max-width:100%}
 #exchange #networkPanel h2 br{display:none}
 #exchange #networkPanel h2 br::after{content:' '}
 #exchange #askNetwork{padding:4px;margin:0 0 8px;border-radius:12px;border-width:1px;box-shadow:0 0 0 2px #47de981b}
 #exchange #askNetwork label{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}
 #exchange #askNetwork input{width:100%;font-size:16px;padding:8px;border:0;min-height:42px;box-sizing:border-box}
 #exchange #askNetwork button{flex:none;font-size:13px;white-space:nowrap;padding:9px 11px}
 #exchange #askExamples{margin:0 0 8px;gap:6px;flex-wrap:nowrap}
 #exchange #askExamples button{min-height:34px;font-size:12px;padding:6px 10px}
 #exchange #shopModes{gap:6px;margin-bottom:8px;grid-template-columns:1fr 1.18fr 1fr}
 #exchange #shopModes button{min-height:58px;padding:7px 8px;font-size:12px;gap:4px;justify-content:center}
 #exchange #shopModes svg{width:20px;height:18px;margin:0}
 #exchange #shopDrawer summary{min-height:44px;box-sizing:border-box;font-size:14px;padding:7px 10px}
 #exchange #networkPanel>a{font-size:12px!important;margin-top:8px!important;line-height:1.4}
 #exchange #networkPanel>.live-dir{float:right}
 #exchange #networkPanel>.sampleNote{font-size:9px;letter-spacing:.025em;margin-top:6px}
 #exchange #networkRows{max-height:24dvh}
 #exchange .atlas-card{display:none}
}
.followChoices{display:flex;gap:8px;margin:8px 0}
.followChoices button{border:1px solid #80ab91;background:#14291f;color:#e3f5e8;border-radius:20px;padding:7px 12px}
.matchReason{color:#b8f2d3;font-size:14px;line-height:1.5}

/* Keep the controls above transformed map layers in mobile WebKit. */
#journeyStage{height:100dvh;min-height:100dvh}
#exchange{height:100%;min-height:0}
#mapViewport{z-index:0}
#exchange .atlas-ui{position:absolute;inset:0;z-index:2;min-height:0;transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}
#journeyStage.inside #exchange .atlas-ui{opacity:1;visibility:visible}
#journeyStage.inside #exchange{pointer-events:auto}
#exchange .atlas-head{flex-shrink:0}
#exchange .atlas-dock{min-height:0;flex-shrink:0}
@media(max-width:700px) and (orientation:portrait){
 #exchange .atlas-ui{height:100%;padding-bottom:max(14px,env(safe-area-inset-bottom))}
 #exchange .atlas-dock{position:absolute;left:12px;right:12px;bottom:max(14px,env(safe-area-inset-bottom));width:auto}
 #exchange #networkPanel{max-height:min(52dvh,480px);overflow-y:auto;-webkit-overflow-scrolling:touch}
}
