/* Keep the map-first interface and compact navigation on smaller screens. */
@media (max-width:820px){
  .top-main{position:relative;gap:0;padding-bottom:8px}
  .brand{width:100%;container-type:inline-size}
  .brand .word{width:max-content;font-size:clamp(22px,7cqi,34px);padding-top:10px;min-height:44px}
  .kickoff{width:100%;font-size:clamp(14px,5cqi,28px);line-height:1}
  .topr{display:grid;grid-template-columns:auto 1fr auto;width:100%;gap:8px;align-items:center}
  .view-switch{grid-column:1;grid-row:1}
  .view-switch .nav-btn{min-width:44px}
  #plansBtn{grid-column:2;grid-row:1;justify-self:end}
  #meBtn{grid-column:3;grid-row:1}
  .huddle-notice{grid-column:3;grid-row:2;justify-self:end}
  #musicBtn{position:absolute;top:0;right:76px}
  #moreBtn{width:76px}
  .topr .nav-utilities,
  .topr:has(#huddleNotice:not([hidden])) .nav-utilities{
    position:absolute;top:0;right:0;width:auto;margin-left:0;gap:0;
  }
  .nav-utilities .nav-btn{font-size:16px;padding:8px;min-height:44px}
  .zoom-label{background:transparent}

  /* Hide only the standing visitor instructions, never search/status feedback. */
  #say[data-idle="true"]{display:none}
  .dcol:has(.gate-pick) > #say[data-idle="true"]:has(~ .search:focus-within){display:block}
  .dcol:has(.gate-pick){width:calc(100vw - 94px)}
  .dcol:has(.gate-pick) .search input{min-height:48px;padding:10px 12px;font-size:16px}
  .gate-pick .gate-btns{gap:10px}
  .gate-pick .gate-btns .btn{min-height:48px;padding:10px;font-size:14px;line-height:1.25}
  .gate-pick .gate-btns > #aIn{font-size:14px}
}
/* On narrow phones the two floating boxes cannot fit side by side. Reserve a
   complete row for zoom, then place Stats below it in both open/closed states. */
@media (max-width:520px){
  body:not(.sheet):not(.placing) .zoom{
    left:max(16px,env(safe-area-inset-left,0px));
    grid-template-columns:minmax(0,1fr) 48px 48px 80px;
    align-items:center;gap:6px;
  }
  body:not(.sheet):not(.placing) .zoom-label{grid-column:auto;text-align:left}
  body:not(.sheet):not(.placing) .zoom .zoom-world{grid-column:auto}
  .score{
    top:calc(var(--topH,72px) + 72px);
    max-width:min(360px,calc(100vw - 32px));
  }
}
@media (max-width:360px){
  .brand .word{font-size:22px}
  #musicBtn{right:64px}
  #moreBtn{width:64px}
  .nav-utilities .nav-btn{font-size:14px;padding:6px}
}
