/* css/score.css — 曲谱搜索 / 查看器 / 识别结果样式（score-llm 所有） */
/* v3 霓虹主题（契约 §20.2）：只使用 css/base.css 变量与霓虹 rgba。
   语义：AI/曲谱 = 紫（--neon-purple）；左手/和弦 = 青（--left-hand）；
        右手/节奏/前奏 = 品红（--right-hand）；成功 = 青绿（--success）；失败 = 品红/红。 */

/* ------------------------------- 整体布局 ------------------------------- */

#score-area > .score-panel,
.score-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  color: var(--text);
  position: relative;
}

/* -------------------------------- 搜索条 -------------------------------- */

.score-search {
  flex: 0 0 auto;
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(166, 121, 255, 0.18);
  display: flex;
  flex-direction: column;
  gap: 7px;
  background:
    radial-gradient(420px 120px at 0% 0%, rgba(166, 121, 255, 0.12), transparent 70%),
    linear-gradient(180deg, var(--panel), transparent);
  position: relative;
}
.score-search::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(166, 121, 255, 0.65), rgba(34, 245, 255, 0.5), transparent);
  opacity: 0.75;
}

/* 已有曲谱内容后：收起标题/示例，把高度留给查看器与识别结果 */
.score-panel.is-compact .score-search { padding: 6px 12px; }
.score-panel.is-compact .score-search-head,
.score-panel.is-compact .score-chips { display: none; }

.score-search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.score-search-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.6px;
  background: linear-gradient(92deg, var(--neon-cyan), var(--neon-purple) 55%, var(--neon-magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 8px rgba(166, 121, 255, 0.4));
}

.score-search-icon {
  font-size: 15px;
  color: var(--neon-cyan);
  filter: drop-shadow(0 0 7px rgba(34, 245, 255, 0.65));
}

.score-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* 模型标签：AI 紫霓虹 */
.score-model-chip {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text);
  background: linear-gradient(100deg, rgba(166, 121, 255, 0.2), rgba(34, 245, 255, 0.08));
  border: 1px solid rgba(166, 121, 255, 0.55);
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
  box-shadow: 0 0 12px rgba(166, 121, 255, 0.28), inset 0 0 8px rgba(166, 121, 255, 0.1);
  text-shadow: 0 0 8px rgba(166, 121, 255, 0.55);
  animation: score-chip-glow 3.6s ease-in-out infinite;
}

@keyframes score-chip-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(166, 121, 255, 0.24), inset 0 0 8px rgba(166, 121, 255, 0.08); }
  50% { box-shadow: 0 0 18px rgba(166, 121, 255, 0.46), 0 0 26px rgba(34, 245, 255, 0.16), inset 0 0 10px rgba(166, 121, 255, 0.14); }
}

.score-config-hint {
  font-size: 11px;
  color: var(--warn);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 8px rgba(255, 196, 107, 0.45);
}

.score-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-input {
  flex: 1 1 auto;
  height: 32px;
  font-size: 13px;
}

/* 曲谱搜索属于 AI 区，聚焦光效使用紫色霓虹 */
.score-input:focus {
  border-color: rgba(166, 121, 255, 0.85);
  box-shadow: 0 0 0 2px rgba(166, 121, 255, 0.16), 0 0 16px rgba(166, 121, 255, 0.26);
}
.score-input::placeholder { color: var(--muted); }

.score-search-btn {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 16px;
  box-shadow: 0 0 12px rgba(34, 245, 255, 0.28), 0 0 24px rgba(166, 121, 255, 0.18);
}

.score-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.score-chips-label {
  font-size: 11px;
  color: var(--muted);
}

.score-chip {
  font-family: inherit;
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(166, 121, 255, 0.1);
  border: 1px solid rgba(166, 121, 255, 0.36);
  border-radius: 999px;
  padding: 2px 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.score-chip:hover {
  color: var(--text);
  background: rgba(34, 245, 255, 0.1);
  border-color: rgba(34, 245, 255, 0.66);
  box-shadow: 0 0 12px rgba(34, 245, 255, 0.24);
}

/* ------------------------------ 状态提示行 ------------------------------ */

.score-status-row {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-soft);
  min-height: 30px;
  background: linear-gradient(180deg, rgba(5, 10, 20, 0.5), transparent);
}

