:root {
  --bg: #e9eef0;
  --surface: #f9fbfb;
  --surface-soft: #eef2f3;
  --surface-raised: #ffffff;
  --text: #17232b;
  --muted: #667681;
  --line: #d3dde0;
  --line-strong: #b8c7cc;
  --brand: #e83f51;
  --brand-hover: #c92d40;
  --brand-soft: #fde8eb;
  --header-bg: #141a20;
  --header-text: #f4f7f8;
  --side-bg: #f1f5f5;
  --green: #168d64;
  --amber: #b97722;
  --red: #dc3d50;
  --blue: #1687a8;
  --shadow: 0 16px 38px rgba(24, 42, 51, 0.1);
  --valorant-cyan: #73d8d2;
  --valorant-cyan-soft: rgba(115, 216, 210, 0.14);
  --valorant-red-soft: rgba(232, 63, 81, 0.1);
  --valorant-dark: #0b0f13;
  --valorant-dark-panel: #131a20;
  --valorant-dark-raised: #1a242c;
  --valorant-dark-line: rgba(213, 226, 232, 0.15);
  --valorant-display: Bahnschrift, "DIN Alternate", "Microsoft YaHei UI", sans-serif;
  --valorant-mono: "Cascadia Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #090d11;
    --surface: #131a20;
    --surface-soft: #0f151a;
    --surface-raised: #1a242c;
    --text: #edf3f5;
    --muted: #91a1aa;
    --line: #29363e;
    --line-strong: #41525c;
    --brand: #ff5361;
    --brand-hover: #ff6a75;
    --brand-soft: rgba(255, 83, 97, 0.14);
    --header-bg: #0b1015;
    --header-text: #f6fafb;
    --side-bg: #0e151a;
    --green: #54d69f;
    --amber: #f0b65f;
    --red: #ff6572;
    --blue: #6ec8ee;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  }
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #e9eef0;
  --surface: #f9fbfb;
  --surface-soft: #eef2f3;
  --surface-raised: #ffffff;
  --text: #17232b;
  --muted: #667681;
  --line: #d3dde0;
  --line-strong: #b8c7cc;
  --brand: #e83f51;
  --brand-hover: #c92d40;
  --brand-soft: #fde8eb;
  --header-bg: #141a20;
  --header-text: #f4f7f8;
  --side-bg: #f1f5f5;
  --green: #168d64;
  --amber: #b97722;
  --red: #dc3d50;
  --blue: #1687a8;
  --shadow: 0 16px 38px rgba(24, 42, 51, 0.1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090d11;
  --surface: #131a20;
  --surface-soft: #0f151a;
  --surface-raised: #1a242c;
  --text: #edf3f5;
  --muted: #91a1aa;
  --line: #29363e;
  --line-strong: #41525c;
  --brand: #ff5361;
  --brand-hover: #ff6a75;
  --brand-soft: rgba(255, 83, 97, 0.14);
  --header-bg: #0b1015;
  --header-text: #f6fafb;
  --side-bg: #0e151a;
  --green: #54d69f;
  --amber: #f0b65f;
  --red: #ff6572;
  --blue: #6ec8ee;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei UI", "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.18;
  background-image: linear-gradient(90deg, transparent 0 49.8%, rgba(115, 216, 210, 0.08) 50%, transparent 50.2%), linear-gradient(0deg, transparent 0 49.8%, rgba(115, 216, 210, 0.08) 50%, transparent 50.2%);
  background-size: 64px 64px;
}

.console-shell,
.console-body {
  background: transparent;
}

.console-header {
  border-bottom: 1px solid rgba(213, 226, 232, 0.16);
  background: var(--header-bg);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.17);
}

.console-header::before {
  background: linear-gradient(90deg, transparent, var(--brand) 28%, var(--brand) 62%, var(--valorant-cyan) 82%, transparent);
  opacity: 0.9;
}

.console-brand {
  color: var(--header-text);
}

.console-brand:hover {
  color: var(--valorant-cyan);
}

.console-brand .brand-mark {
  filter: drop-shadow(0 0 9px rgba(255, 83, 97, 0.28));
  transition: filter 180ms ease, transform 180ms ease;
}

