:root {
  color-scheme: dark;
  --bg: #101010;
  --surface: #19191d;
  --surface-2: #202026;
  --border: #2a2a30;
  --border-strong: #3a3a42;
  --text: #ffffff;
  --text-muted: #d6d3d1;
  --text-subtle: #9ca3af;
  --accent: #d9a13c;
  --accent-weak: rgba(217, 161, 60, 0.14);
  --accent-weak-border: rgba(217, 161, 60, 0.38);
  --danger: #e97a6b;
  --gold: #facc15;
  --silver: #d6d3d1;
  --bronze: #cf9a6c;
  --radius: 12px;
  --radius-lg: 16px;
  font-family: Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans TC",sans-serif
}
* {
  box-sizing: border-box
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased
}
.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px
}
.wrap.narrow {
  max-width: 880px
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(12,19,17,.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border)
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 52px
}
.bar-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  min-width: 0
}
.brand img {
  display: block;
  border-radius: 5px
}
.brand-name {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase
}
.brand-page {
  color: var(--text-subtle);
  font-size: 13px;
  white-space: nowrap
}
.brand-page::before {
  content: "/";
  margin-right: 9px;
  color: var(--border-strong)
}
.bar-link {
  color: var(--text-muted);
  font-size: 13.5px;
  text-decoration: none;
  white-space: nowrap
}
.bar-link:hover {
  color: var(--accent)
}
.hero {
  position: relative;
  padding: 44px 0 32px;
  background: radial-gradient(1100px 380px at 50% -140px,rgba(217,161,60,.12),transparent 70%)
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(233,240,237,.055) 1px,transparent 1.2px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(1000px 460px at 50% -80px,rgba(0,0,0,0.9),transparent 74%);
  mask-image: radial-gradient(1000px 460px at 50% -80px,rgba(0,0,0,0.9),transparent 74%)
}
.hero .wrap {
  position: relative
}
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(27px, 4.6vw, 38px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.02em
}
.lede {
  margin: 0;
  max-width: 52ch;
  color: var(--text-muted);
  font-size: 15px
}
.stats {
  display: flex;
  flex-wrap: wrap;
  margin: 26px 0 0
}
.stats > div {
  display: flex;
  flex-direction: column-reverse;
  padding-right: 28px
}
.stats > div + div {
  padding-left: 28px;
  border-left: 1px solid var(--border)
}
.stats dt {
  color: var(--text-subtle);
  font-size: 12px;
  margin-top: 2px
}
.stats dd {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums
}
.board-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border)
}
.tab {
  flex: 1;
  padding: 14px 12px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: 0 0;
  color: var(--text-muted);
  font: inherit;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s
}
.tab:hover {
  color: var(--text)
}
.tab.active {
  color: var(--text);
  font-weight: 700;
  border-bottom-color: var(--accent)
}
.chip:focus-visible,
.tab:focus-visible {
  outline: 2px solid var(--accent-weak-border);
  outline-offset: -2px;
  border-radius: 6px
}
.board-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border)
}
.chips {
  display: flex;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none
}
.chips::-webkit-scrollbar {
  display: none
}
.chip {
  padding: 6px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: 0 0;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s,border-color .15s,background .15s
}
.chip:hover {
  border-color: var(--border-strong);
  color: var(--text)
}
.chip.active {
  background: var(--accent-weak);
  border-color: var(--accent-weak-border);
  color: var(--accent);
  font-weight: 700
}
.search input {
  width: 190px;
  padding: 8px 13px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  transition: border-color .15s
}
.search input::placeholder {
  color: var(--text-subtle)
}
.search input:focus-visible {
  outline: 0;
  border-color: var(--accent-weak-border)
}
.row,
.thead {
  display: grid;
  grid-template-columns: 52px minmax(0,1fr) 64px 60px 60px 88px;
  align-items: center;
  column-gap: 10px;
  padding: 0 18px
}
.thead {
  height: 38px;
  color: var(--text-subtle);
  font-size: 11.5px;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--border)
}
.t-change,
.t-num,
.t-score {
  text-align: right
}
.board .row {
  min-height: 58px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background .12s
}
.board .row:last-child {
  border-bottom: 0
}
a.row:hover {
  background: rgba(255,255,255,.03)
}
a.row:focus-visible {
  outline: 2px solid var(--accent-weak-border);
  outline-offset: -2px
}
.rank {
  color: var(--text-subtle);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center
}
.medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  font-size: 13.5px
}
.medal.m1 {
  background: rgba(230,196,112,.16);
  color: var(--gold)
}
.medal.m2 {
  background: rgba(185,198,193,.14);
  color: var(--silver)
}
.medal.m3 {
  background: rgba(207,154,108,.15);
  color: var(--bronze)
}
.player {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0
}
.avatar {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-weak);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700
}
.avatar.anonymous {
  background: var(--surface-2);
  color: var(--text-subtle)
}
.who {
  min-width: 0
}
.name {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}
.name.dim {
  color: var(--text-subtle);
  font-weight: 500
}
.meta {
  display: none;
  margin: 1px 0 0;
  color: var(--text-subtle);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}
