/* Old Time Hockey 96zx. Presentation only: the existing five theme palettes remain authoritative.
   Mobile defaults -> tablet (640px) -> desktop (1024px). No Yahoo data or cache behavior here. */
:root {
  --ui-font: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ui-radius: 6px;
  --ui-space: 12px;
  --ui-header-height: 112px;
  --ui-bottom-height: 68px;
}
html { scroll-padding-top: calc(var(--ui-header-height) + 20px); }
html[data-theme='midnight'] { color-scheme: dark; }
html body.oth-mobile,
html body.oth-access,
html body.oth-document {
  font-family: var(--ui-font) !important;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg) !important;
  color: var(--text) !important;
  margin: 0;
}
body.oth-mobile *, body.oth-access *, body.oth-document * { box-sizing: border-box; }
body.oth-mobile :is(h1,h2,h3,h4,h5,.title,.eyebrow,.field label,.main-tab,.btn,.chip,.toggle,select,input,textarea,.teams-tab-accordion-header,.player-detail-tab) {
  font-family: var(--ui-font) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}
body.oth-mobile :is(h1,h2,h3,h4,h5,.title) { font-weight: 650 !important; line-height: 1.3; color: var(--text) !important; }
body.oth-mobile h1 { font-size: 18px; }
body.oth-mobile h2 { font-size: 15px; }
body.oth-mobile :is(h3,h4) { font-size: 13px; }
body.oth-mobile :is(.status,.muted,.small-note,.load-meta,.admin-menu-note,.standings-meta) {
  font-size: 12px; line-height: 1.5; font-weight: 400; color: var(--muted) !important;
  white-space: normal; overflow-wrap: anywhere;
}
body.oth-mobile :is(button,a,select,input,textarea,summary,[role='button'],[tabindex]):focus-visible {
  outline: 2px solid var(--accent) !important; outline-offset: 3px; box-shadow: none !important;
}
body.oth-mobile .wrap { width: 100%; max-width: 1480px; margin: 0 auto; padding: 0 12px 24px; min-width: 0; }
body.oth-mobile .wrap > * { min-width: 0; }
body.oth-mobile .hidden, body.oth-mobile .tab-hidden { display: none !important; }
body.oth-mobile.salary-ui-hidden .salary-ui-feature { display: none !important; }
body.oth-mobile .app-skip-link {
  position: fixed; top: -90px; left: 12px; z-index: 12000; background: var(--accent); color: var(--accent-contrast);
  padding: 12px 16px; border-radius: var(--ui-radius); font-weight: 600;
}
body.oth-mobile .app-skip-link:focus { top: 12px; }
body.oth-mobile .ui-icon { width: 21px; height: 21px; flex-shrink: 0; display: block; }