.console-brand:hover .brand-mark {
  filter: drop-shadow(0 0 13px rgba(115, 216, 210, 0.42));
}

.brand-text strong,
.header-nav a,
.sidebar-title > span:not(.sidebar-title-icon),
.sidebar-section summary,
.page-head h1,
.panel-head h2,
.metric-card strong,
.match-hero-title h2,
.profile-identity-main h3,
.admin-section-head h3,
.music-section-head h3,
.login-brand h1 {
  font-family: var(--valorant-display);
}

.brand-text strong {
  letter-spacing: 0.08em;
}

.brand-text small {
  color: rgba(244, 247, 248, 0.6);
  letter-spacing: 0.12em;
}

.header-nav-group {
  border-color: transparent;
  background: transparent;
}

.header-nav-group.active {
  border-color: rgba(213, 226, 232, 0.13);
  background: rgba(255, 255, 255, 0.035);
}

.header-nav a {
  color: rgba(244, 247, 248, 0.66);
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.header-nav a:hover,
.header-nav a.active {
  color: #fff;
  background: rgba(255, 83, 97, 0.15);
  transform: translateY(-1px);
}

.header-nav a.active::after {
  background: var(--brand);
}

.topnav-icon,
.button-icon,
.sidebar-title-icon,
.nav-icon,
.page-title-icon,
.panel-title-icon,
.metric-icon,
.quick-card-icon,
.match-hero-icon {
  color: var(--valorant-cyan);
}

.global-search {
  border-color: rgba(213, 226, 232, 0.2);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

.global-search:focus-within {
  border-color: var(--valorant-cyan);
  box-shadow: 0 0 0 3px rgba(115, 216, 210, 0.14);
}

.global-search input {
  color: var(--header-text);
}

.global-search input,
.global-search input:focus,
.global-search input:focus-visible {
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0;
  background: transparent !important;
  box-shadow: none !important;
}

.global-search input::placeholder {
  color: rgba(244, 247, 248, 0.45);
}

.global-search button,
.refresh-button,
.login-form button:not(.secondary),
.match-query-form button,
.music-upload-form button,
.music-actions button,
.profile-form button,
.profile-action-button,
.admin-form-actions button:not(.admin-secondary-button) {
  border: 1px solid var(--brand);
  border-radius: 2px;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 7px 16px rgba(232, 63, 81, 0.2);
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.global-search button:hover,
.refresh-button:hover,
.login-form button:not(.secondary):hover,
.match-query-form button:hover,
.music-upload-form button:hover,
.music-actions button:hover,
.profile-form button:hover,
.profile-action-button:hover,
.admin-form-actions button:not(.admin-secondary-button):hover {
  border-color: var(--brand-hover);
  background: var(--brand-hover);
  box-shadow: 0 10px 22px rgba(232, 63, 81, 0.28);
  transform: translateY(-1px);
}

.console-user {
  border-left-color: rgba(213, 226, 232, 0.16);
}

.console-user-avatar {
  border-color: var(--valorant-cyan);
  background: rgba(115, 216, 210, 0.1);
  box-shadow: 0 0 0 3px rgba(115, 216, 210, 0.08);
}

.console-user-meta strong {
  color: var(--header-text);
  font-family: var(--valorant-display);
}

.console-user-meta small,
.logout-link {
  color: rgba(244, 247, 248, 0.58);
}

.logout-link:hover {
  color: var(--brand);
}

.sidebar {
  border-right-color: var(--line);
  background: var(--side-bg);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.08);
}

.sidebar-title {
  border-bottom-color: var(--line);
}

.sidebar-title-icon {
  color: var(--brand);
}

.sidebar-section {
  border-color: transparent;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.sidebar-section[open],
.sidebar-section.selected {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}

.sidebar-section summary {
  color: var(--muted);
  transition: color 160ms ease, background-color 160ms ease;
}

.sidebar-section summary:hover,
.sidebar-section.selected > summary {
  color: var(--text);
  background: var(--brand-soft);
}

.sidebar-section summary::after {
  color: var(--brand);
  font-family: var(--valorant-mono);
}

.sidebar-nav a {
  color: var(--muted);
  transition: color 160ms ease, background-color 160ms ease, padding-left 160ms ease;
}

.sidebar-nav a::before {
  background: var(--brand);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--text);
  background: var(--brand-soft);
}

.sidebar-status {
  border-color: var(--line);
  border-left-color: var(--green);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.sidebar-status strong.ok {
  color: var(--green);
}

.sidebar-status strong.bad {
  color: var(--red);
}

.workspace {
  background-image: none;
}

.breadcrumb {
  color: var(--muted);
  font-family: var(--valorant-mono);
  font-size: 11px;
}

.page-view.active {
  animation: valorant-page-in 300ms ease-out both;
}

.page-head {
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background-color: var(--header-bg);
  background-image: linear-gradient(120deg, rgba(255, 83, 97, 0.14), transparent 40%), repeating-linear-gradient(135deg, transparent 0 18px, rgba(115, 216, 210, 0.045) 18px 19px);
  box-shadow: 0 18px 42px rgba(7, 16, 23, 0.22);
  animation: valorant-header-in 460ms ease-out both;
}

.page-head::after {
  background: var(--brand);
}

.page-title-icon {
  border-color: rgba(115, 216, 210, 0.42);
  border-radius: 4px;
  background: var(--valorant-cyan-soft);
  color: var(--valorant-cyan);
}

.page-head h1 {
  color: #fff;
}

.page-head p {
  color: rgba(244, 247, 248, 0.7);
}

.metrics-grid {
  margin: 16px 0 0;
  border-color: var(--line);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card,
.panel {
  border-color: var(--line);
  background: var(--surface);
}

.metric-card::before {
  background: var(--brand);
}

.metric-card:nth-child(2)::before {
  background: var(--green);
}

.metric-card:nth-child(3)::before {
  background: var(--amber);
}

.metric-card:nth-child(4)::before {
  background: var(--valorant-cyan);
}

.metric-card-head,
.metric-card span,
.metric-card small,
.panel-head p {
  color: var(--muted);
}

.metric-icon {
  border-color: color-mix(in srgb, var(--valorant-cyan) 32%, var(--line));
  background: color-mix(in srgb, var(--valorant-cyan) 10%, var(--surface));
}

.ready-metric {
  border-color: color-mix(in srgb, var(--green) 34%, var(--line));
  background: color-mix(in srgb, var(--green) 10%, var(--surface));
  color: var(--green);
}

.planned-metric {
  border-color: color-mix(in srgb, var(--amber) 34%, var(--line));
  background: color-mix(in srgb, var(--amber) 10%, var(--surface));
  color: var(--amber);
}

.api-metric {
  border-color: color-mix(in srgb, var(--valorant-cyan) 34%, var(--line));
  background: color-mix(in srgb, var(--valorant-cyan) 10%, var(--surface));
  color: var(--valorant-cyan);
}

.metric-card strong {
  color: var(--text);
  font-family: var(--valorant-mono);
}

.panel {
  box-shadow: var(--shadow);
}

.panel-head,
.admin-section-head,
.match-section-head,
.admin-modal-head {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--surface-soft) 78%, var(--surface));
}

.panel-title-icon,
.quick-card-icon,
.match-hero-icon {
  color: var(--valorant-cyan);
}

.quick-grid a {
  border-color: var(--line);
  border-radius: 4px;
  background: var(--surface-raised);
  color: var(--text);
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.quick-grid a:hover {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  background: color-mix(in srgb, var(--brand-soft) 65%, var(--surface-raised));
  box-shadow: 0 12px 26px rgba(11, 25, 34, 0.13);
  transform: translateY(-3px);
}

.quick-grid strong {
  color: var(--text);
}

.quick-grid span {
  color: var(--muted);
}

input,
select,
textarea {
  border-color: var(--line-strong) !important;
  border-radius: 3px !important;
  background: var(--surface-soft) !important;
  color: var(--text) !important;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--valorant-cyan) !important;
  box-shadow: 0 0 0 3px rgba(115, 216, 210, 0.14) !important;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--valorant-cyan);
  outline-offset: 2px;
}

.admin-secondary-button,
.match-secondary-button,
.match-pagination button,
.profile-action-link,
.music-actions button.secondary,
.music-applied button {
  border-color: var(--line-strong) !important;
  border-radius: 3px !important;
  background: transparent !important;
  color: var(--text) !important;
  box-shadow: none !important;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.admin-secondary-button:hover,
.match-secondary-button:hover,
.match-pagination button:hover,
.profile-action-link:hover,
.music-actions button.secondary:hover,
.music-applied button:hover {
  border-color: var(--valorant-cyan) !important;
  background: var(--valorant-cyan-soft) !important;
  color: var(--text) !important;
  transform: translateY(-1px);
}

.admin-summary-grid article,
.admin-list-panel,
.admin-permission-catalog,
.admin-user-card,
.admin-group-card,
.admin-empty,
.admin-node-category,
.admin-picker-panel,
.admin-temp-panel,
.admin-oauth-panel {
  border-color: var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.admin-summary-grid article {
  box-shadow: var(--shadow);
}

.admin-summary-grid strong,
.admin-user-card strong,
.admin-group-card strong,
.admin-node-item strong,
.profile-identity-main h3,
.music-title-row h3,
.match-card-main strong,
.match-detail-title strong {
  color: var(--text);
}

.admin-summary-grid span,
.admin-user-card small,
.admin-group-card small,
.admin-empty,
.admin-node-item small {
  color: var(--muted);
}

.admin-node-category-head,
.admin-picker-head,
.admin-temp-head,
.admin-section-head.compact-head {
  border-color: var(--line) !important;
  background: var(--surface-soft) !important;
}

.admin-node-category-head:hover,
.admin-picker-head:hover,
.admin-temp-head:hover {
  background: var(--brand-soft) !important;
}

.admin-user-card,
.admin-group-card,
.admin-node-item,
.profile-device-card-item {
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.admin-user-card:hover,
.admin-group-card:hover,
.admin-node-item:hover,
.profile-device-card-item:hover {
  border-color: color-mix(in srgb, var(--valorant-cyan) 56%, var(--line));
  background: color-mix(in srgb, var(--valorant-cyan-soft) 52%, var(--surface));
  transform: translateY(-2px);
}

.profile-card,
.music-control-panel,
.music-summary-grid article,
.music-empty,
.match-results-panel,
.match-detail-panel,
.match-player-card {
  border-color: var(--line);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.profile-identity,
.profile-edit-card,
.profile-switch-card,
.profile-oauth-card,
.profile-device-card {
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.profile-identity:hover,
.profile-edit-card:hover,
.profile-switch-card:hover,
.profile-oauth-card:hover,
.profile-device-card:hover {
  border-color: color-mix(in srgb, var(--valorant-cyan) 48%, var(--line));
  box-shadow: 0 18px 38px rgba(11, 25, 34, 0.14);
}

.profile-avatar {
  border-color: var(--valorant-cyan);
  background: var(--surface-soft);
  box-shadow: 0 0 0 5px rgba(115, 216, 210, 0.1);
}

.profile-avatar img {
  border-radius: 3px;
}

.profile-bio-display,
.profile-muted,
.profile-form-hint,
.profile-meta-grid span,
.profile-device-card-item small {
  color: var(--muted);
}

.profile-meta-grid strong,
.profile-device-card-item strong {
  color: var(--text);
}

.music-summary-grid strong,
.music-applied strong,
.music-title-row h3 {
  color: var(--text);
  font-family: var(--valorant-display);
}

.music-card {
  border-color: var(--line) !important;
  border-radius: 4px !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow) !important;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.music-card:hover {
  border-color: color-mix(in srgb, var(--valorant-cyan) 54%, var(--line)) !important;
  box-shadow: 0 18px 40px rgba(11, 25, 34, 0.16) !important;
  transform: translateY(-3px);
}

.music-card-player-row,
.music-actions,
.music-meta,
.music-play-count {
  color: var(--muted);
}

.music-cover {
  border-color: var(--line);
  background: var(--surface-soft);
}

.match-hero {
  border-color: var(--line-strong);
  border-radius: 5px;
  background-color: var(--header-bg);
  background-image: linear-gradient(120deg, rgba(255, 83, 97, 0.13), transparent 46%), repeating-linear-gradient(135deg, transparent 0 18px, rgba(115, 216, 210, 0.05) 18px 19px);
  box-shadow: var(--shadow);
}

.match-hero-title p,
.match-section-head p,
.match-card-main small,
.match-card-stats,
.match-card-mvp,
.match-detail-time,
.match-player-card p,
.match-mini-card small,
.match-empty span {
  color: var(--muted);
}

.match-hero-title h2 {
  color: #fff;
}

.match-state-pill.ok {
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
  background: color-mix(in srgb, var(--green) 12%, transparent);
  color: var(--green);
}

.match-state-pill.bad {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  background: var(--brand-soft);
  color: var(--brand);
}

.match-results-panel,
.match-detail-panel,
.match-player-card,
.match-team-card,
.match-mini-card {
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.match-results-panel:hover,
.match-detail-panel:hover,
.match-player-card:hover,
.match-team-card:hover,
.match-mini-card:hover {
  border-color: color-mix(in srgb, var(--valorant-cyan) 48%, var(--line));
}

.match-card {
  border-color: var(--line) !important;
  background-color: var(--surface-raised) !important;
}

.match-card:hover,
.match-card.active {
  border-color: var(--brand) !important;
  box-shadow: 0 10px 24px rgba(232, 63, 81, 0.12);
}

.match-card.winner-ct {
  border-left-color: var(--valorant-cyan) !important;
}

.match-card.winner-t {
  border-left-color: var(--brand) !important;
}

.match-player-row,
.match-player-row.head {
  border-color: var(--line);
}

.match-player-row:hover {
  background: var(--brand-soft);
}

.admin-modal-backdrop {
  background: rgba(4, 8, 11, 0.68);
  backdrop-filter: blur(5px);
}

.admin-modal-panel {
  border: 1px solid var(--line-strong);
  border-top-color: var(--brand);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  animation: valorant-modal-in 220ms ease-out both;
}

.admin-modal-close {
  color: var(--muted);
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.admin-modal-close:hover {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 36%, var(--line));
  background: color-mix(in srgb, var(--brand) 6%, var(--surface));
}

.toast-notification {
  border-color: var(--line-strong);
  border-left-color: var(--brand);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.toast-notification.show {
  animation: valorant-toast-in 220ms ease-out both;
}

.status-table th {
  background: var(--surface-soft);
  color: var(--valorant-cyan);
  font-family: var(--valorant-mono);
  font-size: 11px;
}

.status-table td {
  border-color: var(--line);
  color: var(--text);
}

.status-table tbody tr:hover {
  background: var(--brand-soft);
}

.login-page {
  background: #070a0e;
}

.login-bg-mask {
  background: linear-gradient(90deg, rgba(4, 7, 10, 0.86), rgba(4, 7, 10, 0.42) 56%, rgba(4, 7, 10, 0.76)), repeating-linear-gradient(135deg, transparent 0 24px, rgba(115, 216, 210, 0.045) 24px 25px);
}

.login-panel {
  border-color: rgba(213, 226, 232, 0.2);
  border-top-color: var(--brand);
  border-radius: 5px;
  background: rgba(14, 20, 26, 0.91);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(12px);
  animation: valorant-login-in 420ms ease-out both;
}

.login-brand .brand-mark {
  filter: drop-shadow(0 0 14px rgba(255, 83, 97, 0.32));
}

.login-brand h1,
.login-panel-title strong {
  color: #f4f7f8;
}

.login-brand p,
.login-panel-title span,
.login-form label > span,
.login-helper-links button,
.login-divider span {
  color: #a7b3ba;
}

.login-mode-tabs {
  border-color: rgba(213, 226, 232, 0.18);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.045);
}

.login-mode-tabs button {
  border-radius: 2px;
  color: #9aa8af;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.login-mode-tabs button:hover:not(.active) {
  color: #fff;
  background: rgba(255, 83, 97, 0.1);
}

.login-mode-tabs button.active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 7px 18px rgba(232, 63, 81, 0.24);
}

.login-form input {
  border-color: rgba(213, 226, 232, 0.22) !important;
  background: rgba(5, 9, 13, 0.64) !important;
  color: #f4f7f8 !important;
}

.login-form input:focus {
  border-color: var(--valorant-cyan) !important;
  box-shadow: 0 0 0 3px rgba(115, 216, 210, 0.13) !important;
}

.oauth-button,
.oauth-embed-panel,
.qq-verify-state,
.login-error,
.login-success {
  border-radius: 3px;
}

.doc-page {
  background: var(--bg);
}

.doc-shell {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.doc-shell h1 {
  color: var(--text);
  font-family: var(--valorant-display);
}

.doc-content {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--text);
}

@media (min-width: 821px) {
  .console-shell {
    display: grid;
    grid-template-rows: var(--header-height) 1fr;
  }

  .console-header {
    display: grid;
    visibility: visible;
    opacity: 1;
  }

  .console-body {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }

  .sidebar {
    position: sticky;
    top: var(--header-height);
    display: flex;
    visibility: visible;
    height: calc(100dvh - var(--header-height));
    transform: none;
  }

  .header-nav-group.active {
    display: flex;
  }

  body:is([data-nav-group="musicbox"], [data-nav-group="admin"], [data-nav-group="match"]) .console-header {
    grid-template-columns: var(--sidebar-width) minmax(280px, 1fr) auto;
  }
}

body:is([data-nav-group="musicbox"], [data-nav-group="admin"], [data-nav-group="match"]) .global-search {
  display: none;
}

/* Music workspace: one transport rail and a compact, scan-friendly queue. */
#music .music-console {
  gap: 12px;
}

#music .music-summary-grid {
  grid-template-columns: repeat(5, minmax(104px, 1fr));
  gap: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

#music .music-summary-grid article {
  min-height: 58px;
  padding: 9px 12px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#music .music-summary-grid article:last-child {
  border-right: 0;
}

#music .music-summary-grid strong {
  margin-top: 2px;
  font-size: 19px;
}

#music .music-workspace-grid {
  grid-template-columns: 1fr;
}

#music .music-control-panel {
  padding: 12px;
}

#music .music-toolbar {
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 190px);
  padding: 10px 12px;
}

