* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Lemon Regular", sans-serif;
    background: #213040;
    color: #fff;
    visibility: hidden;
}

/* ── VARIABLES ── */
:root {
    --accent:        #c47200;
    --accent-hover:  #dc8100;
    --accent-dim:    rgba(196,114,0,0.2);
    --accent-mid:    rgba(196,114,0,0.35);
    --accent-border: rgba(196,114,0,0.4);
    --bg-base:       #213040;
    --bg-dark:       rgba(22,32,43,0.85);
    --border-light:  rgba(255,255,255,0.15);
    --text-dim:      rgba(255,255,255,0.5);
    --text-faint:    rgba(255,255,255,0.35);
}

/* ── LECTEUR ── */
#player-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 20px;
    background: rgba(22,32,43,0.4);
    backdrop-filter: blur(6px);
    border-top: 1px solid rgba(196,114,0,0.4);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.5);
}

#player-info {
    display: flex;
    flex-direction: column;
    min-width: 160px;
    flex-shrink: 0;
}

#player-title {
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

#player-meta {
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
}

#global-audio {
    flex: 1;
    height: 34px;
    min-width: 0;
    accent-color: var(--accent);
    filter: invert(1) sepia(1) saturate(3) hue-rotate(5deg) brightness(0.85);
}

/* ── MAP ── */
#map {
    width: 100vw;
    height: calc(100vh - 52px);
    margin-bottom: 52px;
}

.leaflet-container,
.leaflet-dragging .leaflet-container { cursor: pointer !important; }

.leaflet-popup-content-wrapper {
    font-family: "Lemon Regular", sans-serif;
    background: var(--bg-base);
    color: #fff;
    border: 1px solid rgba(196,114,0,0.45);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.leaflet-popup-tip                { background: var(--bg-base); }
.leaflet-popup-content strong     { color: var(--accent); }
.leaflet-popup-content small      { color: rgba(255,255,255,0.6); }
.leaflet-popup-close-button       { color: var(--text-dim) !important; }
.leaflet-popup-close-button:hover { color: #fff !important; }

/* ── BOUTON ADMIN ── */
#admin-toggle {
    position: fixed;
    bottom: calc(52px + 12px);
    right: 24px;
    z-index: 1000;
    padding: 10px 18px;
    background: var(--bg-dark);
    color: #fff;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-family: "Lemon Regular", sans-serif;
    backdrop-filter: blur(4px);
    transition: background 0.25s, border-color 0.25s;
}
#admin-toggle:hover {
    background: rgba(196,114,0,0.85);
    border-color: var(--accent);
}

#move-toggle {
    font-size: 14px;
    font-family: "Lemon Regular", sans-serif;
    white-space: nowrap !important;
    background-color: #525b68;
    color: #ffffff;
    transition: background 0.25s, border-color 0.25s;
}

#move-toggle.active {
    background-color: #db8103 !important;
}

/* ── LOGIN ── */
#login-panel {
    position: fixed;
    bottom: calc(52px + 66px);
    right: 24px;
    z-index: 1000;
    background: var(--bg-base);
    border: 1px solid rgba(196,114,0,0.45);
    border-radius: 10px;
    padding: 18px;
    width: 230px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    backdrop-filter: blur(6px);
}

#login-panel h2 { font-size: 15px; color: var(--accent); letter-spacing: 0.05em; }
#login-error    { color: #ff6b6b; font-size: 12px; }

/* ── INPUTS PARTAGÉS ── */
#login-panel input,
#add-form input,
#add-form textarea,
#edit-modal input,
#edit-modal textarea {
    padding: 7px 10px;
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--border-light);
    border-radius: 5px;
    font-size: 13px;
    color: #fff;
    font-family: "Lemon Regular", sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

#login-panel input:focus,
#add-form input:focus,
#add-form textarea:focus,
#edit-modal input:focus,
#edit-modal textarea:focus { border-color: var(--accent); }

#add-form input[type="date"]::-webkit-calendar-picker-indicator,
#edit-modal input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.6;
    cursor: pointer;
}

#login-panel button {
    padding: 8px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-family: "Lemon Regular", sans-serif;
    transition: background 0.25s;
}
#login-panel button:hover { background: var(--accent-hover); }