.score-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex: 0 0 auto;
}
.score-status-dot.is-searching,
.score-status-dot.is-recognizing {
  background: var(--neon-purple);
  box-shadow: 0 0 8px rgba(166, 121, 255, 0.9), 0 0 16px rgba(166, 121, 255, 0.4);
  animation: score-pulse 1.1s ease-in-out infinite;
}
.score-status-dot.is-ready {
  background: var(--left-hand);
  box-shadow: 0 0 8px rgba(34, 245, 255, 0.9), 0 0 16px rgba(34, 245, 255, 0.35);
}
.score-status-dot.is-recognized {
  background: var(--success);
  box-shadow: 0 0 8px rgba(77, 255, 176, 0.9), 0 0 16px rgba(77, 255, 176, 0.4);
}
.score-status-dot.is-failed,
.score-status-dot.is-error {
  background: var(--danger);
  box-shadow: 0 0 8px rgba(255, 77, 109, 0.9), 0 0 16px rgba(255, 77, 109, 0.4);
}

@keyframes score-pulse {
  0%, 100% { opacity: 1; filter: brightness(1); }
  50% { opacity: 0.5; filter: brightness(1.5); }
}

.score-status-text {
  white-space: nowrap;
  color: var(--text);
  text-shadow: 0 0 10px rgba(34, 245, 255, 0.14);
}

.score-progress {
  color: var(--muted);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.score-spacer { flex: 1 1 auto; }

/* --------------------------------- Tabs --------------------------------- */

.score-tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 2px;
  padding: 4px 12px 0;
  border-bottom: 1px solid rgba(166, 121, 255, 0.22);
  position: relative;
}

.score-tab {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 6px 14px 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.score-tab:hover {
  color: var(--text);
  background: rgba(166, 121, 255, 0.08);
}

.score-tab.is-active {
  color: var(--text);
  background: linear-gradient(180deg, rgba(166, 121, 255, 0.2), rgba(166, 121, 255, 0.04));
  border-color: rgba(166, 121, 255, 0.38);
  text-shadow: 0 0 10px rgba(166, 121, 255, 0.55);
}

.score-tab.is-active::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--left-hand), var(--neon-purple), var(--right-hand));
  box-shadow: 0 0 10px rgba(166, 121, 255, 0.7), 0 0 18px rgba(34, 245, 255, 0.25);
}

.score-tab-badge {
  font-family: var(--mono);
  font-size: 10px;
  min-width: 16px;
  text-align: center;
  color: var(--muted);
  background: rgba(4, 9, 18, 0.8);
  border: 1px solid rgba(120, 170, 255, 0.16);
  border-radius: 999px;
  padding: 0 5px;
  line-height: 15px;
}
.score-tab-badge.is-ok {
  color: var(--success);
  background: rgba(77, 255, 176, 0.12);
  border-color: rgba(77, 255, 176, 0.42);
  box-shadow: 0 0 8px rgba(77, 255, 176, 0.28);
  text-shadow: 0 0 8px rgba(77, 255, 176, 0.55);
}
.score-tab-badge.is-warn {
  color: var(--warn);
  background: rgba(255, 196, 107, 0.12);
  border-color: rgba(255, 196, 107, 0.42);
  box-shadow: 0 0 8px rgba(255, 196, 107, 0.24);
  text-shadow: 0 0 8px rgba(255, 196, 107, 0.5);
}

/* ------------------------------- 内容区域 ------------------------------- */