.music-player-dock {
  display: grid;
  grid-template-columns: 60px minmax(180px, 280px) minmax(260px, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--valorant-cyan);
  border-radius: 4px;
  background: var(--header-bg);
  color: var(--header-text);
  box-shadow: 0 12px 28px rgba(11, 25, 34, 0.17);
}

.music-player-cover {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(213, 226, 232, 0.2);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--valorant-cyan);
  font-family: var(--valorant-display);
  font-size: 22px;
  font-weight: 900;
}

.music-player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.music-player-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.music-player-copy span {
  color: var(--valorant-cyan);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.music-player-copy strong,
.music-player-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-player-copy strong {
  color: #fff;
  font-family: var(--valorant-display);
  font-size: 16px;
}

.music-player-copy small {
  color: rgba(244, 247, 248, 0.62);
  font-size: 12px;
}

.music-shared-player {
  width: 100%;
  height: 40px;
  display: block;
  color-scheme: dark;
  accent-color: var(--valorant-red);
}

.music-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
  padding: 0 2px;
}

.music-list-head strong {
  font-family: var(--valorant-display);
  font-size: 13px;
}

.music-list-head span {
  color: var(--muted);
  font-size: 12px;
}

#music .music-list {
  gap: 6px;
}

#music .music-card {
  position: relative;
  grid-template-columns: 34px 52px minmax(180px, 1fr) auto 34px;
  gap: 10px;
  min-height: 70px;
  padding: 8px 10px;
  box-shadow: none !important;
  transform: none;
}