/* ── FORMULAIRES AJOUT / ÉDITION ── */
#add-form,
#edit-modal {
    position: fixed;
    /* Center within the area ABOVE the player bar (reserve ~110px at the bottom),
       so the popup never touches the waveform. */
    top: calc((100vh - 110px) / 2); left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1500;
    background: var(--bg-base);
    border: 1px solid rgba(196,114,0,0.45);
    border-radius: 12px;
    padding: 22px;
    width: 310px;
    max-height: calc(100vh - 130px);   /* leave room for the player bar + a gap */
    overflow-y: auto;       /* …scroll inside instead, so Save stays reachable */
    display: flex;
    flex-direction: column;
    gap: 11px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
}

#add-form h3,
#edit-modal h3 { font-size: 16px; color: var(--accent); letter-spacing: 0.05em; }

/* Keep each row at its natural height instead of compressing to fit the popup.
   Content then overflows the max-height cap, so overflow-y:auto gives a
   scrollbar + mouse-wheel scrolling through the whole form (many takes, a
   large description box, etc.). */
#add-form > *,
#edit-modal > * { flex-shrink: 0; }

#add-form textarea,
#edit-modal textarea { font-size: 13px; resize: vertical; max-height: 40vh; }

#add-form input[type="file"],
#e-file-label input[type="file"] { font-size: 12px; color: rgba(255,255,255,0.7); cursor: pointer; }

#edit-overlay {
    position: fixed;
    inset: 0;
    z-index: 1400;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(2px);
}

#e-file-label {
    font-size: 12px;
    color: var(--text-dim);
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

#f-coords { font-size: 12px; color: rgba(255,255,255,0.5); }

/* ── FORM TABS ── */
.form-field-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-field-label {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.form-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* ── TABS (form, panel, filter — shared shape) ── */
.form-tab,
.panel-tab {
    font-family: "Lemon Regular", sans-serif;
    background: rgba(255,255,255,0.07);
    color: var(--text-dim);
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    line-height: 1.3;
}
.form-tab   { padding: 4px 10px; font-size: 12px; }
.panel-tab  { padding: 3px 9px;  font-size: 11px; line-height: 1.4; }

.form-tab:hover,
.panel-tab:hover { background: var(--accent-dim); color: #fff; border-color: var(--accent-border); }

.form-tab.active,
.panel-tab.active { background: var(--accent-mid); color: #fff; border-color: var(--accent); }

/* ── BOUTONS FORMULAIRE ── */
.hidden { display: none !important; }

.form-buttons        { display: flex; gap: 8px; }
.form-buttons button { flex: 1; padding: 9px; border: none; border-radius: 5px; cursor: pointer; font-size: 13px; font-family: "Lemon Regular", sans-serif; transition: background 0.25s, opacity 0.2s; }

#f-save, #e-save                   { background: var(--accent); color: #fff; }
#f-save:hover:not(:disabled),
#e-save:hover:not(:disabled)       { background: var(--accent-hover); }
#f-save:disabled, #e-save:disabled { cursor: not-allowed; opacity: 0.7; }

#f-cancel, #e-cancel       { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid var(--border-light); }
#f-cancel:hover,
#e-cancel:hover            { background: rgba(255,255,255,0.18); }

/* ── PANNEAU SONS ── */
#sound-panel {
    position: fixed;
    top: 0; left: 0;
    bottom: 52px;
    width: 370px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    background: rgba(22,32,43,0.82);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(196,114,0,0.3);
    transition: transform 0.3s ease;
}
#sound-panel.collapsed { transform: translateX(-330px); }

#sound-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

#sound-panel-title { font-size: 16px; font-weight: bold; color: #ff9502; letter-spacing: 0.05em; text-transform: uppercase; margin-right: auto; }
#sound-count       { font-size: 13px; color: rgba(255,255,255,0.4); margin-left: 5px; }

/* Language switcher: compact dropdown so it stays one chip wide no matter how
   many languages exist (FR ▾ → reveals the others). */
#lang-switcher {
    position: relative;
    margin: 0 10px;
    flex-shrink: 0;
    font-size: 12px;
    user-select: none;
}
#lang-switcher .lang-option {
    padding: 3px 8px;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    border-radius: 4px;
    line-height: 1.2;
}
/* Collapsed: show only the current language; hide the rest. */
#lang-switcher .lang-option { display: none; }
#lang-switcher .lang-option.current {
    display: block;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
}
#lang-switcher .lang-option.current::after { content: " ▾"; opacity: 0.6; }
/* Open: stack all options as a small floating menu under the chip. */
#lang-switcher.open {
    background: rgba(22,32,43,0.98);
    border: 1px solid rgba(196,114,0,0.4);
    border-radius: 6px;
    position: absolute; right: 40px; top: 10px;
    z-index: 1200;
    box-shadow: 0 4px 14px rgba(0,0,0,0.5);
}
#lang-switcher.open .lang-option { display: block; }
#lang-switcher.open .lang-option.current::after { content: ""; }
#lang-switcher.open .lang-option:hover { background: rgba(255,255,255,0.08); color: #fff; }