.score-view {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* --------------------------------- Banner -------------------------------- */

.score-banner {
  flex: 0 0 auto;
  margin: 8px 12px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px 9px 14px;
  border-radius: 10px;
  border: 1px solid rgba(166, 121, 255, 0.3);
  background: linear-gradient(100deg, rgba(166, 121, 255, 0.1), rgba(9, 14, 27, 0.86) 62%);
  box-shadow: inset 0 0 18px rgba(166, 121, 255, 0.05);
  font-size: 12px;
  line-height: 1.55;
  position: relative;
  overflow: hidden;
}
.score-banner::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--neon-cyan), var(--neon-purple), var(--neon-magenta));
  box-shadow: 0 0 12px rgba(166, 121, 255, 0.6);
}

/* 识别成功：青绿霓虹 */
.score-banner-success {
  border-color: rgba(77, 255, 176, 0.52);
  background: linear-gradient(100deg, rgba(77, 255, 176, 0.16), rgba(34, 245, 255, 0.07) 58%, rgba(9, 14, 27, 0.88));
  box-shadow: 0 0 20px rgba(77, 255, 176, 0.16), inset 0 0 20px rgba(34, 245, 255, 0.05);
}
.score-banner-success::before {
  background: linear-gradient(180deg, var(--success), var(--left-hand));
  box-shadow: 0 0 14px rgba(77, 255, 176, 0.75);
}
.score-banner-success .score-banner-title {
  color: var(--success);
  text-shadow: 0 0 10px rgba(77, 255, 176, 0.55);
}

/* 识别失败/警告：品红-红霓虹 */
.score-banner-warn {
  border-color: rgba(255, 62, 232, 0.48);
  background: linear-gradient(100deg, rgba(255, 62, 232, 0.14), rgba(255, 77, 109, 0.09) 60%, rgba(9, 14, 27, 0.9));
  box-shadow: 0 0 20px rgba(255, 62, 232, 0.16), inset 0 0 20px rgba(255, 77, 109, 0.05);
}
.score-banner-warn::before {
  background: linear-gradient(180deg, var(--neon-magenta), var(--danger));
  box-shadow: 0 0 14px rgba(255, 62, 232, 0.7);
}
.score-banner-warn .score-banner-title {
  color: var(--neon-magenta);
  text-shadow: 0 0 10px rgba(255, 62, 232, 0.55);
}

.score-banner-icon {
  font-size: 15px;
  line-height: 1.3;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 8px rgba(166, 121, 255, 0.55));
}
.score-banner-success .score-banner-icon { filter: drop-shadow(0 0 8px rgba(77, 255, 176, 0.7)); }
.score-banner-warn .score-banner-icon { filter: drop-shadow(0 0 8px rgba(255, 62, 232, 0.7)); }
.score-banner-main { flex: 1 1 auto; min-width: 0; }
.score-banner-title {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
  text-shadow: 0 0 10px rgba(166, 121, 255, 0.35);
}
.score-banner-text { color: var(--text-dim); word-break: break-word; }
.score-banner-actions { flex: 0 0 auto; display: flex; gap: 6px; align-items: center; }

/* ----------------------------- 加载 / 空状态 ----------------------------- */

.score-loading,
.score-empty {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 18px;
  text-align: center;
  position: relative;
}

.score-spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid rgba(166, 121, 255, 0.2);
  border-top-color: var(--neon-cyan);
  border-right-color: var(--neon-magenta);
  box-shadow: 0 0 14px rgba(34, 245, 255, 0.28), inset 0 0 8px rgba(166, 121, 255, 0.2);
  animation: score-spin 0.9s linear infinite;
}

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

.score-loading-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-shadow: 0 0 10px rgba(34, 245, 255, 0.3);
}
.score-loading-sub { font-size: 12px; color: var(--muted); }

.score-skeleton { width: min(420px, 82%); display: flex; flex-direction: column; gap: 7px; margin-top: 8px; }
.score-skeleton-line {
  height: 9px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    rgba(34, 245, 255, 0.08),
    rgba(166, 121, 255, 0.24),
    rgba(255, 62, 232, 0.12),
    rgba(34, 245, 255, 0.08)
  );
  background-size: 220% 100%;
  box-shadow: inset 0 0 8px rgba(166, 121, 255, 0.08);
  animation: score-shimmer 1.5s ease-in-out infinite;
}
.score-skeleton-line.w80 { width: 80%; }
.score-skeleton-line.w70 { width: 70%; }
.score-skeleton-line.w60 { width: 60%; }