#music .music-card:hover,
#music .music-card.is-playing {
  border-color: color-mix(in srgb, var(--valorant-cyan) 52%, var(--line)) !important;
  background: color-mix(in srgb, var(--valorant-cyan-soft) 32%, var(--surface)) !important;
  box-shadow: none !important;
  transform: none;
}

#music .music-card.is-playing::before {
  content: "";
  position: absolute;
  inset: -1px auto -1px -1px;
  width: 3px;
  background: var(--valorant-cyan);
}

#music .music-cover {
  width: 52px;
  height: 52px;
  border-radius: 3px;
  font-size: 18px;
}

.music-play-toggle {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

.music-play-toggle:hover,
.music-play-toggle:focus-visible {
  border-color: var(--valorant-cyan);
  background: var(--valorant-cyan-soft);
  outline: none;
}

.music-play-toggle span {
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
}

.music-play-toggle[data-state="playing"] span {
  width: 8px;
  height: 10px;
  margin-left: 0;
  border: 0;
  border-right: 3px solid currentColor;
  border-left: 3px solid currentColor;
}

#music .music-title-row h3 {
  font-size: 14px;
}

#music .music-meta {
  gap: 5px 14px;
  margin-top: 5px;
}

#music .music-meta span {
  position: relative;
}

#music .music-meta span + span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -8px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--muted);
}

