:root {
  --bg-app: #0b0e14;
  --bg-panel: #131823;
  --bg-panel-alt: #181f2e;
  --bg-elevated: #1e2638;
  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --gold: #f5b841;
  --gold-soft: rgba(245, 184, 65, 0.16);
  --cyan: #38bdf8;
  --cyan-soft: rgba(56, 189, 248, 0.16);
  --coral: #fb7185;
  --coral-soft: rgba(251, 113, 133, 0.16);
  --violet: #a78bfa;
  --violet-soft: rgba(167, 139, 250, 0.18);
  --emerald: #34d399;
  --emerald-soft: rgba(52, 211, 153, 0.16);

  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: radial-gradient(circle at 18% 12%, #172033 0%, #0b0e14 55%, #07090d 100%);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.45);
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.42);
}

.studio-app {
  max-width: 1580px;
  margin: 0 auto;
  padding: 12px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Header Bar */
.studio-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(19, 24, 35, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.header-primary-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.header-quick-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mobile-only {
  display: none;
}

.header-drawer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--gold), var(--cyan), var(--coral), var(--violet), var(--gold));
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-mark-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-panel);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--gold);
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
}

.song-title-input {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 2px 6px;
  margin-left: -6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  width: 200px;
  transition: border-color 0.15s, background 0.15s;
}
.song-title-input:hover,
.song-title-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
}

.header-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.control-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px 8px;
}

.control-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

.studio-select {
  background: #0f141e;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.studio-select:focus {
  outline: 1px solid var(--cyan);
}

.studio-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s, border-color 0.15s, transform 0.08s;
}
.studio-btn:hover {
  background: #27324a;
  border-color: var(--border-strong);
}
.studio-btn:active {
  transform: translateY(1px);
}
.studio-btn.is-active {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: var(--gold);
}
.studio-btn.is-cyan.is-active {
  background: var(--cyan-soft);
  border-color: var(--cyan);
  color: var(--cyan);
}
.studio-btn.is-primary {
  background: linear-gradient(135deg, #f5b841, #e09619);
  color: #0b0e14;
  border-color: transparent;
  font-weight: 700;
}
.studio-btn.is-primary:hover {
  filter: brightness(1.08);
  background: linear-gradient(135deg, #f7c259, #eb9f21);
}
.studio-btn.is-playing {
  background: var(--coral-soft);
  border-color: var(--coral);
  color: var(--coral);
}
.studio-btn.is-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}
.studio-btn.is-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}
.studio-btn.is-sm {
  padding: 4px 9px;
  font-size: 12px;
}

.bpm-slider {
  width: 78px;
  accent-color: var(--gold);
}
.reverb-slider {
  width: 64px;
  accent-color: var(--cyan);
}
.bpm-readout {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  min-width: 52px;
  text-align: right;
}

.viz-canvas {
  width: 128px;
  height: 30px;
  border-radius: 6px;
  background: #090c12;
  border: 1px solid var(--border-subtle);
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Main Workbench */
.workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 12px;
  align-items: stretch;
}

