/* Mobile reading scale shared by every H5 screen and overlay. */
.phone { font-size: 16px; }
.screen { line-height: 1.55; }
.screen button, .sheet button, .filter-modal button, .ai-modal button,
.role-picker button, .rc-modal button, .rc-detail button { font-size: 14px; }
.screen small, .sheet small, .filter-modal small, .ai-modal small,
.role-picker small, .rc-modal small, .rc-detail small { font-size: 14px; line-height: 1.45; }
.data-empty { font-size: 15px; line-height: 1.6; }
.statusbar { font-size: 12px; }
.brand strong { font-size: 19px; }
.brand small, .private, .compact-hero > div, .continue-label,
.continue-main small, .home-section-head span, .home-history small { font-size: 14px; }
.home-section-head strong, .continue-main strong, .home-history strong { font-size: 17px; }
.primary, .home-start, .bottom button { font-size: 16px; }
.bottom button { min-height: 54px; }

/* Format browsing and the custom format editor. */
.module-head strong, .review-head > strong { font-size: 20px; }
.module-head button, .review-head > button:last-child,
.format-filter button, .format-section-title { font-size: 15px; }
.format-filter { overflow-x: auto; }
.format-filter button { white-space: nowrap; }
.format-search input, .custom-name { font-size: 16px; }
.format-list > button strong { font-size: 17px; }
.format-list > button small, .format-list > button > b { font-size: 14px; line-height: 1.5; }
.field-label, .custom-section-head small, .custom-summary small,
.custom-summary i, .role-row > span small, .rule-switches small,
.rule-choice > span small, .empty-formats span { font-size: 14px; }
.custom-summary b, .role-row > span b, .rule-switches b,
.rule-choice > span b { font-size: 16px; }
.custom-section-head strong, .empty-formats b { font-size: 18px; }
.custom-section-head > button, .rule-choice button,
.empty-formats button, .role-row > div strong { font-size: 14px; }
.role-row > i { font-size: 15px; }
.role-row { min-height: 58px; }
.role-row > div button { width: 34px; height: 34px; font-size: 20px; }

