/**
 * WhatMusic Ukelele - 专业打谱与陪练台视觉样式 (对标 MuseScore 4 / Guitar Pro 8)
 */

:root {
  --bg-app: #0f172a;
  --bg-panel: #1e293b;
  --bg-paper: #ffffff;
  --border-color: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #38bdf8;
  --primary-hover: #0ea5e9;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --paper-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 顶部专业打谱与伴奏双行工作流控制台 (2-Row Studio Header) */
.studio-header {
  background-color: var(--bg-panel);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.header-row.row-bottom {
  border-bottom: none;
  background: rgba(15, 23, 42, 0.35);
  padding: 5px 16px;
}

.metronome-hub-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 独立功能分组 (Panel Group with Graceful Wrap) */
.panel-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bpm-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1e293b;
  padding: 0 10px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid #475569;
}

.pagination-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(2, 132, 199, 0.15);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

/* 兼容旧 toolbar 选择器 */
.toolbar {
  background-color: var(--bg-panel);
  border-bottom: 1px solid var(--border-color);
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.toolbar-panel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand .logo {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.brand .tag {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 9999px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  user-select: none;
}

.btn {
  height: 34px;
  background-color: #334155;
  color: #f1f5f9;
  border: 1px solid #475569;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.btn:hover {
  background-color: #475569;
  border-color: #64748b;
}

.btn.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

.btn.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 100%);
}

.btn.btn-success {
  background: #16a34a;
  border-color: #22c55e;
}

.btn.btn-danger {
  background: #dc2626;
  border-color: #ef4444;
}

.select {
  height: 34px;
  background-color: #1e293b;
  color: #f1f5f9;
  border: 1px solid #475569;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  box-sizing: border-box;
}

.select:focus {
  border-color: var(--primary);
}

.sound-engine-select {
  height: 32px;
  min-width: 140px;
  max-width: 220px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  padding: 0 8px;
  background: #1e293b;
  border: 1px solid #0284c7;
  color: #38bdf8;
  cursor: pointer;
  box-sizing: border-box;
}

/* 视图显示定制开关按钮 */
.btn-toggle {
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid #475569;
  font-size: 12px;
  font-weight: 600;
  padding: 0 10px;
  height: 32px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-toggle:hover {
  background: #334155;
  color: #f8fafc;
  border-color: #64748b;
}

.btn-toggle.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

/* 专属节拍律动控制区 (Dedicated Metronome Hub Partition) */
.metronome-hub-partition {
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  box-shadow: 0 0 14px rgba(2, 132, 199, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  transition: all 0.25s ease;
}

/* 核心提出来的打谱与曲目工具组 */
.primary-tools-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}


/* 外部节拍器开关及动态展开面板 */
.metronome-ext-btn {
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.metronome-ext-btn.is-active {
  background: #0284c7 !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

/* 桌面端速度调节组与步进加减按钮 */
.bpm-control {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #1e293b;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #334155;
  height: 32px;
  box-sizing: border-box;
}

.bpm-control .bpm-title-label {
  font-size: 12px;
  color: var(--text-muted);
}

#bpmSlider {
  width: 48px;
  height: 14px;
  accent-color: #38bdf8;
  cursor: pointer;
}

#bpmLabel {
  font-size: 12px;
  width: 48px;
  font-weight: 700;
  color: #f8fafc;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.bpm-step-btn {
  width: 20px;
  height: 20px;
  min-width: 20px;
  max-width: 20px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: #334155;
  border: 1px solid #475569;
  color: #e2e8f0;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  line-height: 1;
}

.bpm-step-btn .btn-label {
  display: none;
}

.bpm-step-btn .btn-icon {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  margin: 0;
}

.bpm-step-btn:hover {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
}

.bpm-step-btn:active {
  transform: scale(0.92);
  background: #0369a1;
}

/* 节拍器专区容器 (桌面端横向集成) */
.metronome-hub-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 6px;
  padding: 2px 6px;
  height: 32px;
  box-sizing: border-box;
}

.metronome-settings-panel {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 0;
  height: 28px;
  box-shadow: none;
}

.metronome-settings-panel select {
  height: 26px;
  font-size: 11px;
  background: #1e293b;
  border: 1px solid #334155;
  color: #cbd5e1;
  border-radius: 4px;
  padding: 0 4px;
}

@keyframes panel-fade-in {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}



.metronome-hub-partition:hover {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.3);
}

.partition-badge {
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.pagination-badge {
  font-size: 11px;
  font-weight: 800;
  color: #a855f7;
  background: rgba(168, 85, 247, 0.15);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(168, 85, 247, 0.3);
  white-space: nowrap;
  letter-spacing: 0.5px;
}

/* 实时调音与识别控制板 (Tuner & HUD Bar) */
.hud-bar {
  background-color: #111827;
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: all 0.2s ease;
}

.hud-bar.is-hidden,
body.is-hud-hidden .hud-bar {
  display: none !important;
}

.tuner-box {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pitch-display {
  width: 56px;
  height: 56px;
  background: #1e293b;
  border: 2px solid #475569;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.pitch-display.in-tune {
  border-color: var(--success);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}

.pitch-display.out-of-tune {
  border-color: var(--warning);
}

.pitch-name {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.pitch-freq {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.cents-gauge {
  width: 100%;
}

.tuner-fret-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hud-item-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.tuner-fret-val {
  font-size: 13px;
  color: #38bdf8;
}

.cents-meter {
  position: relative;
  width: 100%;
  height: 8px;
  background: #334155;
  border-radius: 4px;
  overflow: hidden;
}

.cents-center-mark {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  background: #ffffff;
  transform: translateX(-50%);
}

.cents-pointer {
  position: absolute;
  top: 0;
  width: 6px;
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: left 0.1s ease;
  left: 50%;
}

.cents-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}

.target-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.target-item {
  display: flex;
  flex-direction: column;
}

.target-badge {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.target-val {
  font-size: 18px;
  font-weight: 700;
  color: #38bdf8;
}

.target-fret {
  background: #0284c7;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.target-item-duration .target-duration-fret {
  background: #059669;
}

.target-technique-badge {
  font-size: 13px;
  font-weight: 700;
  color: #e879f9;
  padding: 4px 8px;
  background: rgba(232, 121, 249, 0.15);
  border-radius: 4px;
  border: 1px solid rgba(232, 121, 249, 0.4);
}

.target-chord-badge {
  font-size: 16px;
  font-weight: 700;
  color: #fbbf24;
}

.stats-card {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-title {
  font-size: 11px;
  color: var(--text-muted);
}

.stat-value {
  font-size: 16px;
  font-weight: 700;
  color: #f1f5f9;
}

/* ============================================================
 * 🎙️ 智能跟弹与声学测音工作台 (Smart Follow & Tuner HUD)
 * ============================================================ */
.follow-hud-bar {
  background: #0b1329;
  border-bottom: 2px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  padding: 8px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
  animation: fadeInDown 0.2s ease-out;
  z-index: 95;
}

.follow-hud-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
  flex-wrap: nowrap;
}

.follow-hud-col {
  display: flex;
  align-items: center;
  gap: 10px;
}

.follow-hud-ctrls {
  flex-shrink: 0;
}

.follow-hud-ctrls .practice-mode-select {
  height: 34px;
  min-width: 110px;
  color: #f59e0b;
  border-color: #d97706;
  font-weight: 600;
  font-size: 12px;
}

.follow-hud-tuner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  padding: 6px 14px;
  flex: 0 1 auto;
}

.follow-hud-tuner .pitch-display {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  flex-shrink: 0;
}

.follow-hud-tuner .pitch-name {
  font-size: 16px;
}

.follow-hud-tuner .pitch-freq {
  font-size: 9px;
}

.cents-gauge-wrap {
  width: 120px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cents-gauge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--text-muted);
}

.cents-gauge-val {
  font-size: 12px;
  font-weight: 700;
  color: #38bdf8;
  font-family: monospace;
}

.cents-gauge-wrap .cents-gauge {
  width: 100%;
}

.cents-gauge-wrap .cents-label {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 2px;
}

.cents-center-text {
  color: #22c55e;
}

.follow-hud-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(71, 85, 105, 0.5);
  border-radius: 8px;
  padding: 6px 14px;
  flex-shrink: 0;
}

.follow-hud-close-wrap {
  flex-shrink: 0;
}

.btn-close-hud {
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-close-hud:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #ffffff;
}

/* ============================================================
 * 🎶 智能伴奏控制台 (Accompaniment Bar)
 * ============================================================ */
.accompaniment-bar {
  background: linear-gradient(90deg, #091326 0%, #0d1e38 50%, #0b1528 100%);
  border-bottom: 2px solid #0284c7;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
  animation: fadeInDown 0.2s ease-out;
  z-index: 94;
}

.acc-bar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  flex-wrap: nowrap;
}

.acc-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 0 1 auto;
}

.acc-badge {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
}

.acc-track-title {
  font-size: 13px;
  font-weight: 600;
  color: #38bdf8;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acc-time-display {
  font-size: 11px;
  font-family: monospace;
  color: #94a3b8;
  white-space: nowrap;
  background: rgba(15, 23, 42, 0.6);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.acc-bar-center {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.acc-bar-center .btn {
  height: 28px;
  padding: 0 10px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.acc-bar-center #accSyncToggleBtn.is-active {
  background: rgba(14, 165, 233, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
}

.acc-bar-center #accSoloMuteBtn.is-active {
  background: rgba(168, 85, 247, 0.25);
  border-color: #c084fc;
  color: #e9d5ff;
}

.acc-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.acc-vol-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.6);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(71, 85, 105, 0.4);
}

.acc-vol-slider {
  width: 60px;
  height: 4px;
  cursor: pointer;
  accent-color: #38bdf8;
}

.acc-vol-label {
  font-size: 10px;
  font-family: monospace;
  color: #94a3b8;
  width: 26px;
  text-align: right;
}

.acc-offset-box {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 23, 42, 0.6);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(71, 85, 105, 0.4);
}

.acc-offset-val {
  font-size: 11px;
  font-family: monospace;
  color: #f59e0b;
  min-width: 28px;
  text-align: center;
}

.acc-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.acc-header-pill:hover {
  background: rgba(14, 165, 233, 0.3);
  border-color: #38bdf8;
}

/* 功能实验室卡片样式 (Lab Feature Cards) */
.lab-feature-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lab-feature-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lab-feature-title {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lab-feature-desc {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
}

.badge-beta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
  line-height: 1;
}

.badge-ai {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.35);
  line-height: 1;
  letter-spacing: 0.5px;
}

