/* A phone keeps the flight scene clear while the controls stay within safe areas. */
@media (hover:none) and (pointer:coarse) and (max-width:680px), (hover:none) and (pointer:coarse) and (max-width:1100px) and (max-height:600px){
  body.flying header{display:none}
  body.flying main{height:100dvh}
  .horizon-ui.flying .scene-top{z-index:7;top:calc(env(safe-area-inset-top) + 8px);left:auto;right:calc(env(safe-area-inset-right) + 10px)}
  body.flying .location-badge,body.flying #fullscreenButton,body.flying .scene-bottom{display:none}
  body.flying #panelButton{width:44px;height:44px;border-radius:50%;background:#14231d83;border-color:#ffffff42}
  body.flying #panelButton svg{width:18px;height:18px}
  body.flying .compass,body.flying .instruments,body.flying .radar,body.flying .keyboard-hint,body.flying #reticle,body.flying #guideCard,body.flying .flight-messages{display:none!important}
  /* Match the desktop attribution rule so its bottom offset cannot stretch this layer over the controls. */
  .horizon-ui.flying:not(.photo-mode) .cesium-viewer-bottom{top:calc(env(safe-area-inset-top) + 8px)!important;bottom:auto!important;left:calc(env(safe-area-inset-left) + 8px)!important;max-width:calc(100% - 76px)}
  body.flying .cesium-widget-credits{bottom:auto!important}
  body.flying #touchControls{display:flex;position:absolute;z-index:6;inset:0;transform:none;pointer-events:none}
  body.flying.flight-paused #touchControls,body.flying.flight-menu-open #touchControls{display:none}
  .flight-joystick{position:absolute;left:calc(env(safe-area-inset-left) + 14px);bottom:calc(env(safe-area-inset-bottom) + 18px);width:min(156px,36dvh);height:min(156px,36dvh);display:grid;place-items:center;touch-action:none;pointer-events:auto;user-select:none;-webkit-user-select:none}
  .flight-joystick-base{width:76%;height:76%;display:grid;place-items:center;border-radius:50%;border:1.5px solid #e3f4d787;background:#142a2170;box-shadow:0 0 0 11px #e3f4d70c,inset 0 0 24px #06150c55}
  .flight-joystick-thumb{width:43%;height:43%;border-radius:50%;border:1.5px solid #f4ffecaa;background:#e3f4d74d;box-shadow:0 2px 12px #07160b66;will-change:transform}
  .flight-throttle{position:absolute;right:calc(env(safe-area-inset-right) + 16px);bottom:calc(env(safe-area-inset-bottom) + 14px);width:84px;height:200px;border:1px solid #e3f4d76b;border-radius:19px;background:#13271e91;box-shadow:inset 0 1px 10px #07160b66,0 3px 16px #07160b44;touch-action:none;pointer-events:auto;user-select:none;-webkit-user-select:none;cursor:ns-resize;--throttle-position:65%}
  .flight-throttle:focus-visible{outline:2px solid #e3f4d7;outline-offset:3px}
  .flight-throttle-label{position:absolute;top:8px;left:0;right:0;text-align:center;color:#efffe1c9;font:600 9px 'DM Sans',sans-serif;letter-spacing:1.3px;pointer-events:none}
  .flight-throttle-track{position:absolute;top:46px;bottom:27px;left:50%;width:13px;transform:translateX(-50%);border:1px solid #e3f4d75c;border-radius:9px;background:#07170fba;box-shadow:inset 0 0 8px #0009;pointer-events:none}
  .flight-throttle-track:before{content:'';position:absolute;inset:4px -12px;background:repeating-linear-gradient(to top,#e3f4d742 0 1px,transparent 1px 21px);pointer-events:none}
  .flight-throttle-fill{position:absolute;left:2px;right:2px;bottom:2px;height:calc(var(--throttle-position) - 4px);border-radius:6px;background:linear-gradient(#d9f3a8b8,#89b37d70);pointer-events:none}
  .flight-throttle-grip{position:absolute;left:50%;bottom:var(--throttle-position);transform:translate(-50%,50%);width:68px;height:40px;display:grid;place-items:center;border:1.5px solid #f2ffe9bc;border-radius:9px;background:repeating-linear-gradient(0deg,#ffffff12 0 2px,transparent 2px 6px),linear-gradient(145deg,#bed4b4e8,#759582ed 52%,#b1c8aae8);box-shadow:0 5px 12px #0008,inset 0 2px 3px #ffffff5c;pointer-events:none}
  .flight-throttle-grip span{font:700 12px 'Space Grotesk',sans-serif;color:#142419;text-shadow:0 1px #ffffff70;pointer-events:none}
  body.flying .pause-card{top:calc(env(safe-area-inset-top) + 58px);right:calc(env(safe-area-inset-right) + 10px);max-height:calc(100% - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 70px)}
  body.flying .pause-card kbd{display:none}
}
@media (hover:none) and (pointer:coarse) and (max-width:1100px) and (max-height:600px) and (orientation:landscape){
  .flight-joystick{left:calc(env(safe-area-inset-left) + 16px);bottom:calc(env(safe-area-inset-bottom) + 8px);width:min(132px,38dvh);height:min(132px,38dvh)}
  .flight-throttle{right:calc(env(safe-area-inset-right) + 12px);bottom:calc(env(safe-area-inset-bottom) + 6px);width:76px;height:min(170px,48dvh)}
  .flight-throttle-track{top:40px;bottom:24px}
  .flight-throttle-grip{width:62px;height:36px}
}
@media (max-width:680px) and (hover:hover) and (pointer:fine){#touchControls{display:none}}