@keyframes score-shimmer {
  0% { background-position: 0% 0; }
  100% { background-position: -220% 0; }
}

.score-empty-icon {
  font-size: 38px;
  filter: drop-shadow(0 0 14px rgba(34, 245, 255, 0.4)) drop-shadow(0 0 22px rgba(255, 62, 232, 0.18));
}
.score-empty-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(92deg, var(--neon-cyan), var(--neon-purple) 60%, var(--neon-magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(166, 121, 255, 0.35));
}
.score-empty-text {
  max-width: 520px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-dim);
}
.score-empty-list {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: var(--muted);
}
.score-empty-list li::before { content: '· '; color: var(--neon-purple); text-shadow: 0 0 8px rgba(166, 121, 255, 0.6); }
.score-empty-error {
  margin-top: 6px;
  font-size: 12px;
  color: var(--neon-magenta);
  background: rgba(255, 62, 232, 0.08);
  border: 1px solid rgba(255, 62, 232, 0.42);
  border-radius: 8px;
  padding: 6px 12px;
  box-shadow: 0 0 14px rgba(255, 62, 232, 0.14);
  text-shadow: 0 0 8px rgba(255, 62, 232, 0.35);
}

/* ------------------------------- 原曲谱查看器 ----------------------------- */

.score-source {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px 12px;
}

.score-viewer-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 26px;
  flex-wrap: wrap;
}

.score-viewer-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 11.5px;
  color: var(--text-dim);
}
.score-viewer-meta {
  color: var(--text-dim);
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(34, 245, 255, 0.18);
}
.score-viewer-source {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}

.score-viewer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

/* 查看器模式按钮：激活态青霓虹 */
.score-viewer-actions .btn.is-active {
  color: var(--bg);
  background: linear-gradient(100deg, rgba(34, 245, 255, 0.92), var(--left-hand));
  border-color: rgba(34, 245, 255, 0.85);
  box-shadow: 0 0 14px rgba(34, 245, 255, 0.45);
  font-weight: 800;
}

.score-toolbar-divider {
  width: 1px;
  height: 16px;
  background: linear-gradient(180deg, transparent, rgba(34, 245, 255, 0.5), transparent);
  margin: 0 2px;
}

.score-pager-hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--neon-cyan);
  min-width: 58px;
  text-align: center;
  text-shadow: 0 0 8px rgba(34, 245, 255, 0.4);
}

.score-viewer {
  flex: 1 1 auto;
  min-height: 160px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 245, 255, 0.18);
  border-radius: 10px;
  background: var(--bg);
  box-shadow: inset 0 0 30px rgba(34, 245, 255, 0.05), 0 0 22px rgba(166, 121, 255, 0.1);
}

/* v2 P0-4：三种查看模式
   完整显示（默认，宽高双约束，整图可见、letterbox 留黑）
   适应宽度（长图按视口高度切片）
   1:1 原始尺寸（可滚动） */

.score-viewer.is-contain {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg);
  background-image:
    radial-gradient(520px 230px at 16% 10%, rgba(34, 245, 255, 0.12), transparent 64%),
    radial-gradient(560px 250px at 84% 90%, rgba(255, 62, 232, 0.1), transparent 64%),
    radial-gradient(640px 280px at 50% 50%, rgba(166, 121, 255, 0.08), transparent 72%),
    linear-gradient(rgba(34, 245, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(166, 121, 255, 0.035) 1px, transparent 1px);
  background-size: auto, auto, auto, 44px 44px, 44px 44px;
}

.score-viewer.is-width {
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--bg);
}

.score-viewer.is-actual {
  overflow: auto;
  background: var(--bg);
}

.score-viewer-box {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 160px;
  overflow: hidden;
}