/* 主乐谱视口 (Score Canvas Area) - 模拟出版级乐谱纸张质感 */
.main-viewport {
  flex: 1;
  background-color: #1e293b;
  background-image: radial-gradient(rgba(51, 65, 85, 0.4) 1px, transparent 1px);
  background-size: 20px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 32px 20px 140px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
}

/* 乐谱纸张容器包裹层 (支持长卷单页模式与并列双页翻谱模式) */
.score-paper-wrapper {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 28px;
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  box-sizing: border-box;
  transition: all 0.25s ease;
}

/* 连续长卷模式：单页居中展示 */
.score-paper-wrapper:not(.dual-page-layout) .score-paper-preview {
  display: none !important;
}

.score-paper-wrapper:not(.dual-page-layout) #scorePaper {
  width: 920px;
  max-width: 95vw;
}

.score-paper-wrapper:not(.dual-page-layout) #mainPageCornerTag {
  display: none;
}

/* 分页并列双页翻谱模式 (Dual Page Turn Pipeline) */
.score-paper-wrapper.dual-page-layout {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
  gap: 24px;
  width: 100%;
}

.score-paper-wrapper.dual-page-layout .score-paper {
  flex: 1;
  width: calc(50% - 14px);
  max-width: 780px;
  min-width: 440px;
  min-height: 800px;
  margin: 0 0 60px 0;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 36px 36px 80px 36px;
}

.score-paper-wrapper.dual-page-layout .score-paper-preview {
  display: block;
  opacity: 0.96;
  background: var(--bg-paper);
}

.score-paper {
  background: var(--bg-paper);
  width: 920px;
  min-height: 960px;
  height: auto;
  border-radius: 6px;
  box-shadow: var(--paper-shadow);
  padding: 40px 48px 120px 48px;
  position: relative;
  transition: min-height 0.15s ease;
  box-sizing: border-box;
  margin: 0 auto 80px auto;
  display: block;
  flex-shrink: 0;
}

#alphaTabContainer,
#alphaTabPreviewContainer {
  width: 100%;
  height: auto;
  min-height: 400px;
  position: relative;
  box-sizing: border-box;
}

/* 页角状态角标 */
.page-corner-tag {
  position: absolute;
  top: 10px;
  left: 16px;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(2, 132, 199, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  z-index: 10;
  letter-spacing: 0.5px;
  user-select: none;
}

.page-corner-tag.preview-tag {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.35);
}

/* 最后一页空白结束占位卡片 */
.preview-empty-placeholder {
  min-height: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  margin: 50px 10px;
  padding: 40px 20px;
  user-select: none;
}

@media (max-width: 1180px) {
  .score-paper-wrapper.dual-page-layout {
    flex-direction: column;
    align-items: center;
  }
  .score-paper-wrapper.dual-page-layout .score-paper {
    width: 95vw;
    max-width: 920px;
  }
}

/* 防御性规则：确保 alphaTab 内部渲染元素绝不被全局 CSS 误隐藏 */
#alphaTabContainer .at-wrap,
#alphaTabContainer .at-content,
#alphaTabContainer .at-viewport,
#alphaTabContainer .at-surface,
#alphaTabContainer svg,
#alphaTabContainer canvas {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
}

/* 动态音符律动指示灯与微光光圈 (Spotlight Active Note Lamp & Halo) */
.score-active-lamp {
  position: absolute;
  pointer-events: none;
  z-index: 60;
  display: none;
  transform: translate(-50%, -100%);
  transition: left 0.12s cubic-bezier(0.25, 1, 0.5, 1), top 0.15s ease;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.score-active-lamp .lamp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  color: #ffffff;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.6);
  white-space: nowrap;
}

.score-active-lamp.follow-mode .lamp-badge {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  border-color: #fef08a;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.85);
}

.score-active-lamp .lamp-arrow {
  width: 0;
  height: 0;
  margin: 0 auto;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #0284c7;
}

.score-active-lamp.follow-mode .lamp-arrow {
  border-top-color: #d97706;
}

/* 音符周围的微光聚焦光圈 (Note Head Halo Spotlight - 绝不遮挡乐谱音符) */
.score-note-halo {
  position: absolute;
  pointer-events: none;
  z-index: 55;
  display: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(56, 189, 248, 0.35) 0%, rgba(56, 189, 248, 0.0) 70%);
  border: 1.5px solid rgba(56, 189, 248, 0.85);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
  transition: left 0.12s cubic-bezier(0.25, 1, 0.5, 1), top 0.15s ease;
}

.score-note-halo.follow-mode {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.4) 0%, rgba(245, 158, 11, 0.0) 70%);
  border-color: rgba(245, 158, 11, 0.9);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.75);
}

/* TAB 二分音符 2 倍时值斜线辅助矢量层 (TAB Stem Slashes Layer) */
.tab-slashes-svg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
  overflow: visible;
}

.tab-stem-slash {
  stroke: #1e293b;
  stroke-width: 1.6px;
  stroke-linecap: round;
  transition: opacity 0.2s ease;
}

/* TAB 二分音符/全音符标准出版级矢量黑墨时值圈 (Standard Engraving Half-Note Ring) */
.tab-half-ring {
  stroke: #000000;
  stroke-width: 1.2px;
  fill: none;
}

/* TAB 顿音/切音标准出版级矢量黑墨圆点 (Standard Engraving Staccato Dot) */
.tab-staccato-dot {
  fill: #1e293b;
  stroke: none;
}

body.dark-mode .tab-staccato-dot {
  fill: #f8fafc;
}

/* 底部状态栏 (Status bar) */
.statusbar {
  background-color: var(--bg-panel);
  border-top: 1px solid var(--border-color);
  padding: 6px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
  margin-right: 6px;
}

.status-indicator.active {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

/* ================= 尤克里里 4 弦物理声学虚拟指板 (Fretboard Widget) ================= */
.fretboard-section {
  background: #111827;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 20px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s ease;
}

.fretboard-section.docked-bottom {
  border-top: 2px solid #334155;
  border-bottom: none;
  box-shadow: 0 -6px 20px rgba(0,0,0,0.6);
  z-index: 30;
}

.fretboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.fretboard-container {
  position: relative;
  background: linear-gradient(180deg, #3d2314 0%, #2b180d 50%, #1e1008 100%);
  border: 2px solid #5c3a21;
  border-radius: 6px;
  height: 96px;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.8), 0 4px 12px rgba(0,0,0,0.4);
  display: flex;
  user-select: none;
}

/* 弦枕与琴头区 (Nut - 宽域单行排列，确保 4 弦全部显示且不换行) */
.nut-fret {
  width: 76px;
  min-width: 76px;
  background: #1f140e;
  border-right: 5px solid #d4c5b9;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 2px 4px;
  z-index: 2;
  box-sizing: border-box;
}

/* 品柱区 (Frets 1 ~ 12) */
.frets-wrapper {
  flex: 1;
  display: flex;
  position: relative;
}

.fret-col {
  flex: 1;
  border-right: 2px solid #94a3b8;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  cursor: pointer;
  transition: background 0.1s;
}

.fret-col:hover {
  background: rgba(255, 255, 255, 0.05);
}

.fret-num {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 9px;
  font-weight: 700;
  color: #78716c;
}

/* 品位圆点标记 (Inlay Position Dots at 3, 5, 7, 10, 12) */
.inlay-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, #f5f5f4 30%, #a8a29e 100%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.7;
}