/* App shell: compact header, single responsive navigation, clear page hierarchy. */
body.oth-mobile .app-header.hero {
  position: sticky; top: 0; z-index: 90; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; padding: calc(12px + env(safe-area-inset-top, 0px)) 12px 12px;
  margin: 0 -12px 0; border: 0 !important; border-bottom: 1px solid var(--line-soft) !important;
  border-radius: 0 !important; background: var(--panel-solid) !important; box-shadow: none !important;
}
body.oth-mobile .app-brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
body.oth-mobile .app-mark, body.oth-access .app-mark {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 36px;
  background: var(--accent); color: var(--accent-contrast, #fff); border-radius: var(--ui-radius);
  font: 700 11px/1 var(--ui-font); letter-spacing: -.03em;
}
body.oth-mobile .app-brand-copy { min-width: 0; }
body.oth-mobile .app-brand h1 { margin: 0 !important; font-size: 16px !important; letter-spacing: -.025em !important; white-space: nowrap; }
body.oth-mobile .app-brand p { margin: 2px 0 0; font-size: 11px; color: var(--muted); }
body.oth-mobile .hero-actions { position: static; display: contents; }
body.oth-mobile .hero-team {
  order: 3; width: 100%; min-width: 0; min-height: 0 !important; height: auto !important;
  padding: 0 !important; background: transparent !important; border: 0 !important; border-radius: 0 !important;
}
body.oth-mobile .hero-team .status { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
body.oth-mobile .hero-team strong { font-weight: 600; color: var(--text) !important; }
body.oth-mobile .admin-menu { position: relative; flex: 0 0 auto; }
body.oth-mobile .admin-menu-toggle { width: 44px !important; height: 44px !important; padding: 0 !important; border-color: var(--line-soft) !important; }
body.oth-mobile .admin-menu-dropdown {
  position: fixed; top: calc(var(--ui-header-height) + 8px); right: max(12px, env(safe-area-inset-right, 0px));
  width: min(330px, calc(100vw - 24px)); min-width: 0; max-height: calc(100dvh - var(--ui-header-height) - 92px);
  overflow-y: auto; padding: 14px; border: 1px solid var(--line); border-radius: 8px !important;
  background: var(--panel-solid) !important; box-shadow: 0 8px 24px var(--overlay) !important; z-index: 120;
}
body.oth-mobile .app-menu-heading { font-size: 14px; font-weight: 650; margin: 0 0 10px; }
body.oth-mobile .admin-menu-dropdown > .btn { width: 100%; justify-content: flex-start; margin-bottom: 8px; }
body.oth-mobile .admin-theme-picker { display: grid; grid-template-columns: 1fr; gap: 6px; border: 0; padding: 6px 0; }
body.oth-mobile .admin-theme-picker span { font-size: 12px; color: var(--muted) !important; text-transform: none; }
body.oth-mobile .admin-menu-note { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
body.oth-mobile #mainTabsSection {
  position: fixed; z-index: 80; left: 0; right: 0; bottom: 0; width: 100%;
  padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)) !important;
  margin: 0 !important; border: 0 !important; border-top: 1px solid var(--line-soft) !important; border-radius: 0 !important;
  background: var(--panel-solid) !important; box-shadow: none !important;
}
body.oth-mobile #mainTabs {
  display: grid !important; grid-template-columns: repeat(5, minmax(0,1fr)); width: 100%; gap: 2px !important;
  padding: 0 !important; margin: 0 !important; border: 0 !important; overflow: visible;
}
body.oth-mobile #mainTabs .main-tab {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
  width: 100%; min-width: 0; min-height: 54px; height: auto; padding: 6px 1px !important; margin: 0 !important;
  color: var(--muted) !important; background: transparent !important; border: 0 !important; border-radius: 6px !important;
  font-size: 10.5px !important; font-weight: 500 !important; line-height: 1.3; box-shadow: none !important;
  transform: none !important; top: auto !important; text-transform: none !important;
}
body.oth-mobile #mainTabs .main-tab::before, body.oth-mobile #mainTabs .main-tab::after { content: none !important; }
body.oth-mobile #mainTabs .main-tab.active {
  color: var(--accent) !important; background: var(--accent-soft) !important; font-weight: 650 !important;
}
body.oth-mobile #mainTabs .main-tab:hover { filter: none !important; opacity: 1 !important; background: var(--surface-hover) !important; }
body.oth-mobile #mainTabs .main-tab.active:hover { background: var(--accent-soft-strong) !important; color: var(--accent) !important; }
body.oth-mobile #mainTabs .main-tab.hidden { display: none !important; }
body.oth-mobile .app-page-heading {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 22px 0 16px; min-width: 0;
}
body.oth-mobile .app-page-heading > div { min-width: 0; }
body.oth-mobile .app-eyebrow { font-size: 10px; line-height: 1.4; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
body.oth-mobile .app-page-heading h2 { font-size: 24px !important; letter-spacing: -.035em !important; margin: 0 0 4px; }
body.oth-mobile .app-page-heading p { font-size: 12px; color: var(--muted); margin: 0; overflow-wrap: anywhere; }
body.oth-mobile .app-source-badge { flex-shrink: 0; margin-top: 4px; padding: 5px 8px; border-radius: 4px; font-size: 10px; font-weight: 600; background: var(--surface-muted); color: var(--muted); white-space: nowrap; }
body.oth-mobile .app-source-badge.live { color: var(--accent); background: var(--accent-soft); }

/* Shared sections and controls. Small type is not allowed to shrink touch targets. */
body.oth-mobile :is(.panel,.admin-section,.cache-card,.roster-card,.trade-card,.draft-pick-card,.player-news-item,.matchup-card,.matchup-detail-card,.player-detail-card,.queue,.table-wrap,.player-filter-panel,.my-team-command-bar) {
  background: var(--panel-solid) !important; background-image: none !important; border: 1px solid var(--line-soft) !important;
  border-radius: var(--ui-radius) !important; box-shadow: none !important; backdrop-filter: none !important; min-width: 0;
}
body.oth-mobile .panel { padding: 14px 12px; margin: 12px 0; }
body.oth-mobile .section-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line-soft); min-width: 0; }
body.oth-mobile .section-title > * { min-width: 0; max-width: 100%; }
body.oth-mobile .section-title h2 { font-size: 14px !important; margin: 0; }
body.oth-mobile .section-title .status { text-align: left; margin-left: 0; }
body.oth-mobile :is(.btn,.btn.small,.chip,.toggle,.input,select,.candidate,.keeper-salary-input,.player-detail-tab,.roster-tiles-toggle,.salary-lock-icon,.player-filter-toggle) {
  min-height: 44px !important; height: auto !important; border-radius: var(--ui-radius) !important;
  font-family: var(--ui-font) !important; font-size: 13px; font-weight: 500 !important; line-height: 1.35 !important;
}
body.oth-mobile .btn { padding: 10px 12px !important; gap: 6px; white-space: normal; text-align: center; }
body.oth-mobile .btn.secondary { color: var(--text) !important; border-color: var(--line) !important; background: var(--panel-solid) !important; }
body.oth-mobile .btn.secondary:hover:not(:disabled) { background: var(--surface-hover) !important; border-color: var(--control-border) !important; color: var(--text) !important; }
body.oth-mobile :is(.btn.active,.chip.active,.player-detail-tab.active) { background: var(--accent-soft) !important; border-color: var(--accent) !important; color: var(--accent) !important; }
body.oth-mobile :is(input.input,select,.candidate,.keeper-salary-input) { padding: 10px 11px !important; width: 100%; min-width: 0; max-width: 100%; font-size: 16px !important; color: var(--text) !important; background: var(--control-bg) !important; }
body.oth-mobile textarea { width: 100%; min-width: 0; font-size: 14px; line-height: 1.5; padding: 12px; border-radius: var(--ui-radius) !important; }
body.oth-mobile .field label { color: var(--muted) !important; font-size: 11px !important; font-weight: 500 !important; letter-spacing: normal !important; margin: 0 0 5px; text-transform: none !important; }
body.oth-mobile .toggle { padding: 8px 10px !important; gap: 8px; align-items: center; white-space: normal; font-size: 12px; }
body.oth-mobile input[type='checkbox'] { width: 17px; height: 17px; flex-shrink: 0; accent-color: var(--accent); }
body.oth-mobile .btn:disabled, body.oth-mobile .chip:disabled { opacity: .5; }
body.oth-mobile :is(.connect-row,.admin-sync-controls,.player-detail-actions) { gap: 8px; }
body.oth-mobile .view-toggle { display: inline-flex; flex-wrap: nowrap; padding: 3px; border: 1px solid var(--line-soft); border-radius: 7px; gap: 2px; background: var(--surface-muted); }
body.oth-mobile .view-toggle .btn { min-width: 58px; min-height: 38px !important; border: 0 !important; border-radius: 4px !important; background: transparent !important; padding: 8px 12px !important; color: var(--muted) !important; }
body.oth-mobile .view-toggle .btn.open { color: var(--accent) !important; background: var(--panel-solid) !important; box-shadow: var(--shadow) !important; }
body.oth-mobile .players-heading .view-toggle { width: auto !important; flex: 0 0 auto !important; }
body.oth-mobile .players-heading { gap: 8px !important; flex-wrap: wrap !important; width: auto !important; }
body.oth-mobile .players-title-actions { display: flex; gap: 6px; flex: 1 1 100%; margin: 0; align-items: center; justify-content: space-between; }
body.oth-mobile .players-title-actions #resultStatus { margin: 0; text-align: left; font-size: 11px; }
body.oth-mobile .players-heading select { min-width: 74px; width: 82px; }
body.oth-mobile .gear-btn { flex: 0 0 44px; width: 44px !important; padding: 0 !important; }
body.oth-mobile .my-team-command-bar { padding: 0 !important; margin: 0 0 16px !important; border: 0 !important; border-radius: 0 !important; }
body.oth-mobile .my-team-range-row, body.oth-mobile .my-team-stat-ranges, body.oth-mobile .my-team-range-tabs {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 2px; padding: 3px; border: 1px solid var(--line-soft); border-radius: 7px; background: var(--surface-muted);
}
body.oth-mobile [data-myteam-range] { display: inline-flex; align-items: center; justify-content: center; flex: 1; min-width: 0; white-space: nowrap; min-height: 42px !important; padding: 8px 6px !important; border: 0 !important; border-radius: 4px !important; font-size: 12px; font-weight: 500 !important; color: var(--muted) !important; background: transparent !important; }
body.oth-mobile [data-myteam-range].active { background: var(--panel-solid) !important; color: var(--accent) !important; box-shadow: var(--shadow) !important; }
body.oth-mobile .my-team-summary { font-size: 11px !important; color: var(--muted); line-height: 1.6; margin: 10px 0 0; overflow-wrap: anywhere; }
body.oth-mobile .my-team-summary .player-snapshot-note { font-size: inherit; }
body.oth-mobile .player-filter-panel { padding: 12px !important; margin: 0 0 14px; background: var(--surface-muted) !important; }
body.oth-mobile .search-grid, body.oth-mobile .player-filter-main { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 10px !important; }
body.oth-mobile .filter-field-search { grid-column: 1 / -1 !important; }
body.oth-mobile .quick-filter-row { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; }
body.oth-mobile .quick-pos { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding: 2px 2px 6px; -webkit-overflow-scrolling: touch; }
body.oth-mobile .quick-pos .chip { flex: 0 0 auto; min-width: 40px; padding: 8px 10px; font-size: 12px; }
body.oth-mobile .pager { margin-top: 16px; justify-content: space-between; flex-wrap: nowrap; gap: 8px; }
body.oth-mobile .pager .status { font-size: 11px; text-align: center; }
body.oth-mobile .pager .btn { flex-shrink: 0; }
body.oth-mobile .subtable-title { margin: 16px 0 8px; align-items: center; gap: 8px; }
body.oth-mobile .subtable-title h3 { font-size: 13px !important; color: var(--text) !important; }
body.oth-mobile .subtable-title .status { font-size: 11px; text-align: right; }