.score-viewer.is-contain .score-viewer-box,
.score-viewer.is-actual .score-viewer-box {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.score-viewer.is-contain .score-viewer-box { width: 100%; height: 100%; }

.score-viewer-img {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  height: auto;
  display: block;
  user-select: none;
  pointer-events: none;
  /* 曲谱图片内容需要白底（识别/阅读），不是主题色 */
  background: #fff;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.55), 0 0 26px rgba(34, 245, 255, 0.16);
}

.score-viewer.is-contain .score-viewer-img,
.score-viewer.is-actual .score-viewer-img {
  position: static;
  flex: 0 0 auto;
  border-radius: 2px;
  border: 1px solid rgba(34, 245, 255, 0.22);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 26px rgba(34, 245, 255, 0.2), 0 0 42px rgba(166, 121, 255, 0.12);
}

.score-viewer-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  background: rgba(3, 7, 14, 0.6);
  backdrop-filter: blur(2px);
  pointer-events: none;
}

.score-viewer-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 12.5px;
  pointer-events: auto;
}
.score-viewer-error a {
  color: var(--neon-cyan);
  text-decoration: none;
  text-shadow: 0 0 8px rgba(34, 245, 255, 0.45);
}
.score-viewer-error a:hover { text-decoration: underline; }

.score-thumbs {
  flex: 0 0 auto;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 1px 4px;
  min-height: 64px;
}

.score-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 62px;
  padding: 0;
  border: 1px solid rgba(166, 121, 255, 0.28);
  border-radius: 7px;
  background: var(--panel-2);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}

.score-thumb:hover {
  border-color: rgba(34, 245, 255, 0.7);
  box-shadow: 0 0 12px rgba(34, 245, 255, 0.28);
  transform: translateY(-1px);
}
.score-thumb.is-active {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 1px rgba(34, 245, 255, 0.75), 0 0 16px rgba(34, 245, 255, 0.5), 0 0 26px rgba(166, 121, 255, 0.22);
}

.score-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.86;
  background: #fff; /* 部分曲谱 PNG 背景透明，缩略图需白底才看得清 */
  transition: opacity 0.15s;
}
.score-thumb.is-active .score-thumb-img { opacity: 1; }

.score-thumb.is-broken .score-thumb-img { display: none; }
.score-thumb.is-broken::after {
  content: '✕';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--danger);
  font-size: 16px;
  background: rgba(255, 77, 109, 0.08);
  text-shadow: 0 0 10px rgba(255, 77, 109, 0.7);
}

.score-thumb-index {
  position: absolute;
  right: 2px;
  bottom: 1px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 800;
  color: var(--bg);
  background: linear-gradient(100deg, var(--neon-cyan), var(--neon-purple));
  border-radius: 4px;
  padding: 0 4px;
  line-height: 12px;
  box-shadow: 0 0 8px rgba(34, 245, 255, 0.45);
}

/* ------------------------------- 网页结果 ------------------------------- */

.score-web {
  flex: 0 0 auto;
  max-height: 34%;
  overflow: auto;
  margin: 0 12px 8px;
  border: 1px solid rgba(166, 121, 255, 0.22);
  border-radius: 9px;
  background: rgba(9, 14, 27, 0.66);
  box-shadow: inset 0 0 18px rgba(166, 121, 255, 0.05);
  font-size: 12px;
}

.score-web-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--text-dim);
  font-weight: 600;
  user-select: none;
}
.score-web-summary:hover { color: var(--text); text-shadow: 0 0 10px rgba(34, 245, 255, 0.3); }
.score-web-hint { font-weight: 400; font-size: 11px; color: var(--muted); }

