/* Mobile reading scale, shared by the service and public documents.
   Keep small metadata, form controls, official player artwork and touch targets
   at their existing sizes. Desktop typography is deliberately outside this scope. */
@media (max-width:767px) {
  :root body.user-service {
    --mobile-type-title:20px;
    --mobile-type-section:16px;
    --mobile-type-item:15px;
    --mobile-type-number:16px;
  }
  :root body.user-service #servicePageTitle,
  :root body.user-service #serviceMain :is(.price-page-heading,.ledger-page-heading,.community-page-heading,.uw-ranking-entry,.uw-page-heading,.squad-meta-workbench-head) h1,
  :root body.user-service :is(#boardModeView,#recordsModeView)[data-community-ready] .community-page-title,
  :root body.user-service.user-document .document-page-heading h1 {
    font-size:var(--mobile-type-title); line-height:1.4; letter-spacing:-.03em;
  }
  :root body.user-service #homeModeView :is(#homeCandidatesTitle,#homePopularBoardTitle,#homeSuperRealTitle,#homeProductInsightsTitle),
  :root body.user-service .uw-ledger-heading h2,
  :root body.user-service .uw-section-title,
  :root body.user-service #playersModeView .players-panel-head h2,
  :root body.user-service #metaInsightModeView h3,
  :root body.user-service #recordsModeView[data-community-ready] .ledger-section-title {
    font-size:var(--mobile-type-section); line-height:1.45;
  }
  :root body.user-service :is(#homeCandidateList,#buyTopList) .candidate-name,
  :root body.user-service #trainingModeView :is(.training-player-photo-name,.training-card-head h3),
  :root body.user-service #recordsModeView[data-community-ready] .trade-record-player {
    font-size:var(--mobile-type-item); line-height:1.45;
  }
  :root body.user-service :is(#homeCandidateList,#buyTopList) .candidate-readout-item strong,
  :root body.user-service #recordsModeView[data-community-ready] .trade-ledger-grid strong {
    font-size:var(--mobile-type-number); line-height:1.4;
  }
  :root body.user-service #trainingModeView .training-inline-score strong,
  :root body.user-service #recordsModeView[data-community-ready] .asset-adjustment-row b {
    font-size:20px;
  }
  :root body.user-service #boardModeView[data-community-ready] #boardDetailTitle {
    font-size:20px; line-height:1.45;
  }
  :root body.user-service #boardModeView[data-community-ready] #boardDetailBody {
    font-size:15px; line-height:1.75;
  }
  :root body.user-service #squadSearchModal #squadDiagnosisMount #conclusion.usq-overview .owner-rank .nick {
    font-size:20px !important;
  }
  :root body.user-service #squadSearchModal #squadDiagnosisMount #conclusion.usq-overview .hero-score {
    font-size:20px !important;
  }
  :root body.user-service #squadSearchModal #squadDiagnosisMount .usq-summary .value,
  :root body.user-service #squadSearchModal #squadDiagnosisMount .usq-summary .usq-win > .value {
    font-size:20px !important;
  }
  :root body.user-service #playerModal[data-player-shell='dossier'] .pp-playername {
    font-size:16px;
  }
  :root body.user-service #playerModal[data-player-shell='dossier'] :is(.decision-kpi strong,.exec-item-current strong) {
    font-size:20px;
  }
  :root body.user-service #playerModal[data-player-shell='dossier'] .trade-add-panel h3 {
    font-size:18px;
  }
  :root body.user-service.user-document.user-reading .document-reading-body > .card:first-child > p:first-of-type {
    font-size:16px;
  }
  :root body.user-service.user-document.user-reading .document-reading-body h2,
  :root body.user-service.user-document .notice-title { font-size:18px; }
  :root body.user-service.user-document .notice-body h2,
  :root body.user-service.user-document.user-settings .p-name { font-size:20px; }
  :root body.user-service.user-document.user-trade-report .row b,
  :root body.user-service.user-document.user-league-report td { font-size:16px; }
  /* Detail headings have their own high-specificity rules in page styles. */
  :root body.user-service #playerModal[data-player-shell='dossier'] #modalTabDecision .up-decision-summary strong,
  :root body.user-service #playerModal[data-player-shell='dossier'] #modalTabDecision .exec-item-current strong,
  :root body.user-service #playerModal[data-player-shell='dossier'] :is(.decision-expect-card,.report-status-band) strong {
    font-size:20px;
  }
  :root body.user-service #squadSearchModal.uw-squad-workbench > .modal-sheet > .modal-head > strong,
  :root body.user-service #playersTraitModal .players-modal-group > h3 {
    font-size:18px;
  }
  :root body.user-service #metaInsightModeView .squad-meta-section-head h3,
  :root body.user-service #trainingModeView .training-top-card h2 { font-size:16px; }
  :root body.user-service #metaInsightModeView .squad-meta-rank-col { font-size:18px; }
  :root body.user-service :is(#homeCandidateList,#buyTopList) .candidate-name,
  :root body.user-service :is(#homeCandidateList,#buyTopList) .candidate-readout-item strong {
    font-weight:700;
  }
  :root body.user-service.user-document { font-size:14px; }
  :root body.user-service.user-document.user-reading .document-reading-body > .card:first-child > p:first-of-type {
    font-size:15px;
  }
}