/* My Team: no duplicated section heading or empty Info/Stats shell above the range control. */
body.oth-mobile:not([data-ui-view="rosters"]) #playersSection > .teams-tab-accordion-header { display: none !important; }
body.oth-mobile:not([data-ui-view="rosters"]) #playersSection > .teams-tab-accordion-body { margin-top: 0 !important; padding: 12px !important; }
body.oth-mobile.myteam-mode #playersSection .players-heading { display: none !important; }
body.oth-mobile.myteam-mode #playersSection .players-section-title { min-height: 0; margin: 0; padding: 0; border: 0; }
body.oth-mobile.myteam-mode #playersSection .players-section-title:has(.gear-btn:not(.hidden)) { margin-bottom: 8px; }
body.oth-mobile.myteam-mode #playersSection #resultStatus { display: none !important; }
body.oth-mobile.myteam-mode #playersSection .players-title-actions { flex-basis: auto; justify-content: space-between; }
body.oth-mobile #myTeamRangeTabs [data-myteam-range] { background: transparent !important; color: var(--muted) !important; border: 0 !important; box-shadow: none !important; }
body.oth-mobile #myTeamRangeTabs [data-myteam-range].active { background: var(--accent) !important; color: var(--accent-contrast) !important; }
body.oth-mobile.myteam-mode #playerFilterPanel { padding: 8px !important; margin: 0 0 10px !important; }
body.oth-mobile.myteam-mode #playerFilterPanel > .section-title { display: none !important; }
body.oth-mobile.myteam-mode #playerFilterPanel .quick-filter-row { margin-top: 0 !important; gap: 0 !important; }
body.oth-mobile.myteam-mode #playerFilterPanel .quick-pos-field > label { font-size: 10px; margin-bottom: 2px; }
body.oth-mobile.myteam-mode #playerFilterPanel .quick-pos { padding-bottom: 2px; }
body.oth-mobile .ui-table-scroll table .ui-slot-column { width: 48px !important; min-width: 48px !important; max-width: 48px !important; }

