/* Keep the established theme; these rules fill gaps in older iOS Safari. */
dialog:not([open]) { display:none; }
.dialog-backdrop { position:fixed; top:0; right:0; bottom:0; left:0; z-index:1000; background:rgba(27,38,61,.4); }
.legacy-modal-open { position:fixed; left:0; right:0; width:100%; overflow:hidden; }
dialog.legacy-dialog[open] { display:block; position:fixed; top:16px; left:0; right:0; bottom:auto; z-index:1001; margin:0 auto; max-width:92vw; max-height:calc(100vh - 32px); overflow-y:auto; -webkit-overflow-scrolling:touch; }
.legacy-dialog .modal-head { position:sticky; top:0; z-index:1; background:#fff; }
.no-flex-gap .row > * + *, .no-flex-gap .inline-btns > * + * { margin-left:12px; }
.no-flex-gap .row.wrap > *, .no-flex-gap .inline-btns.wrap > *, .no-flex-gap .modal-actions > * { margin-top:6px; margin-bottom:6px; }
.no-flex-gap .modal-actions > * + * { margin-left:10px; }
.no-flex-gap .button .icon { margin-right:7px; }
.no-flex-gap .public-header > * + * { margin-left:10px; }
.no-flex-gap .modal-head > h2 { margin-right:20px; }
.confetti, .credits-closing { top:0; right:0; bottom:0; left:0; }
@supports not (font-size:clamp(16px,2vw,24px)) {
  .event-banner h1 { font-size:32px; }
  .event-banner p { font-size:18px; }
  .team-emblem.large { width:160px; height:160px; }
  .captain-prep strong, .captain-performance strong { font-size:28px; }
  .opening-screen h1, .block-title-only h1, .team-introduction h1 { font-size:48px; }
  .opening-screen p, .block-title-only p, .team-introduction p { font-size:24px; }
  .countdown-screen strong { font-size:140px; }
  .blitz-clock [data-board-timer] { font-size:96px; }
  .host-clock { font-size:66px; }
}
@supports not (width:min(600px,92vw)) {
  dialog { max-width:92vw; }
  .toast { max-width:90vw; }
  .event-board-main { width:100%; max-width:1760px; }
  .prompter-main { width:94%; max-width:1480px; }
  .qr-card svg { width:260px; max-width:100%; }
  .hourglass { height:52vh; max-height:580px; }
}
@media(max-width:800px) {
  input,select,textarea { font-size:16px; }
  .no-flex-gap .quiz-aside > * + * { margin-left:0; }
  dialog.legacy-dialog[open] { top:12px; max-height:calc(100vh - 24px); }
  .legacy-dialog input, .legacy-dialog select, .legacy-dialog textarea { font-size:16px; }
}