.inlay-double-dot-1 {
  position: absolute;
  top: 26%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 7px;
  height: 7px;
  background: radial-gradient(circle, #f5f5f4 30%, #a8a29e 100%);
  border-radius: 50%;
  opacity: 0.7;
}
.inlay-double-dot-2 {
  position: absolute;
  top: 74%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 7px;
  height: 7px;
  background: radial-gradient(circle, #f5f5f4 30%, #a8a29e 100%);
  border-radius: 50%;
  opacity: 0.7;
}

/* 4根琴弦横线 (Strings: 1弦最细在顶, 4弦粗) */
.string-line {
  position: absolute;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #94a3b8 100%);
  box-shadow: 0 1px 3px rgba(0,0,0,0.8);
  pointer-events: none;
}
.string-1 { top: 12.5%; height: 1.5px; }
.string-2 { top: 37.5%; height: 2.2px; }
.string-3 { top: 62.5%; height: 3.0px; }
.string-4 { top: 87.5%; height: 2.0px; }

/* 弦名标签 (Nut String Labels - 禁止换行且固定对齐) */
.string-label {
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
  text-align: center;
  white-space: nowrap;
  height: 20px;
  line-height: 20px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
  user-select: none;
}

.string-label:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #38bdf8;
}

/* 动态音符标记点 (Note Markers) */
.fret-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  z-index: 5;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

/* 目标待弹音符 (Target Gold Glow) */
.fret-marker.target {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  border: 2px solid #fbbf24;
  box-shadow: 0 0 12px #f59e0b, 0 0 24px rgba(245, 158, 11, 0.6);
  animation: pulse-target 1.2s infinite ease-in-out;
}

@keyframes pulse-target {
  0% { transform: translate(-50%, -50%) scale(1.0); }
  50% { transform: translate(-50%, -50%) scale(1.2); }
  100% { transform: translate(-50%, -50%) scale(1.0); }
}

/* 麦克风实时测中正确音符 (Live In-tune Green) */
.fret-marker.live-correct {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: 2px solid #34d399;
  box-shadow: 0 0 16px #10b981;
}

/* 麦克风测中错误音/品位 (Live Incorrect Red) */
.fret-marker.live-wrong {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  border: 2px solid #f87171;
  box-shadow: 0 0 16px #ef4444;
}

/* 评测浮动打分徽章 (Perfect / Good / Miss Badge) */
.eval-badge {
  position: absolute;
  top: 15px;
  right: 25px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: none;
  z-index: 20;
  animation: pop-badge 0.4s ease forwards;
}

.eval-perfect {
  background: linear-gradient(135deg, #f59e0b 0%, #ec4899 100%);
  color: #fff;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.8);
}
.eval-good {
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  color: #fff;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.8);
}
.eval-miss {
  background: #ef4444;
  color: #fff;
}

/* ================= 智能多图 OMR 识图成谱弹窗 (OMR Studio Modal) ================= */
.omr-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  box-sizing: border-box;
}

.omr-modal-dialog {
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 12px;
  width: 700px;
  max-width: min(95vw, 720px);
  height: 86vh;
  max-height: min(86vh, 820px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  box-sizing: border-box;
  animation: modal-pop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.omr-modal-dialog.modal-dialog-compact {
  width: 480px;
  max-width: min(92vw, 500px);
  height: auto;
  max-height: min(90vh, 620px);
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.omr-modal-header {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0f172a;
  box-sizing: border-box;
}

.omr-modal-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 6px;
}

.omr-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s;
  line-height: 1;
}

.omr-close-btn:hover {
  color: #f8fafc;
  background: #334155;
}

.omr-modal-body {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}

/* 统一轻量化卡片容器 (紧凑优雅排版) */
.modal-card {
  background: #0f172a;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #334155;
  box-sizing: border-box;
}

.modal-card.card-accent {
  border-color: #0284c7;
}

.modal-card.card-success {
  border-color: #059669;
}

/* 弹窗标准控件工效学规范 (输入区宽敞舒适，触控易操作，字体清晰) */
.modal-input,
.omr-modal-body input[type="text"],
.omr-modal-body input[type="password"],
.omr-modal-body input[type="number"],
.omr-modal-body select.select {
  height: 36px;
  padding: 0 10px;
  font-size: 13px;
  border-radius: 6px;
  box-sizing: border-box;
}

.modal-textarea,
.omr-modal-body textarea.select {
  min-height: 110px;
  height: 120px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 6px;
  resize: vertical;
  box-sizing: border-box;
}

.omr-modal-body .btn-secondary {
  height: 28px;
  padding: 0 10px;
  font-size: 11.5px;
}

.omr-modal-body .btn-primary {
  height: 32px;
  padding: 0 14px;
  font-size: 12px;
}

/* 拖拽上传区域 (扁平紧凑设计，避免挤占结果与缩略图空间) */
.omr-dropzone {
  border: 1.5px dashed #475569;
  border-radius: 6px;
  padding: 6px 12px;
  text-align: center;
  background: rgba(15, 23, 42, 0.5);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 38px;
  box-sizing: border-box;
}

.omr-dropzone:hover, .omr-dropzone.dragover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

.omr-dropzone-icon {
  font-size: 24px;
  margin-bottom: 0;
  line-height: 1;
}

.omr-dropzone-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.omr-dropzone-text {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.3;
}

.omr-dropzone-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
  line-height: 1.2;
}

/* 已上传状态下的超紧凑追加条 */
.omr-dropzone.has-images {
  padding: 6px 14px;
  min-height: 36px;
  border-style: dashed;
  border-width: 1px;
  background: rgba(30, 41, 59, 0.6);
  border-color: #0284c7;
}

.omr-dropzone.has-images .omr-dropzone-icon {
  font-size: 16px;
}

.omr-dropzone.has-images .omr-dropzone-text {
  font-size: 11px;
  color: #38bdf8;
}

.omr-dropzone.has-images .omr-dropzone-sub {
  display: none;
}

/* 多页缩略图横排列表 */
.omr-thumbnails-container {
  display: none;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 8px;
  max-height: 135px;
  flex-shrink: 0;
}

.omr-thumb-card {
  position: relative;
  width: 115px;
  min-width: 115px;
  max-width: 115px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-sizing: border-box;
}

.omr-thumb-badge {
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
  background: #1e293b;
  padding: 1px 5px;
  border-radius: 3px;
  align-self: flex-start;
  line-height: 1.2;
}

.omr-thumb-img-box {
  width: 100%;
  height: 75px;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.omr-thumb-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.omr-thumb-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
}

.omr-tool-btn {
  background: #1e293b;
  border: 1px solid #475569;
  color: #cbd5e1;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.omr-tool-btn:hover:not(:disabled) {
  background: #334155;
  color: #f8fafc;
}

.omr-tool-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.omr-tool-btn.danger:hover {
  background: #dc2626;
  border-color: #ef4444;
  color: #fff;
}

/* 进度条与状态 */
.omr-progress-section {
  display: none;
  background: #0f172a;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #0284c7;
  box-sizing: border-box;
}

.omr-progress-bar-bg {
  width: 100%;
  height: 6px;
  background: #1e293b;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}

.omr-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0284c7 0%, #38bdf8 100%);
  transition: width 0.3s ease;
}

.omr-progress-text {
  font-size: 11px;
  color: #38bdf8;
  font-weight: 600;
}

/* 识别结果卡片 */
.omr-result-section {
  display: none;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 8px 12px;
  border-radius: 6px;
  box-sizing: border-box;
}

.omr-result-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: #f1f5f9;
  margin-bottom: 8px;
}

.omr-result-meta strong {
  color: #34d399;
}

.omr-result-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.omr-result-actions .btn {
  height: 28px;
  padding: 0 10px;
  font-size: 11px;
}

@keyframes pop-badge {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1.0); opacity: 1; }
}

/* 修谱模式可视化可交互热区 (Interactive Minimalist TAB Hitbox) */
.score-editor-hitbox-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 50;
}

.score-editor-hitbox {
  position: absolute;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  min-width: 20px;
  height: 18px;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s ease;
  backdrop-filter: blur(2px);
}

.score-editor-hitbox:hover {
  transform: translate(-50%, -50%) scale(1.25);
  background: rgba(2, 132, 199, 0.85);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.9);
  z-index: 55;
}

.score-editor-hitbox.selected {
  transform: translate(-50%, -50%) scale(1.3);
  background: #f59e0b;
  border-color: #fbbf24;
  color: #0f172a;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.95);
  z-index: 60;
  animation: pulse-ring 0.9s infinite alternate;
}

.score-editor-hitbox.hitbox-slap {
  border-color: #ef4444;
  color: #f87171;
}

.score-editor-hitbox.hitbox-rest {
  border-color: #94a3b8;
  color: #cbd5e1;
}

.score-editor-hitbox.hitbox-staccato::before {
  content: "•";
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  color: #0284c7;
  pointer-events: none;
  text-shadow: 0 0 4px rgba(2, 132, 199, 0.4);
}

@keyframes pulse-ring {
  from { box-shadow: 0 0 6px rgba(245, 158, 11, 0.5); }
  to { box-shadow: 0 0 16px rgba(245, 158, 11, 0.95); }
}

/* 交互式快速修谱面板 (Interactive Quick Editor Popover) */
.score-editor-popover {
  position: fixed;
  z-index: 1000;
  width: 360px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
  border: 1.5px solid #38bdf8;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 25px rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 14px;
  color: #f8fafc;
  user-select: none;
  animation: pop-badge 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.score-editor-popover.docked-right {
  right: 24px !important;
  top: 120px !important;
  left: auto !important;
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #334155;
  padding-bottom: 8px;
  margin-bottom: 10px;
  cursor: move;
}

.drag-handle {
  font-size: 14px;
  color: #64748b;
  margin-right: 4px;
  cursor: grab;
}

.editor-title {
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  align-items: center;
}

.editor-tool-icon-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}
.editor-tool-icon-btn:hover {
  background: #334155;
  color: #fff;
}

.editor-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.editor-close-btn:hover {
  background: #dc2626;
  color: #fff;
}

/* 4 弦全景独立增减控制矩阵 (Chord Matrix) */
.editor-section-box {
  background: #111827;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 6px 8px;
  margin-bottom: 8px;
}

.editor-section-title {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 4px;
}

.editor-string-matrix {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.string-matrix-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 6px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.1s ease;
}

.string-matrix-row:hover {
  background: #334155;
}

.string-matrix-row.focused {
  border-color: #38bdf8;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.4);
}

.string-matrix-row.disabled {
  opacity: 0.6;
}

.string-matrix-name {
  font-size: 11px;
  font-weight: 700;
  color: #e2e8f0;
}

.string-matrix-fret {
  font-size: 12px;
  font-weight: 800;
  color: #38bdf8;
}

.string-toggle-btn {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  border: none;
  cursor: pointer;
}

.string-toggle-btn.on {
  background: #10b981;
  color: #ffffff;
}

.string-toggle-btn.off {
  background: #475569;
  color: #cbd5e1;
}

.editor-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.editor-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  width: 58px;
  flex-shrink: 0;
}

.editor-btn-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  flex: 1;
}

.editor-btn {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #475569;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 6px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.editor-btn:hover {
  background: #334155;
  border-color: #64748b;
}

.editor-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.5);
}

.editor-input {
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #475569;
  border-radius: 4px;
  font-size: 12px;
  padding: 3px 6px;
  text-align: center;
  outline: none;
}
.editor-input:focus {
  border-color: #38bdf8;
}

.editor-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-top: 1px solid #334155;
  padding-top: 10px;
  margin-top: 8px;
}

.editor-action-btn {
  flex: 1;
  height: 28px;
  background: #334155;
  color: #f8fafc;
  border: 1px solid #475569;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.editor-action-btn:hover {
  background: #475569;
}
.editor-action-btn.primary {
  background: #0284c7;
  border-color: #38bdf8;
}
.editor-action-btn.primary:hover {
  background: #0369a1;
}
.editor-action-btn.danger {
  background: #991b1b;
  border-color: #ef4444;
}
.editor-action-btn.danger:hover {
  background: #b91c1c;
}

/* 全窗口拖拽导入 HUD 遮罩 */
.drag-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  pointer-events: none;
  border: 3px dashed #38bdf8;
}

.drag-overlay.active {
  display: flex;
}

.drag-overlay-icon {
  font-size: 56px;
  animation: bounce 0.8s infinite alternate;
}

.drag-overlay-title {
  font-size: 22px;
  font-weight: 800;
  color: #38bdf8;
}

.drag-overlay-sub {
  font-size: 14px;
  color: #94a3b8;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-12px); }
}

/* ==========================================================================
   多套沉浸式色彩主题定制系统 (Multi-Theme Palette Engine)
   1. 🌌 科技暗黑 (Cyber Dark · 默认)
   2. 🪵 经典琥珀木纹 (Vintage Wood · 暖色工坊风)
   3. 🌿 雅致象牙清新 (Nordic Light · 极简白昼出版风)
   ========================================================================== */

/* ----------------- 主题 2: 🪵 经典琥珀木纹 (Vintage Wood) ----------------- */
body.theme-vintage-wood {
  --bg-app: #181513;
  --bg-panel: #26211e;
  --bg-paper: #fdfbf7;
  --border-color: #44372f;
  --text-main: #fef3c7;
  --text-muted: #a89988;
  --primary: #f59e0b;
  --primary-hover: #d97706;
  --paper-shadow: 0 12px 35px -5px rgba(0, 0, 0, 0.7), 0 8px 14px -6px rgba(0, 0, 0, 0.5);
  background-color: var(--bg-app);
  color: var(--text-main);
}