.studio-card {
  min-width: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

/* Left Column: Wheel + Progression */
.wheel-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.segmented-group {
  display: inline-flex;
  background: #0c1018;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.seg-btn {
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}
.seg-btn:hover {
  color: var(--text-primary);
}
.seg-btn.is-active {
  background: var(--bg-elevated);
  color: var(--gold);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.wheel-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2px 0;
}

.cof-svg {
  width: 100%;
  max-width: 540px;
  height: auto;
  display: block;
  user-select: none;
  touch-action: manipulation;
}

.cof-outer-aura {
  fill: none;
  stroke: rgba(56, 189, 248, 0.1);
  stroke-width: 1.5;
}

.cof-bezel-slot {
  cursor: pointer;
  outline: none;
}
.cof-bezel-slot:hover .cof-bezel-arc,
.cof-bezel-slot:focus-visible .cof-bezel-arc {
  fill: rgba(245, 184, 65, 0.16);
  stroke: rgba(245, 184, 65, 0.5);
}
.cof-bezel-arc {
  fill: #0d121c;
  stroke: rgba(148, 163, 184, 0.14);
  stroke-width: 1;
  transition: fill 0.2s, stroke 0.2s;
}
.cof-bezel-slot.is-key-center .cof-bezel-arc {
  fill: rgba(56, 189, 248, 0.12);
}
.cof-bezel-slot.is-tonic-slot .cof-bezel-arc {
  fill: rgba(245, 184, 65, 0.22);
  stroke: rgba(245, 184, 65, 0.65);
}
.cof-bezel-text {
  fill: #94a3b8;
  font-size: 12.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  pointer-events: none;
}
.cof-bezel-slot.is-tonic-slot .cof-bezel-text {
  fill: var(--gold);
  font-weight: 800;
}

.cof-wedge {
  cursor: pointer;
  outline: none;
}

.cof-wedge-bg {
  fill: #151c2b;
  stroke: rgba(15, 23, 42, 0.85);
  stroke-width: 1.4;
  transition: fill 0.16s ease, stroke 0.16s ease, transform 0.12s ease, opacity 0.16s ease;
  transform-origin: 380px 380px;
}

.cof-wedge.is-non-diatonic .cof-wedge-bg {
  fill: #131926;
}
.cof-wedge.is-non-diatonic .cof-chord-label {
  fill: #8d9cb3;
}
.cof-wedge.is-non-diatonic .cof-roman-label {
  fill: #59677d;
}

.cof-wedge.is-diatonic.func-tonic .cof-wedge-bg {
  fill: #2c2516;
  stroke: rgba(245, 184, 65, 0.45);
}
.cof-wedge.is-diatonic.func-subdominant .cof-wedge-bg {
  fill: #142736;
  stroke: rgba(56, 189, 248, 0.45);
}
.cof-wedge.is-diatonic.func-dominant .cof-wedge-bg {
  fill: #2e1822;
  stroke: rgba(251, 113, 133, 0.45);
}

.cof-wedge.is-non-diatonic.func-borrowed:hover .cof-wedge-bg,
.cof-wedge.is-non-diatonic.func-secondary:hover .cof-wedge-bg,
.cof-wedge.is-non-diatonic.func-borrowed.is-in-progression .cof-wedge-bg,
.cof-wedge.is-non-diatonic.func-secondary.is-in-progression .cof-wedge-bg {
  fill: #231d38;
  stroke: rgba(167, 139, 250, 0.65);
}

.cof-wedge:hover .cof-wedge-bg,
.cof-wedge:focus-visible .cof-wedge-bg {
  filter: brightness(1.26);
  stroke: rgba(255, 255, 255, 0.55);
}

.cof-wedge.is-in-progression .cof-wedge-bg {
  stroke: rgba(245, 184, 65, 0.85);
  stroke-width: 2;
}

.cof-wedge.is-selected .cof-wedge-bg {
  fill: #3d2e12;
  stroke: var(--gold);
  stroke-width: 2.5;
}

.cof-wedge.is-playing .cof-wedge-bg {
  fill: #4f3a12;
  stroke: #ffe08a;
  stroke-width: 3.2;
}

.cof-wedge.is-pressed .cof-wedge-bg {
  transform: scale(0.985);
  filter: brightness(1.45);
}

.cof-gravity-arc {
  fill: none;
  stroke: transparent;
  stroke-width: 4;
  stroke-linecap: round;
  pointer-events: none;
  transition: stroke 0.2s;
}
.cof-wedge.is-suggested .cof-gravity-arc {
  stroke: rgba(52, 211, 153, 0.72);
}
.cof-wedge.is-suggested-top .cof-gravity-arc {
  stroke: #34d399;
  stroke-width: 5;
  animation: pulseGravity 1.6s ease-in-out infinite;
}

@keyframes pulseGravity {
  0%, 100% { opacity: 0.95; }
  50% { opacity: 0.4; }
}

.cof-chord-label {
  fill: #f8fafc;
  font-weight: 800;
  pointer-events: none;
}
.cof-label-major {
  font-size: 22px;
}
.cof-label-minor {
  font-size: 17.5px;
}
.cof-label-dim {
  font-size: 14px;
}

.cof-roman-label {
  fill: #cbd5e1;
  font-weight: 700;
  font-family: var(--font-mono);
  pointer-events: none;
}
.cof-roman-major {
  font-size: 12.5px;
}
.cof-roman-minor {
  font-size: 11.5px;
}
.cof-roman-dim {
  font-size: 10.5px;
}

.cof-wedge.is-diatonic.func-tonic .cof-roman-label { fill: var(--gold); }
.cof-wedge.is-diatonic.func-subdominant .cof-roman-label { fill: var(--cyan); }
.cof-wedge.is-diatonic.func-dominant .cof-roman-label { fill: var(--coral); }

.cof-harmonic-window {
  fill: none;
  stroke: rgba(245, 184, 65, 0.72);
  stroke-width: 2.2;
  stroke-linejoin: round;
  transition: d 0.25s ease;
}

.cof-hub-backdrop {
  stroke: rgba(148, 163, 184, 0.22);
  stroke-width: 1.5;
}
.cof-constellation-orbit {
  fill: none;
  stroke: rgba(148, 163, 184, 0.14);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}
.cof-orbital-dot {
  fill: rgba(148, 163, 184, 0.26);
  transition: fill 0.2s, r 0.2s;
}
.cof-orbital-dot.is-active {
  fill: var(--gold);
  r: 4.5;
}
.cof-constellation-arc {
  fill: none;
  stroke: rgba(245, 184, 65, 0.65);
  stroke-width: 2;
  stroke-linecap: round;
}
.cof-constellation-arc.is-playing {
  stroke: #ffe08a;
  stroke-width: 3;
}
.cof-step-badge-bg {
  fill: #0b0e14;
  stroke: var(--gold);
  stroke-width: 1.4;
}
.cof-step-badge-bg.is-playing {
  fill: var(--gold);
}
.cof-step-badge-text {
  fill: #ffffff;
  font-size: 9px;
  font-weight: 800;
  font-family: var(--font-mono);
}
.cof-step-badge-bg.is-playing + .cof-step-badge-text {
  fill: #0b0e14;
}

.cof-hub-key {
  fill: var(--cyan);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
}
.cof-hub-chord {
  fill: #ffffff;
  font-size: 31px;
  font-weight: 800;
}
.cof-hub-function {
  fill: var(--gold);
  font-size: 13.5px;
  font-weight: 700;
}
.cof-hub-notes {
  fill: #e2e8f0;
  font-size: 13.5px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.wheel-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-secondary);
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.legend-swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

/* Section Tabs & Progression Builder */
.section-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
}