body.oth-mobile.myteam-mode #playersSection #resultStatus { text-align: left; }
body.oth-mobile .ui-filter-toggle { display: none; }
@media (max-width: 639px) {
  body.oth-mobile .players-heading { width: 100% !important; justify-content: space-between; }
  body.oth-mobile #playersSectionTitle { font-size: 12px !important; }
  body.oth-mobile .players-heading .players-count-controls select { width: 65px; min-width: 65px; }
  body.oth-mobile .players-heading .view-toggle { margin-left: auto; }
  body.oth-mobile .view-toggle .btn { min-width: 45px; padding: 8px 9px !important; }
  body.oth-mobile #myTeamRangeTabs [data-myteam-range] { font-size: 11px !important; padding-left: 2px !important; padding-right: 2px !important; }
  body.oth-mobile #playerFilterPanel.is-players-filters .ui-filter-toggle { display: inline-flex; }
  body.oth-mobile #playerFilterPanel.is-players-filters > .section-title { padding: 0 0 8px; margin-bottom: 8px; }
  body.oth-mobile #playerFilterPanel.is-players-filters:not(.ui-filters-expanded) .player-filter-main > :not(.filter-field-search),
  body.oth-mobile #playerFilterPanel.is-players-filters:not(.ui-filters-expanded) .quick-filter-row { display: none !important; }
}

/* Tables keep real column widths. Each scrolling viewport is keyboard and pointer accessible. */
body.oth-mobile .ui-table-scroll, body.oth-mobile .table-wrap, body.oth-mobile .queue {
  width: 100%; max-width: 100%; min-width: 0; overflow: auto !important; -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain; touch-action: pan-x pan-y pinch-zoom;
  scrollbar-width: thin; scrollbar-color: var(--control-border) var(--surface-muted);
  border: 1px solid var(--line-soft); border-radius: var(--ui-radius); background: var(--table-cell);
}
body.oth-mobile .table-wrap, body.oth-mobile .table-wrap.split { max-height: min(62dvh, 600px); margin-bottom: 8px; }
body.oth-mobile .ui-table-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
body.oth-mobile .ui-table-scroll::-webkit-scrollbar-track { background: var(--surface-muted); }
body.oth-mobile .ui-table-scroll::-webkit-scrollbar-thumb { background: var(--control-border); border: 2px solid var(--surface-muted); border-radius: 8px; }
body.oth-mobile .ui-table-scroll.ui-overflow { cursor: grab; }
body.oth-mobile .ui-table-scroll.ui-dragging, body.oth-mobile .ui-table-scroll.ui-dragging * { cursor: grabbing !important; user-select: none !important; }
body.oth-mobile .ui-table-hint { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 0 1px 6px; font-size: 10px; line-height: 1.4; color: var(--muted); }
body.oth-mobile .ui-table-hint[hidden] { display: none !important; }
body.oth-mobile .ui-table-hint .ui-icon { width: 14px; height: 14px; }
body.oth-mobile .ui-table-scroll.ui-more-right { border-right-color: var(--control-border) !important; }
body.oth-mobile .ui-table-scroll.ui-more-left { border-left-color: var(--control-border) !important; }
body.oth-mobile .ui-table-scroll table { width: 100%; table-layout: auto !important; border-collapse: separate; border-spacing: 0; margin: 0; }
body.oth-mobile .ui-table-scroll :is(th,td) { font-size: 12px !important; line-height: 1.4; padding: 10px 9px !important; border: 0; border-bottom: 1px solid var(--line-soft) !important; white-space: nowrap; font-weight: 400; min-height: 38px; }
/* Reset legacy nth-child sticky selectors. Freeze semantic Player/Team cells, not an arbitrary stat. */
body.oth-mobile .ui-table-scroll table :is(th,td) { left: auto !important; box-shadow: none !important; background: var(--table-cell) !important; }
body.oth-mobile .ui-table-scroll table td { position: static !important; z-index: auto !important; color: var(--text); }
body.oth-mobile .ui-table-scroll table th {
  position: sticky !important; top: 0 !important; z-index: 4 !important; background: var(--table-head) !important;
  color: var(--muted) !important; font-size: 10px !important; font-weight: 600 !important; letter-spacing: .02em; text-transform: uppercase;
}
body.oth-mobile .ui-table-scroll table td.ui-freeze { position: sticky !important; left: 0 !important; z-index: 5 !important; box-shadow: 1px 0 0 var(--line) !important; }
body.oth-mobile .ui-table-scroll table th.ui-freeze { position: sticky !important; left: 0 !important; z-index: 8 !important; box-shadow: 1px 0 0 var(--line) !important; }
body.oth-mobile .ui-table-scroll table .ui-player-column { width: 148px !important; min-width: 148px !important; max-width: 148px !important; overflow: hidden; text-overflow: ellipsis; }
body.oth-mobile .ui-table-scroll .name-cell { font-weight: 600 !important; font-size: 12px !important; }
body.oth-mobile .ui-table-scroll tbody tr:hover td { background: var(--surface-hover) !important; }
body.oth-mobile .ui-table-scroll tbody tr:last-child td { border-bottom: 0 !important; }
body.oth-mobile .ui-table-scroll .pill { font-size: 10px; font-weight: 500; padding: 3px 5px; border-radius: 3px !important; }
body.oth-mobile .keeper-round-input { width: 78px; min-height: 44px; padding: 8px; border: 1px solid var(--control-border); border-radius: var(--ui-radius); background: var(--panel-solid); color: var(--text); font: 16px var(--ui-font); }
body.oth-mobile .player-news-icon { border-radius: 4px !important; vertical-align: middle; min-width: 28px; height: 28px; }
body.oth-mobile :is(.empty,.matchups-empty,.standings-empty) { padding: 24px 14px !important; font-size: 13px; line-height: 1.6; text-align: center; color: var(--muted); }