.change {
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums
}
.change.up {
  color: var(--accent)
}
.change.down {
  color: var(--danger)
}
.change.none {
  color: var(--text-subtle);
  font-weight: 400
}
.num {
  color: var(--text-muted);
  font-size: 13px;
  text-align: right;
  font-variant-numeric: tabular-nums
}
.score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums
}
.score .change {
  display: none;
  font-size: 11px
}
.board-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  color: var(--text-subtle);
  font-size: 12px
}
.pagination {
  display: flex;
  align-items: center;
  gap: 10px
}
.pagination button {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  background: 0 0;
  color: var(--text-muted);
  cursor: pointer
}
.pagination button:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--accent)
}
.pagination button:disabled {
  opacity: .38;
  cursor: default
}
.empty {
  padding: 56px 24px;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center
}
.empty svg {
  display: block;
  margin: 0 auto 12px;
  color: var(--text-subtle)
}
.player-id {
  display: flex;
  align-items: center;
  gap: 16px
}
.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 24px
}
.eyebrow {
  color: var(--text-subtle);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em
}
.player-hero h1 {
  margin: 2px 0 0;
  font-size: clamp(24px, 4vw, 32px)
}
.note {
  margin: 20px 0 14px;
  color: var(--text-muted);
  font-size: 13.5px;
  max-width: 68ch
}
.trend {
  margin-top: 24px;
  padding: 16px 18px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg)
}
.trend-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px
}
.trend-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700
}
.trend-head .trend-sub {
  color: var(--text-subtle);
  font-size: 12px;
  font-variant-numeric: tabular-nums
}
.trend-plot {
  position: relative
}
.trend svg {
  display: block;
  width: 100%;
  height: 150px;
  overflow: visible
}
.trend .gridline {
  stroke: var(--border);
  stroke-width: 1;
  vector-effect: non-scaling-stroke
}
.trend .area {
  fill: url(#trendFill)
}
.trend polyline {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke
}
.trend circle {
  fill: var(--accent)
}
.ylabel {
  position: absolute;
  right: 0;
  color: var(--text-subtle);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  background: color-mix(in srgb,var(--surface) 82%,transparent);
  padding: 0 3px;
  border-radius: 4px
}
.trend-x {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--text-subtle);
  font-size: 11px;
  font-variant-numeric: tabular-nums
}
.events-card {
  margin-top: 14px
}
.group-row {
  padding: 12px 18px 10px;
  color: var(--text-subtle);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2)
}
.event {
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) auto;
  align-items: center;
  column-gap: 12px;
  padding: 10px 18px;
  min-height: 58px;
  border-bottom: 1px solid var(--border)
}
.event:last-child {
  border-bottom: 0
}
.event .meta {
  display: block
}
.event-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-subtle)
}
.event.counted .event-mark {
  background: var(--accent-weak);
  color: var(--accent)
}
.event-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}
.event .score {
  font-size: 15px
}
.event .score.zero {
  color: var(--text-subtle);
  font-weight: 500
}
.rules {
  margin: 26px 0 0;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg)
}
.rules h2 {
  margin: 0 0 12px;
  font-size: 15px
}
.formula {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14.5px;
  font-variant-numeric: tabular-nums
}
.rules ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.65
}
.rules li {
  position: relative;
  padding-left: 17px
}
.rules li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .75
}
.rules li + li {
  margin-top: 8px
}
.foot {
  padding-top: 26px;
  padding-bottom: 44px;
  color: var(--text-subtle);
  font-size: 12.5px
}
.foot p a {
  color: var(--text-muted)
}
.foot p a:hover {
  color: var(--accent)
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 10px
}
.foot-links a {
  color: var(--text-muted);
  text-decoration: none
}
.foot-links a:hover {
  color: var(--accent)
}
.no-scroll {
  overflow: hidden
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(4,8,7,.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease,visibility 0s linear .22s
}
.drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
  transition: opacity .22s ease
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: min(480px,100vw);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-left: 1px solid var(--border);
  box-shadow: -24px 0 60px rgba(0,0,0,.45);
  transform: translateX(103%);
  visibility: hidden;
  transition: transform .28s cubic-bezier(.32, .72, .28, 1),visibility 0s linear .28s
}
.drawer.open {
  transform: none;
  visibility: visible;
  transition: transform .28s cubic-bezier(.32, .72, .28, 1)
}
.drawer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface)
}
.drawer-head .avatar {
  width: 40px;
  height: 40px;
  font-size: 17px
}
.drawer-title {
  flex: 1;
  min-width: 0
}
.drawer-title .eyebrow {
  font-size: 11px
}
.drawer-title h2 {
  margin: 1px 0 0;
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}
.drawer-page {
  color: var(--text-subtle);
  font-size: 12.5px;
  text-decoration: none;
  white-space: nowrap
}
.drawer-page:hover {
  color: var(--accent)
}
.drawer-close {
  border: 0;
  background: 0 0;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
  padding: 4px 9px 7px;
  border-radius: 8px;
  cursor: pointer
}
.drawer-close:hover {
  color: var(--text);
  background: rgba(255,255,255,.06)
}
.drawer-close:focus-visible {
  outline: 2px solid var(--accent-weak-border)
}
.drawer-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 20px calc(36px + env(safe-area-inset-bottom))
}
.drawer-body .stats {
  margin: 16px 0 0
}
.drawer-body .stats dd {
  font-size: 19px
}
.drawer-body .stats > div {
  padding-right: 20px
}
.drawer-body .stats > div + div {
  padding-left: 20px
}
.drawer-body .trend {
  margin-top: 16px;
  padding: 14px 16px 10px
}
.drawer-body .note {
  font-size: 13px
}
.drawer-body .event,
.drawer-body .group-row {
  padding-left: 14px;
  padding-right: 14px
}
@media (prefers-reduced-motion:reduce) {
  .drawer,
  .drawer-backdrop {
    transition: none
  }
}
@media (min-width:1080px) {
  .layout {
    display: grid;
    grid-template-columns: minmax(0,1fr) 340px;
    gap: 24px;
    align-items: start
  }
  .layout .rules {
    margin: 0;
    position: sticky;
    top: 72px
  }
}
@media (max-width:719px) {
  .wrap {
    padding: 0 14px
  }
  .hero {
    padding: 28px 0 24px
  }
  .stats {
    margin-top: 20px
  }
  .stats > div {
    padding-right: 20px
  }
  .stats > div + div {
    padding-left: 20px
  }
  .stats dd {
    font-size: 20px
  }
  .tab {
    font-size: 13px;
    padding: 12px 8px 10px
  }
  .board-toolbar {
    flex-wrap: wrap;
    padding: 10px 12px
  }
  .search {
    flex: 1 1 100%
  }
  .search input {
    width: 100%
  }
  .thead {
    display: none
  }
  .row,
  .thead {
    grid-template-columns: 38px minmax(0,1fr) auto;
    padding: 0 12px
  }
  .board .row {
    min-height: 62px
  }
  .row .change,
  .row .num {
    display: none
  }
  .row .meta {
    display: block
  }
  .row .score {
    font-size: 16.5px
  }
  .row .score .change {
    display: block
  }
  .medal {
    width: 25px;
    height: 25px;
    font-size: 12.5px
  }
  .avatar {
    width: 32px;
    height: 32px
  }
  .board-foot,
  .event,
  .group-row {
    padding-left: 12px;
    padding-right: 12px
  }
  .rules {
    padding: 16px
  }
  .formula {
    font-size: 13px
  }
}
@keyframes np-spin {
  to {
    transform: rotate(360deg)
  }
}
@keyframes np-track {
  0% {
    transform: translateX(-100%) scaleX(.35)
  }
  55% {
    transform: translateX(58%) scaleX(.62)
  }
  100% {
    transform: translateX(220%) scaleX(.35)
  }
}
.spinner {
  display: inline-block;
  flex: none;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: np-spin .7s linear infinite
}
.spinner.lg {
  width: 24px;
  height: 24px;
  border-width: 2.5px
}
.spinner.accent {
  color: var(--accent)
}
.button.is-busy,
button.is-busy {
  cursor: progress
}
.button.is-busy:disabled,
button.is-busy:disabled {
  opacity: .78
}
.load-inline {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-muted)
}
.load-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 26px 16px;
  color: var(--text-muted);
  font-size: 13.5px
}
.load-block .spinner,
.load-inline .spinner {
  color: var(--accent)
}
td.load-cell {
  padding: 22px 12px;
  text-align: center;
  color: var(--text-muted)
}
.top-progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 70;
  height: 2px;
  overflow: hidden;
  background: var(--accent-weak);
  pointer-events: none
}
.top-progress::after {
  content: "";
  position: absolute;
  inset: 0;
  transform-origin: left center;
  background: var(--accent);
  animation: np-track 1.15s ease-in-out infinite
}
@media (prefers-reduced-motion:reduce) {
  .spinner {
    animation-duration: 1.7s
  }
  .top-progress::after {
    animation: none;
    transform: none;
    opacity: .55
  }
}