:root {
    color-scheme: dark;

    --bg-body: #19191c;
    --bg-surface: #232328;
    --bg-subtle: #28282e;
    --bg-hover: #2b2b31;
    --list-header-bg: #2d2d34;
    --border: #494952;
    --border-button: #51515c;
    --border-control: #6d6c7a;
    --text-main: #e8e7eb;
    --text-muted: #b4b2bd;
    --text-disabled: #a29faa;

    --accent: #a39bc9;
    --link-text: #bdb2e1;
    --link-hover: #ded5f6;
    --focus-ring: var(--accent);
    --row-selected-bg: #323040;
    --row-selected-text: var(--text-main);
    --row-selected-edge: var(--accent);
    --text-selection-bg: #625782;
    --text-selection-text: #f8f5fc;

    --control-bg: #1c1c21;
    --control-disabled-bg: #27272d;
    --control-disabled-border: #53535e;
    --button-secondary-bg: #303038;
    --button-secondary-hover: #373740;
    --button-secondary-active: #3d3d46;
    --button-primary-bg: var(--accent);
    --button-primary-text: #252034;
    --button-primary-hover: #b5abd8;
    --button-primary-active: #9488bc;
    --button-primary-border: transparent;
    --button-danger-bg: #4b3537;
    --button-danger-hover: #583c3f;
    --button-danger-active: #604144;
    --button-danger-border: #87595e;

    --error-text: #f3b8b7;
    --warning-text: #d9c095;
    --status-error-bg: #52353a;
    --status-warning-bg: #453b2c;
    --status-warning-border: #9e8561;
    --status-process-bg: #343047;

    --progress-track: #43434c;
    --progress-fill: var(--accent);
    --range-track: #5d5b66;
    --range-thumb: var(--accent);
    --range-thumb-border: var(--border-control);
    --overlay: rgb(0 0 0 / 62%);
    --overlay-strong: rgb(0 0 0 / 74%);
    --shadow: rgb(0 0 0 / 32%);
    --shadow-strong: rgb(0 0 0 / 48%);

    /* Media remains a neutral, dark presentation surface in both themes.
       Only player chrome follows the application palette. */
    --media-stage-bg: #000;
    --media-overlay: rgb(0 0 0 / 72%);
    --media-text: #fff;
    --media-text-shadow: rgb(0 0 0 / 95%);
    --media-soft-shadow: rgb(0 0 0 / 78%);
    --media-indicator-bg: rgb(35 35 40 / 62%);
    --media-spinner-track: rgb(255 255 255 / 25%);
    --media-artwork-shadow: rgb(0 0 0 / 34%);
    --pin-icon-filter: none;
    --visualizer-circle-gradient: radial-gradient(circle at 50% 50%, rgba(255, 0, 255, 0.44) 0%, rgba(255, 0, 255, 0.24) 56%, rgba(255, 0, 255, 0) 100%);
}

:root[data-theme="light"] {
    color-scheme: light;
    --pin-icon-filter: brightness(0);

    --bg-body: #ffffff;
    --bg-surface: #ffffff;
    --bg-subtle: #f7f6f8;
    --bg-hover: #f4f3f6;
    --list-header-bg: #f1f0f3;
    --border: #d1cfd7;
    --border-button: #d4cfdb;
    --border-control: #948e9d;
    --text-main: #262430;
    --text-muted: #575460;
    --text-disabled: #6e6977;

    --accent: #735f9b;
    --link-text: #5e4a87;
    --link-hover: #49366f;
    --focus-ring: var(--accent);
    --row-selected-bg: #efebf7;
    --text-selection-bg: #d9cfed;
    --text-selection-text: #332846;

    --control-bg: #faf9fb;
    --control-disabled-bg: #f1eff3;
    --control-disabled-border: #d8d4de;
    --button-secondary-bg: #f4f2f6;
    --button-secondary-hover: #efedf2;
    --button-secondary-active: #e5e3ea;
    --button-primary-bg: #e1ddf0;
    --button-primary-text: #443964;
    --button-primary-hover: #d8d0eb;
    --button-primary-active: #cdc2e4;
    --button-primary-border: #b8aacc;
    --button-danger-bg: #f2e0dc;
    --button-danger-hover: #eed6d1;
    --button-danger-active: #e8c8c3;
    --button-danger-border: #c99498;

    --error-text: #852e3a;
    --warning-text: #694f2a;
    --status-error-bg: #f8e0df;
    --status-warning-bg: #eee5d3;
    --status-warning-border: #826940;
    --status-process-bg: #eae4f5;

    --progress-track: #e6e3ec;
    --range-track: #d1cfd7;
    --overlay: rgb(0 0 0 / 38%);
    --overlay-strong: rgb(0 0 0 / 50%);
    --shadow: rgb(47 39 65 / 10%);
    --shadow-strong: rgb(47 39 65 / 20%);
}