/* Team navigation and existing trade/draft sections. */
body.oth-mobile .roster-grid { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 8px !important; }
body.oth-mobile .roster-mobile-select { display: none !important; }
body.oth-mobile .roster-card { padding: 12px !important; transition: background-color .12s, border-color .12s; }
body.oth-mobile .roster-card .team { font-size: 12px; font-weight: 600 !important; line-height: 1.45; white-space: normal !important; overflow-wrap: anywhere; }
body.oth-mobile .roster-card .sub { font-size: 10px; line-height: 1.4; margin-top: 6px; color: var(--muted) !important; }
body.oth-mobile .roster-card.active { border-color: var(--accent) !important; background: var(--accent-soft) !important; color: var(--accent) !important; }
body.oth-mobile .roster-card.active .team, body.oth-mobile .roster-card.active .sub { color: var(--accent) !important; }
body.oth-mobile .roster-card:hover { filter: none !important; opacity: 1 !important; background: var(--surface-hover) !important; }
body.oth-mobile .teams-tab-accordion-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px;
  padding: 12px !important; border: 0 !important; background: var(--panel-solid) !important; color: var(--text) !important;
  text-align: left; border-radius: var(--ui-radius) !important; box-shadow: none !important;
}
body.oth-mobile .teams-tab-accordion-header .title { font-size: 14px !important; font-weight: 650 !important; color: var(--text) !important; overflow-wrap: anywhere; }
body.oth-mobile .teams-tab-accordion-header .meta { display: flex; align-items: center; gap: 8px; min-width: 0; }
body.oth-mobile .teams-tab-accordion-header .status-text { font-size: 11px; font-weight: 400; color: var(--muted); white-space: normal; text-align: right; }
body.oth-mobile .teams-tab-accordion-header .chev { color: var(--muted); font-size: 10px; }
body.oth-mobile.rosters-mode .teams-tab-accordion-section { padding: 0 !important; }
body.oth-mobile.rosters-mode .teams-tab-accordion-body { padding: 0 12px 14px !important; }
body.oth-mobile .team-trades-body { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; }
body.oth-mobile .trade-card { margin: 0; overflow: hidden; }
body.oth-mobile .trade-card summary { min-height: 48px; padding: 12px !important; font-size: 12px !important; font-weight: 600 !important; color: var(--text) !important; white-space: normal; overflow-wrap: anywhere; }
body.oth-mobile .trade-body { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; padding: 0 12px 12px; }
body.oth-mobile .trade-col { min-width: 0; }
body.oth-mobile .trade-col h4 { font-size: 10px !important; font-weight: 600 !important; color: var(--muted) !important; margin: 0 0 6px; }
body.oth-mobile .trade-col ul { padding-left: 16px; font-size: 12px; margin: 0; }
body.oth-mobile .trade-col li { margin-bottom: 4px; overflow-wrap: anywhere; }
body.oth-mobile .draft-pick-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 8px; }
body.oth-mobile .draft-pick-card { padding: 12px !important; min-width: 0; }
body.oth-mobile .draft-pick-card strong { font-family: var(--ui-font) !important; color: var(--muted) !important; font-size: 10px; font-weight: 600 !important; }
body.oth-mobile .draft-pick-item { font-size: 12px; margin-top: 6px; overflow-wrap: anywhere; }
body.oth-mobile .draft-pick-via, body.oth-mobile .draft-pick-empty { font-size: 10px; color: var(--muted); }

