:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-muted: #f8fafc;
  --panel-translucent: rgba(255, 255, 255, 0.9);
  --header-bg: #ffffff;
  --header-top: #1f2937;
  --line: #dce4ef;
  --line-strong: #cbd7e8;
  --section-line: #eef2f7;
  --text: #071226;
  --copy: #42506a;
  --muted: #61708a;
  --nav: #526078;
  --link: #2563eb;
  --button: #111a32;
  --button-hover: #1d2b52;
  --button-text: #ffffff;
  --control-bg: #ffffff;
  --control-hover: #f3f6fb;
  --control-disabled-bg: #f7f9fc;
  --control-disabled-text: #9aa6ba;
  --input-bg: #ffffff;
  --input-text: #071226;
  --input-placeholder: #7a879a;
  --menu-bg: #ffffff;
  --menu-hover: #eef5ff;
  --table-head-bg: #ffffff;
  --table-head-text: #536584;
  --row: #f7f9fc;
  --row-alt: #ffffff;
  --focus: #8bb7ff;
  --focus-ring: rgba(37, 99, 235, 0.12);
  --danger: #ef4444;
  --danger-ring: rgba(239, 68, 68, 0.12);
  --warning-border: #f3d19c;
  --warning-bg: #fff7ed;
  --warning-text: #8a4b12;
  --info-border: #bfdbfe;
  --info-bg: #eff6ff;
  --info-text: #1d4ed8;
  --hero-bg:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.05) 42%, rgba(255, 255, 255, 0.96) 43%),
    var(--panel);
  --bili-border: #cfe8f8;
  --bili-bg:
    linear-gradient(135deg, rgba(0, 174, 236, 0.14), rgba(255, 255, 255, 0.88) 44%),
    var(--panel);
  --bili-soft-border: rgba(0, 174, 236, 0.22);
  --bili-chip-bg: rgba(255, 255, 255, 0.72);
  --shadow-soft: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-card: 0 8px 22px rgba(15, 23, 42, 0.06);
  --shadow-large: 0 12px 30px rgba(15, 23, 42, 0.08);
  --shadow-menu: 0 14px 30px rgba(15, 23, 42, 0.16);
  --tooltip-bg: #111827;
  --tooltip-text: #ffffff;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111318;
  --panel: #191c22;
  --panel-muted: #20242c;
  --panel-translucent: rgba(31, 35, 43, 0.9);
  --header-bg: #171a20;
  --header-top: #3b82f6;
  --line: #303640;
  --line-strong: #46505e;
  --section-line: #303640;
  --text: #f4f7fb;
  --copy: #c7d0df;
  --muted: #a8b3c3;
  --nav: #b6c0cf;
  --link: #7cc7ff;
  --button: #2563eb;
  --button-hover: #1d4ed8;
  --button-text: #ffffff;
  --control-bg: #20242c;
  --control-hover: #29313c;
  --control-disabled-bg: #171a20;
  --control-disabled-text: #6f7b8d;
  --input-bg: #15181e;
  --input-text: #f4f7fb;
  --input-placeholder: #7f8a9a;
  --menu-bg: #20242c;
  --menu-hover: #29313c;
  --table-head-bg: #20242c;
  --table-head-text: #c5cfdd;
  --row: #15191f;
  --row-alt: #1b2028;
  --focus: #77b7ff;
  --focus-ring: rgba(119, 183, 255, 0.18);
  --danger: #fb7185;
  --danger-ring: rgba(251, 113, 133, 0.18);
  --warning-border: #8d672d;
  --warning-bg: #2b2418;
  --warning-text: #ffd188;
  --info-border: #315f9c;
  --info-bg: #182335;
  --info-text: #9cc8ff;
  --hero-bg:
    linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(0, 174, 236, 0.08) 42%, rgba(25, 28, 34, 0.96) 43%),
    var(--panel);
  --bili-border: #24556a;
  --bili-bg:
    linear-gradient(135deg, rgba(0, 174, 236, 0.16), rgba(25, 28, 34, 0.9) 44%),
    var(--panel);
  --bili-soft-border: rgba(124, 199, 255, 0.24);
  --bili-chip-bg: rgba(32, 36, 44, 0.78);
  --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.24);
  --shadow-card: 0 8px 22px rgba(0, 0, 0, 0.28);
  --shadow-large: 0 12px 30px rgba(0, 0, 0, 0.34);
  --shadow-menu: 0 14px 30px rgba(0, 0, 0, 0.36);
  --tooltip-bg: #edf2fb;
  --tooltip-text: #111318;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  overflow-x: hidden;
}

