/* ══ Inside the Game — shared responsive foundation ═══════════════════════════
   The site's first shared stylesheet. Loaded by responsive pages alongside their
   inline styles. Breakpoints: <=900px (tablet — sidebar goes away, tab bar
   appears), <=600px (phone — tighter type/spacing). Desktop is untouched: every
   rule here lives behind a media query. */

/* Bottom tab bar (markup in partials/_mobile_nav.html) — hidden on desktop */
.m-tabbar { display: none; }

@media (max-width: 900px) {
  /* ── layout: kill the fixed sidebar, main takes the screen ── */
  .app { display: block !important; }
  .app > .sidebar { display: none !important; }
  .app > .main {
    padding: 14px 14px 84px !important;   /* bottom room for the tab bar */
    min-width: 0;
  }

  /* ── bottom tab bar ── */
  .m-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
    display: flex; align-items: stretch; justify-content: space-around;
    background: rgba(8, 13, 16, 0.96);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid rgba(79, 208, 230, 0.18);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .m-tab {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    gap: 3px; padding: 9px 2px 7px; min-height: 52px;
    color: #8C9690; text-decoration: none;
    font-family: 'Inter Tight', 'Inter', system-ui, sans-serif;
    font-size: 9.5px; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase;
  }
  .m-tab svg { width: 20px; height: 20px; }
  .m-tab.active { color: #4FD0E6; }
  .m-tab.active svg { filter: drop-shadow(0 0 6px rgba(79, 208, 230, .5)); }

  /* ── shared helpers ── */
  /* Wide content (tables, calendars) scrolls in its own lane, never the page. */
  .m-scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  img { max-width: 100%; }
  /* Comfortable tap targets for real thumbs. */
  button, .topbar-btn, .section-btn, .cal-btn { min-height: 40px; }
  /* iOS auto-zooms any focused input under 16px — keep every field at 16. */
  input, select, textarea { font-size: 16px !important; }
  /* player quick-card popover must layer above the fixed tab bar (z 900) */
  #pqc { z-index: 940; }

  /* ── Teams sheet (opened by the Teams tab; markup in _mobile_nav.html) ── */
  /* the display rules below would defeat the `hidden` attribute — restore it */
  .m-teamsheet[hidden], .m-teamsheet-scrim[hidden] { display: none !important; }
  .m-teamsheet-scrim { position: fixed; inset: 0; z-index: 950; background: rgba(3,5,6,0.6); }
  .m-teamsheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 960;
    max-width: 100vw; overflow-x: hidden;
    border-radius: 18px 18px 0 0; border: 1px solid rgba(232,235,230,0.12); border-bottom: none;
    background: linear-gradient(180deg, #1A2428, #111A1D);
    padding: 10px 16px calc(30px + env(safe-area-inset-bottom, 0));
    display: flex; flex-direction: column; gap: 8px;
  }
  .m-teamsheet .grab { width: 42px; height: 4px; border-radius: 2px; background: #5A6560;
    margin: 0 auto 10px; opacity: .5; }
  .mts-btn {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px;
    padding: 0 14px; border-radius: 12px; text-decoration: none;
    font-family: 'Inter Tight', 'Inter', system-ui, sans-serif; font-weight: 700; font-size: 14px;
    color: #F2F4EF; background: rgba(255,255,255,0.04); border: 1px solid rgba(232,235,230,0.12);
  }
  .mts-btn svg { color: #4FD0E6; flex-shrink: 0; }
  .mts-divider { height: 1px; background: rgba(232,235,230,0.08); margin: 4px 0; }
  .mts-account-form { margin: 0; }
  .mts-account {
    display: flex; align-items: center; justify-content: center; width: 100%; min-height: 42px;
    border: none; background: none; cursor: pointer; text-decoration: none;
    font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .12em;
    text-transform: uppercase; color: #8C9690; padding: 0;
  }

  /* ══ THE site-standard matchup banner ═══════════════════════════════════
     ONE definition for every phone matchup banner: explore marquee, schedule
     banner, Game Day header, Game Day no-game card. Templates apply these
     classes alongside their own; parity is machine-enforced by
     verify_banner_parity.py — if you change a size here, all four change
     together, which is the point. Anatomy (top to bottom):
       label → when (big) → count → arena → teams row (disc+name+rec | VS)  */
  .m-banner .m-banner-label {
    font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 9px;
    letter-spacing: .30em; text-transform: uppercase; color: #4FD0E6;
    display: flex; align-items: center; justify-content: center; gap: 6px;
  }
  .m-banner .m-banner-when {
    font-family: 'Inter Tight', sans-serif; font-weight: 800; font-size: 22px;
    letter-spacing: -.01em; line-height: 1.15; color: #fff; text-align: center;
  }
  .m-banner .m-banner-count {
    font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 9px;
    letter-spacing: .20em; text-transform: uppercase; color: #8C9690; margin-top: 0;
  }
  .m-banner .m-banner-arena {
    font-family: 'JetBrains Mono', monospace; font-weight: 400; font-size: 9.5px;
    letter-spacing: .20em; text-transform: uppercase; color: rgba(255,255,255,.24);
    margin-top: 0; text-align: center;
  }
  .m-banner .m-banner-team {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    min-width: 0; text-align: center;
  }
  .m-banner .m-banner-disc {
    width: 52px; height: 52px; border-radius: 50%;
    display: grid; place-items: center; flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16),
                inset 0 -10px 16px rgba(0,0,0,0.28),
                inset 0 10px 16px rgba(255,255,255,0.10);
    background: linear-gradient(160deg, rgba(255,255,255,0.20), rgba(0,0,0,0.30) 70%),
                var(--mb-c, var(--b-c, var(--d-c, var(--mq-c, #333))));
  }
  .m-banner .m-banner-disc img { width: 36px; height: 36px; object-fit: contain; }
  .m-banner .m-banner-name {
    font-family: 'Inter Tight', sans-serif; font-weight: 800; font-size: 14px;
    letter-spacing: .04em; text-transform: uppercase; color: #fff;
    line-height: 1.15; text-align: center; margin-top: 0;
  }
  .m-banner .m-banner-rec {
    font-family: 'JetBrains Mono', monospace; font-weight: 500; font-size: 9px;
    letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.40);
    margin-top: 2px;
  }
  .m-banner .m-banner-vs {
    font-family: 'Inter Tight', sans-serif; font-weight: 900; font-size: 12px;
    letter-spacing: .20em; text-transform: uppercase; color: rgba(255,255,255,.35);
  }
}

@media (max-width: 600px) {
  .app > .main { padding: 10px 10px 84px !important; }
  h1 { font-size: 19px !important; }
}
