/*
 * Spread 'Em desktop + mobile resilience pass.
 * Late-loaded intentional overrides for the main SPA pages: Home, Picks,
 * Live Center, Leaderboards, Stats, History, Profile and Commissioner.
 * Does not change contest data, locks, scores or game logic.
 */
@media screen {
  .app-shell,.main,.main > *,.page-header > *,.section,.panel,.form-panel,
  .two-col > *,.lc-game-column,.lc-leaderboard,.sl-page,.r-page{min-width:0}
  .table-wrap,.sl-scroll,.admin-tabs{
    overscroll-behavior-inline:contain;
    -webkit-overflow-scrolling:touch;
  }
  .side{
    height:100vh;height:100dvh;
    overflow-y:auto;overscroll-behavior-y:contain;
    scrollbar-width:thin;
  }
  .lc-root{overflow-anchor:none}
  .lc-expand-button{min-height:44px;padding:9px 12px;border:1px solid #405a4b;
    border-radius:9px;background:rgba(174,241,106,.055)}
  .lc-root :is(button,select):focus-visible{
    outline:2px solid var(--lc-lime);
    outline-offset:3px;
  }
  .lc-pick-columns{grid-template-columns:repeat(2,minmax(0,1fr))}
  .lc-player-pick{min-width:0}
  .lc-lock-symbol{white-space:nowrap}
}
@media screen and (min-width:901px){
  html{scrollbar-gutter:stable}
}
/* Desktop laptops retain the sidebar, but the extra dashboard column was
 * squeezing real game cards below readable widths between 901 and 1240px. */
@media screen and (min-width:901px) and (max-width:1240px){
  .main{padding-inline:clamp(22px,3vw,38px)}
  .two-col{grid-template-columns:minmax(0,1fr)}
  .invite-form{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media screen and (max-width:1240px){
  .lc-layout{grid-template-columns:minmax(0,1fr);gap:19px}
  .lc-leaderboard,.lc-archive .lc-leaderboard{position:static}
  .lc-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .lc-metric{min-width:0}
  .lc-metric .lc-front-runner{overflow-wrap:anywhere;white-space:normal}
}
/* The native dropdown was 11px on phones, triggering Safari focus zoom and
 * making the 2026 archive week labels hard to read. */
@media screen and (max-width:900px){
  .main input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  .main select,.main textarea{font-size:16px}
  .main .lc-week-label .select{font-size:16px;min-height:44px}
  .bottom-nav button,.mobile-more-links button,.main button,.main select{
    touch-action:manipulation;
  }
  .main .admin-tabs button,.main .sl-view-tabs button{min-height:44px}
}
@media screen and (max-width:650px){
  .lc-controls-main{align-items:stretch;gap:11px}
  .lc-week-label{width:100%;min-width:0;max-width:100%;gap:12px}
  .main .lc-week-label .select{min-width:0;width:100%;max-width:none;flex:1 1 0}
  .lc-filter-bar{overflow-x:auto;justify-content:flex-start;scrollbar-width:none}
  .lc-filter-bar::-webkit-scrollbar{display:none}
  .lc-filter-bar button{min-height:44px;flex:0 0 auto;font-size:.74rem}
  .lc-filter-bar .lc-refresh{margin-left:auto;min-width:42px;justify-content:center}
  .lc-pick-overview{flex-wrap:wrap;gap:10px}
  .lc-pick-bar,.lc-picks-hidden{flex:1 1 100%}
  .lc-expand-button{width:100%;min-height:44px;justify-content:center;
    padding:10px 12px;font-size:.8rem;margin-left:0}
  .lc-pick-detail{padding:12px}
  .lc-player-pick{min-height:42px}
  .lc-metrics{gap:9px}
  .lc-metric{min-height:110px}
  .lc-team-copy,.lc-ats-line strong,.lc-picks-title{min-width:0}
}
/* Tiny handsets should horizontally scroll tabs/filters, never overflow the
 * browser viewport or tuck controls behind the home-screen safe area. */
@media screen and (max-width:390px){
  .main{padding-inline:12px}
  .lc-head h1{font-size:clamp(2.6rem,12vw,3.35rem)}
  .lc-team{gap:7px}
  .lc-pick-bar-label{gap:6px}
  .lc-rank-row{padding-inline:11px}
  .bottom-nav{padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}
}
@media(prefers-reduced-motion:reduce){
  .lc-expand-button,.lc-pick-bar-track>span{transition:none}
}

/* A narrow desktop/tablet stacks the standings below all 12 games. Give the
 * reader an explicit, accessible shortcut instead of a marathon scroll. */
@media screen{
  .lc-jump-standings,.lc-back-to-games{display:none}
}
@media screen and (max-width:1240px){
  .lc-jump-standings{
    display:inline-flex;align-items:center;justify-content:center;gap:8px;
    justify-self:end;min-height:40px;padding:8px 13px;
    color:#b5d9c7;background:#192a29;border:1px solid #34544c;
    border-radius:9px;font-size:.77rem;font-weight:800;cursor:pointer;
  }
  .lc-back-to-games{
    display:inline-flex;align-items:center;justify-content:center;
    margin-top:13px;min-height:40px;padding:7px 12px;
    color:#b5d9c7;background:#192a29;border:1px solid #34544c;
    border-radius:9px;font-size:.75rem;font-weight:800;cursor:pointer;
  }
  .lc-jump-standings:hover,.lc-back-to-games:hover{color:var(--lc-lime);border-color:#7a9b58}
}
@media screen and (max-width:650px){
  .lc-jump-standings{width:100%;justify-self:stretch;min-height:44px}
  .lc-back-to-games{min-height:44px}
}