/* Scoreboards and standings retain all existing information. */
body.oth-mobile .matchups-grid, body.oth-mobile .standings-grid { display: grid; grid-template-columns: minmax(0,1fr) !important; gap: 12px; }
body.oth-mobile .matchups-top-right { display: flex; flex-direction: column; align-items: flex-start; width: 100%; gap: 8px; }
body.oth-mobile .matchups-controls { display: flex; align-items: center; width: 100%; gap: 8px; flex-wrap: wrap; }
body.oth-mobile .matchups-controls select { width: auto; flex: 1; min-width: 0; }
body.oth-mobile .matchup-card { padding: 0 !important; overflow: hidden; }
body.oth-mobile .matchup-teams { display: flex; gap: 10px; padding: 14px 12px !important; background: var(--surface-muted) !important; border-bottom: 1px solid var(--line-soft); }
body.oth-mobile .matchup-side { flex: 1; min-width: 0; }
body.oth-mobile .matchup-vs { font-size: 10px; color: var(--muted); align-self: center; }
body.oth-mobile .matchup-team-name { font-family: var(--ui-font) !important; font-size: 12px !important; font-weight: 600 !important; line-height: 1.45; min-height: 44px; white-space: normal; overflow-wrap: anywhere; color: var(--text) !important; text-transform: none !important; border-radius: 4px; }
body.oth-mobile .matchup-points { font-size: 26px !important; font-weight: 650 !important; color: var(--accent) !important; letter-spacing: -.04em; }
body.oth-mobile .matchup-games { font-size: 10px; white-space: normal; color: var(--muted); }
body.oth-mobile .matchup-stats { width: 100%; min-width: 0; padding: 0 !important; }
body.oth-mobile .matchup-stats .ui-table-scroll { border: 0 !important; border-radius: 0; }
body.oth-mobile .matchup-stats table { table-layout: fixed !important; min-width: 0 !important; width: 100%; }
body.oth-mobile .matchup-stats :is(th,td) { width: 33.33%; text-align: center !important; padding: 7px 8px !important; font-size: 12px !important; }
body.oth-mobile .matchup-stats th { overflow-wrap: anywhere; white-space: normal; font-size: 10px !important; text-transform: none; }
body.oth-mobile .matchup-stats td:nth-child(2) { color: var(--muted); font-size: 10px !important; }
body.oth-mobile .matchup-detail-score-row { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 10px; padding: 14px 0; }
body.oth-mobile .matchup-detail-score-row .team { font-size: 12px !important; overflow-wrap: anywhere; }
body.oth-mobile .matchup-detail-score-row strong { font-size: 22px; color: var(--accent); }
body.oth-mobile .matchup-detail-toggle { display: flex; gap: 6px; margin: 0 0 14px; }
body.oth-mobile .matchup-detail-section-title { font-size: 13px !important; color: var(--text) !important; padding: 14px 0 8px; }
body.oth-mobile .standings-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
body.oth-mobile .standings-controls select { width: 100px; }
body.oth-mobile .standings-division { min-width: 0; padding: 0; background: transparent !important; border: 0 !important; }
body.oth-mobile .standings-division h3 { font-size: 13px; margin: 0 0 10px; }
body.oth-mobile .standings-table { min-width: 440px; }
body.oth-mobile .standings-team-link { font: 600 12px/1.5 var(--ui-font); color: var(--text) !important; min-height: 30px; text-align: left; white-space: normal; }

