:root {
  --paper:#f9f7f2; --ink:#292722; --muted:#726f66; --grid:#e1ded5;
  --line:#645f54; --accent:#a5482c; --surface:#efede6; --outline:#00000016;
  --ease:cubic-bezier(.22,1,.36,1); color-scheme:light;
}
:root[data-theme=dark] {
  --paper:#171613; --ink:#eeece5; --muted:#a29e92; --grid:#33312a;
  --line:#9b9486; --accent:#f0a078; --surface:#24231e; --outline:#ffffff1c;
  color-scheme:dark;
}
* { box-sizing:border-box }
body { margin:0; background:var(--paper); color:var(--ink); font:14px/1.5 Inter,system-ui,sans-serif; -webkit-font-smoothing:antialiased }
button,a { -webkit-tap-highlight-color:transparent }
button { font:inherit; color:inherit; cursor:pointer; touch-action:manipulation }
button:disabled { opacity:.3; cursor:default }
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible { outline:2px solid var(--accent); outline-offset:4px }
button:active { transform:scale(.97) }
[hidden] { display:none!important }
::selection { background:var(--accent); color:var(--paper) }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%) }
main { max-width:1160px; padding:0 48px; margin:auto }
.load-notice { margin:48px 0; color:var(--muted); font-size:14px }
.load-notice[hidden] { display:none }
[data-loading] .season-layout, [data-loading] .player-picker, [data-loading] footer { visibility:hidden }
#data-dialog { max-height:85dvh; overflow:auto }
#data-dialog a { color:inherit; text-underline-offset:3px }
#download-data { margin-top:18px }
.season-trigger[aria-busy=true] { opacity:.55 }
.mast { height:102px; display:flex; justify-content:space-between; align-items:center }
.brand { font-weight:650; font-size:23px; letter-spacing:-1.1px; display:flex; align-items:center; gap:10px; color:var(--ink); text-decoration:none }
.symbol { display:flex; align-items:flex-end; gap:3px; height:23px; transform:skewY(-12deg) }
.symbol i { background:var(--ink); width:4px; border-radius:1px }
.symbol i:nth-child(1) { height:9px }.symbol i:nth-child(2) { height:16px }.symbol i:nth-child(3) { height:23px }
.icon-button { width:44px; height:44px; border:0; background:var(--surface); border-radius:50%; display:grid; place-items:center; flex-shrink:0 }
.theme svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.5 }
.sun { display:none }[data-theme=dark] .moon { display:none }[data-theme=dark] .sun { display:block }
.player-heading { display:flex; gap:22px; align-items:flex-start; margin:30px 0 20px; min-height:111px }
.player-heading-copy { min-width:0; flex:1 }
h1 { margin:0; font-weight:450; line-height:1.1; letter-spacing:-1.5px }
.given-name { display:block; font-size:17px; color:var(--muted); letter-spacing:-.3px; margin:0 0 5px }
.family-name { display:block; font-size:43px; white-space:nowrap }
.season-story { font-size:14px; color:var(--muted); margin:12px 0 0; min-height:21px; letter-spacing:-.15px }
.portrait { position:relative; display:grid; place-items:center; overflow:hidden; flex-shrink:0; background:var(--surface); border-radius:50%; box-shadow:inset 0 0 0 1px var(--outline); isolation:isolate }
.portrait img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center top; z-index:1; filter:saturate(.7) }
.portrait:after { content:""; position:absolute; inset:0; border:1px solid var(--outline); border-radius:inherit; pointer-events:none; z-index:2 }
.portrait-initials { font-size:12px; color:var(--muted) }
.hero-portrait { width:82px; height:82px; margin-top:2px }
.hero-portrait img { filter:none }
figure { margin:0 }
.chart-caption { display:grid; grid-template-columns:1fr; grid-template-rows:44px 18px; gap:14px; color:var(--muted); font-size:12px; margin-bottom:6px }
#chart-title { grid-row:2; justify-self:start; will-change:transform }
.chart-actions { grid-row:1; justify-self:end; display:flex; align-items:center; gap:22px }
.find-player { display:flex; align-items:center; gap:8px; min-height:44px; border:0; background:none; padding:0 5px; font-size:12px; color:var(--ink); white-space:nowrap; border-radius:8px }
.find-player svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.5 }
.season-control { position:relative; z-index:5 }
.transport { display:flex; align-items:center; padding:1px; border:1px solid var(--outline); border-radius:999px; background:var(--surface) }
.transport button { border:0; background:transparent; height:44px; border-radius:999px; display:flex; align-items:center; justify-content:center; transition:background 120ms,transform 120ms var(--ease) }
.step,.play { width:44px; flex-shrink:0 }
.step svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:1.5 }
.week-trigger { width:110px; gap:6px; font-size:12px; font-weight:500; white-space:nowrap; font-variant-numeric:tabular-nums }
.week-trigger svg { width:12px; height:12px; fill:none; stroke:currentColor; stroke-width:1.4; transition:transform 160ms var(--ease) }
.week-trigger[aria-expanded=true] svg { transform:rotate(180deg) }
.play svg { width:14px; height:14px; fill:var(--ink) }
.control-divider { height:15px; width:1px; background:var(--outline); margin:0 3px }
.week-picker { position:absolute; right:0; top:calc(100% + 8px); width:248px; padding:14px; border:1px solid var(--outline); border-radius:20px; background:var(--paper); box-shadow:0 4px 8px #00000005,0 18px 48px #00000018; transform-origin:top right }
.picker-label { font-size:12px; padding:1px 5px 12px }
.week-options { display:grid; grid-template-columns:repeat(4,1fr); gap:4px }
.week-option { height:44px; border:0; border-radius:12px; background:transparent; font-size:13px; font-variant-numeric:tabular-nums }
.week-option[aria-pressed=true] { background:var(--accent); color:var(--paper); font-weight:600 }
.chart-stage { position:relative; height:430px; margin-bottom:24px }
#chart { width:100%; height:100%; display:block; overflow:visible; touch-action:pan-y; outline:none }
#chart:focus-visible { outline:1px solid var(--accent); outline-offset:7px; border-radius:4px }
.axis-text { font-size:12px; fill:var(--muted); font-variant-numeric:tabular-nums }
.grid-line { stroke:var(--grid); stroke-width:1 }
.player-path { fill:none; stroke:var(--line); stroke-width:1.4; stroke-linecap:round; stroke-linejoin:round }
.player-path.selected { stroke:var(--accent); stroke-width:2.6 }
.endpoint { fill:var(--line); stroke:var(--paper); stroke-width:2 }
.endpoint.selected { fill:var(--accent) }
.observation { fill:var(--paper); stroke:var(--accent); stroke-width:1.5 }
.endpoint-card { position:absolute; pointer-events:none; left:0; top:0; width:108px; will-change:transform }
.endpoint-total { font-size:33px; line-height:1.12; letter-spacing:-1.2px; font-weight:450; font-variant-numeric:tabular-nums; color:var(--accent) }
.endpoint-rank { font-size:11px; color:var(--muted); margin-top:3px; font-variant-numeric:tabular-nums }
.opening-label { position:absolute; top:0; left:0; font-size:12px; line-height:16px; color:var(--muted); pointer-events:none; white-space:nowrap }
.moment { position:absolute; pointer-events:none; left:0; top:0; font-size:12px; line-height:1.55; padding:5px 8px; background:var(--paper); border-radius:5px; white-space:nowrap }
.moment span { display:block; color:var(--muted) }
.moment strong { font-weight:500; color:var(--accent); font-variant-numeric:tabular-nums }
.inspector { position:absolute; left:0; top:0; pointer-events:none; background:var(--paper); border:1px solid var(--outline); border-radius:12px; padding:12px 15px; box-shadow:0 4px 20px #00000008; min-width:151px }
.inspector div { font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted) }
.inspector strong { display:block; font-size:24px; font-weight:500; letter-spacing:-.8px; font-variant-numeric:tabular-nums }
.inspector span { font-size:11px; color:var(--muted); font-variant-numeric:tabular-nums }
#inspection-line { stroke:var(--accent); stroke-width:1; opacity:.35; stroke-dasharray:3 4 }
#inspection-dot { fill:var(--paper); stroke:var(--accent); stroke-width:2 }

.players { border-top:1px solid var(--grid); display:grid; grid-template-columns:repeat(var(--count,7),minmax(0,1fr)); padding:24px 5px 0; gap:8px }
.player-button { display:flex; align-items:center; flex-direction:column; gap:8px; position:relative; padding:7px 4px 16px; background:none; border:0; min-width:0; border-radius:4px }
.player-button .portrait { width:42px; height:42px }
.player-button[aria-pressed=true] .portrait { box-shadow:0 0 0 3px var(--paper),0 0 0 4.5px var(--accent) }
.player-button .surname { font-size:12px; color:var(--muted); white-space:nowrap; line-height:1.3 }
.player-button[aria-pressed=true] .surname { color:var(--ink); font-weight:550 }
.player-button[aria-pressed=true]:after { content:""; position:absolute; bottom:0; height:2px; width:18px; background:var(--accent); border-radius:1px }
.player-rank { position:absolute; top:9px; left:calc(50% + 24px); font-size:10px; color:var(--muted); font-variant-numeric:tabular-nums }
footer { display:flex; justify-content:space-between; align-items:center; color:var(--muted); font-size:11px; margin:22px 0 28px; gap:12px }
.text-button { border:0; background:none; color:var(--muted); font-size:12px; padding:12px 0 }.text-button span { margin-left:4px }
dialog { background:var(--paper); color:var(--ink); width:460px; max-width:calc(100% - 36px); padding:34px; border:1px solid var(--outline); border-radius:20px; box-shadow:0 30px 100px #0003 }
dialog::backdrop { background:#0006; backdrop-filter:blur(3px) }
dialog h2 { font-size:26px; letter-spacing:-1px; font-weight:500; line-height:1.2; margin:12px 0 20px }
dialog p { font-size:13px; color:var(--muted); line-height:1.7 }
dialog .eyebrow { font-size:11px; text-transform:uppercase; letter-spacing:.1em }
dialog .close { position:absolute; right:14px; top:14px; background:none; font-size:24px; color:var(--muted) }
details { border-top:1px solid var(--grid); padding-top:18px; margin-top:22px }summary { font-size:12px; cursor:pointer }
table { width:100%; font-size:12px; border-collapse:collapse; font-variant-numeric:tabular-nums; margin-top:20px }
caption { text-align:left; font-weight:550; margin-bottom:8px }th,td { text-align:right; border-bottom:1px solid var(--grid); padding:7px 0 }th:first-child,td:first-child { text-align:left }th { color:var(--muted); font-weight:400 }
#search-dialog { width:510px; padding:20px 20px 12px; max-height:min(680px,85dvh); overflow:hidden }
#search-dialog[open] { display:flex; flex-direction:column }
.search-heading, #player-query, .search-meta, #search-empty { flex-shrink:0 }
.search-heading { display:flex; align-items:center; justify-content:space-between }
#search-title { font-size:21px; margin:0 }.search-heading .icon-button { background:none; font-size:26px; color:var(--muted) }
#player-query { font:inherit; font-size:16px; border:1px solid var(--grid); border-radius:10px; padding:13px 15px; width:100%; background:var(--surface); color:var(--ink); margin-top:12px }
.search-meta { font-size:12px!important; margin:14px 4px 9px!important }
.search-result { display:flex; align-items:center; gap:12px; padding:10px; border-radius:10px; cursor:pointer; min-height:63px }
.search-result .portrait { width:40px; height:40px }.search-result[aria-selected=true] { background:var(--surface) }
.result-identity { display:flex; flex-direction:column; flex:1; gap:2px }.result-identity strong { font-size:13px; font-weight:500 }.result-identity>span { font-size:11px; color:var(--muted) }
.result-score { font-size:17px; font-variant-numeric:tabular-nums; letter-spacing:-.4px }
#search-results { overflow:auto; min-height:0; max-height:min(440px,calc(85dvh - 210px)); overscroll-behavior:contain; scroll-padding-block:4px }
@media(hover:hover) {
  .transport button:not(:disabled):hover,.week-option:not([aria-pressed=true]):hover { background:var(--paper) }
  .player-button:hover .surname,.text-button:hover { color:var(--ink) }
  .find-player:hover { background:var(--surface) }
}
@media(max-width:800px) {
  main { padding:0 32px }.mast { height:90px }.chart-actions { gap:12px }
  .players { display:flex; overflow-x:auto; gap:12px; padding:18px 5px 3px; overscroll-behavior-x:contain }
  .player-button { min-width:78px; flex:1 }.hero-portrait { width:72px; height:72px }.family-name { font-size:38px }
}
@media(max-width:600px) {
  main { padding:0 22px }.mast { height:76px }.brand { font-size:21px }
  .player-heading { gap:16px; margin:24px 0 16px; min-height:107px }
  .hero-portrait { width:60px; height:60px }.given-name { font-size:15px; margin-bottom:5px }.family-name { font-size:32px; letter-spacing:-1.25px }
  .season-story { font-size:13px; line-height:1.6; min-height:42px; margin-top:10px; text-wrap:pretty }
  .chart-caption { gap:19px; margin-bottom:6px }
  .chart-actions { width:100%; justify-content:space-between; gap:6px }.find-player { font-size:12px; gap:6px; padding:0 2px }
  .transport { padding:0 }.transport .step,.transport .play { width:36px }.week-trigger { width:90px; font-size:11px }
  #chart-title { font-size:11px }.chart-stage { margin-bottom:19px }.axis-text { font-size:11px }
  .endpoint-card { width:68px }.endpoint-total { font-size:27px; letter-spacing:-1px }.endpoint-rank { font-size:10px }
  .opening-label { font-size:11px; max-width:64px; overflow:hidden; text-overflow:ellipsis }.players { gap:4px; padding-right:calc(50% - 37px); padding-left:12px; scroll-padding-inline:12px; mask-image:linear-gradient(to right,var(--left-mask,#000),#000 14px,#000 calc(100% - 14px),var(--right-mask,#000)) }.player-button { min-width:74px; gap:7px }
  .player-button .portrait { width:38px; height:38px }.player-button .surname { font-size:11px }.player-rank { left:calc(50% + 21px); font-size:10px; top:8px }
  footer { font-size:10px; margin-top:17px }.text-button { font-size:11px }
  #search-dialog { position:fixed; inset:var(--search-top,12px) 12px auto; margin:0; width:auto; max-width:none; padding:12px; height:min(620px,var(--search-height,calc(100dvh - 24px))); max-height:var(--search-height,calc(100dvh - 24px)); border-radius:18px }
  #search-results { flex:1 1 auto; max-height:none }
  #search-title { font-size:19px }
  #player-query { margin-top:8px; padding:11px 12px }
  .search-meta { margin:9px 4px 7px!important }
}
@media(max-width:360px) {
  main { padding:0 18px }.player-heading { gap:13px }.hero-portrait { width:51px; height:51px }.family-name { font-size:28px }.given-name { font-size:14px }
  .find-player svg { display:none }.transport .step,.transport .play { width:32px }.week-trigger { width:86px }
  footer { font-size:9px }.text-button { font-size:10px }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { transition:none!important; animation:none!important; scroll-behavior:auto!important }
}
/* A persistent player/plot frame replaces the detached opening-week island. */
.season-layout { display:grid; grid-template-columns:260px minmax(0,1fr); column-gap:56px; margin-top:22px; align-items:center }
.season-layout .player-heading { display:block; margin:0; padding-bottom:25px; min-height:0 }
.season-layout .hero-portrait { width:104px; height:104px; margin:0 0 22px }
.season-layout .family-name { font-size:39px; letter-spacing:-1.4px }
.season-layout .season-story { font-size:14px; line-height:1.7; margin-top:16px; min-height:48px; max-width:245px }
.portrait img { filter:none; transform:scale(1.23); transform-origin:50% 32% }
.hero-portrait img { transform:scale(1.12) }
.chart-stage { margin-bottom:0 }
.player-picker { border-top:1px solid var(--grid); margin-top:27px; padding-top:18px }

.find-player { border:1px solid var(--grid); border-radius:9px; padding:0 14px; min-width:174px; height:42px; justify-content:flex-start; color:var(--muted); gap:10px }
.find-player:hover { color:var(--ink) }
.players { border:0; padding:6px 4px 10px; gap:12px }
.player-button { gap:12px; padding:6px 2px; border-radius:8px }
.player-button .portrait { width:52px; height:52px }
.player-meta { display:flex; align-items:baseline; justify-content:center; gap:8px; white-space:nowrap }
.player-rank { position:static; font-size:11px; line-height:1.3; font-variant-numeric:tabular-nums }
.player-button .surname { font-size:12px }
.player-button[aria-pressed=true]:after { display:none }
.player-button[aria-pressed=true] .portrait { box-shadow:0 0 0 3px var(--paper),0 0 0 4px var(--accent) }
@media(max-width:1000px) and (min-width:801px) {
  .season-layout { grid-template-columns:220px minmax(0,1fr); gap:35px }
  .season-layout .family-name { font-size:34px }
}
@media(max-width:800px) {
  .season-layout { display:block; margin-top:22px }
  .season-layout .player-heading { display:flex; padding-bottom:0; gap:18px; margin-bottom:18px }
  .season-layout .hero-portrait { width:76px; height:76px; margin:0 }
  .season-layout .family-name { font-size:36px }
  .season-layout .season-story { max-width:none; margin-top:10px; min-height:44px }
  .players { gap:10px; padding:6px 12px 10px; padding-right:calc(50% - 54px) }
  .player-button { min-width:108px }
  .player-meta { gap:7px }
}
@media(max-width:600px) {
  .season-layout { margin-top:20px }
  .season-layout .hero-portrait { width:68px; height:68px }
  .season-layout .family-name { font-size:31px }
  .season-layout .season-story { font-size:13px; min-height:44px }
  .season-layout .player-heading { gap:16px; min-height:107px }
  .chart-actions { justify-content:flex-end }
  .player-picker { margin-top:15px; padding-top:15px }

  .find-player { width:100%; font-size:13px; color:var(--muted) }
  .find-player svg { display:block }
  .player-button .portrait { width:50px; height:50px }
  .player-button .surname { font-size:12px }
  .player-rank { font-size:11px }
}
@media(max-width:360px) {
  .season-layout .player-heading { gap:12px }
  .season-layout .hero-portrait { width:57px; height:57px }
  .season-layout .family-name { font-size:28px }
}

#inspect-player { display:block; color:var(--ink); font-size:12px; margin-top:3px }
@media(min-width:801px) { .player-button .portrait { width:62px; height:62px } }
@media(max-width:800px) { .players { mask-image:linear-gradient(to right,var(--left-mask,#000),#000 14px,#000 calc(100% - 14px),var(--right-mask,#000)) } }

.chart-stage { overflow:clip }

/* Keep scrolling and the player strip's edge fades without visible tracks. */
html, body, .players, #search-results, dialog { scrollbar-width:none }
html::-webkit-scrollbar, body::-webkit-scrollbar, .players::-webkit-scrollbar,
#search-results::-webkit-scrollbar, dialog::-webkit-scrollbar { display:none; width:0; height:0 }

/* Discovery and field scope share the leading edge; time stays at the trailing edge. */
figure { container-type:inline-size }
.chart-caption { grid-template-rows:auto 18px; gap:18px }
.chart-actions { justify-self:stretch; width:100%; justify-content:space-between; gap:20px; flex-wrap:wrap }
.field-controls { display:flex; align-items:center; gap:8px }
.chart-actions .find-player { min-width:0; width:auto; height:46px; padding:0 14px; border-radius:999px; font-size:12px; color:var(--ink); border-color:var(--outline); background:transparent }
.position-control { position:relative; flex-shrink:0 }
.position-trigger { display:flex; align-items:center; gap:9px; height:46px; padding:0 14px; border:1px solid var(--outline); border-radius:999px; background:transparent; color:var(--ink); font-size:12px }
.filter-dot { color:var(--muted) }
.filter-position { white-space:nowrap }
#filter-year { font-variant-numeric:tabular-nums }
.position-trigger svg { width:12px; height:12px; fill:none; stroke:currentColor; stroke-width:1.5; transition:transform 140ms var(--ease) }
.position-trigger[aria-expanded=true] { background:var(--surface) }
.position-trigger[aria-expanded=true] svg { transform:rotate(180deg) }
.position-trigger:active { transform:scale(.96) }
.position-trigger:focus:not(:focus-visible) { outline:none }
.position-menu { position:fixed; inset:auto; margin:0; width:360px; max-width:calc(100vw - 32px); padding:18px; border:1px solid var(--outline); border-radius:18px; background:var(--paper); color:var(--ink); box-shadow:0 4px 8px #00000008,0 16px 40px #00000024; transform-origin:top left; opacity:0; transform:translateY(-4px) scale(.98); transition:opacity 140ms ease-out,transform 140ms ease-out,display 140ms allow-discrete,overlay 140ms allow-discrete }
.position-menu:popover-open { opacity:1; transform:translateY(0) scale(1) }
@starting-style { .position-menu:popover-open { opacity:0; transform:translateY(-4px) scale(.98) } }
.position-menu.instant { transition:none }
.filter-section + .filter-section { margin-top:20px }
.filter-label { display:block; margin-bottom:8px; color:var(--muted); font-size:12px; font-weight:450 }
.season-trigger { display:flex; align-items:center; width:100%; min-height:44px; padding:0 12px; border:1px solid var(--outline); border-radius:10px; color:var(--ink); background:transparent; font-size:13px; font-variant-numeric:tabular-nums; gap:10px }
.season-trigger svg { width:12px; height:12px; stroke:currentColor; fill:none; stroke-width:1.5; margin-inline-start:auto }
.season-trigger:disabled { opacity:1; cursor:default }
.season-trigger:disabled svg { display:none }
.season-trigger:disabled:active { transform:none }
.sample-badge { margin-inline-start:auto; color:var(--muted); font-size:11px; font-weight:450 }
.position-options { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); padding:4px; gap:2px; background:var(--surface); border-radius:13px }
.position-option { display:grid; place-items:center; min-width:0; min-height:44px; padding:0; border:1px solid transparent; border-radius:9px; background:transparent; color:var(--muted); font-size:12px; font-weight:500 }
.position-option[aria-checked=true] { color:var(--ink); background:var(--paper); border-color:var(--outline); box-shadow:0 1px 3px #00000009 }
.position-option:focus-visible,.season-option:focus-visible { outline:2px solid var(--accent); outline-offset:-2px }
.position-option:active { transform:scale(.96) }
.season-options { margin-top:6px; padding:4px; max-height:176px; overflow:auto; scrollbar-width:none; border:1px solid var(--outline); border-radius:12px; background:var(--surface) }
.season-options::-webkit-scrollbar { display:none }
.season-option { display:flex; align-items:center; justify-content:space-between; width:100%; min-height:44px; padding:0 12px; border:0; border-radius:8px; background:transparent; font-size:13px; font-variant-numeric:tabular-nums }
.season-option svg { width:15px; height:15px; stroke:var(--accent); fill:none; stroke-width:1.5; opacity:0 }
.season-option[aria-selected=true] { background:var(--paper) }
.season-option[aria-selected=true] svg { opacity:1 }
@media(hover:hover) {
  .position-trigger:hover,.chart-actions .find-player:hover { background:var(--surface) }
  .position-option:not(:disabled):not([aria-checked=true]):hover { color:var(--ink); background:var(--paper) }
  .season-trigger:not(:disabled):hover,.season-option:hover { background:var(--surface) }
}
@container(max-width:620px) {
  .chart-actions .find-player { width:46px; padding:0; justify-content:center }
  .find-player span,.position-suffix { display:none }
  .position-trigger { min-width:65px; justify-content:center }
}
@media(max-width:600px) {
  .chart-actions { gap:12px }
  .chart-actions .find-player { width:44px; height:44px; padding:0; justify-content:center }
  .position-trigger { min-width:0; height:44px; padding:0 10px; gap:6px }
  .position-trigger .filter-chevron { display:none }
  .chart-actions { column-gap:8px }
  .position-menu { padding:16px }
  .field-controls { gap:6px }
  .transport .step,.transport .play { width:32px }
  .week-trigger { width:86px }
  .chart-caption { gap:16px }
}
@container(max-width:310px) {
  .chart-actions { row-gap:10px }
  .season-control { margin-inline-start:auto }
}

html[data-input-mode="pointer"] :is(button,a,summary,#chart):focus-visible { outline:none }

/* Team marks retain their own proportions alongside player portraits. */
.team-portrait img { object-fit:contain; transform:none; padding:13%; filter:none }

.scoring-settings { margin:16px 0; font-size:13px; line-height:1.65 }
.scoring-settings > div + div { margin-top:15px }
.scoring-settings dt { color:var(--ink); font-weight:500 }
.scoring-settings dd { margin:3px 0 0; color:var(--muted) }

/* The ranking strip is a native scroll viewport, not a cropped shortlist. */
.player-picker { display:grid; grid-template-columns:40px minmax(0,1fr) 40px; gap:10px; align-items:center }
.players { position:relative; display:flex; flex-wrap:nowrap; min-width:0; overflow-x:auto; overscroll-behavior-x:contain; gap:12px; padding:8px 8px 12px; scroll-padding-inline:8px; touch-action:pan-x pan-y; user-select:none; mask-image:linear-gradient(to right,var(--left-mask,#000),#000 14px,#000 calc(100% - 14px),var(--right-mask,#000)) }
.players .player-button { flex:0 0 calc((100% - 48px)/5); min-width:0; max-width:none; touch-action:pan-x pan-y }
.players .player-meta { max-width:100%; gap:6px }
.players .surname { overflow:hidden; text-overflow:ellipsis; min-width:0 }
.players .player-rank { flex-shrink:0 }
.rail-step { display:grid; place-items:center; width:40px; height:44px; border:0; border-radius:999px; background:transparent; color:var(--muted); transition:background 140ms var(--ease),transform 140ms var(--ease) }
.rail-step svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.5 }
.rail-step:active { transform:scale(.95) }
.rail-step:disabled { opacity:.2 }
.players.dragging,.players.dragging .player-button { cursor:grabbing }
@media(hover:hover) { .rail-step:not(:disabled):hover { background:var(--surface); color:var(--ink) } }
@media(max-width:800px) { .players .player-button { flex-basis:calc((100% - 36px)/4) } }
@media(max-width:600px) {
  .player-picker { display:block }
  .rail-step { display:none }
  .players { gap:8px; padding:8px 8px 12px }
  .players .player-button { flex-basis:calc((100% - 24px)/3.5); gap:10px }
  .players .player-meta { gap:5px }
  .players .surname { font-size:11px }
  .players .player-rank { font-size:10px }
}

@media(max-width:360px) { .players .player-button { flex-basis:calc((100% - 16px)/2.65) } }
