/* 6F.1: opt-in public rankings and player pages. */
.x3-ui-next.x3-people-page { font-size: inherit; line-height: inherit; padding-block: 16px; --x3-next-gutter: .5rem; }
.x3-ui-next.x3-people-page.x3-next-wide { width: calc(100% - 2 * var(--x3-next-gutter)); max-width: var(--x3-next-width-wide); margin-inline: auto; }
.x3-people-page.people-classic { padding-top: 0; }
.x3-people-page .people-content { padding: 12px 0; min-width: 0; }
.x3-people-page :is(h1,h2,h3,h4,h5,p,a,td,th,summary) { overflow-wrap: anywhere; }
.x3-people-page h1 { font-size: clamp(1.5rem, 1rem + 2vw, 2.25rem); }
.x3-people-page :is(a,button,input,select,summary):focus-visible { outline: 3px solid var(--x3-next-focus); outline-offset: 2px; }
.x3-people-page :is(button,.btn,.page-link,summary) { min-height: 44px; }
.x3-people-page :is(input,select) { min-height: 44px; font-size: 1rem; background-color: var(--x3-next-bg); color: var(--x3-next-text); border-color: var(--x3-next-control-border); }
.x3-people-page input::placeholder { color: var(--x3-next-muted); opacity: 1; }
.x3-people-page :is(.text-white-50,.text-secondary) { color: var(--x3-next-muted) !important; } /* Existing Bootstrap utilities. */
.x3-people-page .text-success { color: var(--x3-next-success) !important; }
.x3-people-page .text-danger { color: var(--x3-next-danger) !important; }
.x3-people-page .text-warning { color: var(--x3-next-warning) !important; }
.x3-people-page :is(.people-secondary,.people-filters,.people-player-stats,.people-explanation) { border: 1px solid var(--x3-next-border); border-radius: var(--x3-next-radius-sm); background: var(--x3-next-surface); margin-bottom: 12px; }
.x3-people-page summary { padding: 10px 12px; font-size: .875rem; cursor: pointer; color: var(--x3-next-text); }
.x3-people-page .people-filter-state { color: var(--x3-next-muted); font-size: .75rem; }
.x3-people-page .card { color: var(--x3-next-text); }
.x3-people-page .alert { color: var(--x3-next-text); background: var(--x3-next-surface); border-color: var(--x3-next-border); }
.x3-people-page .alert-warning { border-color: var(--x3-next-warning); }
.x3-people-page .people-secondary > :not(summary),.x3-people-page .people-explanation > p { padding: 12px; }
.x3-people-page .people-filters > form { margin: 0; padding: 0 8px 12px; }
.x3-people-page :is(.card-body,.hist-player-meta,.search-result-primary) { min-width: 0; }
.x3-people-page .page-link { min-width: 44px; display: grid; place-items: center; }
.x3-people-page table { color: var(--x3-next-text); }
.x3-people-page :is(.elo-filter-card,.elo-ranking-card,.elo-detail-page .card,.elo-detail-movements-card) { border-color: var(--x3-next-border) !important; border-radius: var(--x3-next-radius-sm); }
.x3-people-page :is(.elo-filter-card,.elo-ranking-card,.elo-detail-movements-card) > .card-body { padding: 12px; }
.x3-people-page .elo-filter-card { margin-bottom: 12px !important; }
.x3-people-page .elo-filter-card .people-filters { margin: 0; }
.x3-people-page .elo-ranking-table { --bs-table-bg: var(--x3-next-surface); --bs-table-color: var(--x3-next-text); --bs-table-border-color: var(--x3-next-border); }
.x3-people-page .elo-ranking-table th { white-space: normal; }
.x3-people-page .elo-ranking-table a { display: inline-flex; align-items: center; min-height: 44px; }
.x3-people-page :is(.elo-weekly-card,.elo-top-card,.elo-mobile-card) .card-body { padding: 12px; }
.x3-people-page .elo-top-score { font-size: 1.5rem; }
.x3-people-page :is(.elo-top-meta,.elo-mobile-stats) { flex-wrap: wrap; }
.x3-people-page .elo-empty-state { color: var(--x3-next-muted); }
.x3-people-page .people-secondary { margin-top: 12px; }
/* Classic ranking: retain the approved result rows and their two established views. */
.people-classic .x3-public-hero-inner { min-height: 0; padding-block: 20px; }
.people-classic .people-explanation { margin-block: 12px; }
.people-classic .section-title { font-size: 1.125rem; margin-bottom: 10px !important; text-align: left !important; }
.people-classic .row { --bs-gutter-x: 8px; --bs-gutter-y: 8px; }
.people-classic .ranking-mobile-card { background: var(--x3-next-surface); border-color: var(--x3-next-border); }
.people-classic .ranking-breakdown-table { --bs-table-bg: var(--x3-next-surface); }
.people-classic .ranking-search-clear { color: var(--x3-next-text); background: var(--x3-next-surface); }
/* Compact search results, all secondary statistics stay in a native disclosure. */
.people-search .search-intro { max-width: none; }
.x3-people-page.people-search { margin-top: 0; }
.people-search :is(.x3-public-heading,.search-form,.search-results-meta,#chips-categorias) { margin-bottom: 12px !important; }
.people-search .search-main-bar { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 6px; padding: 0; background: none; border: 0; }
.people-search .search-input { min-width: 0; padding: 8px; font-size: 1rem; }
.people-search .search-main-bar button { padding-inline: 8px; }
.people-search .search-clear-btn { color: var(--x3-next-text); border-color: var(--x3-next-control-border); }
.people-search .search-secondary-block { padding: 8px; margin: 0; background: none; border: 0; }
.people-search #grid-resultados { --bs-gutter-x: 12px; --bs-gutter-y: 12px; }
.people-search #grid-resultados > div { width: 100%; }
.people-search .card-link { background: var(--x3-next-surface) !important; border: 1px solid var(--x3-next-border) !important; border-radius: var(--x3-next-radius-sm); }
.people-search .card-link > .card-body { padding: 12px; }
.people-search .search-result-avatar { width: 32px; height: 32px; min-width: 32px; min-height: 32px; max-width: 32px; max-height: 32px; flex: 0 0 32px; font-size: .75rem; }
.people-search .search-result-name { font-size: 1rem; line-height: 1.3; margin-bottom: 4px !important; }
.people-search .search-result-name a { color: var(--x3-next-green); text-decoration: none; }
.people-search .search-result-primary > div.mb-2 { display: inline; margin-right: 6px; }
.people-search .search-result-primary > .small { display: inline; }
.people-search .card-body > .d-flex.mb-3 { margin-bottom: 8px !important; }
.people-search .search-rank-highlight { margin-top: 4px !important; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; border: 0; background: none; border-radius: 0; }
.people-search .search-rank-highlight .value { font-size: 1rem; }
.people-search .people-player-stats { margin: 0; background: var(--x3-next-bg); }
.people-search .people-player-stats > :not(summary) { margin: 8px !important; }
.people-search .fav-toggle { min-width: 44px; flex-shrink: 0; }
.people-search #chips-categorias { justify-content: start !important; }
/* Profile hierarchy: identity, summary, ranking, histories, secondary details. */
.people-profile :is(.hist-player-card,.hist-ranking-panel,.hist-kpi-card,.hist-highlight-card) { padding: 12px; border-radius: var(--x3-next-radius-sm); background: var(--x3-next-surface); box-shadow: none; }
.people-profile .hist-player-card { margin-bottom: 12px !important; }
.people-profile .hist-player-avatar { width: 56px; height: 56px; min-width: 56px; min-height: 56px; max-width: 56px; max-height: 56px; flex: 0 0 56px; font-size: 1rem; }
.people-profile .hist-player-identity { align-items: center; gap: 12px; }
.people-profile .hist-player-name { font-size: clamp(1.5rem,1rem + 2vw,2.25rem); }
.people-profile .hist-section__header { margin-bottom: 10px; }
.people-profile .hist-section__title { font-size: 1.125rem; }
.people-profile .hist-kpi-card__value { font-size: 1.375rem; }
.people-profile .hist-ranking-panel > .row > div { width: 33.3333%; }
.people-profile .hist-ranking-card { padding: 8px; min-height: 0; }
.people-profile .hist-ranking-card__value { font-size: 1.125rem; }
.people-profile .hist-mode-switch { margin-block: 12px !important; }
.people-profile .hist-mobile-match-item { padding: 10px; }
.people-profile .hist-mobile-match-item__players { gap: 4px; }
.people-profile :is(.hist-match-rival,.hist-score-pill,.hist-date-pill) { white-space: normal; }
.people-profile :is(.hist-mobile-match-item,.hist-mobile-torneo-card) { background: var(--x3-next-surface); }
.x3-people-page.elo-detail-page > .row > div { width: 50%; }
.x3-people-page .elo-stat-card > .card-body { padding: 12px; }
.x3-people-page .elo-stat-value { font-size: 1.5rem; }
@media (min-width: 768px) {
  .x3-ui-next.x3-people-page { --x3-next-gutter: 1.5rem; }
  .x3-people-page .people-filters.is-enhanced > summary { display: none; }
  .people-search #grid-resultados > div { width: 50%; }
  .x3-people-page.elo-detail-page > .row > div { width: 33.3333%; }
}
@media (min-width: 1200px) { .people-search #grid-resultados > div { width: 33.3333%; } }
@media (max-width: 767.98px) {
  .x3-people-page .people-elo-table { table-layout: fixed; width: 100%; }
  .x3-people-page .people-elo-table thead,.x3-people-page .people-history-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .x3-people-page :is(.people-elo-table,.people-history-table) tbody { display: block; }
  .x3-people-page .people-elo-table tr { display: grid; grid-template-columns: 2.5rem repeat(3,minmax(0,1fr)); padding: 8px 0; border-bottom: 1px solid var(--x3-next-border); }
  .x3-people-page .people-elo-table td { display: block; border: 0; padding: 2px 4px; min-width: 0; font-size: .875rem; background: transparent; box-shadow: none; }
  .x3-people-page .people-elo-table td:nth-child(1) { grid-area: 1 / 1 / 3 / 2; }
  .x3-people-page .people-elo-table td:nth-child(2) { grid-area: 1 / 2 / 2 / 4; }
  .x3-people-page .people-elo-table td:nth-child(3) { grid-area: 2 / 2 / 3 / 4; color: var(--x3-next-muted); }
  .x3-people-page .people-elo-table td:nth-child(4) { grid-area: 1 / 4 / 2 / 5; align-self: center; }
  .x3-people-page .people-elo-table td:nth-child(5) { grid-area: 2 / 4 / 3 / 5; }
  .x3-people-page .people-elo-table td:nth-child(n+6) { grid-row: 3; font-size: .75rem; }
  .x3-people-page .people-elo-table td:nth-child(6) { grid-column: 2; }
  .x3-people-page .people-elo-table td:nth-child(7) { grid-column: 3; }
  .x3-people-page .people-elo-table td:nth-child(8) { grid-column: 4; }
  .x3-people-page .people-elo-table td:nth-child(n+6)::before { content: attr(data-label) ' '; color: var(--x3-next-muted); }
  .x3-people-page .elo-division-pill { max-width: 100%; white-space: normal; padding: 3px 5px; font-size: .7rem; }
  .x3-people-page .people-history-table tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 8px 0; border-bottom: 1px solid var(--x3-next-border); }
  .x3-people-page .people-history-table td { display: block; border: 0; padding: 4px; min-width: 0; white-space: normal; font-size: .875rem; }
  .x3-people-page .people-history-table td::before { display: block; content: attr(data-label); color: var(--x3-next-muted); font-size: .75rem; }
  .x3-people-page .people-history-table td:nth-child(3) { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .x3-people-page *, .x3-people-page *::before, .x3-people-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
