body[data-site-page="stats"] { background: #0a1019; color: #ecf1f8; }
.board-page { width: min(1056px, calc(100% - 3.5rem)); margin: 0 auto; padding: clamp(7.5rem, 9.5vw, 9rem) 0 5.5rem; font-variant-numeric: tabular-nums; }
.board-page h1, .board-page h2, .board-page ol, .board-page p { margin: 0; }
.board-page ol { list-style: none; padding: 0; }
.board-heading { display: grid; justify-items: center; text-align: center; gap: .75rem; margin-bottom: 1.8rem; }
.board-heading h1 { font-size: clamp(2.4rem, 5vw, 3.65rem); line-height: 1.04; letter-spacing: -.055em; font-weight: 680; }
.board-heading p { color: #acb8cb; padding-top: .7rem; font-size: 1rem; }
.board-summary { display: flex; align-items: baseline; gap: .36rem; white-space: nowrap; padding-bottom: .15rem; color: #afbed2; font-size: .85rem; }
.board-summary strong { color: #f0f5ff; font-weight: 650; font-size: 1.32rem; letter-spacing: -.045em; }
.board-summary i { display: block; width: 1px; align-self: center; height: 1rem; background: #405068; margin: 0 .45rem; }
.stage-board { position: relative; overflow: hidden; isolation: isolate; border: 1px solid #2c3949; border-radius: 20px; background: radial-gradient(ellipse at 50% 95%, #473e2a59, transparent 61%), linear-gradient(125deg,#152135,#121b28 50%,#18202b); }
.stage-board::before { content: ''; pointer-events: none; position: absolute; z-index: -1; inset: 20% 5% 0; opacity: .48; background: radial-gradient(circle,#ded3aa69 .7px, transparent .9px) center/14px 14px; mask-image: radial-gradient(ellipse at center,#000,transparent 71%); }
.stage-tools, .results-head, .paging { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.stage-tools { padding: .6rem 1.45rem; border-bottom: 1px solid #293549; gap: .8rem; background: #10192799; }
.stage-tools h2 { font-size: 1.05rem; font-weight: 640; letter-spacing: -.02em; }
.history {
  display: flex;
  min-inline-size: 0;
  max-width: 66%;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  align-items: center;
  gap: .75rem;
  color: #bdc9da;
  font-size: .8rem;
}
.history-caption { display: flex; align-items: center; gap: .45rem; }
.history-caption::before {
  content: '';
  width: 14px;
  height: 14px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background:
    linear-gradient(currentColor,currentColor) center 2px / 1px 5px no-repeat,
    linear-gradient(currentColor,currentColor) 6px 6px / 4px 1px no-repeat;
}
.history-options {
  display: flex;
  gap: 2px;
  min-width: 0;
  padding: 3px;
  overflow-x: auto;
  scrollbar-width: thin;
  border: 1px solid #2e3c50;
  border-radius: .75rem;
  background: #0c1521;
}
.history-option { position: relative; flex: 1 0 auto; cursor: pointer; }
.history-option span {
  display: grid;
  min-height: 34px;
  padding-inline: .72rem;
  place-items: center;
  border: 1px solid transparent;
  border-radius: .51rem;
  font-weight: 580;
  white-space: nowrap;
}
.history-option:hover span { color: #edf5ff; background: #182537; }
.history-option input:checked + span {
  border-color: #4b709c;
  color: #eff8ff;
  background: linear-gradient(180deg,#2c4d72,#213b5b);
  box-shadow: inset 0 1px #b3daff30;
}
.history-option input:focus-visible + span { outline: 2px solid #94d3ff; outline-offset: -2px; }
.history-option:has(input:disabled) { cursor: default; }
.winners { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .44rem; align-items: end; width: min(94%, 38rem); margin: 1.85rem auto 0 !important; }
.winner { grid-row: 1; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.winner-1 { --metal: #ffda88; --ring: #ad8041; --shadow:#493e2c; --rise: 3.5rem; --badge: 5.35rem; grid-column: 2; }
.winner-2 { --metal: #d3e2f1; --ring: #8193aa; --shadow:#324356; --rise: 2.45rem; --badge: 4.35rem; grid-column: 1; }
.winner-3 { --metal: #efb18a; --ring: #9f7058; --shadow:#493931; --rise: 1.85rem; --badge: 4.35rem; grid-column: 3; }
.medal { isolation: isolate; position: relative; display: grid; place-items: center; width: var(--badge); height: var(--badge); border: 1px solid var(--ring); border-radius: 100%; background: radial-gradient(circle at 50% 0, var(--shadow),#101923 83%); box-shadow: inset 0 0 0 3px #151c26, inset 0 0 0 4px var(--ring), 0 8px 26px #05080c66; }

.server-icon { --hue: 210; display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: .65rem; background: hsl(var(--hue) 23% 19%); color: hsl(var(--hue) 58% 81%); font-size: .74rem; font-weight: 720; letter-spacing: .025em; }
.server-icon--wifi { background:#143046; }
.server-icon--island { --hue:153; }
.server-icon--crystal { --hue:260; --slot:25%; }
.server-icon--flame { --hue:17; --slot:50%; }
.server-icon--moon { --hue:246; --slot:75%; }
.server-icon--sword { --hue:185; --slot:100%; }
.pixel-icon { width: 72%; aspect-ratio: 1; display: block; background: url('rank-emblems.png') var(--slot,0%) center / 500% 100% no-repeat; image-rendering: pixelated; }
.server-icon img { display: block; width: 92%; height: 92%; object-fit: contain; }
.medal .server-icon { width: 72%; height: 72%; background: transparent; font-size: 1.2rem; }
.medal .server-icon img,.medal .pixel-icon { width: 100%; }
.medal .server-icon img { height: 100%; }
.address { overflow-wrap: anywhere; min-width: 0; color: #eef3fb; font-weight: 580; }
.rank-star { margin-left: .27em; font-size: .76em; color: #ffd481; vertical-align: .08em; }
.winner .address { max-width: 100%; margin-top: .65rem; font-size: clamp(.97rem,1.8vw,1.24rem); line-height: 1.2; letter-spacing: -.035em; }
.winner-1 .address { color: #ffe4a8; font-size: clamp(1.1rem,2.1vw,1.58rem); }
.winner .winner-count { margin-top: .3rem; font-size: .86rem; color: #bdc8d6; }
.winner-count strong { font-weight: 710; color: #f4f6fb; }
.stage-board .sample-note { font-size: .75rem; color: #acb8ca; padding-left: .75rem; border-left: 1px solid #3e4c60; }
.results { margin-top: clamp(1.7rem,3.8vw,2.7rem); }
.results-head { margin-bottom: 1rem; }
.results h2 { font-size: clamp(1.45rem,2.6vw,1.95rem); font-weight:650; letter-spacing:-.05em; }
.find-server { display: flex; align-items: center; gap: .65rem; padding: 0 .9rem; min-height: 42px; width: min(100%,15rem); background: #111b29; border: 1px solid #2a384a; border-radius: .7rem; cursor: text; }
.find-server span { position: relative; width: 13px; height: 13px; border: 1.5px solid #aebed4; border-radius: 50%; flex: none; }
.find-server span::after { content: ''; position: absolute; left: 91%; top: 91%; width: 6px; height: 1.5px; background: #aebed4; transform: rotate(45deg); transform-origin: left center; }
.find-server input { min-width: 0; width: 100%; padding: .55rem 0; background: transparent; border: 0; color: #edf4fe; font: inherit; font-size: .87rem; outline: 0; }
.find-server input::placeholder { color: #a5b2c5; }
.find-server:focus-within, .board-page button:focus-visible { outline: 2px solid #85c7ff; outline-offset: 3px; }
.servers { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: clamp(1.5rem,4vw,3.5rem); }
.server-row { display: grid; grid-template-columns: 2ch auto minmax(0,1fr) auto; align-items: center; gap: .85rem; padding: .68rem .25rem; min-height: 3.6rem; border-top: 1px solid #233042; }
.server-row .address { font-size: .96rem; letter-spacing: -.015em; }
.row-rank { color: #97a8be; font-size: .76rem; text-align: right; }
.row-count { padding-left: .5rem; color: #e1ebfa; font-weight: 620; font-size: .94rem; }
.paging { padding: 1rem 0 0; margin-top: .15rem; border-top: 1px solid #344256; color: #aebdd0; font-size: .82rem; }
.paging div { display: flex; gap: .65rem; align-items: center; }
.paging button { width: 42px; height: 42px; border: 1px solid #334355; border-radius: .65rem; color: #e3ebf7; background: #182332; cursor: pointer; font-size: 1.16rem; line-height: 1; }
.paging button:enabled:hover { background: #27394f; }
.paging button:disabled { opacity: .38; cursor: default; }
#board-empty { padding: 2rem 0; color: #b6c4d7; }
@media (max-width: 720px) {
  .board-page { width: calc(100% - 2rem); padding-top: 6.2rem; }
  .board-heading { gap: .6rem; margin-bottom: 1.25rem; }
  .stage-tools { padding: .65rem 1rem; }

  .servers { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 520px) {
  .winners { gap: .24rem; width: 97%; }
  .winner { padding-inline: 0; }
  .winner-1 { --badge: 4.2rem; }
  .winner-2, .winner-3 { --badge: 3.25rem; }

  .winner .address { font-size: .82rem; }
  .winner-1 .address { font-size: .94rem; }
  .winner .winner-count { font-size: .73rem; }
  .stage-tools { display: grid; grid-template-columns: auto 1fr; gap: .6rem; padding: .7rem .75rem; }
  .stage-tools .sample-note { justify-self: end; border: 0; padding: 0; }
  .history { grid-column: 1/-1; max-width: none; margin: 0; gap: .45rem; }
  .history-caption::before { display: none; }
  .history-options { flex: 1; }
  .history-option span { min-height: 38px; padding-inline: .4rem; }
  .results-head { align-items: stretch; flex-direction: column; gap: .8rem; }
  .find-server { width: 100%; }
  .server-row { gap: .7rem; }
}
@media (max-width: 360px) {
  .history-option span { padding-inline: .25rem; }
}
.stage-board .podium-empty { text-align: center; padding: 3rem 1rem; color: #b6c4d7; }

.winner-step { width: 100%; height: var(--rise); margin-top: .75rem; display: grid; place-items: center; border: 1px solid color-mix(in srgb,var(--ring) 62%,#252a30); border-bottom: 0; border-top: 2px solid var(--ring); border-radius: .65rem .65rem 0 0; background: linear-gradient(180deg,var(--shadow),color-mix(in srgb,var(--shadow) 25%,#131d29)); color: var(--metal); font-size: clamp(1rem, 1.8vw, 1.4rem); line-height: 1; font-weight: 690; letter-spacing: -.04em; }
.winner-1 .medal::before,
.winner-1 .medal::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}
.winner-1 .medal::before {
  bottom: calc(100% - 1px);
  width: 2.15rem;
  height: 1.15rem;
  background:
    radial-gradient(ellipse at 50% 73%, #fff4c9 0 8%, transparent 9%),
    linear-gradient(110deg, transparent 56%, #92591b45 57%),
    linear-gradient(#fff0b1 5%, #ffd77d 45%, #c78d37);
  clip-path: polygon(0 19%, 29% 42%, 50% 0, 71% 42%, 100% 19%, 85% 100%, 15% 100%);
}
.winner-1 .medal::after {
  bottom: calc(100% - 5px);
  width: 1.5rem;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #ba8138, #ffe29a 47%, #c28a40);
  box-shadow: 0 2px 6px #ebae5350;
}
.host-copy { display: inline; border: 0; background: transparent; padding: 0; color: inherit; font: inherit; line-height: inherit; letter-spacing: inherit; text-align: inherit; overflow-wrap: anywhere; cursor: copy; }
.host-copy:hover { text-decoration: underline; text-underline-offset: .2em; }
.copy-status:not(:empty) { position: fixed; z-index: 20; bottom: 1.3rem; left: 50%; transform: translateX(-50%); width: max-content; max-width: 90%; overflow-wrap: anywhere; background: #1d3348; padding: .65rem 1rem; color: #eff8ff; border: 1px solid #486682; border-radius: .6rem; box-shadow: 0 4px 20px #0007; font-size: .85rem; }