#sound-panel-toggle {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 20px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    font-family: sans-serif;
    flex-shrink: 0;
    transition: color 0.2s, transform 0.3s;
}
#sound-panel-toggle:hover                  { color: #fff; }
#sound-panel.collapsed #sound-panel-toggle { transform: rotate(180deg); }

#sound-search-bar {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

#sound-search-input {
    width: 100%;
    padding: 7px 10px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 5px;
    font-size: 13px;
    color: #fff;
    font-family: "Lemon Regular", sans-serif;
    outline: none;
    transition: border-color 0.2s;
}
#sound-search-input:focus        { border-color: var(--accent); }
#sound-search-input::placeholder { color: var(--text-faint); }

#sound-sort-bar {
    display: flex;
    gap: 6px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
    align-items: center;
}

#sound-filter-bar {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

.sound-empty {
    padding: 18px 14px;
    color: rgba(255,255,255,0.45);
    font-size: 12px;
    text-align: center;
    line-height: 1.5;
}

.sound-filter-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sound-filter-label {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sound-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.sort-btn {
    flex: 1;
    padding: 5px 4px;
    font-size: 14px;
    font-family: "Lemon Regular", sans-serif;
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.6);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.sort-btn:hover  { background: var(--accent-dim); color: #fff; border-color: var(--accent-border); }
.sort-btn.active { background: rgba(196,114,0,0.3); color: #fff; border-color: var(--accent); }
.sort-btn.desc::after { content: " ↓"; }
.sort-btn.asc::after  { content: " ↑"; }

#sound-list {
    list-style: none;
    overflow-y: auto;
    flex: 1;
    padding: 6px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(196,114,0,0.4) transparent;
}
#sound-list::-webkit-scrollbar       { width: 4px; }
#sound-list::-webkit-scrollbar-track { background: transparent; }
#sound-list::-webkit-scrollbar-thumb { background: rgba(196,114,0,0.4); border-radius: 2px; }

.sound-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background 0.15s;
}
.sound-item:hover   { background: rgba(196,114,0,0.15); }
.sound-item.playing { background: rgba(196,114,0,0.22); border-left: 3px solid var(--accent); padding-left: 11px; }

.sound-item-title {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.sound-item-meta {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    display: flex;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
}
.sound-item-location { overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; }
.sound-item-date     { flex-shrink: 0; }
.sound-item-duration { flex-shrink: 0; margin-left: auto; font-variant-numeric: tabular-nums; }

.sound-item-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

.sound-item-tag {
    font-size: 10px;
    padding: 1px 7px;
    border-radius: 20px;
    background: rgba(196,114,0,0.18);
    border: 1px solid rgba(196,114,0,0.35);
    color: rgba(255,255,255,0.6);
    white-space: nowrap;
}

/* ── SETTINGS ── */
#settings-toggle {
    position: fixed;
    top: 16px; right: 16px;
    z-index: 1000;
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    color: #fff;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.25s, border-color 0.25s, transform 0.3s;
}
#settings-toggle:hover,
#settings-toggle.active { background: rgba(196,114,0,0.85); border-color: var(--accent); }
#settings-toggle.active { transform: rotate(45deg); }

#settings-panel {
    position: fixed;
    top: 70px; right: 16px;
    z-index: 1100;
    background: var(--bg-base);
    border: 1px solid rgba(196,114,0,0.45);
    border-radius: 10px;
    width: 300px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    animation: settings-fadein 0.18s ease;
}

@keyframes settings-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

#settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#settings-title { font-size: 15px; font-weight: bold; color: #e78700; letter-spacing: 0.05em; text-transform: uppercase; }

