/* Compact shell geometry only. Content components own their own layout. */
.mobile-navigation,.mobile-context-switch,.mobile-menu-tools { display:none; }
@media (max-width:73.75rem) {
  body.has-mobile-navigation { --mobile-navigation-clearance:calc(3.75rem + env(safe-area-inset-bottom,0px)); padding-bottom:var(--mobile-navigation-clearance); }
  html:has(body.has-mobile-navigation) { scroll-padding-bottom:calc(16px + 3.75rem + env(safe-area-inset-bottom,0px)); }
  .mobile-navigation { position:fixed; z-index:46; inset:auto 0 0; display:flex; align-items:stretch; min-height:3.75rem; padding:0 env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px); border-top:1px solid var(--line); background:var(--surface); box-shadow:0 -2px 12px rgba(0,0,0,.12); }
  .mobile-navigation>a,.mobile-navigation>button { display:flex; flex:1 1 0; min-width:0; min-height:3.75rem; flex-direction:column; gap:4px; align-items:center; justify-content:center; padding:8px 2px; border:0; border-radius:0; color:var(--text); background:transparent; font:inherit; font-size:.75rem; font-weight:700; text-decoration:none; overflow-wrap:anywhere; }
  .mobile-navigation svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
  .mobile-navigation>[aria-current="page"],.mobile-navigation>[aria-expanded="true"] { box-shadow:inset 0 3px var(--accent); background:var(--surface-2); font-weight:900; text-decoration:underline; text-underline-offset:5px; }
  .mobile-navigation>:focus-visible { outline:3px solid var(--accent); outline-offset:-4px; }
  body.has-mobile-navigation,body.has-mobile-navigation[data-has-context="true"].app-layout { --mobile-sticky-offset:0px; --page-sticky-offset:0px; }
  body.has-mobile-navigation .topbar,
  body.has-mobile-navigation[data-has-context="true"].app-layout .topbar { display:contents; }
  body.has-mobile-navigation .topbar>.topbar-utility,
  body.has-mobile-navigation .topbar-navigation-band>.primary-navigation-toggle { display:none; }
  body.has-mobile-navigation .topbar-navigation-band { display:contents; }
  body.has-mobile-navigation .primary-navigation { top:0; bottom:var(--mobile-navigation-clearance); width:100%; max-height:none; overscroll-behavior:contain; }
  body.has-mobile-navigation .mobile-context-switch { display:grid; width:100%; min-height:44px; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:2px 10px; margin:0 0 12px; padding:0 4px 8px; border:0; border-bottom:1px solid var(--line); background:transparent; color:var(--text); text-align:left; }
  .mobile-context-switch>strong,.mobile-context-switch>span { grid-column:1; overflow-wrap:anywhere; }
  .mobile-context-switch>strong { font-size:.8125rem; }
  .mobile-context-switch>span { color:var(--muted); font-size:.75rem; }
  .mobile-context-switch::after { content:'⌄'; grid-column:2; grid-row:1 / span 2; }
  .mobile-menu-tools [hidden] { display:none !important; }
  .mobile-menu-tools { display:grid; gap:8px; padding-bottom:12px; border-bottom:1px solid var(--line); }
  .mobile-menu-tools>details>summary { min-height:44px; padding:12px; border:1px solid var(--line); color:var(--text); font-size:1rem; cursor:pointer; }
  .mobile-menu-tools .topbar-context-controls,
  body.has-mobile-navigation[data-has-context="true"].app-layout .mobile-menu-tools .topbar-context-controls { display:grid; grid-template-columns:minmax(0,1fr); width:100%; gap:12px; padding:12px; }
  .mobile-menu-tools .topbar-context-controls label,.mobile-menu-tools .context-field { grid-template-rows:auto auto; gap:5px; font-size:.75rem; }
  .mobile-menu-tools select,.mobile-menu-tools .context-league-menu>summary { width:100%; min-height:44px; height:auto; padding:10px; border:1px solid var(--line); background:var(--surface-2); color:var(--text); font-size:1rem; }
  .mobile-menu-tools .context-league-menu>summary { padding-right:28px; }
  .mobile-menu-tools .context-league-menu>summary>span { white-space:normal; overflow:visible; }
  .mobile-menu-tools .context-league-menu-options { position:static; width:100%; max-height:none; margin-top:4px; box-shadow:none; }
  .mobile-menu-tools .context-league-menu-options a { min-height:44px; font-size:.875rem; }
  body.has-mobile-navigation .mobile-menu-tools .topbar-secondary { position:static; display:grid; width:100%; max-height:none; padding:8px; border:0; box-shadow:none; opacity:1; visibility:visible; pointer-events:auto; transform:none; transition:none; }
  .mobile-menu-tools .topbar-secondary a,.mobile-menu-tools .topbar-secondary>form button { min-height:44px; font-size:.875rem; }
  .mobile-menu-actions { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,9rem),1fr)); align-items:start; gap:8px; }
  body.has-mobile-navigation .mobile-menu-tools .mobile-menu-actions [data-theme-toggle],body.has-mobile-navigation .mobile-menu-tools .mobile-menu-actions .league-refresh-control button { grid-area:auto; justify-self:stretch; border-radius:var(--radius); display:flex; width:100%; min-height:44px; height:auto; justify-content:center; gap:8px; padding:10px; border:1px solid var(--line); background:var(--surface-2); color:var(--text); font-size:.875rem; }
  .mobile-menu-actions [data-theme-toggle]::after { content:attr(aria-label); }
  body.has-mobile-navigation .mobile-menu-tools .mobile-menu-actions .league-refresh-control { grid-area:auto; justify-self:stretch; min-width:0; display:grid; gap:4px; }
  body.has-mobile-navigation .mobile-menu-tools .mobile-menu-actions .league-refresh-control [data-league-refresh-label] { display:inline; }
  .mobile-menu-actions .league-refresh-control small { display:block; max-width:none; color:var(--muted); }
  body.has-mobile-navigation .toast { bottom:calc(var(--mobile-navigation-clearance) + 16px); }
}
@media (prefers-reduced-motion:reduce) {
  .primary-navigation { transition:none; }
}
@media print {
  .mobile-navigation { display:none; }
  body.has-mobile-navigation { padding-bottom:0; }
}

@media (max-width:73.75rem) {
  body.has-mobile-navigation .mobile-navigation>.assistant-launcher { position:static; display:flex; width:auto; height:auto; margin:0; padding:8px 2px; border:0; border-radius:0; box-shadow:none; }
  .mobile-navigation>.assistant-launcher>span { width:24px; height:24px; font-size:.625rem; }
  .mobile-navigation>.assistant-launcher>strong,.mobile-navigation>.assistant-launcher>small { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
}

.mobile-navigation-label { display:block; min-width:0; width:100%; overflow-wrap:anywhere; text-align:center; }
