/* AuroraCockpit V2.2.1: compact phone header.
 * Mobile-only presentation. Keep the real location H1 and existing JS event targets.
 * Location is shown once: in the tappable top-right header control.
 */
@media (max-width:760px) {
  html.layout-v2 .console-header {
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(138px,43%);
    grid-template-rows:auto auto;
    align-items:center;
    column-gap:8px;
    row-gap:5px;
    /* Keep header text below the translucent iOS status bar on the same background. */
    padding:env(safe-area-inset-top,0px) 0 8px!important;
    margin:0;
  }
  html.layout-v2 .console-header .brand {
    grid-column:1;
    grid-row:1;
    order:initial;
    width:auto!important;
    min-width:0;
    display:flex;
    align-items:center;
    gap:7px;
  }
  html.layout-v2 .brand-mark {
    width:32px!important;
    height:32px!important;
    flex:0 0 32px!important;
    border-radius:9px;
  }
  html.layout-v2 .brand-mark img {width:30px;height:30px}
  html.layout-v2 .brand>div:last-child {min-width:0}
  html.layout-v2 .brand p {display:none!important}
  html.layout-v2 .brand-wordmark {
    font-size:clamp(14px,3.7vw,17px)!important;
    line-height:1.08!important;
    letter-spacing:.025em!important;
    overflow-wrap:normal;
  }
  html.layout-v2 #headerLocationPanel {
    grid-column:2;
    grid-row:1;
    order:initial!important;
    flex:initial!important;
    width:100%;
    max-width:100%!important;
    min-width:0!important;
    min-height:57px!important;
    height:auto!important;
    box-sizing:border-box;
    padding:7px 10px!important;
    margin:0!important;
    gap:3px!important;
    border-radius:10px;
    justify-content:center;
    text-align:left;
  }
  html.layout-v2 .header-location-label {
    display:block;
    font-size:9px!important;
    line-height:1.2;
    letter-spacing:.06em!important;
  }
  html.layout-v2 #locationPageTitle {
    display:block!important;
    margin:0;
    font-size:clamp(12px,3.15vw,14px)!important;
    line-height:1.2!important;
    letter-spacing:0!important;
    overflow-wrap:break-word;
    hyphens:auto;
  }
  html.layout-v2 #headerLocationDetail {display:none!important}
  html.layout-v2 .header-location-hit {min-height:44px}
  html.layout-v2 .header-actions {
    grid-column:1 / -1;
    grid-row:2;
    order:initial!important;
    display:flex!important;
    flex-wrap:nowrap!important;
    justify-content:flex-end;
    align-items:center;
    gap:6px;
    width:100%!important;
    min-width:0;
    margin:0!important;
  }
  /* Location remains available via the top-right header control. */
  html.layout-v2 #locationButton {display:none!important}
  html.layout-v2 .header-actions .live-clock {display:none!important}
  html.layout-v2 .header-actions .control-button:not([hidden]) {
    display:inline-flex;
    flex:0 0 auto;
    min-height:44px!important;
    min-width:66px;
    width:auto!important;
    padding:7px 10px!important;
    gap:5px;
    font-size:12px!important;
    line-height:1.15;
    border-radius:9px;
  }
  html.layout-v2 .header-actions .control-icon svg {width:15px;height:15px}
  html.layout-v2 .header-actions .display-menu {
    position:absolute;
    right:0;
    left:auto;
    top:calc(100% + 6px);
    max-width:calc(100vw - 24px);
  }
  /* Preview metadata is not a customer-facing navigation element. */
  html.layout-v2 .v2-preview-ribbon {display:none!important}
  /* Scan + system are the only two mobile status values.
     The location above is already visible and interactive. */
  html.layout-v2 .nav-status-row {
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 98px!important;
    align-items:stretch!important;
    gap:7px!important;
    margin:7px 0 10px!important;
  }
  html.layout-v2 .nav-status-row .status-strip {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-column:1!important;
    grid-row:1!important;
    order:initial!important;
    min-height:54px;
    height:auto;
    padding:6px 3px!important;
    margin:0!important;
  }
  html.layout-v2 .status-strip>div:nth-child(3) {display:none!important}
  html.layout-v2 .status-strip>div {padding:0 6px!important}
  html.layout-v2 .status-strip p {font-size:10px!important;line-height:1.2!important}
  html.layout-v2 .status-strip strong {font-size:13px!important;line-height:1.3!important}
  html.layout-v2 .nav-status-row .v2-mode-bar {
    display:block!important;
    grid-column:2!important;
    grid-row:1!important;
    order:initial!important;
    min-width:0!important;
    width:100%!important;
    align-self:stretch;
  }
  html.layout-v2 .v2-tactical-launcher {
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    align-items:center!important;
    gap:3px!important;
    width:100%!important;
    min-height:54px!important;
    height:100%;
    padding:5px!important;
    border-radius:10px;
  }
  html.layout-v2 .v2-tactical-copy {
    display:block!important;
    flex:initial!important;
    text-align:center;
  }
  html.layout-v2 .v2-tactical-copy strong {
    font-size:11px!important;
    line-height:1.15!important;
    white-space:nowrap!important;
  }
  html.layout-v2 .v2-tactical-copy small,
  html.layout-v2 .v2-tactical-arrow {display:none!important}
}
@media (max-width:360px) {
  html.layout-v2 .console-header {grid-template-columns:minmax(0,1fr) minmax(126px,44%)}
  html.layout-v2 .brand-wordmark {font-size:13px!important}
  html.layout-v2 #locationPageTitle {font-size:12px!important}
  html.layout-v2 .header-actions .control-button:not([hidden]) {min-width:60px;padding-inline:8px!important}
}
