:root {
  --navbar-h: 68px;
  --c-primary: #2563eb;
  --c-primary-d: #1d4ed8;
  --c-success: #10b981;
  --c-danger: #ef4444;
  --c-warn: #f59e0b;
  --c-text: #1e293b;
  --c-muted: #64748b;
  --c-light: #94a3b8;
  --c-border: #e2e8f0;
  --c-border-l: #eef2f6;
  --c-bg: #f5f7fc;
  --c-bg-sub: #f8fafc;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--c-bg); color: var(--c-text); font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif; }
body { min-height: 100vh; padding-top: var(--navbar-h); overflow-x: clip; }

.navbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--navbar-h);
  background: #fff; border-bottom: 2px solid var(--c-border-l);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 0 20px; z-index: 100; box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.nav-left { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; overflow-x: auto; }
.nav-left::-webkit-scrollbar { height: 0; display: none; }
.nav-title {
  font-size: 22px; font-weight: 700;
  background: linear-gradient(135deg, #1e293b, #475569);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  white-space: nowrap; flex-shrink: 0;
}
.nav-menu { display: flex; gap: 4px; flex-shrink: 0; }
.nav-btn {
  padding: 8px 16px; border: none; background: transparent; border-radius: 30px;
  font-size: 14px; font-weight: 600; color: var(--c-muted); cursor: pointer;
  transition: all 0.15s; white-space: nowrap;
}
.nav-btn:hover { background: var(--c-bg-sub); color: var(--c-text); }
.nav-btn.active { background: var(--c-primary); color: #fff; box-shadow: 0 2px 8px rgba(37,99,235,0.25); }
.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-avatar {
  width: 40px; height: 40px; border-radius: 8px; overflow: hidden;
  background: #f1f5f9; border: 2px solid var(--c-border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nav-avatar-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--c-light); }
.nav-player { display: flex; flex-direction: column; gap: 1px; min-width: 0; text-align: left; }
.nav-player-name { font-size: 14px; font-weight: 600; color: var(--c-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.nav-player-id { font-size: 11px; color: var(--c-muted); white-space: nowrap; }

.page-container { display: block; }
.page { display: none; padding: 16px 20px 32px; max-width: 1400px; margin: 0 auto; }
.page.active { display: block; }
.page[data-page="main"] { overflow-x: clip; }

.rating-card {
  display: flex; align-items: stretch; background: #fff;
  border: 1px solid var(--c-border-l); border-radius: 16px; padding: 22px 28px;
  margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.03); gap: 24px;
}
.rating-left { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; min-width: 0; }
.rating-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rating-label { font-size: 15px; font-weight: 500; color: var(--c-muted); }
.rating-value { font-size: 44px; font-weight: 700; color: var(--c-primary); line-height: 1; }
.rating-count { font-size: 14px; color: var(--c-muted); }
.rating-toggle { display: inline-flex; gap: 4px; background: #f1f5f9; border-radius: 30px; padding: 3px; align-self: flex-start; }
.rating-toggle button { border: none; border-radius: 30px; padding: 5px 16px; font-size: 13px; font-weight: 600; cursor: pointer; background: transparent; color: var(--c-muted); transition: 0.15s; }
.rating-toggle button.active { background: #fff; color: var(--c-primary); box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.rating-meta { font-size: 13px; color: var(--c-muted); }
.rating-meta strong { color: var(--c-text); font-weight: 600; }
.rating-divider { width: 1px; background: var(--c-border-l); flex-shrink: 0; }
.rating-right { flex: 1; display: flex; align-items: center; justify-content: flex-end; min-width: 0; }
.player-card { display: flex; align-items: center; gap: 16px; }
.player-card-avatar {
  width: 72px; height: 72px; border-radius: 12px; overflow: hidden;
  background: #f1f5f9; border: 2px solid var(--c-border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.player-card-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.player-card-avatar-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--c-light); }
.player-card-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.player-card-name { font-size: 22px; font-weight: 700; color: var(--c-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.player-card-id { font-size: 14px; color: var(--c-muted); }

.query-card { background: #fff; border: 1px solid var(--c-border-l); border-radius: 16px; padding: 18px 24px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
.query-title { font-size: 16px; font-weight: 700; color: var(--c-text); margin-bottom: 6px; }
.query-desc { font-size: 13px; color: var(--c-muted); margin-bottom: 14px; line-height: 1.6; }
.query-desc strong { color: var(--c-primary); }
.query-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 14px; }
.ctrl-group { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--c-muted); }
.ctrl-group label { font-weight: 500; display: flex; align-items: center; gap: 4px; cursor: pointer; }
.ctrl-group input[type="range"] { width: 110px; height: 4px; -webkit-appearance: none; background: #d1d9e6; border-radius: 4px; outline: none; }
.ctrl-group input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; background: var(--c-primary); border-radius: 50%; cursor: pointer; }
.ctrl-group input[type="number"] { width: 76px; padding: 5px 8px; border: 1.5px solid #d1d9e6; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--c-text); text-align: center; -moz-appearance: textfield; }
.ctrl-group input[type="number"]::-webkit-inner-spin-button, .ctrl-group input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ctrl-group input[type="number"]:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.ctrl-group input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--c-primary); }
.ctrl-group .ctrl-value { font-weight: 700; color: var(--c-primary); min-width: 20px; text-align: center; }
.ctrl-group .ctrl-hint { font-size: 12px; color: var(--c-light); }
.ctrl-buttons {
  gap: 8px !important;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
}
.btn {
  padding: 8px 18px; border: none; border-radius: 30px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 36px;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--c-primary); color: #fff; box-shadow: 0 2px 8px rgba(37,99,235,0.2); }
.btn-primary:hover:not(:disabled) { background: var(--c-primary-d); }
.btn-success { background: var(--c-success); color: #fff; }
.btn-success:hover:not(:disabled) { background: #059669; }
.btn-danger { background: var(--c-danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }
.btn-outline { background: transparent; border: 1.5px solid #cbd5e1; color: #475569; }
.btn-outline:hover:not(:disabled) { background: #f1f5f9; border-color: #94a3b8; }
.btn-sm { padding: 4px 14px; font-size: 12px; min-height: 30px; }

.query-progress-wrap { padding-top: 4px; }
.query-progress-bar-wrap { width: 100%; height: 8px; background: #eef2f6; border-radius: 8px; overflow: hidden; display: none; }
.query-progress-bar-wrap.active { display: block; }
.query-progress-bar { height: 100%; background: linear-gradient(90deg, var(--c-primary), var(--c-success)); border-radius: 8px; width: 0%; transition: width 0.2s; }
.query-progress-info { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--c-muted); margin-top: 8px; gap: 12px; flex-wrap: wrap; }
.query-progress-info #queryTimer { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--c-primary); display: none; }
.query-progress-info #queryTimer.active { display: inline-block; }
.query-progress-info #queryTimer.running { color: var(--c-success); animation: timerPulse 1.4s ease-in-out infinite; }
@keyframes timerPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.query-current { font-size: 13px; color: var(--c-muted); margin-top: 6px; min-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.query-current strong { color: var(--c-primary); }

.song-table-container {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--c-border-l);
  overflow: clip;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.song-table-header {
  position: sticky;
  top: var(--navbar-h);
  z-index: 20;
  overflow: hidden;
  background: #f8fafc;
  border-bottom: 2px solid var(--c-border);
}
.song-table-head-table,
.song-table-body-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 14px;
}
.song-table-head-table thead th {
  background: #f8fafc;
  padding: 12px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  text-align: left;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: none;
}
.song-table-head-table thead th:last-child { text-align: right; }

.song-table-body-wrap { overflow-x: auto; }
.song-table-body-table tbody tr { border-bottom: 1px solid var(--c-border-l); transition: background 0.15s; }
.song-table-body-table tbody tr:hover { background: #fafcff; }
.song-table-body-table tbody tr:last-child { border-bottom: none; }
.song-table-body-table td { padding: 8px 12px; vertical-align: middle; line-height: 1.5; }
.song-table-body-table td.col-art { padding: 6px 4px 6px 12px; }
.song-table-body-table td.col-name { font-size: 14px; font-weight: 500; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-table-body-table td.col-const { text-align: center; font-weight: 600; font-size: 14px; }
.song-table-body-table td.col-chartid { text-align: center; font-size: 13px; color: #64748b; }
.song-table-body-table td.col-acc { text-align: center; font-size: 13px; color: #64748b; }
.song-table-body-table td.col-stacc { text-align: center; font-weight: 600; font-size: 14px; }
.song-table-body-table td.col-rating { text-align: right; font-weight: 600; font-size: 15px; padding-right: 16px; }

.const-18plus .col-const { background: #fee2e2; color: #b91c1c; border-radius: 4px; }
.const-17 .col-const { background: #fed7aa; color: #9a3412; border-radius: 4px; }
.const-16 .col-const { background: #fef9c3; color: #854d0e; border-radius: 4px; }
.const-15 .col-const { background: #dbeafe; color: #1e40af; border-radius: 4px; }
.const-14 .col-const { background: #f3e8ff; color: #6b21a8; border-radius: 4px; }
.const-13 .col-const { background: #d1fae5; color: #065f46; border-radius: 4px; }
.const-12 .col-const { background: #e8f5e9; color: #2e7d32; border-radius: 4px; }
.const-11 .col-const { background: #e1f5fe; color: #01579b; border-radius: 4px; }
.const-10 .col-const { background: #f3e5f5; color: #6a1b9a; border-radius: 4px; }
.const-9 .col-const { background: #fff3e0; color: #e65100; border-radius: 4px; }

.art-box { width: 64px; height: 36px; border-radius: 4px; overflow: hidden; background: #e2e8f0; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.art-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-box .art-ph { font-size: 9px; color: var(--c-light); }

.acc-input {
  width: 76px; padding: 6px 6px; border: 1.5px solid #d1d9e6; border-radius: 10px;
  font-size: 14px; font-weight: 500; text-align: center; background: #fff; color: #0f172a;
  -moz-appearance: textfield; transition: border-color 0.2s, box-shadow 0.2s;
}
.acc-input::-webkit-inner-spin-button, .acc-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.acc-input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.acc-input::placeholder { color: #b9c3d0; font-weight: 400; font-size: 12px; }
.acc-input.has-value { border-color: var(--c-primary); background: #f8faff; }
.rating-empty { color: var(--c-light); font-weight: 400; font-size: 13px; }

/* 谱面预览 */
.preview-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.preview-header h2 { font-size: 20px; font-weight: 700; color: var(--c-text); }
.preview-count { font-size: 13px; color: var(--c-muted); background: var(--c-bg-sub); padding: 4px 12px; border-radius: 30px; }

.preview-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--c-border);
  border-radius: 40px;
  padding: 6px 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  transition: border-color 0.15s, box-shadow 0.15s;
  max-width: 560px;
}
.preview-search-bar:focus-within {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.preview-search-bar .search-icon {
  font-size: 15px;
  color: var(--c-light);
  flex-shrink: 0;
}
.preview-search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: var(--c-text);
  padding: 4px 0;
  min-width: 0;
}
.preview-search-bar input::placeholder {
  color: #b9c3d0;
  font-weight: 400;
}
.preview-search-bar .search-clear {
  border: none;
  background: #eef2f6;
  color: var(--c-muted);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
}
.preview-search-bar .search-clear.visible { display: flex; }
.preview-search-bar .search-clear:hover { background: #d1d9e6; color: var(--c-text); }

.preview-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--c-light);
  font-size: 14px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--c-border-l);
}

/* ===== 预览页工具栏（搜索 + 排序） ===== */
.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  width: 100%;
}
.preview-toolbar .preview-search-bar {
  flex: 1 1 auto;
  min-width: 200px;
  max-width: none;
  margin-bottom: 0;
}
.preview-sort-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 16px;
  background: #fff;
  border: 1.5px solid var(--c-border);
  border-radius: 40px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  flex-shrink: 0;
  height: 40px;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.preview-sort-wrap:focus-within {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.preview-sort-wrap .sort-label {
  font-size: 13px;
  color: var(--c-muted);
  font-weight: 500;
  white-space: nowrap;
}
.preview-sort-wrap select {
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: var(--c-text);
  font-weight: 600;
  cursor: pointer;
  padding: 4px 4px;
  font-family: inherit;
}

/* ===== 列表：卡片化 ===== */
.preview-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: transparent;
  border: none;
  border-radius: 0;
  width: 100%;
  /* 防止横向溢出 */
  overflow: hidden; 
}
.preview-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px 14px 14px;
  background: #fff;
  border: 1px solid var(--c-border-l);
  border-left: 5px solid var(--const-color, #cbd5e1);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  cursor: pointer;
  /* 强制占满宽度，防止变窄 */
  width: 100%;
  box-sizing: border-box;
}
.preview-item:hover {
  border-color: var(--c-border);
  border-left-color: var(--const-color, #cbd5e1);
  box-shadow: 0 4px 14px rgba(0,0,0,0.07);
  transform: translateX(2px);
}
.preview-item:active {
  transform: translateX(2px) scale(0.998);
}
.preview-item .art-box {
  width: 96px;
  height: 54px;
  border-radius: 8px;
}
.preview-item .preview-info { 
  flex: 1; 
  min-width: 0; 
  /* 防止文字撑破容器 */
  overflow: hidden; 
  display: flex; 
  flex-direction: column; 
  gap: 4px; 
}
.preview-item .preview-name { 
  font-size: 15px; 
  font-weight: 600; 
  color: var(--c-text); 
  overflow: hidden; 
  text-overflow: ellipsis; 
  white-space: nowrap; 
}
.preview-item .preview-meta { 
  font-size: 12.5px; 
  color: var(--c-muted); 
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-item .preview-right { 
  flex-shrink: 0; 
  display: flex; 
  flex-direction: column; 
  align-items: flex-end; 
  min-width: 110px; 
  gap: 2px; 
}
.preview-item .preview-stacc { font-size: 14px; font-weight: 600; }
.preview-item .preview-rating { font-size: 16px; font-weight: 700; color: var(--c-primary); }
.preview-item .preview-acc { font-size: 11.5px; color: var(--c-light); }
.preview-item .preview-untouched { font-size: 14px; color: var(--c-light); font-style: italic; }

/* ===== 分割线 ===== */
.preview-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 20px;
  margin: 4px 0;
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-muted);
  letter-spacing: 0.3px;
}
.preview-divider::before, .preview-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-border), transparent);
}

/* ===== 移动端专门处理 ===== */
@media (max-width: 600px) {
  .preview-toolbar { gap: 8px; }
  /* 手机上让搜索框独占一行，排序框占满下一行 */
  .preview-toolbar .preview-search-bar { min-width: 100%; }
  .preview-sort-wrap {
    width: 100%;
    height: 36px;
    justify-content: center;
    padding: 0 10px;
  }
  .preview-item { 
    gap: 12px; 
    padding: 12px 14px 12px 10px; 
    border-left-width: 4px; 
    border-radius: 8px; 
  }
  .preview-item .art-box { width: 80px; height: 45px; }
  .preview-item .preview-name { font-size: 14px; }
  .preview-item .preview-stacc { font-size: 13px; }
  .preview-item .preview-rating { font-size: 15px; }
}
/* ===== 谱面详情页 ===== */
.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.detail-header .detail-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: 1.5px solid #cbd5e1;
  background: #fff;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 36px;
}
.detail-header .detail-back-btn:hover { background: #f1f5f9; border-color: #94a3b8; }

.detail-art-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
  padding: 0 4px;
}
.detail-art {
  width: 90%;
  max-width: 600px;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #e2e8f0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.detail-art .detail-art-ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--c-light);
  background: #e2e8f0;
}
.detail-art #detailLoadingImg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.detail-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  margin-bottom: 20px;
}

.detail-info-card {
  background: #fff;
  border: 1px solid var(--c-border-l);
  border-radius: 16px;
  padding: 22px 26px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.detail-name {
  font-size: 28px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.3;
  word-break: break-word;
}
.detail-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 15px;
}
.detail-row .detail-label {
  font-weight: 500;
  color: var(--c-muted);
  flex-shrink: 0;
}
.detail-row .detail-value {
  font-weight: 600;
  color: var(--c-text);
  word-break: break-word;
}
.detail-row .detail-copy-btn {
  border: none;
  background: #eef2f6;
  color: var(--c-muted);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
  min-height: 26px;
}
.detail-row .detail-copy-btn:hover { background: #dbeafe; color: var(--c-primary); }
.detail-row .detail-copy-btn.copied { background: #d1fae5; color: #065f46; }

.detail-const-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 14px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 15px;
}

.detail-stats-card {
  background: #fff;
  border: 1px solid var(--c-border-l);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-stats-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}
.detail-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--c-border-l);
}
.detail-stat-row:last-child { border-bottom: none; }
.detail-stat-row .stat-label {
  font-size: 13px;
  color: var(--c-muted);
}
.detail-stat-row .stat-value {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ===== ACC 进度条 ===== */
.acc-meter-card {
  background: #fff;
  border: 1px solid var(--c-border-l);
  border-radius: 16px;
  padding: 34px 28px 52px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  position: relative;
}
.acc-meter-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-muted);
  margin-bottom: 52px;
}
.acc-meter-track {
  position: relative;
  height: 18px;
  border-radius: 10px;
  background: linear-gradient(90deg,
    #ef4444 0%,
    #f59e0b 20%,
    #facc15 35%,
    #3b82f6 55%,
    #8b5cf6 75%,
    #10b981 100%);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
}
/* 每个刻度 */
.acc-marker {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 4px;
  background: #1e293b;
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.9);
  z-index: 2;
}
.acc-marker.marker-pass { background: #3b82f6; }
.acc-marker.marker-backlight { background: #8b5cf6; }
.acc-marker.marker-break { background: #10b981; }
.acc-marker.marker-max { background: #1e293b; }

.acc-marker-label {
  position: absolute;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  z-index: 3;
}
.acc-marker-label.label-pass { color: #3b82f6; }
.acc-marker-label.label-backlight { color: #8b5cf6; }
.acc-marker-label.label-break { color: #10b981; }
.acc-marker-label.label-max { color: #1e293b; }

.acc-marker-label .label-tag {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--c-light);
  text-align: center;
  margin-top: 1px;
}

/* 玩家箭头 */
.acc-player-arrow {
  position: absolute;
  top: calc(100% + 4px);
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.acc-player-arrow .arrow-icon {
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 10px solid #94a3b8;
}
.acc-player-arrow .arrow-value {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-top: 3px;
  white-space: nowrap;
  padding: 1px 6px;
  background: rgba(255,255,255,0.9);
  border-radius: 4px;
}
.acc-player-arrow .arrow-label {
  font-size: 10px;
  color: var(--c-light);
  font-weight: 500;
  white-space: nowrap;
}
.acc-player-untouched {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: var(--c-light);
  font-style: italic;
}

/* 单曲计算 */
.single-page-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.single-page-header h2 { font-size: 20px; font-weight: 700; color: var(--c-text); }
.single-page-header .badge { font-size: 13px; color: var(--c-muted); background: var(--c-bg-sub); padding: 3px 12px; border-radius: 30px; }
.benchmark-section { display: flex; flex-wrap: wrap; gap: 16px 30px; background: #fff; border-radius: 16px; padding: 14px 22px; border: 1px solid var(--c-border-l); margin-bottom: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
.benchmark-section .bench-item { display: flex; align-items: baseline; gap: 6px; font-size: 14px; }
.benchmark-section .label { color: var(--c-muted); }
.benchmark-section .value { font-weight: 700; font-size: 17px; }

.calc-module { background: #fff; border-radius: 16px; border: 1px solid var(--c-border-l); padding: 18px 22px; margin-bottom: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
.calc-module .module-title { font-size: 16px; font-weight: 700; color: var(--c-text); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.calc-module .module-title .tag { font-size: 12px; font-weight: 500; color: var(--c-muted); background: var(--c-bg-sub); padding: 2px 12px; border-radius: 30px; }
.calc-module .module-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 8px; }
.calc-module .field { display: flex; align-items: center; gap: 5px; }
.calc-module .field label { font-weight: 500; color: var(--c-muted); font-size: 14px; white-space: nowrap; }
.calc-module .field input {
  width: 100px; padding: 6px 8px; border: 1.5px solid #d1d9e6; border-radius: 8px;
  font-size: 14px; font-weight: 600; text-align: center; color: var(--c-text); -moz-appearance: textfield;
}
.calc-module .field input::-webkit-inner-spin-button, .calc-module .field input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.calc-module .field input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.calc-module .field input::placeholder { color: #b9c3d0; font-weight: 400; font-size: 12px; }
.calc-module .field .result-display {
  font-weight: 700; font-size: 16px; min-width: 90px; text-align: center; padding: 5px 10px;
  background: var(--c-bg-sub); border-radius: 6px; color: var(--c-primary);
}
.calc-module .field .result-display.d { color: #8b5cf6; }
.calc-module .field .result-display.acc { color: var(--c-primary); }
.calc-module .field .result-display.stacc { color: var(--c-success); }
.calc-module .field .result-display.rating { color: #f59e0b; }
.calc-module .module-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--c-border); }
.calc-module .module-hint { font-size: 12px; color: var(--c-light); margin-top: 6px; }

.player-page-header { margin-bottom: 20px; }
.player-page-header h2 { font-size: 20px; font-weight: 700; color: var(--c-text); }
.player-page-body {
  background: #fff; border-radius: 16px; border: 1px solid var(--c-border-l); padding: 24px 28px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03); display: flex; flex-direction: column; align-items: center; gap: 24px;
  max-width: 560px; margin: 0 auto;
}
.player-page-avatar {
  width: 110px; height: 110px; border-radius: 16px; overflow: hidden;
  background: #f1f5f9; border: 3px solid var(--c-border);
  display: flex; align-items: center; justify-content: center;
}
.player-page-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.player-page-avatar-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--c-light); }
.player-page-form { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.player-page-form .form-row { display: flex; align-items: center; gap: 12px; }
.player-page-form .form-row label { font-weight: 600; font-size: 14px; color: var(--c-muted); min-width: 80px; }
.player-page-form .form-row .form-value { flex: 1; font-size: 16px; color: var(--c-text); font-weight: 500; }
.player-page-form .form-row input[type="number"] {
  flex: 1; padding: 10px 14px; border: 1.5px solid #d1d9e6; border-radius: 10px;
  font-size: 15px; font-weight: 600; color: var(--c-text); -moz-appearance: textfield;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.player-page-form .form-row input[type="number"]::-webkit-inner-spin-button, .player-page-form .form-row input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.player-page-form .form-row input[type="number"]:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.player-page-form .form-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; padding-top: 4px; }
.form-hint {
  font-size: 12px; color: var(--c-light); padding: 10px 14px;
  background: #fef3c7; border-radius: 8px; border-left: 3px solid #f59e0b; line-height: 1.6;
}

/* 段位计算 */
.segment-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.segment-header h2 { font-size: 20px; font-weight: 700; color: var(--c-text); }
.segment-header .seg-header-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.seg-avatar-status {
  font-size: 12px;
  color: var(--c-light);
  padding: 0 6px;
  white-space: nowrap;
  font-weight: 500;
}
.seg-avatar-status.uploaded { color: var(--c-success); }

.seg-config-card {
  background: #fff; border-radius: 16px; border: 1px solid var(--c-border-l);
  padding: 16px 22px; margin-bottom: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.seg-preset-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-bottom: 14px; }
.seg-preset-selector { position: relative; flex: 0 0 auto; min-width: 220px; }
.seg-preset-btn {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 18px; border: 1.5px solid #cbd5e1; border-radius: 40px;
  background: #fff; color: var(--c-text); font-weight: 500; font-size: 14px;
  cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s; user-select: none;
  min-height: 40px; gap: 12px; min-width: 200px;
}
.seg-preset-btn:hover { border-color: #94a3b8; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.seg-preset-btn .arrow { font-size: 12px; color: var(--c-light); transition: transform 0.2s; }
.seg-preset-btn.open .arrow { transform: rotate(180deg); }
.seg-preset-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; width: 100%;
  max-height: 260px; overflow-y: auto; background: #fff;
  border: 1px solid var(--c-border); border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.10); z-index: 10; display: none; padding: 6px 0;
}
.seg-preset-dropdown.open { display: block; }
.seg-preset-dropdown .item {
  padding: 9px 18px; font-size: 14px; font-weight: 500; color: var(--c-text);
  cursor: pointer; transition: background 0.15s; border-bottom: 1px solid #f1f5f9;
}
.seg-preset-dropdown .item:last-child { border-bottom: none; }
.seg-preset-dropdown .item:hover { background: #f1f5f9; }
.seg-preset-dropdown .item.disabled { color: #b9c3d0; cursor: not-allowed; background: #fafcff; }
.seg-preset-dropdown .item.disabled:hover { background: #fafcff; }
.seg-custom-toggle { display: flex; align-items: center; gap: 8px; font-weight: 500; color: #475569; font-size: 14px; cursor: pointer; user-select: none; }
.seg-custom-toggle input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--c-primary); }

.seg-notes-group { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.seg-notes-group .field { display: flex; align-items: center; gap: 6px; }
.seg-notes-group .field label { font-weight: 500; color: var(--c-muted); font-size: 14px; }
.seg-notes-group .field input {
  width: 76px; padding: 6px 8px; border: 1.5px solid #d1d9e6; border-radius: 8px;
  font-size: 14px; font-weight: 500; text-align: center; background: #fff; color: var(--c-text);
  outline: none; -moz-appearance: textfield; transition: border-color 0.2s, box-shadow 0.2s;
}
.seg-notes-group .field input::-webkit-inner-spin-button, .seg-notes-group .field input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.seg-notes-group .field input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.seg-notes-group .field input:disabled { background: #f1f5f9; color: var(--c-muted); cursor: not-allowed; border-color: var(--c-border); }

.seg-info-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px;
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--c-border);
}
.seg-info-row.hidden { display: none; }
.seg-info-row .acc-standards { display: flex; flex-wrap: wrap; gap: 16px 30px; }
.seg-info-row .std-item { display: flex; align-items: baseline; gap: 6px; font-size: 14px; font-weight: 500; color: #475569; }
.seg-info-row .std-item .label { color: var(--c-muted); font-weight: 400; }
.seg-info-row .std-item .value { font-weight: 700; font-size: 16px; }
.seg-info-row .std-item .value.pass { color: #3b82f6; }
.seg-info-row .std-item .value.backlight { color: #8b5cf6; }
.seg-info-row .std-item .value.break { color: #10b981; }
.seg-info-row .author-info { font-size: 14px; color: #475569; }
.seg-info-row .author-info .author-name { font-weight: 700; color: var(--c-text); }

.seg-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 14px; }
.seg-cards .calc-module { margin-bottom: 0; }
.seg-input-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 10px; }
.seg-input-row .field { flex: 1 1 180px; }
.seg-input-row .field label { font-size: 13px; }
.seg-input-row .field input { width: 90px; font-size: 14px; }

.seg-result-area {
  margin-top: 14px; padding: 12px 16px; background: #fff; border-radius: 12px;
  border: 1px solid var(--c-border); min-height: 60px; font-size: 14px;
}
.seg-result-area .result-item { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px dashed var(--c-border-l); font-size: 14px; }
.seg-result-area .result-item:last-child { border-bottom: none; }
.seg-result-area .result-item .val { font-weight: 700; color: var(--c-primary); }
.seg-result-area .result-item .val.success { color: var(--c-success); }
.seg-result-area .result-item .val.warning { color: var(--c-warn); }
.seg-result-area .result-item .val.danger { color: var(--c-danger); }
.seg-result-area .validation { margin-top: 8px; font-size: 13px; padding: 6px 12px; border-radius: 8px; background: #f1f5f9; }
.seg-result-area .validation.ok { background: #d1fae5; color: #065f46; }
.seg-result-area .validation.warn { background: #fef3c7; color: #92400e; }
.seg-result-area .validation.err { background: #fee2e2; color: #991b1b; }
.seg-result-area .hint-default { color: var(--c-light); text-align: center; padding: 8px 0; }

.seg-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.seg-chart-box { background: #fff; border-radius: 16px; border: 1px solid var(--c-border-l); padding: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
.seg-chart-box h3 { font-size: 15px; font-weight: 600; color: var(--c-text); margin-bottom: 10px; text-align: center; }
.seg-chart-box canvas { width: 100%; height: auto; max-height: 260px; display: block; }

#exportContainer {
  position: absolute; left: -9999px; top: 0; width: 920px;
  background: #fff; padding: 25px 30px;
  font-family: 'Microsoft YaHei', '微软雅黑', sans-serif; border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

@media (max-width: 900px) {
  :root { --navbar-h: 60px; }
  .navbar { padding: 0 12px; gap: 8px; }
  .nav-title { font-size: 17px; }
  .nav-btn { padding: 6px 12px; font-size: 12px; }
  .nav-avatar { width: 34px; height: 34px; }
  .nav-player-name { font-size: 12px; max-width: 100px; }
  .nav-player-id { font-size: 10px; }

  .rating-card { padding: 16px 18px; flex-direction: column; gap: 16px; }
  .rating-divider { width: 100%; height: 1px; margin: 0; }
  .rating-right { justify-content: flex-start; }
  .rating-value { font-size: 36px; }
  .player-card-avatar { width: 60px; height: 60px; }
  .player-card-name { font-size: 18px; }
  .player-card-id { font-size: 13px; }

  .query-controls { gap: 10px 14px; }
  .ctrl-buttons { margin-left: 0; justify-content: flex-start; }

  .song-table-head-table, .song-table-body-table { min-width: 660px; }
  .song-table-head-table thead th, .song-table-body-table td { padding: 6px 8px; }
  .art-box { width: 50px; height: 28px; }
  .acc-input { width: 70px; }

  .preview-item { padding: 8px 12px; gap: 10px; }
  .preview-item .art-box { width: 52px; height: 30px; }
  .preview-item .preview-name { font-size: 13px; }
  .preview-item .preview-right { min-width: 80px; }

  .seg-cards { grid-template-columns: 1fr; }
  .seg-charts { grid-template-columns: 1fr; }
  .seg-preset-selector { width: 100%; min-width: unset; }
  .seg-preset-btn { min-width: unset; }

  /* 详情页平板 */
  .detail-body { grid-template-columns: 1fr; }
  .detail-stats-card { order: -1; }
  .detail-name { font-size: 22px; }
  .detail-art { max-width: 100%; }
}

@media (max-width: 600px) {
  .nav-left { gap: 10px; }
  .nav-title { font-size: 15px; }
  .nav-btn { padding: 5px 10px; font-size: 11px; }
  .nav-avatar { width: 30px; height: 30px; }
  .nav-player-name { max-width: 80px; }

  .page { padding: 12px 10px 24px; }
  .rating-value { font-size: 30px; }
  .player-card-avatar { width: 52px; height: 52px; }
  .player-card-name { font-size: 16px; }

  .player-page-body { padding: 18px; }
  .player-page-avatar { width: 90px; height: 90px; }
    /* 自动查询按钮组：小屏时按钮换行、收窄 */
  .query-controls { gap: 8px 12px; }
  .ctrl-buttons {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
  .ctrl-buttons .btn {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px;
    padding: 6px 10px;
    min-height: 32px;
  }

  .seg-config-card { padding: 12px 14px; }
  .seg-input-row .field { flex: 1 1 100%; }
  .seg-input-row .field input { flex: 1; width: auto; }
  .calc-module { padding: 14px 16px; }

  /* 详情页手机 */
  .detail-header { margin-bottom: 12px; }
  .detail-header .detail-back-btn { padding: 6px 14px; font-size: 12px; min-height: 32px; }
  .detail-art-wrap { margin-bottom: 16px; }
  .detail-art { width: 96%; border-radius: 12px; }
  .detail-info-card { padding: 16px 18px; gap: 10px; }
  .detail-name { font-size: 19px; }
  .detail-row { font-size: 14px; }
  .detail-stats-card { padding: 14px 16px; }
  .detail-stat-row .stat-value { font-size: 14px; }

  .acc-meter-card { padding: 28px 18px 48px; }
  .acc-meter-track { height: 14px; border-radius: 8px; }
  .acc-marker { width: 3px; }
  .acc-marker-label { font-size: 10px; bottom: calc(100% + 8px); }
  .acc-marker-label .label-tag { font-size: 9px; }
  .acc-player-arrow .arrow-value { font-size: 12px; }
}
/* ===== 引导提示条 ===== */
.guide-hint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: linear-gradient(135deg, #eff6ff, #f0f9ff);
  border: 1px solid #bfdbfe;
  border-left: 4px solid #3b82f6;
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 14px;
  font-size: 13px;
  color: #1e40af;
  line-height: 1.55;
}
.guide-hint .hint-icon {
  flex-shrink: 0;
  font-size: 15px;
  line-height: 1.55;
}
.guide-hint.warn {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-color: #fcd34d;
  border-left-color: #f59e0b;
  color: #92400e;
}
.guide-hint.warn .hint-icon { color: #d97706; }

@media (max-width: 600px) {
  .guide-hint {
    font-size: 12px;
    padding: 8px 12px;
    gap: 8px;
    border-radius: 10px;
  }
}
/* ===== 玩家页：功能按钮卡片 ===== */
.player-actions-card {
  width: 100%;
  background: #fafcff;
  border: 1px solid var(--c-border-l);
  border-radius: 12px;
  padding: 2px 16px;
  display: flex;
  flex-direction: column;
}

.player-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--c-border-l);
}
.player-action-row:last-child { border-bottom: none; }

.player-action-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.player-action-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
}

.player-action-desc {
  font-size: 12px;
  color: var(--c-muted);
  line-height: 1.5;
}

.player-action-row .btn { flex-shrink: 0; }

@media (max-width: 600px) {
  .player-actions-card { padding: 2px 12px; }
  .player-action-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px 0;
  }
  .player-action-row .btn { width: 100%; }
}
@media (max-width: 600px) {
  .preview-toolbar { gap: 8px; }
  .preview-toolbar .preview-search-bar { min-width: 180px; }
  .preview-sort-wrap { height: 36px; padding: 0 8px 0 12px; }
  .preview-sort-wrap .sort-label { font-size: 12px; }
  .preview-sort-wrap select { font-size: 13px; padding: 2px; }
  .preview-item { border-left-width: 4px; border-radius: 8px; padding: 8px 12px 8px 8px; }
}
/* ===== 顶部提示框隐藏 ===== */
body.hide-guide-hints .guide-hint { display: none !important; }

/* ===== 难度色条：四边模式 ===== */
body[data-const-style="around"] .preview-item {
  border: 2px solid var(--const-color, #cbd5e1);
  border-left-width: 2px;
}
body[data-const-style="around"] .preview-item:hover {
  border-color: var(--const-color, #cbd5e1);
  box-shadow: 0 4px 14px rgba(0,0,0,0.10);
}

/* ===== 难度色条：不显示 ===== */
body[data-const-style="none"] .preview-item {
  border: 1px solid var(--c-border-l);
  border-left-width: 1px;
}
body[data-const-style="none"] .preview-item:hover {
  border-color: var(--c-border);
}

/* ===== 玩家页：设置卡片 ===== */
.player-settings-card {
  width: 100%;
  background: #fff;
  border: 1px solid var(--c-border-l);
  border-radius: 12px;
  padding: 4px 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.player-settings-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text);
  padding: 12px 0 8px;
  border-bottom: 1px solid var(--c-border-l);
}
.player-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--c-border-l);
}
.player-setting-row:last-child { border-bottom: none; }
.player-setting-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.player-setting-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
}
.player-setting-desc {
  font-size: 12px;
  color: var(--c-muted);
  line-height: 1.5;
}

/* ===== 设置分段按钮 ===== */
.setting-toggle {
  display: inline-flex;
  gap: 3px;
  background: #f1f5f9;
  border-radius: 30px;
  padding: 3px;
  flex-shrink: 0;
}
.setting-toggle-btn {
  border: none;
  background: transparent;
  border-radius: 30px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-muted);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  min-height: 28px;
  font-family: inherit;
}
.setting-toggle-btn:hover { color: var(--c-text); }
.setting-toggle-btn.active {
  background: #fff;
  color: var(--c-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

@media (max-width: 600px) {
  .player-settings-card { padding: 4px 12px; }
  .player-setting-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 0;
  }
  .setting-toggle { width: 100%; }
  .setting-toggle-btn { flex: 1; text-align: center; justify-content: center; }
  .preview-item { gap: 12px; padding: 12px 14px 12px 10px; }
  .preview-item .art-box { width: 80px; height: 45px; }
  .preview-item .preview-name { font-size: 14px; }
  .preview-item .preview-stacc { font-size: 13px; }
  .preview-item .preview-rating { font-size: 15px; }
}