/* Shared viewport behavior. Original data, controls and DOM remain authoritative. */
/* Schedule already shows the time between the teams. Its intentionally retired
   metadata time must not reappear as a second local-time mirror. */
body.hhx-enabled.hhx-local-time-ready.hhx-season-scenes-ready #primary [data-hhx-season-kind="schedule"] .habs-feature-game-meta p > strong[data-hhx-local-output] {
  display:none!important;
}
@media (min-width:700px) {
  body.hhx-enabled.hhx-navigation-ready .hhx-unified-nav {
    position:sticky; top:var(--hhx-adminbar-offset,0px); bottom:auto; left:auto;
    z-index:85; width:100%; transform:none;
    padding:5px max(20px,calc((100% - 1180px)/2));
    border-width:0 0 1px; border-radius:0; box-shadow:0 5px 18px #0002;
  }
  body.hhx-enabled.hhx-navigation-ready .hhx-unified-nav-links { flex-wrap:wrap; }
  body.hhx-enabled.hhx-navigation-ready .hhx-unified-nav a.hhx-unified-link {
    flex:1 1 8em; flex-direction:row; min-height:44px; gap:8px;
    padding:8px 12px; border-radius:9px; font-size:.875rem;
  }
  body.hhx-enabled.hhx-navigation-ready .hhx-unified-nav a.hhx-unified-link[aria-current]::after { bottom:0; }
}

/* A tablet has room for two balanced subjects, not a fixed desktop-width ticket. */
@media (min-width:701px) and (max-width:1099px) {
  body.hhx-enabled.hhx-broadcast-ready .hhx-home-stage {
    grid-template-columns:minmax(0,1fr) minmax(300px,1fr);
    gap:26px 28px; padding:64px 32px 28px;
    min-height:max(500px,var(--hhx-hero-available,550px));
  }
  body.hhx-enabled.hhx-broadcast-ready .hhx-hero-copy h1 {
    font-size:clamp(2.125rem,4.6vw,3.125rem); line-height:1;
    letter-spacing:-.035em; text-wrap:balance;
  }
  body.hhx-enabled.hhx-broadcast-ready .hhx-score-ticket { padding-inline:17px; }
  body.hhx-enabled.hhx-broadcast-ready .hhx-ticket-nav { margin-inline:-17px; }
  body.hhx-enabled.hhx-broadcast-ready .hhx-ticket-action { margin-inline:-17px; }
}

/* Only the original pregame clock presentation needs this wider middle column. */
@media (max-width:700px) {
  body.hhx-enabled.hhx-local-time-ready.habs-design-2026.habs-front-page #primary .habs-live-data.habs-scoreboard .hh-compact-hub .hh-mini-slider .hh-mini-matchup.habs-game-hero:has(.hhx-local-time--hub) {
    grid-template-columns:minmax(0,1fr) minmax(112px,1.4fr) minmax(0,1fr);
    padding-inline:18px; gap:8px;
  }
  body.hhx-enabled.hhx-local-time-ready .hhx-local-time--hub .hhx-local-clock {
    white-space:nowrap; font-size:clamp(1.0625rem,5.4vw,1.4375rem); line-height:1.2;
  }
  body.hhx-enabled.hhx-local-time-ready .hhx-local-time--hub .hhx-local-offset {
    max-width:100%; white-space:normal; overflow-wrap:normal; line-height:1.4;
  }
  body.hhx-enabled.hhx-local-time-ready.hhx-season-scenes-ready #primary [data-hhx-season-kind="schedule"] .habs-feature-matchup {
    grid-template-columns:minmax(0,1fr) minmax(84px,1fr) minmax(0,1fr);
    padding-inline:12px; gap:6px;
  }
  body.hhx-enabled.hhx-local-time-ready.hhx-season-scenes-ready #primary .habs-feature-centre .hhx-local-clock {
    display:block; white-space:nowrap;
  }
}

@media (max-width:600px) {
  body.hhx-enabled.hhx-club-scenes-ready.hhx-site-player.habs-design-2026 #primary .hh-player-identity h1 {
    font-size:clamp(1.75rem,8vw,2.5rem); line-height:1.05;
  }
}

/* Match the existing TV guide's modal behavior for site-wide search/bookmarks. */
html:has(body.hhx-enabled.hhx-navigation-ready .hhx-unified-search-dialog[open]),
html:has(body.hhx-enabled .hhx-personal-dialog[open]) {
  overflow:hidden; overscroll-behavior:none; scrollbar-gutter:stable;
}
body.hhx-enabled :is(.hhx-unified-search-dialog,.hhx-personal-dialog) {
  overscroll-behavior:contain;
}

/* Retain enough width to read the selected game's analysis on small phones. */
@media (max-width:450px) {
  body.hhx-enabled.hhx-pulse-scenes-ready.hhx-broadcast-ready.habs-front-page.habs-design-2026 #primary .hhx-analytics-selected {
    grid-template-columns:minmax(0,1fr);
  }
  body.hhx-enabled.hhx-season-scenes-ready #primary [data-hhx-season-kind="moves"] .hh-transactions-title {
    font-size:clamp(1.75rem,8.8vw,2.25rem); line-height:1.05;
  }
}