.score-web-list {
  margin: 0;
  padding: 0 10px 8px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.score-web-link {
  color: var(--neon-cyan);
  text-decoration: none;
  font-size: 12px;
  word-break: break-all;
  transition: text-shadow 0.15s;
}
.score-web-link:hover {
  text-decoration: underline;
  text-shadow: 0 0 10px rgba(34, 245, 255, 0.55);
}

.score-web-snippet {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  margin-top: 1px;
}

/* ------------------------------ 识别结果视图 ------------------------------ */

.score-result {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 8px 12px 12px;
}

.score-result .score-banner { margin: 0; }

.score-info-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.score-info-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  background: linear-gradient(180deg, rgba(16, 29, 51, 0.85), rgba(6, 11, 22, 0.9));
  border: 1px solid rgba(34, 245, 255, 0.16);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11.5px;
  box-shadow: inset 0 0 10px rgba(34, 245, 255, 0.04);
}
.score-info-label { color: var(--muted); font-size: 10.5px; }
.score-info-value { color: var(--text); font-weight: 700; text-shadow: 0 0 8px rgba(34, 245, 255, 0.22); }

.score-confidence {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid rgba(166, 121, 255, 0.34);
  background: rgba(166, 121, 255, 0.1);
  color: var(--text-dim);
}
.score-confidence-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  flex: 0 0 auto;
}
.score-confidence.is-high {
  color: var(--success);
  border-color: rgba(77, 255, 176, 0.52);
  background: rgba(77, 255, 176, 0.1);
  box-shadow: 0 0 12px rgba(77, 255, 176, 0.18);
  text-shadow: 0 0 8px rgba(77, 255, 176, 0.5);
}
.score-confidence.is-high .score-confidence-dot {
  background: var(--success);
  box-shadow: 0 0 8px rgba(77, 255, 176, 0.9);
}
.score-confidence.is-mid {
  color: var(--warn);
  border-color: rgba(255, 196, 107, 0.5);
  background: rgba(255, 196, 107, 0.1);
  text-shadow: 0 0 8px rgba(255, 196, 107, 0.45);
}
.score-confidence.is-mid .score-confidence-dot {
  background: var(--warn);
  box-shadow: 0 0 8px rgba(255, 196, 107, 0.85);
}
.score-confidence.is-low {
  color: var(--danger);
  border-color: rgba(255, 77, 109, 0.5);
  background: rgba(255, 77, 109, 0.1);
  text-shadow: 0 0 8px rgba(255, 77, 109, 0.45);
}
.score-confidence.is-low .score-confidence-dot {
  background: var(--danger);
  box-shadow: 0 0 8px rgba(255, 77, 109, 0.85);
}

.score-result-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
  background: rgba(9, 16, 32, 0.62);
  border: 1px solid rgba(34, 245, 255, 0.14);
  border-radius: 8px;
  padding: 6px 10px;
  box-shadow: inset 0 0 12px rgba(34, 245, 255, 0.04);
}
.score-result-note.is-warn {
  color: var(--warn);
  border-color: rgba(255, 196, 107, 0.4);
  background: rgba(255, 196, 107, 0.07);
  box-shadow: inset 0 0 14px rgba(255, 196, 107, 0.06);
  text-shadow: 0 0 8px rgba(255, 196, 107, 0.25);
}
.score-result-note.is-warn .score-result-note-icon { filter: drop-shadow(0 0 8px rgba(255, 196, 107, 0.6)); }
.score-result-note-icon { flex: 0 0 auto; }

.score-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.score-section-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.score-section-label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
  text-shadow: 0 0 10px rgba(166, 121, 255, 0.3);
}
.score-section-label::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 12px;
  margin-right: 6px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--neon-purple), var(--neon-cyan));
  box-shadow: 0 0 8px rgba(166, 121, 255, 0.65);
  vertical-align: -1px;
}

.score-section-sub { font-size: 11px; color: var(--muted); }
.score-muted { font-size: 11.5px; color: var(--muted); line-height: 1.6; }

/* 和弦卡片横向滚动（左手主题：青霓虹） */

.score-chord-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
}

