/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0f;
  --surface: #111118;
  --surface-2: #1a1a26;
  --surface-3: #222233;
  --border: #1e1e2e;
  --text: #f0f0f5;
  --text-muted: #7777aa;
  --accent: #4d7cff;
  --accent-purple: #a855f7;
  --accent-glow: rgba(77, 124, 255, 0.15);
  --accent-glow-strong: rgba(77, 124, 255, 0.3);
  --loop-mark: rgba(245, 158, 11, 0.25);
  --loop-mark-border: #f59e0b;
  --radius: 8px;
  --radius-sm: 4px;
}

html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); -webkit-tap-highlight-color: transparent; overflow: hidden; }
.hidden { display: none !important; }

/* App fills the viewport; nothing outside scrolls. Each inner pane manages its own scroll. */
#app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }

/* ── Top Bar (sticky) ── */
.top-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.logo-link { display: inline-flex; align-items: center; text-decoration: none; }
.logo-img { height: 30px; width: auto; display: block; }
@media (max-width: 420px) { .logo-img { height: 24px; } }
.song-select {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 6px 12px; font-size: 14px; cursor: pointer; outline: none;
}

/* ── Loading Screen ── */
.loading-screen { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.loading-inner { text-align: center; width: 100%; max-width: 300px; }
.loading-spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; margin: 0 auto 16px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; }
.loading-bar-track { width: 100%; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.loading-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent-purple)); border-radius: 3px; transition: width 0.3s ease; }
.loading-status { font-size: 13px; color: var(--text-muted); margin-top: 10px; }
.loading-stems { list-style: none; margin-top: 16px; font-size: 12px; color: var(--text-muted); }
.loading-stems li { padding: 3px 0; }
.loading-stems li.loaded { color: #22c55e; }
.loading-stems li.loading { color: var(--accent); }
.loading-stems li::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--border); vertical-align: middle; }
.loading-stems li.loaded::before { background: #22c55e; }
.loading-stems li.loading::before { background: var(--accent); animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ── Player ── */
.player { display: flex; flex-direction: column; flex: 1; overflow: hidden; min-height: 0; }

/* ── Transport (sticky beneath top bar) ── */
.transport {
  background: var(--surface); padding: 12px 16px; border-bottom: 1px solid var(--border);
  position: sticky; top: 49px; z-index: 90;
}
.transport-row { display: flex; align-items: center; gap: 10px; }
.transport-controls { margin-top: 8px; flex-wrap: wrap; }
.play-btn {
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-purple)); color: white;
  cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: transform 0.1s, box-shadow 0.2s; box-shadow: 0 0 20px rgba(77, 124, 255, 0.2);
}
.play-btn:active { transform: scale(0.95); }
.play-btn:hover { box-shadow: 0 0 30px rgba(77, 124, 255, 0.4); }
.time-display { font-size: 15px; font-variant-numeric: tabular-nums; color: var(--text); min-width: 90px; }
.section-label { font-size: 12px; color: var(--accent); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.bpm-display { font-size: 13px; color: var(--text-muted); margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.speed-control { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.speed-control select { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 8px; font-size: 13px; outline: none; }
.icon-btn { width: 40px; height: 40px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; flex-shrink: 0; }
.icon-btn.active { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); box-shadow: 0 0 10px rgba(77, 124, 255, 0.15); }
.icon-btn.loop-mode { background: rgba(245, 158, 11, 0.15); border-color: #f59e0b; color: #f59e0b; }
.icon-btn:active { opacity: 0.7; }
.icon-btn-sm { width: 32px; height: 32px; margin-left: auto; }
.loop-status { font-size: 12px; color: #f59e0b; font-weight: 600; }
.keyboard-hints { font-size: 11px; color: var(--text-muted); opacity: 0.5; margin-left: auto; white-space: nowrap; }

/* ── Content Grid: stacked mobile, two-pane desktop. Both panes scroll independently. ── */
.content-grid {
  display: flex; flex-direction: column; flex: 1;
  overflow: hidden; min-height: 0;
}
/* Mixer drawer — collapsible left pane */
.content-left { display: flex; flex-direction: column; flex-shrink: 0; overflow: auto; transition: max-height 0.25s, width 0.25s, min-width 0.25s, opacity 0.2s; }
.content-left.collapsed { max-height: 0 !important; padding: 0 !important; overflow: hidden; opacity: 0; }
@media (min-width: 1024px) {
  .content-left.collapsed { width: 0 !important; min-width: 0 !important; max-width: 0 !important; }
}

/* Drawer toggle button shown in transport (re-styled icon) */
.mixer-toggle {
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 6px 10px; background: var(--surface-2); color: var(--text-muted);
  border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer;
}
.mixer-toggle:hover { background: var(--surface-3); color: var(--text); }
.mixer-toggle.collapsed { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); }
.content-right { display: flex; flex-direction: column; flex: 1; overflow: hidden; min-height: 0; }

/* Make each tab-panel its own scroll container — chord-sheet auto-scroll stays inside. */
.tab-panel { display: none; flex: 1; flex-direction: column; overflow: hidden; min-height: 0; }
.tab-panel.active { display: flex; }
.tab-panel > .chord-sheet,
.tab-panel > .lyrics,
.tab-panel > .sheets-viewer { flex: 1; overflow: auto; min-height: 0; }
.tab-panel > .sheets-toolbar,
.tab-panel > .sheets-downloads { flex-shrink: 0; }

/* Highway tabs (Drums/Bass/Guitar) — canvas fills the panel */
.tab-panel > .drums-highway-wrap,
.tab-panel > .bass-highway-wrap,
.tab-panel > .guitar-highway-wrap { flex: 1; min-height: 0; background: #000; border-radius: 8px; overflow: hidden; }
#drumsHighwayCanvas, #bassHighwayCanvas, #guitarHighwayCanvas { width: 100%; height: 100%; display: block; }

/* Drum Listen mode controls — sit below the drums highway canvas. */
.listen-controls-host { flex-shrink: 0; padding: 8px 12px 4px; background: var(--surface); border-top: 1px solid var(--border); }
.listen-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.listen-toggle-btn {
  background: linear-gradient(135deg, #ef4444, #f97316); color: white;
  border: none; border-radius: var(--radius); padding: 8px 14px;
  font-size: 13px; font-weight: 700; cursor: pointer; letter-spacing: 0.02em;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.25); transition: transform 0.1s, box-shadow 0.2s;
}
.listen-toggle-btn:hover { box-shadow: 0 0 24px rgba(239, 68, 68, 0.4); }
.listen-toggle-btn:active { transform: scale(0.97); }
.listen-toggle-btn.active { background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 0 16px rgba(34, 197, 94, 0.35); }
.listen-status { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.listen-latency { font-size: 10px; color: var(--text-muted); font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); }
.listen-latency.converged { color: #22c55e; border-color: #22c55e; }
.listen-secondary-btn {
  background: var(--surface-3); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 7px 12px; font-size: 12px; font-weight: 600;
  cursor: pointer; letter-spacing: 0.02em; transition: border-color 0.15s;
}
.listen-secondary-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Kit calibration panel — appears below the listen controls during a session */
.kit-cal-panel { margin-top: 10px; }
.kit-cal-card {
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--accent); border-radius: 12px; padding: 16px;
  box-shadow: 0 8px 32px rgba(77, 124, 255, 0.15);
}
.kit-cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 14px; }
.kit-cal-close {
  background: transparent; border: none; color: var(--text-muted); font-size: 22px;
  line-height: 1; cursor: pointer; padding: 0 4px;
}
.kit-cal-close:hover { color: var(--text); }
.kit-cal-help { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.4; }
.kit-cal-step-label { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 10px; color: var(--text); }
.kit-cal-progress { width: 100%; height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.kit-cal-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent-purple)); transition: width 0.2s ease; }
.kit-cal-count { font-size: 12px; color: var(--text-muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.kit-cal-meter { width: 30px; height: 6px; border-radius: 3px; background: var(--border); margin-top: 6px; }
.kit-cal-actions { display: flex; gap: 8px; margin-top: 12px; }
.kit-cal-skip, .kit-cal-cancel {
  background: var(--surface-3); color: var(--text-muted); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 7px 12px; font-size: 12px; font-weight: 600;
  cursor: pointer;
}
.kit-cal-skip:hover, .kit-cal-cancel:hover { color: var(--text); border-color: var(--text-muted); }

/* Practice heatmap overlay — sits over the waveform but lets clicks fall through. */
.heatmap-canvas { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 2; opacity: 0.85; }
#heatmapBtn.active { background: linear-gradient(135deg, #ef4444, #f59e0b); border-color: transparent; color: white; }

/* Setlist tab */
.tab-panel > .setlist-root { flex: 1; overflow: auto; min-height: 0; padding: 12px 16px; }
.setlist-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.setlist-add-select { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 13px; min-width: 180px; outline: none; }
.setlist-start {
  background: linear-gradient(135deg, var(--accent), var(--accent-purple)); color: white;
  border: none; border-radius: var(--radius); padding: 8px 16px; font-size: 13px; font-weight: 700;
  cursor: pointer; box-shadow: 0 0 16px rgba(77, 124, 255, 0.25);
}
.setlist-start[disabled] { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.setlist-clear {
  background: var(--surface-3); color: var(--text-muted); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 12px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.setlist-clear[disabled] { opacity: 0.4; cursor: not-allowed; }
.setlist-clear:hover:not([disabled]) { color: var(--text); border-color: var(--text-muted); }
.setlist-queue { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.setlist-empty { color: var(--text-muted); font-size: 13px; padding: 24px; text-align: center; border: 1px dashed var(--border); border-radius: var(--radius); }
.setlist-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.setlist-item.active { border-color: var(--accent); background: var(--accent-glow); box-shadow: 0 0 18px var(--accent-glow-strong); }
.setlist-item-num { color: var(--text-muted); font-variant-numeric: tabular-nums; min-width: 22px; font-size: 13px; font-weight: 700; }
.setlist-item-title { flex: 1; font-size: 14px; color: var(--text); }
.setlist-mini { background: transparent; border: 1px solid var(--border); color: var(--text-muted); width: 26px; height: 26px; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; line-height: 1; }
.setlist-mini:hover:not([disabled]) { color: var(--text); border-color: var(--text-muted); }
.setlist-mini[disabled] { opacity: 0.3; cursor: not-allowed; }
.setlist-remove:hover { color: #ef4444; border-color: #ef4444; }
.setlist-hint { font-size: 11px; color: var(--text-muted); margin-top: 16px; line-height: 1.4; }
.listen-counts { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.count-chip {
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  border: 1px solid currentColor; border-radius: 10px; padding: 2px 8px;
  background: rgba(0, 0, 0, 0.35); font-variant-numeric: tabular-nums;
}
.count-chip b { font-size: 11px; margin-left: 2px; }

@media (min-width: 1024px) {
  .content-grid { flex-direction: row; align-items: stretch; }
  .content-left { width: 420px; min-width: 420px; max-width: 420px; border-right: 1px solid var(--border); }
  .content-right { flex: 1; }
}

/* On mobile, mixer/waveform stay at a max height so chord chart has room. */
@media (max-width: 1023px) {
  .content-left { max-height: 50vh; }
}

/* ── Waveform ── */
.waveform-container { position: relative; padding: 12px 16px 4px; background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); border-bottom: 1px solid var(--border); }
#waveform { width: 100%; height: 72px; cursor: pointer; border-radius: var(--radius-sm); overflow: hidden; }
.section-markers { display: flex; width: 100%; height: 18px; margin-top: 4px; font-size: 9px; color: var(--text-muted); overflow: hidden; user-select: none; }
.section-marker { display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; background: var(--surface); border-radius: 2px; margin-right: 1px; }

/* ── Mixer (compact single-row strips so all channels fit) ── */
.mixer { padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; background: var(--surface); }

.channel-strip {
  display: grid;
  grid-template-columns: 56px 1fr 90px 26px 26px;
  gap: 6px;
  padding: 5px 8px;
  background: var(--surface); border-radius: var(--radius-sm); border-left: 3px solid var(--border);
  align-items: center; min-height: 36px;
}
.channel-strip.is-mix { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 100%); border-left-color: var(--accent); margin-bottom: 3px; }
.channel-label { font-size: 10px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.02em; }

.channel-fader { -webkit-appearance: none; appearance: none; height: 5px; background: var(--surface-3); border-radius: 3px; outline: none; cursor: pointer; }
.channel-fader::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--text); cursor: pointer; border: 3px solid var(--bg); box-shadow: 0 0 4px rgba(0,0,0,0.3); transition: transform 0.1s; }
.channel-fader::-webkit-slider-thumb:active { transform: scale(1.15); }
.channel-fader::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--text); cursor: pointer; border: 3px solid var(--bg); }

.channel-pan-row { display: flex; align-items: center; gap: 4px; }
.channel-pan-label { font-size: 8px; color: var(--text-muted); width: 16px; text-align: right; letter-spacing: 0.05em; }
.channel-pan {
  -webkit-appearance: none; appearance: none; flex: 1; height: 3px;
  background: linear-gradient(90deg, #06b6d4 0%, var(--surface-3) 50%, #f97316 100%);
  border-radius: 2px; outline: none; cursor: pointer;
}
.channel-pan::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--text); cursor: pointer; border: 2px solid var(--bg); }
.channel-pan::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--text); cursor: pointer; border: 2px solid var(--bg); }
.channel-pan-value { font-size: 9px; color: var(--text-muted); font-variant-numeric: tabular-nums; min-width: 18px; text-align: right; }