#music .music-actions {
  flex-wrap: nowrap;
  gap: 6px;
}

#music .music-actions button {
  min-width: 50px;
  height: 30px;
  padding: 0 8px;
  border-color: var(--line-strong);
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

#music .music-actions button:hover {
  border-color: var(--valorant-cyan);
  background: var(--valorant-cyan-soft);
  color: var(--text);
  box-shadow: none;
  transform: none;
}

#music .music-actions button[data-music-action="apply"] {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.music-applied-badge {
  border-color: color-mix(in srgb, var(--valorant-cyan) 50%, var(--line));
  background: var(--valorant-cyan-soft);
  color: var(--text);
}

.music-row-details {
  position: relative;
}

.music-row-details summary {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 3px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.music-row-details summary::-webkit-details-marker {
  display: none;
}

.music-row-details summary:hover,
.music-row-details summary:focus-visible,
.music-row-details[open] summary {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--text);
  outline: none;
}

.music-row-details-panel {
  position: absolute;
  z-index: 12;
  top: calc(100% + 6px);
  right: 0;
  width: min(330px, calc(100vw - 48px));
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: 0 18px 38px rgba(11, 25, 34, 0.2);
}

.music-secondary-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.music-secondary-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.music-secondary-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: transparent;
  color: var(--text);
}

