:root {
  --paper: #f4f5f7;
  --white: #fff;
  --ink: #19191f;
  --panel: #25252d;
  --red: #ba344b;
  --pink: #efc4cd;
  --muted: #62626e;
  --line: #dedee5;
  --soft: #faedf0;
  --num: Consolas, "SFMono-Regular", monospace;
  --font: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.6 var(--font); letter-spacing: 0; }
::selection { background: var(--pink); color: var(--ink); }
html { scrollbar-color: #aaa6ae var(--paper); }
button, input, select { font: inherit; color: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { border: 0; background: none; cursor: pointer; }
button, input, select { border-radius: 4px; }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #297986; outline-offset: 3px; }
input { caret-color: var(--red); }
input::placeholder { color: var(--muted); opacity: 1; }
img { display: block; max-width: 100%; }
svg { display: block; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .title-button { overflow-wrap: anywhere; }
a { color: inherit; text-underline-offset: 4px; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; }
.up { color: var(--red); }
.wrap { width: min(1400px, 100%); margin: auto; padding-inline: 36px; }
.header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.identity > img { width: 54px; height: 54px; border: 2px solid var(--pink); border-radius: 50%; flex: none; }
.brandline { display: flex; align-items: baseline; gap: 14px; }
.brand { font-size: 28px; font-weight: 800; line-height: 1.3; white-space: nowrap; }
.brandline h1 { font-size: 16px; font-weight: 500; white-space: nowrap; }
.brandline + div { color: var(--muted); font-size: 12px; margin-top: 3px; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 22px; flex: none; }
.plain-link { padding: 9px 0; font-size: 13px; }
.plain-link:hover { color: var(--red); }
.schedule-strip { min-height: 56px; padding-block: 12px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; font-size: 12px; }
.race-schedule { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 18px; }
.race-schedule > span { color: var(--muted); }
.race-schedule strong { font-weight: 600; color: var(--red); white-space: nowrap; }
.sample-time { color: var(--muted); text-align: right; }
.top-board { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.leaders { min-width: 0; background: var(--ink); color: #f5f5f7; padding: 26px 28px 16px; }
.leaders-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.leaders h2 { font-size: 21px; line-height: 1.5; }
.panel-controls { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.segments { display: inline-flex; gap: 2px; padding: 3px; background: #e7e7ec; border-radius: 5px; flex: none; }
.segments button { padding: 5px 11px; min-height: 32px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.segments button:hover { background: #ffffff70; color: var(--ink); }
.segments button[aria-pressed=true] { background: var(--white); color: var(--red); }
.leaders .segments { background: #303037; }
.leaders .segments button { color: #d0d0d7; }
.leaders .segments button:hover { background: #45454e; color: var(--white); }
.leaders .segments button[aria-pressed=true] { background: #f5f5f7; color: var(--ink); }
.period-select { padding: 6px 7px; min-height: 38px; border: 1px solid #4d4d59; background: var(--ink); color: #eeeef3; font-size: 12px; }
.legend { display: flex; gap: 10px 22px; flex-wrap: wrap; min-height: 24px; margin-top: 22px; }
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.swatch { display: inline-block; width: 16px; height: 3px; flex: none; }
.legend-value { color: #c7c7d0; margin-left: 3px; font-family: var(--num); }
.chart-shell { position: relative; min-width: 0; }
.compare-chart { height: 232px; margin-top: 7px; }
.chart-svg { width: 100%; height: 100%; overflow: visible; }
.chart-svg text { font-family: var(--num); font-size: 10px; }
.chart-svg .grid { stroke: #dddde5; stroke-width: 1; }
.chart-svg .time-grid { stroke: #ededf2; stroke-width: 1; }
.chart-svg .axis-label { fill: #62626e; }
.leaders .chart-svg .grid { stroke: #3b3b46; }
.leaders .chart-svg .time-grid { stroke: #2b2b34; }
.leaders .chart-svg .axis-label { fill: #b0b0be; }
.chart-svg .series-line { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chart-svg .crosshair { stroke: #888893; stroke-width: 1; stroke-dasharray: 3 4; pointer-events: none; }
.chart-svg .chart-hit { fill: transparent; touch-action: pan-y; }
.chart-readout { height: 24px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #bdbdc7; font: 11px/24px var(--num); }
.mascot { display: flex; flex-direction: column; align-items: center; position: relative; overflow: hidden; padding: 20px 20px 16px; background: #f1e2e8; }
.mascot-top { display: flex; align-items: center; gap: 8px; align-self: flex-start; font-size: 12px; font-weight: 700; }
.small-dot { width: 6px; height: 6px; background: var(--red); border-radius: 50%; flex: none; }
.mascot-pause { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; margin-left: auto; color: #6c4354; }
.mascot-pause:hover { background: #e4cbd6; }
.mascot-pause .play-icon, .mascot-pause[aria-pressed=true] .pause-icon { display: none; }
.mascot-pause[aria-pressed=true] .play-icon { display: block; }
.mascot-actor { position: relative; width: 260px; height: 380px; flex: none; margin: 56px auto 0; padding: 0; touch-action: manipulation; }
.mascot-art { width: 100%; height: 100%; object-fit: contain; user-select: none; }
.mascot-actor canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.live2d-ready .mascot-art { visibility: hidden; }
.mascot-bubble { position: absolute; z-index: 1; left: 50%; top: -52px; display: grid; place-items: center; width: 64px; height: 60px; padding: 5px; border: 1px solid #d7bec9; border-radius: 8px; background: var(--white); opacity: 0; transform: translateX(-50%); pointer-events: none; }
.mascot-bubble::after { content: ""; position: absolute; bottom: -5px; left: calc(50% - 4px); width: 8px; height: 8px; border-right: 1px solid #d7bec9; border-bottom: 1px solid #d7bec9; background: var(--white); transform: rotate(45deg); }
.mascot-bubble img { width: 48px; height: 48px; object-fit: contain; }
.mascot-dialogue { display: flex; align-items: center; width: 100%; min-height: 68px; }
.mascot-quote { width: 100%; min-height: 44px; display: grid; align-items: center; font-size: 12px; font-weight: 600; }
.mascot-pay { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; padding-top: 12px; margin-top: 14px; border-top: 1px solid #d7bec9; font-size: 11px; }
.mascot-pay strong { font: 19px/1.3 var(--num); }
.works-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding-block: 30px 18px; }
.section-name { display: flex; align-items: baseline; gap: 12px; }
.section-name h2 { font-size: 21px; white-space: nowrap; }
.section-name span { color: var(--muted); font-size: 12px; }
.work-controls { display: flex; align-items: center; gap: 14px; }
.search { width: 210px; min-width: 0; min-height: 38px; padding: 8px 11px; border: 1px solid #cfcfd8; background: var(--white); font-size: 12px; }
.rate-control { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.alphabet { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.alphabet button { min-width: 32px; min-height: 32px; padding: 4px 8px; color: var(--muted); font: 12px/1.6 var(--num); }
.alphabet button:hover { background: #e6e6eb; color: var(--ink); }
.alphabet button[aria-pressed=true] { background: var(--ink); color: var(--white); }
.alphabet-note { margin-left: auto; color: var(--muted); font-size: 11px; }
.works { display: grid; gap: 16px; }
.compact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.work { min-width: 0; overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: 6px; }
.work-compact { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px 18px; position: relative; padding: 20px; min-height: 200px; cursor: pointer; }
.work-compact:hover { border-color: #bca3ad; }
.work-compact:has([aria-expanded=true]) { border-color: var(--red); background: #fff5f7; }
.compact-cover, .cover-button { position: relative; padding: 0; overflow: hidden; background: #f2f0f3; border-radius: 3px; }
.compact-cover { width: 76px; height: 102px; }
.compact-cover img, .cover-button img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.sample-stamp { position: absolute; left: 0; bottom: 0; padding: 1px 5px; background: #ffffffed; color: #62626e; font-size: 10px; }
.compact-content { min-width: 0; padding-top: 16px; }
.title-button { display: block; padding: 0; text-align: left; font-size: 15px; font-weight: 700; line-height: 1.45; }
.title-button:hover { color: var(--red); }
.author { color: var(--muted); font-size: 11px; margin-top: 4px; overflow-wrap: anywhere; }
.compact-rank { position: absolute; right: 20px; top: 12px; color: var(--muted); font-size: 10px; }
.compact-content .stat-label { margin-top: 7px; }
.stat-label { color: var(--muted); font-size: 11px; }
.compact-heat { font: 28px/1.25 var(--num); font-variant-numeric: tabular-nums; }
.compact-growth { grid-column: 1/-1; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 35px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 11px; }
.compact-growth > span:last-child { text-align: right; }
.compact-growth .num { font-size: 20px; font-weight: 500; }
.growth-note { display: block; margin-top: 2px; color: var(--muted); font: 11px/1.5 var(--font); }
.work-large { display: grid; grid-template-columns: 184px minmax(0, 1fr); }
.compact-grid .work-large { grid-column: 1/-1; }
.cover-panel { padding: 16px; background: #eeedf1; border-right: 1px solid var(--line); }
.cover-button { width: 100%; aspect-ratio: 3/4; }
.initial-badge { position: absolute; right: 6px; bottom: 6px; padding: 3px 6px; background: var(--ink); color: var(--white); font: 12px var(--num); }
.cover-caption { margin-top: 10px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.work-body { padding: 22px 26px 16px; min-width: 0; }
.work-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.work-title-group { min-width: 0; }
.work-title-group h3 { font-size: 18px; }
.work-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; flex: none; }
.rank { padding: 3px 8px; background: #ededf2; color: var(--muted); font-size: 11px; border-radius: 3px; white-space: nowrap; }
.rank.front { background: var(--soft); color: var(--red); }
.collapse-work { padding: 5px 8px; min-height: 32px; color: var(--red); font-size: 12px; }
.collapse-work:hover { background: var(--soft); }
.work-stats { display: flex; gap: 44px; flex-wrap: wrap; margin-top: 18px; }
.stat-value { font: 26px/1.4 var(--num); margin-top: 2px; }
.stat-value.heat { font-size: 30px; }
.chart-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: 11px; margin-top: 18px; }
.work-chart { height: 210px; margin-top: 8px; }
.work-readout { color: var(--muted); margin-top: 3px; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 28px 32px; margin-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.foot-brand { display: flex; align-items: center; gap: 9px; flex: none; }
.foot-brand img { width: 30px; height: 30px; border-radius: 50%; }
.foot p { text-align: right; }
.empty, .no-results { grid-column: 1/-1; min-height: 290px; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 32px; text-align: center; }
.empty img { width: 150px; height: 110px; object-fit: contain; }
.empty h3 { margin-top: 12px; font-size: 18px; }
.empty p { margin-top: 6px; color: var(--muted); font-size: 12px; }
.no-results { color: var(--muted); }
.reset-search { margin-top: 12px; padding: 8px 12px; color: var(--red); text-decoration: underline; text-underline-offset: 4px; }
.empty-leaders { height: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; color: #c3c3cc; font-size: 12px; }
.empty-leaders strong { color: #eee; font-size: 18px; font-weight: 500; }
.modal { width: min(780px, calc(100% - 32px)); max-height: 88vh; padding: 0; overflow: auto; border: 0; border-radius: 8px; background: var(--white); color: var(--ink); }
.modal::backdrop { background: #121218a6; }
.modal-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 26px; border-bottom: 1px solid var(--line); }
.modal-title { display: flex; align-items: center; gap: 10px; }
.modal-title img { width: 34px; height: 34px; border-radius: 50%; }
.modal-top h2 { font-size: 18px; }
.close { position: relative; width: 36px; height: 36px; flex: none; background: var(--paper); color: transparent; }
.close::before, .close::after { content: ""; position: absolute; inset: 17px 10px; height: 2px; background: var(--ink); transform: rotate(45deg); }
.close::after { transform: rotate(-45deg); }
.close:hover { background: #e7e7ec; }
.modal-main { padding: 24px 26px; }
.rules-content h3 { margin: 24px 0 8px; font-size: 15px; }
.rules-content p { font-size: 13px; line-height: 1.9; }
.rules-prizes { display: flex; gap: 10px 24px; flex-wrap: wrap; padding: 10px 0 14px; margin-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 12px; }
.rules-prizes b { font: 20px var(--num); color: var(--red); margin-left: 7px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }
@media (max-width: 1200px) {
  .wrap { padding-inline: 24px; }
  .leaders-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .panel-controls { justify-content: flex-start; }
  .legend { margin-top: 16px; }
  .mascot { justify-content: center; }
  .mascot-top { align-self: center; }
  .work-controls { flex: 1 1 100%; }
  .search { flex: 1; }
  .work-compact { padding: 16px; gap: 12px; grid-template-columns: 66px minmax(0, 1fr); }
  .compact-cover { width: 66px; height: 88px; }
  .compact-rank { right: 16px; }
}
@media (max-width: 900px) {
  .compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-board { grid-template-columns: minmax(0, 1fr) 240px; }
  .leaders { padding: 22px 20px 14px; }
  .mascot { padding: 18px 12px; }
  .mascot-actor { width: 212px; height: 320px; }
  .mascot-pay { flex-wrap: wrap; justify-content: center; column-gap: 10px; }
  .work-large { grid-template-columns: 154px minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .wrap { padding-inline: 16px; }
  .header-inner { min-height: 88px; gap: 12px; padding-block: 14px; }
  .identity { gap: 10px; }
  .identity > img { width: 44px; height: 44px; }
  .brandline { gap: 8px; flex-wrap: wrap; }
  .brand { font-size: 24px; }
  .brandline h1 { font-size: 12px; }
  .brandline + div { font-size: 12px; }
  .header-actions { gap: 7px; }
  .plain-link { font-size: 11px; }
  .schedule-strip { display: block; font-size: 12px; padding-block: 14px; }
  .race-schedule { gap: 4px 12px; }
  .sample-time { margin-top: 5px; text-align: left; font-size: 11px; }
  .top-board { grid-template-columns: minmax(0, 1fr); }
  .leaders { padding: 20px 16px 12px; }
  .leaders h2 { font-size: 19px; }
  .panel-controls { gap: 6px; }
  .segments button { padding-inline: 9px; min-height: 34px; }
  .period-select { font-size: 11px; min-height: 40px; padding-inline: 4px; }
  .legend { gap: 8px 16px; }
  .legend-item { font-size: 11px; }
  .legend-value { margin-left: 0; }
  .compare-chart { height: 214px; }
  .chart-readout { font-size: 11px; }
  .mascot { min-height: 288px; padding: 15px 12px 15px 164px; align-items: flex-start; }
  .mascot-top { align-self: flex-start; font-size: 11px; }
  .mascot-actor { position: absolute; left: 4px; top: 56px; width: 148px; height: 228px; margin: 0; }
  .mascot-dialogue { min-height: 52px; }
  .mascot-quote { min-height: 44px; margin-top: 0; font-size: 12px; }
  .mascot-pay { border-top: 0; padding: 8px 0 0; margin-top: 0; justify-content: flex-start; gap: 7px; font-size: 11px; }
  .mascot-pay strong { font-size: 13px; }
  .works-bar { display: block; padding-block: 24px 14px; }
  .section-name { justify-content: space-between; gap: 8px; }
  .section-name h2 { font-size: 20px; }
  .section-name span { font-size: 11px; }
  .work-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 8px; margin-top: 14px; }
  .search { grid-column: 1/-1; width: 100%; min-height: 42px; font-size: 13px; }
  .rate-control { gap: 6px; font-size: 11px; }
  .work-controls .segments button { padding-inline: 8px; font-size: 11px; }
  .alphabet { gap: 4px; margin-bottom: 16px; padding-bottom: 12px; }
  .alphabet-note { width: 100%; margin: 4px 0 0; font-size: 10px; }
  .compact-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .work-compact { grid-template-columns: 68px minmax(0, 1fr); gap: 12px 16px; min-height: 180px; padding: 16px; }
  .compact-cover { width: 68px; height: 91px; }
  .compact-content { padding-top: 13px; }
  .compact-rank { top: 10px; right: 16px; }
  .compact-growth { padding-top: 10px; min-height: 34px; }
  .compact-content .stat-label { margin-top: 5px; }
  .work-large { grid-template-columns: 92px minmax(0, 1fr); }
  .cover-panel { padding: 10px; }
  .cover-caption { font-size: 10px; margin-top: 8px; }
  .work-body { padding: 14px 12px 12px; }
  .work-heading { gap: 8px; flex-wrap: wrap; }
  .work-title-group h3 { font-size: 16px; }
  .work-heading .author { font-size: 10px; }
  .work-actions { justify-content: flex-start; gap: 4px; }
  .rank { font-size: 10px; }
  .collapse-work { min-height: 30px; font-size: 11px; }
  .work-stats { gap: 8px 18px; margin-top: 12px; }
  .stat-label { font-size: 10px; }
  .stat-value, .stat-value.heat { font-size: 24px; }
  .chart-meta { font-size: 10px; margin-top: 12px; }
  .work-chart { height: 180px; margin-top: 6px; }
  .foot { padding-block: 20px 26px; margin-top: 24px; gap: 12px; font-size: 10px; }
  .foot-brand { gap: 6px; }
  .foot-brand img { width: 26px; height: 26px; }
  .modal { width: calc(100% - 24px); }
  .modal-top { padding: 16px; }
  .modal-top h2 { font-size: 16px; }
  .modal-main { padding: 18px; }
}
@media (max-width: 374px) {
  .header-inner { flex-wrap: wrap; padding-block: 12px; gap: 10px; }
  .header-actions { margin-left: auto; }
  .brandline { flex-wrap: nowrap; }
  .panel-controls { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-controls > .segments { grid-column: 1/-1; justify-self: start; }
  .panel-controls > label, .panel-controls .period-select { width: 100%; }
  .work-controls { grid-template-columns: minmax(0, 1fr); }
  .view-toggle { justify-self: start; }
  .legend-value { display: none; }
  .panel-controls { gap: 6px; }
  .leaders .segments button { padding-inline: 7px; font-size: 11px; }
  .work-large { grid-template-columns: 76px minmax(0, 1fr); }
  .cover-panel { padding: 7px; }
  .work-body { padding-inline: 9px; }
  .stat-value, .stat-value.heat { font-size: 22px; }
  .stat-label { font-size: 10px; }
  .mascot { padding-left: 144px; }
  .mascot-actor { left: 0; width: 136px; }
  .mascot-quote { font-size: 12px; }
}
@media (prefers-reduced-motion: no-preference) {
  button, .work-compact { transition: background-color .16s ease-out, color .16s ease-out, border-color .16s ease-out; }
  .compact-grid .work-large { animation: reveal .22s ease-out; }
  @keyframes reveal { from { clip-path: inset(0 0 12px); } to { clip-path: inset(0); } }
}
@media print {
  .header-actions, .work-controls, .alphabet, .panel-controls, .close { display: none; }
  .wrap { width: 100%; padding: 0; }
  .work { break-inside: avoid; }
  .leaders { print-color-adjust: exact; }
  .foot { padding-bottom: 0; }
}
