:root {
    --bg-core: #050505;
    --bg-panel: #0b0b0b;
    --bg-card: #141414;
    --neon-cyan: #00f3ff;
    --neon-cyan-dim: rgba(0, 243, 255, 0.2);
    --neon-orange: #ff9e00;
    --neon-red: #ff003c;
    --neon-green: #00ff33;
    --neon-yellow: #eeff00;
    --text-main: #e0e0e0;
    --text-muted: #888;
    --font-head: 'Orbitron', sans-serif;
    --font-code: 'Roboto Mono', monospace;
    --manual-highlight: #00f3ff; 
    --manual-location: #ff9e00; /* NOVÁ BARVA PRO KONTEXT UMÍSTĚNÍ */
}

/* Globální scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; background: #000; } 
::-webkit-scrollbar-thumb { background: #333; border: 1px solid #444; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--neon-cyan); }
::-webkit-scrollbar-corner { background: #000; }

/* Skrytí šipek u číselných inputů */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

* { box-sizing: border-box; user-select: none; }
body { 
    margin: 0; padding: 0; 
    background-color: var(--bg-core); 
    color: var(--text-main); 
    font-family: var(--font-code); 
    overflow: hidden; 
    height: 100vh; 
    font-size: 12px; 
}

.app-container { display: flex; flex-direction: column; height: 100vh; }

/* --- SLIDERS --- */
input[type=range] {
    -webkit-appearance: none; /* Pro WebKit */
    width: 100%; 
    margin: 5px 0; 
    cursor: pointer;
    background: transparent; /* Důležité pro Firefox, jinak má bílé pozadí */
}

input[type=range]:focus { outline: none; }

/* --- 1. WEBKIT (Chrome, Edge, Safari, iOS) --- */
input[type=range]::-webkit-slider-runnable-track {
    width: 100%; 
    height: 6px; 
    background: #111; 
    border: 1px solid #333; 
    border-radius: 3px; 
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.8);
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 14px; 
    width: 8px; 
    border-radius: 2px; 
    background: var(--neon-cyan); 
    cursor: pointer; 
    margin-top: -5px; /* Zarovnání na střed dráhy ve WebKitu */
    box-shadow: 0 0 8px var(--neon-cyan); 
    border: 1px solid #fff; 
    transition: transform 0.1s, background 0.2s;
}

input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); background: #fff; }

/* --- 2. FIREFOX (Fix pro neviditelné dráhy) --- */
input[type=range]::-moz-range-track {
    width: 100%; 
    height: 6px; 
    background: #111; 
    border: 1px solid #333; 
    border-radius: 3px; 
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.8);
}

input[type=range]::-moz-range-thumb {
    height: 14px; 
    width: 8px; 
    border: none; /* Firefox má defaultně border, musíme resetovat */
    border-radius: 2px; 
    background: var(--neon-cyan); 
    cursor: pointer; 
    box-shadow: 0 0 8px var(--neon-cyan); 
    border: 1px solid #fff; 
    transition: transform 0.1s, background 0.2s;
}

input[type=range]::-moz-range-thumb:hover { transform: scale(1.2); background: #fff; }

/* Volitelné: Firefox umí vyplnit barvu "za" posuvníkem (Progress bar) */
input[type=range]::-moz-range-progress {
    background-color: #222; 
    height: 6px;
    border-radius: 3px;
}

/* --- BAREVNÉ VARIANTY (Musíme definovat pro oba prohlížeče zvlášť) --- */

/* Attack & Release (Zelená) */
#ctrl-attack::-webkit-slider-thumb, #ctrl-release::-webkit-slider-thumb { 
    background: var(--neon-green); box-shadow: 0 0 8px var(--neon-green); 
}
#ctrl-attack::-moz-range-thumb, #ctrl-release::-moz-range-thumb { 
    background: var(--neon-green); box-shadow: 0 0 8px var(--neon-green); 
}

/* Cutoff & Res (Oranžová) */
#ctrl-cutoff::-webkit-slider-thumb, #ctrl-res::-webkit-slider-thumb { 
    background: var(--neon-orange); box-shadow: 0 0 8px var(--neon-orange); 
}
#ctrl-cutoff::-moz-range-thumb, #ctrl-res::-moz-range-thumb { 
    background: var(--neon-orange); box-shadow: 0 0 8px var(--neon-orange); 
}

/* Delay & Reverb (Fialová) */
#ctrl-delay::-webkit-slider-thumb, #ctrl-reverb::-webkit-slider-thumb { 
    background: #cc00ff; box-shadow: 0 0 8px #cc00ff; 
}
#ctrl-delay::-moz-range-thumb, #ctrl-reverb::-moz-range-thumb { 
    background: #cc00ff; box-shadow: 0 0 8px #cc00ff; 
}

/* Master Volume (Bílá) */
#master-vol-ctrl { accent-color: #fff; } /* Moderní vlastnost, funguje všude pro základní barvu */
#master-vol-ctrl::-webkit-slider-thumb { background: #fff; box-shadow: 0 0 10px rgba(255,255,255,0.5); }
#master-vol-ctrl::-moz-range-thumb   { background: #fff; box-shadow: 0 0 10px rgba(255,255,255,0.5); }