.section-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.section-tab {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.section-tab .sec-count {
  font-family: var(--font-mono);
  font-size: 10px;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 999px;
}
.section-tab.is-active {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: var(--gold);
}

.section-transport {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.progression-strip {
  min-height: 76px;
  background: #0c1018;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.prog-empty-state {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 4px;
}
.prog-empty-msg {
  color: var(--text-secondary);
  font-size: 12px;
}
.starter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.starter-chip {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  color: var(--text-primary);
  transition: border-color 0.15s, background 0.15s;
}
.starter-chip:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--gold);
}

.prog-card {
  position: relative;
  min-width: 78px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 7px 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.15s, box-shadow 0.15s;
  border-top-width: 3px;
}
.prog-card.func-tonic { border-top-color: var(--gold); }
.prog-card.func-subdominant { border-top-color: var(--cyan); }
.prog-card.func-dominant { border-top-color: var(--coral); }
.prog-card.func-borrowed,
.prog-card.func-secondary { border-top-color: var(--violet); }
.prog-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.45);
}
.prog-card.is-selected {
  box-shadow: 0 0 0 1px var(--gold), 0 4px 14px rgba(245, 184, 65, 0.2);
}
.prog-card.is-playing {
  background: #2f2614;
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(245, 184, 65, 0.35);
}

.prog-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.prog-step-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}
.prog-card-tools {
  display: flex;
  gap: 2px;
}
.prog-mini-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  padding: 0 3px;
  border-radius: 4px;
  line-height: 1.2;
}
.prog-mini-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}
.prog-mini-btn.is-del:hover {
  color: var(--coral);
}
.prog-chord-name {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
}
.prog-roman {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cyan);
}
.prog-notes {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.prog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.prog-action-left {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Right Column: Songwriter Intelligence Tabs */
.intel-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}
.intel-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.intel-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}
.intel-tab.is-active {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  color: var(--gold);
}