.music-secondary-actions button.danger {
  border-color: color-mix(in srgb, var(--red) 48%, var(--line));
  color: var(--red);
}

.music-load-more-row {
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.music-load-more {
  min-width: 180px;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: transparent;
  color: var(--text);
}

.music-load-more:hover,
.music-load-more:focus-visible {
  border-color: var(--valorant-cyan);
  background: var(--valorant-cyan-soft);
  outline: none;
}

@media (max-width: 820px) {
  #music .music-summary-grid {
    grid-template-columns: repeat(5, minmax(112px, 1fr));
  }

  .music-player-dock {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .music-player-cover {
    width: 56px;
    height: 56px;
  }

  .music-shared-player {
    grid-column: 1 / -1;
  }

  #music .music-card {
    grid-template-columns: 34px 50px minmax(0, 1fr) 34px;
  }

  #music .music-cover {
    width: 50px;
    height: 50px;
  }

  #music .music-actions {
    grid-column: 2 / 4;
    justify-content: flex-start;
  }

  .music-row-details {
    grid-column: 4;
    grid-row: 1;
  }
}

@media (max-width: 560px) {
  #music .music-toolbar {
    grid-template-columns: 1fr;
  }

  #music .music-card {
    gap: 8px;
    padding: 8px;
  }

  #music .music-meta span:nth-child(2) {
    display: none;
  }

  .music-row-details-panel {
    position: fixed;
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
  }
}