.site-header {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 0 26px;
  border-top: 3px solid var(--header-top);
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.brand-link:hover {
  text-decoration: none;
}

.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  object-fit: cover;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  flex: 1;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--nav);
  font-size: 18px;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  text-decoration: none;
}

.theme-toggle {
  height: 38px;
  min-width: 76px;
  margin-left: auto;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  background: var(--control-bg);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.theme-toggle:hover {
  background: var(--control-hover);
}

.shell {
  width: min(100%, 1824px);
  margin: 0 auto;
  padding: 12px 24px 40px;
}

.startup-loading {
  min-height: calc(100vh - 124px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--muted);
  text-align: center;
}

.startup-loading h1 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
}

.startup-loading p {
  margin: 0;
}

.loading-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid var(--line);
  border-top-color: var(--link);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.home-view {
  display: grid;
  gap: 24px;
}

.notice-stack {
  display: grid;
  gap: 10px;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  min-height: 300px;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--hero-bg);
  box-shadow: var(--shadow-large);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--link);
  font-weight: 700;
}

.hero-copy h1 {
  max-width: 760px;
  font-size: 46px;
}

.hero-text {
  max-width: 780px;
  margin: 18px 0 0;
  color: var(--copy);
  font-size: 18px;
  line-height: 1.8;
}

.data-notice {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--warning-border);
  border-radius: 8px;
  background: var(--warning-bg);
  color: var(--warning-text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
}

.data-notice.is-info {
  border-color: var(--info-border);
  background: var(--info-bg);
  color: var(--info-text);
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}

.ghost-button,
.text-button {
  height: 46px;
  border-radius: 8px;
  padding: 0 20px;
}

.ghost-button {
  border: 1px solid var(--line-strong);
  background: var(--control-bg);
  color: var(--text);
}

.ghost-button.dark {
  border-color: var(--button);
  background: var(--button);
  color: var(--button-text);
}

.contact-panel {
  align-self: center;
  display: grid;
  gap: 14px;
}

.contact-panel > div {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-translucent);
}

.contact-panel span,
.home-stat span,
.rank-list small {
  color: var(--muted);
}

.contact-panel strong {
  font-size: 26px;
}

.bilibili-promo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--bili-border);
  border-radius: 8px;
  background: var(--bili-bg);
  box-shadow: var(--shadow-card);
}

.bili-copy {
  min-width: 0;
}

.bili-copy h2 {
  max-width: 760px;
  margin: 0;
  color: var(--text);
  font-size: 30px;
  line-height: 1.28;
}

.bili-copy p:not(.eyebrow) {
  max-width: 780px;
  margin: 12px 0 0;
  color: var(--copy);
  line-height: 1.75;
}

.bili-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  color: var(--muted);
}

.bili-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 8px;
  background: #00aeec;
  color: #fff;
  font-weight: 700;
}

.bili-button:hover {
  background: #0098d4;
  text-decoration: none;
}

.bili-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-self: center;
}

.bili-stats div {
  min-height: 86px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--bili-soft-border);
  border-radius: 8px;
  background: var(--panel-translucent);
  text-align: center;
}

.bili-stats strong {
  min-height: 32px;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bili-stats .metric-plus {
  color: inherit;
  font-size: 0.9em;
  line-height: 1;
}

.bili-stats div > span,
.bili-topics span {
  color: var(--muted);
  font-size: 14px;
}

.bili-topics {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bili-topics span {
  padding: 7px 11px;
  border: 1px solid var(--bili-soft-border);
  border-radius: 999px;
  background: var(--bili-chip-bg);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.home-stat {
  min-height: 108px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.home-stat strong {
  font-size: 30px;
}

.home-rank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.rank-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.rank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 24px;
  border-bottom: 1px solid var(--section-line);
  background: var(--panel-muted);
}

.rank-head h2 {
  margin: 0;
  font-size: 24px;
}

.text-button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--link);
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 42px;
  margin: 0;
  padding: 24px 28px 28px;
  list-style: none;
}

.rank-list li {
  min-height: 44px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  font-size: 20px;
}

.rank-list small {
  grid-column: 2;
  display: block;
  margin-top: 2px;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-panel {
  position: relative;
  z-index: 20;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  overflow: visible;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 84px;
  padding: 0 24px;
  border-bottom: 1px solid var(--section-line);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-title svg,
.back-button svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

.meta-line {
  color: var(--muted);
  font-size: 14px;
  min-height: 20px;
  text-align: right;
}

.search-grid,
.competition-grid,
.school-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) 90px;
  gap: 12px;
  padding: 24px;
}

.search-grid {
  grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) 150px 90px;
}

