/* Desktop adaptation only: the approved phone layouts below 1000px stay intact. */
@media (min-width: 1000px) {
  :root { --desktop-gutter: clamp(24px, 3vw, 72px); --page-gutter: var(--desktop-gutter); }
  html, body { height: 100%; overflow: hidden; }
  body .site-shell, body[class] .site-shell {
    width: 100%; max-width: none; height: 100vh; height: 100dvh;
    max-height: 100dvh; margin: 0; padding: 0;
    display: flex; flex-direction: column; overflow: hidden; border-inline: 0;
  }
  body .site-shell > .primary-nav {
    position: relative; inset: auto; transform: none; flex: none;
  }
  .site-footer { padding-inline: var(--desktop-gutter); }
  .site-footer a { min-height: 30px; font-size: 11px; }

  /* All four home sections share the viewport; every destination stays visible. */
  #today {
    flex: 1; min-height: 0; min-width: 0; overflow-y: auto;
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-rows: minmax(250px, 46fr) minmax(170px, 34fr) minmax(90px, 20fr);
    column-gap: 22px; padding: 0 var(--desktop-gutter) 12px;
  }
  #today > section { min-width: 0; min-height: 0; }
  #today .hero { grid-column: 1 / -1; height: auto; aspect-ratio: auto; overflow: hidden; margin-inline: calc(-1 * var(--desktop-gutter)); }
  #today .hero-scene { width: auto; max-width: 70%; height: 100%; object-fit: contain; object-position: right center; }
  #today .masthead { padding: 0 var(--desktop-gutter); align-items: flex-start; }
  #today .brand { width: clamp(230px, 22vw, 360px); }
  #today .home-actions { margin-top: 18px; }
  #today .hero-copy { top: 24%; bottom: 4%; left: var(--desktop-gutter); width: 43%; display: flex; flex-direction: column; justify-content: flex-end; }
  #today .hero h1 { flex: 1; min-height: 0; max-height: 60%; width: 100%; margin: 0 0 0 -3%; }
  #today .hero h1 img { width: 100%; height: 100%; object-fit: contain; object-position: left bottom; }
  #today .hero-promise { font-size: clamp(12px, 1.8dvh, 20px); margin: 3px 0 6px 3%; line-height: 1.3; }
  #today .hero-description { font-size: clamp(11px, 1.6dvh, 16px); margin-left: 3%; line-height: 1.45; }
  #today .spotlight-section { grid-column: 1; grid-row: 2 / 4; margin: 0; display: grid; grid-template-rows: 40px minmax(0, 1fr) 32px; }
  #today .section-bar { min-height: 0; margin: 0; padding-inline: 4px; }
  #today .section-bar h2 { font-size: clamp(12px, 1vw, 17px); }
  #today .section-more { min-height: 0; height: 100%; font-size: 12px; }
  #today .carousel { min-height: 0; height: 100%; --card-width: 82%; --card-gap: 2%; }
  #today .carousel-track { height: 100%; }
  #today .match-card { height: 100%; min-height: 0; aspect-ratio: auto; }
  #today .carousel-arrow { width: 9%; }
  #today .carousel-footer { min-height: 0; height: 32px; }
  #today .carousel-dots button { height: 30px; }
  #today .insights-section { grid-column: 2; grid-row: 2; display: grid; grid-template-rows: 40px minmax(0, 1fr); padding-bottom: 12px; }
  #today .insights-grid { margin: 0; min-height: 0; gap: 14px; }
  #today .story-card { height: 100%; min-height: 0; aspect-ratio: auto; }
  #today .story-copy strong { font-size: clamp(17px, 1.6vw, 26px); width: calc(100% - 28px); }
  #today .story-copy > span { font-size: clamp(10px, .85vw, 14px); }
  #today .story-arrow { width: 30px; height: 30px; }
  #today .live-section { grid-column: 2; grid-row: 3; margin: 0 0 32px; }
  #today .live-card { height: 100%; min-height: 58px; aspect-ratio: auto; }
  #today .live-title { font-size: 12px; padding: 7px 16px; }
  #today .live-caption { font-size: 13px; left: 16px; }

  /* Picks keep navigation at the top; the records use the full available width. */
  #performance {
    display:grid; grid-template-columns:minmax(0,1fr);
    grid-template-rows:clamp(114px,15dvh,150px) auto minmax(0,1fr) auto;
    padding:0 var(--desktop-gutter); overflow:hidden;
  }
  .pf-hero { width:calc(100% + 2 * var(--desktop-gutter)); max-width:none; height:100%; margin:0 calc(-1 * var(--desktop-gutter)); }
  .pf-hero-art { width:auto; max-width:60%; height:100%; object-fit:contain; object-position:right center; left:auto; right:0; }
  .pf-brand { left:var(--desktop-gutter); top:8px; width:280px; max-width:27%; }
  .pf-account { right:var(--desktop-gutter); top:18px; }
  .pf-hero-copy { left:calc(var(--desktop-gutter) + 310px); bottom:24px; }
  .pf-title { font-size:clamp(74px,10dvh,96px); }
  .pf-hero-copy>p { font-size:11px; margin-top:10px; }
  .pf-toolbar { width:100%; max-width:none; margin:0; padding:0 0 12px; display:grid; grid-template-columns:minmax(300px,.8fr) minmax(0,1.2fr); gap:0 30px; }
  .pf-tabs { gap:25px; }
  .pf-tabs>a { flex:none; min-height:42px; padding:0 8px; font-size:14px; }
  .pf-scopes { padding:0; justify-content:flex-end; gap:16px; border-bottom-color:#324056; }
  .pf-scope { flex:none; font-size:13px; min-height:42px; padding:7px 8px; }
  .pf-filters { grid-column:1/-1; grid-template-columns:180px 210px minmax(200px,470px); gap:10px; margin-top:12px; }
  #performance[data-view=results] .pf-filters { grid-template-columns:160px 195px 160px minmax(200px,470px); }
  .pf-filter { padding-inline:12px; }.pf-filter select { min-height:40px; }
  .pf-content { width:100%; max-width:none; margin:0; min-height:0; overflow-y:auto; padding:0 10px 20px 0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; grid-auto-rows:max-content; align-content:start; align-items:start; scrollbar-color:#624466 #070d1b; }
  .pf-content>:not(.pf-record) { grid-column:1/-1; }
  .pf-content>.pf-card,.pf-content>.pf-record { margin:0; }
  .pf-content .pf-card { padding:20px; }
  .pf-content>.pf-list-heading { margin:4px 0; }
  .pf-week-summary { margin:0; }.pf-week-counts { padding-bottom:10px; }.pf-week-counts>strong { font-size:13px; }.pf-week-counts .pf-badge { font-size:10px; }
  .pf-week-counts>span:nth-child(2) { margin-right:12px; }.pf-preview-help summary { padding:9px 12px; font-size:12px; }
  .pf-match-browser { display:grid; grid-template-columns:140px minmax(0,1fr); gap:24px; align-items:start; }
  .pf-days { position:sticky; top:0; display:flex; flex-direction:column; padding:0 2px 12px; gap:10px; max-height:100%; overflow-y:auto; }
  .pf-days-label { display:block; text-transform:uppercase; letter-spacing:.12em; font-size:9px; color:#97abc8; padding:4px 0 8px; }
  .pf-day { width:100%; min-height:68px; padding:11px 15px; }.pf-day strong { font-size:14px; }.pf-day small { font-size:11px; }
  .pf-more-dates { min-height:40px; text-align:left; padding-left:12px; }
  .pf-date-heading { margin:0 0 10px; font-size:12px; }
  .pf-fixture { margin-bottom:28px; border-radius:14px; }
  .pf-fixture-header { padding:14px 22px; min-height:86px; }.pf-fixture-name h3 { font-size:27px; }
  .pf-fixture-picks { padding-inline:22px; }.pf-match-pick>summary { padding:18px 0; grid-template-columns:28px minmax(0,1fr) 80px 100px 125px; gap:22px; }
  .pf-pick-copy>strong { font-size:25px; }.pf-evidence-score>strong { font-size:27px; }
  .pf-player-browser { display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); gap:10px 24px; align-items:start; }
  .pf-player-list-heading { grid-column:1; grid-row:1; margin:4px 0 2px; }.pf-player-list-heading h2 { font-size:13px; }
  .pf-player-choice { grid-column:1; margin:0; min-height:132px; padding:14px; gap:12px; }
  .pf-player-art { width:52px; height:85px; }.pf-player-copy>strong { font-size:26px; }.pf-player-copy>small { font-size:10px; }
  .pf-player-meta .pf-badge { font-size:10px; padding:4px 8px; }.pf-player-meta .pf-evidence-score strong { font-size:28px; }
  .pf-player-placeholder { display:block; grid-column:2; position:sticky; top:0; padding:30px; border:1px dashed #354861; border-radius:12px; background:#08111f; }.pf-player-placeholder h2 { margin:0 0 8px; font:700 26px Barlow,Inter,sans-serif; }
  .pf-player-evidence { grid-column:2; position:sticky; top:0; margin:0; max-height:calc(100dvh - clamp(114px,15dvh,150px) - 370px); overflow-y:auto; scrollbar-width:thin; scrollbar-color:#624466 #070d1b; }
  .pf-player-evidence-hero { min-height:174px; padding:18px 20px; }.pf-player-evidence-hero h2 { font-size:30px; max-width:100%; margin:26px 0 10px; }.pf-player-evidence-hero>.pf-evidence-kicker { display:none; }
  .pf-player-evidence-hero>.pf-evidence-score { position:absolute; top:18px; right:20px; bottom:auto; margin:0; flex-direction:column; align-items:flex-end; gap:2px; }.pf-player-evidence-hero>.pf-evidence-score strong { font-size:32px; }
  .pf-player-evidence>.pf-evidence-columns { padding:20px 22px; gap:18px; }.pf-evidence-columns h3 { font-size:13px; }.pf-player-evidence .pf-evidence-columns ul { font-size:11px; }
  .pf-player-evidence>.pf-note { margin:0 22px 14px; font-size:11px; }.pf-player-actions { padding:0 22px 14px; }.pf-player-record { margin:0 22px 12px; }
  .pf-summary { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); column-gap:28px; }
  .pf-summary>.pf-eyebrow,.pf-summary-number,.pf-summary>h3 { grid-column:1; }
  .pf-summary-number { font-size:64px; }
  .pf-summary>.pf-counts { grid-column:2; grid-row:1/5; align-self:center; border:0; }
  .pf-summary>.pf-result-bar { grid-column:1/-1; margin:10px 0; }
  .pf-summary>.pf-note { grid-column:1/-1; margin:5px 0; }.pf-summary>h3+.pf-note { grid-column:1; }
  .pf-counts dt { font-size:11px; }.pf-counts dd { font-size:32px; }.pf-section-heading { margin-top:5px; }
  .pf-record-name>strong { font-size:23px; }
  .pf-update { width:100%; max-width:none; margin:0; padding-block:6px; }

  /* Existing football screens already scroll their content panels independently. */
  .ip-toolbar, .ip-list, .mc-header, .mc-panel, .pm-toolbar, .pm-tabs, .pm-content,
  .hub-toolbar, .hub-content, .fw-toolbar, .fw-content { padding-inline: var(--desktop-gutter); }
  .mc-topbar, .mc-scoreboard, .mc-timeline-panel, .mc-table-panel, .ip-panel,
  .fw-results, .fw-settings { max-width: none; }
  .mc-tabs { margin-inline: var(--desktop-gutter); }
  .mc-topbar { height: clamp(60px, 8dvh, 82px); }
  .mc-scoreboard { min-height: 88px; }
  .mc-team-name { max-width: none; }
  #inplay { grid-template-rows: clamp(150px, 23dvh, 250px) auto minmax(0, 1fr); }
  #following { grid-template-rows: clamp(165px, 24dvh, 250px) auto minmax(0, 1fr); }
  #football-hub { grid-template-rows: clamp(190px, 27dvh, 280px) auto minmax(0, 1fr); }
  .hub-tabs { max-width: none; }
  .pm-list-hero { height: clamp(175px, 25dvh, 250px); }
  .pm-match-hero { height: clamp(230px, 31dvh, 305px); }
  .pm-list-copy { top: 40%; }
  .pm-title { font-size: clamp(70px, 10dvh, 106px); }
  .pm-match-shirts > .fw-kit { width: clamp(120px, 19dvh, 178px); height: clamp(120px, 19dvh, 178px); top: 12px; }
  .pm-match-title { font-size: clamp(28px, 4dvh, 44px); }
  .fw-brand { left: var(--desktop-gutter); }
  .is-topbar, .is-hero { max-width: none; padding-inline: var(--desktop-gutter); }
  .is-topbar { height: clamp(65px, 9dvh, 90px); }
  .is-hero { height: clamp(175px, 24dvh, 255px); }
  .is-content { width: calc(100% - 2 * var(--desktop-gutter)); max-width: none; }
  .is-content > .is-story { max-width: 100%; }
  .is-story p { max-width: 85ch; }
  .is-feed { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }

  /* Account and legal pages use the full canvas, retaining readable text lines. */
  html.account-document, html.account-document body { height: auto; overflow: auto; }
  .account-document .account-shell { width: 100%; max-width: none; min-height: 100dvh; margin: 0; padding-bottom: 90px; }
  .account-document .ac-hero { height: clamp(200px, 29dvh, 300px); }
  .account-document .ac-art { width: auto; max-width: 70%; height: 100%; object-fit: contain; object-position: right center; left: auto; right: 0; mask-image: linear-gradient(90deg, transparent, #000 25%); }
  .account-document .ac-brand { left: var(--desktop-gutter); width: 300px; }
  .account-document .ac-hero-copy { left: 28%; bottom: 22px; }
  .account-document .ac-hero-copy h1 { font-size: clamp(60px, 9dvh, 90px); }
  .account-document .ac-content, .account-document .owners-content { width: calc(100% - 2 * var(--desktop-gutter)); max-width: none; }
  .account-document .ac-card p, .account-document .ac-card li { max-width: 85ch; }
  .account-document .ac-card form { max-width: 720px; }
  .account-document .ac-content > .ac-back { grid-column: 1 / -1; }
  .account-document .ac-menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
  .account-document .ac-footer { max-width: none; padding-inline: var(--desktop-gutter); }
  .account-document .primary-nav { max-width: none; }
  .legal-document .ac-card { columns: 2; column-gap: 52px; }
  .legal-document .ac-card section { break-inside: avoid; }
  .legal-document .ac-card h2 { break-after: avoid; }

  /* Fit the complete foreground artwork by height. Only the decorative stadium
     fills the wide banner, so desktop width cannot crop a player's head. */
  #today .hero, .pf-hero, .account-document .ac-hero, .is-hero {
    background: linear-gradient(90deg, #030611 0%, #030611dd 35%, #03061166 75%),
      url('/assets/match-stadium-1600.webp') center 42% / cover;
  }
  #today .hero-scene { left: auto; right: 0; top: 0; bottom: auto; mask-image: linear-gradient(90deg, transparent, #000 24%); }
  .ip-hero-art, .fw-hero-art, .is-hero .is-hero-art {
    inset: 0 0 auto auto; width: auto; max-width: 70%; height: 100%;
    object-fit: contain; object-position: right center;
    mask-image: linear-gradient(90deg, transparent, #000 24%);
  }
  .pm-list-shirts { bottom: 5%; height: 70%; }
  .pm-list-shirts > .fw-kit { height: 85%; width: auto; max-width: 48%; }
  .pm-list-shirts > .fw-kit + .fw-kit { margin-top: 0; }
  .pm-match-shirts > .fw-kit { top: 0; width: auto; height: 100%; max-height: 100%; }
  .pm-brand, .hub-brand, .is-brand { height: 100%; display: flex; align-items: center; }
  .pm-brand img, .hub-brand img, .is-brand img { width: 100%; height: 100%; object-fit: contain; }
}