body.theme-vintage-wood .studio-header {
  background-color: #26211e;
  border-bottom-color: #44372f;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

body.theme-vintage-wood .header-row {
  border-bottom-color: rgba(68, 55, 47, 0.6);
}

body.theme-vintage-wood .header-row.row-bottom {
  background: rgba(24, 21, 19, 0.45);
}

body.theme-vintage-wood .brand .logo {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.theme-vintage-wood .brand .tag {
  background: #3f332a;
  color: #fef3c7;
}

body.theme-vintage-wood .btn {
  background-color: #38302b;
  color: #fef3c7;
  border-color: #52453d;
}

body.theme-vintage-wood .btn:hover {
  background-color: #4a3e36;
  border-color: #6e5d52;
}

body.theme-vintage-wood .btn.btn-primary {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  border-color: #f59e0b;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4);
}

body.theme-vintage-wood .select {
  background-color: #2b2420;
  color: #fef3c7;
  border-color: #52453d;
}

body.theme-vintage-wood .select:focus {
  border-color: #f59e0b;
}

body.theme-vintage-wood .select#scoreSelect {
  color: #f59e0b !important;
}

body.theme-vintage-wood .select#themeSelect {
  color: #f59e0b !important;
  border-color: #b45309 !important;
}

body.theme-vintage-wood .bpm-control {
  background: #2b2420;
  border-color: #52453d;
}

body.theme-vintage-wood .loop-control-box {
  background: #2b2420 !important;
  border-color: #44372f !important;
}

body.theme-vintage-wood .loop-control-box input {
  background: #181513 !important;
  border-color: #52453d !important;
  color: #f59e0b !important;
}

body.theme-vintage-wood .btn-toggle {
  background: #2b2420;
  color: #a89988;
  border-color: #52453d;
}

body.theme-vintage-wood .btn-toggle:hover {
  background: #38302b;
  color: #fef3c7;
}

body.theme-vintage-wood .btn-toggle.active {
  background: #b45309;
  color: #ffffff;
  border-color: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
}

body.theme-vintage-wood .hud-bar {
  background-color: #1c1815;
  border-bottom-color: #44372f;
}

body.theme-vintage-wood .pitch-display {
  background: #2b2420;
  border-color: #52453d;
}

body.theme-vintage-wood .target-card {
  background: #2b2420;
  border-color: #473b33;
}

body.theme-vintage-wood .target-val {
  color: #f59e0b;
}

body.theme-vintage-wood .target-fret {
  background: #b45309;
}

body.theme-vintage-wood .main-viewport {
  background-color: #1a1614;
  background-image: radial-gradient(rgba(180, 140, 100, 0.22) 1px, transparent 1px);
}

body.theme-vintage-wood .score-paper {
  background: #fdfbf7;
  border: 1px solid #e2d9cd;
}

body.theme-vintage-wood .fretboard-section {
  background: #1c1815;
  border-bottom-color: #44372f;
}

body.theme-vintage-wood .fretboard-container {
  background: linear-gradient(180deg, #4a2810 0%, #381e0c 50%, #241307 100%);
  border-color: #6b3a16;
}

body.theme-vintage-wood .statusbar {
  background-color: #26211e;
  border-top-color: #44372f;
  color: #a89988;
}

body.theme-vintage-wood .score-editor-popover {
  background: rgba(38, 33, 30, 0.96);
  border-color: #f59e0b;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 25px rgba(245, 158, 11, 0.25);
  color: #fef3c7;
}

body.theme-vintage-wood .editor-title {
  color: #f59e0b;
}

body.theme-vintage-wood .editor-header {
  border-bottom-color: #52453d;
}

body.theme-vintage-wood .editor-section-box {
  background: #1f1a17;
  border-color: #473b33;
}

body.theme-vintage-wood .string-matrix-row {
  background: #2b2420;
  border-color: #473b33;
}

body.theme-vintage-wood .string-matrix-row.focused {
  border-color: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

body.theme-vintage-wood .string-matrix-fret {
  color: #f59e0b;
}

body.theme-vintage-wood .editor-btn {
  background: #2b2420;
  border-color: #52453d;
  color: #fef3c7;
}

body.theme-vintage-wood .editor-btn:hover {
  background: #3f342d;
  border-color: #786455;
}

body.theme-vintage-wood .editor-btn.active {
  background: #b45309;
  border-color: #f59e0b;
  color: #ffffff;
}

body.theme-vintage-wood .editor-input {
  background: #181513;
  border-color: #52453d;
  color: #f59e0b;
}

/* 琥珀木纹 - 帮助按钮、抽屉与使用指引风格 */
body.theme-vintage-wood #desktopHelpBtn {
  background: #2b2420 !important;
  border: 1px solid #f59e0b !important;
  color: #fbbf24 !important;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15) !important;
}

body.theme-vintage-wood #desktopHelpBtn:hover {
  background: #d97706 !important;
  border-color: #fbbf24 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5) !important;
}

body.theme-vintage-wood #mobileHelpBtn {
  background: #2b2420 !important;
  border-color: #f59e0b !important;
  color: #fbbf24 !important;
}

body.theme-vintage-wood #mobileHelpBtn:hover {
  background: #4a3e36 !important;
  border-color: #fbbf24 !important;
  color: #ffffff !important;
}

body.theme-vintage-wood #mobileSettingsBtn {
  background: #2b2420 !important;
  border-color: #52453d !important;
  color: #fef3c7 !important;
}

body.theme-vintage-wood #mobileSettingsBtn:hover {
  background: #4a3e36 !important;
  border-color: #6e5d52 !important;
}

body.theme-vintage-wood .drawer-help-btn {
  background: rgba(245, 158, 11, 0.16) !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  color: #fbbf24 !important;
}

body.theme-vintage-wood .drawer-help-btn:hover {
  background: rgba(245, 158, 11, 0.3) !important;
  border-color: #f59e0b !important;
  color: #ffffff !important;
}

body.theme-vintage-wood #drawerAboutHelpBtn {
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  color: #fbbf24 !important;
}

body.theme-vintage-wood #drawerAboutHelpBtn:hover {
  background: #d97706 !important;
  border-color: #fbbf24 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4) !important;
}

body.theme-vintage-wood .mobile-drawer-sheet {
  background: #1f1a17 !important;
  border-left-color: #f59e0b !important;
}

body.theme-vintage-wood .drawer-header {
  background: #26211e !important;
  border-bottom-color: #44372f !important;
}

body.theme-vintage-wood .drawer-close-btn {
  background: #38302b !important;
  border-color: #52453d !important;
  color: #fef3c7 !important;
}

body.theme-vintage-wood .drawer-close-btn:hover {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

body.theme-vintage-wood .drawer-section {
  background: rgba(38, 33, 30, 0.6) !important;
  border-color: #44372f !important;
}

body.theme-vintage-wood .drawer-section-title {
  color: #fbbf24 !important;
  border-bottom-color: #44372f !important;
}

body.theme-vintage-wood .help-modal-dialog {
  background: #26211e !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 25px rgba(245, 158, 11, 0.2) !important;
}

body.theme-vintage-wood .help-modal-header {
  background: #1f1a17 !important;
  border-bottom-color: #44372f !important;
}

body.theme-vintage-wood .help-modal-title {
  color: #fef3c7 !important;
}

body.theme-vintage-wood .help-modal-subtitle {
  color: #a89988 !important;
}

body.theme-vintage-wood .help-modal-close-btn {
  background: #38302b !important;
  border-color: #52453d !important;
  color: #fef3c7 !important;
}

body.theme-vintage-wood .help-modal-close-btn:hover {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

body.theme-vintage-wood .help-nav-tabs {
  background: #181513 !important;
  border-bottom-color: #44372f !important;
}

body.theme-vintage-wood .help-tab-btn {
  background: #2b2420 !important;
  border-color: #44372f !important;
  color: #a89988 !important;
}

body.theme-vintage-wood .help-tab-btn:hover {
  color: #fef3c7 !important;
  border-color: #6e5d52 !important;
  background: #38302b !important;
}

body.theme-vintage-wood .help-tab-btn.active {
  background: rgba(245, 158, 11, 0.2) !important;
  border-color: #f59e0b !important;
  color: #fbbf24 !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.25) !important;
}

body.theme-vintage-wood .help-module-card {
  background: #2b2420 !important;
  border-color: #44372f !important;
  color: #fef3c7 !important;
}

body.theme-vintage-wood .help-card-header {
  border-bottom-color: #38302b !important;
}

body.theme-vintage-wood .help-card-title {
  color: #fef3c7 !important;
}

body.theme-vintage-wood .help-card-badge {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
}

body.theme-vintage-wood .help-feature-item {
  background: #1f1a17 !important;
  border-color: #38302b !important;
  color: #fef3c7 !important;
}

body.theme-vintage-wood .help-kbd {
  background: #181513 !important;
  border-color: #52453d !important;
  color: #fbbf24 !important;
}

body.theme-vintage-wood .help-shortcut-row {
  border-bottom-color: #38302b !important;
}

body.theme-vintage-wood .help-shortcut-row span {
  color: #fef3c7 !important;
}

body.theme-vintage-wood .help-illustration-box {
  background: #181513 !important;
  border-color: #44372f !important;
}


/* ----------------- 主题 3: 🌿 雅致象牙清新 (Nordic Light) ----------------- */
body.theme-nordic-light {
  --bg-app: #e2e8f0;
  --bg-panel: #ffffff;
  --bg-paper: #ffffff;
  --border-color: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --paper-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  background-color: var(--bg-app);
  color: var(--text-main);
}

body.theme-nordic-light .studio-header {
  background-color: #ffffff;
  border-bottom-color: #cbd5e1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

body.theme-nordic-light .header-row {
  border-bottom-color: #e2e8f0;
}

body.theme-nordic-light .header-row.row-bottom {
  background: rgba(241, 245, 249, 0.75);
}

body.theme-nordic-light .brand .logo {
  background: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.theme-nordic-light .brand .tag {
  background: #e2e8f0;
  color: #475569;
}

body.theme-nordic-light .btn {
  background-color: #ffffff;
  color: #1e293b;
  border-color: #cbd5e1;
}

body.theme-nordic-light .btn:hover {
  background-color: #f1f5f9;
  border-color: #94a3b8;
}

body.theme-nordic-light .btn.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

body.theme-nordic-light .btn.btn-secondary {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

body.theme-nordic-light .select {
  background-color: #ffffff;
  color: #1e293b;
  border-color: #cbd5e1;
}

body.theme-nordic-light .select:focus {
  border-color: #0284c7;
}

body.theme-nordic-light .select#scoreSelect {
  color: #0284c7 !important;
}

body.theme-nordic-light .select#themeSelect {
  color: #059669 !important;
  border-color: #10b981 !important;
}

body.theme-nordic-light .bpm-control {
  background: #ffffff;
  border-color: #cbd5e1;
}

body.theme-nordic-light .bpm-control #bpmLabel {
  color: #0f172a !important;
}

body.theme-nordic-light .loop-control-box {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
}

body.theme-nordic-light .loop-control-box span {
  color: #64748b !important;
}

body.theme-nordic-light .loop-control-box input {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0284c7 !important;
}

body.theme-nordic-light .btn-toggle {
  background: #ffffff;
  color: #64748b;
  border-color: #cbd5e1;
}

body.theme-nordic-light .btn-toggle:hover {
  background: #f1f5f9;
  color: #0f172a;
}

body.theme-nordic-light .btn-toggle.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.35);
}

