/* The title header carries active search; editor and lineup screens keep their own controls. */
.hero-lobby .lobby-queue { grid-area:queue; min-width:0; align-self:center; }
.hero-lobby .lobby-queue[hidden] { display:none; }
.menu-ranked-queue {
  display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center;
  gap:clamp(5px,1vw,14px); min-width:0; padding:4px clamp(6px,1vw,12px);
  color:#fbf0df; background:#172d3d; border:1px solid #78b3b98c; border-radius:var(--hl-corner,8px);
  box-shadow:0 2px 4px #1b30377a;
}
.menu-queue-copy { display:flex; flex-direction:column; gap:2px; min-width:0; line-height:1.16; }
.menu-queue-copy > strong { font-size:clamp(12px,calc(15*var(--u)),17px); }
.menu-queue-copy > span { font-size:clamp(12px,calc(12*var(--u)),14px); overflow-wrap:anywhere; }
#sheet .menu-ranked-queue #queue-count { color:#c2d4db; }
.menu-ranked-queue.has-error { grid-template-columns:minmax(0,1fr) auto; }
.menu-ranked-queue #queue-timer { color:var(--hl-orange,#ff985d); font-size:clamp(16px,calc(20*var(--u)),25px); font-variant-numeric:tabular-nums; }
#sheet .menu-ranked-queue #ranked-menu-players { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
#sheet .hero-lobby .menu-ranked-queue #queue-cancel {
  min-height:44px; width:auto; margin:0; padding:5px clamp(5px,1vw,12px); white-space:normal; line-height:1.05;
  font-size:clamp(12px,calc(13*var(--u)),15px); background:#fbf0df; color:#0c1424; box-shadow:none;
}
#sheet .hero-lobby .menu-ranked-queue #queue-cancel:focus-visible { outline:2px solid #ffd4a8; outline-offset:2px; }
#sheet .hero-lobby .menu-ranked-queue #queue-cancel:disabled { opacity:.65; }
@media(max-width:980px) {
  #modal:has(.menu-ranked-queue:not(.has-error)) .lobby-play { display:none; }
}

#modal .queue-page-bar[hidden] { display:none; }
#modal .queue-page-bar { flex:none; display:flex; align-items:center; flex-wrap:wrap; gap:8px 16px; padding:8px max(16px,env(safe-area-inset-left)); background:#172d3d; color:#fbf0df; border-bottom:1px solid #56888d; }
.queue-page-bar strong { color:#ffd4a8; font-variant-numeric:tabular-nums; margin-left:auto; }
.queue-page-bar button { min-height:44px; padding:8px 14px; background:#ff985d; color:#0c1424; }
#queue-page-error:empty { display:none; }
#queue-page-error { flex-basis:100%; }

@media (orientation: landscape) and (max-height: 540px) {
  #sheet .hero-lobby .menu-ranked-queue { gap:6px; }
  #sheet .hero-lobby .menu-ranked-queue #queue-count { font:600 12px/1.15 var(--font-body); }
  #sheet .hero-lobby .menu-ranked-queue:not(.has-error) #ranked-queue-status {
    position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap;
  }
}

#modal:has(.match-countdown) { width:min(480px,calc(100vw - 32px)); background:#272c35; color:#f4efdf; }
#modal:has(.match-countdown) .sheet-head { display:none; }
.match-countdown { min-height:280px; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:32px 16px; text-align:center; }
.match-countdown p { margin:8px 0; }
.match-countdown > p:first-child { font-size:24px; }
#match-countdown-number { min-height:144px; font-size:128px; line-height:1.125; color:#ffbcd9; font-variant-numeric:tabular-nums; }

/* Compact the desktop header bar, but preserve the available width on phones. */
@media (min-width: 981px) and (min-height: 541px) {
  .hero-lobby .lobby-queue { width:clamp(min(100%, 360px), 75%, 100%); justify-self:center; }
}