.intel-panel {
  display: none;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
}
.intel-panel.is-active {
  display: flex;
}

/* Narrowing Banner & Next Chord Chips */
.narrowing-banner {
  background: #0d121d;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.narrowing-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.narrowing-title {
  font-size: 12.5px;
  font-weight: 700;
}
.narrowing-count-badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--emerald-soft);
  color: var(--emerald);
  border: 1px solid rgba(52, 211, 153, 0.35);
}
.narrowing-count-badge.is-zero {
  background: var(--coral-soft);
  color: var(--coral);
  border-color: rgba(251, 113, 133, 0.35);
}
.narrowing-bar-track {
  height: 5px;
  background: rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  overflow: hidden;
}
.narrowing-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--emerald), var(--gold));
  border-radius: 999px;
  transition: width 0.25s ease;
}

.next-chords-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.next-chords-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
}
.next-chord-chip {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.32);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: #a7f3d0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s, transform 0.08s;
}
.next-chord-chip:hover {
  background: rgba(52, 211, 153, 0.22);
  transform: translateY(-1px);
}
.next-chord-chip.is-spice {
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.38);
  color: #ddd6fe;
}
.next-chord-chip.is-spice:hover {
  background: rgba(167, 139, 250, 0.24);
}
.next-chord-pct {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--emerald);
}
.next-chord-reason {
  font-size: 10px;
  opacity: 0.78;
  font-weight: 600;
}

.song-search-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.song-search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 10px;
  font-size: 13px;
  opacity: 0.7;
  pointer-events: none;
}
.search-clear-btn {
  position: absolute;
  right: 8px;
  background: rgba(148, 163, 184, 0.18);
  border: none;
  border-radius: 999px;
  width: 20px;
  height: 20px;
  font-size: 13px;
  line-height: 1;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.search-clear-btn.is-hidden {
  display: none;
}

.song-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.song-search-input {
  width: 100%;
  background: #0d121d;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 7px 30px 7px 30px;
  font-size: 13.5px;
}
.song-search-input:focus {
  outline: 1.5px solid var(--cyan);
}

.song-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 465px;
  overflow-y: auto;
  padding-right: 4px;
}

.song-card {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s;
}
.song-card:hover {
  border-color: var(--border-strong);
}

.song-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.song-title-line {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
}
.song-artist-line {
  font-size: 12.5px;
  color: var(--text-secondary);
}
.song-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}
.song-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-secondary);
}
.song-badge.is-exact {
  background: var(--gold-soft);
  color: var(--gold);
}
.song-badge.is-pattern {
  background: var(--cyan-soft);
  color: var(--cyan);
}

.song-chords-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.song-chord-pill {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: #0d121d;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}
.song-chord-pill.is-matched {
  background: var(--gold-soft);
  border-color: rgba(245, 184, 65, 0.65);
  color: var(--gold);
}
.song-orig-key-note {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-left: 4px;
}
.song-insight {
  font-size: 12.5px;
  color: var(--text-secondary);
}
.song-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.song-meta-text {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
}
.song-card-btns {
  display: flex;
  gap: 6px;
}

.partial-divider {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--violet);
  padding: 6px 2px 2px;
  border-top: 1px dashed rgba(167, 139, 250, 0.3);
}

/* Voicings & Guitar Capo Lab */
.voicing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.voicing-box {
  background: #0d121d;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.voicing-box-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  width: 100%;
  display: flex;
  justify-content: space-between;
}
.capo-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.capo-card {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.capo-label {
  font-weight: 700;
  color: var(--gold);
  font-size: 12px;
}
.capo-chords {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-primary);
}