#settings-close       { background: none; border: none; color: var(--text-dim); font-size: 16px; cursor: pointer; transition: color 0.2s; }
#settings-close:hover { color: #fff; }

.settings-section {
    padding: 12px 14px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-section-label { font-size: 11px; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 0.08em; }
.settings-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #eee; cursor: pointer; }
.settings-check input { width: 15px; height: 15px; accent-color: var(--accent, #c47200); cursor: pointer; }

.settings-date-row { display: flex; gap: 8px; }

.settings-date-row label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    font-size: 11px;
    color: rgba(255,255,255,0.55);
}

.settings-date-row input[type="date"] {
    width: 100%;
    padding: 6px 8px;
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--border-light);
    border-radius: 5px;
    font-size: 12px;
    color: #fff;
    font-family: "Lemon Regular", sans-serif;
    outline: none;
    transition: border-color 0.2s;
}
.settings-date-row input[type="date"]:focus { border-color: var(--accent); }
.settings-date-row input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: 0.5; cursor: pointer; }

.settings-actions        { display: flex; gap: 8px; padding: 10px 14px; }
.settings-actions button { flex: 1; padding: 8px; border: none; border-radius: 5px; cursor: pointer; font-size: 12px; font-family: "Lemon Regular", sans-serif; transition: background 0.2s; }

#filter-apply       { background: var(--accent); color: #fff; }
#filter-apply:hover { background: var(--accent-hover); }
#filter-reset       { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid var(--border-light); }
#filter-reset:hover { background: rgba(255,255,255,0.18); }

#filter-count { font-size: 11px; color: rgba(255,255,255,0.45); text-align: center; padding: 0 14px 10px; min-height: 18px; }
/* ── ACTIVE (PLAYING) MARKER ── */
/* Don't animate `transform`: it would override Leaflet's translate3d positioning. Pulse a glow instead. */
.marker-playing {
    z-index: 1000 !important;
    animation: marker-pulse 1.2s ease-in-out infinite;
}
@keyframes marker-pulse {
    0%, 100% { filter: drop-shadow(0 0 2px var(--marker-glow, var(--accent))); }
    50%      { filter: drop-shadow(0 0 7px var(--marker-glow, var(--accent))) drop-shadow(0 0 3px var(--marker-glow, var(--accent))); }
}

/* ── TAKES (parent marker row + child take lines) ── */
.marker-row .disclosure { display: inline-block; width: 12px; color: var(--accent); font-size: 10px; }
.marker-row .take-count { opacity: 0.5; font-size: 11px; }
.marker-row.has-takes   { cursor: pointer; }

.take-children {
    list-style: none;
    background: rgba(0,0,0,0.15);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.take-item {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 14px 7px 28px;
    cursor: pointer;
    font-size: 12px;
    color: rgba(255,255,255,0.75);
    border-top: 1px solid rgba(255,255,255,0.04);
}
.take-item:hover   { background: rgba(255,255,255,0.05); }
.take-item.playing { color: #fff; background: var(--accent-dim); }
.take-item .take-label    { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.take-item .take-duration { flex-shrink: 0; font-variant-numeric: tabular-nums; opacity: 0.7; }

/* edit-modal take rows */
.e-take-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.e-take-row .e-take-label { flex: 1 1 120px; }
.e-take-formats { display: flex; gap: 3px; flex-wrap: wrap; }
.e-take-fmt { padding: 3px 7px; font-size: 11px; }
.e-take-del {
    flex-shrink: 0; background: #ff4444; color: #fff; border: none;
    border-radius: 4px; width: 26px; height: 26px; cursor: pointer;
}
.e-take-del:disabled { opacity: 0.4; cursor: not-allowed; }
#e-addtake { border-top: 1px dashed rgba(255,255,255,0.15); padding-top: 8px; }
#e-addtake-btn {
    margin-top: 6px; background: var(--accent-mid); color: #fff; border: none;
    border-radius: 4px; padding: 6px 12px; cursor: pointer; font-family: inherit;
}

/* ── MULTICHANNEL MIXER ── */
#mixer-panel {
    position: fixed; right: 16px; bottom: 90px; z-index: 1200;
    width: min(520px, calc(100vw - 32px));
    max-height: 60vh; overflow-y: auto;
    background: var(--panel-bg, #1d1d22); color: #eee;
    border: 1px solid rgba(255,255,255,0.12); border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.45);
    font-family: inherit;
}
#mixer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.1);
    position: sticky; top: 0; background: inherit;
}
#mixer-title { font-size: 13px; font-weight: 700; }
#mixer-close {
    background: none; border: none; color: #aaa; font-size: 14px; cursor: pointer;
}
#mixer-close:hover { color: #fff; }
#mixer-body { padding: 10px 14px; }
#mixer-status { font-size: 12px; color: rgba(255,255,255,0.6); padding: 6px 0; }

