/* Role owners shared across screens. Language never selects a typography role. */
:root {
  --font-display:"Rajdhani","Noto Sans JP",Arial,sans-serif;
  --font-body:"Noto Sans JP","Yu Gothic","Hiragino Sans",Arial,sans-serif;
  --font-card-rank:"Barlow Condensed","Arial Narrow",Arial,sans-serif;
  --font-glyph:Arial,"Segoe UI Symbol",sans-serif;
  --type-display-tracking:.05em;
}
html body{font-family:var(--font-body)}
.type-display{font-family:var(--font-display)!important}
.type-body{font-family:var(--font-body)!important;letter-spacing:normal}
.type-card{font-family:var(--font-card-rank)!important;font-weight:700!important;letter-spacing:0!important}
.type-glyph{font-family:var(--font-glyph)!important;letter-spacing:0!important}
/* Existing semantic containers: short HUD content, never form inputs or prose. */
#table,#actions,#actionPanelV2,#raiseQuickButtons,#postflopQuickButtons,
#centerInfo,#blindUpBanner,#ponderShowdownResultV2,
#handHistoryV2Modal,
.ponder-all-in-heartbeat,.ponder-all-in-heartbeat-v2,
.ponder-game-winner-title,.ponder-game-winner-name,.ponder-game-start-title,
.ponder-showdown-hand-title,.elimination-effect,.action-banner,
.ranked-start-overlay-card,.ranked-waiting-row,.ponder-ranked-result-row {
  font-family:var(--font-display);
}
/* Fonts are overridden at the existing leaves where legacy injected rules set a face. */
body :is(.seat-name,.seat-stack-value,.seat-role-inline,.seat-action-chip,.bet-chip,
.action-banner-label,.action-banner-amount,.action-banner-name,
.ponder-all-in-heartbeat-title,.ponder-all-in-heartbeat-v2-title,
.ponder-game-winner-title,.ponder-game-winner-name,.ponder-game-start-title,
.ponder-showdown-hand-title,.ponder-live-board-row strong){font-family:var(--font-display)!important}
#ponderActionBannerHud,#ponderActionDrawer,.elimination-word{font-family:var(--font-display)!important}
#actions button,#actionPanelV2 button,#raiseQuickButtons button,
#blindUpBanner,#potDisplay,.seat-stack-value{font-variant-numeric:tabular-nums}
#actions button,#actionPanelV2 button,.seat-action-chip{font-family:var(--font-display)!important;font-weight:600}
/* HOME: preserve the existing PONDER logo, prose and form contents. */
#appHomeScreen :is(button,.ponder-card-title,.ponder-card-kicker,.ponder-card-cta,.ponder-stat-row,.ponder-player-name,.ponder-player-rating,.ponder-live-board-kicker,.ponder-mode-title,.ponder-mode-card-title,.ponder-nav-label,
.ponder-stat-label,.ponder-stat-value,.home-stat-label,.home-stat-value,
.home-player-name,.home-stats,.home-user-name,.ponder-profile-name,.ponder-profile-rating),
#customRoomV2 :is(button,label,h1,h2,h3,.cr2-title,.cr2-brand,.cr2-session,
.cr2-room-name,.cr2-room-id,.cr2-room-state,.cr2-player-name,.cr2-player-count,
.cr2-setting-label,.cr2-spec-label,.cr2-spec-value,.cr2-status,.cr2-room-code),
#profile-v2-root :is(button,h1,h2,h3,h4,th,td,dt,dd,strong,
.profile-v2-title,.profile-v2-player-name,.profile-v2-section-title,.profile-v2-panel-label,.profile-v2-summary-title,.hd-section-title,.hd-score-number,.hd-score-stats,.profile-v2-hand-read-street-label,.profile-v2-name,.profile-v2-tab,.profile-v2-stat-label,
.profile-v2-stat-value,.profile-v2-metric-label,.profile-v2-metric-value,
.profile-v2-analysis-card-title,.profile-v2-performance-side-title,
.profile-v2-analysis-stat-value,.profile-v2-context-shift-label,
.profile-v2-hand-read-title,.profile-v2-hand-read-label),
.hh-ps-header,.hh-ps-summary,.hand-history-list-item,.hand-history-detail-header,
#handHistoryV2Modal :is(button,.hhv2-title,.hhv2-filter,.hhv2-hand-date,.hhv2-hand-delta,.hhv2-group-label,.hhv2-street-title,.hhv2-action-pos,.hhv2-action-player,.hhv2-action-text,.hhv2-player-name,.hhv2-player-stack,.hhv2-player-result,.hhv2-showdown-player,.hhv2-showdown-pos,.hhv2-delta),
.hand-read-panel :is(button,h2,h3,strong),.phr-title,.phr-label,.phr-v2-panel button,.ponder-bv-title,.ponder-bv-choice,
.ponder-bv-result-lines,.hand-read-feedback-title,.hand-read-feedback-score {
  font-family:var(--font-display)!important;
}
#appHomeScreen :is(.ponder-mode-title,.ponder-mode-card-title,.ponder-stat-label),
#customRoomV2 :is(.cr2-title,.cr2-setting-label),
#profile-v2-root :is(.profile-v2-title,.profile-v2-tab,.profile-v2-analysis-card-title){letter-spacing:var(--type-display-tracking)}
/* Readable prose, including English sentences; inputs keep their content role. */
body :is(input,textarea,select,.type-body,.settings-panel,.settings-description,
.hand-read-description,.hand-read-feedback-description,.hand-read-help,
.cr2-description,.cr2-hint,.cr2-error,.cr2-room-log,.cr2-bottom-note,
.profile-v2-description,.profile-v2-note,.profile-v2-tooltip,
.profile-v2-your-poker-insight p,.profile-v2-your-poker-empty,
.profile-v2-analysis-empty,.profile-v2-analysis-card-title em,
.profile-v2-insight-description,.profile-v2-status-copy,.ponder-card-desc,.phr-v2-next-hint,.hh-ps-bottom-note,.hand-history-empty-detail,
.hhv2-empty-state,.cr2-restore-copy,.cr2-message,.cr2-create-note,.cr2-field-help,.cr2-room-log,
.ponder-mode-description,.ponder-feature-description,.error-description){
  font-family:var(--font-body)!important;
}
/* All existing card renderers share the card/glyph roles. Suit colors stay owned
   by the current card CSS. No geometry, texture, glow or card size changes here. */
