/**
 * FretDSP — Modern Dark-Mode Boutique Chassis Theme (#121214)
 * Vintage Guitar Amplifier & Boutique Stompbox Aesthetic
 * Precision Monospace Displays (JetBrains Mono) + Clean Modern Typography (Inter)
 */

:root {
    /* Chassis & Brushed Aluminum Palette */
    --chassis-bg: #121214;
    --chassis-dark: #0a0a0c;
    --chassis-surface: #18181c;
    --chassis-surface-hover: #222228;
    --chassis-border: #282830;
    --chassis-border-highlight: #3c3c48;
    --chassis-metal-light: #2c2c36;
    --chassis-metal-dark: #141418;

    /* Text & Readout Colors */
    --text-primary: #f4f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --text-dim: #4b5563;

    /* Indicator LED & Neon Accent Glows */
    --led-cyan: #00f3ff;
    --led-cyan-glow: rgba(0, 243, 255, 0.45);
    --led-cyan-dim: rgba(0, 243, 255, 0.15);

    --led-amber: #ffb020;
    --led-amber-glow: rgba(255, 176, 32, 0.45);
    --led-amber-dim: rgba(255, 176, 32, 0.15);

    --led-green: #10b981;
    --led-green-glow: rgba(16, 185, 129, 0.45);
    --led-green-dim: rgba(16, 185, 129, 0.15);

    --led-red: #ef4444;
    --led-red-glow: rgba(239, 68, 68, 0.55);

    --vfd-cyan: #22d3ee;
    --vfd-cyan-glow: rgba(34, 211, 238, 0.35);

    /* Fonts & Radii */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

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

body {
    background-color: var(--chassis-bg);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.45;
    min-height: 100vh;
    overflow-x: hidden;
    padding: 18px 20px 40px;
    /* Brushed metal texture simulation */
    background-image: 
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0px, rgba(255, 255, 255, 0.012) 1px, transparent 1px, transparent 4px),
        radial-gradient(ellipse at 50% 0%, rgba(0, 243, 255, 0.06) 0%, transparent 60%),
        radial-gradient(circle at 85% 100%, rgba(255, 176, 32, 0.04) 0%, transparent 50%),
        linear-gradient(180deg, #161619 0%, #101012 100%);
    background-attachment: fixed;
}

/* Application Container */
.app-container {
    max-width: 1520px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* =========================================================================
   Hardware Chassis Shell Components (Bevels, Screws, Insets)
   ========================================================================= */
.chassis-panel {
    background: linear-gradient(180deg, #1a1a1e 0%, #131316 100%);
    border: 1px solid var(--chassis-border);
    border-top: 1px solid var(--chassis-border-highlight);
    border-radius: var(--radius-lg);
    position: relative;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.65),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}

/* Metallic Chassis Fastener Screws */
.screw {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, #52525b 0%, #27272a 70%, #18181b 100%);
    border: 1px solid #3f3f46;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    z-index: 5;
    pointer-events: none;
}
.screw::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 15%;
    right: 15%;
    height: 1px;
    background: #18181b;
    transform: translateY(-50%) rotate(38deg);
}
.screw-tl { top: 7px; left: 8px; }
.screw-tr { top: 7px; right: 8px; }
.screw-bl { bottom: 7px; left: 8px; }
.screw-br { bottom: 7px; right: 8px; }

/* Inset Digital Display Screen */
.digital-display {
    background: #09090b;
    border: 1px solid #202026;
    border-radius: var(--radius-sm);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.85);
    font-family: var(--font-mono);
    position: relative;
}

/* =========================================================================
   1. TOP HEADER: Title, RMS dB Gain Meter, Clip Warning, Mic Selector
   ========================================================================= */