/* Squad data uses compact rows, not spacious mobile cards. */
@media (max-width:767px) {
  :root body.user-service .uw-ranking-board :is(th,td) { font-size:12px; line-height:1.4; }
  :root body.user-service .uw-ranking-board th { height:36px; padding:6px 4px; }
  :root body.user-service .uw-ranking-board td { height:44px; padding:6px 4px; }
  :root body.user-service .uw-ranking-board td:first-child,
  :root body.user-service #squadValueLeagueRankings .squad-value-league-rank { font-size:12px !important; font-weight:600; }
  :root body.user-service .uw-ranking-board .squad-rank-owner-link { font-size:12px; }
  :root body.user-service #squadCostMeta { margin:8px 0 10px; font-size:12px; }
  :root body.user-service #squadCostModeView .squad-cost-table { display:table; table-layout:fixed; width:100%; }
  :root body.user-service #squadCostModeView .squad-cost-table thead { display:table-header-group; }
  :root body.user-service #squadCostModeView .squad-cost-table tbody { display:table-row-group; }
  :root body.user-service #squadCostModeView .squad-cost-table :is(thead,tbody) tr { display:table-row; padding:0; }
  :root body.user-service #squadCostModeView .squad-cost-table :is(th,td) { display:table-cell; padding:6px 3px; border:0; border-bottom:1px solid var(--ui-line); text-align:right; font-size:11px; line-height:1.4; vertical-align:middle; }
  :root body.user-service #squadCostModeView .squad-cost-table th:nth-child(1) { width:10%; }
  :root body.user-service #squadCostModeView .squad-cost-table th:nth-child(2) { width:24%; }
  :root body.user-service #squadCostModeView .squad-cost-table th:nth-child(3) { width:13%; }
  :root body.user-service #squadCostModeView .squad-cost-table th:nth-child(4) { width:14%; }
  :root body.user-service #squadCostModeView .squad-cost-table th:nth-child(5) { width:23%; }
  :root body.user-service #squadCostModeView .squad-cost-table th:nth-child(6) { width:16%; }
  :root body.user-service #squadCostModeView .squad-cost-table th button,
  :root body.user-service #squadCostModeView .squad-cost-table th[aria-sort]:not([aria-sort='none']) button { border:0; border-radius:0; background:transparent; padding:0; min-height:32px; font-size:11px; line-height:1.4; text-align:inherit; box-shadow:none; word-break:keep-all; white-space:nowrap; }
  :root body.user-service #squadCostModeView .squad-cost-table td { height:44px; white-space:nowrap; }
  :root body.user-service #squadCostModeView .squad-cost-table td::before { content:none; display:none; }
  :root body.user-service #squadCostModeView .squad-cost-table :is(th,td):nth-child(-n+2) { text-align:left; }
  :root body.user-service #squadCostModeView .squad-cost-table .squad-cost-tier { display:table-cell; }
  :root body.user-service #squadCostModeView .squad-cost-team-link { min-height:32px; font-size:12px; padding:2px 0; line-height:1.4; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  :root body.user-service #squadCostModeView .squad-rank-team { gap:4px; }
  :root body.user-service #squadCostModeView .squad-rank-team img { width:16px; height:16px; flex-basis:16px; }
  :root body.user-service #squadCostModeView .squad-cost-tier-badge { display:none; }
  :root body.user-service #squadCostModeView .squad-cost-table td[colspan] { white-space:normal; text-align:center; }
  :root body.user-service #squadValueLeagueRankings .squad-value-league-table tbody .squad-value-league-row { grid-template-columns:24px minmax(0,1fr) minmax(0,1fr); gap:2px 8px; padding:6px 0; }
  :root body.user-service #squadValueLeagueRankings .squad-value-league-row td { height:auto; font-size:12px; line-height:1.4; }
  :root body.user-service #squadValueLeagueRankings .squad-value-league-owner { min-height:32px; font-size:13px; padding:2px 0; line-height:1.4; }
  :root body.user-service #squadValueLeagueRankings .squad-value-league-row td:first-child { align-self:center; }
  :root body.user-service #squadValueLeagueRankings :is(.squad-value-league-price,.squad-value-league-score-desktop,.squad-value-league-record-desktop) { font-size:11px; line-height:1.4; }
  :root body.user-service #metaInsightModeView .squad-meta-primary-panel { padding:12px 0; }
  :root body.user-service #metaInsightModeView .squad-meta-rank-row { min-height:48px; padding:6px 0; }
  :root body.user-service #metaInsightModeView .squad-meta-rank-col { font-size:12px; font-weight:600; }
  :root body.user-service #metaInsightModeView .squad-meta-affiliation-link strong { font-size:13px; }
  :root body.user-service #metaInsightModeView .squad-meta-affiliation-pct { font-size:12px; font-weight:600; }
}