.competition-grid {
  grid-template-columns: 150px minmax(190px, 1fr) 140px 160px 160px minmax(170px, 1fr) minmax(190px, 1fr) 90px;
}

.school-grid {
  grid-template-columns: minmax(240px, 1fr) 90px;
}

input,
select,
button {
  height: 60px;
  border-radius: 8px;
  font: inherit;
}

input,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--input-text);
  padding: 0 18px;
  outline: none;
}

input::placeholder {
  color: var(--input-placeholder);
}

select {
  color: var(--text);
}

input:focus,
select:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

input.is-invalid,
select.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-ring);
}

.combo-field {
  position: relative;
}

.combo-field[data-disabled="true"] {
  opacity: 0.72;
}

.combo-menu {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--menu-bg);
  box-shadow: var(--shadow-menu);
}

.combo-option {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-radius: 0;
  background: var(--menu-bg);
  color: var(--text);
  text-align: left;
}

.combo-option:hover {
  background: var(--menu-hover);
}

.combo-option small,
.combo-empty {
  color: var(--muted);
  font-size: 13px;
}

.combo-empty {
  padding: 16px;
  text-align: center;
}

button {
  border: 0;
  background: var(--button);
  color: var(--button-text);
  cursor: pointer;
}

button:hover {
  background: var(--button-hover);
}

.table-wrap {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
  height: 78px;
  text-align: center;
  vertical-align: middle;
}

th:last-child,
td:last-child {
  border-right: 0;
}

th {
  height: 70px;
  color: var(--table-head-text);
  font-weight: 500;
  background: var(--table-head-bg);
}

tbody tr:nth-child(odd) {
  background: var(--row);
}

tbody tr:nth-child(even) {
  background: var(--row-alt);
}

.result-table th:nth-child(1),
.result-table td:nth-child(1) {
  width: 96px;
}

.result-table th:nth-child(2),
.result-table td:nth-child(2) {
  width: 190px;
}

.result-table th:nth-child(3),
.result-table td:nth-child(3) {
  width: 360px;
}

.result-table th:nth-child(n+4),
.result-table td:nth-child(n+4) {
  width: 126px;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.name-with-badges {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  vertical-align: middle;
}

.champion-badge {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.22), 0 1px 4px rgba(15, 23, 42, 0.18);
}

.champion-badge-image {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}

