/* =========================================================
   Mobile shell Ã¢â‚¬â€ touch-first, no visible scrollbars
   Phone layout for the one-site build: every rule is scoped to body.mobile-v3,
   which mobile-app.js adds only at phone width (<= 767px). Desktop is untouched.
   ========================================================= */

/* ----- Global: no scrollbars, keep scroll ----- */
html,
html.mobile-v3-html {
  max-width: 100%;
  overflow: hidden;
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body,
body.mobile-v3,
body.mobile-v3 *,
body.mobile-v3 *::before,
body.mobile-v3 *::after {
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* legacy Edge */
}

body.mobile-v3 *::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
}

body.mobile-v3 {
  margin: 0;
  background: var(--main-bg, #f4f5f7);
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: hidden; /* page scroll lives in .m-main */
  overscroll-behavior: none;
  -webkit-tap-highlight-color: rgba(26, 115, 232, 0.18);
  touch-action: manipulation; /* remove 300ms delay, prefer taps */
  user-select: none;
  -webkit-user-select: none;
}

/* Allow selecting text in inputs / notes */
body.mobile-v3 input,
body.mobile-v3 textarea,
body.mobile-v3 select,
body.mobile-v3 [contenteditable="true"],
body.mobile-v3 .lg-muted,
body.mobile-v3 p,
body.mobile-v3 .cm-hist-notes,
body.mobile-v3 .cm-post p {
  user-select: text;
  -webkit-user-select: text;
}

body.mobile-v3 .app-shell.m-shell,
body.mobile-v3 .m-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

/* Kill desktop sidebar layout from app.css */
body.mobile-v3 .app-sidebar,
body.mobile-v3 .app-backdrop,
body.mobile-v3 .app-collapse-btn,
body.mobile-v3 .app-mobile-menu {
  display: none !important;
}

body.mobile-v3 .m-main-col,
body.mobile-v3 .app-main-col.m-main-col {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

/* ----- Top bar (sticky, thumb-friendly) ----- */
.m-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  padding-top: max(0.45rem, env(safe-area-inset-top));
  background: var(--topbar-bg, rgba(255, 255, 255, 0.96));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--main-border, #e5e7eb);
  min-height: 56px;
  flex-shrink: 0;
}
html[data-theme="dark"] .m-topbar {
  background: rgba(18, 18, 20, 0.96);
  border-bottom-color: var(--main-border);
}
html[data-theme="dark"] .m-topbar-title {
  color: var(--main-text-strong);
}
html[data-theme="dark"] .m-topbar-sub {
  color: var(--main-text-muted);
}
html[data-theme="dark"] .m-icon-btn {
  background: var(--main-surface-2);
  border-color: var(--main-border);
  color: var(--main-text-strong);
}
html[data-theme="dark"] .m-more-card {
  background: var(--main-surface);
  border-color: var(--main-border);
  color: var(--main-text-strong);
}
html[data-theme="dark"] .m-more-meta,
html[data-theme="dark"] .m-more-section {
  color: var(--main-text-muted);
}
.m-topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.m-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #1a73e8;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
}
.m-topbar-titles { min-width: 0; }
.m-topbar-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--main-text-strong, #111827);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-topbar-sub {
  font-size: 0.7rem;
  color: var(--main-text-muted, #6b7280);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.m-icon-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--main-border, #e5e7eb);
  background: var(--main-surface, #fff);
  display: grid;
  place-items: center;
  cursor: pointer;
  text-decoration: none;
  color: var(--main-text, #1f2937);
  font-size: 1rem;
  padding: 0;
  touch-action: manipulation;
}
.m-icon-btn:active {
  transform: scale(0.96);
  background: var(--main-surface-2, #f1f5f9);
}
.m-profile-btn {
  overflow: hidden;
  padding: 0;
}
.m-top-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  pointer-events: none;
}
.m-top-avatar-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: #1a73e8;
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  border-radius: 12px;
}

.m-view-btn {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.m-view-btn.is-current {
  opacity: 0.55;
  pointer-events: none;
  cursor: default;
}
.m-desktop-switch { display: none !important; }

/* Desktop switch Ã¢â‚¬â€ full-width tap target */
.m-desktop-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  min-height: 40px;
  font-size: 0.75rem;
  font-weight: 650;
  background: #0f172a;
  color: #94a3b8;
  flex-shrink: 0;
}
.m-desktop-switch a {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 750;
  white-space: nowrap;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.25rem;
  touch-action: manipulation;
}

/* ----- Main scroll pane (no bar, finger scroll) ----- */
body.mobile-v3 .m-main,
body.mobile-v3 .app-main.m-main {
  padding-bottom: calc(72px + env(safe-area-inset-bottom)) !important;
  /* tab bar is flex sibling â€” no fixed-bar bottom pad */
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 0.85rem 0.85rem !important;
  overflow-x: clip !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  box-sizing: border-box;
  touch-action: pan-y;
  scrollbar-gutter: auto;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
body.mobile-v3 .m-main::-webkit-scrollbar,
body.mobile-v3 .app-main.m-main::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Nested scroll regions also hide bars */
body.mobile-v3 .cm-members,
body.mobile-v3 .dr-player-list,
body.mobile-v3 .dr-board-scroll,
body.mobile-v3 .dr-roster,
body.mobile-v3 .mt-roster,
body.mobile-v3 .overflow-x-auto,
body.mobile-v3 .overflow-auto,
body.mobile-v3 .overflow-y-auto {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none !important;
}

/* Tighten community / league for phone */
body.mobile-v3 .lg-wrap,
body.mobile-v3 .lg-wrap.lg-community {
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}
body.mobile-v3 .cm-layout {
  grid-template-columns: 1fr !important;
  gap: 0.75rem;
}
body.mobile-v3 .cm-you {
  grid-template-columns: 1fr !important;
}
body.mobile-v3 .cm-hero {
  padding: 1.1rem 1rem 1rem;
  border-radius: 16px;
}
body.mobile-v3 .cm-hero h1 {
  font-size: 1.35rem;
}
body.mobile-v3 .cm-hero-actions {
  flex-wrap: wrap;
  gap: 0.5rem;
}
body.mobile-v3 .cm-hero-actions .lg-btn,
body.mobile-v3 .lg-btn,
body.mobile-v3 a.lg-btn,
body.mobile-v3 button.lg-btn {
  min-height: 48px;
  padding: 0.65rem 0.9rem;
  font-size: 0.88rem;
  border-radius: 12px;
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body.mobile-v3 .cm-hero-actions .lg-btn {
  flex: 1 1 calc(50% - 0.35rem);
}
body.mobile-v3 .lg-btn:active,
body.mobile-v3 .cm-tile:active,
body.mobile-v3 .cm-game:active,
body.mobile-v3 .m-more-card:active,
body.mobile-v3 .m-tab:active,
body.mobile-v3 .m-touching {
  opacity: 0.88;
  transform: scale(0.985);
}

body.mobile-v3 .cm-game {
  grid-template-columns: 1fr auto 1fr;
  gap: 0.3rem;
  padding: 0.75rem 0.55rem;
  min-height: 56px;
  border-radius: 12px;
  touch-action: manipulation;
}
body.mobile-v3 .cm-game-name {
  font-size: 0.78rem;
}
body.mobile-v3 .cm-hist-card {
  padding: 0.9rem;
  border-radius: 14px;
}
body.mobile-v3 .cm-motw {
  padding: 0.7rem 0.75rem !important;
  border-radius: 14px;
}
body.mobile-v3 .cm-motw-row {
  gap: 0.45rem;
}
body.mobile-v3 .cm-motw-name {
  font-size: 0.82rem;
  max-width: 6.5rem;
}
body.mobile-v3 .cm-motw-actions {
  width: 100%;
  margin-left: 0;
}
body.mobile-v3 .cm-motw-actions .lg-btn {
  flex: 1 1 auto;
  min-height: 44px;
}
body.mobile-v3 .cm-game.is-motw {
  min-height: 58px;
}
body.mobile-v3 .cm-member {
  min-height: 52px;
  padding: 0.55rem 0.4rem;
}
body.mobile-v3 .cm-tile {
  min-height: 52px;
  padding: 0.7rem 0.65rem;
  border-radius: 12px;
  touch-action: manipulation;
}
body.mobile-v3 .cm-post {
  padding: 0.8rem 0.85rem;
}

body.mobile-v3 .mu-scoreboard {
  grid-template-columns: 1fr !important;
  gap: 0.75rem;
}
body.mobile-v3 .lg-grid.cols-2,
body.mobile-v3 .lg-grid.cols-3 {
  grid-template-columns: 1fr !important;
}

/* Cards / lists touch spacing */
body.mobile-v3 .lg-card {
  border-radius: 14px;
  padding: 0.95rem 1rem;
}
body.mobile-v3 .lg-list li {
  min-height: 48px;
  padding: 0.7rem 0;
}
body.mobile-v3 .mt-slot {
  min-height: 48px;
  padding: 0.55rem 0.5rem;
  border-radius: 10px;
}
body.mobile-v3 .dr-player {
  min-height: 56px;
  padding: 0.65rem 0.75rem;
  touch-action: manipulation;
}
body.mobile-v3 .dr-player-draft-btn {
  opacity: 1 !important; /* always show on touch (no hover) */
  min-height: 40px;
  min-width: 3.5rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.75rem;
}
body.mobile-v3 .dr-pos {
  min-height: 40px;
  min-width: 2.5rem;
  padding: 0.4rem 0.55rem;
  touch-action: manipulation;
}
body.mobile-v3 .dr-btn {
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  touch-action: manipulation;
}
body.mobile-v3 .dr-view-tab {
  min-height: 40px;
  padding: 0.45rem 0.85rem;
  touch-action: manipulation;
}
body.mobile-v3 .dr-search {
  min-height: 48px;
  font-size: 16px; /* prevents iOS zoom on focus */
  padding: 0.65rem 2.25rem 0.65rem 0.75rem;
}
body.mobile-v3 .dr-search-clear {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  min-height: 2rem;
}

/* Draft room full-bleed under chrome */
body.mobile-v3.m-draft .m-main,
body.mobile-v3.draft-room-active .m-main {
  padding: 0 0 calc(64px + env(safe-area-inset-bottom)) !important;
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
  touch-action: pan-y;
}
body.mobile-v3.draft-room-active .dr-room {
  flex: 1;
  min-height: 0;
  height: 100%;
  max-height: none;
}
body.mobile-v3 .dr-body {
  grid-template-columns: 1fr !important;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}
body.mobile-v3 .dr-stage,
body.mobile-v3 .dr-roster-panel {
  display: none !important;
}
body.mobile-v3 .dr-board-panel,
body.mobile-v3 .dr-players-panel {
  max-width: none !important;
  min-height: 0;
}
body.mobile-v3 .dr-player-list,
body.mobile-v3 .dr-board-scroll {
  -webkit-overflow-scrolling: touch;
  overflow: auto;
}
body.mobile-v3 .dr-top {
  grid-template-columns: 1fr !important;
  text-align: center;
  gap: 0.45rem;
  padding: 0.55rem 0.65rem;
  flex-shrink: 0;
}
body.mobile-v3 .dr-top-right {
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}
body.mobile-v3 .dr-clock {
  font-size: 1.85rem;
}
body.mobile-v3 .dr-footer-note {
  display: none; /* reclaim vertical space on phone */
}

/* ----- Bottom tab bar ----- */
.m-tabbar {
  /* Flex footer inside .m-shell — fixed is clipped by shell overflow:hidden on tall pages */
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  z-index: 50;
  flex-shrink: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding: 0.3rem 0.15rem calc(0.3rem + env(safe-area-inset-bottom));
  background: var(--sidebar-bg, #0f0f0f);
  border-top: 1px solid var(--sidebar-border, #2a2a2a);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.m-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 56px;
  padding: 0.3rem 0.1rem;
  text-decoration: none;
  color: var(--sidebar-muted, #8e8e8e);
  border-radius: 12px;
  font-weight: 650;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.m-tab.is-active {
  color: #fff;
}
.m-tab.is-active .m-tab-icon {
  background: #1a73e8;
  color: #fff;
}
.m-tab-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #1c1c1c;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  line-height: 1;
  font-weight: 800;
}
.m-tab-label {
  font-size: 0.65rem;
  letter-spacing: 0.01em;
  line-height: 1;
}

/* More page */
.m-more-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.m-more-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  min-height: 56px;
  border-radius: 14px;
  background: var(--main-surface, #fff);
  border: 1px solid var(--main-border, #e5e7eb);
  text-decoration: none;
  color: var(--main-text-strong, #111827);
  font-weight: 700;
  font-size: 0.95rem;
  touch-action: manipulation;
  width: 100%;
  box-sizing: border-box;
}
.m-more-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #1a73e8;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 800;
  flex-shrink: 0;
}
.m-more-meta {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--main-text-muted, #6b7280);
}
.m-more-section {
  margin: 1.1rem 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--main-text-muted, #6b7280);
}

/* Archive: swipe sideways without page bars */
body.mobile-v3 .max-w-5xl,
body.mobile-v3 .max-w-6xl {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
body.mobile-v3 table {
  font-size: 0.78rem;
}
body.mobile-v3 .overflow-x-auto {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}
/* Wide tables scroll sideways only. Up/down swipes that start on a table must move the page,
   not get stuck inside the table box (was: overflow-y auto + overscroll-behavior contain). */
body.mobile-v3 .overflow-x-auto,
body.mobile-v3 .mp-table-scroll,
body.mobile-v3 .fr-tbl-wrap,
body.mobile-v3 .rb-tbl-wrap,
body.mobile-v3 .sh-bracket {
  overflow-y: hidden !important;
  overscroll-behavior-x: contain !important;
  overscroll-behavior-y: auto !important;
  touch-action: pan-x pan-y;
}
/* one swipe hint style for every season page (season-header.js adds it above the standings tables) */
body.mobile-v3 .mp-scroll-hint { display: none !important; }
/* team headers Ã¢â‚¬â€ big expand targets */
body.mobile-v3 .team-header,
body.mobile-v3 [onclick*="toggleTeam"] {
  min-height: 52px;
  touch-action: manipulation;
  cursor: pointer;
}

/* Forms Ã¢â‚¬â€ 16px prevents iOS focus zoom */
body.mobile-v3 input,
body.mobile-v3 select,
body.mobile-v3 textarea {
  min-height: 48px;
  font-size: 16px !important;
  border-radius: 12px;
  touch-action: manipulation;
}
body.mobile-v3 .lg-actions {
  flex-wrap: wrap;
  gap: 0.5rem;
}
body.mobile-v3 .lg-actions .lg-btn {
  flex: 1 1 calc(50% - 0.35rem);
  justify-content: center;
  min-height: 48px;
}

/* Chips / filters row: swipe without scrollbar */
body.mobile-v3 .dr-pos-filters,
body.mobile-v3 .lg-actions {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;
}
body.mobile-v3 .dr-pos-filters {
  flex-wrap: nowrap;
  padding-bottom: 0.15rem;
}

/* Safe area bottom spacer helper */
body.mobile-v3 .m-end-pad {
  height: calc(8px + env(safe-area-inset-bottom));
}

body.mt-has-dirty .mt-savebar { bottom: 4.25rem; }
body.mt-has-dirty { padding-bottom: 9.5rem; }

/* =========================================================
   Matchup (mu2) Ã¢â‚¬â€ phone shell: one scroll, no gutter, swipe weeks
   Keep in mobile-app.css so desktop sync of league.css cannot wipe it.
   ========================================================= */
body.mobile-v3 .lg-wrap.lg-wrap-wide {
  max-width: 100% !important;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}

body.mobile-v3 .mu2-board {
  margin-bottom: 0.55rem;
  padding: 0.8rem 0.85rem 0.7rem;
  border-radius: 14px;
  box-sizing: border-box;
  max-width: 100%;
}

body.mobile-v3 .mu2-score {
  font-size: 1.5rem;
  min-width: 2.5rem;
}

body.mobile-v3 .mu2-team {
  font-size: 0.95rem;
}

body.mobile-v3 .mu2-avatar {
  width: 2.55rem;
  height: 2.55rem;
}

body.mobile-v3 .mu2-toolbar {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0.45rem 0.55rem;
  margin-bottom: 0.5rem;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

body.mobile-v3 .mu2-week-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.1rem 0.05rem 0.2rem;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  touch-action: pan-x;
}

body.mobile-v3 .mu2-week-scroll::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

body.mobile-v3 .mu2-week-chip {
  flex-shrink: 0;
  min-height: 40px;
  min-width: 2.75rem;
  padding: 0.45rem 0.72rem;
  font-size: 0.8rem;
  border-radius: 999px;
  touch-action: manipulation;
}

body.mobile-v3 .mu2-tools {
  display: flex;
  width: 100%;
  gap: 0.4rem;
  flex-wrap: nowrap;
}

body.mobile-v3 .mu2-tools .lg-btn {
  flex: 1 1 0;
  min-height: 44px;
  justify-content: center;
  white-space: nowrap;
}

body.mobile-v3 .mu2-insights {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

body.mobile-v3 .mu2-insights::-webkit-scrollbar {
  display: none !important;
  height: 0 !important;
}

body.mobile-v3 .mu2-lineups {
  grid-template-columns: 1fr !important;
  gap: 0.55rem;
  max-width: 100%;
  overflow: visible !important;
}

/* Avoid nested scroll panes Ã¢â‚¬â€ only .m-main scrolls */
body.mobile-v3 .mu2-col,
body.mobile-v3 .mu2-lines,
body.mobile-v3 .mu2-lineups {
  overflow: visible !important;
  max-width: 100%;
  box-sizing: border-box;
}

body.mobile-v3 .mu2-line {
  grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  padding: 0.45rem 0.65rem;
  max-width: 100%;
}

body.mobile-v3 .mu2-pname {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================
   Shell overflow harden â€” kill right gutter / nested panes
   ========================================================= */
body.mobile-v3 .m-shell,
body.mobile-v3 .app-shell.m-shell,
body.mobile-v3 .m-main-col,
body.mobile-v3 .app-main-col.m-main-col {
  overflow-x: clip !important;
  max-width: 100% !important;
  min-width: 0 !important;
}
body.mobile-v3 .lg-wrap,
body.mobile-v3 .lg-wrap.lg-wrap-wide,
body.mobile-v3 .lg-wrap.lg-community {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
  overflow-x: clip;
}
/* Tables may swipe inside wraps â€” never widen the page */
body.mobile-v3 .espn-roster-table,
body.mobile-v3 .lg-table,
body.mobile-v3 .wv-wire-table {
  min-width: 0 !important;
}
body.mobile-v3 .espn-table-wrap,
body.mobile-v3 .lg-table-wrap,
body.mobile-v3 .wv-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
body.mobile-v3 .espn-table-wrap::-webkit-scrollbar,
body.mobile-v3 .lg-table-wrap::-webkit-scrollbar,
body.mobile-v3 .wv-table-wrap::-webkit-scrollbar {
  display: none !important;
  height: 0 !important;
}
/* Nested list panes: let .m-main own vertical scroll */
body.mobile-v3 .cm-members,
body.mobile-v3 .cm-tx-list {
  max-height: none !important;
  overflow: visible !important;
}

/* Keep bottom tabs visible on every mobile page (flex footer — not fixed) */
body.mobile-v3 .m-tabbar,
.m-shell > .m-tabbar {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 50 !important;
  flex-shrink: 0 !important;
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  height: auto !important;
  max-height: none !important;
  transform: none !important;
}
body.mobile-v3 .m-main,
body.mobile-v3 .app-main.m-main {
  /* tab bar is flex sibling — modest pad only */
  padding-bottom: 0.85rem !important;
}
.m-nav-toggle { flex-shrink: 0; font-size: 1.15rem; line-height: 1; }
.m-nav-backdrop {
  display: none; position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,0.45);
}
.m-nav-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 90;
  width: min(86vw, 300px);
  background: var(--sidebar-bg, #121214);
  border-right: 1px solid var(--sidebar-border, #2a2a2a);
  transform: translateX(-105%);
  transition: transform 0.2s ease;
  padding: calc(0.75rem + env(safe-area-inset-top)) 0.75rem 1rem;
  overflow-y: auto;
}
body.m-nav-open .m-nav-backdrop { display: block; }
body.m-nav-open .m-nav-drawer { transform: translateX(0); }
.m-nav-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.75rem; color: #fff;
}
.m-nav-drawer-list { display: flex; flex-direction: column; gap: 0.25rem; }
.m-nav-drawer-link {
  display: block; padding: 0.75rem 0.85rem; border-radius: 10px;
  color: #e5e7eb; text-decoration: none; font-weight: 600;
}
.m-nav-drawer-link:active, .m-nav-drawer-link:hover {
  background: rgba(26,115,232,0.22);
}
/* Add-to-home-screen banner (phones, after 5 min on the site, X = never again). Slim bar, not a popup. */
body.mobile-v3 .m-install { display: flex; align-items: center; gap: 0.6rem; margin: 0.5rem 0.75rem 0; padding: 0.55rem 0.55rem 0.55rem 0.65rem; border-radius: 12px; border: 1px solid var(--main-border, #e5e7eb); background: var(--main-surface, #fff); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12); }
body.mobile-v3 .m-install-icon { width: 38px !important; height: 38px !important; max-width: 38px; border-radius: 9px; flex-shrink: 0; }
body.mobile-v3 .m-install-text { flex: 1 1 auto; min-width: 0; font-size: 0.78rem; line-height: 1.3; }
body.mobile-v3 .m-install-text strong { display: block; font-size: 0.86rem; margin-bottom: 0.1rem; }
body.mobile-v3 .m-install-add { flex-shrink: 0; border: 0; border-radius: 999px; padding: 0.4rem 0.9rem; background: #1a73e8; color: #fff; font-weight: 800; font-size: 0.82rem; }
body.mobile-v3 .m-install-x { flex-shrink: 0; border: 0; background: transparent; color: inherit; opacity: 0.6; font-size: 1rem; padding: 0.3rem 0.4rem; line-height: 1; }

/* Matchup on phones: both lineups side by side (rows line up slot for slot) */
body.mobile-v3 .mu2-lineups { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; gap: 0.3rem; }
body.mobile-v3 .mu2-col { min-width: 0; }
body.mobile-v3 .mu2-col-head { padding: 0.45rem 0.45rem; gap: 0.25rem; }
body.mobile-v3 .mu2-col-head h2 { font-size: 0.8rem; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
body.mobile-v3 .mu2-col-label { font-size: 0.6rem; }
body.mobile-v3 .mu2-col-total { font-size: 1rem; }
body.mobile-v3 .mu2-line { grid-template-columns: 1.6rem minmax(0, 1fr) auto; gap: 0.25rem; padding: 0.3rem 0.3rem; min-height: 2.6rem; height: 2.6rem; box-sizing: border-box; }
body.mobile-v3 .mu2-pos { font-size: 0.55rem; min-width: 0; width: 1.6rem; padding: 0.15rem 0; text-align: center; }
body.mobile-v3 .mu2-pname { font-size: 0.72rem; line-height: 1.2; }
body.mobile-v3 .mu2-pmeta { font-size: 0.6rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
body.mobile-v3 .mu2-pts-wrap { font-size: 0.78rem; min-width: 0; }
body.mobile-v3 .mu2-pts-wrap * { font-size: inherit; }

/* Matchup on phones: one-row scoreboard (team + score on each side, VS in the middle) */
body.mobile-v3 .mu2-score-row { display: grid !important; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important; align-items: center !important; gap: 0.4rem !important; }
body.mobile-v3 .mu2-side { display: flex !important; flex-direction: column !important; align-items: flex-start !important; gap: 0.15rem !important; min-width: 0 !important; }
body.mobile-v3 .mu2-side.is-opp { align-items: flex-end !important; text-align: right !important; }
body.mobile-v3 .mu2-side .mu2-avatar { display: none !important; }
body.mobile-v3 .mu2-side.is-opp .mu2-meta { order: 1; }
body.mobile-v3 .mu2-side.is-opp .mu2-score { order: 2; }
body.mobile-v3 .mu2-meta { min-width: 0; max-width: 100%; text-align: inherit !important; }
body.mobile-v3 .mu2-label { font-size: 0.6rem !important; }
body.mobile-v3 .mu2-team { font-size: 0.86rem !important; line-height: 1.15 !important; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
body.mobile-v3 .mu2-rec { font-size: 0.66rem !important; }
body.mobile-v3 .mu2-score { font-size: 1.75rem !important; line-height: 1 !important; }
body.mobile-v3 .mu2-mid { padding: 0 !important; min-width: 0 !important; }
body.mobile-v3 .mu2-mid .mu2-week { font-size: 0.6rem !important; }
body.mobile-v3 .mu2-mid .mu2-vs { font-size: 0.8rem !important; }
body.mobile-v3 .mu2-mid .mu2-margin { font-size: 0.68rem !important; }

body.mobile-v3 .mu2-score-row > .mu2-side.is-mine { order: 1 !important; }
body.mobile-v3 .mu2-score-row > .mu2-mid { order: 2 !important; text-align: center; }
body.mobile-v3 .mu2-score-row > .mu2-side.is-opp { order: 3 !important; }

/* My Team on phones: this week's matchup in one row (you · VS · opponent) */
body.mobile-v3 .espn-matchup-strip { display: grid !important; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important; align-items: center !important; gap: 0.4rem !important; padding: 0.7rem 0.6rem !important; }
body.mobile-v3 .espn-matchup-strip > .espn-ms-side.is-mine { order: 1; text-align: left !important; align-items: flex-start !important; }
body.mobile-v3 .espn-matchup-strip > .espn-ms-mid { order: 2; padding: 0 !important; min-width: 0 !important; }
body.mobile-v3 .espn-matchup-strip > .espn-ms-side.is-opp { order: 3; text-align: right !important; align-items: flex-end !important; }
body.mobile-v3 .espn-matchup-strip .espn-ms-side { width: auto !important; min-width: 0 !important; }
body.mobile-v3 .espn-matchup-strip .espn-ms-team { font-size: 0.82rem !important; line-height: 1.15 !important; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
body.mobile-v3 .espn-matchup-strip .espn-ms-score { font-size: 1.55rem !important; line-height: 1.05 !important; }
body.mobile-v3 .espn-matchup-strip .espn-ms-mid * { font-size: 0.66rem !important; }
