:root {
    --nv-accent: #3b82f6;
    --nv-accent-dark: #2563eb;
    --nv-accent-soft: rgba(59,130,246,.10);
    --nv-accent-soft-2: rgba(59,130,246,.16);
    --nv-accent-ring: rgba(59,130,246,.12);
    --nv-accent-shadow: rgba(59,130,246,.30);
}

@media (prefers-color-scheme: dark) {
    :root {
        --nv-ink: #e2e4ed;
        --nv-ink-2: #acaebb;
        --nv-muted: #9094a0;
        --nv-faint: #707283;
        --nv-line: #272838;
        --nv-line-strong: #363748;
        --nv-bg: #111219;
        --nv-bg-2: #191a25;
        --nv-surface: #1e1f2c;
        --nv-dark-1: #0c0d13;
        --nv-dark-2: #161720;
        color-scheme: dark;
    }

    .fm-app, .fm-settings-body {
        --c-bg: #191a25;
        --c-surface: #1e1f2c;
        --c-border: #2d2e3f;
        --c-divider: #232435;
        --c-hover: #232435;
        --c-thumb: #272839;
        --c-text: #e2e4ed;
        --c-text2: #acaebb;
        --c-muted: #9094a0;
        --c-faint: #707283;
    }

    .nv-header {
        background: rgba(17,18,25,.92);
        border-bottom-color: var(--nv-line);
    }

    .nv-alert--error { color: #fca5a5; }
    .nv-alert--success { color: #6ee7b7; }
    .nv-dl-choice__title { background: var(--nv-bg-2); }
    .nv-dl-choice--premium .nv-dl-choice__title { background: var(--nv-accent-soft); }

    html:not(.nv-light) .nv-brand .nv-logo--light,
    html:not(.nv-light) .fm-brand .nv-logo--light { display: none !important; }
    html:not(.nv-light) .nv-brand .nv-logo--dark,
    html:not(.nv-light) .fm-brand .nv-logo--dark { display: block !important; }
}

/* user: forced dark */
html.nv-dark {     --nv-ink: #e2e4ed;
    --nv-ink-2: #acaebb;
    --nv-muted: #9094a0;
    --nv-faint: #707283;
    --nv-line: #272838;
    --nv-line-strong: #363748;
    --nv-bg: #111219;
    --nv-bg-2: #191a25;
    --nv-surface: #1e1f2c;
    --nv-dark-1: #0c0d13;
    --nv-dark-2: #161720;
    color-scheme: dark;
}
html.nv-dark .fm-app, .fm-settings-body {
    --c-bg: #191a25;
    --c-surface: #1e1f2c;
    --c-border: #2d2e3f;
    --c-divider: #232435;
    --c-hover: #232435;
    --c-thumb: #272839;
    --c-text: #e2e4ed;
    --c-text2: #acaebb;
    --c-muted: #9094a0;
    --c-faint: #707283;
}
html.nv-dark .nv-header { background: rgba(17,18,25,.92); border-bottom-color: var(--nv-line); }
html.nv-dark .nv-btn--ghost { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: var(--nv-ink); }
html.nv-dark .nv-btn--ghost:hover { background: rgba(255,255,255,.09); }
html.nv-dark .nv-input, html.nv-dark .nv-select, html.nv-dark .nv-textarea, html.nv-dark .nv-search-box input { color-scheme: dark; background: var(--nv-surface); color: var(--nv-ink); }
html.nv-dark input:-webkit-autofill, html.nv-dark input:-webkit-autofill:hover, html.nv-dark input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 1000px #1e1f2c inset; -webkit-text-fill-color: #e2e4ed; }
html.nv-dark .nv-alert--error { color: #fca5a5; }
html.nv-dark .nv-alert--success { color: #6ee7b7; }
html.nv-dark .nv-dl-choice__title { background: var(--nv-bg-2); }
html.nv-dark .nv-dl-choice--premium .nv-dl-choice__title { background: var(--nv-accent-soft); }
html.nv-dark .nv-brand .nv-logo--light, html.nv-dark .fm-brand .nv-logo--light { display: none !important; }
html.nv-dark .nv-brand .nv-logo--dark, html.nv-dark .fm-brand .nv-logo--dark { display: block !important; }

/* user: forced light */
html.nv-light {     --nv-ink: #1b1c20;
    --nv-ink-2: #42434b;
    --nv-muted: #6b6d77;
    --nv-faint: #abadb6;
    --nv-line: #ececef;
    --nv-line-strong: #d7d8de;
    --nv-bg: #ffffff;
    --nv-bg-2: #f6f6f8;
    --nv-surface: #ffffff;
    color-scheme: light;
}
html.nv-light .fm-app, .fm-settings-body {
    --c-bg: #f6f6f8;
    --c-surface: #ffffff;
    --c-border: #ececef;
    --c-divider: #f1f1f3;
    --c-hover: #fafafb;
    --c-thumb: #eef0f4;
    --c-text: #1b1c20;
    --c-text2: #42434b;
    --c-muted: #9a9ca6;
    --c-faint: #cfcfd6;
}
html.nv-light .nv-header { background: rgba(255,255,255,.88); border-bottom-color: var(--nv-line); }
html.nv-light .nv-btn--ghost { border-color: var(--nv-line); background: var(--nv-surface); color: var(--nv-ink); }
html.nv-light .nv-alert--error { color: #a5271d; }
html.nv-light .nv-alert--success { color: #0e6f4a; }
html.nv-light .nv-brand .nv-logo--light, html.nv-light .fm-brand .nv-logo--light { display: block !important; }
html.nv-light .nv-brand .nv-logo--dark, html.nv-light .fm-brand .nv-logo--dark { display: none !important; }