/* Lyrics & Arrangement */
.lyrics-workspace {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 8px;
  min-height: 250px;
}
.lyric-editor {
  width: 100%;
  min-height: 240px;
  resize: vertical;
  background: #0b1019;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-primary);
}
.lyric-editor:focus {
  outline: 1px solid var(--cyan);
}
.syllable-meter-list {
  background: #0b1019;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px;
  overflow-y: auto;
  max-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.syllable-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11.5px;
  padding: 3px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
}
.syllable-count {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--cyan);
}
.rhyme-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.arrangement-box {
  background: #0d121d;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.arrangement-chain {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.arr-chip {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Lower Melody Studio Panel */
.lower-melody-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.melody-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.melody-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.melody-heading {
  font-size: 13.5px;
  font-weight: 700;
}
.melody-legend {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--text-secondary);
}
.melody-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.melody-body.is-collapsed {
  display: none;
}

/* Piano Roll */
.roll-scroll {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  background: #090d14;
}
.roll-grid {
  display: grid;
  min-width: 680px;
}
.roll-corner {
  position: sticky;
  left: 0;
  z-index: 4;
  background: #121826;
  border-bottom: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}
.roll-bar-header {
  background: #141c2c;
  border-bottom: 1px solid var(--border-subtle);
  border-right: 1px solid rgba(148, 163, 184, 0.25);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  padding: 4px 6px;
}
.roll-bar-header.is-empty {
  color: var(--text-muted);
}

.roll-pitch-label {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #111622;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  border-right: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  padding: 2px 7px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  cursor: pointer;
  user-select: none;
}
.roll-deg-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--cyan);
  opacity: 0.9;
}
.roll-pitch-label.is-black {
  background: #0b0f17;
  color: #94a3b8;
}
.roll-pitch-label.is-tonic {
  color: var(--gold);
  font-weight: 800;
}

