.score-page, .score-page * { box-sizing: border-box; }
.score-page {
  --score-ink: var(--yy-ink, #172e4d);
  --score-muted: var(--yy-muted, #51657b);
  --score-blue: var(--yy-blue, #275db8);
  --score-line: var(--yy-line, #cdd9e9);
  --score-gutter: clamp(13px, 1.6vw, 21px);
  width: min(1110px, calc(100% - clamp(36px, 8vw, 96px)));
  margin: clamp(14px, 2vw, 26px) auto 48px;
  color: var(--score-ink);
  line-height: 1.5;
}
.score-page [hidden] { display: none !important; }
.score-page :is(h1,h2,p) { margin: 0; }
.score-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(14px, 1.6vw, 20px);
}
.score-heading h1 {
  font-size: clamp(1.9rem, 3vw, 2.55rem);
  font-weight: 760;
  line-height: 1.16;
  letter-spacing: -.055em;
}
.score-heading p { color: var(--score-muted); margin: 3px 0 0; }
.score-layout { display: grid; grid-template-columns: minmax(226px, .76fr) minmax(0, 2.24fr); gap: clamp(12px, 1.6vw, 20px); align-items: start; }
.score-page :is(button,input,select) { font: inherit; }
.score-page :is(input,select) {
  appearance: none;
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 15px;
  border: 1px solid #b8c7d9;
  border-radius: 14px;
  color: var(--score-ink);
  background-color: #fff;
  font-size: 1rem;
  font-weight: 460;
}
.score-page select {
  cursor: pointer;
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, #526482 50%), linear-gradient(135deg, #526482 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 12px) 52%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
.score-page :is(input,select,button,summary):focus-visible { outline: 3px solid #436ed0; outline-offset: 3px; }
.score-page button {
  min-height: 38px;
  padding: 6px 14px;
  border: 1px solid #b6c5db;
  border-radius: 999px;
  background-color: #fff;
  color: #235396;
  font-weight: 620;
  font-size: .875rem;
  cursor: pointer;
}
.score-page button:hover:enabled { background-color: #e9f0fb; border-color: #95acce; }
.score-page button:disabled { color: #74839a; background-color: #f8f9fc; cursor: default; }
.score-page button:active:enabled { translate: 0 1px; }
.score-page .season-choice {
  display: flex;
  align-items: center;
  border: 1px solid #acbcd17d;
  background: linear-gradient(155deg, #ffffffed, #eaf1ffbf 78%);
  border-radius: 24px;
  padding: 2px 3px 2px 18px;
  box-shadow: inset 0 1px 1px #fff, inset 0 -1px 1px #9caac642, 0 3px 10px #5a729816;
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
  backdrop-filter: blur(16px) saturate(1.35);
}
.season-choice span { color: var(--score-muted); font-size: .84rem; white-space: nowrap; }
.score-page .season-choice select { width: auto; background-color: transparent; border: 0; border-radius: 24px; padding-left: 9px; height: 40px; font-size: .94rem; font-weight: 700; }
.season-overview, .leaderboard {
  min-width: 0;
  border: 1px solid #bacbdf;
  border-radius: 24px;
  box-shadow: 0 6px 28px -13px #4c628542, inset 0 1px 1px #fff;
}
.season-overview {
  overflow: hidden;
  padding-top: 16px;
  background: radial-gradient(ellipse at 88% 13%, #c6cbf480, transparent 36%),
    linear-gradient(145deg,#e9f4ff 0,#e9ecfc 40%,#f7faff 74%,#fff 100%);
}
.season-overview h2 { padding-inline: var(--score-gutter); font-size: 1.06rem; letter-spacing: -.035em; }
.cutoffs { margin: 0 var(--score-gutter); font-variant-numeric: tabular-nums; }
.cutoff-lead { position: relative; padding: 20px 0 14px; isolation: isolate; }
.cutoffs span { color: var(--score-muted); font-size: .9rem; }
.cutoffs strong { color: #172f56; font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.cutoff-lead strong { display: block; width: fit-content; margin-top: 3px; font-size: clamp(1.86rem, 2.7vw, 2.3rem); font-weight: 675; letter-spacing: -.055em; line-height: 1.16; }
.score-medal {
  position: absolute;
  right: -6px;
  top: -22px;
  z-index: -1;
  display: grid;
  place-items: center;
  width: clamp(43px,3.9vw,53px);
  aspect-ratio: 1;
  border: 1px solid #bac8ed;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff 3%, #e8f5ff 20%, #bec9f0 66%, #f5eeff 88%);
  box-shadow: inset 2px 3px 3px white, inset -2px -3px 4px #9ba5d7a8, 0 4px 10px #6e7e9d36;
  transform: rotate(10deg);
}
.score-medal::before { content: ""; position: absolute; inset: 7%; border: 1px solid #fff9; border-bottom-color: #adbcdf; border-radius: 50%; }
.score-medal i { width: 56%; height: 55%; background: linear-gradient(132deg,#fef4d0 4%,#d0ae74 31%,#e9d8bc 49%,#9589c0 99%); clip-path: polygon(50% 0,62% 31%,98% 35%,72% 59%,79% 94%,50% 77%,19% 94%,26% 59%,1% 35%,37% 31%); }
.cutoff-minor { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-top: 1px solid #bfcee3; padding: 7px 0; }
.cutoff-minor strong { font-size: 1.05rem; font-weight: 620; }
.score-data { display: grid; gap: 3px; border-top: 1px solid #c4d3e6; margin-top: 6px; padding: 10px var(--score-gutter) 13px; background: #f8faff; color: var(--score-muted); font-size: .82rem; line-height: 1.45; overflow-wrap: anywhere; }
#score-source time { display: block; }
#score-status:empty { display: none; }
#score-refresh { justify-self: start; margin-top: 4px; }
.leaderboard { overflow: clip; background: #fcfdff; }
#score-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(115px,.43fr) auto;
  align-items: end;
  gap: 11px;
  padding: 11px var(--score-gutter) 12px;
  border-bottom: 1px solid #d0dced;
  background: linear-gradient(110deg, #f7fafe, #eef2fb);
  box-shadow: inset 0 1px 1px #fff;
}
#score-form label { display: grid; gap: 4px; color: #3d526e; font-size: .875rem; font-weight: 630; min-width: 0; }
.score-searchbox { display: grid; position: relative; }
.score-searchbox i { position: absolute; left: 14px; top: 14px; width: 14px; height: 14px; border: 1.8px solid #5c6d88; border-radius: 50%; pointer-events: none; }
.score-searchbox i::after { content: ""; position: absolute; width: 7px; height: 2px; top: 10px; left: 9px; transform: rotate(45deg); transform-origin: left center; background: #5c6d88; border-radius: 2px; }
#score-query { padding-left: 40px; }
#score-query::placeholder { color: #65758d; }
.score-page .search-button {
  min-height: 44px;
  padding: 0 clamp(19px,2vw,30px);
  background: linear-gradient(155deg, #3c68bc, #2b51a9);
  border: 1px solid #284f9f;
  color: white;
  box-shadow: inset 0 1px 1px #ffffff63, 0 2px 4px #40599225;
  font-size: 1rem;
}
.score-page .search-button:hover:enabled { background: #244e9b; }
.results-heading,.score-pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.results-heading { padding: 12px var(--score-gutter) 9px; }
.results-heading div { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.results-heading h2 { font-size: 1.16rem; line-height: 1.2; letter-spacing: -.035em; scroll-margin-top: 90px; }
#score-count,#score-page-index { color: var(--score-muted); font-size: .875rem; }
.rank-table { width: 100%; border-collapse: collapse; font-size: .94rem; line-height: 1.32; font-variant-numeric: tabular-nums; text-align: left; }
.rank-table th { background: #f0f4fa; color: #52647c; font-size: .82rem; font-weight: 620; white-space: nowrap; }
.rank-table :is(td,th) { padding: 5px clamp(5px,.75vw,10px); border-bottom: 1px solid #e0e7f0; }
.rank-table :is(th,td):first-child { padding-left: var(--score-gutter); }
.rank-table :is(th,td):last-child { padding-right: var(--score-gutter); }
.rank-table .numeric { text-align: right; white-space: nowrap; }
.rank-num { color: var(--score-muted); font-size: .9rem; font-weight: 610; }
.rank-num span { display: inline-block; min-width: 29px; text-align: center; }
.rank-top span { padding: 2px 6px; border-radius: 7px; font-weight: 740; color: #514768; background: #eeebf7; }
.rank-top[data-rank="1"] span { background: #f6edda; color: #75541c; }
.rank-top[data-rank="2"] span { background: #e9eef7; color: #445a75; }
.player-name { font-weight: 665; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.player-meta { display: flex; flex-wrap: wrap; gap: 1px 9px; font-size: .8rem; line-height: 1.17; align-items: baseline; color: var(--score-muted); }
.player-meta details { max-width: min(260px,100%); }
.player-meta summary { color: #355c99; cursor: pointer; list-style: none; text-decoration: underline; text-decoration-color: #a9bdd9; text-underline-offset: 2px; }
.player-meta summary::-webkit-details-marker { display: none; }
.player-meta code { color: #2f4d77; user-select: all; overflow-wrap: anywhere; }
.rank-table .rating { font-weight: 710; color: #254570; }
.score-pagination { padding: 14px var(--score-gutter); }
.score-pagination div { display: flex; gap: 7px; }
#score-empty { padding: 26px var(--score-gutter); color: var(--score-muted); }
@media (max-width: 960px) {
  .score-layout { grid-template-columns: minmax(0,1fr); }
  .season-overview { padding-top: 12px; }
  .cutoffs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-block: 8px; }
  .cutoffs > div { display: block; padding: 1px 12px; border: 0; border-right: 1px solid #bfcee3; }
  .cutoffs > div:first-child { padding-left: 0; }
  .cutoffs > div:last-child { border: 0; padding-right: 0; }
  .cutoffs strong { display: block; font-size: clamp(1.06rem,3.25vw,1.7rem); letter-spacing: -.035em; margin: 2px 0 0; line-height: 1.25; }
  .score-medal { display: none; }
  .score-data { margin: 0; padding-block: 8px; grid-template-columns: minmax(0,1fr) auto; gap: 2px 10px; }
  #score-source { grid-column: 1; grid-row: 1; }
  #score-status { grid-column: 1/-1; grid-row: 2; }
  #score-refresh { grid-column: 2; grid-row: 1; margin: 0; align-self: center; }
}
@media (max-width: 650px) {
  .score-page { width: calc(100% - 24px); margin-top: 14px; }
  .score-heading { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px; }
  .score-heading > div { display: contents; }
  .score-heading h1 { font-size: clamp(1.56rem,6.6vw,1.92rem); white-space: nowrap; }
  .score-heading p { grid-column: 1/-1; grid-row: 2; margin: 0; font-size: .94rem; }
  .score-page .season-choice { grid-column: 2; grid-row: 1; padding-left: 9px; }
  .score-page .season-choice select { height: 34px; font-size: .83rem; padding-left: 6px; padding-right: 27px; background-position: calc(100% - 14px) 52%,calc(100% - 8px) 52%; }
  .score-layout { gap: 10px; }
  .season-overview,.leaderboard { border-radius: 19px; }
  .cutoffs span { font-size: .8rem; white-space: nowrap; }
  .cutoffs > div { padding-inline: 6px; }
  .cutoffs > div:first-child { padding-left: 0; }
  .cutoffs > div:last-child { padding-right: 0; }
  .score-data { font-size: .8rem; }
  #score-refresh { min-height: 36px; padding-inline: 10px; font-size: .81rem; }
  #score-form { padding-block: 10px; grid-template-columns: minmax(0,1fr) auto; gap: 7px; }
  .name-field { grid-column: 1/-1; }
  #score-form label { gap: 3px; }
  #score-form .region-field { grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 8px; }
  .results-heading,.score-pagination { padding-block: 9px; }
  .rank-table thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .rank-table tbody { display: block; }
  .rank-table tr { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 2px 8px; align-items: baseline; padding: 7px var(--score-gutter); border-top: 1px solid #e0e7f0; }
  .rank-table td,.rank-table td:first-child,.rank-table td:last-child { padding: 0; border: 0; }
  .rank-table tr td:nth-child(1) { grid-row: 1/3; }
  .rank-table tr td:nth-child(2) { grid-column: 2; }
  .rank-table tr td:nth-child(3) { grid-column: 3; }
  .rank-table tr td:nth-child(4),.rank-table tr td:nth-child(5) { color: var(--score-muted); font-size: .8rem; }
  .rank-table tr td:nth-child(4) { grid-column: 2; text-align: left; }
  .rank-table tr td:nth-child(4)::before { content: "胜/负/平 "; }
  .rank-table tr td:nth-child(5)::before { content: "胜率 "; }
  .score-pagination { border-top: 1px solid var(--score-line); }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .score-page .season-choice { border-color: #8599b6; background: #f5f8ff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .season-overview { background: #f2f6fd; border-color: #9dadc3; }
}
