/* Phone-only destination flight interface. Desktop flight deck stays unchanged. */
@media (max-width: 767px), (pointer: coarse) and (hover: none) and (orientation: landscape) and (max-height: 500px) and (max-width: 1024px) {
  #experience { min-height: 0; height: 100dvh; }
  #experience > :not(#v46-engine):not(#universe):not(.screen-shade):not(.identity):not(.top-actions):not(.copyright):not(#toast) { display: none !important; }
  #experience .identity { left: max(14px, env(safe-area-inset-left)); top: max(14px, env(safe-area-inset-top)); }
  #experience .identity img { width: 32px; height: 32px; }
  #experience .identity strong { font-size: 13px; }
  #experience .identity span { font-size: 9px; margin-top: 3px; }
  #experience .top-actions { top: auto; right: max(14px, env(safe-area-inset-right)); left: max(14px, env(safe-area-inset-left)); bottom: calc(45px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 9px; }
  #experience .top-actions > :not(#targets-open):not(.phone-flight-status):not(.phone-desktop-note) { display: none !important; }
  #experience #targets-open { display: flex; width: 100%; height: 52px; justify-content: center; border: 1px solid var(--line); border-radius: 10px; background: #07151fee; color: var(--accent); font-size: 16px; }
  #experience #targets-open kbd { display: none; }
  #experience #targets-open > span { display: inline !important; }
  .phone-flight-status { margin: 0; color: #e5f2f2; font-size: 13px; text-align: center; text-shadow: 0 1px 5px #000; pointer-events: none; }
  #experience .copyright { right: 14px; left: 14px; bottom: calc(10px + env(safe-area-inset-bottom)); text-align: center; }
  #experience .copyright .release-version { display: none; }
  #experience #toast { bottom: calc(138px + env(safe-area-inset-bottom)); max-width: calc(100vw - 28px); }
  #drawer { inset: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)); width: auto; height: auto; max-height: none; border-radius: 12px; }
  #drawer .drawer-head { height: 76px; padding: 0 15px; }
  #drawer .drawer-head h2 { font-size: 23px; }
  #drawer #drawer-close { width: 44px; height: 44px; flex: none; }
  #drawer #drawer-body { height: calc(100% - 76px); padding: 15px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  #drawer #target-query { min-height: 46px; font-size: 16px; }
  #drawer .filter-chip { min-height: 44px; padding: 8px 10px; font-size: 12px; }
  #drawer .target-row { min-height: 68px; }
  #drawer .target-row b { font-size: 15px; }
  #drawer .target-row small { font-size: 11px; line-height: 1.4; }
}

/* Keep the scene and target list usable below a phone's landscape browser chrome. */
@media (max-width: 767px) and (orientation: landscape) and (max-height: 500px), (pointer: coarse) and (hover: none) and (orientation: landscape) and (max-height: 500px) and (max-width: 1024px) {
  #experience .identity { top: max(8px, env(safe-area-inset-top)); }
  #experience .identity span { display: none; }
  #experience .top-actions { left: auto; width: min(360px, calc(100vw - 32px)); bottom: calc(27px + env(safe-area-inset-bottom)); gap: 4px; }
  #experience #targets-open { height: 44px; }
  .phone-flight-status { font-size: 12px; }
  #experience #toast { bottom: calc(106px + env(safe-area-inset-bottom)); }
  #drawer { left: max(8px, env(safe-area-inset-left)); right: max(8px, env(safe-area-inset-right)); }
  #drawer .drawer-head { height: 52px; padding-inline: 12px; }
  #drawer .drawer-head h2 { font-size: 21px; }
  #drawer .drawer-head small { display: none; }
  #drawer #drawer-body { height: calc(100% - 52px); padding: 10px 12px; }
  #drawer #drawer-body > p { margin-block: 0 8px; }
  #drawer .filters { flex-wrap: nowrap; overflow-x: auto; margin-block: 8px; }
  #drawer .filter-chip { flex: 0 0 auto; }
  #drawer .target-row { min-height: 58px; }
}

@media (max-width:767px), (pointer:coarse) and (hover:none) and (orientation:landscape) and (max-height:500px) and (max-width:1024px){#experience .identity .alpha-badge{display:block;font-size:9px}.phone-desktop-note{display:block;max-width:340px;text-align:center;font:400 10px/1.4 system-ui;color:#aabac4;margin:3px auto 0}.phone-desktop-note[hidden]{display:none}}
/* Keep transient messages compact and never paint an empty notification. */
#experience #toast{top:max(90px,22dvh);bottom:auto;height:auto}
#experience #toast:empty{display:none!important}