@media (max-width: 820px) {
  body:is([data-nav-group="musicbox"], [data-nav-group="admin"], [data-nav-group="match"]) .console-header {
    grid-template-areas:
      "menu brand user"
      "nav nav nav";
  }
}

/* 音乐盒以曲目为中心，播放器和操作始终归属于对应曲目。 */
#music .music-console {
  gap: 10px;
}

#music .music-overview-strip {
  min-height: 70px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

#music .music-current-block {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
}

#music .music-current-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

#music .music-applied {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
}

#music .music-applied strong,
#music .music-applied span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#music .music-applied strong {
  font-size: 14px;
}

#music .music-applied span {
  grid-column: 1;
  font-size: 11px;
}

#music .music-applied button {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 48px;
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: transparent;
  color: var(--text);
}

#music .music-compact-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  border-left: 1px solid var(--line);
}

#music .music-compact-stats article {
  min-width: 82px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 9px 12px;
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
}

#music .music-compact-stats span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

#music .music-compact-stats strong {
  font-size: 18px;
  line-height: 1.1;
}

#music .music-panel-state {
  min-width: 86px;
  display: grid;
  place-items: center;
  padding: 8px 12px;
  background: var(--header-bg);
  color: var(--header-muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

#music .music-panel-state.status-ok {
  color: var(--valorant-cyan);
}

