/* Shared roster presentation. Grade colour and real data remain independent
 * of page theme; the character cards keep their existing LoL silhouette. */
.roster-reading-note{margin:0 0 15px;color:var(--muted);font-size:12px;line-height:1.7}
.catalog-reading-note{margin-top:-8px;margin-bottom:20px}
.roster-mobile-instruction{display:none}
.roster-position-nav,.roster-scroll-status{display:none}
.players-page .catalog-controls.catalog-filter{border-radius:var(--radius-panel,14px);box-shadow:var(--elevation-1,0 3px 14px #03101b0a)}
.players-page .catalog-style-gallery{border-radius:10px;background:var(--surface-2);box-shadow:none}
.players-page .catalog-style-gallery>summary{font-size:14px;padding-block:12px}
.players-page .catalog-style-gallery[open]>summary{border-bottom:1px solid var(--line)}
.players-page .catalog-primary-filters label>span{font-size:12px;font-weight:500}
.players-page .catalog-filter-actions{min-height:34px}
.players-page .catalog-controls :is(input,select):focus-visible{outline:2px solid var(--blue);outline-offset:3px;box-shadow:none}
@media(max-width:520px){
  .players-page .player-catalog{grid-template-columns:minmax(0,360px)!important;justify-content:center}
}

/* Enough room for five positions, with a bounded navigation rail below the header. */
.teams-page .team-workspace{grid-template-columns:180px minmax(0,1fr);gap:24px}
.teams-page .team-selector-rail{top:calc(var(--header-height,94px) + 16px);max-height:calc(100dvh - var(--header-height,94px) - 32px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;border-radius:10px;box-shadow:var(--elevation-1,0 3px 14px #03101b0a)}
.team-rail-heading{display:flex;justify-content:space-between;align-items:center;padding:13px 14px;border-bottom:1px solid var(--line);font-size:12px;color:var(--muted)}
.team-rail-heading strong{color:var(--text);font-size:13px;font-weight:600}.team-rail-heading>span{font-variant-numeric:tabular-nums}
.teams-page .team-selector-rail nav>a{gap:9px;min-height:53px;padding:10px 12px;transition:background-color var(--motion-fast,160ms),color var(--motion-fast,160ms)}
.teams-page .team-selector-rail nav>a:hover{background:var(--surface-2)}
.teams-page .team-selector-rail nav>a.active{background:color-mix(in srgb,var(--blue) 7%,var(--surface));border-left-color:var(--blue)}
.teams-page .team-selector-rail nav>a>span:nth-child(2){font-size:12px;font-weight:500}
.teams-page .team-selector-rail .team-mark{border-radius:6px;box-shadow:inset 0 0 0 1px var(--line)}
.teams-page .team-identity{padding:22px;border:1px solid var(--line);border-radius:var(--radius-panel,14px);background:var(--surface);box-shadow:var(--elevation-1,0 3px 14px #03101b0a);align-items:center}
.teams-page .team-identity>div:nth-child(2){min-width:0;flex:1}
.teams-page .team-identity h2{font-size:clamp(23px,2vw,32px);font-weight:600;line-height:1.25;overflow-wrap:anywhere}
.teams-page .team-identity p{max-width:620px;font-size:13px;line-height:1.75}
.teams-page .team-identity>.team-mark{border-radius:12px;background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line),0 5px 15px #020b1610}
.teams-page .team-record>strong{font-size:clamp(31px,2.7vw,46px);font-weight:600;margin-bottom:6px}
.teams-page .team-record .result-tag{font-size:11px}
.teams-page .roster-section>.section-heading{margin-bottom:6px}
.teams-page .roster-section .lineup-five{gap:14px;align-items:stretch;min-width:0}
.teams-page .roster-section .lineup-slot{display:flex;min-width:0}
.teams-page .roster-section .lineup-slot>.player-card{width:100%;height:100%}
.teams-page .roster-section .lineup-empty{width:100%;height:100%;min-height:360px;aspect-ratio:auto;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;border:1px dashed var(--line);border-radius:10px;background:var(--surface-2)}
.teams-page .roster-section .lineup-empty>.role-icon{width:30px;height:30px;color:var(--muted)}
.teams-page .lineup-five:focus-visible{outline:2px solid var(--blue);outline-offset:6px}
.team-directory-when-open{display:none}.team-quick-directory[open] .team-directory-when-open{display:inline}.team-quick-directory[open] .team-directory-when-closed{display:none}
.team-quick-directory .team-directory-toggle>span[aria-hidden]{display:inline-block;transition:transform var(--motion-fast,160ms)}
.team-quick-directory[open] .team-directory-toggle>span[aria-hidden]{transform:rotate(180deg)}
.team-quick-directory.panel{padding:18px 20px;border-radius:10px;background:var(--surface-2)}
.team-quick-grid .team-quick-card{border-radius:8px;background:var(--surface);transition:border-color var(--motion-fast,160ms),background-color var(--motion-fast,160ms),box-shadow var(--motion-fast,160ms)}
.team-quick-grid .team-quick-card>small{font-size:11px;color:var(--muted)}
.team-quick-grid .team-quick-card:is(:hover,:focus-visible){background:color-mix(in srgb,var(--blue) 3%,var(--surface));border-color:color-mix(in srgb,var(--blue) 50%,var(--line));box-shadow:var(--elevation-1,0 3px 14px #03101b0a)}

/* Keep the shared grade light effects; they run only on hover or focus.
 * Names, heroes and score labels keep a stable order. */
.player-card{transition:transform .18s var(--ease-out,ease-out),filter .18s ease;filter:drop-shadow(0 6px 10px #020b161f)}
.player-card:is(:hover,:focus-within){transform:translateY(-3px)}
.player-card:is(:hover,:focus-within) .card-frame{filter:var(--frame-material) brightness(1.14)}
.player-card .player-card-link::after{opacity:.6}
.player-card .player-card-info h3{font-weight:600;letter-spacing:0}
.player-card .player-card-info>.player-game-id{line-height:1.4;color:#b8c5d2;letter-spacing:0}
.player-card .card-dimension dt{font-size:11px;color:#b8c5d2;line-height:1.35}
.player-card .card-dimension dd{font-size:16px;line-height:1.3}
.player-card .card-dimension{min-height:43px}
.player-card .champion-icon{overflow:hidden;border-radius:4px;transition:box-shadow var(--motion-fast,160ms)}
.player-card .champion-icon>img{transition:transform var(--motion-fast,160ms)}
.preview-media-unavailable{display:grid;place-items:center;width:28px;height:28px;border-radius:4px;background:var(--surface-2);border:1px solid var(--line);font-size:12px;color:var(--muted)}
.champion-icon>.preview-media-unavailable{width:100%;height:100%;border:0;border-radius:0;background:#243140;color:#aebdcb}

/* Preserve the equal desktop columns while keeping many live rooms bounded. */
.player-dossier .dossier-abilities,.player-dossier .dossier-performance>.panel{border-radius:var(--radius-panel,14px);box-shadow:var(--elevation-1,0 3px 14px #03101b0a)}
.player-dossier .profile-section-heading{padding-bottom:18px}
.player-dossier .profile-chart-heading{flex-wrap:wrap;row-gap:8px}
.player-dossier .profile-score-source{max-width:100%;overflow:hidden;text-overflow:ellipsis}
.player-dossier .profile-live{flex:none;max-height:300px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;grid-auto-rows:minmax(100px,auto)}
.player-dossier .profile-live-link{border-radius:9px;border-color:var(--line);box-shadow:var(--elevation-1,0 3px 14px #03101b0a)}
.player-dossier .profile-live-link:has(.profile-live-cover){min-height:150px}
.player-dossier .profile-event-metrics dd{font-weight:600}
.player-dossier .profile-rating-context{margin:10px 0 0;font-size:11px;line-height:1.65;color:var(--muted);text-align:left}
.player-dossier .profile-rating-number{line-height:1;font-weight:600}
.player-dossier .profile-hero-picks>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 9px}
.player-dossier .profile-hero-picks>div>span{width:100%;min-width:0;max-width:none}
.player-dossier .profile-hero-picks img{border-radius:8px;box-shadow:0 2px 7px #020b1612}
.profile-history-workspace .profile-history-tabs{gap:24px}
.profile-history-workspace .profile-history-tabs>a{font-size:16px;padding-block:13px}
.profile-history-workspace .profile-event-record{border-radius:8px;box-shadow:var(--elevation-1,0 3px 14px #03101b08)}
.profile-history-workspace .profile-event-open{display:inline-flex;align-items:center;justify-content:center;min-height:36px}
.profile-preview-dialog .profile-preview-slot{border-radius:8px;background:var(--surface-2)}
.profile-preview-dialog .profile-preview-member-photo{box-shadow:inset 0 0 0 1px var(--line)}
.profile-preview-dialog .profile-preview-member:focus-visible{outline:2px solid var(--blue);outline-offset:4px;border-radius:4px}
.profile-preview-dialog .profile-preview-member strong{line-height:1.45}

@container player-card (max-width:260px){
  .player-card .card-dimension dt{font-size:clamp(8px,4.8cqw,11px)}
  .player-card .card-dimension dd{font-size:clamp(10px,6.3cqw,15px)}
}
@container player-card (max-width:190px){
  .player-card .player-card-info h3{font-size:17px}
  .player-card .player-card-info>.player-game-id{font-size:11px}
  .player-card .card-footer{margin-inline:5px}
  .player-card[data-grade="neutral"] .player-grade{width:48px}
  .player-card[data-grade="neutral"] .player-grade strong{font-size:11px;line-height:1.4}
}
@media(max-width:1450px){
  .teams-page .team-workspace{display:block}
  .teams-page .team-selector-rail{position:static;max-height:none;overflow:hidden;margin-bottom:20px}
  .teams-page .team-selector-rail .team-rail-heading{display:none}
  .teams-page .team-selector-rail nav{display:flex;flex-direction:row;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;padding:5px}
  .teams-page .team-selector-rail nav>a{flex:0 0 98px;min-width:98px;max-width:98px;min-height:78px;flex-direction:column;gap:5px;padding:11px 7px;border-left:0;border-bottom:2px solid transparent;border-radius:6px}
  .teams-page .team-selector-rail nav>a.active{border-bottom-color:var(--blue)}
  .teams-page .team-selector-rail nav>a>span:nth-child(2){max-width:100%;font-size:11px}
}
@media(min-width:701px) and (max-width:1100px){
  .teams-page .roster-section .lineup-five{grid-template-columns:repeat(6,minmax(0,1fr))}
  .teams-page .roster-section .lineup-slot{grid-column:span 2}
  .teams-page .roster-section .lineup-slot:nth-child(4){grid-column:2/span 2}
  .teams-page .roster-section .lineup-slot:nth-child(5){grid-column:4/span 2}
}
@media(max-width:700px){
  .players-page .catalog-primary-filters>.catalog-sort{grid-column:auto}
  .players-page .catalog-reading-note{font-size:11px;margin-bottom:15px}
  .teams-page .team-identity{padding:16px;gap:13px;flex-wrap:wrap}
  .teams-page .team-identity>.team-mark{width:56px;height:56px;flex-basis:56px}
  .teams-page .team-identity>div:nth-child(2){flex-basis:calc(100% - 74px)}
  .teams-page .team-identity h2{font-size:24px}
  .teams-page .team-identity p{font-size:12px}
  .teams-page .team-record{display:flex;align-items:center;gap:12px;width:100%;margin:2px 0 0;padding-top:13px;border-top:1px solid var(--line);text-align:left}
  .teams-page .team-record>strong{font-size:27px;margin:0}.teams-page .team-record>strong>span{margin-inline:7px}
  .teams-page .team-record .result-tag{font-size:11px}
  .teams-page .roster-section .lineup-five{display:flex;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scroll-padding-inline:4px;scrollbar-width:thin;padding:4px 4px 14px;gap:14px;align-items:stretch}
  .teams-page .roster-section .lineup-slot{flex:0 0 clamp(244px,78vw,286px);scroll-snap-align:start}
  .teams-page .roster-section .lineup-empty{min-height:390px}
  .teams-page .roster-section .lineup-slot:last-child{scroll-snap-align:end}
  .teams-page .roster-section .player-visual{aspect-ratio:1.52}
  .teams-page .roster-section .player-card-info{padding-block:5px 10px}
  .teams-page .roster-section .player-card-info h3{font-size:21px;line-height:1.35}
  .roster-position-nav:not([hidden]){display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin-bottom:10px;padding:4px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2)}
  .roster-position-nav>button{display:flex;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:44px;padding:5px 2px;border:1px solid transparent;border-radius:7px;background:transparent;color:var(--muted);font:inherit;font-size:12px;font-weight:500;line-height:1.3;cursor:pointer;touch-action:manipulation}
  .roster-position-nav .role-icon{width:16px;height:16px;flex-shrink:0}
  .roster-position-nav>button[aria-pressed=true]{background:var(--surface);color:var(--text);border-color:var(--line);box-shadow:var(--elevation-1)}
  .roster-position-nav>button:focus-visible{outline:2px solid var(--blue);outline-offset:1px}
  .roster-scroll-status:not([hidden]){display:block;margin:0 4px;color:var(--muted);text-align:right;font-size:12px;font-variant-numeric:tabular-nums}
  .roster-desktop-instruction{display:none}.roster-mobile-instruction{display:inline}
  .team-quick-directory.panel{padding:16px}
  .team-quick-directory .team-quick-grid{gap:9px}
  .team-quick-grid .team-quick-card{padding:12px;grid-template-columns:30px minmax(0,1fr);gap:5px 8px}
  .team-quick-grid .team-quick-card>.team-mark{width:30px;height:30px;flex-basis:30px}
  .player-dossier .profile-live{max-height:260px}
  .player-dossier .profile-event-metrics dd{font-size:29px}
  .player-dossier .profile-hero-picks>div>span{min-width:0}
  .profile-history-workspace .profile-history-tabs{gap:18px}.profile-history-workspace .profile-history-tabs>a{font-size:15px;gap:7px}
}
@media(hover:hover) and (pointer:fine){
  .player-card .champion-icon:hover{box-shadow:0 0 0 1px rgb(var(--tier-rgb) / .45)}
  .player-card .champion-icon:hover>img{transform:scale(1.06)}
  .profile-preview-dialog .profile-preview-member:hover strong{color:var(--blue)}
}
@media(hover:none){.player-card:is(:hover,:focus-within){transform:none}}
@media(prefers-reduced-motion:reduce){
  .player-card,.player-card *,.player-card *::before,.player-card *::after,.team-quick-directory .team-directory-toggle>span[aria-hidden],.team-quick-grid .team-quick-card,.teams-page .team-selector-rail nav>a{animation:none!important;transition:none!important}
  .player-card:is(:hover,:focus-within),.player-card .champion-icon>img{transform:none!important}
  .teams-page .roster-section .lineup-five{scroll-behavior:auto;scroll-snap-type:none}
}
@media(forced-colors:active){
  .player-card{filter:none}.player-card .player-card-link{outline:1px solid CanvasText;clip-path:none}
  .player-card .card-mean-score{color:CanvasText}
  .teams-page .team-selector-rail nav>a.active{outline:2px solid Highlight;outline-offset:-3px}
  .team-quick-grid .team-quick-card[aria-current=true]{outline:2px solid Highlight;outline-offset:-3px}
}

/* The roster uses one readable name · tag identity at the same type size. */
.roster-team-caption{display:inline-flex;align-items:baseline;gap:.15em;max-width:100%;min-width:0;vertical-align:bottom;white-space:nowrap}
.roster-team-full-name{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}
.roster-team-separator{flex:none;opacity:.65}
.roster-team-tag{flex:none;font:inherit;color:inherit}
.teams-page .team-selector-rail nav>a{grid-template-columns:28px minmax(0,1fr)}
.teams-page .team-selector-rail nav>a>.roster-team-caption{flex:1;min-width:0;font-size:13px;font-weight:600}
.teams-page .team-identity h2{max-width:100%}
.teams-page .team-identity h2>.roster-team-caption{max-width:100%}
.teams-page .team-quick-card>strong{min-width:0}
@media(max-width:1450px){
 .teams-page .team-selector-rail nav>a{display:flex;flex-basis:128px;min-width:128px;max-width:128px}
 .teams-page .team-selector-rail nav>a>.roster-team-caption{flex:none;font-size:12px}
}