.score-chord-card {
  flex: 0 0 auto;
  width: 106px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 6px 5px;
  border: 1px solid rgba(34, 245, 255, 0.22);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(16, 29, 51, 0.92), rgba(6, 11, 22, 0.95));
  cursor: pointer;
  transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
}
.score-chord-card:hover {
  border-color: rgba(34, 245, 255, 0.78);
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(34, 245, 255, 0.28), 0 10px 22px rgba(0, 0, 0, 0.4);
}
.score-chord-card:active { transform: translateY(0); }
.score-chord-card.is-unresolved { opacity: 0.58; }
.score-chord-card.is-unresolved:hover { box-shadow: 0 0 12px rgba(166, 121, 255, 0.2); }
.score-chord-diagram {
  width: 92px;
  height: 106px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 20px;
  overflow: hidden;
}
.score-chord-diagram svg { max-width: 100%; max-height: 100%; height: auto; }
.score-chord-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.4px;
  text-shadow: 0 0 8px rgba(34, 245, 255, 0.3);
}

/* 节奏型网格容器（右手主题：品红霓虹） */

.score-rhythm-grid {
  overflow-x: auto;
  padding: 4px 2px 6px;
  background: linear-gradient(180deg, rgba(255, 62, 232, 0.07), rgba(6, 10, 20, 0.66));
  border: 1px solid rgba(255, 62, 232, 0.24);
  border-radius: 9px;
  min-height: 58px;
  box-shadow: inset 0 0 18px rgba(255, 62, 232, 0.06);
}
.score-rhythm-desc {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.4px;
}

/* v2 P1-3：前奏区块（右手特殊演奏：品红→紫） */

.score-intro .score-section-label::before {
  background: linear-gradient(180deg, var(--neon-magenta), var(--neon-purple));
  box-shadow: 0 0 8px rgba(255, 62, 232, 0.6);
}

.score-intro-notes {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.9;
  letter-spacing: 0.5px;
  color: var(--text);
  background: linear-gradient(100deg, rgba(255, 62, 232, 0.08), rgba(6, 10, 20, 0.6));
  border: 1px solid rgba(255, 62, 232, 0.26);
  border-radius: 9px;
  padding: 7px 11px;
  word-break: break-all;
  min-height: 34px;
  box-shadow: inset 0 0 16px rgba(255, 62, 232, 0.05);
  text-shadow: 0 0 8px rgba(255, 62, 232, 0.22);
}

/* 操作按钮 */

.score-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 2px;
}

/* 失败摘要 */

.score-failure-summary {
  margin: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.score-failure-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* 调试原始输出 */

.score-raw {
  border: 1px solid rgba(166, 121, 255, 0.18);
  border-radius: 8px;
  background: rgba(9, 14, 27, 0.66);
  font-size: 11.5px;
  color: var(--text-dim);
}
.score-raw summary {
  cursor: pointer;
  padding: 5px 10px;
  user-select: none;
  color: var(--muted);
  transition: color 0.15s, text-shadow 0.15s;
}
.score-raw summary:hover { color: var(--neon-cyan); text-shadow: 0 0 8px rgba(34, 245, 255, 0.4); }
.score-raw-pre {
  margin: 0;
  padding: 8px 10px;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-dim);
  border-top: 1px solid rgba(166, 121, 255, 0.16);
}
.score-warning-list {
  margin: 0;
  padding: 6px 10px 8px 26px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--warn);
  text-shadow: 0 0 8px rgba(255, 196, 107, 0.2);
}

/* --------------------------- v4：AI 功能解锁 --------------------------- */

.score-lock {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 14px;
}

.score-lock[hidden],
.score-unlocked[hidden] { display: none !important; }

.score-lock-card {
  width: min(540px, 94%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 18px;
  border: 1px solid rgba(166, 121, 255, 0.42);
  border-radius: 16px;
  background:
    radial-gradient(420px 200px at 12% 0%, rgba(34, 245, 255, 0.1), transparent 65%),
    radial-gradient(420px 200px at 90% 100%, rgba(255, 62, 232, 0.1), transparent 65%),
    linear-gradient(180deg, rgba(13, 21, 39, 0.94), rgba(5, 9, 18, 0.96));
  box-shadow: 0 0 30px rgba(166, 121, 255, 0.18), 0 18px 46px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}
.score-lock-card::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), var(--neon-magenta));
  box-shadow: 0 0 14px rgba(166, 121, 255, 0.6);
}