/* Game board: numbers, speech summaries, identity and vote cues. */
.game-head strong { font-size: 19px; }
.game-head small, .game-head > button:last-child { font-size: 14px; }
.game-context-switcher { padding: 12px 14px; }
.game-context-switcher .quick-context-row:first-child { margin-top: 0; }
.game-context-switcher .phase-row { align-items: center; }
.quick-context-row > b, .quick-day-tabs button,
.quick-phase-tabs button { font-size: 14px; }
.quick-day-tabs button, .quick-phase-tabs button { min-height: 42px; }
.game-context-switcher .quick-add-day { width: 42px; height: 42px; font-size: 18px; }
.game-context-switcher #openEvent { flex-shrink: 0; min-height: 42px; margin-left: 8px; padding: 9px 11px; border-radius: 9px; background: #202936; color: #fff; font-size: 14px; white-space: nowrap; }
.screen[data-screen="game"] .end-game-action { width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding: 0 16px; border-radius: 11px; background: #202936; color: #fff; font-size: 16px; font-weight: 700; text-align: left; }
.end-game-action i { font-size: 24px; font-style: normal; font-weight: 400; }
.result-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 18px 0 4px; }
.result-options button { min-height: 47px; padding: 10px; border: 1px solid #dfe4ea; border-radius: 10px; background: #fff; color: #344052; font-size: 15px; }
.result-options button.selected { border-color: #326fe8; background: #edf3ff; color: #245fc9; font-weight: 700; }
.result-modal #confirmEndGame { min-height: 50px; font-size: 16px; }
.result-modal #confirmEndGame:disabled { opacity: .55; }
.game-view-tabs button, .board-filters button { font-size: 15px; }
.game-view-tabs i { font-size: 12px; }
.sheriff-summary b, .badge-summary b { font-size: 16px; }
.sheriff-summary small, .badge-summary small,
.sheriff-summary > em, .badge-summary > em { font-size: 14px; }
.board-title-row strong, .vote-overview > header strong { font-size: 18px; }
.board-title-row small, .vote-overview > header small { font-size: 14px; }
.player-card { min-height: 166px; }
.player-card > header > i { font-size: 18px; }
.player-card > header b { font-size: 17px; }
.player-card > header small, .player-card > header > em { font-size: 13px; }
.player-facts > span { font-size: 14px; min-height: 37px; }
.player-facts i { font-size: 13px; }
.player-card > p { font-size: 15px; min-height: 47px; }
.player-card.has-prior > p::before { font-size: 13px; }
.player-marks > em { font-size: 11px; }
.player-marks .badge-mark { font-size: 10px; }
.game-events i, .game-events b { font-size: 14px; }
.vote-overview > header button { font-size: 14px; }
.vote-round-overview article > header b { font-size: 16px; }
.vote-round-overview article > header small,
.vote-round-overview article > header button,
.overview-groups p > b, .overview-groups p > span,
.overview-groups p > em, .vote-round-overview article > footer,
.vote-round-overview article > footer b,
.vote-round-overview article > footer span,
.empty-vote-round { font-size: 14px; }

/* Review, statistics, profile and history. */
.result > small, .result p, .result small,
.ai-banner small, .timeline, .timeline small,
.vote-card small, .tabs button { font-size: 14px; }
.stats-period button, .time-summary small, .time-summary strong,
.time-summary b, .personal-overview > small,
.overview-metrics small, .radar-values small { font-size: 14px; }
.profile-head small, .profile-section-head button,
.profile-summary small, .review-membership small,
.profile-menu span small, .pending-review span small,
.pending-review > em, .history-summary small,
.history-list article header small, .history-list article > p,
.history-list footer span, .history-list footer button { font-size: 14px; }
.profile-menu span b, .pending-review span b,
.history-list article header b { font-size: 17px; }
.history-tabs button { font-size: 15px; }

/* All sheets and dialogs, including role rules, votes and membership. */
.sheet header strong, .filter-modal header strong,
.role-picker header strong, .ai-modal header strong { font-size: 19px; }
.sheet header small, .only-me, .control-label small,
.role-picker > p, .filter-modal > p,
.filter-modal label, .previous-notes > b,
.previous-notes p { font-size: 14px; }
.tool-tabs button, .tags button, .event-types button,
.day-tabs button, .phase-options button,
.speaker-options span, .vote-round-bar button,
.vote-targets span, .vote-voters span,
.vote-voters small, .vote-groups button > b,
.vote-groups button > span, .vote-groups button > em,
.vote-groups p, .vote-finish { font-size: 14px; }
.sheet textarea, .filter-modal input, .rc-rule-editor { font-size: 16px; }
.tool-tabs button, .tags button, .event-types button,
.day-tabs button, .phase-options button,
.vote-round-bar button { min-height: 38px; }
.control-label b, .vote-step-title b,
.vote-groups-head b, .badge-history > b { font-size: 16px; }
.vote-modal > header small, .vote-progress, .vote-progress button,
.vote-step-title small, .vote-step-title > button,
.vote-groups-head small, .badge-current small,
.badge-current strong, .badge-actions button,
.badge-history p, .badge-empty,
.development-state > i, .development-state > p { font-size: 14px !important; }
.vote-step-title > i, .speaker-options i,
.vote-targets i, .vote-voters i { font-size: 14px; }
.speaker-options button { min-height: 60px; }
.vote-targets button, .vote-voters button { min-height: 62px; height: auto; }
.development-state > strong { font-size: 19px; }
.rc-status, .rc-card-desc, .rc-badge,
.rc-count span, .rc-section h3,
.rc-warning, .rc-inline-entry p { font-size: 14px; }
.rc-card-name, .rc-count strong,
.rc-search input, .rc-rule-editor { font-size: 16px; }
.rc-section p { font-size: 16px; }
/* Final pass: dense review/profile counters and tiny vote labels. */
.player-card > header small, .player-marks > em { font-size: 14px; }
.player-marks .badge-mark { width: 20px; height: 20px; font-size: 12px; }
.result div small, .ai-banner span small, .score-row span,
.radar-card header strong, .review-membership header b,
.review-membership header em, .review-quota p,
.review-membership footer small, .review-membership footer button,
.profile-menu > button > i, .pending-review > i,
.ai-banner span strong { font-size: 14px; }
.ai-banner span strong, .radar-card header strong,
.review-membership header b { font-size: 17px; }
.vote-round-bar > div button, .vote-round-bar > button { font-size: 14px; min-height: 38px; }
.toast { font-size: 14px; }
#timeFilterModal input[type="date"] { min-width: 155px; min-height: 42px; padding: 8px 10px; font-size: 16px; }

@media (max-width: 350px) {
  .screen[data-screen="game"] { padding-left: 12px; padding-right: 12px; }
  .game-context-switcher { padding: 12px; }
  .player-card { padding: 12px; }
  .player-facts > span { font-size: 13px; }
  .vote-targets, .vote-voters, .speaker-options { grid-template-columns: repeat(3, 1fr); }
}

/* 各页面共用的文字按钮：浏览器默认行高不参与垂直定位。 */
.primary, .empty-formats button, .role-row > div button,
.format-filter button, .stats-period button, .game-view-tabs button,
.board-filters button, .history-tabs button, .tool-tabs button,
.vote-finish, .result-options button, .badge-actions button,
.filter-modal > .primary, .ai-modal > .primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1.35;
  text-align: center;
}
.primary { display: flex; }
.role-row > div button { flex-shrink: 0; padding: 0; }
.game-view-tabs button, .stats-period button, .format-filter button { min-height: 42px; }
.review-head > button:first-child, .game-head > button:first-child,
.sheet .close, .filter-modal .close, .ai-modal .close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