#music .music-panel-state.status-bad {
  color: #ff7a7f;
}

#music #musicBrowseArea {
  display: grid;
  gap: 9px;
}

#music .music-toolbar {
  grid-template-columns: minmax(220px, 1fr) minmax(130px, 180px);
  gap: 10px;
  padding: 10px 12px;
}

#music .music-list {
  gap: 8px;
}

#music .music-card {
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 10px 12px;
  min-height: 0;
  padding: 10px 12px;
  border-color: var(--line);
  background: var(--surface);
  box-shadow: none !important;
  transform: none !important;
}

#music .music-card:hover,
#music .music-card.is-playing {
  border-color: color-mix(in srgb, var(--valorant-cyan) 52%, var(--line)) !important;
  background: color-mix(in srgb, var(--valorant-cyan-soft) 28%, var(--surface)) !important;
}

#music .music-card.is-playing::before {
  content: "";
  position: absolute;
  inset: -1px auto -1px -1px;
  width: 3px;
  background: var(--valorant-cyan);
}

#music .music-cover {
  width: 56px;
  height: 56px;
  border-radius: 3px;
  font-size: 18px;
}

#music .music-title-row {
  flex-wrap: wrap;
  gap: 5px 7px;
}

#music .music-title-row h3 {
  max-width: 100%;
  font-size: 14px;
}

#music .music-meta {
  gap: 4px 13px;
  margin-top: 5px;
}

#music .music-actions {
  align-self: center;
  flex-wrap: wrap;
  max-width: 240px;
  gap: 6px;
}

#music .music-actions button {
  min-width: 48px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

#music .music-actions button:hover,
#music .music-actions button:focus-visible {
  border-color: var(--valorant-cyan);
  background: var(--valorant-cyan-soft);
  color: var(--text);
  outline: none;
}

#music .music-actions button[data-music-action="apply"] {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

#music .music-actions button.danger {
  border-color: color-mix(in srgb, var(--red) 45%, var(--line));
  background: transparent;
  color: var(--red);
}

#music .music-card-player-row {
  grid-column: 1 / -1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 0 0;
  border-top: 1px solid var(--line);
}

#music .music-card-player {
  min-width: 0;
  width: 100%;
  height: 36px;
  display: block;
  color-scheme: light dark;
  accent-color: var(--valorant-cyan);
}

#music .music-upload-time {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

#music .music-loading-state {
  min-height: 88px;
  display: grid;
  place-items: center;
}

@media (max-width: 980px) {
  #music .music-overview-strip {
    grid-template-columns: minmax(220px, 1fr) auto;
  }

  #music .music-panel-state {
    grid-column: 1 / -1;
    min-height: 30px;
    border-top: 1px solid var(--line);
  }

  #music .music-actions {
    max-width: 170px;
  }
}

@media (max-width: 680px) {
  #music .music-overview-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  #music .music-current-block {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  #music .music-compact-stats {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  #music .music-compact-stats article:last-child {
    border-right: 0;
  }

  #music .music-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  #music .music-card {
    grid-template-columns: 50px minmax(0, 1fr);
    padding: 10px;
  }

  #music .music-cover {
    width: 50px;
    height: 50px;
  }

  #music .music-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    max-width: none;
  }

  #music .music-card-player-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  #music .music-upload-time {
    white-space: normal;
  }
}

@media (max-width: 420px) {
  #music .music-compact-stats article {
    min-width: 0;
    padding: 8px;
  }

  #music .music-compact-stats span {
    white-space: normal;
  }

  #music .music-actions button {
    flex: 1 1 calc(50% - 6px);
  }
}

@keyframes valorant-page-in {
  from { opacity: 0.01; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes valorant-header-in {
  from { opacity: 0.75; background-position: 20px 0, 0 0; }
  to { opacity: 1; background-position: 0 0, 0 0; }
}

@keyframes valorant-modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes valorant-toast-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes valorant-login-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