.score-lock-icon {
  font-size: 34px;
  line-height: 1;
  filter: drop-shadow(0 0 14px rgba(166, 121, 255, 0.55)) drop-shadow(0 0 22px rgba(34, 245, 255, 0.25));
}
.score-lock-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.6px;
  background: linear-gradient(92deg, var(--neon-cyan), var(--neon-purple) 55%, var(--neon-magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(166, 121, 255, 0.35));
}
.score-lock-sub {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.7;
}
.score-lock-label {
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.score-lock-question {
  padding: 10px 14px;
  border: 1px dashed rgba(34, 245, 255, 0.38);
  border-radius: 10px;
  background: rgba(34, 245, 255, 0.06);
  box-shadow: inset 0 0 16px rgba(34, 245, 255, 0.05);
  color: var(--text);
  font-size: 13px;
  line-height: 1.75;
  text-shadow: 0 0 10px rgba(34, 245, 255, 0.16);
}
.score-lock-form {
  display: flex;
  gap: 8px;
}
.score-lock-input {
  flex: 1 1 auto;
  height: 36px;
}
.score-lock-input:focus {
  border-color: rgba(166, 121, 255, 0.85);
  box-shadow: 0 0 0 2px rgba(166, 121, 255, 0.16), 0 0 16px rgba(166, 121, 255, 0.26);
}
.score-lock-submit {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 18px;
}
.score-lock-error {
  padding: 6px 10px;
  border: 1px solid rgba(255, 62, 232, 0.42);
  border-radius: 8px;
  background: rgba(255, 62, 232, 0.08);
  box-shadow: 0 0 14px rgba(255, 62, 232, 0.12);
  color: var(--neon-magenta);
  font-size: 12px;
  text-shadow: 0 0 8px rgba(255, 62, 232, 0.35);
}
.score-lock-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.score-panel.is-locked .score-lock { padding-top: 8px; }

/* 已解锁小按钮（搜索行右侧） */
.score-lock-toggle {
  flex: 0 0 auto;
  border-color: rgba(166, 121, 255, 0.5);
  color: var(--text-dim);
  white-space: nowrap;
}
.score-lock-toggle:hover {
  border-color: rgba(255, 62, 232, 0.7);
  color: var(--text);
  box-shadow: 0 0 12px rgba(255, 62, 232, 0.25);
}

@media (max-width: 640px) {
  .score-lock-form { flex-direction: column; }
  .score-lock-toggle { white-space: normal; }
}

/* ------------------------------- 响应式 -------------------------------- */

@media (max-width: 1280px) {
  .score-chord-card { width: 96px; }
  .score-chord-diagram { width: 84px; height: 98px; }
  .score-viewer-source { max-width: 180px; }
}

@media (max-width: 1080px) {
  #score-area { min-height: 460px; }
  .score-viewer { min-height: 240px; }
}

/* 深色滚动条（与 base.css 一致，横向滚动条更细，霓虹渐变） */
.score-chord-strip::-webkit-scrollbar,
.score-thumbs::-webkit-scrollbar,
.score-rhythm-grid::-webkit-scrollbar,
.score-web::-webkit-scrollbar { height: 7px; }
.score-chord-strip::-webkit-scrollbar-thumb,
.score-thumbs::-webkit-scrollbar-thumb,
.score-rhythm-grid::-webkit-scrollbar-thumb,
.score-web::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, rgba(34, 245, 255, 0.55), rgba(166, 121, 255, 0.5), rgba(255, 62, 232, 0.5));
  border-radius: 7px;
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  .score-model-chip { animation: none; }
  .score-status-dot.is-searching,
  .score-status-dot.is-recognizing { animation: none; }
  .score-skeleton-line { animation: none; }
}