/* Sheets, dialogs, loading, administration, and footer use the same spacing and typography. */
body.oth-mobile :is(.player-detail-modal,.preferred-team-modal) { padding: 0 !important; align-items: flex-end !important; background: var(--overlay) !important; z-index: 200 !important; }
body.oth-mobile :is(.player-detail-card,.preferred-team-card) {
  width: 100% !important; max-width: 100% !important; max-height: calc(100dvh - max(16px,env(safe-area-inset-top,0px))) !important;
  margin: 0 !important; padding: 20px 14px calc(20px + env(safe-area-inset-bottom,0px)) !important;
  border-radius: 12px 12px 0 0 !important; border: 1px solid var(--line) !important; overflow: auto; overscroll-behavior-y: contain;
  background: var(--panel-solid) !important; color: var(--text) !important; box-shadow: none !important;
}
body.oth-mobile .player-detail-header { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
body.oth-mobile .player-detail-headshot { width: 56px; height: 56px; object-fit: contain; flex-shrink: 0; }
body.oth-mobile .player-detail-title { font-size: 20px !important; font-weight: 650 !important; letter-spacing: -.03em !important; }
body.oth-mobile .player-detail-close { min-width: 44px; min-height: 44px; border-radius: var(--ui-radius) !important; }
body.oth-mobile .player-detail-meta { font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
body.oth-mobile .player-detail-grid { grid-template-columns: minmax(0,1fr) !important; gap: 10px; }
body.oth-mobile .player-detail-tabs { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; margin: 16px 0 12px; }
body.oth-mobile .player-detail-tab { padding: 8px 12px; flex-shrink: 0; font-size: 12px; }
body.oth-mobile .player-detail-panel { min-width: 0; }
body.oth-mobile .ui-table-scroll table.player-detail-stats { min-width: 0 !important; width: 100% !important; table-layout: fixed !important; }
body.oth-mobile .player-detail-stats td { width: 50%; }
body.oth-mobile .player-detail-stats td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
body.oth-mobile .player-news-item { padding: 12px; }
body.oth-mobile .player-news-title { font-size: 13px !important; }
body.oth-mobile .player-news-text { font-size: 13px; line-height: 1.6; }
body.oth-mobile .preferred-team-card h2 { font-size: 20px !important; margin: 0 0 8px; }
body.oth-mobile .preferred-team-card p { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
body.oth-mobile .preferred-team-actions { display: flex; gap: 8px; margin-top: 16px; }
body.oth-mobile .preferred-team-actions .btn { flex: 1; }
body.oth-mobile.ui-dialog-open { overflow: hidden; }
body.oth-mobile .loading { background: var(--loading-overlay) !important; backdrop-filter: none !important; }
body.oth-mobile .loading > div { border-radius: 8px !important; padding: 18px; background: var(--panel-solid) !important; box-shadow: var(--shadow) !important; }
body.oth-mobile .bar { height: 5px; border: 0; background: var(--surface-muted); }
body.oth-mobile .bar > span { background: var(--accent) !important; }
body.oth-mobile .admin-section { padding: 12px !important; margin: 12px 0; }
body.oth-mobile .admin-section-switches { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
body.oth-mobile .admin-section .grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
body.oth-mobile .admin-section .grid > .field { grid-column: auto !important; }
body.oth-mobile .admin-section .grid > :is(.wide,.full) { grid-column: 1 / -1 !important; }
body.oth-mobile .cache-grid { grid-template-columns: minmax(0,1fr) !important; gap: 10px; }
body.oth-mobile .cache-card { padding: 12px !important; }
body.oth-mobile .cache-card .value { font-size: 20px; font-weight: 650; }
body.oth-mobile .admin-setup-guide { font-size: 12px; padding: 12px; background: var(--surface-muted) !important; border: 1px solid var(--line-soft); border-radius: var(--ui-radius); }
body.oth-mobile pre { max-width: 100%; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; line-height: 1.5; }
body.oth-mobile .columns { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
body.oth-mobile .app-footer {
  margin: 0 auto; padding: 12px 16px calc(var(--ui-bottom-height) + 20px + env(safe-area-inset-bottom,0px)); max-width: 1480px;
  font-size: 10px; line-height: 1.6; color: var(--muted); text-align: center; overflow-wrap: anywhere;
}
body.oth-mobile #publicAppVersion { display: block; font-size: 9px; font-weight: 400; }
body.oth-mobile .yahoo-attribution { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line-soft); font-size: 10px; }
body.oth-mobile .yahoo-attribution img { height: 19px; width: auto; }
body.oth-mobile .yahoo-attribution a { color: var(--accent); }

/* Shared access and information pages; existing private-access form and policy copy are retained. */
body.oth-access, body.oth-document { --accent-contrast: #fff; --ui-radius: 6px; }
html[data-theme='midnight'] body.oth-access, html[data-theme='midnight'] body.oth-document { --accent-contrast: #08111f; }
body.oth-access main { width: min(440px,calc(100% - 32px)); margin: min(12vh,96px) auto 32px; }
body.oth-document main { width: min(820px,calc(100% - 32px)); margin: 32px auto; }
body.oth-access .card, body.oth-document .card { padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: none; }
body.oth-access .app-mark { margin-bottom: 20px; width: 42px; height: 42px; }
body.oth-access h1, body.oth-document h1, body.oth-document h2 { font-family: var(--ui-font); text-transform: none; letter-spacing: -.03em; font-size: 25px; line-height: 1.25; color: var(--text); margin: 0 0 12px; font-weight: 650; }
body.oth-document h2 { font-size: 18px; margin-top: 24px; }
body.oth-access :is(p,li), body.oth-document :is(p,li) { font-size: 13px; line-height: 1.7; }
body.oth-access label { font-family: var(--ui-font); font-size: 12px; color: var(--muted); font-weight: 500; }
body.oth-access input { width: 100%; height: 48px; font: 16px var(--ui-font); padding: 10px 12px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 6px; }
body.oth-access button { width: 100%; min-height: 46px; margin-top: 12px; font: 600 13px var(--ui-font); padding: 12px; background: var(--accent); color: var(--accent-contrast); border: 0; border-radius: 6px; }
body.oth-access .muted { font-size: 11px; }
body.oth-access input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.oth-document .notice { padding: 14px; border-radius: 6px; font-size: 14px; }

body.oth-access, body.oth-document { --accent-contrast: #fff; }
html[data-theme="midnight"] body.oth-access, html[data-theme="midnight"] body.oth-document { --accent-contrast: #08111f; }

/* Tablet: preserve the bottom navigation, add breathing room and useful column grids. */
@media (min-width: 640px) {
  body.oth-mobile .wrap { padding-right: 20px; padding-left: 20px; }
  body.oth-mobile .app-header.hero { margin-left: -20px; margin-right: -20px; padding-right: 20px; padding-left: 20px; }
  body.oth-mobile .hero-team { width: auto; order: initial; margin-left: auto; }
  body.oth-mobile .hero-actions { display: flex; gap: 14px; min-width: 0; }
  body.oth-mobile .hero-team .status { max-width: 250px; }
  body.oth-mobile .roster-grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
  body.oth-mobile .matchups-grid, body.oth-mobile .standings-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  body.oth-mobile .draft-pick-list { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
  body.oth-mobile .trade-body { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.oth-mobile .players-title-actions { flex-basis: auto; justify-content: flex-end; }
  body.oth-mobile .players-title-actions #resultStatus { max-width: 360px; text-align: right; }
  body.oth-mobile :is(.player-detail-modal,.preferred-team-modal) { align-items: center !important; padding: 24px !important; }
  body.oth-mobile :is(.player-detail-card,.preferred-team-card) { max-width: 900px !important; max-height: calc(100dvh - 48px) !important; border-radius: 8px !important; padding: 24px !important; }
  body.oth-mobile .preferred-team-card { max-width: 420px !important; }
  body.oth-mobile .player-detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  body.oth-mobile .admin-section-switches { grid-template-columns: repeat(3,minmax(0,1fr)); }
  body.oth-mobile .cache-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  body.oth-mobile .ui-table-scroll table .ui-player-column { width: 190px !important; min-width: 190px !important; max-width: 190px !important; }
  body.oth-mobile .search-grid, body.oth-mobile .player-filter-main { grid-template-columns: repeat(4,minmax(0,1fr)) !important; }
  body.oth-mobile .filter-field-search { grid-column: auto !important; }
}

/* Desktop: same controls become a horizontal top navigation, with six team cards per row. */
@media (min-width: 1024px) {
  :root { --ui-bottom-height: 0px; }
  body.oth-mobile .app-header.hero { padding-top: 16px; padding-bottom: 16px; gap: 16px; }
  body.oth-mobile .app-brand h1 { font-size: 18px !important; }
  body.oth-mobile .app-header .hero-team .status { max-width: 360px; }
  body.oth-mobile #mainTabsSection { position: sticky; top: var(--ui-header-height); left: auto; right: auto; bottom: auto; z-index: 70; padding: 8px 0 !important; border-top: 0 !important; border-bottom: 1px solid var(--line-soft) !important; background: var(--bg) !important; }
  body.oth-mobile #mainTabs { display: flex !important; width: auto; gap: 4px !important; }
  body.oth-mobile #mainTabs .main-tab { flex-direction: row; gap: 8px; width: auto; min-height: 42px; padding: 10px 16px !important; font-size: 12px !important; }
  body.oth-mobile #mainTabs .ui-icon { width: 18px; height: 18px; }
  body.oth-mobile .app-page-heading { margin-top: 24px; margin-bottom: 20px; }
  body.oth-mobile .app-page-heading h2 { font-size: 26px !important; }
  body.oth-mobile .panel { padding: 18px; margin: 16px 0; }
  body.oth-mobile :is(.btn,.btn.small,.chip,.input,select,.candidate,.keeper-salary-input) { min-height: 40px !important; }
  body.oth-mobile :is(input.input,select,.candidate,.keeper-salary-input) { font-size: 13px !important; }
  body.oth-mobile .btn { font-size: 12px; padding: 9px 12px !important; }
  body.oth-mobile .roster-grid { grid-template-columns: repeat(6,minmax(0,1fr)) !important; gap: 10px !important; }
  body.oth-mobile .roster-card { padding: 14px !important; }
  body.oth-mobile .roster-card .team { font-size: 13px; }
  body.oth-mobile .roster-card .sub { font-size: 11px; }
  body.oth-mobile .matchups-grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
  body.oth-mobile .draft-pick-list { grid-template-columns: repeat(6,minmax(0,1fr)) !important; }
  body.oth-mobile .matchups-top-right { width: auto; flex-direction: row; align-items: center; gap: 16px; }
  body.oth-mobile .matchups-controls { width: auto; }
  body.oth-mobile .matchups-controls select { width: 165px; flex: initial; }
  body.oth-mobile .my-team-range-row, body.oth-mobile .my-team-stat-ranges, body.oth-mobile .my-team-range-tabs { max-width: 540px; }
  body.oth-mobile .admin-section .grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  body.oth-mobile .admin-section-switches { display: flex; flex-wrap: wrap; }
  body.oth-mobile .cache-grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
  body.oth-mobile .columns { grid-template-columns: repeat(5,minmax(0,1fr)); }
  body.oth-mobile .app-footer { padding-bottom: 24px; }
  body.oth-mobile .admin-menu-dropdown { top: calc(var(--ui-header-height) + 4px); }
}
@media (prefers-reduced-motion: reduce) {
  body.oth-mobile *, body.oth-mobile *::before, body.oth-mobile *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Visibility remains owned by the original app, including access and tab readiness. */
body.oth-mobile :is(.hidden,.tab-hidden,[hidden]), body.oth-mobile #mainTabsSection.hidden, body.oth-mobile #playersSection.hidden { display: none !important; }

/* 96zx3: compact inline player symbols. Keeper star follows the player name. */
body.oth-mobile .keeper-marker {
  display:inline !important; min-width:0 !important; min-height:0 !important; padding:0 !important;
  margin:0 0 0 3px !important; border:0 !important; border-radius:0 !important; background:transparent !important;
  color:var(--warn) !important; font-size:11px !important; font-weight:800; line-height:1; vertical-align:1px; text-shadow:none !important;
}
body.oth-mobile .keeper-legend { display:flex; align-items:center; flex-wrap:wrap; gap:6px 12px; margin:8px 0; font-size:11px; line-height:1.5; color:var(--muted); }
body.oth-mobile .player-icon-legend { display:inline-flex; align-items:center; flex-wrap:wrap; gap:5px 10px; }
body.oth-mobile .player-icon-legend span { display:inline-flex; align-items:center; gap:3px; }
body.oth-mobile .player-icon-legend b { font-size:11px; line-height:1; }
body.oth-mobile .legend-note-svg { width:12px; height:12px; color:var(--accent); display:block; }
body.oth-mobile .legend-keeper { color:var(--warn); }
body.oth-mobile .legend-ir { color:#ef4444; }
body.oth-mobile .legend-na { color:#fca5a5; }
body.oth-mobile .keeper-legend-status { color:var(--muted); }
body.oth-mobile .keeper-reload { border:0; padding:7px 0; min-height:32px; font:inherit; background:transparent; color:var(--accent); text-decoration:underline; cursor:pointer; }
body.oth-mobile .keeper-reload:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
body.oth-mobile .player-detail-title h2 .keeper-marker { vertical-align:middle; }

/* 96zx2: team cards size naturally to content on mobile. */
body.oth-mobile .roster-card { min-height: unset !important; }
body.oth-mobile .roster-card .team { min-height: unset !important; }