.champion-blue {
  background: linear-gradient(135deg, #4da3ff, #1664df);
}

.champion-gold {
  background: linear-gradient(135deg, #ffd66b, #d79512);
}

.champion-badge::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  z-index: 20;
  width: max-content;
  max-width: 180px;
  padding: 7px 10px;
  border-radius: 6px;
  background: var(--tooltip-bg);
  color: var(--tooltip-text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 120ms ease, transform 120ms ease;
}

.champion-badge:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

.empty {
  display: none;
  padding: 40px;
  color: var(--muted);
  text-align: center;
}

.table-wrap.is-empty table {
  display: none;
}

.table-wrap.is-empty .empty {
  display: block;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--panel);
}

.pagination-summary,
.page-total {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination-button {
  height: 38px;
  min-width: 74px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  background: var(--control-bg);
  color: var(--text);
}

.pagination-button:hover {
  background: var(--control-hover);
}

.pagination-button:disabled {
  border-color: var(--line);
  background: var(--control-disabled-bg);
  color: var(--control-disabled-text);
  cursor: not-allowed;
}

.page-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.page-jump input {
  width: 74px;
  height: 38px;
  padding: 0 10px;
  text-align: center;
}

.detail-head {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 24px;
}

.back-button {
  width: 108px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.detail-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(96px, 1fr));
  gap: 1px;
  margin-top: 18px;
  border: 1px solid var(--line);
  background: var(--line);
  overflow: hidden;
}

.stat-cell {
  background: var(--panel);
  min-height: 82px;
  display: grid;
  place-items: center;
}

.stat-cell strong {
  display: block;
  font-size: 22px;
}

.stat-cell span {
  color: var(--muted);
  font-size: 14px;
}

.detail-table th:nth-child(1),
.detail-table td:nth-child(1) {
  width: 120px;
}

.detail-table th:nth-child(2),
.detail-table td:nth-child(2),
.detail-table th:nth-child(3),
.detail-table td:nth-child(3) {
  width: 110px;
}

.detail-table th:nth-child(4),
.detail-table td:nth-child(4) {
  width: 100px;
}

.detail-table th:nth-child(5),
.detail-table td:nth-child(5) {
  width: 360px;
}

.detail-table th:nth-child(6),
.detail-table td:nth-child(6) {
  width: 120px;
}

.competition-table {
  min-width: 1280px;
}

.competition-table th:nth-child(1),
.competition-table td:nth-child(1),
.competition-table th:nth-child(2),
.competition-table td:nth-child(2),
.competition-table th:nth-child(3),
.competition-table td:nth-child(3),
.competition-table th:nth-child(4),
.competition-table td:nth-child(4) {
  width: 100px;
}

.competition-table th:nth-child(5),
.competition-table td:nth-child(5) {
  width: 260px;
}

.competition-table th:nth-child(6),
.competition-table td:nth-child(6) {
  width: 130px;
}

.competition-table th:nth-child(7),
.competition-table td:nth-child(7) {
  width: 260px;
}

.competition-table th:nth-child(8),
.competition-table td:nth-child(8) {
  width: 120px;
}

.school-table {
  min-width: 1120px;
}

.school-table th:nth-child(1),
.school-table td:nth-child(1) {
  width: 96px;
}

.school-table th:nth-child(2),
.school-table td:nth-child(2) {
  width: 360px;
}

.school-table th:nth-child(3),
.school-table td:nth-child(3) {
  width: 140px;
}

.school-table th:nth-child(n+4),
.school-table td:nth-child(n+4) {
  width: 112px;
}

.school-detail-table {
  min-width: 980px;
}

.school-detail-table th:nth-child(1),
.school-detail-table td:nth-child(1) {
  width: 96px;
}

.school-detail-table th:nth-child(2),
.school-detail-table td:nth-child(2) {
  width: 220px;
}

.school-detail-table th:nth-child(n+3),
.school-detail-table td:nth-child(n+3) {
  width: 112px;
}

@media (max-width: 760px) {
  .site-header {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 18px 16px;
  }

  .brand-link {
    font-size: 22px;
  }

  .main-nav {
    width: 100%;
    gap: 10px;
  }

  .theme-toggle {
    width: 100%;
    margin-left: 0;
  }

  .nav-link {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 2px;
    font-size: 17px;
  }

  .shell {
    padding: 12px;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .contact-panel {
    align-self: stretch;
  }

  .bilibili-promo {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .bili-copy h2 {
    font-size: 24px;
  }

  .bili-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .bili-stats {
    grid-template-columns: 1fr;
  }

  .stat-grid,
  .home-rank-grid {
    grid-template-columns: 1fr;
  }

  .rank-list {
    grid-template-columns: 1fr;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
  }

  h1 {
    font-size: 24px;
  }

  .meta-line {
    text-align: left;
  }

  .search-grid,
  .school-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px;
  }

  .competition-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px;
  }

  .combo-menu {
    border-radius: 10px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.24);
  }

  .combo-option {
    height: 46px;
    padding: 0 12px;
  }

  .pagination-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }

  .pagination-controls {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }

  .pagination-button {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    padding: 0 8px;
  }

  .page-jump {
    flex: 1 1 100%;
  }

  .page-jump input {
    width: 86px;
  }

  input,
  select,
  button {
    height: 54px;
    font-size: 16px;
  }

  .table-wrap {
    margin-top: 16px;
    border-radius: 8px;
  }

  .detail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats-strip {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  th,
  td {
    height: 58px;
    padding: 0 12px;
    font-size: 15px;
  }
}

@media (hover: none) {
  button:hover {
    background: var(--button);
  }

  .theme-toggle:hover,
  .pagination-button:hover {
    background: var(--control-bg);
  }

  .combo-option:hover {
    background: var(--menu-bg);
  }
}