.channel-btn { min-width: 26px; min-height: 26px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-muted); font-size: 10px; font-weight: 700; cursor: pointer; flex-shrink: 0; transition: all 0.1s; display: flex; align-items: center; justify-content: center; }
.channel-btn.muted { background: rgba(239, 68, 68, 0.15); border-color: #ef4444; color: #ef4444; }
.channel-btn.soloed { background: rgba(6, 182, 212, 0.15); border-color: #06b6d4; color: #06b6d4; }

/* ── Tabs ── */
.tabs { display: flex; align-items: center; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface); }
.tab-btn { background: transparent; color: var(--text-muted); border: 1px solid transparent; padding: 6px 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.tab-btn:hover { background: var(--surface-2); color: var(--text); }
.tab-btn.active { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); }
.tab-panel { display: none; flex: 1; flex-direction: column; }
.tab-panel.active { display: flex; }

/* ── Chord Sheet (scrolls within its tab panel) ── */
.chord-sheet { padding: 16px; }
.chord-section { margin-bottom: 16px; }
.chord-section-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; padding-left: 2px; transition: color 0.2s; cursor: pointer; }
.chord-section-label:hover { color: var(--accent); }
.chord-section.active .chord-section-label { color: var(--accent); }
.chord-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.chord-cell { text-align: center; padding: 10px 4px; font-size: 16px; font-weight: 700; background: var(--surface); border-radius: var(--radius-sm); border: 1px solid var(--border); transition: all 0.15s; cursor: pointer; user-select: none; }
.chord-cell:hover { background: var(--surface-2); border-color: var(--accent); }
.chord-cell.active { background: var(--accent-glow-strong); border-color: var(--accent); color: var(--accent); box-shadow: 0 0 16px rgba(77, 124, 255, 0.25); transform: scale(1.02); }
.chord-cell.loop-start { background: rgba(245, 158, 11, 0.3); border-color: var(--loop-mark-border); color: #fbbf24; }
.chord-cell.loop-end { background: rgba(245, 158, 11, 0.3); border-color: var(--loop-mark-border); color: #fbbf24; }
.chord-cell.in-loop { background: var(--loop-mark); border-color: var(--loop-mark-border); }

/* ── Sheets tab ── */
.sheets-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.sheets-toolbar select { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 10px; font-size: 13px; outline: none; }
.print-btn {
  margin-left: auto;
  background: linear-gradient(135deg, #f97316, #ef4444); color: white;
  border: none; border-radius: var(--radius); padding: 14px 28px;
  font-size: 16px; font-weight: 800; cursor: pointer; letter-spacing: 0.02em;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.25); transition: transform 0.1s, box-shadow 0.2s;
}
.print-btn:hover { box-shadow: 0 0 30px rgba(239, 68, 68, 0.45); }
.print-btn:active { transform: scale(0.97); }
.sheets-downloads { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px; font-size: 11px; }
.sheets-downloads a { color: var(--accent); text-decoration: none; padding: 4px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.sheets-downloads a:hover { background: var(--surface-3); }
.sheets-viewer { padding: 0 16px 16px; }
.sheets-viewer iframe { width: 100%; height: 100%; min-height: 480px; border: 1px solid var(--border); border-radius: var(--radius); background: white; display: block; }

/* ── Lyrics tab (scrolls within its tab panel) ── */
.lyrics { padding: 24px; line-height: 1.7; }
.lyrics-section { margin-bottom: 28px; }
.lyrics-section-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.lyrics-section.active .lyrics-section-label { color: var(--accent); }
.lyrics-line { font-size: 17px; color: var(--text); padding: 2px 0; }

/* ── Fullscreen mode (chord chart) ── */
.content-right.fullscreen { position: fixed; inset: 0; z-index: 1000; background: var(--bg); }
.content-right.fullscreen .tabs { position: sticky; top: 0; z-index: 1; }
.content-right.fullscreen .chord-grid { grid-template-columns: repeat(6, 1fr); gap: 8px; }
.content-right.fullscreen .chord-cell { font-size: 22px; padding: 18px 4px; }

/* ── NUX overlay (first-run guided tour) ── */
#nux-overlay { position: fixed; inset: 0; z-index: 3000; }
.nux-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.72); }
.nux-highlight {
  position: absolute; border: 3px solid var(--accent);
  border-radius: 10px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55), 0 0 32px rgba(77, 124, 255, 0.55) inset;
  transition: all 0.3s ease;
}
.nux-card {
  position: absolute; width: 420px; max-width: calc(100vw - 32px);
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--accent);
  border-radius: 12px; padding: 18px 22px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 40px rgba(77, 124, 255, 0.25);
  transition: top 0.3s ease, left 0.3s ease;
}
.nux-step-count { font-size: 10px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.nux-title { font-size: 18px; font-weight: 800; margin-bottom: 8px; color: var(--text); letter-spacing: -0.01em; }
.nux-body { font-size: 14px; color: var(--text); line-height: 1.5; margin-bottom: 16px; opacity: 0.92; }
.nux-footer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nux-dismiss-forever { font-size: 11px; color: var(--text-muted); display: flex; gap: 5px; align-items: center; margin-right: auto; cursor: pointer; user-select: none; }
.nux-dismiss-forever input { cursor: pointer; }
.nux-skip, .nux-next {
  padding: 8px 16px; border-radius: 6px; cursor: pointer;
  font-size: 13px; font-weight: 600; transition: all 0.15s;
}
.nux-skip { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.nux-skip:hover { color: var(--text); border-color: var(--text-muted); }
.nux-next { background: linear-gradient(135deg, var(--accent), var(--accent-purple)); border: none; color: white; box-shadow: 0 0 16px rgba(77, 124, 255, 0.3); }
.nux-next:hover { box-shadow: 0 0 24px rgba(77, 124, 255, 0.5); }

/* ── Footer ── */
.site-footer { padding: 20px 16px 32px; text-align: center; font-size: 12px; color: var(--text-muted); line-height: 1.6; border-top: 1px solid var(--border); }
.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ── Mobile tweaks ── */
@media (max-width: 420px) {
  .channel-label { font-size: 10px; }
  .chord-cell { font-size: 14px; padding: 8px 2px; }
  .keyboard-hints { display: none; }
  .section-label { display: none; }
  .print-btn { padding: 12px 20px; font-size: 14px; width: 100%; margin-left: 0; margin-top: 8px; }
  .sheets-toolbar { flex-direction: column; align-items: stretch; }
}