body.theme-nordic-light .hud-bar {
  background-color: #f8fafc;
  border-bottom-color: #cbd5e1;
}

body.theme-nordic-light .pitch-display {
  background: #ffffff;
  border-color: #cbd5e1;
}

body.theme-nordic-light .pitch-name {
  color: #0f172a;
}

body.theme-nordic-light .target-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

body.theme-nordic-light .target-val {
  color: #0284c7;
}

body.theme-nordic-light .stat-value {
  color: #0f172a;
}

body.theme-nordic-light .main-viewport {
  background-color: #e2e8f0;
  background-image: radial-gradient(rgba(100, 116, 139, 0.25) 1px, transparent 1px);
}

body.theme-nordic-light .score-paper {
  background: #ffffff;
  border: 1px solid #cbd5e1;
}

body.theme-nordic-light .fretboard-section {
  background: #f8fafc;
  border-bottom-color: #cbd5e1;
}

body.theme-nordic-light .fretboard-container {
  background: linear-gradient(180deg, #334155 0%, #1e293b 50%, #0f172a 100%);
  border-color: #475569;
}

body.theme-nordic-light .statusbar {
  background-color: #ffffff;
  border-top-color: #cbd5e1;
  color: #64748b;
}

body.theme-nordic-light .score-editor-popover {
  background: rgba(255, 255, 255, 0.97);
  border-color: #0284c7;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2), 0 0 25px rgba(2, 132, 199, 0.2);
  color: #0f172a;
}

body.theme-nordic-light .editor-title {
  color: #0284c7;
}

body.theme-nordic-light .editor-header {
  border-bottom-color: #e2e8f0;
}

body.theme-nordic-light .editor-section-box {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.theme-nordic-light .string-matrix-row {
  background: #ffffff;
  border-color: #cbd5e1;
}

body.theme-nordic-light .string-matrix-row:hover {
  background: #f1f5f9;
}

body.theme-nordic-light .string-matrix-row.focused {
  border-color: #0284c7;
  box-shadow: 0 0 6px rgba(2, 132, 199, 0.35);
}

body.theme-nordic-light .string-matrix-name {
  color: #1e293b;
}

body.theme-nordic-light .string-matrix-fret {
  color: #0284c7;
}

body.theme-nordic-light .editor-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #1e293b;
}

body.theme-nordic-light .editor-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

body.theme-nordic-light .editor-btn.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

body.theme-nordic-light .editor-input {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0284c7;
}

body.theme-nordic-light .omr-modal-content {
  background: #ffffff;
  border-color: #0284c7;
  color: #0f172a;
}

body.theme-nordic-light .omr-modal-header {
  border-bottom-color: #e2e8f0;
}

body.theme-nordic-light .omr-modal-title {
  color: #0284c7;
}

body.theme-nordic-light .omr-modal-footer {
  background: #f8fafc;
  border-top-color: #e2e8f0;
}

body.theme-nordic-light .omr-dropzone {
  background: #f8fafc;
  border-color: #94a3b8;
}

body.theme-nordic-light .omr-drop-title {
  color: #0f172a;
}

/* 象牙清新 - 帮助按钮、抽屉与使用指引风格 */
body.theme-nordic-light #desktopHelpBtn {
  background: #ffffff !important;
  border: 1px solid #0284c7 !important;
  color: #0284c7 !important;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.12) !important;
}

body.theme-nordic-light #desktopHelpBtn:hover {
  background: #0284c7 !important;
  border-color: #0369a1 !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.35) !important;
}

body.theme-nordic-light #mobileHelpBtn {
  background: #ffffff !important;
  border-color: #0284c7 !important;
  color: #0284c7 !important;
}

body.theme-nordic-light #mobileHelpBtn:hover {
  background: #f0f9ff !important;
  border-color: #0284c7 !important;
  color: #0284c7 !important;
}

body.theme-nordic-light #mobileSettingsBtn {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}

body.theme-nordic-light #mobileSettingsBtn:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
}

body.theme-nordic-light .drawer-help-btn {
  background: rgba(2, 132, 199, 0.1) !important;
  border: 1px solid rgba(2, 132, 199, 0.35) !important;
  color: #0284c7 !important;
}

body.theme-nordic-light .drawer-help-btn:hover {
  background: rgba(2, 132, 199, 0.22) !important;
  border-color: #0284c7 !important;
  color: #0369a1 !important;
}

body.theme-nordic-light #drawerAboutHelpBtn {
  background: rgba(2, 132, 199, 0.08) !important;
  border: 1px solid rgba(2, 132, 199, 0.4) !important;
  color: #0284c7 !important;
}

body.theme-nordic-light #drawerAboutHelpBtn:hover {
  background: #0284c7 !important;
  border-color: #0369a1 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3) !important;
}

body.theme-nordic-light .mobile-drawer-sheet {
  background: #ffffff !important;
  border-left-color: #0284c7 !important;
  box-shadow: -10px 0 35px rgba(15, 23, 42, 0.15) !important;
}

body.theme-nordic-light .drawer-header {
  background: #f8fafc !important;
  border-bottom-color: #e2e8f0 !important;
}

body.theme-nordic-light .drawer-header-title span:last-child {
  color: #0f172a !important;
}

body.theme-nordic-light .drawer-close-btn {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}

body.theme-nordic-light .drawer-close-btn:hover {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

body.theme-nordic-light .drawer-section {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

body.theme-nordic-light .drawer-section-title {
  color: #0284c7 !important;
  border-bottom-color: #e2e8f0 !important;
}

body.theme-nordic-light .help-modal-dialog {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.18), 0 0 20px rgba(2, 132, 199, 0.1) !important;
}

body.theme-nordic-light .help-modal-header {
  background: #f8fafc !important;
  border-bottom-color: #e2e8f0 !important;
}

body.theme-nordic-light .help-modal-title {
  color: #0f172a !important;
}

body.theme-nordic-light .help-modal-subtitle {
  color: #64748b !important;
}

body.theme-nordic-light .help-modal-close-btn {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}

body.theme-nordic-light .help-modal-close-btn:hover {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

body.theme-nordic-light .help-nav-tabs {
  background: #f1f5f9 !important;
  border-bottom-color: #e2e8f0 !important;
}

body.theme-nordic-light .help-tab-btn {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #64748b !important;
}

body.theme-nordic-light .help-tab-btn:hover {
  color: #0f172a !important;
  border-color: #94a3b8 !important;
  background: #f8fafc !important;
}

body.theme-nordic-light .help-tab-btn.active {
  background: rgba(2, 132, 199, 0.12) !important;
  border-color: #0284c7 !important;
  color: #0284c7 !important;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.18) !important;
}

body.theme-nordic-light .help-module-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06) !important;
  color: #0f172a !important;
}

body.theme-nordic-light .help-card-header {
  border-bottom-color: #f1f5f9 !important;
}

body.theme-nordic-light .help-card-title {
  color: #0f172a !important;
}

body.theme-nordic-light .help-card-badge {
  background: rgba(2, 132, 199, 0.08) !important;
  color: #0284c7 !important;
  border-color: rgba(2, 132, 199, 0.25) !important;
}

body.theme-nordic-light .help-feature-item {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
}

body.theme-nordic-light .help-kbd {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

body.theme-nordic-light .help-shortcut-row {
  border-bottom-color: #f1f5f9 !important;
}

body.theme-nordic-light .help-shortcut-row span {
  color: #334155 !important;
}

body.theme-nordic-light .help-illustration-box {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

/* ============================================================
 * 📱 移动端与全平台响应式自适应适配 (Mobile Responsive Architecture)
 * 严格保护桌面 PC 体验 100% 不受损，针对移动竖屏/横屏专门优化触控与排版
 * ============================================================ */

/* 1. PC 桌面端默认隐藏移动端专属按键与横屏引导提示 */
.mobile-settings-btn,
.mobile-only-btn,
.mobile-orient-tip {
  display: none !important;
}

/* ============================================================
 * ⚙️ 全局设置抽屉架构 (Universal Settings Drawer Architecture)
 * 桌面端：优雅侧边滑出抽屉 (Flyout Right Drawer, 420px)
 * 移动端：底部大触控面板 (Bottom Sheet, 100vw)
 * ============================================================ */
.mobile-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mobile-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer-sheet {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 90vw;
  height: 100vh;
  max-height: 100vh;
  background: #0f172a;
  border-left: 2px solid #38bdf8;
  z-index: 9999;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.85);
  transform: translateX(105%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  overflow: hidden;
}

.mobile-drawer-sheet.is-open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #334155;
  background: #1e293b;
  flex-shrink: 0;
}

.drawer-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f8fafc;
}

.drawer-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0f172a;
  color: #94a3b8;
  border: 1px solid #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drawer-close-btn:hover {
  background: #dc2626;
  color: #fff;
  border-color: #ef4444;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px calc(24px + env(safe-area-inset-bottom)) 14px;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.drawer-section {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-section-title {
  font-size: 12px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.5px;
  border-bottom: 1px dashed rgba(51, 65, 85, 0.6);
  padding-bottom: 6px;
}

.drawer-slot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

/* 带有纯图标/文字双模响应式的按钮 */
.btn-iconic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-iconic .btn-icon {
  font-size: 13px;
  line-height: 1;
}

.btn-iconic .btn-label {
  display: inline;
}