:root body.user-service .squad-cost-mode-row { display:flex; align-items:center; justify-content:space-between; gap:12px; flex:1; min-width:0; }
:root body.user-service #squadCostInfo { display:inline-flex; align-items:center; justify-content:center; flex:0 0 44px; width:44px; height:44px; padding:0; border:0; background:transparent; color:var(--ui-muted); cursor:pointer; }
@media(max-width:767px) {
  :root body.user-service .squad-cost-mode-row { flex-basis:100%; }
}

/* Shared mobile controls: preserve compact data rows and 16px input text. */
@media(max-width:767px) {
  :root body.user-service :is(.price-search-entry-btn,.squad-search-entry-btn,.home-search-field button,.players-search-submit,.training-search-submit) {
    min-height:44px; height:44px; font-size:13px; font-weight:700; line-height:1.4;
  }
  :root body.user-service .home-search-field { min-height:44px; padding:0; }
  :root body.user-service .home-search-field input { height:44px; min-height:44px; }
  :root body.user-service :is(#playersModeView,#trainingModeView,#metaInsightModeView) :is(.players-search-field,.training-search-field,.squad-meta-player-search-form) input { height:44px; font-size:16px; }
  :root body.user-service :is(#playersModeView,#trainingModeView,#metaInsightModeView) :is(.players-search-submit,.training-search-submit) { height:44px; min-height:44px; font-size:13px; font-weight:700; }
  :root body.user-service :is(#squadRankTabs,#squadPerformanceLeagueTabs,.squad-cost-modes,.squad-meta-search-mode-tabs,.squad-meta-team-mode-tabs,#homeCandidateTabs,#rankTabs) button {
    min-height:44px; font-size:13px; font-weight:600; line-height:1.4;
  }
  :root body.user-service :is(#squadRankTabs,#squadPerformanceLeagueTabs,.squad-cost-modes,.squad-meta-search-mode-tabs,.squad-meta-team-mode-tabs,#homeCandidateTabs,#rankTabs) button.active { font-weight:700; }
  :root body.user-service :is(.records-pager,.squad-rank-pagination,#boardPagination) button {
    min-width:44px; min-height:44px; font-size:13px; font-weight:600;
  }
  :root body.user-service #metaInsightModeView .squad-meta-info-btn { width:44px; height:44px; min-width:44px; min-height:44px; flex:0 0 44px; font-size:12px; font-weight:600; }
}
@media(max-width:767px) {
  :root body.user-service .uw-ranking-board :is(#squadRankTabs,#squadPerformanceLeagueTabs) button { min-height:44px; height:44px; padding:8px 16px; }
  :root body.user-service .uw-workspace-nav .squad-search-entry-btn { font-size:13px; font-weight:700; }
  :root body.user-service #metaInsightModeView :is(.squad-meta-search-mode-tabs,.squad-meta-team-mode-tabs) button { font-size:13px; font-weight:600; }
  :root body.user-service #metaInsightModeView :is(.squad-meta-search-mode-tabs,.squad-meta-team-mode-tabs) button.active { font-weight:700; }
  :root body.user-service #metaInsightModeView .squad-meta-primary-tabs button { min-height:44px; height:44px; padding:8px 12px; font-size:13px; }
  :root body.user-service #metaInsightModeView .squad-meta-team-panel .squad-meta-info-btn { width:44px; height:44px; }
  :root body.user-service #metaInsightModeView .uw-meta-empty { padding:16px 0; }
  :root body.user-service :is(#boardPrevBtn,#boardNextBtn,#boardPageNums button,#recordsPrevBtn,#recordsNextBtn,#recordsPageNums button) { min-width:44px; min-height:44px; font-size:13px; font-weight:600; }
}
@media(max-width:767px) {
  :root body.user-service :is(#candidateFilterInfoBtn,#metaInsightModeView .squad-meta-info-btn) {
    position:relative; display:inline-flex; align-items:center; justify-content:center;
    width:44px; height:44px; min-width:44px; min-height:44px; padding:0;
    border:0; background:transparent; color:var(--ui-muted); font:600 12px/1 sans-serif;
  }
  :root body.user-service :is(#candidateFilterInfoBtn,#metaInsightModeView .squad-meta-info-btn)::before {
    content:''; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:18px; height:18px; border:1px solid currentColor; border-radius:50%; pointer-events:none; opacity:.55;
  }
}
@media(max-width:767px) {
  :root body.user-service #serviceMain .squad-rank-head > .squad-search-entry-btn { font-size:13px; font-weight:700; }
}
@media(max-width:767px) {
  :root body.user-service #squadSearchModal #squadSearchCloseBtn,
  :root body.user-service #playerModal[data-player-shell='dossier'] :is(#mCustomCurrentApply,#mCustomCurrentReset,#mAskMarketBtn) { font-size:13px; font-weight:700; }
  :root body.user-service #playerModal[data-player-shell='dossier'] #modalTabs button { min-height:44px; font-size:13px; }
}