/* Mini Sliders v track listu */
.mini-slider::-webkit-slider-thumb { -webkit-appearance: none; height: 12px; width: 6px; background: #fff; border-radius: 2px; cursor: pointer; margin-top: -3px; box-shadow: 0 0 4px #fff; }
.mini-slider::-moz-range-thumb     { height: 12px; width: 6px; background: #fff; border: none; border-radius: 2px; cursor: pointer; box-shadow: 0 0 4px #fff; }

.mini-slider:hover::-webkit-slider-thumb { background: var(--neon-cyan); box-shadow: 0 0 6px var(--neon-cyan); }
.mini-slider:hover::-moz-range-thumb     { background: var(--neon-cyan); box-shadow: 0 0 6px var(--neon-cyan); }

/* --- TOP BAR --- */
.top-bar { 
    height: auto; min-height: 165px; background: var(--bg-panel); border-bottom: 1px solid var(--neon-cyan-dim); 
    display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; 
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.05); flex-shrink: 0; z-index: 100; transition: min-height 0.3s ease; flex-wrap: nowrap; 
}

.header-group { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.header-group.left { justify-content: flex-start; }
.header-group.right { justify-content: flex-end; margin-left: auto; }

.header-center-controls {
    display: flex; align-items: center; justify-content: center; flex-grow: 1; gap: 10px; margin-right: 30px; margin-left: 10px; width: auto !important; margin: 0 !important;
}

.logo-section { padding-left: 15px; }
.logo-section h1 { font-family: var(--font-head); font-size: 32px; margin: 0; letter-spacing: 2px; }
.highlight { color: var(--neon-cyan); text-shadow: none; }

/* --- NOVÁ TŘÍDA PRO UMÍSTĚNÍ V MANUÁLU --- */
.loc {
    font-size: 10px;
    font-weight: bold;
    color: var(--manual-location); 
    border: 1px solid var(--manual-location);
    padding: 2px 6px;
    margin-left: 10px;
    border-radius: 3px;
    letter-spacing: 1px;
    vertical-align: middle;
}

.project-controls.compact-block { 
    display: flex; gap: 4px; align-items: center; border-right: 1px solid #333; padding-right: 10px; margin-right: 0; 
    min-width: 200px; justify-content: center;
}
.transport-controls.compact-block { 
    display: flex; gap: 4px; align-items: center; border-right: 1px solid #333; padding-right: 10px; margin-right: 0; 
    min-width: 160px; justify-content: center;
}
.transport-controls { display: flex; gap: 10px; align-items: center; } 

#master-viz {
    background: #000; border: 1px solid #333; border-radius: 4px; margin-left: 10px; box-shadow: inset 0 0 10px rgba(0,0,0,0.8); 
}

/* --- BUTTONS --- */
.btn-transport { 
    background: #000; border: 1px solid #333; color: #555; font-size: 16px; width: 35px; height: 35px; border-radius: 50%; cursor: pointer; transition: all 0.2s; display: grid; place-items: center; padding: 0; line-height: 1; 
}
.btn-transport:hover { color: #fff; border-color: #666; transform: scale(1.05); }

.btn-play { width: 50px; height: 50px; font-size: 22px; border: 2px solid #444; text-indent: 4px; padding-top: 1px; padding-right: 1px; }
.btn-play:hover { color: var(--neon-cyan); border-color: var(--neon-cyan); }
.btn-play.playing { color: var(--neon-cyan); border-color: var(--neon-cyan); box-shadow: 0 0 20px rgba(0, 243, 255, 0.4), inset 0 0 10px rgba(0, 243, 255, 0.2); animation: pulsePlay 1.5s infinite; }
.btn-rec.recording { background: var(--neon-red); color: #000; border-color: var(--neon-red); box-shadow: 0 0 15px var(--neon-red); animation: pulse 1s infinite; }

#btn-stop { padding-bottom: 2px; }
#btn-rec { padding-bottom: 1px; }

.btn-icon-only { width: 20px !important; height: 30px !important; min-width: 20px !important; padding: 0 !important; font-size: 18px !important; font-weight: normal !important; display: grid !important; place-items: center !important; line-height: 1 !important; }
.btn-icon-only:disabled { opacity: 0.3; cursor: default; border-color: #333 !important; color: #555 !important; background: transparent !important; box-shadow: none !important; }

.btn-transport.compact-help { font-size: 14px; width: 30px; height: 30px; border-radius: 4px; align-self: center; margin-left: 0; margin-top: 0; }

@keyframes pulsePlay {
    0% { box-shadow: 0 0 15px rgba(0, 243, 255, 0.3); }
    50% { box-shadow: 0 0 25px rgba(0, 243, 255, 0.6); }
    100% { box-shadow: 0 0 15px rgba(0, 243, 255, 0.3); }
}

/* --- GLOBAL PARAMS --- */
.global-params.compact-block { 
    display: flex; gap: 15px; align-items: center; border-right: none; padding-right: 0; margin-right: 0; 
    min-width: 220px; justify-content: center;
}
.global-params .param-group:not(.master-filter-group) { padding-right: 15px; border-right: 1px solid #333; }
.global-params .master-filter-group { padding-right: 0; border-right: none; }

.param-group { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; white-space: nowrap; }
.param-group label { font-size: 10px; color: var(--neon-cyan); margin-bottom: 5px; font-family: var(--font-head); }
.cyber-input { background: #000; border: 1px solid var(--neon-cyan); color: var(--neon-cyan); padding: 5px; width: 60px; text-align: center; font-family: var(--font-code); border-radius: 2px; }
.master-filter-group { width: 100px; }

/* Timing & Master Columns */
.master-column { display: flex; flex-direction: column; gap: 8px; justify-content: center; padding-left: 0px; padding-right: 15px; border-left: none; }
.master-row { display: flex; align-items: center; gap: 10px; }
.master-row label { font-size: 10px; color: var(--neon-cyan); font-family: var(--font-head); font-weight: bold; width: 25px; text-align: right; margin: 0; }

.timing-column { display: flex; flex-direction: column; gap: 6px; justify-content: center; padding-right: 15px; border-right: 1px solid #333; padding-left: 0px; }
.timing-row { display: flex; align-items: center; gap: 8px; }
.timing-row label { text-align: right; font-size: 10px; color: var(--neon-cyan); font-family: var(--font-head); font-weight: bold; margin: 0; }
.timing-row .cyber-input { width: 50px !important; height: 20px; padding: 0; font-size: 11px; }

/* --- STEPPER (UNIFIKOVANÝ PRO KROKY I OKTÁVU) --- */
.stepper { display: flex; align-items: center; gap: 2px; }

.stepper button { 
    width: 18px; 
    height: 18px; 
    line-height: 1; 
    padding: 0; 
    font-size: 12px; 
    background: #333; 
    border: none; 
    color: #fff; 
    cursor: pointer; 
    border-radius: 2px;
    display: flex;             /* Centrování */
    align-items: center;       /* Centrování */
    justify-content: center;   /* Centrování */
}
.stepper button:hover { background: #555; }

.stepper span { 
    font-size: 11px; 
    min-width: 20px; 
    padding: 0 4px; 
    line-height: 18px; 
    background: #000; 
    display: inline-block; 
    text-align: center; 
    border-radius: 2px; 
}

.lang-switch { display: flex; gap: 8px; margin-left: 15px; padding-bottom: 2px; }
.lang-btn { font-size: 10px; color: #444; cursor: pointer; font-weight: bold; transition: all 0.2s; border-bottom: 1px solid transparent; }
.lang-btn:hover { color: #fff; }
.lang-btn.active { color: var(--neon-cyan); text-shadow: 0 0 5px var(--neon-cyan-dim); border-bottom: 1px solid var(--neon-cyan); }

/* --- PATTERN SECTION --- */
.pattern-section { 
    display: flex; flex-direction: column; background: rgba(0,0,0,0.5); padding: 5px; border: 1px solid #222; 
    border-radius: 4px; width: 280px; height: auto; min-height: 125px; justify-content: flex-start; gap: 4px; 
    flex-shrink: 0; margin-top: 0px; align-self: center; 
}
.pattern-label { font-size: 9px; color: var(--text-muted); letter-spacing: 2px; width: 100%; border-bottom: 1px solid #222; padding-bottom: 2px; margin-bottom: 2px; }

.pattern-grid { 
    display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; width: 100%; height: 85px; overflow-y: auto; padding-right: 10px; margin-bottom: 5px; align-content: start; 
}
.pattern-grid::-webkit-scrollbar { width: 8px; height: 8px; } 

.btn-pat, .btn-pat-add { 
    width: 100%; min-width: 25px; height: 25px; background: #111; border: 1px solid #333; color: #666; font-family: var(--font-code); 
    font-size: 9px; cursor: grab; display: flex; align-items: center; justify-content: center; position: relative; border-radius: 2px; transition: all 0.2s;
}
.btn-pat:active { cursor: grabbing; transform: scale(0.95); }
.btn-pat:hover { border-color: var(--neon-cyan); color: #fff; background: #1a1a1a; }
.btn-pat.active { background: var(--neon-cyan); color: #000; border-color: #fff; box-shadow: 0 0 12px var(--neon-cyan-dim); }
.btn-pat.has-data::after { content: ''; position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%); width: 8px; height: 1px; background: var(--neon-orange); border-radius: 1px; }
.btn-pat.drag-over { border: 2px dashed #fff; opacity: 0.5; }
.btn-pat.song-active { background: var(--neon-orange) !important; color: #000 !important; border-color: #fff; box-shadow: 0 0 15px var(--neon-orange); animation: patPulse 0.5s ease-in-out infinite alternate; font-weight: bold; }

.btn-pat-add { background: #080808; border: 1px dashed #444; color: #555; cursor: pointer; font-size: 14px; }
.btn-pat-add:hover { border-color: var(--neon-green); color: var(--neon-green); background: rgba(0, 255, 51, 0.05); }

.pattern-funcs { display: flex; gap: 4px; width: 100%; margin-top: auto; border-top: 1px solid #222; padding-top: 4px; } 
.btn-tiny-func { background: #111; border: 1px solid #444; color: #888; font-size: 9px; cursor: pointer; flex: 1; padding: 4px 0; border-radius: 2px; transition: 0.2s; letter-spacing: 1px; }
.btn-tiny-func:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); background: #181818; }
#btn-song-mode.active { background: var(--neon-orange); color: #000 !important; font-weight: bold; box-shadow: 0 0 10px rgba(255, 158, 0, 0.3); }

@keyframes patPulse { from { box-shadow: 0 0 5px var(--neon-orange); transform: scale(1); } to { box-shadow: 0 0 15px var(--neon-orange); transform: scale(1.05); } }

/* --- SONG TIMELINE --- */
.timeline-bar { height: auto; min-height: 60px; background: #000; border-bottom: 1px solid #333; display: flex; align-items: flex-start; padding: 0 20px; gap: 15px; flex-shrink: 0; transition: min-height 0.1s; }
.timeline-label { color: var(--neon-orange); font-size: 10px; font-weight: bold; white-space: nowrap; margin-top: 18px; }
.timeline-middle-wrapper { flex: 1; display: flex; flex-direction: column; overflow: hidden; justify-content: flex-start; gap: 0px; }
.timeline-track { display: flex; gap: 2px; overflow-x: auto; overflow-y: hidden; height: auto; min-height: 44px; padding-top: 4px; padding-bottom: 2px; margin-bottom: 4px; align-items: flex-start; width: 100%; }
.timeline-track::-webkit-scrollbar { height: 10px; } 
.timeline-track::-webkit-scrollbar-thumb { background: #222; border-radius: 5px; border: 1px solid #333; }
.timeline-track::-webkit-scrollbar-thumb:hover { background: var(--neon-cyan); }
.timeline-info { font-size: 10px; color: #666; font-family: var(--font-code); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1; margin-top: 0px; padding-left: 2px; padding-bottom: 2px; }
#btn-clear-song { margin-top: 12px; }

.song-block { 
    background: #111; border: 1px solid #444; color: #888; padding: 2px; font-size: 9px; cursor: pointer; min-width: 40px; min-height: 38px; text-align: center; 
    display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 2px; flex-shrink: 0; line-height: 1; cursor: grab; transition: all 0.1s; margin-bottom: 0px; 
}
.song-block span { background: rgba(255, 255, 255, 0.1); padding: 2px 4px; border-radius: 2px; color: #ccc; font-weight: bold; }
.song-block:active { cursor: grabbing; transform: scale(0.98); }
.song-block:hover { border-color: #fff; color: #fff; background: #1a1a1a; }
.song-block.active { background: var(--neon-orange); color: #000; border-color: var(--neon-orange); }
.song-block.active span { background: rgba(0,0,0,0.2); color: #000; }
.song-block.drag-over { border: 2px dashed var(--neon-cyan); opacity: 0.8; background: #111; }
.empty-msg { color: #444; font-size: 10px; font-style: italic; margin-top: 13px; }

/* --- CONTEXT BAR --- */
.context-bar { height: 45px; background: var(--bg-panel); border-bottom: 1px solid #333; display: flex; align-items: center; padding: 0 15px; gap: 20px; flex-shrink: 0; width: 100%; z-index: 20; transition: height 0.3s ease; }

/* ZMĚNA: Fixní šířka pro tool-label, aby neodskakovala */
.tool-label { 
    font-size: 11px; color: var(--text-muted); 
    width: 80px; min-width: 80px; text-align: right; display: inline-block; margin-right: 10px; 
}

/* TLAČÍTKA NÁSTROJŮ (DIST, ECHO, DRAW) - FIXNÍ VÝŠKA */
.btn-tool, .btn-toggle { 
    background: transparent; 
    border: 1px solid #444; 
    color: #fff; 
    padding: 0 12px;     /* Změna paddingu pro fixní výšku */
    height: 25px;        /* Fixní výška 25px */
    display: inline-flex;/* Centrování textu */
    align-items: center; /* Centrování textu */
    justify-content: center;
    cursor: pointer; 
    font-family: var(--font-code); 
    margin-right: 0px; 
    font-size: 11px; 
    border-radius: 2px; 
}
#btn-dist { color: var(--neon-red); border-color: var(--neon-red); }
#btn-echo { color: #cc00ff; border-color: #cc00ff; }
#btn-bit { color: var(--neon-yellow); border-color: var(--neon-yellow); }
#btn-bit.active { background: var(--neon-yellow) !important; color: #000 !important; box-shadow: 0 0 10px var(--neon-yellow) !important; border-color: var(--neon-yellow) !important; }
.btn-toggle.active { background: var(--neon-cyan); color: #000; box-shadow: 0 0 10px var(--neon-cyan); border-color: var(--neon-cyan); }
#btn-dist.active { background: var(--neon-red) !important; color: #000 !important; box-shadow: 0 0 10px var(--neon-red) !important; border-color: var(--neon-red) !important; }
#btn-echo.active { background: #cc00ff !important; color: #000 !important; box-shadow: 0 0 10px #cc00ff !important; border-color: #cc00ff !important; }
.tool-settings { display: flex; gap: 15px; align-items: center; }
.setting-item { display: flex; align-items: center; gap: 4px; font-size: 11px; }

/* --- CYBER SELECT (LENGTH) - FIXNÍ VÝŠKA --- */
.cyber-select { 
    background: #000; 
    color: var(--neon-cyan); 
    border: 1px solid var(--neon-cyan); /* Změna z #444 na neon-cyan */
    padding: 0 5px;      /* Změna paddingu pro fixní výšku */
    font-family: var(--font-code); 
    border-radius: 2px; 
    height: 25px;        /* Fixní výška 25px (stejná jako tlačítka) */
    font-size: 11px;     /* Stejná velikost písma jako tlačítka */
    cursor: pointer;
    outline: none;
}

/* --- WORKSPACE & PANELS --- */
.workspace { flex: 1; display: flex; overflow: hidden; }

.left-panel { width: 240px; background: var(--bg-panel); border-right: 1px solid #333; display: flex; flex-direction: column; padding: 10px; overflow: hidden; flex-shrink: 0; }
.center-panel { flex: 1; background-color: #080808; overflow: hidden; position: relative; display: flex; flex-direction: column; }
#canvas-wrapper { flex: 1; width: 100%; position: relative; overflow: hidden; background: #000; box-shadow: inset 0 0 50px rgba(0,0,0,0.8); border-top: 1px solid #222; }
#grid-canvas { display: block; width: 100%; height: 100%; }

/* --- RIGHT PANEL (Sound Library) - ROZŠÍŘENÝ --- */
.right-panel { 
    width: 310px; /* Rozšířeno na 310px */
    background: var(--bg-panel); 
    border-left: 1px solid #333; 
    display: flex; flex-direction: column; 
    padding: 10px 5px 10px 10px; 
    overflow-y: auto; flex-shrink: 0; 
}

.panel-header { font-size: 14px; color: var(--neon-cyan); border-bottom: 1px solid var(--neon-cyan-dim); padding-bottom: 5px; margin-bottom: 5px; font-family: var(--font-head); letter-spacing: 1px; flex-shrink: 0; }
.panel-header-centered { display: flex; justify-content: center; align-items: center; gap: 10px; border-bottom: 1px solid var(--neon-cyan-dim); padding-bottom: 5px; margin-bottom: 8px; width: 100%; }
.panel-header-small { font-family: var(--font-head); font-size: 11px; color: var(--neon-cyan); letter-spacing: 1px; border: none; padding: 0; margin: 0; }
.btn-reset-style { width: 28px; height: 18px; font-size: 9px; background: transparent; color: var(--neon-orange); border: 1px solid var(--neon-orange); border-radius: 2px; cursor: pointer; transition: 0.2s; line-height: 1; display: flex; align-items: center; justify-content: center; }
.btn-reset-style:hover { background: var(--neon-orange); color: #000; box-shadow: 0 0 8px var(--neon-orange); }

.sound-categories { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 10px; }
.btn-cat { background: #111; border: 1px solid #333; color: #666; font-size: 10px; padding: 4px 8px; cursor: pointer; text-align: center; border-radius: 2px; min-width: 40px; transition: all 0.2s; }
.btn-cat:hover { color: #fff; border-color: #555; }
.btn-cat.active { color: #000 !important; font-weight: bold; border-color: #fff !important; box-shadow: 0 0 8px currentColor; }

.sound-list { flex: 1; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; align-content: flex-start; margin-bottom: 10px; padding-right: 8px; }
.sound-list::-webkit-scrollbar { width: 8px; } 

/* --- NOVÉ TLAČÍTKO ZVUKU (GRID) --- */
.sound-btn-mini { 
    background: #151515; border: 1px solid #333; color: #aaa; padding: 0; margin: 0; font-size: 10px; cursor: pointer; transition: 0.1s; height: 42px; border-radius: 3px; overflow: hidden; 
    display: grid; grid-template-columns: 1fr 35px; /* Rozdělení: Preview | Controls */
}
.sound-btn-mini:hover { border-color: #fff !important; } /* Zvýraznění okraje při najetí */
.sound-btn-mini.selected { border: 1px solid #fff !important; background-color: #222 !important; box-shadow: 0 0 8px rgba(255,255,255,0.2); }

/* Levá část (Preview) */
.sb-preview { display: flex; flex-direction: column; justify-content: center; padding-left: 8px; height: 100%; }
.sb-preview:hover { background-color: rgba(255,255,255,0.05); }
.sound-btn-mini .sound-name { font-weight: bold; font-size: 10px; line-height: 1.2; pointer-events: none; }
.sound-btn-mini .sound-id { font-size: 8px; color: inherit; opacity: 0.6; pointer-events: none; margin-top: 2px; }
.sb-preview.previewing { background-color: #fff !important; color: #000 !important; }
.sb-preview.previewing .sound-name, .sb-preview.previewing .sound-id { color: #000 !important; }

/* Pravá část (Controls) - VRÁCENO NA SLOUPEC */
.sb-controls { 
    display: flex; 
    flex-direction: column; /* Zpět pod sebe */
    border-left: 1px solid currentColor; 
    height: 100%; 
}

/* --- TLAČÍTKO SET (2/3 výšky) --- */
.btn-set-mini { 
    flex: 2; /* Zabírá 2 díly výšky */
    background: transparent; 
    border: none; 
    border-bottom: 1px solid currentColor; /* Oddělovač vespod */
    border-right: none; /* Žádný oddělovač vpravo */
    color: inherit; 
    font-size: 8px; 
    font-weight: bold; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: 0.2s; 
    font-family: var(--font-head); 
}
.btn-set-mini:hover { 
    background-color: #fff !important; 
    color: #000 !important; 
    box-shadow: 0 0 10px #fff; 
}

/* --- FAV ICON (1/3 výšky) --- */
.fav-icon-mini { 
    flex: 1; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    
    font-size: 14px; 
    width: 100%;           /* ZMĚNA: Roztáhne se na celou šířku sloupce (oprava klikání) */
    height: 100%;          /* ZMĚNA: Roztáhne se i na výšku */
    text-align: center;
    line-height: 1;
    
    cursor: pointer; 
    transition: all 0.2s; 
    color: inherit; 
    opacity: 0.4; 
}

.fav-icon-mini:hover { 
    background-color: rgba(255,255,255,0.15); 
    opacity: 1; 
    color: var(--neon-red); 
    transform: scale(1.1); 
}

/* AKTIVNÍ OBLÍBENÉ (Vyplněné srdce) */
.sound-btn-mini.is-fav .fav-icon-mini { 
    /* ZMĚNA BARVY: Bílé srdce je na barevném pozadí lépe vidět */
    color: #ffffff; 
    
    /* Silná červená záře */
    text-shadow: 0 0 5px var(--neon-red), 0 0 10px var(--neon-red); 
    
    /* Jemné tmavé pozadí pod ikonou pro maximální kontrast */
    background-color: rgba(0, 0, 0, 0.4); 
    
    opacity: 1; 
}

.panel-section { margin-top: auto; border-top: 1px solid #333; padding-top: 10px; display: flex; gap: 5px; }
.btn-action { background: var(--neon-cyan-dim); border: 1px solid var(--neon-cyan); color: var(--neon-cyan); padding: 8px; cursor: pointer; font-family: var(--font-head); font-size: 10px; flex: 1; white-space: nowrap; transition: 0.2s; }
.btn-action:hover { background: var(--neon-cyan); color: #000; box-shadow: 0 0 10px var(--neon-cyan-dim); }
.btn-aidj { background: rgba(255, 158, 0, 0.2); border: 1px solid var(--neon-orange); color: var(--neon-orange); }
.btn-aidj:hover { background: var(--neon-orange); color: #000; box-shadow: 0 0 10px rgba(255, 158, 0, 0.3); }

/* --- TRACK LIST & CARDS --- */
.track-list { flex: 1; overflow-y: auto; overflow-x: hidden; padding-right: 5px; }
.track-card { background: linear-gradient(90deg, #141414 0%, #0b0b0b 100%); border-left: 4px solid #444; padding: 10px; margin-bottom: 8px; transition: 0.2s; cursor: pointer; border-radius: 0 4px 4px 0; box-shadow: 0 0 5px rgba(0,0,0,0.5); }
.track-card:hover { background: #1a1a1a; }
.track-card.active { border-left-width: 6px; transform: translateX(4px); background: #1f1f1f; box-shadow: 0 0 15px var(--neon-cyan-dim); }
.track-card.drag-over { border: 2px dashed #fff !important; background: #333 !important; opacity: 1 !important; transform: scale(1.02); z-index: 100; box-shadow: 0 0 15px rgba(255, 255, 255, 0.3); }
.track-card.drag-over .track-base-name::after { content: ' (DROP AUDIO)'; color: var(--neon-green); font-size: 10px; margin-left: 5px; }
.track-card.drag-over * { pointer-events: none !important; }

.track-info { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; font-size: 12px; font-weight: bold; }
.track-name-wrapper { display: flex; flex-direction: column; line-height: 1.1; padding-bottom: 0; max-width: 155px; min-width: 0; }
.track-base-name { display: block; line-height: 1.1; font-weight: bold; }
.copy-suffix.left-panel-suffix { font-size: 9px; opacity: 0.7; font-weight: normal; white-space: nowrap; display: block; margin-top: 1px; line-height: 1; overflow: hidden; text-overflow: ellipsis; }
.copy-suffix.active-track-suffix { font-size: 10px; opacity: 0.7; font-weight: normal; display: block; margin-top: 2px; line-height: 1; text-transform: none; }
.track-info-buttons { display: flex; align-items: center; } 
.track-controls { display: flex; gap: 6px; align-items: center; margin-top: 5px; }

.btn-tiny { background: #222; border: 1px solid #444; color: #aaa; font-size: 10px; width: 26px; height: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 3px; font-weight: bold; }
.btn-del { color: #f55; border-color: #522; width: 20px; } .btn-del:hover { background: #f00; color: #fff; }
.btn-clone { color: var(--neon-cyan); border-color: var(--neon-cyan); width: 20px; font-size: 12px; } .btn-clone:hover { background: var(--neon-cyan); color: #000; }
.active-mute { background: var(--neon-red) !important; color: #fff !important; border-color: transparent; box-shadow: 0 0 5px var(--neon-red); }
.active-solo { background: var(--neon-orange) !important; color: #000 !important; border-color: transparent; box-shadow: 0 0 5px var(--neon-orange); }

.btn-add-track { margin-bottom: 10px; flex-shrink: 0; width: 100%; padding: 10px; background: transparent; border: 1px dashed #555; color: #888; border-radius: 2px; cursor: pointer; transition: 0.2s; display: grid; place-items: center; }
.btn-add-track:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); background: rgba(0, 243, 255, 0.05); }

.mini-slider { -webkit-appearance: none; width: 60px; height: 6px; background: #333; border-radius: 3px; margin: 0; padding: 0; cursor: pointer; }
.mini-slider::-webkit-slider-thumb { -webkit-appearance: none; height: 12px; width: 6px; background: #fff; border-radius: 2px; cursor: pointer; margin-top: -3px; box-shadow: 0 0 4px #fff; }
.mini-slider:hover::-webkit-slider-thumb { background: var(--neon-cyan); box-shadow: 0 0 6px var(--neon-cyan); }

.btn-secondary { background: #222; border: 1px solid #444; color: #ccc; height: 30px; padding: 0 6px; display: grid; place-items: center; line-height: 1; cursor: pointer; font-size: 11px; width: auto; margin-bottom: 5px; border-radius: 2px; }
.btn-secondary:hover { background: #333; color: #fff; }

/* --- BOTTOM PANEL --- */
.bottom-panel { height: 155px; background: var(--bg-panel); border-top: 1px solid #333; display: flex; padding: 10px 20px; gap: 20px; box-shadow: 0 -5px 20px rgba(0,0,0,0.5); flex-shrink: 0; z-index: 10; transition: height 0.3s ease; }

/* ZMĚNA: Zarovnání nahoru (flex-start) a padding-top */
.control-group { 
    display: flex; flex-direction: column; gap: 4px; min-width: 140px; border-right: 1px solid #333; padding-right: 20px; 
    justify-content: flex-start; padding-top: 10px;
}
.control-group:last-child { border: none; }
.group-title { color: var(--neon-cyan); font-size: 11px; font-weight: bold; font-family: var(--font-head); margin-bottom: 4px; text-transform: uppercase; }
.slider-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 10px; color: #888; font-family: var(--font-code); }
.slider-row span { min-width: 60px; display: inline-block; color: #888; font-weight: bold; font-size: 10px; }
.slider-row input:active + span, .slider-row input:focus + span { color: var(--neon-cyan); }

.control-group.qa-wrapper { flex: 1; border-right: none; display: flex; flex-direction: row; padding-right: 0; padding: 0 15px; align-items: flex-start; }
.qa-section { flex: 1; display: flex; flex-direction: column; height: 100%; overflow: hidden; min-width: 0; margin-right: 15px; }
.qa-section:last-child { margin-right: 0; }

.quick-sounds-bar { display: flex; gap: 5px; overflow-x: hidden; overflow-y: auto; flex-wrap: wrap; height: 100%; align-items: flex-start; padding-bottom: 5px; padding-top: 5px; max-height: 120px; }
.quick-sounds-bar::-webkit-scrollbar { width: 8px; height: 8px; }
.quick-sounds-bar::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
.quick-sounds-bar::-webkit-scrollbar-thumb:hover { background: var(--neon-cyan); }

.q-btn { min-width: 45px; height: 28px; background: #111; border: 1px solid currentColor; color: currentColor; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 9px; cursor: pointer; border-radius: 4px; line-height: 1.1; flex-shrink: 0; transition: 0.1s; }
.q-btn:hover { border-color: #fff; background: #222; transform: translateY(-2px); box-shadow: 0 0 10px currentColor; }
.q-btn span { font-size: 7px; color: currentColor; opacity: 0.5; }

/* VISUALIZER & FLASHING */
.q-btn.playing, .sound-btn-mini.playing, .btn-pat.playing-pat { transform: none !important; transition: none !important; color: #fff !important; z-index: 100; }
.q-btn, .sound-btn-mini, .btn-pat { transition: background-color 0.3s ease-out, border-color 0.3s ease-out, box-shadow 0.3s ease-out; }

/* Vizuální indikace při přetahování oblíbených */
.q-btn.drag-over {
    border: 1px dashed #fff !important;
    background: #333 !important;
    transform: scale(1.05);
    opacity: 0.8;
}

/* Category Colors Flashing */
.sound-btn-mini[data-cat="kick"].playing, .q-btn[data-cat="kick"].playing { background-color: rgba(255, 158, 0, 0.5) !important; border-color: #ff9e00 !important; box-shadow: 0 0 15px rgba(255, 158, 0, 0.4) !important; }
.sound-btn-mini[data-cat="snare"].playing, .q-btn[data-cat="snare"].playing { background-color: rgba(255, 255, 0, 0.5) !important; border-color: #ffff00 !important; box-shadow: 0 0 15px rgba(255, 255, 0, 0.4) !important; }
.sound-btn-mini[data-cat="hihat"].playing, .q-btn[data-cat="hihat"].playing { background-color: rgba(204, 204, 204, 0.5) !important; border-color: #cccccc !important; box-shadow: 0 0 15px rgba(204, 204, 204, 0.4) !important; }
.sound-btn-mini[data-cat="perc"].playing, .q-btn[data-cat="perc"].playing { background-color: rgba(33, 150, 243, 0.5) !important; border-color: #2196f3 !important; box-shadow: 0 0 15px rgba(33, 150, 243, 0.4) !important; }
.sound-btn-mini[data-cat="bass"].playing, .q-btn[data-cat="bass"].playing { background-color: rgba(255, 0, 60, 0.5) !important; border-color: #ff003c !important; box-shadow: 0 0 15px rgba(255, 0, 60, 0.4) !important; }
.sound-btn-mini[data-cat="lead"].playing, .q-btn[data-cat="lead"].playing { background-color: rgba(0, 243, 255, 0.5) !important; border-color: #00f3ff !important; box-shadow: 0 0 15px rgba(0, 243, 255, 0.4) !important; }
.sound-btn-mini[data-cat="pad"].playing, .q-btn[data-cat="pad"].playing { background-color: rgba(204, 0, 255, 0.5) !important; border-color: #cc00ff !important; box-shadow: 0 0 15px rgba(204, 0, 255, 0.4) !important; }
.sound-btn-mini[data-cat="fx"].playing, .q-btn[data-cat="fx"].playing { background-color: rgba(0, 255, 51, 0.5) !important; border-color: #00ff33 !important; box-shadow: 0 0 15px rgba(0, 255, 51, 0.4) !important; }
.sound-btn-mini.playing, .q-btn.playing { background-color: rgba(255, 85, 0, 0.5) !important; box-shadow: 0 0 10px rgba(255, 85, 0, 0.4) !important; }

/* --- POPUPS & MODALS --- */
.slider-wrapper { position: relative; width: 100%; display: flex; align-items: center; height: 20px; }
.slider-popup { position: absolute; bottom: 20px; left: 0; transform: translateX(-50%) scale(0.8); background: var(--neon-cyan); color: #000; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: bold; pointer-events: none; opacity: 0; transition: opacity 0.1s, transform 0.1s, bottom 0.1s; box-shadow: 0 0 10px var(--neon-cyan-dim); white-space: nowrap; z-index: 100; }
.slider-popup::after { content: ''; position: absolute; top: 100%; left: 50%; margin-left: -4px; border-width: 4px; border-style: solid; border-color: var(--neon-cyan) transparent transparent transparent; }
.slider-popup.show { opacity: 1; transform: translateX(-50%) scale(1); bottom: 25px; }

.control-group .slider-popup { background: var(--text-main); color: #000; }
.control-group .slider-popup::after { border-color: var(--text-main) transparent transparent transparent; }
.control-group:nth-child(1) .slider-popup { background: var(--neon-orange); } .control-group:nth-child(1) .slider-popup::after { border-color: var(--neon-orange) transparent transparent transparent; }
.control-group:nth-child(2) .slider-popup { background: var(--neon-green); } .control-group:nth-child(2) .slider-popup::after { border-color: var(--neon-green) transparent transparent transparent; }
.control-group:nth-child(3) .slider-popup { background: #cc00ff; } .control-group:nth-child(3) .slider-popup::after { border-color: #cc00ff transparent transparent transparent; }
#master-vol-ctrl ~ .slider-popup { background: #fff; color: #000; } #master-vol-ctrl ~ .slider-popup::after { border-color: #fff transparent transparent transparent; }
#master-filter ~ .slider-popup { background: #fff; color: #000; } #master-filter ~ .slider-popup::after { border-color: #fff transparent transparent transparent; }

.note-editor-popup { position: absolute; background: rgba(10, 10, 10, 0.98); border: 1px solid var(--neon-cyan); box-shadow: 0 0 20px rgba(0, 0, 0, 0.9), 0 0 5px var(--neon-cyan-dim); padding: 8px; border-radius: 4px; z-index: 2000; width: 200px; display: none; flex-direction: column; gap: 8px; backdrop-filter: blur(5px); }
.note-editor-header { font-family: var(--font-head); font-size: 10px; color: var(--neon-cyan); border-bottom: 1px solid #333; padding-bottom: 4px; margin-bottom: 2px; display: flex; justify-content: space-between; align-items: center; }
.note-editor-row { display: flex; align-items: center; gap: 10px; font-size: 9px; color: #aaa; height: 18px; }
.note-editor-row label { width: 35px; font-weight: bold; flex-shrink: 0; text-align: right; font-family: var(--font-head); color: var(--neon-cyan); }
.note-editor-row .slider-wrapper { flex: 1; width: auto; }
.note-editor-row input[type=number] { width: 35px; background: #000; border: 1px solid #444; color: var(--neon-cyan); font-family: var(--font-code); text-align: center; font-size: 9px; margin-left: 5px; height: 18px; border-radius: 2px; }
.note-editor-row .val-display { width: 30px; text-align: right; font-size: 9px; color: #888; }
.btn-editor-close { background: transparent; border: none; color: #f55; cursor: pointer; font-weight: bold; font-size: 14px; line-height: 1; padding: 0; }
.note-editor-buttons { display: flex; gap: 5px; margin-top: 5px; }
.btn-editor-half { flex: 1; background: #222; border: 1px solid #444; color: #aaa; font-size: 9px; padding: 5px 0; cursor: pointer; border-radius: 2px; font-family: var(--font-head); transition: 0.2s; }
.btn-editor-half:hover { background: #333; color: #fff; }
.btn-reset-note { color: var(--neon-orange); border-color: var(--neon-orange); background: rgba(255, 158, 0, 0.1); }
.btn-reset-note:hover { background: var(--neon-orange); color: #000; }
.btn-set-note { color: var(--neon-cyan); border-color: var(--neon-cyan); background: rgba(0, 243, 255, 0.1); }
.btn-set-note:hover { background: var(--neon-cyan); color: #000; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.9); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.modal-content { background: var(--bg-panel); border: 1px solid var(--manual-highlight); color: var(--text-main); width: 80%; max-width: 800px; max-height: 90vh; border-radius: 8px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.8); display: flex; flex-direction: column; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid #333; }
.modal-header h2 { margin: 0; font-size: 18px; font-family: var(--font-head); letter-spacing: 1px; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.help-section { margin-bottom: 20px; border-left: 3px solid var(--neon-orange); padding-left: 10px; }
.help-section h3 { color: var(--neon-orange); font-family: var(--font-head); font-size: 14px; margin-top: 0; margin-bottom: 10px; }
.help-section h3 .loc { margin-left: 8px; } /* Úprava marginu pro .loc v nadpisu */
.help-section li, .help-section p { font-size: 12px; line-height: 1.5; color: #ccc; }
.help-section > .help-section { border: 1px solid var(--manual-highlight) !important; padding: 15px; background: #111 !important; border-radius: 6px; box-shadow: none !important; }
/* ZRUŠENÍ ORANŽOVÉ Z TUČNÉHO PÍSMA A NEUTRÁLNÍ BARVA */
.modal-body .ref-list b { 
    color: var(--text-main) !important; /* Neutrální bílá */
    text-shadow: none !important; 
}
/* PRIMÁRNÍ POJMY VŽDY CYANOVÉ */
.modal-body .highlight { 
    color: var(--neon-cyan) !important; 
    text-shadow: 0 0 5px var(--neon-cyan-dim) !important; 
}
/* ORANŽOVÁ ZŮSTÁVÁ JEN PRO AKČNÍ PRVKY/TLAČÍTKA */
.modal-body .man-highlight, .shortcuts-grid .key { 
 
    font-weight: bold; 
    text-shadow: 0 0 5px rgba(255, 158, 0, 0.3) !important; 
}


/* NOVÝ BOX PRO RYCHLÝ NÁVOD (Oranžový podklad) */
.quick-guide-box {
    border: 2px solid var(--neon-orange) !important; 
    padding: 15px !important;
    background: rgba(255, 158, 0, 0.08) !important; 
    border-radius: 6px;
    box-shadow: 0 0 15px rgba(255, 158, 0, 0.2) !important; 
}
/* --- KONEC NOVÝCH DEFINIC PRO MANUÁL --- */

.modal-footer { padding: 10px 20px; border-top: 1px solid #333; text-align: right; }
.shortcuts-grid { display: grid; grid-template-columns: auto 1fr; gap: 8px 15px; margin-bottom: 15px; background: #111; padding: 10px; border-radius: 4px; }
.shortcuts-grid div:nth-child(odd) { text-align: right; color: var(--manual-highlight); font-weight: bold; }
.shortcuts-grid div:nth-child(even) { color: #fff; }
.shortcuts-grid .key { background: #333; color: #fff; padding: 2px 6px; border-radius: 3px; font-family: monospace; font-size: 11px; border: 1px solid #555; box-shadow: inset 0 0 3px rgba(0,0,0,0.5); white-space: nowrap; }

/* --- MEDIA QUERIES --- */
@media screen and (max-height: 900px) {
    .top-bar { height: auto; min-height: 125px; padding: 5px 15px; } 
    .header-center-controls { gap: 15px; margin: 0 15px; }
    .project-controls.compact-block { padding-right: 15px; }
    .transport-controls.compact-block { padding-right: 15px; }
    .global-params .param-group:not(.master-filter-group) { padding-right: 10px; }
    .logo-section h1 { font-size: 24px; } 
    .btn-transport { width: 30px; height: 30px; font-size: 14px; border: 1px solid #333; }
    .btn-play { width: 40px; height: 40px; font-size: 18px; border: 2px solid #444; }
    .btn-transport.compact-help { width: 25px; height: 25px; }
    .pattern-section { width: 280px; padding: 5px; gap: 4px; height: auto; min-height: 120px; margin-top: 0; } 
    .pattern-grid { gap: 2px; max-height: 80px; padding-right: 10px; } 
    .btn-pat { height: 25px; font-size: 10px; } 
    .context-bar { height: 35px; padding-left: 10px; }
    .btn-tool, .btn-toggle { padding: 3px 10px; font-size: 11px; }
    .bottom-panel { height: 130px; padding: 5px 15px; gap: 15px; }
    .control-group { min-width: 110px; gap: 2px; padding-right: 15px; }
    .group-title { margin-bottom: 2px; font-size: 10px; }
    .quick-sounds-bar { max-height: 100px; }
    .left-panel { width: 240px; }
    .track-card { padding: 6px; margin-bottom: 6px; }
    .btn-tiny { width: 26px; height: 22px; font-size: 10px; }
    .btn-del, .btn-clone { width: 20px; } /* Fix for small buttons */
    .sound-categories { gap: 2px; }
    .btn-cat { padding: 2px; font-size: 9px; min-width: 30px; }
    .right-panel { width: 310px; }
    .modal-content { max-width: 700px; }
}

@media screen and (max-width: 1250px) {
    .top-bar { flex-wrap: wrap; justify-content: center; padding-bottom: 15px; }
    .header-group.right { margin-left: 0; margin-top: 15px; width: 100%; justify-content: center; }
    .header-center-controls { flex-wrap: wrap; justify-content: center; }
}

/* LAPTOP MODE */
@media screen and (max-height: 600px) {
    .top-bar { min-height: 85px !important; height: auto !important; padding: 4px 10px !important; flex-wrap: nowrap; }
    .logo-section h1 { font-size: 18px; }
    .btn-transport { width: 28px; height: 28px; font-size: 12px; }
    .btn-play { width: 34px; height: 34px; font-size: 14px; }
    .param-group label { margin-bottom: 2px; font-size: 8px; }
    .cyber-input { height: 20px; font-size: 10px; }
    .stepper button { width: 15px; }
    .header-center-controls { flex-grow: 1; justify-content: center; width: auto !important; margin: 0 !important; margin-right: 14px !important; }
    .pattern-section { min-height: auto; height: auto; padding: 3px; width: 234px; margin-top: 0; }
    .pattern-label { display: none; } 
    .pattern-grid { height: 60px !important; max-height: 60px !important; overflow-y: auto !important; overflow-x: hidden !important; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; margin-bottom: 2px; align-content: start; padding-right: 2px; }
    .pattern-grid::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }
    .pattern-grid::-webkit-scrollbar-track { background: #000; }
    .btn-pat, .btn-pat-add { height: 24px !important; font-size: 11px !important; min-width: 20px; border-radius: 3px; }
    .pattern-funcs { padding-top: 4px; }
    .btn-tiny-func { padding: 2px 0; font-size: 8px; }
    .bottom-panel { height: 90px !important; padding: 5px 15px; gap: 10px; }
    .control-group { min-width: 100px; padding-right: 10px; justify-content: flex-start; gap: 2px; padding-top: 5px; }
    .group-title { font-size: 9px; margin-bottom: 2px; }
    .slider-row { font-size: 9px; margin-bottom: 0; }
    input[type=range] { margin: 2px 0; height: 4px; }
    input[type=range]::-webkit-slider-thumb { height: 10px; width: 6px; margin-top: -3px; }
    .quick-sounds-bar { max-height: 70px; padding: 2px 0; }
    .q-btn { min-width: 35px; height: 25px; font-size: 8px; }
    .context-bar { height: 30px; padding: 0 10px; }
    
    /* ZMĚNA: Úprava fixní šířky v laptop módu */
    .tool-label { display: inline-block; width: 60px; min-width: 60px; font-size: 9px; }
    
    .btn-tool, .btn-toggle { 
    padding: 2px 8px; 
    font-size: 10px; 
    height: 20px;       
    min-height: 0;     
    line-height: normal; 
}
    .cyber-select { padding: 0; height: 18px; font-size: 10px; }
    .left-panel { width: 190px; padding: 5px; }
    .track-card { padding: 4px; margin-bottom: 4px; }
    .btn-tiny { width: 20px; height: 18px; font-size: 9px; }
    .btn-del, .btn-clone { width: 18px; } /* Fix for small buttons */
    .sound-categories { gap: 2px; }
    .btn-cat { padding: 2px; font-size: 9px; min-width: 30px; }
    .right-panel { width: 260px; }
    
    /* ZMĚNA: Specifické zmenšení fixních šířek v top baru pro laptopy */
    .project-controls.compact-block { min-width: 160px; }
    .transport-controls.compact-block { min-width: 130px; }
    .global-params.compact-block { min-width: 190px; }
}

/* --- UNIFIKOVANÝ DRAG & DROP STYL (Jemnější verze) --- */

.track-card.drag-over,
.btn-pat.drag-over,
.song-block.drag-over,
.q-btn.drag-over {
    /* ZMĚNA: 1px vypadá jemněji a profesionálněji */
    border: 1px dashed #ffffff !important;
    
    background-color: #222 !important; /* Trochu tmavší pozadí pro lepší kontrast s tenkou čárou */
    color: #ffffff !important;
    
    transform: scale(1.02) !important;
    
    /* Jemnější stín, aby nepřebíjel tenkou čáru */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.9) !important;
    
    opacity: 1 !important;
    z-index: 500 !important;
    transition: all 0.1s ease-out !important;
}

/* Zákaz interakce s vnitřkem (proti blikání) */
.track-card.drag-over *,
.btn-pat.drag-over *,
.song-block.drag-over *,
.q-btn.drag-over * {
    pointer-events: none !important;
}

/* Specifická vylepšení */
.track-card.drag-over .track-base-name::after {
    content: ' (DROP)';
    color: var(--neon-green);
    font-size: 9px;
    margin-left: 5px;
    font-weight: normal; /* Odstraněno tučné písmo pro jemnost */
    text-shadow: 0 0 5px var(--neon-green);
}

.song-block.drag-over {
    border-color: var(--neon-cyan) !important;
}

/* style.css (DODATEK PRO ORANŽOVÉ ZVÝRAZNĚNÍ MANUÁLU) */

/* Třída man-highlight (nyní jen pro akční prvky) bude oranžová */
.modal-body .man-highlight {
    color: var(--neon-orange) !important; 
    font-weight: bold !important; 
    text-shadow: 0 0 5px rgba(255, 158, 0, 0.3) !important;
}