/* 2. 移动小屏幕响应式布局规范 (屏幕 <= 768px 或 手机横屏高度 <= 520px) */
@media screen and (max-width: 768px), screen and (max-height: 520px) and (orientation: landscape) {
  /* 全局防水平晃动与触控优化 */
  html, body {
    overflow-x: hidden;
    width: 100vw;
    -webkit-text-size-adjust: 100%;
  }

  body.drawer-open {
    overflow: hidden;
  }

  /* 消除移动端 300ms 点击延迟并优化热区 */
  .btn, .select {
    touch-action: manipulation;
    min-height: 30px;
    -webkit-tap-highlight-color: transparent;
  }

  /* 顶部专业控制栏 (无碰撞、无叠加、优雅双行移动流式规范) */
  .studio-header {
    padding: 4px 8px !important;
    gap: 4px !important;
    box-sizing: border-box !important;
    width: 100vw !important;
    height: auto !important;
    min-height: auto !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .header-row {
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    height: auto !important;
    min-height: 32px !important;
  }

  .header-row.row-top {
    height: 32px !important;
    padding: 0 !important;
    border-bottom: 1px solid rgba(51, 65, 85, 0.4) !important;
    display: flex !important;
    align-items: center !important;
  }

  .header-row.row-bottom {
    height: auto !important;
    min-height: 28px !important;
    padding: 2px 0 3px 0 !important;
    background: transparent !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }

  /* 第 1 行：品牌 Logo + 曲目选择胶囊 + 工具 [📁] [✏️] + [⚙️] (绝不折行) */
  .main-controls-row1 {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    gap: 4px !important;
  }

  .main-controls-row1 .brand {
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
    flex-shrink: 0 !important;
  }

  .main-controls-row1 .brand .logo {
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px !important;
    white-space: nowrap !important;
  }

  .main-controls-row1 .brand .tag {
    display: none !important;
  }

  #scoreSelect {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    height: 28px !important;
    font-size: 11px !important;
    padding: 0 6px !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    border-radius: 6px !important;
  }

  .primary-tools-group {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
    flex-wrap: nowrap !important;
  }

  /* 移动端顶栏隐藏导出与删除，由抽屉进行管理，防止顶栏过度拥挤 */
  .primary-tools-group #exportScoreBtn,
  .primary-tools-group #deleteScoreBtn {
    display: none !important;
  }

  .btn-iconic-mobile,
  .primary-tools-group .btn-iconic-mobile {
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: clip !important;
    box-sizing: border-box !important;
    flex: 0 0 30px !important;
  }

  .btn-iconic-mobile .btn-label,
  .primary-tools-group .btn-iconic-mobile .btn-label {
    display: none !important;
  }

  .btn-iconic-mobile .btn-icon,
  .primary-tools-group .btn-iconic-mobile .btn-icon {
    font-size: 14px !important;
    margin: 0 !important;
    line-height: 1 !important;
  }

  /* 移动端设置按钮完全图标化 (28x28px 精致正方形) */
  .mobile-settings-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 28px !important;
    min-height: 28px !important;
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    padding: 0 !important;
    font-size: 13px !important;
    background: #1e293b;
    color: #38bdf8;
    border: 1px solid #0284c7;
    border-radius: 6px !important;
    flex: 0 0 28px !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
  }

  .mobile-settings-btn .btn-label {
    display: none !important;
  }

  /* 移动端彻底隐藏抽屉内重复出现的桌面端设置按键 */
  #desktopSettingsBtn,
  .desktop-only-btn {
    display: none !important;
  }

  /* 第 2 行：核心示范按钮 [▶ 关] + 速度微调 + 循环开关与小节设置 + Swing开关 + 示范音色源 (单行自适应紧凑排布，零溢出) */
  .main-controls-row2 {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    gap: 3px !important;
    height: 30px !important;
    min-height: 30px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* 手机端示范播放按键：纯图标化 (无需文字)，保持 34x28px 精致舒适触控 */
  .main-controls-row2 #playBtn {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
    border-radius: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 34px !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
  }

  .main-controls-row2 #playBtn .btn-label {
    display: none !important;
  }

  .main-controls-row2 #playBtn .btn-icon {
    font-size: 14px !important;
    line-height: 1 !important;
    margin: 0 !important;
  }

  #bpmControl {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 26px !important;
    min-height: 26px !important;
    padding: 0 2px !important;
    gap: 2px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #1e293b !important;
    border-radius: 5px !important;
    border: 1px solid #475569 !important;
    box-sizing: border-box !important;
  }

  #bpmControl .bpm-title-label,
  #bpmControl > span:first-child {
    display: none !important;
  }

  #bpmSlider {
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    flex: 0 0 24px !important;
    height: 10px !important;
    accent-color: #38bdf8 !important;
    cursor: pointer !important;
  }

  #bpmLabel {
    width: 30px !important;
    min-width: 30px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    text-align: center !important;
    color: #f8fafc !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    font-variant-numeric: tabular-nums !important;
  }

  .bpm-step-btn {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    border-radius: 3px !important;
    font-size: 9px !important;
    flex: 0 0 16px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #334155 !important;
    border: 1px solid #475569 !important;
    color: #e2e8f0 !important;
    box-sizing: border-box !important;
  }

  .bpm-step-btn .btn-icon {
    font-size: 10px !important;
    line-height: 1 !important;
  }

  .bpm-step-btn .btn-label {
    display: none !important;
  }

  /* 移动端循环控制组 (紧跟 BPM 加减按钮) */
  .main-controls-row2 .loop-control-box {
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
    background: #1e293b !important;
    padding: 0 2px !important;
    height: 26px !important;
    min-height: 26px !important;
    border-radius: 5px !important;
    border: 1px solid #334155 !important;
    flex: 0 0 auto !important;
    box-sizing: border-box !important;
  }

  .main-controls-row2 #loopBtn {
    width: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    height: 22px !important;
    min-height: 22px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    flex: 0 0 22px !important;
  }

  .main-controls-row2 #loopBtn .btn-label {
    display: none !important;
  }

  .main-controls-row2 #loopBtn .btn-icon {
    font-size: 12px !important;
    margin: 0 !important;
  }

  .main-controls-row2 .loop-txt-prefix,
  .main-controls-row2 .loop-txt-suffix {
    display: none !important;
  }

  .main-controls-row2 #loopRangeInputs {
    display: inline-flex !important;
    align-items: center !important;
    gap: 1px !important;
    font-size: 9.5px !important;
    color: #94a3b8 !important;
  }

  .main-controls-row2 #loopStartBar,
  .main-controls-row2 #loopEndBar {
    width: 20px !important;
    height: 18px !important;
    font-size: 9.5px !important;
    padding: 0 !important;
    text-align: center !important;
    border-radius: 3px !important;
    background: #0f172a !important;
    color: #38bdf8 !important;
    font-weight: 700 !important;
    border: 1px solid #475569 !important;
    box-sizing: border-box !important;
  }

  /* 移动端 Swing 摇摆开关 (紧凑文字标签，便于直观识别) */
  .main-controls-row2 #swingBtn {
    width: auto !important;
    min-width: 46px !important;
    max-width: none !important;
    height: 26px !important;
    min-height: 26px !important;
    padding: 0 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 5px !important;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    gap: 2px !important;
  }

  .main-controls-row2 #swingBtn .btn-label {
    display: inline-block !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .main-controls-row2 #swingBtn .btn-icon {
    font-size: 11px !important;
    margin: 0 !important;
  }

  /* 移动端音色选择：紧随 Swing 开关，自适应占满剩余宽度，单行优雅裁切 */
  .main-controls-row2 #soundEngineSelect {
    height: 26px !important;
    min-height: 26px !important;
    font-size: 10px !important;
    line-height: 24px !important;
    flex: 1 1 0 !important;
    min-width: 65px !important;
    max-width: none !important;
    padding: 0 2px 0 4px !important;
    border-radius: 5px !important;
    background: #1e293b !important;
    border: 1px solid #0284c7 !important;
    color: #38bdf8 !important;
    font-weight: 600 !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  /* 移动端节拍器专区：开关图标与3项调节并列在同一行，紧凑小巧，零折行 */
  .metronome-hub-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    gap: 4px !important;
    height: 26px !important;
    min-height: 26px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .metronome-hub-row .metronome-ext-btn {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    height: 26px !important;
    min-height: 26px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 5px !important;
    flex: 0 0 28px !important;
    flex-shrink: 0 !important;
    background: #1e293b !important;
    border: 1px solid #475569 !important;
    color: #94a3b8 !important;
    box-sizing: border-box !important;
  }

  .metronome-hub-row .metronome-ext-btn.is-active {
    background: #0284c7 !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.5) !important;
  }

  .metronome-hub-row .metronome-ext-btn .btn-label {
    display: none !important;
  }

  .metronome-hub-row .metronome-ext-btn .btn-icon {
    font-size: 13px !important;
    line-height: 1 !important;
    margin: 0 !important;
  }

  .metronome-settings-panel {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: auto !important;
    height: 26px !important;
    min-height: 26px !important;
    padding: 0 !important;
    gap: 4px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
  }

  .metronome-settings-panel select {
    height: 26px !important;
    min-height: 26px !important;
    font-size: 10.5px !important;
    line-height: 24px !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: 33.3% !important;
    padding: 0 2px 0 4px !important;
    border-radius: 5px !important;
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #cbd5e1 !important;
    box-sizing: border-box !important;
  }

  .metronome-settings-panel.is-active select {
    border-color: rgba(56, 189, 248, 0.5) !important;
    color: #f1f5f9 !important;
  }

  /* ============================================================
   * 📊 手机端 演示 HUD 布局 (Mobile Demo HUD Layout)
   * 专注全宽展示当前待弹音符与建议指法，零横向溢出
   * ============================================================ */
  .hud-bar {
    padding: 5px 8px !important;
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    background: #0f172a !important;
    border-bottom: 1px solid rgba(56, 189, 248, 0.25) !important;
    box-sizing: border-box !important;
  }

  .hud-bar.is-hidden,
  body.is-hud-hidden .hud-bar {
    display: none !important;
  }

  /* 演示 HUD 目标卡片在手机端全宽通栏展示 */
  .hud-bar .target-card {
    width: 100% !important;
    flex: 1 1 100% !important;
    min-width: 0 !important;
    gap: 12px !important;
    background: rgba(30, 41, 59, 0.7) !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    border-radius: 8px !important;
    padding: 5px 12px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }

  .target-item-note {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    background: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(56, 189, 248, 0.4) !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
  }

  .target-item-note .target-badge {
    font-size: 8px !important;
    line-height: 1 !important;
    margin-bottom: 2px !important;
  }

  .target-item-note .target-val {
    font-size: 16px !important;
    line-height: 1 !important;
  }

  .target-item-fret {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .target-item-fret .target-badge {
    font-size: 10px !important;
    line-height: 1.2 !important;
  }

  .target-item-fret .target-fret {
    display: inline-block !important;
    margin-top: 2px !important;
    font-size: 12px !important;
    padding: 3px 8px !important;
    max-width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-sizing: border-box !important;
  }

  /* 手机端隐藏次要信息以防止拥挤和折行，保持清爽 */
  .target-item-duration,
  .target-item-technique,
  .target-item-chord {
    display: none !important;
  }

  /* ============================================================
   * 🎙️ 手机端 智能跟弹 HUD 布局 (Mobile Follow HUD Layout)
   * 双行弹性紧凑布局，零横向溢出，舒适触控热区
   * ============================================================ */
  .follow-hud-bar {
    padding: 6px 8px !important;
    background: #0b1329 !important;
    border-bottom: 2px solid rgba(56, 189, 248, 0.35) !important;
    box-sizing: border-box !important;
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .follow-hud-content {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 行 1: 开启跟弹、模式选择与收起按钮 */
  .follow-hud-ctrls {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .follow-hud-ctrls #listenBtn {
    height: 30px !important;
    padding: 0 8px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .follow-hud-ctrls .practice-mode-select {
    height: 30px !important;
    flex: 1 1 auto !important;
    min-width: 90px !important;
    max-width: 150px !important;
    font-size: 11px !important;
    padding: 0 4px !important;
  }

  .follow-hud-close-wrap {
    flex-shrink: 0 !important;
  }

  .btn-close-hud {
    height: 30px !important;
  }

  /* 行 2: 测音品位、微调标尺与命中统计 */
  .follow-hud-tuner {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 1 1 55% !important;
    min-width: 0 !important;
    padding: 4px 8px !important;
    box-sizing: border-box !important;
  }

  .follow-hud-tuner .pitch-display {
    width: 36px !important;
    height: 36px !important;
    flex-shrink: 0 !important;
  }

  .follow-hud-tuner .pitch-name {
    font-size: 14px !important;
  }

  .follow-hud-tuner .pitch-freq {
    font-size: 8px !important;
  }

  .follow-hud-tuner .tuner-fret-info {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  .follow-hud-tuner .hud-item-label {
    font-size: 9px !important;
  }

  .follow-hud-tuner .tuner-fret-val {
    font-size: 11px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .cents-gauge-wrap {
    width: 75px !important;
    flex-shrink: 0 !important;
  }

  .cents-gauge-header {
    font-size: 8.5px !important;
  }

  .cents-gauge-val {
    font-size: 10px !important;
  }

  .follow-hud-stats {
    display: flex !important;
    align-items: center !important;
    justify-content: space-around !important;
    gap: 8px !important;
    flex: 1 1 35% !important;
    padding: 4px 6px !important;
    box-sizing: border-box !important;
  }

  .follow-hud-stats .stat-title {
    font-size: 9px !important;
  }

  .follow-hud-stats .stat-value {
    font-size: 12px !important;
  }

  /* ============================================================
   * 🎶 手机端 智能伴奏控制台 (Mobile Accompaniment Bar)
   * 零横向溢出防御，紧凑单行/双行弹性排版，按键30px纯图标
   * ============================================================ */
  .accompaniment-bar {
    width: 100vw !important;
    max-width: 100vw !important;
    padding: 4px 6px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    background: #091326 !important;
    border-bottom: 2px solid #0284c7 !important;
  }

  .acc-bar-content {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .acc-bar-left {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .acc-badge {
    font-size: 9px !important;
    padding: 2px 4px !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .acc-track-title {
    font-size: 11px !important;
    max-width: 90px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: #38bdf8 !important;
  }

  .acc-time-display {
    font-size: 9px !important;
    padding: 1px 3px !important;
    white-space: nowrap !important;
  }

  .acc-bar-center {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
  }

  .acc-bar-right {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
  }

  .acc-vol-box {
    padding: 2px 4px !important;
    gap: 3px !important;
  }

  .acc-vol-slider {
    width: 40px !important;
  }

  .acc-vol-label {
    display: none !important;
  }

  .acc-offset-box {
    padding: 2px 4px !important;
    gap: 2px !important;
  }

  .acc-offset-val {
    font-size: 9px !important;
    min-width: 22px !important;
  }

  /* 手机端横屏放置引导提示 (默认隐藏，仅在开启指板时通过 active 类或 JS 唤出) */
  .mobile-orient-tip {
    display: none;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, rgba(2, 132, 199, 0.2), rgba(245, 158, 11, 0.2));
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 6px;
    margin: 2px 6px;
    padding: 3px 8px;
    font-size: 10.5px;
    color: #f8fafc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }

  .mobile-orient-tip.is-active {
    display: flex !important;
  }

  .orient-tip-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
  }

  /* 虚拟指板在手机竖屏下的平滑手势横移与紧凑显示 */
  .fretboard-section {
    padding: 0;
  }

  .fretboard-header {
    display: none; /* 竖屏下隐藏多行指板图例说明，最大化视口空间 */
  }

  .fretboard-container {
    height: 80px;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .frets-wrapper {
    min-width: 620px; /* 保证手机竖屏下手势横划可精准触控 18 品琴格 */
  }

  /* 主乐谱视口自适应缩放 (消灭一切右侧截断和裁切) */
  .main-viewport {
    padding: 4px 0 60px 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box;
  }

  .score-paper-wrapper {
    width: 100vw !important;
    max-width: 100vw !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
  }

  .score-paper-wrapper.dual-page-layout .score-paper-preview {
    display: none !important; /* 竖屏单页模式沉浸排版 */
  }

  .score-paper-wrapper .score-paper {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 8px 6px 60px 6px !important;
    box-shadow: none !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
  }

  #alphaTabContainer {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box;
  }

  #alphaTabContainer svg {
    max-width: 100% !important;
    height: auto !important;
  }

  /* 底部状态栏极简单行化 (收窄至 26px) */
  .statusbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 26px;
    min-height: 26px;
    padding: 2px 10px;
    font-size: 11px;
    padding-bottom: max(2px, env(safe-area-inset-bottom));
  }

  .statusbar-promo-text,
  .statusbar-extra {
    display: none !important; /* 移动端隐去版权文字与环境框，环境移入设置抽屉 */
  }

  /* ============================================================
   * 移动端底部半屏抽屉面板与遮罩 (Mobile Settings Bottom Sheet)
   * ============================================================ */
  .mobile-drawer-backdrop {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .mobile-drawer-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  /* 移动端覆盖：从底部滑出 Bottom Sheet 规格 */
  .mobile-drawer-sheet {
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: auto !important;
    max-height: 84vh !important;
    border-left: none !important;
    border-top: 2px solid #38bdf8 !important;
    border-radius: 16px 16px 0 0 !important;
    transform: translateY(105%) !important;
  }

  .mobile-drawer-sheet.is-open {
    transform: translateY(0) !important;
  }

  /* 抽屉内所有控件流式铺满、触控大按键 */
  .mobile-drawer-sheet .desktop-row1-tools,
  .mobile-drawer-sheet .desktop-row1-views,
  .mobile-drawer-sheet .desktop-row2-settings {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .mobile-drawer-sheet select,
  .mobile-drawer-sheet .btn {
    flex: 1 1 calc(50% - 8px) !important;
    min-height: 40px !important;
    height: 40px !important;
    font-size: 12px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
  }

  .mobile-drawer-sheet .loop-control-box {
    flex: 1 1 100% !important;
    height: 40px !important;
    justify-content: space-between !important;
  }

  .mobile-drawer-sheet .metronome-hub-partition {
    flex: 1 1 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    padding: 8px !important;
  }

  .mobile-drawer-sheet .metronome-hub-partition select,
  .mobile-drawer-sheet .metronome-hub-partition .btn {
    flex: 1 1 calc(50% - 6px) !important;
  }

  .mobile-drawer-sheet .env-control-box {
    width: 100% !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
  }

  .mobile-drawer-sheet .env-control-box select {
    flex: 1 !important;
    height: 34px !important;
  }


  /* 交互式修谱弹窗移动端自适应与单行曲谱并列布局 */
  .score-editor-popover,
  .score-editor-popover.docked-right {
    position: fixed !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: calc(100vw - 16px) !important;
    top: auto !important;
    bottom: 8px !important;
    max-height: 72vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
    z-index: 10000 !important;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.85), 0 0 20px rgba(56, 189, 248, 0.3) !important;
  }
  .score-editor-popover #editorDockBtn {
    display: none !important;
  }
  .score-editor-popover .editor-btn-group {
    flex-wrap: wrap !important;
  }
  .score-editor-popover .fret-quick-group {
    max-width: 100% !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    padding-bottom: 2px !important;
  }

  /* 移动端进入修谱模式专属布局：工作台收归底部，上方乐谱区收窄并精准展示单行曲谱，彻底杜绝遮挡 */
  body.is-score-editing .fretboard-section,
  body.is-score-editing .statusbar,
  body.is-score-editing #tunerDashboard {
    display: none !important;
  }

  body.is-score-editing .main-viewport {
    flex: 0 0 140px !important;
    height: 140px !important;
    min-height: 140px !important;
    max-height: 140px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 6px 4px !important;
    border-bottom: 2px solid #0284c7 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    z-index: 10 !important;
    box-sizing: border-box !important;
  }

  body.is-score-editing .score-paper-wrapper .score-paper {
    padding: 4px 4px 80px 4px !important;
  }

  body.is-score-editing .score-editor-popover,
  body.is-score-editing .score-editor-popover.docked-right {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: 100vw !important;
    max-width: 100vw !important;
    flex: 1 1 0 !important;
    height: auto !important;
    max-height: none !important;
    border-radius: 14px 14px 0 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    border-top: 2px solid #38bdf8 !important;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.6) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    z-index: 1000 !important;
    margin: 0 !important;
    padding: 8px 10px 14px 10px !important;
    box-sizing: border-box !important;
  }

  body.is-score-editing .score-editor-popover .editor-header {
    margin-bottom: 6px !important;
    padding-bottom: 4px !important;
    flex-shrink: 0 !important;
    cursor: default !important;
  }

  body.is-score-editing .score-editor-popover .editor-body {
    flex: 1 1 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-right: 2px !important;
  }

  /* 移动端弹窗规范 (375px~390px 坚固防御，底部抽屉式，满幅触控，零横向溢出) */
  .omr-modal-backdrop {
    padding: 0 !important;
    align-items: flex-end !important;
  }

  .omr-modal-dialog {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 94vh !important;
    max-height: 94vh !important;
    border-radius: 14px 14px 0 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
  }

  .omr-modal-dialog.modal-dialog-compact {
    width: 100vw !important;
    max-width: 100vw !important;
    height: auto !important;
    max-height: 94vh !important;
    border-radius: 14px 14px 0 0 !important;
  }

  .omr-modal-header {
    padding: 8px 12px !important;
  }

  .omr-modal-body {
    padding: 8px 10px !important;
    gap: 7px !important;
  }

  .omr-modal-footer {
    padding: 8px 10px !important;
    flex-direction: column !important;
    gap: 6px !important;
  }

  /* 仅隐藏底部辅助提示文本 span，严格保留操作按钮内部的图标与文字标签 (.btn-icon 与 .btn-label) */
  .omr-modal-footer > span {
    display: none !important;
  }

  .omr-modal-footer .btn .btn-label,
  .omr-modal-footer .btn .btn-icon,
  .omr-modal-footer .btn-primary .btn-label,
  .omr-modal-footer .btn-primary .btn-icon {
    display: inline-flex !important;
    align-items: center !important;
  }

  /* 移动端触屏输入工效学与 WebKit 16px 防缩放防御 */
  .modal-input,
  .omr-modal-body input[type="text"],
  .omr-modal-body input[type="password"],
  .omr-modal-body input[type="number"],
  .omr-modal-body select.select {
    height: 40px !important;
    font-size: 16px !important; /* 彻底根除 iOS/Chrome 聚焦输入自动放大页面破屏 */
    padding: 0 12px !important;
  }

  .modal-textarea,
  .omr-modal-body textarea.select {
    min-height: 115px !important;
    height: 125px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    padding: 10px 12px !important;
  }

  .omr-modal-body .btn-secondary {
    height: 32px !important;
    font-size: 12px !important;
    padding: 0 10px !important;
  }

  .omr-modal-footer .btn-primary {
    width: 100% !important;
    height: 42px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    justify-content: center !important;
  }
}

/* 3. 手机横屏模式专项强化与零遮挡防御 (@media orientation: landscape) */
@media screen and (max-height: 520px) and (orientation: landscape) {
  .mobile-orient-tip,
  .mobile-orient-tip.is-active {
    display: none !important;
  }

  .studio-header {
    padding: 2px 8px !important;
    gap: 2px !important;
    height: auto !important;
    min-height: auto !important;
  }

  /* 第 1 行：品牌 + 曲目选择 + [📁][➕][✏️] + [⚙️]，单行流式铺满，绝不折行 */
  .header-row.row-top {
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 4px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
  }

  /* 第 2 行：演奏控制与节拍器并列在单行内，支持平滑横向滚动，彻底杜绝向下溢出叠层 */
  .header-row.row-bottom {
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 4px !important;
    background: transparent !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    gap: 8px !important;
  }
  .header-row.row-bottom::-webkit-scrollbar {
    display: none !important;
  }

  .main-controls-row2 {
    flex: 0 0 auto !important;
    width: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    height: 28px !important;
    overflow: visible !important;
  }

  .metronome-hub-row {
    flex: 0 0 auto !important;
    width: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    height: 28px !important;
    overflow: visible !important;
  }

  /* 横屏下抽屉转为右侧滑入，高 100vh，宽 320px，避免底部抽屉在矮屏幕下直接遮蔽乐谱无法操作 */
  .mobile-drawer-sheet {
    top: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    right: 0 !important;
    width: 320px !important;
    max-width: 85vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 12px 0 0 12px !important;
    border-left: 2px solid #38bdf8 !important;
    border-top: none !important;
    transform: translateX(105%) !important;
  }

  .mobile-drawer-sheet.is-open {
    transform: translateX(0) !important;
  }

  .fretboard-header {
    display: none !important;
  }

  .fretboard-container {
    height: 64px !important;
  }

  .score-paper-wrapper .score-paper {
    padding: 6px 12px !important;
  }

  /* 状态栏单行极简防撞保护 */
  .statusbar {
    height: 22px !important;
    min-height: 22px !important;
    padding: 1px 8px !important;
    font-size: 10px !important;
  }

  .statusbar-promo-text,
  .statusbar-extra {
    display: none !important;
  }
}

/* ==========================================================================
   AI 算力通道排队与状态指示灯体系 (AI Queue & Concurrency Indicator)
   ========================================================================== */
.ai-queue-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 6px;
  padding: 5px 10px;
  margin-bottom: 10px;
  font-size: 11px;
  color: #cbd5e1;
  box-sizing: border-box;
}

.ai-queue-status-bar .queue-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-queue-status-bar .queue-light {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 9px;
  display: inline-block;
  transition: all 0.3s ease;
}

/* 🟢 就绪态 */
.ai-queue-status-bar .queue-light.light-ready {
  background-color: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

/* 🟡 排队中 (呼吸慢闪) */
.ai-queue-status-bar .queue-light.light-queued {
  background-color: #eab308;
  box-shadow: 0 0 10px #eab308;
  animation: queuePulse 1.4s ease-in-out infinite alternate;
}

/* 🔵 运算中 (快速脉动) */
.ai-queue-status-bar .queue-light.light-running {
  background-color: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  animation: queueRunning 0.9s ease-in-out infinite alternate;
}

/* 🔴 限流锁定中 */
.ai-queue-status-bar .queue-light.light-limited {
  background-color: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: queueLimited 1s ease infinite;
}

.ai-queue-status-bar .queue-env-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
}

.ai-queue-status-bar .queue-env-badge.badge-release {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.ai-queue-status-bar .queue-env-badge.badge-dev {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.3);
}

@keyframes queuePulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.2); opacity: 1; }
}