.mix-strip {
    display: grid;
    grid-template-columns: 64px 60px 56px 1fr;
    gap: 6px 10px; align-items: center;
    padding: 8px 0; border-top: 1px solid rgba(255,255,255,0.06);
}
.mix-strip:first-child { border-top: none; }
.mix-name   { font-size: 12px; font-weight: 600; }
.mix-buttons{ display: flex; gap: 4px; }
.mix-btn {
    width: 26px; height: 24px; border: 1px solid rgba(255,255,255,0.2);
    background: transparent; color: #bbb; border-radius: 4px; cursor: pointer;
    font-size: 11px; font-weight: 700; font-family: inherit;
}
.mix-btn.solo.active { background: #2e9e54; color: #fff; border-color: #2e9e54; }
.mix-btn.mute.active { background: #c0392b; color: #fff; border-color: #c0392b; }
.mix-pan { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.knob { width: 40px; height: 40px; cursor: ns-resize; touch-action: none; user-select: none; }
.knob-svg   { width: 40px; height: 40px; display: block; }
.knob-face  { fill: #2a2a30; stroke: rgba(255,255,255,0.25); stroke-width: 2; }
.knob-pointer { stroke: var(--accent, #c47200); stroke-width: 3; stroke-linecap: round; }
.mix-row { display: flex; align-items: center; gap: 8px; }
.mix-row label { font-size: 10px; color: rgba(255,255,255,0.5); width: 22px; flex-shrink: 0; }
.mix-row input[type=range] { flex: 1; }
.val { font-size: 10px; color: rgba(255,255,255,0.5); }
.mix-row .val { width: 30px; text-align: right; flex-shrink: 0; }
.pan-val { text-align: center; }
#mixer-master {
    margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(255,255,255,0.15);
    font-size: 12px; color: rgba(255,255,255,0.7);
}

/* ── PATH EDITOR ── */
#path-edit-bar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 3000;
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 10px 16px;
    background: rgba(22,32,43,0.95); color: #eee;
    border-bottom: 1px solid rgba(196,114,0,0.5);
    box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
#path-edit-hint { font-size: 12px; color: rgba(255,255,255,0.8); flex: 1; min-width: 200px; }
#path-edit-actions { display: flex; gap: 8px; flex-shrink: 0; }
#path-edit-actions button {
    border: none; border-radius: 5px; padding: 7px 14px; cursor: pointer;
    font-family: inherit; font-size: 13px;
}
#path-finish { background: #2e9e54; color: #fff; }
#path-clear  { background: #6b4a00; color: #fff; }
#path-cancel { background: #444; color: #eee; }
#path-edit-actions button:hover { filter: brightness(1.12); }

/* vertex + midpoint handles */
.path-vertex {
    width: 14px; height: 14px; border-radius: 50%;
    background: #c47200; border: 2px solid #fff; box-sizing: border-box;
    cursor: move;
}
.path-midpoint {
    width: 10px; height: 10px; border-radius: 50%;
    background: rgba(255,255,255,0.6); border: 1px solid #c47200; box-sizing: border-box;
    cursor: copy;
}

/* the "draw path" button in take rows */
.take-path-btn {
    background: var(--accent-mid, #8a5200); color: #fff; border: none;
    border-radius: 4px; padding: 4px 8px; cursor: pointer; font-family: inherit; font-size: 11px;
}
.take-path-btn.has-path { background: #2e9e54; }

.take-replace-btn.pending {
    animation: replace-pending 1s ease-in-out infinite;
}
@keyframes replace-pending {
    0%, 100% { opacity: 1;   box-shadow: 0 0 0 0 rgba(196,114,0,0.6); }
    50%      { opacity: .65; box-shadow: 0 0 0 4px rgba(196,114,0,0); }
}