.app-header {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-insignia {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #27272a 0%, #18181b 100%);
    border: 1px solid #3f3f46;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.brand-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

.brand-title {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(180deg, #ffffff 40%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.brand-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    background: rgba(0, 243, 255, 0.1);
    color: var(--led-cyan);
    border: 1px solid rgba(0, 243, 255, 0.3);
    letter-spacing: 0.5px;
}

.brand-subtitle {
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

/* Calibrated Input Gain Meter & Clip HUD */
.gain-meter-rack {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #0e0e11;
    border: 1px solid #24242c;
    border-radius: var(--radius-md);
    padding: 8px 16px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.7);
}

.meter-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.meter-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.meter-db-readout {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--led-cyan);
    min-width: 72px;
    text-shadow: 0 0 8px var(--led-cyan-dim);
}

/* Segmented LED VU Bar */
.segmented-meter-unit {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.segmented-meter-scale {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 8px;
    color: var(--text-dim);
    padding: 0 1px;
}

.meter-led-bar-wrap {
    width: 140px;
    height: 10px;
    background: #08080a;
    border: 1px solid #202026;
    border-radius: 2px;
    padding: 1px;
    position: relative;
    overflow: hidden;
}

.meter-led-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, 
        #10b981 0%, 
        #10b981 60%, 
        #ffb020 78%, 
        #ef4444 95%
    );
    border-radius: 1px;
    transition: width 0.05s ease;
    box-shadow: 0 0 8px rgba(0, 243, 255, 0.3);
}

/* Clip Warning LED Jewel */
.clip-indicator-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.clip-led {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #3f1515;
    border: 1px solid #571b1b;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
    transition: background 0.08s ease, box-shadow 0.12s ease;
}

.clip-led.active {
    background: #ff2020;
    box-shadow: 0 0 12px #ff2020, inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

.clip-text {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.clip-text.active {
    color: #ff4d4d;
}

/* Microphone Device Input Selector */
.audio-routing-rack {
    display: flex;
    align-items: center;
    gap: 10px;
}

.jack-socket {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle, #101012 35%, #3f3f46 70%, #18181b 100%);
    border: 2px solid #52525b;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9), 0 1px 2px rgba(255, 255, 255, 0.15);
    position: relative;
    flex-shrink: 0;
}
.jack-socket::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #000000;
    transform: translate(-50%, -50%);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 1);
}

.select-hardware {
    background: linear-gradient(180deg, #222228 0%, #16161a 100%);
    border: 1px solid #33333e;
    color: var(--text-primary);
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    max-width: 200px;
}

.select-hardware:hover {
    border-color: #4a4a58;
}

/* =========================================================================
   2. MASTER CONTROL BAR (Pedal Stomp Switch, BPM Slider, Quantize, Tuner)
   ========================================================================= */
.master-control-bar {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    background: linear-gradient(180deg, #1c1c20 0%, #141417 100%);
}

.control-cluster {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cluster-separator {
    width: 1px;
    height: 38px;
    background: linear-gradient(180deg, transparent 0%, #30303a 50%, transparent 100%);
}

/* Stompbox Footswitch (3PDT style) */
.stomp-switch-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stomp-button {
    background: radial-gradient(circle at 40% 40%, #4a4a54 0%, #202026 70%, #101014 100%);
    border: 2px solid #5a5a68;
    color: var(--text-primary);
    padding: 8px 16px 8px 14px;
    border-radius: 24px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    box-shadow: 
        0 4px 10px rgba(0, 0, 0, 0.7),
        inset 0 1px 2px rgba(255, 255, 255, 0.35),
        inset 0 -2px 4px rgba(0, 0, 0, 0.6);
    transition: all 0.12s ease;
    user-select: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stomp-button:hover {
    border-color: #717182;
    transform: translateY(-1px);
}

.stomp-button:active {
    transform: translateY(2px);
    box-shadow: 
        0 1px 4px rgba(0, 0, 0, 0.9),
        inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

.stomp-button.listening-active {
    background: radial-gradient(circle at 40% 40%, #0369a1 0%, #0c4a6e 70%, #082f49 100%);
    border-color: var(--led-cyan);
    box-shadow: 0 0 15px var(--led-cyan-dim), inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

/* Stomp Jewel Pilot LED */
.jewel-led {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #27272a;
    border: 1px solid #3f3f46;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
    transition: all 0.15s ease;
}

.jewel-led.active {
    background: var(--led-cyan);
    box-shadow: 0 0 12px var(--led-cyan), inset 0 1px 2px #ffffff;
}

/* Knurled BPM Slider & Metronome HUD */
.metronome-module {
    display: flex;
    align-items: center;
    gap: 10px;
}

.module-header-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
}

.bpm-controls-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #0d0d10;
    border: 1px solid #23232b;
    border-radius: var(--radius-sm);
    padding: 4px 10px;
}

.bpm-step-btn {
    background: #1e1e24;
    border: 1px solid #32323c;
    color: var(--text-primary);
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s ease;
}

.bpm-step-btn:hover {
    background: #2a2a34;
}

.bpm-readout-badge {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 800;
    color: var(--led-amber);
    min-width: 66px;
    text-align: center;
    text-shadow: 0 0 8px var(--led-amber-dim);
}

/* Vintage Knurled Range Slider */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: #141418;
    height: 6px;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    border: 1px solid #282832;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle, #e4e4e7 0%, #a1a1aa 60%, #71717a 100%);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7), inset 0 1px 1px #ffffff;
    cursor: pointer;
    border: 1px solid #3f3f46;
    transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

/* Metronome Pulse Indicator */
.metronome-pulse-led {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #24242a;
    border: 1px solid #383842;
    transition: all 0.04s ease;
}

.metronome-pulse-led.flash {
    background: var(--led-cyan);
    box-shadow: 0 0 12px var(--led-cyan);
    transform: scale(1.2);
}

.metronome-pulse-led.flash.downbeat {
    background: var(--led-amber);
    box-shadow: 0 0 16px var(--led-amber);
    transform: scale(1.3);
}

/* Quantize Sensitivity Module */
.quantize-module {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-switch-btn {
    background: #1a1a20;
    border: 1px solid #2d2d38;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.12s ease;
    text-transform: uppercase;
}

.toggle-switch-btn:hover {
    background: #24242c;
    color: var(--text-primary);
}

.toggle-switch-btn.active {
    background: rgba(0, 243, 255, 0.12);
    border-color: var(--led-cyan);
    color: var(--led-cyan);
    box-shadow: 0 0 10px var(--led-cyan-dim);
}

/* Stompbox Chromatic Tuner HUD */
.pedal-tuner-display {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #09090c;
    border: 1px solid #22222a;
    border-radius: var(--radius-md);
    padding: 6px 16px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.9);
}

.tuner-note-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 52px;
}

.tuner-note-badge {
    font-family: var(--font-mono);
    font-size: 26px;
    font-weight: 900;
    color: var(--led-cyan);
    line-height: 1;
    text-shadow: 0 0 12px var(--led-cyan-dim);
    transition: color 0.1s ease, transform 0.1s ease;
}

.tuner-note-badge.note-active {
    color: #ffffff;
    text-shadow: 0 0 16px var(--led-cyan);
    transform: scale(1.08);
}

.tuner-freq-display {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
}

/* Needle / Cents Deviation Gauge */
.tuner-meter-assembly {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 110px;
}

.cents-readout {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 800;
    color: var(--text-secondary);
}

.needle-arc-track {
    width: 100%;
    height: 8px;
    background: #14141a;
    border: 1px solid #282834;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.center-lock-target {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--led-green);
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 4px var(--led-green);
}

.needle-indicator {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--led-cyan);
    border-radius: 2px;
    transform: translateX(-50%) rotate(0deg);
    transition: transform 0.06s ease;
    box-shadow: 0 0 6px var(--led-cyan);
}

.tuner-flat-sharp-arrows {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-family: var(--font-mono);
    font-size: 8px;
    font-weight: 800;
    color: var(--text-dim);
}

/* Hand Position Ergonomic Anchor */
.hand-position-pill {
    background: rgba(255, 176, 32, 0.1);
    border: 1px solid rgba(255, 176, 32, 0.35);
    color: var(--led-amber);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* =========================================================================
   3. MAIN STAGE (Upper Fretboard, Middle Tablature, Lower FFT Heatmap)
   ========================================================================= */
.main-stage {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stage-card {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 2px;
}

.stage-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.stage-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    background: #0d0d10;
    color: var(--led-cyan);
    padding: 2px 7px;
    border-radius: 3px;
    border: 1px solid rgba(0, 243, 255, 0.25);
}

.stage-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Canvas Viewport Containers */
.canvas-frame {
    width: 100%;
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #09090c;
    border: 1px solid #22222a;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.85);
}

#fretboardCanvas {
    width: 100%;
    height: 220px;
    display: block;
    cursor: pointer;
}

#tablatureCanvas {
    width: 100%;
    height: 180px;
    display: block;
}

#spectralCanvas {
    width: 100%;
    height: 210px;
    display: block;
}

/* Tablature Dedicated Transport Control Bar */
.tab-transport-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: #0d0d10;
    border: 1px solid #202028;
    border-radius: var(--radius-md);
    padding: 8px 14px;
}

.transport-buttons-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Transport Buttons */
.transport-btn {
    background: linear-gradient(180deg, #222228 0%, #16161a 100%);
    border: 1px solid #33333e;
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.12s ease;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.transport-btn:hover {
    border-color: #4a4a58;
    transform: translateY(-1px);
}

.transport-btn:active {
    transform: translateY(1px);
}

.transport-btn.btn-play-action {
    background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
    border-color: var(--led-cyan);
    color: #ffffff;
    box-shadow: 0 0 10px var(--led-cyan-dim);
}

.transport-btn.btn-play-action.btn-playing {
    background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
    border-color: #f87171;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

.transport-btn.btn-loop.active {
    background: rgba(255, 176, 32, 0.15);
    border-color: var(--led-amber);
    color: var(--led-amber);
    box-shadow: 0 0 10px var(--led-amber-dim);
}

.transport-btn.btn-practice.active {
    background: rgba(0, 243, 255, 0.18);
    border-color: var(--led-cyan);
    color: var(--led-cyan);
    box-shadow: 0 0 12px var(--led-cyan-dim);
}

.transport-btn.btn-speed-trainer.active {
    background: rgba(255, 176, 32, 0.18);
    border-color: var(--led-amber);
    color: var(--led-amber);
    box-shadow: 0 0 12px var(--led-amber-dim);
}

.practice-trainer-bar {
    transition: all 0.2s ease;
}

.grade-pill {
    display: inline-block;
    transition: all 0.15s ease;
}

/* =========================================================================
   4. ACTION TRAY (Export ASCII, Download MIDI, Copy Link, Demo Riffs)
   ========================================================================= */
.action-tray {
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    background: linear-gradient(180deg, #1c1c20 0%, #131316 100%);
}

.action-tray-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    background: linear-gradient(180deg, #26262e 0%, #18181d 100%);
    border: 1px solid #3c3c4a;
    color: var(--text-primary);
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    transition: all 0.14s ease;
    user-select: none;
}

.action-btn:hover {
    border-color: #555566;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
}

.action-btn:active {
    transform: translateY(1px);
}

.action-btn-primary {
    background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
    border-color: var(--led-cyan);
    color: #ffffff;
    box-shadow: 0 0 14px var(--led-cyan-dim);
}

.action-btn-primary:hover {
    background: linear-gradient(180deg, #0369a1 0%, #075985 100%);
    box-shadow: 0 0 18px var(--led-cyan-glow);
}

.action-btn-accent {
    background: linear-gradient(180deg, #d97706 0%, #b45309 100%);
    border-color: var(--led-amber);
    color: #ffffff;
    box-shadow: 0 0 14px var(--led-amber-dim);
}

.action-btn-accent:hover {
    background: linear-gradient(180deg, #b45309 0%, #92400e 100%);
    box-shadow: 0 0 18px var(--led-amber-glow);
}

/* Keyboard Guide Dock */
.keyboard-guide-bar {
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 11px;
    color: var(--text-secondary);
    background: #0f0f12;
    border: 1px solid #1f1f26;
    border-radius: var(--radius-md);
}

.guide-keys-list {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.guide-key-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

kbd {
    background: #1e1e24;
    border: 1px solid #363642;
    border-bottom: 2px solid #202028;
    border-radius: 3px;
    padding: 1px 5px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: #e4e4e7;
}

/* =========================================================================
   5. FLOATING TOAST NOTIFICATIONS
   ========================================================================= */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: #141418;
    border: 1px solid var(--led-cyan);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8), 0 0 16px var(--led-cyan-dim);
    animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    pointer-events: auto;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast.toast-fadeout {
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.25s ease;
}

/* =========================================================================
   6. MULTI-FORMAT EXPORT MODAL
   ========================================================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #141418;
    border: 1px solid #33333e;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 860px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-icon-close {
    background: #202026;
    border: 1px solid #383844;
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
}

.btn-icon-close:hover {
    background: #2c2c36;
    color: #ffffff;
}

.export-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #282834;
    padding-bottom: 10px;
    flex-wrap: wrap;
}

.export-tab-btn {
    background: #1c1c22;
    border: 1px solid #2d2d38;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.12s ease;
}

.export-tab-btn:hover {
    color: var(--text-primary);
    border-color: #444454;
}

.export-tab-btn.active {
    background: #24242e;
    color: var(--led-cyan);
    border-color: var(--led-cyan);
    box-shadow: 0 0 10px var(--led-cyan-dim);
}

.export-panel {
    display: none;
    flex-direction: column;
    gap: 12px;
}

.export-panel.active {
    display: flex;
}

.export-info-bar {
    font-size: 12px;
    color: var(--text-muted);
}

.modal-textarea {
    width: 100%;
    height: 300px;
    background: #09090c;
    border: 1px solid #242430;
    border-radius: var(--radius-sm);
    color: #38bdf8;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.45;
    padding: 14px;
    resize: none;
    outline: none;
    white-space: pre;
    overflow-x: auto;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.midi-card {
    background: #0a0a0d;
    border: 1px solid #242430;
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.midi-card-icon {
    font-size: 40px;
}

.midi-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 480px;
}

.midi-detail-item {
    background: #121216;
    border: 1px solid #242430;
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 11px;
    color: var(--text-secondary);
}

.midi-detail-item strong {
    display: block;
    font-size: 14px;
    color: var(--led-cyan);
    margin-top: 2px;
}

/* =========================================================================
   7. RESPONSIVE DESIGN BREAKPOINTS
   ========================================================================= */
@media (max-width: 1100px) {
    .app-header {
        flex-direction: column;
        align-items: stretch;
    }
    .gain-meter-rack {
        justify-content: space-between;
    }
    .master-control-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .pedal-tuner-display {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    .control-cluster {
        flex-direction: column;
        align-items: stretch;
    }
    .action-tray {
        flex-direction: column;
        align-items: stretch;
    }
    .action-tray-group {
        width: 100%;
        justify-content: stretch;
    }
    .action-btn {
        flex: 1;
        justify-content: center;
    }
    #fretboardCanvas {
        height: 180px;
    }
    #tablatureCanvas {
        height: 160px;
    }
    #spectralCanvas {
        height: 180px;
    }
}


/* =========================================================================
   Guitar Effects Rack (Stompbox Chain) & Split Routing Bay
   ========================================================================= */
.effects-rack-chassis {
    background: linear-gradient(180deg, #181920 0%, #111216 100%);
    border: 1px solid #2e2f3a;
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 8px;
}

.effects-rack-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding-bottom: 12px;
}

.effects-rack-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.effects-rack-icon {
    font-size: 22px;
    filter: drop-shadow(0 0 8px var(--led-cyan-dim));
}

.effects-rack-title {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-primary);
}

.effects-rack-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--led-cyan);
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.35);
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

/* Split Signal Routing Diagram */
.split-routing-hud {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    background: #090a0d;
    border: 1px solid #20222b;
    border-radius: 6px;
    padding: 6px 14px;
}

.routing-tap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.routing-tap-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.routing-tap-dot.raw {
    background: var(--led-cyan);
    box-shadow: 0 0 6px var(--led-cyan);
}
.routing-tap-dot.wet {
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
}

/* Pedalboard Grid Layout */
.pedalboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

/* Individual Stompbox Enclosure */
.stompbox-pedal {
    border-radius: 12px;
    padding: 18px 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 380px;
    box-shadow: 
        0 14px 28px rgba(0, 0, 0, 0.65),
        0 10px 10px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.8);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stompbox-pedal:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 18px 32px rgba(0, 0, 0, 0.75),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* 1. Tube Screamer: Classic Vintage TS Emerald Green */
.pedal-overdrive {
    background: linear-gradient(180deg, #14532d 0%, #166534 25%, #0f3d20 85%, #0a2916 100%);
    border: 2px solid #22c55e;
}
.pedal-overdrive .pedal-name {
    color: #bbf7d0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}
.pedal-overdrive .pedal-jewel-led.active {
    background: #22c55e;
    box-shadow: 0 0 16px #22c55e, inset 0 1px 2px #ffffff;
}

/* 1.5. Cabinet Simulator: Textured Vintage Charcoal / Slate Blue & Silver */
.pedal-cabsim {
    background: linear-gradient(180deg, #1e293b 0%, #334155 25%, #0f172a 85%, #020617 100%);
    border: 2px solid #38bdf8;
}
.pedal-cabsim .pedal-name {
    color: #e0f2fe;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}
.pedal-cabsim .pedal-jewel-led.active {
    background: #38bdf8;
    box-shadow: 0 0 16px #38bdf8, inset 0 1px 2px #ffffff;
}

.pedal-select {
    width: 100%;
    padding: 6px 10px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #f1f5f9;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s ease;
}
.pedal-select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

/* 2. Analog BBD Delay: Vintage Metallic Copper/Amber */
.pedal-delay {
    background: linear-gradient(180deg, #451a03 0%, #78350f 25%, #381502 85%, #240d02 100%);
    border: 2px solid #f59e0b;
}
.pedal-delay .pedal-name {
    color: #fef3c7;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}
.pedal-delay .pedal-jewel-led.active {
    background: #f59e0b;
    box-shadow: 0 0 16px #f59e0b, inset 0 1px 2px #ffffff;
}

/* 3. Studio Ambient Reverb: Deep Indigo / Violet Tank */
.pedal-reverb {
    background: linear-gradient(180deg, #1e1b4b 0%, #312e81 25%, #171438 85%, #0f0d24 100%);
    border: 2px solid #818cf8;
}
.pedal-reverb .pedal-name {
    color: #e0e7ff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}
.pedal-reverb .pedal-jewel-led.active {
    background: #818cf8;
    box-shadow: 0 0 16px #818cf8, inset 0 1px 2px #ffffff;
}

/* 4. Master Control Bay: Brushed Black Studio Rack */
.pedal-master {
    background: linear-gradient(180deg, #18181b 0%, #27272a 30%, #121215 85%, #09090b 100%);
    border: 2px solid #52525b;
}
.pedal-master .pedal-name {
    color: #f4f4f5;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}
.pedal-master .pedal-jewel-led.active {
    background: var(--led-cyan);
    box-shadow: 0 0 16px var(--led-cyan), inset 0 1px 2px #ffffff;
}

/* 5. Smart Backing Track: Vintage Crimson / Deep Ruby Velvet Enclosure */
.pedal-backingtrack {
    background: linear-gradient(180deg, #4c0519 0%, #881337 25%, #3b0717 85%, #1f040c 100%);
    border: 2px solid #f43f5e;
}
.pedal-backingtrack .pedal-name {
    color: #ffe4e6;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}
.pedal-backingtrack .pedal-jewel-led.active {
    background: #f43f5e;
    box-shadow: 0 0 16px #f43f5e, inset 0 1px 2px #ffffff;
}
.pedal-backingtrack .pedal-slider {
    accent-color: #f43f5e;
}
.backing-readout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(244, 63, 94, 0.4);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: #fda4af;
    margin-bottom: 6px;
    width: 100%;
    justify-content: space-between;
}
.backing-mute-group {
    display: flex;
    gap: 4px;
    align-items: center;
}
.backing-mute-btn {
    padding: 2px 6px;
    font-size: 9px;
    font-family: var(--font-mono);
    border-radius: 4px;
    background: #27272a;
    border: 1px solid #3f3f46;
    color: #a1a1aa;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.15s ease;
}
.backing-mute-btn.active {
    background: #e11d48;
    color: #ffffff;
    border-color: #f43f5e;
    box-shadow: 0 0 6px rgba(244, 63, 94, 0.5);
}

/* Stompbox Top Badge & Pilot Light */
.pedal-top-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.pedal-branding {
    display: flex;
    flex-direction: column;
}

.pedal-name {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.pedal-subtitle {
    font-family: var(--font-mono);
    font-size: 9px;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.pedal-jewel-led {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #1c1c22;
    border: 2px solid #3f3f46;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9);
    transition: all 0.15s ease;
}

/* Stompbox Knobs / Controls Section */
.pedal-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.pedal-knob-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pedal-knob-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pedal-val-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1px 6px;
    border-radius: 3px;
    min-width: 44px;
    text-align: right;
}

.pedal-slider {
    width: 100%;
    accent-color: var(--led-cyan);
    cursor: pointer;
}
.pedal-overdrive .pedal-slider { accent-color: #22c55e; }
.pedal-delay .pedal-slider { accent-color: #f59e0b; }
.pedal-reverb .pedal-slider { accent-color: #818cf8; }
.pedal-master .pedal-slider { accent-color: var(--led-cyan); }

/* Stompbox Footswitch Bay */
.pedal-footswitch-bay {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.pedal-footswitch {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #888894 0%, #4a4a55 50%, #202026 100%);
    border: 3px solid #b4b4c4;
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.8),
        inset 0 2px 4px rgba(255, 255, 255, 0.6),
        inset 0 -3px 6px rgba(0, 0, 0, 0.8);
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.08s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
}

.pedal-footswitch::after {
    content: '';
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, #52525e 0%, #2b2b33 70%, #16161a 100%);
    border: 1px solid #717182;
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.3);
}

.pedal-footswitch:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

.pedal-footswitch:active {
    transform: scale(0.96) translateY(2px);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.9),
        inset 0 3px 6px rgba(0, 0, 0, 0.9);
}

.pedal-switch-status {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.pedal-switch-status.active {
    color: #ffffff;
    font-weight: 800;
}

/* Master Options Buttons */
.master-options-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.master-toggle-btn {
    background: #1f1f26;
    border: 1px solid #3f3f4a;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.15s ease;
}

.master-toggle-btn:hover {
    border-color: #626274;
    color: var(--text-primary);
}

.master-toggle-btn.active {
    background: rgba(6, 182, 212, 0.18);
    border-color: var(--led-cyan);
    color: var(--led-cyan);
}


/* =========================================================================
   Virtual Strobe Tuner & Acoustic Inharmonicity Analyzer
   ========================================================================= */

.strobe-analyzer-panel {
    border-color: rgba(0, 243, 255, 0.25);
    background: linear-gradient(180deg, #161820 0%, #111318 100%);
}

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

.strobe-analyzer-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 1024px) {
    .strobe-analyzer-grid {
        grid-template-columns: 1fr;
    }
}

.strobe-canvas-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: #0a0d14;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 16px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.7);
}

#strobeCanvas {
    display: block;
    width: 340px;
    height: 340px;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 243, 255, 0.12);
}

.strobe-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    font-size: 11px;
    color: var(--text-secondary);
    background: #111622;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #1e293b;
}

.inharmonicity-dashboard {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.inharm-card {
    background: #141824;
    border: 1px solid #232d42;
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}

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

.wear-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wear-fresh {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid #10b981;
}

.wear-good {
    background: rgba(0, 243, 255, 0.15);
    color: #00f3ff;
    border: 1px solid #00f3ff;
}

.wear-aged {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid #f59e0b;
}

.wear-worn {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid #ef4444;
}

/* Wear Gauge Bar */
.gauge-bar-track {
    position: relative;
    width: 100%;
    height: 14px;
    background: #090c12;
    border-radius: 7px;
    border: 1px solid #1e293b;
    overflow: visible;
    margin-top: 4px;
    margin-bottom: 24px;
}

.gauge-bar-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, #10b981 0%, #00f3ff 35%, #f59e0b 70%, #ef4444 100%);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.gauge-markers {
    position: absolute;
    top: 18px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-muted);
}

.gauge-markers .marker-fresh { color: #10b981; }
.gauge-markers .marker-good  { color: #00f3ff; }
.gauge-markers .marker-aged  { color: #f59e0b; }
.gauge-markers .marker-worn  { color: #ef4444; }

/* Metrics Grid */
.inharm-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media (max-width: 640px) {
    .inharm-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.metric-box {
    background: #0d111a;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

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

.metric-val {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Partials Table */
.peaks-table-wrap {
    overflow-x: auto;
}

.peaks-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: 11px;
}

.peaks-table th {
    text-align: left;
    padding: 8px 12px;
    background: #0d111a;
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 1px solid #1e293b;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
}

.peaks-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #1a2233;
    color: var(--text-secondary);
}

.peaks-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Demo Pluck Buttons */
.pluck-buttons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pluck-btn {
    flex: 1;
    min-width: 180px;
    background: #1e2536;
    border: 1px solid #334155;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    padding: 9px 14px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.pluck-btn:hover {
    background: #2a344d;
    border-color: var(--led-cyan);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.pluck-btn:active {
    transform: translateY(1px);
}

.pluck-btn .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.fresh-dot  { background: #10b981; box-shadow: 0 0 6px #10b981; }
.normal-dot { background: #00f3ff; box-shadow: 0 0 6px #00f3ff; }
.worn-dot   { background: #ef4444; box-shadow: 0 0 6px #ef4444; }

/* ==========================================================================
   POLYPHONIC CHORD RECOGNITION & SCALE RECOMMENDATION HUD RIBBON
   ========================================================================== */

.chord-scale-ribbon {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: linear-gradient(180deg, #16161b 0%, #101014 100%);
    border-bottom: 1px solid var(--chassis-border);
    font-family: var(--font-sans);
}

.chord-detection-cluster {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chord-badge {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 800;
    color: var(--led-cyan);
    background: rgba(0, 243, 255, 0.12);
    border: 1.5px solid var(--led-cyan);
    border-radius: var(--radius-sm);
    padding: 3px 10px;
    text-shadow: 0 0 8px var(--led-cyan-glow);
    box-shadow: 0 0 12px rgba(0, 243, 255, 0.2);
    letter-spacing: 0.5px;
    min-width: 52px;
    text-align: center;
    transition: all 0.2s ease;
}

.chord-metric-pill {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    padding: 3px 8px;
}

.scale-recommendation-cluster {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 220px;
}

.scale-recommendation-pill {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 700;
    color: #ffd166;
    background: rgba(255, 209, 102, 0.10);
    border: 1px solid rgba(255, 209, 102, 0.35);
    border-radius: var(--radius-sm);
    padding: 4px 12px;
    text-shadow: 0 0 8px rgba(255, 209, 102, 0.3);
    white-space: nowrap;
}

.scale-tools-cluster {
    display: flex;
    align-items: center;
    gap: 8px;
}

.scale-legend-cluster {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 8px;
    border-left: 1px solid var(--chassis-border);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.dot-target {
    background: #00f3ff;
    box-shadow: 0 0 6px #00f3ff;
    border: 1px solid #ffffff;
}

.dot-passing {
    background: #10b981;
    box-shadow: 0 0 5px #10b981;
}

.dot-avoid {
    background: #ef4444;
    box-shadow: 0 0 4px #ef4444;
}