@keyframes queueRunning {
  0% { transform: scale(0.85); box-shadow: 0 0 4px #0284c7; }
  100% { transform: scale(1.25); box-shadow: 0 0 14px #38bdf8; }
}

@keyframes queueLimited {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ==========================================================================
   📖 WhatMusic 功能指引与帮助中心样式 (Help Guide & Manual Modal)
   ========================================================================== */

/* 桌面端帮助按钮 */
#desktopHelpBtn {
  background: #1e293b;
  border: 1px solid #38bdf8;
  color: #38bdf8;
  font-weight: 700;
  transition: all 0.2s ease;
}

#desktopHelpBtn:hover {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

/* 抽屉头部帮助按钮 */
.drawer-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-width: 28px;
  max-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drawer-help-btn .btn-label {
  display: none !important;
}

.drawer-help-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
}

/* 抽屉底部完整帮助手册按钮 (默认与科技暗黑) */
#drawerAboutHelpBtn {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  transition: all 0.2s ease;
}

#drawerAboutHelpBtn:hover {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

/* 帮助弹窗遮罩 */
.help-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10002;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  box-sizing: border-box;
}

/* 帮助弹窗主体对话框 */
.help-modal-dialog {
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 14px;
  width: 880px;
  max-width: min(95vw, 900px);
  height: 88vh;
  max-height: min(88vh, 880px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 20px rgba(56, 189, 248, 0.12);
  overflow: hidden;
  box-sizing: border-box;
  animation: helpModalPop 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes helpModalPop {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* 帮助弹窗头部 */
.help-modal-header {
  flex: 0 0 auto;
  padding: 12px 18px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.help-modal-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.help-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.2px;
}

.help-modal-subtitle {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

.help-modal-close-btn {
  background: #334155;
  border: 1px solid #475569;
  color: #cbd5e1;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.help-modal-close-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

/* 模块顶部快速导航胶囊栏 */
.help-nav-tabs {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #141f32;
  border-bottom: 1px solid #293548;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.help-nav-tabs::-webkit-scrollbar {
  display: none;
}

.help-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 9999px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.help-tab-btn:hover {
  color: #e2e8f0;
  border-color: #475569;
  background: #253349;
}

.help-tab-btn.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
}

/* 帮助弹窗可滚动主体区 */
.help-modal-body {
  flex: 1 1 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  box-sizing: border-box;
}

/* 模块卡片 */
.help-module-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s;
}

.help-module-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
}

.help-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.help-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 6px;
}

.help-card-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* 矢量配图展示框 */
.help-illustration-box {
  background: #090d16;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 12px;
  margin: 10px 0 14px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.help-illustration-box svg {
  width: 100%;
  max-width: 680px;
  height: auto;
  display: block;
}

/* 功能点与特性列表 */
.help-feature-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.help-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.55;
}

.help-feature-item .item-icon {
  flex-shrink: 0;
  font-size: 13px;
  margin-top: 2px;
}

.help-feature-item strong {
  color: #38bdf8;
  font-weight: 700;
}

/* 快捷键速查网格 */
.help-shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
}