.roll-cell {
  border: none;
  border-bottom: 1px solid rgba(148, 163, 184, 0.07);
  border-right: 1px solid rgba(148, 163, 184, 0.08);
  background: #0b0f17;
  height: 24px;
  padding: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.roll-cell.is-black-row {
  background: #080b12;
}
.roll-cell.is-beat-start {
  border-left: 1px solid rgba(148, 163, 184, 0.16);
}
.roll-cell.is-bar-start {
  border-left: 2px solid rgba(148, 163, 184, 0.34);
}
.roll-note-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  color: #0b0e14;
  line-height: 1;
  pointer-events: none;
}
.roll-cell.is-scale-tone {
  background: rgba(56, 189, 248, 0.075);
}
.roll-cell.is-chord-tone {
  background: rgba(245, 184, 65, 0.13);
}
.roll-cell.is-chord-tone::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(245, 184, 65, 0.35);
  pointer-events: none;
}
.roll-cell:hover {
  background: rgba(255, 255, 255, 0.12);
}
.roll-cell.is-playhead {
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.7);
  background-color: rgba(56, 189, 248, 0.18);
}
.roll-cell.has-note {
  background: linear-gradient(135deg, #f5b841, #d97706) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}
.roll-cell.has-note::after {
  display: none;
}

/* 2-Octave Playable Piano Strip */
.piano-stage-wrap {
  margin-top: 8px;
  background: #090c12;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 8px;
}
.piano-keys-stage {
  position: relative;
  display: flex;
  height: 104px;
  user-select: none;
}
.piano-key.is-white {
  flex: 1;
  background: linear-gradient(180deg, #e2e8f0 0%, #ffffff 100%);
  border: 1px solid #94a3b8;
  border-radius: 0 0 5px 5px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 4px;
  color: #334155;
  transition: background 0.08s;
}
.piano-key.is-white.is-scale-tone {
  background: linear-gradient(180deg, #dbeafe 0%, #f0f9ff 100%);
}
.piano-key.is-white.is-chord-tone {
  background: linear-gradient(180deg, #fef08a 0%, #fef9c3 100%);
}
.piano-key.is-white.is-tonic {
  box-shadow: inset 0 -4px 0 var(--gold);
}
.piano-key.is-white.is-active {
  background: #f5b841 !important;
  color: #0b0e14;
}

.piano-key.is-black {
  position: absolute;
  top: 0;
  height: 64px;
  z-index: 3;
  background: linear-gradient(180deg, #1e293b 0%, #090d16 100%);
  border: 1px solid #020617;
  border-radius: 0 0 4px 4px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 4px;
  color: #cbd5e1;
}
.piano-key.is-black.is-chord-tone {
  border-bottom: 3px solid var(--gold);
}
.piano-key.is-black.is-scale-tone:not(.is-chord-tone) {
  border-bottom: 2px solid var(--cyan);
}
.piano-key.is-black.is-active {
  background: var(--gold) !important;
  color: #0b0e14;
}

.piano-note-name {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 800;
}
.piano-black-name {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #e2e8f0;
  line-height: 1.05;
}
.piano-kbd {
  font-family: var(--font-mono);
  font-size: 9.5px;
  opacity: 0.72;
}

/* Reharmonize Popover */
.reharm-popover {
  position: fixed;
  z-index: 50;
  width: 300px;
  max-height: 360px;
  overflow-y: auto;
  background: #171e2d;
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
  display: none;
  flex-direction: column;
  gap: 8px;
}
.reharm-popover.is-open {
  display: flex;
}
.reharm-group-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.reharm-options-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.reharm-opt-btn {
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 600;
}
.reharm-opt-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Dialog */
.studio-dialog {
  background: var(--bg-panel);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 16px;
  width: min(680px, 94vw);
  max-height: 85vh;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
}
.studio-dialog::backdrop {
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(4px);
}
.lead-sheet-pre {
  background: #090c12;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  overflow: auto;
  max-height: 56vh;
  white-space: pre-wrap;
}

.toast-banner {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 60;
  background: #172033;
  border: 1px solid var(--gold);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Compact Match Strip, Scale Explorer, Recipes, Guide & Mobile Nav */
.compact-match-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #0d121d;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 7px 10px;
}
.compact-match-info {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.compact-match-next {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.voicing-box.is-clickable {
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.voicing-box.is-clickable:hover {
  border-color: var(--gold);
  background: #121928;
}

.scale-notes-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.scale-note-pill {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 14.5px;
  font-weight: 800;
  color: var(--cyan);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
}
.scale-note-pill.is-pentatonic {
  border-color: rgba(245, 184, 65, 0.55);
  background: var(--gold-soft);
  color: var(--gold);
}
.scale-note-deg {
  font-size: 11px;
  opacity: 0.78;
}

.recipes-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
}
.recipe-card {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 9px 11px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s, background 0.15s;
}
.recipe-card:hover {
  border-color: var(--gold);
  background: #1d2538;
}
.recipe-cat {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
  font-weight: 700;
}
.recipe-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}
.recipe-chords {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--gold);
}

.guide-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
.guide-body strong {
  color: var(--text-primary);
}
.guide-body code {
  background: #090c12;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--gold);
}

.reharm-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.piano-keys-stage.is-compact {
  height: 92px;
}

.mobile-bottom-nav {
  display: none;
}
.mob-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  background: rgba(52, 211, 153, 0.22);
  color: var(--emerald);
  padding: 0 5px;
  border-radius: 999px;
}

@media (max-width: 1080px) {
  .workbench-grid {
    grid-template-columns: 1fr;
  }
  .cof-svg {
    max-width: min(490px, 88vw);
  }
  .voicing-grid,
  .lyrics-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .studio-app {
    padding: 10px 10px calc(82px + env(safe-area-inset-bottom));
    gap: 10px;
  }
  .mobile-only {
    display: inline-flex;
  }
  .header-drawer {
    display: none;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
  }
  .header-drawer.is-open {
    display: flex;
  }
  .header-controls,
  .header-actions {
    width: 100%;
  }
  .control-group {
    flex-wrap: wrap;
  }
  .viz-canvas {
    width: 96px;
  }
  .reharm-popover {
    left: 10px !important;
    right: 10px !important;
    bottom: calc(74px + env(safe-area-inset-bottom)) !important;
    top: auto !important;
    width: auto !important;
    max-height: 55vh;
  }
  .toast-banner {
    bottom: calc(78px + env(safe-area-inset-bottom));
    left: 12px;
    right: 12px;
    text-align: center;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(13, 18, 29, 0.96);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-strong);
  }
  .mob-nav-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 5px 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-secondary);
    font-size: 10.5px;
    font-weight: 600;
  }
  .mob-nav-icon {
    font-size: 15px;
    line-height: 1;
  }
  .mob-nav-btn.is-active {
    background: var(--gold-soft);
    border-color: rgba(245, 184, 65, 0.5);
    color: var(--gold);
  }
  .mob-nav-btn.is-play {
    background: linear-gradient(135deg, #f5b841, #e09619);
    color: #0b0e14;
    font-weight: 800;
  }
  .mob-nav-btn.is-play.is-playing {
    background: var(--coral);
    color: #ffffff;
  }
}

@media (max-width: 680px) {
  .studio-card,
  .lower-melody-panel {
    padding: 10px;
  }
  .song-title-input {
    width: 155px;
  }
  .header-key-group {
    width: 100%;
    justify-content: space-between;
  }
  input[type="text"],
  input[type="search"],
  textarea,
  select {
    font-size: 16px;
  }
  .studio-select {
    padding: 5px 8px;
  }
  .song-list {
    max-height: none;
  }

  /* Phone workspace switcher: keep focused view clean at top of screen */
  .studio-app[data-mobile-view="wheel"] .right-column,
  .studio-app[data-mobile-view="wheel"] .lower-melody-panel {
    display: none;
  }
  .studio-app[data-mobile-view="songs"] .left-column,
  .studio-app[data-mobile-view="songs"] .lower-melody-panel {
    display: none;
  }
  .studio-app[data-mobile-view="tools"] .left-column,
  .studio-app[data-mobile-view="tools"] .lower-melody-panel {
    display: none;
  }
  .studio-app[data-mobile-view="melody"] .workbench-grid {
    display: none;
  }
  .studio-app[data-mobile-view="melody"] .melody-body.is-collapsed {
    display: block;
  }
}

@media (pointer: coarse) {
  .studio-btn.is-sm {
    min-height: 36px;
    padding: 6px 10px;
  }
  .prog-mini-btn {
    min-width: 28px;
    min-height: 28px;
    font-size: 13px;
  }
  .roll-cell,
  .roll-pitch-label {
    height: 28px;
  }
  .piano-keys-stage {
    height: 114px;
  }
}

/* Hit Coach Bar, Guitar Tools, Music-Synced Lyrics & Hook DNA */
.hit-coach-bar {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: var(--radius-md);
  padding: 7px 10px;
}
.hit-coach-bar.is-visible {
  display: flex;
}
.hit-coach-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--violet);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hit-coach-chip {
  background: rgba(167, 139, 250, 0.14);
  border: 1px solid rgba(167, 139, 250, 0.38);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #ede9fe;
  transition: background 0.15s, border-color 0.15s;
}
.hit-coach-chip:hover {
  background: rgba(167, 139, 250, 0.28);
  border-color: var(--violet);
}

.voicing-box-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lyrics-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.lyrics-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-weight: 700;
}
.syllable-line.is-active-bar {
  border-left: 3px solid var(--gold);
  background: rgba(245, 184, 65, 0.12);
}
.lyric-bar-chord-btn {
  background: rgba(245, 184, 65, 0.15);
  border: 1px solid rgba(245, 184, 65, 0.4);
  border-radius: 5px;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}
.lyric-bar-chord-btn:hover {
  background: rgba(245, 184, 65, 0.28);
}
.lyric-fit-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.14);
  color: var(--cyan);
}
.lyric-fit-badge.is-locked {
  background: var(--emerald-soft);
  color: var(--emerald);
}

.rhyme-helper-bar {
  background: #0d121d;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.rhyme-chip {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}
.rhyme-chip:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}
.rhyme-chip.is-slant {
  border-style: dashed;
  color: var(--text-secondary);
}

.hook-dna-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #0d121d;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 8px 11px;
  margin-bottom: 8px;
}
.hook-dna-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.hook-dna-badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-primary);
}
.hook-dna-badge.is-score {
  background: var(--gold-soft);
  border: 1px solid rgba(245, 184, 65, 0.45);
  color: var(--gold);
}
.hook-dna-badge.is-good {
  background: var(--emerald-soft);
  color: var(--emerald);
}
.hook-dna-tip {
  font-size: 12px;
  color: var(--cyan);
  font-weight: 600;
}