body :is(.card-rank,.profile-v2-drilldown-card-rank,.history-card-rank){
  font-family:var(--font-card-rank)!important;font-weight:700!important;letter-spacing:0!important;
}
body :is(.card-suit,.profile-v2-drilldown-card-suit,.history-card-suit){font-family:var(--font-glyph)!important;letter-spacing:0!important}
.suit-glyph-symbol{display:inline-block;width:1em;height:1em;fill:currentColor;vertical-align:baseline}
/* Text/numbers cannot resize their fixed HUD controls on a font swap. */
.seat-name,.result-v2-names strong{min-width:0;max-width:100%}
body :is(.seat-stack-value,#potDisplay){font-weight:500!important}
#table .seat .seat-name .seat-stack-value{font-weight:500!important}
#appHomeScreen .ponder-card-title{font-weight:400!important;letter-spacing:var(--type-display-tracking)!important}
#appHomeScreen .ponder-player-name{font-weight:600!important}
#profile-v2-root :is(.profile-v2-stat-value,.profile-v2-summary-value,.profile-v2-ev-rate-value,.profile-v2-public-stats strong,.profile-v2-ranked-record strong){font-weight:500!important}
#customRoomV2 .cr2-title{font-weight:500!important}
.ponder-home-brand{font-family:Arial,"Hiragino Sans","Yu Gothic",Meiryo,sans-serif}

/* Desktop is the inverse of the table's compact/touch layout. Rajdhani's
   narrower capitals reduced label occupancy without reducing the HUD boxes.
   Adjust the glyph metrics, not the em-based padding, height, glow or position.
   .9 cap-height restores action widths to within 5% of the pre-type baseline. */
@media (min-width:901px) and (min-height:521px) and (pointer:fine) {
  body.action-ui-v1 #actions :is(.v1-action-label,.v1-action-number),
  #actionPanelV2 :is(.v2-action-button,.v2-quick-button),
  #table .bet-chip:not(.blind):not(.hand-rank-chip) {
    font-size-adjust:cap-height .9;
  }
  #table .seat-disconnect-badge > span:first-child {
    font-size-adjust:cap-height .94;
  }
  #customRoomV2 .cr2-brand { font-size-adjust:cap-height .82; }
  #customRoomV2 .cr2-title {
    font-weight:800!important;
    letter-spacing:.12em;
  }
  #customRoomV2 .cr2-room-code { font-size:16px; }
}
