/* Final public mobile layer. Keep the desktop layout and the original artwork.
   Also covers phones rotated to landscape, including safe-area insets. */
@media (max-width:700px), (max-width:1000px) and (max-height:500px) and (orientation:landscape){
  body,body.v15-home-active{padding:0!important}
  .v15-shell{display:block!important;grid-template-columns:minmax(0,1fr)!important}
  .v15-sidebar{
    position:relative!important;inset:auto!important;width:100%!important;min-width:0!important;
    min-height:0!important;height:auto!important;max-height:none!important;
    padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) 8px max(8px,env(safe-area-inset-left))!important;
    border-right:0!important;border-bottom:1px solid #d2dbe4!important;
    backdrop-filter:none;-webkit-backdrop-filter:none;
  }
  .v15-sidebar-inner{position:static;min-width:0}
  .v15-sidebar .v15-brand{height:48px!important;min-height:48px!important;padding:0 2px 4px!important}
  .v15-sidebar .v15-brand img{width:52px!important;height:42px!important;flex:0 0 52px!important;margin:0!important}
  .v15-sidebar .v15-menu{
    display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
    width:100%!important;max-width:100%!important;margin:0!important;padding:0 0 4px!important;
    overflow-x:auto!important;overflow-y:hidden!important;gap:6px!important;
    scroll-snap-type:x proximity;scroll-padding-inline:2px;
  }
  .v15-sidebar .v15-menu button{
    flex:0 0 auto!important;width:auto!important;min-width:0!important;
    height:44px!important;min-height:44px!important;padding:0 12px!important;
    font-size:14px!important;scroll-snap-align:start;
  }
  .v15-sidebar .v15-menu-sep{display:none!important}
  .v15-sidebar .v15-partner-lag{max-width:360px;margin:8px auto 0;padding:8px 10px}
  .v15-main,.v15-unified-main{
    width:100%!important;min-width:0!important;max-width:100%!important;
    padding:12px max(8px,env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))!important;
  }
  #comp-home .home-results,#comp-home .home-featured,#comp-home .home-philosophy{padding:10px}
  #comp-home .home-results-heading{min-width:0;margin-bottom:10px}
  #comp-home .home-results-heading h2{font-size:14px!important;line-height:1.3!important}

  /* Keep the phone pinned beside swipeable cards. The shared height is reserved
     before fonts or match data arrive; the phone keeps its natural aspect ratio. */
  #comp-home .home-results-frame{
    --home-result-height:252px;
    display:grid;grid-template-columns:calc(var(--home-result-height) * 1283 / 2140) minmax(0,1fr);
    gap:8px;align-items:start;
  }
  #comp-home .home-results-frame>.home-nokia{
    width:100%;height:var(--home-result-height);aspect-ratio:1283 / 2140;
    margin:2px 0 8px;align-self:start;
  }
  #comp-home .home-results-frame #homeResultsTrack{
    width:100%;min-width:0;grid-auto-columns:clamp(158px,100%,218px);
    height:calc(var(--home-result-height) + 26px);grid-auto-rows:var(--home-result-height);
    overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;
  }
  #comp-home .home-result-card{padding:8px;grid-template-rows:34px 74px 74px 50px}
  #comp-home .home-result-card header{padding-bottom:6px}
  #comp-home .home-result-card header b,#comp-home .home-result-card time{font-size:11px!important;line-height:14px!important}
  #comp-home .home-result-team{grid-template-columns:28px minmax(0,1fr) auto;grid-template-rows:40px 16px;row-gap:3px;padding:7px 0}
  #comp-home .home-result-team:has(.home-result-nhl-logo){grid-template-columns:40px minmax(0,1fr) auto}
  #comp-home .home-result-team>img,#comp-home .home-result-team>.home-result-flag{width:28px!important;height:28px!important}
  #comp-home .home-result-name b{font-size:13px!important;line-height:14px!important;overflow-wrap:normal}
  #comp-home .home-result-name small{font-size:10px!important;line-height:12px!important}
  #comp-home .home-result-owner{font-size:10px!important;line-height:12px!important}
  #comp-home .home-result-team>strong{font-size:28px!important}
  #comp-home .home-result-card>button{height:44px;min-height:44px;margin-top:6px;font-size:11px!important;line-height:15px!important;padding:4px}
  #comp-home .home-nokia .phone-player small{font-size:7px!important}
  #comp-home .home-nokia .phone-player b{font-size:9px!important;letter-spacing:0}
  #comp-home .home-nokia [data-crt-delta]{font-size:8px!important}
  #comp-home .phone-day{gap:1px;font-size:8px!important}
  #comp-home .phone-day b{font-size:9px!important}
  #comp-home .phone-day strong{font-size:10px!important}
  #comp-home .phone-day small{font-size:7px!important}
  #comp-home .home-nokia .phone-key{top:75%;width:33.3333%;height:48px;min-height:48px;transform:none;border-radius:8px}
  #comp-home .home-nokia .phone-back{left:0}
  #comp-home .home-nokia .phone-navi{left:33.3333%}
  #comp-home .home-nokia .phone-arrows{left:66.6666%}

  /* Both messages stay readable, with the requested white vertical divider. */
  #comp-home .home-partner-banner{
    display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);
    gap:8px 0;height:auto;min-height:0;padding:10px;flex-basis:100%;
  }
  #comp-home .home-partner-logo{grid-column:1 / -1;justify-self:center;font-size:22px;margin:0}
  #comp-home .home-partner-slogan,#comp-home .home-partner-bonus{font-size:12px;line-height:1.35;padding:0 8px;text-wrap:balance;align-self:stretch}
  #comp-home .home-partner-slogan{display:block;align-self:center;padding-left:0;text-align:right}
  #comp-home .home-partner-bonus{display:block;padding-right:0;text-align:left}

  /* Enough room for real text and 44 px controls; no 370/390 px legacy minimum. */
  #comp-home .v15-hero-card.v15-editorial-hero{
    height:clamp(292px,75vw,320px)!important;min-height:0!important;max-height:320px!important;aspect-ratio:auto;
  }
  #comp-home .v15-hero-content{
    left:14px;right:14px;top:12px;bottom:62px;transform:none;
    width:auto;max-width:none!important;padding:0!important;justify-content:center;
  }
  #comp-home .v15-hero-eyebrow{font-size:10px;line-height:1.2;letter-spacing:.35px;margin-bottom:6px}
  #comp-home .v15-hero-title{font-size:clamp(24px,6vw,28px)!important;line-height:1.08!important;letter-spacing:-.4px!important;max-width:100%;overflow-wrap:normal}
  #comp-home .v15-hero-subtitle{font-size:12px!important;line-height:1.4!important;max-width:100%!important;margin:6px 0 0}
  #comp-home .v15-hero-meta{font-size:10px;line-height:1.3;letter-spacing:0;margin-top:7px;gap:4px 6px;flex-wrap:wrap}
  #comp-home .v15-hero-slide-actions{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px!important;margin-top:10px}
  #comp-home .v15-hero-slide-actions button,#comp-home .v15-hero-slide-actions button.primary{height:44px;min-height:44px!important;min-width:0;padding:4px 6px;font-size:11px;line-height:1.2}
  #comp-home .v15-hero-carousel-chrome{left:10px;right:10px;bottom:8px;gap:8px}
  #comp-home .v15-hero-dots{gap:2px}
  #comp-home .v15-hero-dot{width:44px;height:44px;min-height:44px;background:transparent}
  #comp-home .v15-hero-dot:after{content:"";position:absolute;left:6px;right:6px;top:20px;height:3px;background:#89939d;border-radius:3px}
  #comp-home .v15-hero-dot:before{inset:20px 6px 21px;z-index:1;border-radius:3px}
  #comp-home .v15-hero-arrows{gap:4px}
  #comp-home .v15-hero-arrow{width:44px;height:44px;min-height:44px;font-size:22px}

  /* The two reserved article frames remain visible without duplicating the
     populated article's full height on a phone. */
  #comp-home .home-beliefs{margin:20px 0 24px}
  #comp-home .home-beliefs .home-editorial-columns{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:auto;gap:12px}
  #comp-home .home-philosophy:not(.home-philosophy-empty){grid-column:1 / -1}
  #comp-home .home-philosophy-empty{height:88px;min-height:0}
  #comp-home .home-philosophy h2{font-size:24px;line-height:1.25;margin-bottom:16px}
  #comp-home .home-philosophy p{font-size:17px;line-height:1.5}

  /* Dialogs fit the visible Safari/Chrome viewport and scroll independently. */
  .nhl41-modal-sheet,.matchcard-sheet,.team-history-sheet,.og26-stats-sheet{
    left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));
    top:max(8px,env(safe-area-inset-top));transform:none;width:auto!important;max-width:none!important;
    max-height:calc(100vh - max(8px,env(safe-area-inset-top)) - max(8px,env(safe-area-inset-bottom)))!important;
    max-height:calc(100dvh - max(8px,env(safe-area-inset-top)) - max(8px,env(safe-area-inset-bottom)))!important;
    overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;border-radius:12px;
  }
  .nhl41-modal-close,.matchcard-close,.team-history-close,.og26-stats-close{width:44px;height:44px;min-height:44px;z-index:3}
  .nhl41-modal-sheet{padding:12px}
  .nhl41-goals-col article span small,.nhl41-goals-col article>p{font-size:11px;line-height:1.4}
}

@media (max-width:359px){
  /* Very narrow windows use the full card width after the fixed phone. */
  #comp-home .home-results-frame{grid-template-columns:minmax(0,1fr)}
  #comp-home .home-results-frame>.home-nokia{width:calc(var(--home-result-height) * 1283 / 2140);justify-self:center}
  #comp-home .v15-hero-arrows{display:none}
}

@media (min-width:701px) and (max-width:1000px) and (max-height:500px) and (orientation:landscape){
  .v15-sidebar .v15-partner-lag{max-width:300px;padding:6px 10px}
  #comp-home .home-partner-banner{grid-template-columns:auto minmax(0,1fr) minmax(0,1.15fr);align-items:center;gap:0 8px}
  #comp-home .home-partner-logo{grid-column:auto}
  #comp-home .v15-hero-content{display:flex;flex-direction:column;max-width:620px!important}
  #comp-home .v15-hero-card.v15-editorial-hero{height:292px!important}
}

@media (hover:none){
  #comp-nhl :is(.nhl41-logo,.nhl41-row-logo,.nhl41-score-logo,.nhl41-stat-logo,.nhl41-club-logo,.nhl41-mini-logo):hover{animation:none}
}