.help-shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #94a3b8;
}

.help-kbd {
  display: inline-block;
  background: #1e293b;
  border: 1px solid #475569;
  border-bottom: 2px solid #334155;
  border-radius: 4px;
  padding: 1px 6px;
  font-family: monospace;
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
}

/* 提示与高阶建议胶囊 */
.help-tip-box {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(14, 165, 233, 0.08);
  border-left: 3px solid #38bdf8;
  border-radius: 0 8px 8px 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
}

.help-tip-box strong {
  color: #f8fafc;
}

/* 移动端 (<=768px) 极致紧凑响应式防御 */
@media screen and (max-width: 768px) {
  .help-modal-backdrop {
    padding: 0 !important;
    align-items: flex-end !important;
  }

  .help-modal-dialog {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 92vh !important;
    max-height: 92vh !important;
    border-radius: 16px 16px 0 0 !important;
    border-bottom: none !important;
  }

  .help-modal-header {
    padding: 10px 14px !important;
  }

  .help-modal-title {
    font-size: 14px !important;
  }

  .help-modal-subtitle {
    display: none !important;
  }

  .help-nav-tabs {
    padding: 6px 10px !important;
    gap: 4px !important;
  }

  .help-tab-btn {
    height: 26px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
  }

  .help-modal-body {
    padding: 12px 10px !important;
    gap: 16px !important;
  }

  .help-module-card {
    padding: 12px 10px !important;
    border-radius: 10px !important;
  }

  .help-card-title {
    font-size: 13px !important;
  }

  .help-card-badge {
    font-size: 10px !important;
    padding: 1px 6px !important;
  }

  .help-illustration-box {
    padding: 8px 4px !important;
    margin: 8px 0 !important;
  }

  .help-feature-item {
    font-size: 12px !important;
    line-height: 1.5 !important;
  }

  .help-shortcuts-grid {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    padding: 8px !important;
  }
}



