
:root {
    font-size: 87.5%;
    color-scheme: light;
    --page-background: #F7F7F7;
    --surface: #FFFFFF;
    --surface-soft: #F2F2F2;
    --border-faint: #E8E8E8;
    --border-subtle: #D6D6D6;
    --border-strong: #999999;
    --neutral-highlight: #D0D0D0;
    --accent-border: #98672F;
    --track-action-accent: #B75B16;
    --song-card-shadow: 0 2px 9px rgb(0 0 0 / 0.07);
    --dialog-backdrop: rgb(0 0 0 / 0.30);
    --song-results-background: #F2F2F2;
    --song-card-background: #ffffff;
    --song-row-shaded: #EAEAEA;
    --color-black: #000000;
    --color-white: #FFFFFF;
    --text-primary: #171717;
    --text-secondary: #333333;
    --text-muted: #555555;
    --text-disabled: #666666;
    --danger: #333333;
    --font-body:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    --font-brand: var(--font-body);
    --font-mono: Consolas, "Courier New", monospace;
    --text-base: 0.9rem;
    --text-meta: 0.8rem;
    --text-h1: 1rem;
    --text-h2: 0.95rem;
    --text-h3: 0.9rem;
    --weight-medium: 600;
    --weight-bold: 700;
    --dialog-control-height: 2.75rem;
    --sidebar-width: 15rem;
    --sidebar-collapsed-width: 3.75rem;
    --control-height: 3rem;
    --radius-xs: 0.35rem;
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-pill: 999px;
    --picker-hue: 28;
    --hue-gradient:
        linear-gradient(90deg,
            #ff0000,
            #ffff00,
            #00ff00,
            #00ffff,
            #0000ff,
            #ff00ff,
            #ff0000);
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --page-background: #171717;
    --surface: #202020;
    --surface-soft: #2B2B2B;
    --border-faint: #353535;
    --border-subtle: #474747;
    --border-strong: #777777;
    --neutral-highlight: #5B5B5B;
    --accent-border: #D7A96D;
    --track-action-accent: #FFA461;
    --song-card-shadow: 0 3px 12px rgb(0 0 0 / 0.28);
    --dialog-backdrop: rgb(0 0 0 / 0.44);
    --song-results-background: #292929;
    --song-card-background: #181818;
    --song-row-shaded: #282828;
    --text-primary: #F3F3F3;
    --text-secondary: #D9D9D9;
    --text-muted: #B6B6B6;
    --text-disabled: #909090;
    --danger: #F3F3F3;
}


@supports not selector(::-webkit-scrollbar) {
    * {
        scrollbar-width: thin;
        scrollbar-color: var(--neutral-highlight) var(--surface);
    }
}

*::-webkit-scrollbar {
    width: 0.65rem;
    height: 0.65rem;
}

*::-webkit-scrollbar-button,
*::-webkit-scrollbar-button:single-button {
    display: none;
    width: 0;
    height: 0;
    -webkit-appearance: none;
}

*::-webkit-scrollbar-track {
    background: var(--surface);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    background: var(--neutral-highlight);
    border: 2px solid var(--surface);
    border-radius: 999px;
}

*::-webkit-scrollbar-corner {
    background: transparent;
}

*::-webkit-scrollbar-track:vertical {
    margin-block: 0.75rem;
}

*::-webkit-scrollbar-track:horizontal {
    margin-inline: 0.75rem;
}


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

body :where(h1, h2, h3, h4, h5, h6, p, span, small, strong, em, a, button, input, select, textarea, label, legend, li, td, th, summary) {
    color: var(--text-primary);
    font-size: var(--text-base);
}

body :where(h1) { font-size: var(--text-h1); }
body :where(h2) { font-size: var(--text-h2); }
body :where(h3) { font-size: var(--text-h3); }

@media (max-width: 48rem) {
    :root {
        font-size: 100%;
        --text-base: 0.95rem;
        --text-h1: 0.95rem;
        --text-h2: 0.95rem;
        --text-h3: 0.95rem;
        --sidebar-width: 15.5rem;
    }
}

html {
    min-height: 100%;
    background: var(--page-background);
}

body {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text-primary);
    background: var(--page-background);
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.5;
}

[hidden] {
    display: none !important;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

#project-setup-logout-button:is(:hover, :focus-visible),
.secondary-action-button:is(:hover, :focus-visible),
.header-project-action:is(:hover, :focus-visible),
.dashboard-widget button:is(:hover, :focus-visible),
.production-view-button:is(:hover, :focus-visible),
.production-view-button.is-active,
.production-open-song-link:is(:hover, :focus-visible),
.production-open-song-work-button:is(:hover, :focus-visible),
.project-dialog-close-button:is(:hover, :focus-visible),
.project-menu-option:is(:hover, :focus-visible),
.add-project-choice-actions button:is(:hover, :focus-visible),
.manage-project-dialog button:not(.project-dialog-close-button):is(:hover, :focus-visible),
.import-songs-dialog .dialog-actions button:is(:hover, :focus-visible),
.setlist-date-navigation-button:focus-visible,
.setlist-date-day-button:focus-visible,
#key-mode-button:is(:hover, :focus-visible),
#clear-song-filters:is(:hover, :focus-visible),
.song-library-actions #toggle-song-metadata-button:is(:hover, :focus-visible),
.song-card button:is(:active, :focus-visible),
.song-selection-actions button:is(:active, :focus-visible) {
    color: var(--text-primary);
    background: var(--surface);
    border-color: var(--accent-border);
    outline: none;
}

.auth-form-panel button[type="submit"]:is(:hover, :focus-visible),
.project-setup-panel .form-actions>button[type="submit"]:is(:hover, :focus-visible),
#show-create-project-button:is(:hover, :focus-visible),
.session-song-search :is(input, select):focus,
#import-collaboration-songs-form select:focus,
#import-collaboration-songs-form input[type="search"]:focus,
.color-picker-trigger:is(:hover, :focus-visible),
#song-key-mode-button:is(:hover, :focus-visible),
#edit-song-key-mode-button:is(:hover, :focus-visible),
.production-play-song-button:is(:hover, :focus-visible) {
    border-color: var(--accent-border);
    outline: none;
}

.production-manage-lane-actions button:is(:hover, :focus-visible),
.session-toggle-button:is(:hover, :focus-visible),
.session-transport button:is(:hover, :focus-visible),
.setlist-date-picker-actions button:focus-visible,
.color-picker-close-button:is(:hover, :focus-visible) {
    color: var(--text-primary);
    border-color: var(--accent-border);
    outline: none;
}

.project-action-dialog .dialog-actions button:is(:hover, :focus-visible),
#finish-color-button:is(:hover, :focus-visible),
.action-dialog-form .dialog-actions button:is(:active, :focus-visible),
#open-add-song-button:is(:hover, :focus-visible) {
    background: var(--surface);
    border-color: var(--accent-border);
    outline: none;
}

a {
    color: inherit;
}

::selection {
    color: var(--text-primary);
    background: var(--neutral-highlight);
}

[role="status"]:empty {
    display: none;
}

.form-field {
    display: grid;
    gap: 0.5rem;
    min-width: 0;
}

.form-field label,
fieldset legend {
    color: var(--text-secondary);
    font-weight: var(--weight-medium);
}

.form-field input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.form-field select,
.form-field textarea {
    width: 100%;
    min-width: 0;
    min-height: var(--control-height);
    padding: 0.7rem 0.9rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    outline: none;
    letter-spacing: 0.025em;
}

.form-field textarea {
    line-height: 1.5;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--neutral-highlight);
}

.form-field input:-webkit-autofill,
.form-field input:-webkit-autofill:hover,
.form-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-primary);
    caret-color: var(--text-primary);
}

.form-field input:autofill {
    color: var(--text-primary);
    background: var(--surface);
}


.welcome-page {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: 100vh;
    padding: 2rem;
    place-items: center;
}

.welcome-panel {
    width: min(100%, 26rem);
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--surface-soft);
    border-radius: var(--radius-lg);
}

.welcome-panel>h1,
.project-setup-panel>h1 {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    font-family: var(--font-brand);
    font-weight: var(--weight-bold);
    letter-spacing: 0.14em;
}

.welcome-panel>h1::before,
.project-setup-panel>h1::before {
    content: "";
    width: 0.2rem;
    height: 1.15rem;
    flex-shrink: 0;
    background: var(--text-primary);
    border-radius: 0.1rem;
}

.auth-form-panel form:not([hidden]) {
    display: grid;
    gap: 1rem;
    animation: form-enter 0.25s ease;
}

.auth-form-panel h2 {
    font-weight: var(--weight-medium);
}

.password-input-group {
    position: relative;
}

.password-input-group input {
    padding-right: 3rem;
}

.password-visibility-button {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    display: grid;
    width: 2rem;
    height: 2rem;
    padding: 0;
    color: var(--text-secondary);
    background: transparent;
    border: 0;
    cursor: pointer;
    place-items: center;
    transform: translateY(-50%);
}

.password-visibility-icon,
.back-icon {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-visibility-icon {
    stroke-width: 1.75;
}

.password-visibility-button[aria-pressed="true"] {
    color: var(--text-muted);
}

.auth-form-panel button[type="submit"] {
    width: 100%;
    height: 2.75rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 0.65rem;
    cursor: pointer;
}

.forgot-password-button {
    justify-self: end;
    color: var(--text-secondary);
    background: transparent;
    border: 0;
    cursor: pointer;
}

.forgot-password-button:is(:hover, :focus-visible),
.auth-switch-button:is(:hover, :focus-visible) {
    color: var(--text-muted);
    outline: none;
}

.auth-switch-prompt {
    color: var(--text-muted);
    text-align: center;
}

.auth-switch-button {
    color: var(--text-primary);
    background: transparent;
    border: 0;
    cursor: pointer;
}

.back-button {
    justify-self: start;
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    cursor: pointer;
    place-items: center;
}

.back-icon {
    stroke-width: 1.5;
}

.back-button:is(:hover, :focus-visible),
.back-button:active {
    color: var(--text-muted);
    outline: none;
}

.form-description {
    margin-top: -0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    line-height: 1.5;
}


.project-setup-page,
.project-setup-panel {
    min-height: 100vh;
}

.project-setup-page {
    position: relative;
    z-index: 1;
}

.project-setup-panel {
    position: relative;
    display: grid;
    padding: 2rem;
    place-items: center;
}

.project-setup-panel>h1 {
    position: absolute;
    top: 2rem;
    left: 2rem;
}

.project-choice-actions {
    display: grid;
    gap: 1rem;
    justify-items: center;
}

.project-setup-panel>form {
    width: min(100%, 25rem);
    padding: 1.75rem;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 0.9rem;
}

.project-setup-panel>form:not([hidden]) {
    display: grid;
    gap: 1.25rem;
}

.project-setup-panel>form>h2 {
    color: var(--text-primary);
    letter-spacing: 0.03em;
    text-align: center;
}

.project-setup-panel .form-actions {
    display: grid;
    grid-template-columns: 1 fr;
    gap: 0.75rem;
}

.project-setup-panel .form-actions>button {
    width: 100%;
    min-height: 2.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.project-setup-panel .form-actions>button[type="submit"] {
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    font-weight: var(--weight-bold);
}

#cancel-create-project-button,
#cancel-join-project-button {
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
}

#project-setup-logout-button {
    position: absolute;
    top: 2rem;
    right: 2rem;
}

#project-setup-logout-button,
.secondary-action-button {
    padding: 0.5rem 0.85rem;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--neutral-highlight);
    border-radius: var(--radius-sm);
    font-weight: var(--weight-medium);
    letter-spacing: 0.05em;
    cursor: pointer;
}

#show-create-project-button {
    position: relative;
    overflow: hidden;
    min-width: 14rem;
    padding: 1rem 2rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--neutral-highlight);
    border-radius: var(--radius-md);
    font-weight: var(--weight-bold);
    letter-spacing: 0.04em;
    cursor: pointer;
}

#show-create-project-button::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    width: 5rem;
    height: 5rem;
    pointer-events: none;
}

#show-join-project-button {
    color: var(--text-secondary);
    background: transparent;
    border: 0;
    cursor: pointer;
}

#show-join-project-button:is(:hover, :focus-visible) {
    color: var(--text-muted);
    outline: none;
}


body.dashboard-body {
    min-height: 100vh;
}

@media (min-width: 48.01rem) {
    body.dashboard-body {
        --control-height: 2.75rem;
        --dialog-control-height: 2.625rem;
        --page-gutter: 1.25rem;
        --page-section-gap: 0.65rem;
        --panel-padding: 0.9rem;
        --empty-state-padding: 1.25rem;
    }
}

.site-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    display: flex;
    width: var(--sidebar-width);
    padding: 1.5rem 1rem;
    overflow-y: auto;
    flex-direction: column;
    gap: 1.5rem;
    background: var(--surface);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    border-right: 1px solid var(--border-faint);
}

.site-sidebar .site-name,
.mobile-sidebar-toggle-button {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.25rem 0.4rem;
    color: var(--text-primary);
    font-family: var(--font-brand);
    font-weight: var(--weight-bold);
    letter-spacing: 0.11em;
    text-decoration: none;
}

.site-sidebar .site-name::before,
.mobile-sidebar-toggle-button::before {
    content: "";
    width: 0.3rem;
    height: 1.25rem;
    flex-shrink: 0;
    background: var(--project-member-accent, var(--text-primary));
    border-radius: 0.15rem;
}

.site-sidebar .desktop-sidebar-toggle-button {
    appearance: none;
    width: 100%;
    min-height: 2.5rem;
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
}

.site-sidebar .desktop-sidebar-toggle-button:focus-visible {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

@media (min-width: 48.01rem) {
    .dashboard-body.sidebar-collapsed .site-sidebar {
        width: var(--sidebar-collapsed-width);
        padding-inline: 0.5rem;
        overflow-x: hidden;
    }

    .dashboard-body.sidebar-collapsed .site-sidebar .desktop-sidebar-toggle-button {
        justify-content: center;
        padding-inline: 0;
    }

    .dashboard-body.sidebar-collapsed .site-sidebar :is(.project-switcher, .navbar),
    .dashboard-body.sidebar-collapsed .sidebar-brand-full {
        display: none;
    }

    .dashboard-body.sidebar-collapsed .site-sidebar .desktop-sidebar-toggle-button::before {
        width: 1rem;
        height: 0.25rem;
        border-radius: var(--radius-pill);
    }

    .dashboard-body.sidebar-collapsed .dashboard-page {
        margin-left: var(--sidebar-collapsed-width);
    }
}

.project-switcher {
    display: none;
    gap: 0.55rem;
    padding: 0.8rem;
    background: var(--surface);
    border: 1px solid var(--neutral-highlight);
    border-radius: 0.65rem;
}

.project-switcher-label {
    color: var(--text-muted);
    font-weight: var(--weight-bold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.project-switcher select {
    width: 100%;
    min-width: 0;
    padding: 0.65rem 0.7rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--surface-soft);
    border-radius: 0.45rem;
    cursor: pointer;
    outline: none;
}

.project-switcher select:focus {
    border-color: var(--neutral-highlight);
}

.navbar {
    margin-top: 0.25rem;
}

.navbar ul {
    display: grid;
    gap: 0.35rem;
    list-style: none;
}

.navbar a {
    display: block;
    padding: 0.7rem 0.8rem;
    color: var(--text-muted);
    border-radius: 0.45rem;
    font-weight: var(--weight-medium);
    text-decoration: none;
}

.navbar a:is(:hover, :focus-visible) {
    color: var(--text-primary);
    background: var(--surface);
    outline: none;
}

.navbar a[aria-current="page"] {
    color: var(--text-primary);
    background: var(--surface-soft);
}

.sidebar-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin-top: auto;
    padding: 0.5rem 0;
}
.sidebar-theme-label { color: var(--text-muted); font-size: var(--text-meta); letter-spacing: 0.04em; opacity: 0.55; text-transform: uppercase; }
:root:not([data-theme="dark"]) .sidebar-theme-light,
:root[data-theme="dark"] .sidebar-theme-dark { color: var(--text-primary); opacity: 1; }
.sidebar-theme-switch {
    position: relative;
    width: 3rem;
    height: 1.65rem;
    flex: none;
    appearance: none;
    background: var(--surface-soft);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    cursor: pointer;
}
.sidebar-theme-switch:focus-visible {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}
.sidebar-theme-knob {
    position: absolute;
    top: 0.18rem;
    left: 0.18rem;
    width: 1.15rem;
    height: 1.15rem;
    background: var(--text-primary);
    border-radius: 50%;
    transition: transform 0.18s ease;
}
:root[data-theme="dark"] .sidebar-theme-knob { transform: translateX(1.35rem); }
.site-sidebar .shared-player { margin-top: 0; }

@media (min-width: 48.01rem) {
    .dashboard-body.sidebar-collapsed .sidebar-theme-toggle { gap: 0; }
    .dashboard-body.sidebar-collapsed .sidebar-theme-label { display: none; }
    .dashboard-body.sidebar-collapsed .sidebar-theme-switch { width: 2.5rem; }
    :root[data-theme="dark"] .dashboard-body.sidebar-collapsed .sidebar-theme-knob {
        transform: translateX(0.85rem);
    }
}

.dashboard-page {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    padding: var(--page-gutter, 2rem);
}

.page-header {
    position: relative;
    top: auto;
    z-index: 40;
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin: -0.5rem -0.5rem var(--page-section-gap, 1rem);
    padding: 0.5rem 0.5rem var(--page-section-gap, 1rem);
    background: transparent;
}

.page-header-project-controls {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-left: 0;
}

.mobile-project-heading {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 0.5rem;
}

.current-project-button {
    appearance: none;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    min-width: 0;
    padding: 0.45rem 0.65rem;
    color: var(--text-primary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    text-align: right;
    cursor: pointer;
}

.current-project-button::after {
    content: none;
}

button.current-project-button:is(:hover, :focus-visible) > strong { color: var(--accent-border); }

.current-project-button:focus-visible {
    outline: none;
}

span.current-project-button {
    cursor: default;
}

span.current-project-button::after {
    display: none;
}

.header-project-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.45rem;
}

.header-project-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.header-project-action,
.dashboard-widget button {
    min-height: 2.5rem;
    padding: 0.5rem 0.9rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-weight: var(--weight-medium);
    white-space: nowrap;
    cursor: pointer;
}

.mobile-sidebar-toggle-button {
    display: none;
}

body.dashboard-home-body {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.dashboard-home-body .dashboard-page {
    display: flex;
    height: 100dvh;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
}

.dashboard-home-body .dashboard-widget-grid {
    min-height: 0;
    flex: 1 1 auto;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    overflow: hidden;
}

.dashboard-home-body .dashboard-widget,
.dashboard-home-body .work-buckets-summary {
    min-height: 0;
}


.dashboard-widget-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row dense;
    gap: 1rem;
    align-items: start;
}

.dashboard-widget {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    min-width: 0;
    min-height: 11rem;
    padding: 1.1rem;
    flex-direction: column;
    gap: 0.85rem;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 0.85rem;
}

.dashboard-widget>* {
    position: relative;
    z-index: 1;
}

.work-buckets-column {
    display: flex;
    min-width: 0;
    min-height: 0;
    grid-row: span 2;
    flex-direction: column;
    gap: 0.65rem;
}

.work-buckets-summary {
    min-height: 0;
    flex: 0 0 auto;
}

.dashboard-bucket-page { display: flex; min-width: 0; flex-direction: column; gap: 0.6rem; }
.dashboard-bucket-progress-list {
    display: grid;
    max-height: 11rem;
    overflow-y: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}
.dashboard-bucket-progress-card {
    display: flex;
    min-width: 0;
    min-height: 7.5rem;
    padding: 0.65rem;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    color: var(--text-primary);
    text-align: center;
    text-decoration: none;
}
a.dashboard-bucket-progress-card:is(:hover, :focus-visible) .dashboard-bucket-progress-name { text-decoration: underline; }
.dashboard-bucket-progress-icon { position: relative; display: grid; width: 3.5rem; height: 3.5rem; place-items: center; }
.dashboard-bucket-progress-icon svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dashboard-bucket-progress-icon circle { fill: none; stroke-width: 3; }
.dashboard-bucket-progress-track { stroke: var(--border-subtle); }
.dashboard-bucket-progress-arc { stroke: var(--text-primary); stroke-linecap: round; }
.dashboard-bucket-progress-card.is-complete .dashboard-bucket-progress-icon svg { display: none; }
.dashboard-bucket-progress-check {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 2rem;
    line-height: 1;
}
.dashboard-bucket-progress-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-team-chart {
    display: grid;
    height: 11.5rem;
    min-width: 0;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.35rem;
}
.dashboard-team-chart-scale {
    display: flex;
    padding-bottom: 2.25rem;
    flex-direction: column;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.7rem;
    text-align: right;
}
.dashboard-team-progress-list {
    display: flex;
    min-width: 0;
    gap: 0.4rem;
    overflow-x: auto;
    overflow-y: hidden;
}
.dashboard-team-progress-group {
    display: grid;
    min-width: 5.5rem;
    min-height: 0;
    flex: 1 0 5.5rem;
    grid-template-rows: minmax(0, 1fr) 2rem;
    gap: 0.25rem;
}
.dashboard-team-progress-bars {
    position: relative;
    display: flex;
    min-height: 0;
    padding: 0 0.3rem;
    align-items: flex-end;
    justify-content: center;
    gap: 0.2rem;
    border-bottom: 1px solid var(--border-subtle);
}
.dashboard-team-progress-bars::before,
.dashboard-team-progress-bars::after {
    position: absolute;
    right: 0;
    left: 0;
    border-top: 1px dashed var(--border-subtle);
    content: "";
}
.dashboard-team-progress-bars::before { top: 0; }
.dashboard-team-progress-bars::after { top: 50%; }
.dashboard-team-progress-bar {
    position: relative;
    display: block;
    min-width: 0.35rem;
    min-height: 2px;
    max-width: 1.25rem;
    flex: 1 1 0;
    z-index: 1;
    background: var(--text-primary);
    border-radius: 0.2rem 0.2rem 0 0;
    cursor: help;
}
.dashboard-team-progress-bar:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; }
.dashboard-team-progress-bucket-name {
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.15;
    text-align: center;
    text-overflow: ellipsis;
}
.dashboard-bucket-pager { display: flex; align-items: center; justify-content: center; gap: 0.25rem; }
.dashboard-bucket-pager button,
.dashboard-widget .dashboard-bucket-pager button:is(:hover, :focus-visible) {
    display: grid;
    width: 1.8rem;
    height: 1.8rem;
    padding: 0;
    place-items: center;
    background: transparent;
    border: 0;
}
.dashboard-bucket-page-bar::after {
    content: "";
    width: 1.1rem;
    height: 0.18rem;
    background: var(--border-subtle);
    border-radius: 1rem;
}
.dashboard-bucket-page-bar[aria-current="page"]::after { background: var(--text-primary); }
@media (max-width: 40rem) {
    .dashboard-bucket-progress-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.dashboard-tasks { flex: 1 1 auto; }
.dashboard-task-page { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; gap: 0.35rem; overflow: hidden; }
.dashboard-task-list { display: flex; min-height: 0; flex-direction: column; gap: 0.5rem; overflow-y: auto; }
.dashboard-task-pager { margin-top: auto; flex: none; }
.dashboard-task-page-bars { display: flex; max-width: min(15rem, 65%); overflow-x: auto; scrollbar-width: none; }
.dashboard-task-page-bars::-webkit-scrollbar { display: none; }
.dashboard-kboard-preview {
    display: grid;
    min-height: 7rem;
    flex: 1 1 auto;
    overflow: auto;
    grid-template-columns: repeat(var(--dashboard-stage-count, 3), minmax(0, 1fr));
}
.dashboard-kboard-stage { display: flex; min-width: 0; padding: 0 0.2rem; flex-direction: column; gap: 0.25rem; }
.dashboard-kboard-stage + .dashboard-kboard-stage { border-left: 1px dashed var(--border-subtle); }
.dashboard-kboard-stage h3 {
    min-width: 0;
    margin: 0 0 0.1rem;
    padding-bottom: 0.25rem;
    overflow: hidden;
    border-bottom: 2px solid var(--dashboard-stage-color, var(--border-strong));
    font-size: var(--text-h3);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dashboard-kboard-card {
    display: flex;
    min-width: 0;
    padding: 0.28rem 0.38rem;
    flex-direction: column;
    gap: 0.05rem;
    color: var(--text-primary);
    font-size: var(--text-meta);
    line-height: 1.25;
    text-decoration: none;
    background: var(--surface-soft);
    border: 1px solid var(--member-card-color, var(--border-subtle));
    border-radius: var(--radius-sm);
}
.dashboard-kboard-card:is(:hover, :focus-visible) {
    border-color: var(--member-card-color, var(--border-subtle));
    outline: 2px solid var(--member-card-color, var(--border-subtle));
    outline-offset: 1px;
}
.dashboard-kboard-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-kboard-more { color: var(--text-secondary); }
.dashboard-task-card {
    display: flex;
    padding: 0.65rem 0.75rem;
    flex-direction: column;
    gap: 0.15rem;
    color: var(--text-primary);
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}
.dashboard-task-card span { color: var(--text-secondary); }
.dashboard-task-card:is(:hover, :focus-visible) { border-color: var(--accent-border); outline: none; }

.widget-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.widget-heading-row h2 {
    color: var(--text-primary);
    font-weight: var(--weight-bold);
}

.widget-heading-link {
    flex: 0 0 auto;
    color: var(--text-muted);
    font-weight: var(--weight-medium);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.widget-heading-link:is(:hover, :focus-visible) {
    color: var(--text-primary);
    outline: none;
}

.work-bucket-card:hover,
.work-bucket-card:focus-within {
    background: var(--surface);
    border-color: var(--bucket-color, var(--border-subtle));
    transform: translateY(-0.1rem);
    outline: none;
}

.work-bucket-card:active {
    transform: scale(0.985);
}

.work-bucket-list {
    display: grid;
    width: 100%;
    min-height: 0;
    margin: 0;
    flex: 0 0 auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(7.5rem, auto);
    gap: 0.55rem;
    overflow: visible;
}

.utility-page {
    display: flex;
    flex-direction: column;
    gap: var(--page-section-gap, 1rem);
    min-width: 0;
}

.utility-toolbar,
.utility-panel {
    background: var(--surface);
    border: 1px solid var(--border-faint);
    border-radius: var(--radius-md);
}

.utility-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
}

.utility-toolbar h1,
.utility-panel h2,
.utility-panel h3 {
    margin: 0;
    color: var(--text-primary);
}

.utility-toolbar p,
.utility-help,
.utility-empty { color: var(--text-secondary); }
.utility-toolbar p { margin: 0.25rem 0 0; }
.utility-panel { min-width: 0; padding: var(--panel-padding, 1.25rem); }
.utility-panel label { display: grid; gap: 0.4rem; color: var(--text-secondary); font-weight: 600; }
.utility-panel input,
.utility-panel select,
.utility-panel textarea {
    min-width: 0;
    width: 100%;
    min-height: 2.7rem;
    padding: 0.6rem 0.75rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}
.utility-panel input:focus-visible,
.utility-panel select:focus-visible,
.utility-panel textarea:focus-visible,
.utility-button:focus-visible,
.setlists-list-item:focus-visible {
    outline: 2px solid var(--neutral-highlight);
    outline-offset: 2px;
}
.utility-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.55rem 0.85rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
}
.utility-button:hover:not(:disabled) { border-color: var(--neutral-highlight); background: var(--surface); }
.utility-button:disabled { opacity: 0.45; cursor: not-allowed; }
.utility-button-primary { color: var(--text-primary); background: var(--surface); border-color: var(--neutral-highlight); }
.utility-button-primary:hover:not(:disabled) { background: var(--surface); }
.utility-button-danger { color: var(--danger); }
.utility-status { min-height: 1.2rem; margin: 0; color: var(--text-secondary); }
.utility-status.is-error { color: var(--danger); }
.utility-empty { margin: 0.75rem 0; }
.utility-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.utility-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
.utility-panel form { display: grid; gap: 0.85rem; margin-top: 1rem; }
.utility-panel form > .utility-button { justify-self: start; }
.setlists-layout { display: grid; grid-template-columns: minmax(14rem, 0.8fr) minmax(0, 2fr); gap: 1rem; align-items: start; }
.setlists-list { display: grid; gap: 0.5rem; margin-top: 0.9rem; }
.setlists-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem;
    text-align: left;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--setlist-color, var(--border-subtle));
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.setlists-list-item:hover,
.setlists-list-item.is-selected { background: var(--surface); border-color: var(--setlist-color, var(--border-subtle)); }
.setlists-list-item span,
.setlist-song-identity span { color: var(--text-secondary); font-size: var(--text-meta); }
.setlist-detail-panel { display: grid; gap: 1rem; }
.setlist-detail-actions { display: flex; gap: 0.45rem; }
.detail-back-button {
    width: fit-content;
    padding: 0;
    color: var(--text-secondary);
    background: transparent;
    border: 0;
    cursor: pointer;
}
.detail-back-button:is(:hover, :focus-visible) { color: var(--text-primary); outline: none; }
.setlist-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}
.setlist-summary-item {
    display: grid;
    align-content: start;
    gap: 0.35rem;
    min-width: 0;
    padding: 0.7rem;
    background: var(--surface);
    border: 1px solid var(--border-faint);
    border-radius: var(--radius-sm);
}
.setlist-summary-item > span { color: var(--text-muted); font-size: var(--text-meta); }
.setlist-summary-item strong { overflow-wrap: anywhere; }
.setlist-summary-color {
    width: 2.25rem;
    height: 2.25rem;
    background: var(--surface);
    border: 3px solid var(--border-subtle);
    border-radius: 0.55rem;
}
.setlist-summary-notes { grid-column: 1 / -1; }
.setlist-summary-notes p { margin: 0; color: var(--text-secondary); white-space: pre-wrap; overflow-wrap: anywhere; }
.setlist-add-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 0.65rem; margin: 0.85rem 0; }
.setlist-song-list { display: grid; gap: 0.55rem; padding: 0; list-style: none; }
.setlist-song-item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.75rem; background: var(--surface); border: 1px solid var(--border-faint); border-radius: var(--radius-sm); }
.setlist-song-identity { display: grid; gap: 0.2rem; min-width: 0; }
.setlist-song-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.setlist-song-actions .utility-button { min-height: 2.2rem; }
.account-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(15rem, 1fr); gap: 1rem; align-items: start; }
.account-layout .utility-panel { display: grid; gap: 0.7rem; }
.account-layout .utility-help { margin: 0; }
.account-layout .utility-button { justify-self: start; }
.account-layout .account-project-color-form { display: flex; align-items: center; flex-wrap: wrap; gap: 0.7rem; margin: 0; }
.account-member-colors { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; }
.account-member-color { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--text-secondary); }
.account-member-color-swatch { width: 0.8rem; height: 0.8rem; flex: none; border: 1px solid var(--border-subtle); border-radius: 50%; }
@media (max-width: 850px) {
    .setlists-layout,
    .account-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .setlist-summary { grid-template-columns: minmax(0, 1fr); }
    .setlist-summary-notes { grid-column: 1; }
    .utility-toolbar { flex-wrap: wrap; }
    .utility-form-grid { grid-template-columns: minmax(0, 1fr); }
    .setlist-add-row { grid-template-columns: minmax(0, 1fr) auto; }
    .setlist-add-row label { grid-column: 1 / -1; }
    .setlist-song-item { align-items: start; flex-direction: column; }
}

.form-help-text,
.form-feedback {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.4;
}

.form-feedback[data-state="error"] {
    color: var(--danger);
}


.production-board-page {
    display: flex;
    width: auto;
    height: 100dvh;
    min-height: 0;
    max-width: none;
    padding-bottom: 0.75rem;
    flex-direction: column;
    gap: 0.5rem;
    overflow: hidden;
}

.page-header.production-page-header {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 0.25rem;
    flex: 0 0 auto;
    margin-bottom: 0;
}

.production-kicker {
    margin: 0 0 0.35rem;
    color: var(--text-muted);
    font-weight: var(--weight-bold);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.production-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0;
    padding: 0.6rem 0.7rem;
    flex: 0 0 auto;
    background: var(--surface);
    border: 1px solid var(--border-faint);
    border-radius: var(--radius-md);
}

.production-back-link {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding-left: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
}
.production-back-link:is(:hover, :focus-visible) { color: var(--accent-border); outline: none; }
.production-back-link span { color: inherit; }
.production-toolbar-heading {
    display: grid;
    gap: 0.35rem;
}

.production-toolbar-heading h1 {
    margin: 0;
    color: var(--text-primary);
    line-height: 1;
}

.production-view-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.production-view-button,
.production-primary-action,
.production-open-song-link,
.production-open-song-work-button {
    min-height: 2.65rem;
    padding: 0.6rem 0.85rem;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-weight: var(--weight-medium);
    text-decoration: none;
    cursor: pointer;
}

.production-view-button.is-active {
    border-color: var(--border-strong);
}

.production-primary-action {
    color: var(--text-primary);
    background: var(--surface);
    border-color: var(--neutral-highlight);
}

.production-primary-action:is(:hover, :focus-visible) {
    background: var(--surface);
    border-color: var(--border-strong);
    outline: none;
}

.production-board-status {
    min-height: 0;
    margin: 0;
    flex: 0 0 auto;
    color: var(--text-primary);
}

.production-board-status:empty {
    display: none;
}

.production-board-shell {
    position: relative;
    min-height: 14rem;
    flex: 1.2 1 0;
    overflow: auto;
    background: var(--surface);
    border: 1px solid var(--border-faint);
    border-radius: var(--radius-md);
}

.production-board-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
    align-content: start;
    gap: 0.8rem;
    padding: 0.8rem;
}

#production-lane-list {
    display: contents;
}

.production-lane {
    display: flex;
    min-width: 0;
    min-height: 8rem;
    padding: 0.85rem;
    flex-direction: column;
    gap: 0.45rem;
    background: var(--surface);
    border: 1px solid var(--bucket-color, var(--border-subtle));
    border-radius: var(--radius-md);
    cursor: pointer;
}

.production-lane-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 0.7rem;
}

.production-lane-label {
    margin: 0 0 0.25rem;
    color: var(--text-muted);
    font-weight: var(--weight-bold);
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.production-lane h2 {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.25;
}

.production-lane-empty {
    display: grid;
    min-height: 8rem;
    margin: 0;
    padding: 1rem;
    place-items: center;
    color: var(--text-muted);
    line-height: 1.5;
    text-align: center;
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-sm);
}

.production-bucket-song-count {
    margin: 0;
    color: var(--text-muted);
}

.production-manage-songs-button {
    width: fit-content;
    min-height: 2rem;
    margin-top: auto;
    padding: 0.35rem 0.55rem;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.production-add-lane-card {
    display: grid;
    min-width: 0;
    min-height: 8rem;
    padding: 1rem;
    place-content: center;
    gap: 0.35rem;
    color: var(--text-muted);
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--neutral-highlight);
    border-radius: var(--radius-md);
    cursor: pointer;
}

.production-add-lane-card>span {
    color: var(--text-muted);
    line-height: 1;
}

.production-add-lane-card strong {
    color: var(--text-primary);
}

.production-add-lane-card small {
    line-height: 1.45;
}

.production-add-lane-card:is(:hover, :focus-visible) {
    color: var(--text-secondary);
    background: var(--surface);
    border-color: var(--neutral-highlight);
    outline: none;
}

.production-song-card {
    display: grid;
    gap: 0.4rem;
    padding: 0.55rem;
    background: var(--surface);
    border: 1px solid var(--border-faint);
    border-radius: var(--radius-sm);
}

.production-focus-song-list .production-song-card {
    cursor: grab;
    user-select: none;
}
.production-song-reorder-handle { display: none; }
.production-focus-song-list .production-song-card.is-drag-source {
    opacity: 0.18;
    background: var(--neutral-highlight);
    border-color: var(--neutral-highlight);
    border-style: dashed;
}
.production-focus-song-list .production-song-card.is-drag-source > * { visibility: hidden; }
.production-song-card.kboard-card-drag-ghost {
    opacity: 0.98;
    background: var(--neutral-highlight);
    border-color: var(--neutral-highlight);
    transform: rotate(0.35deg) scale(1.025);
}
body.is-reordering-backlog,
body.is-reordering-backlog * { cursor: grabbing !important; }
@media (pointer: coarse) {
    .production-song-reorder-handle {
        display: inline-grid;
        place-items: center;
        width: 2rem;
        min-height: 2rem;
        padding: 0;
        background: var(--surface);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-sm);
        touch-action: none;
        cursor: grab;
    }
}

.production-song-card:hover,
.production-song-card:focus-within {
    border-color: var(--neutral-highlight);
}

.production-song-card-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.65rem;
}

.production-song-card h3 {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.25;
}

.production-song-artist {
    margin: 0.2rem 0 0;
    color: var(--text-muted);
}

.production-song-card.kboard-song-added :is(.production-song-title, .production-song-artist) {
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--text-muted);
}

.production-song-card.kboard-song-added .production-song-title {
    color: var(--text-muted);
    font-weight: 400;
}

.production-open-song-link {
    min-height: 2rem;
    justify-self: start;
    padding: 0.38rem 0.55rem;
}
.production-song-footer { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.production-open-song-work-button,
.production-add-song-kboard-button { min-height: 2rem; padding: 0.38rem 0.55rem; }

body.dashboard-body .production-lane-dialog {
    width: min(30rem, calc(100% - 2rem));
    padding: 1.25rem;
}

.production-lane-dialog form {
    display: grid;
    gap: 1rem;
}

.production-member-field {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.production-member-field legend { margin-bottom: 0.45rem; }
.production-member-options {
    display: grid;
    max-height: 9rem;
    gap: 0.35rem;
    overflow-y: auto;
}
.production-member-options label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-secondary);
}
.production-member-options input { accent-color: var(--text-primary); }

body.dashboard-body .production-manage-lanes-dialog {
    width: min(42rem, calc(100% - 2rem));
}

body.dashboard-body .bucket-song-dialog {
    width: min(66rem, calc(100% - 2rem));
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
}

.bucket-song-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 0.9rem 0;
}

.bucket-song-panel {
    min-width: 0;
    padding: 0.8rem;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

.bucket-song-panel[data-bucket-drop="add"] { border-color: var(--bucket-color, var(--border-subtle)); }
.bucket-song-panel.is-drop-target { outline: 2px solid var(--accent-border); outline-offset: -2px; }
.bucket-song-panel.is-drop-target::after {
    content: "Release to remove from Bucket";
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
}
.bucket-song-panel[data-bucket-drop="add"].is-drop-target::after { content: "Release to add to Bucket"; }
.bucket-song-panel h3 { margin-bottom: 0.5rem; }
.bucket-song-panel-hint { margin-bottom: 0.55rem; color: var(--text-muted); }
.bucket-song-search { display: grid; gap: 0.3rem; margin-bottom: 0.55rem; }
.bucket-song-search input {
    width: 100%;
    min-height: 2.4rem;
    padding: 0.4rem 0.55rem;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}
.bucket-song-list {
    display: grid;
    max-height: min(46vh, 28rem);
    align-content: start;
    gap: 0.4rem;
    overflow-y: auto;
}
.bucket-song-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    cursor: grab;
}
.bucket-song-row.is-dragging { opacity: 0.5; }
.bucket-song-row span { min-width: 0; }
.bucket-song-row strong,
.bucket-song-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bucket-song-row small { color: var(--text-muted); }
.bucket-song-row button {
    min-height: 2rem;
    padding: 0.3rem 0.55rem;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    cursor: pointer;
}
#bucket-song-message { color: var(--text-muted); }
#bucket-song-message:empty { display: none; }

@media (max-width: 48rem) {
    .bucket-song-panels { grid-template-columns: minmax(0, 1fr); }
    .bucket-song-list { max-height: 12rem; }
}

.production-manage-lanes-help,
.production-manage-lanes-empty,
#manage-lanes-message {
    color: var(--text-muted);
    line-height: 1.5;
}

.production-manage-lane-list {
    display: grid;
    max-height: min(24rem, 55vh);
    gap: 0.5rem;
    margin: 0.8rem 0;
    overflow-y: auto;
}

.production-manage-lane-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(8rem, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem;
    background: var(--surface);
    border: 1px solid var(--bucket-color, var(--border-faint));
    border-radius: var(--radius-sm);
}

.production-manage-lane-name-wrap {
    display: grid;
    gap: 0.16rem;
    cursor: grab;
    user-select: none;
}

.production-manage-lane-row.is-dragging { opacity: 0.5; }
.production-manage-lane-row:is(.is-drop-before, .is-drop-after)::before {
    content: "";
    position: absolute;
    right: 0.5rem;
    left: 0.5rem;
    height: 3px;
    background: var(--accent-border);
    border-radius: 2px;
}
.production-manage-lane-row.is-drop-before::before { top: -0.32rem; }
.production-manage-lane-row.is-drop-after::before { bottom: -0.32rem; }

.production-manage-lane-name-wrap strong {
    color: var(--text-primary);
}

.production-manage-lane-name-wrap small {
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.production-manage-lane-actions {
    display: flex;
    gap: 0.35rem;
}

.production-manage-lane-actions button {
    min-height: 2rem;
    padding: 0.35rem 0.55rem;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 0.35rem;
    cursor: pointer;
}

.production-manage-lane-actions button:disabled {
    opacity: 0.32;
    cursor: default;
}

.production-delete-lane-button {
    color: var(--danger) !important;
    border-color: var(--border-strong) !important;
}

.production-delete-lane-button.is-confirming {
    border-color: var(--danger) !important;
}

.production-lane-dialog .production-edit-lane-form {
    display: flex;
    grid-column: 1 / -1;
    align-items: end;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-faint);
}

.production-edit-lane-form label {
    display: grid;
    gap: 0.25rem;
    color: var(--text-muted);
}

.production-edit-lane-form label:first-child {
    min-width: 0;
    flex: 1 1 auto;
}

.production-edit-lane-form input {
    min-height: 2.1rem;
    padding: 0.35rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 0.35rem;
}

.production-edit-lane-form button {
    min-height: 2.1rem;
    padding: 0.35rem 0.6rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--neutral-highlight);
    border-radius: 0.35rem;
    cursor: pointer;
}

.production-manage-bucket-color-label {
    align-self: center;
    color: var(--text-muted);
}

.production-edit-lane-form .color-picker-trigger {
    flex: 0 0 2.25rem;
    min-height: 2.25rem;
    padding: 0.25rem;
    border-radius: 0.55rem;
}

@media (max-width: 70rem) {
    .production-view-actions {
        flex-wrap: wrap;
    }

}

@media (max-width: 48rem) {

    .dashboard-page.production-board-page {
        display: block;
        width: 100%;
        height: auto;
        min-height: 100dvh;
        padding: 1rem;
        overflow: visible;
    }

    .production-board-shell { min-height: 20rem; }

    .production-view-actions {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
    }

    .production-view-actions > * {
        min-width: 0;
        flex: none;
    }

    .production-view-actions .production-view-button,
    .production-view-actions .production-primary-action {
        width: 100%;
        min-height: 2.5rem;
        padding: 0.5rem;
    }

    .production-manage-lane-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .production-manage-lane-actions {
        grid-column: 1;
        flex-wrap: wrap;
    }

    .production-edit-lane-form {
        flex-wrap: wrap;
    }
}


.dashboard-page.session-page {
    width: auto;
    max-width: none;
    margin-right: auto;
    padding: var(--page-gutter, 2rem) var(--page-gutter, 2rem) 4rem;
    overflow: visible;
}

.session-workspace {
    display: grid;
    grid-template-columns: minmax(15rem, 19rem) minmax(0, 1fr);
    align-items: start;
    gap: 1.25rem;
}

.session-content { min-width: 0; }

@media (min-width: 48.01rem) {
    body.session-body:has(.session-chart-panel:not([hidden])) {
        --session-sidebar-layout-width: var(--sidebar-width);
        /* Page gutters plus two 12rem bucket cards and their gap. */
        --session-two-bucket-reserve: 27.25rem;
        --session-chart-layout-width: max(20rem, min(var(--session-chart-width, 34rem), 80vw, calc(100vw - var(--session-sidebar-layout-width) - var(--session-two-bucket-reserve))));
    }
    body.session-body.sidebar-collapsed:has(.session-chart-panel:not([hidden])) {
        --session-sidebar-layout-width: var(--sidebar-collapsed-width);
    }
    body.session-body:has(.session-chart-panel:not([hidden])) .dashboard-page.session-page {
        margin-right: var(--session-chart-layout-width);
    }
    body.session-body:has(.session-chart-panel:not([hidden])) .session-chart-panel {
        width: var(--session-chart-layout-width);
    }
    body.session-body:has(.session-chart-panel:not([hidden])) .session-main-waveform-shell {
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
    }
}

@media (min-width: 90.01rem) {
    body.session-body:has(.session-chart-panel:not([hidden])) {
        /* Also reserve the 19rem song picker and 1.25rem workspace gap. */
        --session-two-bucket-reserve: 47.5rem;
    }
}

@media (min-width: 48.01rem) and (max-width: 90rem) {
    body.session-body:has(.session-chart-panel:not([hidden])) .session-workspace {
        grid-template-columns: minmax(0, 1fr);
    }
    body.session-body:has(.session-chart-panel:not([hidden])) .session-no-song-state {
        position: static;
        max-width: 19rem;
        max-height: none;
    }
}

.session-eyebrow,
.session-track-kicker {
    margin: 0 0 0.3rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-weight: var(--weight-bold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.session-main-song-identity {
    overflow-wrap: anywhere;
}

.session-no-song-state {
    position: sticky;
    top: 0.75rem;
    min-width: 0;
    max-height: calc(100dvh - 1.5rem);
    padding: var(--empty-state-padding, clamp(1.25rem, 3vw, 2rem));
    background: var(--surface);
    border: 1px solid var(--neutral-highlight);
    border-radius: var(--radius-lg);
}

.session-no-song-state h2 {
    margin: 0;
    color: var(--text-primary);
}

.session-no-song-description {
    max-width: 34rem;
    margin: 0.65rem 0 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.session-song-search {
    display: grid;
    gap: 0.4rem;
}

.session-song-search span {
    color: var(--text-secondary);
    font-weight: var(--weight-bold);
}

.session-song-search :is(input, select) {
    width: 100%;
    min-height: 2.8rem;
    padding: 0.65rem 0.8rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

.session-song-picker-list {
    display: grid;
    gap: 0.5rem;
    max-height: calc(100dvh - 17rem);
    margin-top: 0.8rem;
    padding: 0.2rem 0.45rem 0.3rem 0.1rem;
    overflow-y: auto;
}

.session-song-choice {
    display: flex;
    width: 100%;
    min-height: 3.8rem;
    padding: 0.7rem 0.8rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    text-align: left;
    cursor: pointer;
}

.session-song-choice>span:first-child {
    display: grid;
    min-width: 0;
    gap: 0.18rem;
}

.session-song-choice strong,
.session-song-choice small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.session-song-choice small { color: var(--text-muted); }
.session-song-choice[aria-current="true"] { border-color: var(--accent-border); }

.session-song-choice:is(:hover, :focus-visible) {
    background: var(--surface);
    border-color: var(--neutral-highlight);
    outline: none;
}

.session-song-choice[aria-current="true"]:is(:hover, :focus-visible) {
    border-color: var(--accent-border);
}

.session-song-choice.is-dragging { opacity: 0.5; }

.session-song-picker-message {
    margin: 0.8rem 0 0;
    padding: 0.85rem;
    color: var(--text-muted);
    background: var(--surface-soft);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-sm);
    text-align: center;
}

.session-mobile-project-name {
    overflow: hidden;
    color: var(--text-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shared-player {
    display: grid;
    flex: none;
    width: 100%;
    gap: 0.3rem;
    margin-top: auto;
    padding: 0.8rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

.shared-player-head,
.shared-player-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.shared-player-head span {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-weight: var(--weight-bold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.shared-player-title,
.shared-player-artist {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shared-player-artist,
.shared-player-time { color: var(--text-muted); font-size: var(--text-meta); }

.shared-player button {
    padding: 0.3rem 0.55rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 0.45rem;
    cursor: pointer;
}

.shared-player button:is(:hover, :focus-visible) {
    color: var(--text-muted);
    border-color: var(--neutral-highlight);
}

.shared-player-minimize { display: none; }

.shared-player-bars {
    display: flex;
    height: 2rem;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
}

.shared-player-bars i {
    width: 0.19rem;
    height: 45%;
    background: var(--neutral-highlight);
    border-radius: 1rem;
    opacity: 0.7;
    transform-origin: center;
}

.shared-player-bars i:nth-child(3n + 1) { height: 65%; }
.shared-player-bars i:nth-child(4n + 2) { height: 90%; }
.shared-player.is-playing .shared-player-bars i {
    animation: shared-player-pulse 0.72s ease-in-out infinite alternate;
}
.shared-player.is-playing .shared-player-bars i:nth-child(3n + 1) { animation-delay: -0.38s; }
.shared-player.is-playing .shared-player-bars i:nth-child(3n + 2) { animation-delay: -0.16s; }

@keyframes shared-player-pulse {
    from { transform: scaleY(0.42); opacity: 0.45; }
    to { transform: scaleY(1.18); opacity: 1; }
}

.shared-player-progress {
    width: 100%;
    height: 0.9rem;
    margin: 0;
    accent-color: var(--text-primary);
    cursor: pointer;
}
.shared-player-progress:disabled { opacity: 0.5; cursor: default; }

@media (prefers-reduced-motion: reduce) {
    .shared-player.is-playing .shared-player-bars i { animation: none; }
}

.session-main-playback {
    position: sticky;
    top: 0.75rem;
    z-index: 20;
    min-width: 0;
    padding: clamp(0.8rem, 1.4vw, 1rem);
    background: var(--surface);
    border: 1px solid var(--neutral-highlight);
    border-radius: var(--radius-lg);
}

.session-main-topbar,
.session-chart-heading,
.session-chart-tabs,
.session-chart-save-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
}

.session-main-topbar { justify-content: flex-end; margin-bottom: 0.55rem; }

.session-chart-button,
.session-chart-heading button,
.session-chart-tabs button,
.session-note-switcher button,
.session-chart-zoom button,
.session-chart-save-row button,
#session-chart-remove-pdf {
    min-height: 2.2rem;
    padding: 0.4rem 0.7rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.session-chart-button:is(:hover, :focus-visible),
.session-chart-panel button:is(:hover, :focus-visible) {
    border-color: var(--text-primary);
    outline: none;
}

.session-chart-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    display: flex;
    width: min(var(--session-chart-width, 34rem), 80vw);
    min-width: min(20rem, 100vw);
    padding: 1rem 1rem 1rem 1.2rem;
    flex-direction: column;
    gap: 0.75rem;
    color: var(--text-primary);
    background: var(--surface);
    border-left: 1px solid var(--border-subtle);
}

.session-chart-resize {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0.55rem;
    cursor: ew-resize;
    touch-action: none;
}

.session-chart-resize:is(:hover, :focus-visible) {
    background: var(--border-subtle);
    outline: none;
}

.session-chart-heading h2,
.session-chart-song-name { margin: 0; }
.session-chart-song-name { color: var(--text-muted); }
.session-chart-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    flex-wrap: wrap;
}
.session-chart-tabs { justify-content: flex-start; }
.session-chart-tabs button[aria-selected="true"] { border-color: var(--text-primary); }
.session-chart-zoom { display: flex; align-items: center; gap: 0.35rem; }
.session-chart-zoom button { min-width: 2.2rem; padding-inline: 0.5rem; }
#session-chart-zoom-reset { min-width: 3.5rem; }

.session-chart-pane {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    gap: 0.7rem;
}

.session-chart-pane > label { font-weight: var(--weight-bold); }
.session-note-switcher {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.6rem;
}
.session-note-switcher label,
.session-note-name {
    display: grid;
    gap: 0.35rem;
    font-weight: var(--weight-bold);
}
.session-note-switcher select,
.session-note-name input {
    width: 100%;
    min-height: 2.4rem;
    padding: 0.4rem 0.65rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}
.session-note-switcher button {
    white-space: nowrap;
}
.session-chart-pane textarea {
    width: 100%;
    min-height: 12rem;
    padding: 0.75rem;
    flex: 1;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: calc(var(--text-base) * var(--session-chart-zoom, 1));
    resize: none;
}

.session-chart-save-row { color: var(--text-muted); }
.session-chart-pane input[type="file"] { max-width: 100%; }
.session-chart-pane input[type="file"]::file-selector-button {
    margin-right: 0.6rem;
    padding: 0.4rem 0.7rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.session-chart-document-viewport {
    min-height: 0;
    flex: 1;
    overflow: auto;
}
.session-chart-pane iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    transform: scale(var(--session-chart-zoom, 1));
    transform-origin: top left;
}

@media (max-width: 40rem) {
    .session-chart-panel { width: 100vw; min-width: 0; padding: 0.85rem; }
    .session-chart-resize { display: none; }
}

.session-section-heading,
.session-main-track-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.session-section-heading h2 {
    margin: 0;
    color: var(--text-primary);
}

.session-section-heading>p {
    max-width: 26rem;
    margin: 0;
    color: var(--text-muted);
    line-height: 1.5;
    text-align: right;
}

.session-main-track-heading {
    margin: 0.65rem 0 0.45rem;
    align-items: center;
}

.session-track-select { position: relative; min-width: 0; }

.session-track-trigger {
    display: inline-flex;
    max-width: 100%;
    min-height: 1.8rem;
    padding: 0;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    background: none;
    border: 0;
    border-radius: 0;
    font-weight: var(--weight-bold);
    text-align: left;
}

.session-track-trigger:disabled { opacity: 1; cursor: default; }
.session-track-trigger.has-alternates { cursor: pointer; }
.session-track-trigger.has-alternates:is(:hover, :focus-visible),
.session-track-trigger[aria-expanded="true"] { color: var(--accent-border); outline: none; }
.session-track-trigger.has-alternates::after {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    flex: none;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-0.12rem) rotate(45deg);
}

.session-track-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    z-index: 25;
    width: max-content;
    min-width: min(14rem, 70vw);
    max-width: min(24rem, 75vw);
    max-height: 16rem;
    padding: 0.3rem;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    box-shadow: var(--song-card-shadow);
}

.session-track-option {
    display: block;
    width: 100%;
    padding: 0.55rem 0.7rem;
    overflow: hidden;
    color: var(--text-primary);
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-xs);
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.session-track-option[aria-current="true"] { border-color: var(--accent-border); }
.session-track-option:is(:hover, :focus-visible) {
    color: var(--accent-border);
    border-color: var(--accent-border);
    outline: none;
}

.session-track-kicker {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--text-muted);
}

.session-track-toggles {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.session-toggle-button,
.session-transport button {
    min-height: 2.2rem;
    padding: 0.42rem 0.7rem;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-weight: var(--weight-bold);
    cursor: pointer;
}

.session-toggle-button.is-active {
    color: var(--page-background);
    background: var(--text-primary);
    border-color: var(--text-primary);
}

.session-toggle-button:disabled,
.session-transport button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.session-waveform-shell {
    position: relative;
    overflow: hidden;
    background: var(--surface-soft);
    border: 1px solid var(--surface-soft);
    border-radius: var(--radius-md);
}

.session-waveform-shell::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    height: 1px;
    background: var(--border-faint);
    pointer-events: none;
}

.session-main-waveform-shell {
    padding: 0.4rem 0.55rem;
}

.session-waveform {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 8.5rem;
    cursor: default;
    touch-action: pan-y;
}

:root[data-theme="dark"] .session-waveform { filter: invert(1); }

.session-waveform:focus-visible {
    outline: 2px solid var(--neutral-highlight);
    outline-offset: -2px;
}

.session-transport {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.55rem;
    align-items: center;
}

.session-transport .session-play-button {
    min-width: 5.2rem;
    color: var(--text-primary);
    background: var(--surface);
    border-color: var(--neutral-highlight);
}

.session-transport .session-play-button.is-playing {
    background: var(--surface);
}

.session-current-time {
    min-width: 3.25rem;
    color: var(--text-primary);
    font-family: var(--font-mono);
    text-align: center;
}

.session-scrubber {
    flex: 1 1 8rem;
    width: 100%;
    min-width: 0;
    accent-color: var(--text-primary);
    cursor: pointer;
}

.session-volume-control {
    display: flex;
    flex: none;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.session-volume-control input {
    width: 6rem;
    accent-color: var(--text-primary);
    cursor: pointer;
}

.session-playback-status {
    min-height: 1.2em;
    margin: 0.35rem 0 0;
    color: var(--text-muted);
}
.session-playback-status:empty { display: none; }

.session-buckets {
    min-width: 0;
    margin-top: 0.95rem;
}

.session-buckets h2 { margin-bottom: 0.65rem; }

.session-bucket-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
    gap: 0.55rem;
}

.session-bucket-choice {
    min-width: 0;
    min-height: 3.5rem;
    padding: 0.7rem 0.8rem;
    overflow-wrap: anywhere;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-weight: var(--weight-bold);
    text-align: left;
    cursor: pointer;
}

.session-bucket-choice[aria-pressed="true"] { border-color: var(--accent-border); }
.session-bucket-choice:is(:hover, :focus-visible),
.session-bucket-choice.is-drop-target {
    border-color: var(--accent-border);
    outline: none;
}
.session-bucket-choice.is-drop-target { background: var(--surface-soft); }
.session-bucket-choice.is-drop-target::after {
    content: "Release to add song";
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: var(--text-meta);
    font-weight: normal;
}
.session-bucket-message { margin-top: 0.6rem; color: var(--text-muted); }

@media (max-width: 72rem) {
    .session-workspace { grid-template-columns: minmax(0, 1fr); }
    .session-no-song-state { position: static; max-height: none; }
    .session-song-picker-list { max-height: 16rem; }
}

@media (max-width: 48rem) {
    .session-workspace {
        display: flex;
        flex-direction: column;
    }

    .session-workspace > .session-main-playback,
    .session-no-song-state,
    .session-content {
        width: 100%;
    }

    body.dashboard-body.session-body {
        height: auto;
        min-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .dashboard-page.session-page {
        display: block;
        width: 100%;
        height: auto;
        min-height: 100dvh;
        margin-left: 0;
        padding: 0.65rem 0.85rem 3rem;
        overflow: visible;
    }

    .session-main-playback {
        position: relative;
        top: auto;
        padding: 0.85rem;
    }

    .session-section-heading,
    .session-main-track-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .session-section-heading>p {
        max-width: none;
        text-align: left;
    }

    .session-main-track-heading {
        gap: 0.55rem;
    }

    .session-track-toggles {
        justify-content: flex-start;
    }

    .session-waveform {
        height: 6.4rem;
    }

    .session-transport {
        display: grid;
        grid-template-columns: auto 1fr;
    }

    .session-scrubber {
        grid-column: 1 / -1;
    }

    .session-volume-control {
        grid-column: 1 / -1;
    }
}

@media (max-width: 30rem) {
    .session-track-toggles {
        width: 100%;
    }

}

.work-bucket-card {
    position: relative;
    display: grid;
    min-width: 0;
    height: 100%;
    min-height: 0;
    padding: 0.75rem;
    align-content: start;
    justify-items: start;
    gap: 0.25rem;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--bucket-color, var(--border-subtle));
    border-radius: var(--radius-sm);
    color: inherit;
    text-decoration: none;
    cursor: default;
    -webkit-tap-highlight-color: transparent;
}

.work-bucket-card-link { display: grid; width: 100%; gap: 0.25rem; color: inherit; text-decoration: none; }
.work-bucket-card-link:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 3px; }

.work-bucket-name {
    display: -webkit-box;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: var(--text-primary);
    line-height: 1.25;
    text-align: left;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.work-bucket-new-song-status {
    margin: 0;
    color: var(--text-muted);
    text-align: left;
    white-space: nowrap;
}

.recent-song-list,
.setlist-list {
    display: flex;
    min-height: 0;
    padding: 0.1rem 0.1rem 0.8rem;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
}

.recent-song-card,
.recent-setlist-card {
    display: grid;
    min-width: 0;
    min-height: 4.4rem;
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: center;
    gap: 0.15rem 0.75rem;
    padding: 0.55rem 0.7rem;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: inherit;
    text-decoration: none;
}

.recent-setlist-card {
    background: var(--surface);
    border-color: var(--setlist-color, var(--border-subtle));
}

.recent-song-title,
.recent-setlist-name {
    overflow: hidden;
    color: var(--text-primary);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-song-artist,
.recent-setlist-details {
    overflow: hidden;
    color: var(--text-secondary);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-song-date,
.recent-setlist-date {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    color: var(--text-muted);
    white-space: nowrap;
}

.recent-song-date:empty,
.recent-setlist-date:empty {
    display: none;
}

#work-buckets-empty-state {
    color: var(--text-secondary);
}

.setlist-empty-state,
.song-empty-state {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.setlist-empty-state button,
.song-empty-state button {
    margin-top: auto;
}


body.dashboard-body dialog {
    width: min(28rem, calc(100% - 2rem));
    max-height: calc(100svh - 2rem);
    margin: auto;
    padding: 0;
    overflow: auto;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--neutral-highlight);
    border-radius: var(--radius-lg);
}

dialog::backdrop {
    background: var(--dialog-backdrop);
}

:is(.project-action-dialog, .manage-project-dialog, .import-songs-dialog, .action-dialog-form) .dialog-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

body.dashboard-body .project-dialog {
    width: min(26rem, calc(100% - 2rem));
    padding: 1.25rem;
}

.project-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.4rem;
}

.project-dialog-header h2 {
    letter-spacing: 0.02em;
}

.project-dialog-close-button {
    appearance: none;
    display: grid;
    width: 2rem;
    height: 2rem;
    padding: 0;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    place-items: center;
}

.project-dialog-close-button svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.members-panel-status { margin: 0.5rem 0 0; color: var(--text-secondary); }
.members-name-list { display: grid; margin: 0.5rem 0 0; padding: 0; list-style: none; }
.members-name-list li { padding: 0.55rem 0.1rem; font-weight: var(--weight-bold); }
.members-name-list li + li { border-top: 1px solid var(--border-faint); }
.members-panel {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 90;
    display: flex;
    width: var(--sidebar-width);
    padding: 1.5rem 1rem;
    overflow-y: auto;
    flex-direction: column;
    background: var(--surface);
    border-left: 1px solid var(--border-faint);
}
body.dashboard-body.members-panel-open .dashboard-page {
    min-width: 0;
    margin-right: var(--sidebar-width);
}
@media (max-width: 48rem) {
    body.dashboard-body.members-panel-open .dashboard-page { display: none; }
    body.dashboard-body .members-panel { z-index: 1002; width: 100vw; }
}

.project-dialog>p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.project-menu-options {
    display: grid;
    max-height: 18rem;
    gap: 0.45rem;
    overflow-y: auto;
}

.project-menu-option {
    appearance: none;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.65rem 0.75rem;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-weight: var(--weight-medium);
    text-align: left;
    cursor: pointer;
}

.project-menu-option[aria-current="true"] {
    color: var(--text-primary);
    background: var(--surface);
    border-color: var(--border-strong);
}

body.dashboard-body .project-action-dialog {
    padding: 1.25rem;
}

.add-project-choice-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.add-project-choice-actions button {
    min-height: 3rem;
    padding: 0.7rem 0.9rem;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-weight: var(--weight-bold);
    cursor: pointer;
}

.add-project-choice-actions #show-join-project-form-button {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - 0.75rem) / 2);
}

.project-action-dialog form:not([hidden]) {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.project-action-dialog .dialog-actions button {
    min-height: 2.75rem;
    padding: 0.65rem 0.8rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-weight: var(--weight-bold);
    cursor: pointer;
}

#dashboard-create-project-message,
#dashboard-join-project-message {
    min-height: 1.2rem;
    color: var(--text-secondary);
}

body.dashboard-body .manage-project-dialog {
    width: min(34rem, calc(100% - 2rem));
    padding: 1.25rem;
}

.manage-project-section {
    display: grid;
    gap: 0.75rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-subtle);
}

.manage-project-section:first-of-type {
    border-top: 0;
}

.manage-project-section h3 {
    color: var(--text-primary);
}

.manage-project-section>p {
    color: var(--text-muted);
    line-height: 1.5;
}

.manage-project-section form {
    display: grid;
    gap: 0.75rem;
}

.manage-project-dialog button:not(.project-dialog-close-button) {
    min-height: 2.6rem;
    padding: 0.6rem 0.8rem;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-weight: var(--weight-bold);
    cursor: pointer;
}

.project-code-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
}

#manage-project-code {
    width: 100%;
    min-width: 0;
    min-height: 2.6rem;
    padding: 0.6rem 0.75rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
}

.project-member-list {
    display: grid;
    gap: 0.5rem;
}

.project-member {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

.project-member-details {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.project-member-email {
    overflow: hidden;
    color: var(--text-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-member-role {
    color: var(--text-secondary);
    text-transform: capitalize;
}

.project-member-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.collaboration-person-card {
    grid-template-columns: minmax(0, 1fr) auto;
}

@media (max-width: 36rem) {
    .collaboration-project-card,
    .collaboration-person-card {
        grid-template-columns: 1fr;
    }

    .collaboration-project-actions {
        justify-content: stretch;
    }

    .collaboration-project-actions button {
        width: 100%;
    }
}

.toggle-project-member-admin-button {
    color: var(--text-secondary);
    background: var(--surface);
    border-color: var(--border-subtle);
}

.ownership-successor-options {
    display: grid;
    max-height: 14rem;
    gap: 0.5rem;
    overflow-y: auto;
}

.ownership-successor-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.ownership-successor-radio {
    width: 1rem;
    height: 1rem;
    accent-color: var(--text-primary);
}

.ownership-successor-details {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.ownership-successor-email {
    overflow: hidden;
    color: var(--text-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ownership-successor-option:has(.ownership-successor-radio:checked) {
    color: var(--text-primary);
    background: var(--neutral-highlight);
    border-color: var(--neutral-highlight);
}

#no-admin-successor-message {
    color: var(--danger);
}

#confirm-leave-project-button {
    color: var(--danger);
    background: var(--surface);
    border-color: var(--border-strong);
}

#confirm-leave-project-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.remove-project-member-button,
.remove-collaboration-project-button,
.cancel-collaboration-invitation-button,
#leave-project-button,
#delete-project-button {
    color: var(--danger);
    background: var(--surface);
    border-color: var(--border-strong);
}

.remove-project-member-button:is(:hover, :focus-visible),
.remove-collaboration-project-button:is(:hover, :focus-visible),
.cancel-collaboration-invitation-button:is(:hover, :focus-visible),
#leave-project-button:is(:hover, :focus-visible),
#delete-project-button:is(:hover, :focus-visible) {
    color: var(--accent-border);
    background: var(--surface);
    border-color: var(--accent-border);
}

.project-danger-zone {
    border-top-color: var(--border-strong);
}

#rename-project-message,
#invite-project-member-message,
#invite-collaboration-project-message {
    min-height: 1.2rem;
    color: var(--text-secondary);
}

body.dashboard-body .import-songs-dialog {
    width: min(42rem, calc(100% - 2rem));
    padding: 1.25rem;
}

.import-songs-explanation,
.collaboration-song-copy-note {
    color: var(--text-muted);
    line-height: 1.5;
}

.import-songs-explanation {
    margin-top: 0.8rem;
}

.import-songs-explanation strong {
    color: var(--text-primary);
}

#import-collaboration-songs-form {
    display: grid;
    gap: 1rem;
    margin-top: 1.1rem;
}

#import-collaboration-songs-form .form-field {
    display: grid;
    gap: 0.45rem;
}

#import-collaboration-songs-form select,
#import-collaboration-songs-form input[type="search"] {
    width: 100%;
    min-height: var(--dialog-control-height);
    padding: 0.65rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: inherit;
}

.collaboration-song-import-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

#collaboration-song-import-summary {
    color: var(--text-secondary);
    font-weight: var(--weight-bold);
}

.collaboration-song-select-all {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.collaboration-song-select-all input,
.collaboration-import-song-checkbox {
    width: 1rem;
    height: 1rem;
    accent-color: var(--text-primary);
}

.collaboration-song-import-list {
    display: grid;
    max-height: 18rem;
    gap: 0.55rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: var(--neutral-highlight) transparent;
}

.collaboration-import-song-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.collaboration-import-song-card:hover,
.collaboration-import-song-card:focus-within,
.collaboration-import-song-card:has(.collaboration-import-song-checkbox:checked) {
    color: var(--text-primary);
    background: var(--neutral-highlight);
    border-color: var(--neutral-highlight);
}

.collaboration-import-song-details {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.collaboration-import-song-title,
.collaboration-import-song-artist {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collaboration-import-song-title {
    color: var(--text-primary);
}

.collaboration-import-song-artist,
.collaboration-import-song-tracks {
    color: var(--text-muted);
}

.collaboration-song-import-empty-state {
    padding: 1rem;
    color: var(--text-muted);
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-sm);
}

.import-songs-dialog .dialog-actions button {
    padding: 0.65rem 0.8rem;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-weight: var(--weight-bold);
    cursor: pointer;
}

.import-songs-dialog .dialog-actions button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

#collaboration-song-import-message {
    min-height: 1.2rem;
    color: var(--text-secondary);
}

@media (max-width: 36rem) {
    .collaboration-song-import-toolbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.6rem;
    }

    .collaboration-import-song-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .collaboration-import-song-tracks {
        grid-column: 2;
    }
}

.song-editor-dialog {
    width: min(40rem, calc(100% - 2rem));
}

#create-setlist-form,
.song-editor-form {
    display: grid;
    gap: 1rem;
    padding: 1.4rem;
}

#create-setlist-form h2,
.song-editor-form h2 {
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

#create-setlist-form label,
.song-editor-form label,
.song-editor-form legend {
    color: var(--text-secondary);
    font-weight: var(--weight-medium);
    letter-spacing: 0.05em;
}

#setlist-notes {
    min-height: 6rem;
    resize: vertical;
}


.setlist-date-input-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--control-height);
    align-items: stretch;
    gap: 0.55rem;
}

.setlist-date-picker-button {
    appearance: none;
    display: grid;
    min-width: var(--control-height);
    padding: 0;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    place-items: center;
}

.setlist-date-picker-icon {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.setlist-date-picker-button:focus-visible {
    color: var(--text-muted);
    border-color: var(--neutral-highlight);
    outline: none;
}

@media (hover: hover) and (pointer: fine) {
    .setlist-date-picker-button:hover {
        color: var(--text-muted);
        border-color: var(--neutral-highlight);
    }
}

#setlist-date-display[aria-invalid="true"] {
    border-color: var(--danger);
}

#setlist-date-message {
    color: var(--danger);
}

.setlist-date-picker {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 1200;
    width: min(21rem, calc(100vw - 2rem));
    max-height: calc(100svh - 2rem);
    margin: 0;
    padding: 1rem;
    overflow-y: auto;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--neutral-highlight);
    border-radius: var(--radius-lg);
    transform: translate(-50%, -50%);
}

.setlist-date-picker.date-picker-positioned {
    transform: none;
}

.setlist-date-picker-header {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr) 2.25rem;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.setlist-date-picker-header h3 {
    overflow: hidden;
    color: var(--text-primary);
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.setlist-date-navigation-button {
    appearance: none;
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    place-items: center;
}

.setlist-date-navigation-button svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (hover: hover) and (pointer: fine) {
    .setlist-date-navigation-button:hover {
        color: var(--text-primary);
        background: var(--surface);
        border-color: var(--neutral-highlight);
    }
}

.setlist-date-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.25rem;
    margin-bottom: 0.35rem;
    color: var(--text-muted);
    text-align: center;
    text-transform: uppercase;
}

.setlist-date-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.25rem;
}

.setlist-date-empty-day {
    aspect-ratio: 1;
}

.setlist-date-day-button {
    appearance: none;
    display: grid;
    width: 100%;
    aspect-ratio: 1;
    min-height: 2rem;
    padding: 0;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    place-items: center;
}

.setlist-date-day-button[data-today="true"] {
    color: var(--text-primary);
    border-color: var(--neutral-highlight);
}

.setlist-date-day-button[aria-pressed="true"] {
    color: var(--text-primary);
    background: var(--surface);
    border-color: var(--border-strong);
}

@media (hover: hover) and (pointer: fine) {
    .setlist-date-day-button:hover {
        color: var(--text-primary);
        background: var(--surface);
        border-color: var(--neutral-highlight);
    }
}

.setlist-date-day-button[aria-pressed="true"]:is(:hover, :focus-visible) {
    border-color: var(--border-strong);
}

.setlist-date-picker-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.9rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-subtle);
}

.setlist-date-picker-actions button {
    min-height: 2.5rem;
    padding: 0.55rem 0.75rem;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

#finish-setlist-date-button {
    color: var(--text-primary);
    background: var(--surface);
    border-color: var(--neutral-highlight);
}

@media (hover: hover) and (pointer: fine) {
    .setlist-date-picker-actions button:hover {
        color: var(--text-primary);
        border-color: var(--neutral-highlight);
    }
}

#create-setlist-dialog .dialog-actions,
.song-editor-dialog .dialog-actions,
#create-lane-dialog .dialog-actions,
#production-song-work-dialog .dialog-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.song-editor-dialog .dialog-actions .form-feedback {
    grid-column: 1 / -1;
}

#create-setlist-dialog .dialog-actions button,
.song-editor-dialog .dialog-actions button,
#create-lane-dialog .dialog-actions button,
#production-song-work-dialog .dialog-actions button {
    min-height: 2.75rem;
    padding: 0.65rem 0.8rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 0.55rem;
    font-weight: var(--weight-bold);
    cursor: pointer;
}

#submit-create-setlist-button,
#submit-add-song-button,
#production-save-lane-button,
#production-song-work-dialog .dialog-actions button {
    background: var(--surface);
    border-color: var(--neutral-highlight);
}

#create-setlist-dialog .dialog-actions button:is(:hover, :focus-visible),
.song-editor-dialog .dialog-actions button:is(:hover, :focus-visible),
#create-lane-dialog .dialog-actions button:is(:hover, :focus-visible),
#production-song-work-dialog .dialog-actions button:is(:hover, :focus-visible) {
    color: var(--accent-border);
    background: var(--surface);
    border-color: var(--accent-border);
    outline: none;
    transform: translateY(-1px);
}

#create-setlist-form .color-field {
    grid-template-columns: max-content auto;
    align-items: center;
    justify-content: start;
    column-gap: 0.65rem;
}

.color-picker-trigger {
    appearance: none;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0.25rem;
    background: var(--surface);
    border: 1px solid var(--neutral-highlight);
    border-radius: 0.55rem;
    cursor: pointer;
}

.color-picker-trigger-swatch {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--neutral-highlight);
    border-radius: var(--radius-xs);
}

.song-editor-dialog .song-key-input-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: stretch;
}

#song-key-mode-button,
#edit-song-key-mode-button {
    min-width: 5.5rem;
    padding: 0 1rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 0.65rem;
    cursor: pointer;
}

#song-key-mode-button[data-mode="minor"],
#edit-song-key-mode-button[data-mode="minor"] {
    background: var(--surface);
    border-color: var(--border-strong);
}

.song-editor-dialog input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.song-editor-dialog input[type="number"]::-webkit-inner-spin-button,
.song-editor-dialog input[type="number"]::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.song-editor-dialog fieldset {
    display: grid;
    gap: 0.85rem;
    min-width: 0;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 0.8rem;
}

.song-editor-dialog legend {
    padding: 0 0.4rem;
    color: var(--text-primary);
}

.song-editor-dialog .track-list {
    display: grid;
    gap: 0.85rem;
}

.track-reorder-help {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.45;
}

.song-editor-dialog .track-entry {
    position: relative;
    display: grid;
    gap: 0.85rem;
    padding: 0.85rem;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.song-editor-dialog .track-entry button {
    touch-action: auto;
}

.song-editor-dialog .track-entry .track-file-label,
.song-editor-dialog .track-entry .track-file-input {
    cursor: default;
    touch-action: auto;
}

.song-editor-dialog .track-entry input[type="text"] {
    cursor: text;
    user-select: text;
}

.song-editor-dialog .track-entry:hover,
.song-editor-dialog .track-entry:focus-within {
    background: var(--neutral-highlight);
    border-color: var(--neutral-highlight);
}

.song-editor-dialog .track-entry.is-drag-source {
    opacity: 0.18;
    background: var(--neutral-highlight);
    border-color: var(--neutral-highlight);
    border-style: dashed;
}

.song-editor-dialog .track-entry.is-drag-source>* {
    visibility: hidden;
}

.song-editor-dialog .track-entry.is-dragging {
    z-index: 1000;
    opacity: 0.98;
    background: var(--neutral-highlight);
    border-color: var(--neutral-highlight);
    cursor: grabbing;
    transform: rotate(0.35deg) scale(1.025);
}

body.is-reordering-track,
body.is-reordering-track * {
    cursor: grabbing !important;
}

.song-editor-dialog .track-entry+.track-entry {
    margin-top: 0;
}

.song-editor-dialog input[type="file"] {
    width: 100%;
    padding: 0.4rem;
    color: var(--text-secondary);
    background: var(--surface-soft);
    border: 1px solid var(--border-subtle);
    border-radius: 0.65rem;
}

.song-editor-dialog input[type="file"]::file-selector-button {
    margin-right: 0.75rem;
    padding: 0.65rem 0.85rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.song-editor-dialog .song-tracks {
    gap: 0.65rem;
    padding-bottom: 0.8rem;
}

.track-name-heading-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
}

.track-name-heading-row>label {
    margin-right: auto;
}

.track-main-playback-label {
    flex: 0 0 auto;
    color: var(--text-primary);
    font-weight: var(--weight-bold);
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.remove-add-track-button,
.remove-track-button {
    appearance: none;
    display: grid;
    flex: 0 0 auto;
    width: 1.8rem;
    height: 1.8rem;
    padding: 0;
    color: var(--text-muted);
    background: transparent;
    border: 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    place-items: center;
}

.remove-track-icon {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.remove-add-track-button:active,
.remove-add-track-button:focus-visible,
.remove-track-button:active,
.remove-track-button:focus-visible {
    color: var(--danger);
    background: var(--surface);
    outline: none;
}

@media (hover: hover) and (pointer: fine) {

    .remove-add-track-button:hover,
    .remove-track-button:hover {
        color: var(--danger);
        background: var(--surface);
    }
}

.add-track-button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-self: start;
    width: auto;
    min-height: auto;
    padding: 0.35rem 0;
    color: var(--text-secondary);
    background: transparent;
    border: 0;
    border-radius: 0;
    font-weight: var(--weight-medium);
    cursor: pointer;
}

.add-track-button span { color: inherit; }

.add-track-button:active,
.add-track-button:focus-visible {
    color: var(--text-muted);
    background: transparent;
    border: 0;
    outline: none;
}

@media (hover: hover) and (pointer: fine) {
    .add-track-button:hover {
        color: var(--text-muted);
        background: transparent;
        border: 0;
    }
}

.add-track-button:is(:hover, :focus-visible) {
    color: var(--track-action-accent) !important;
    border-color: transparent !important;
}

.song-editor-dialog .setlist-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    max-height: 10rem;
    gap: 0.55rem;
    overflow-y: auto;
}

.song-editor-dialog .setlist-options label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.6rem;
    padding: 0.6rem 0.7rem;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.song-editor-dialog .setlist-options label:hover,
.song-editor-dialog .setlist-options label:focus-within {
    color: var(--text-primary);
    background: var(--surface-soft);
    border-color: var(--neutral-highlight);
}

.song-editor-dialog .setlist-options input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--text-primary);
}

.song-editor-dialog .setlist-options label:has(input:checked) {
    color: var(--text-primary);
    background: var(--neutral-highlight);
    border-color: var(--neutral-highlight);
}

.song-editor-dialog .no-setlists-message,
.song-editor-dialog .no-buckets-message {
    margin: 0;
    color: var(--text-muted);
}

.song-editor-dialog .song-setlists:has(.no-setlists-message:not([hidden])) .setlist-options,
.song-editor-dialog .song-buckets:has(.no-buckets-message:not([hidden])) .bucket-options {
    display: none;
}

.song-editor-dialog .song-setlists:has(.no-setlists-message:not([hidden])),
.song-editor-dialog .song-buckets:has(.no-buckets-message:not([hidden])) {
    gap: 0.5rem;
    padding: 0.75rem 1rem 0.85rem;
}

.song-editor-collections {
    display: grid;
    align-content: start;
    gap: 1rem;
    min-width: 0;
}


.color-picker-popover {
    position: fixed;
    top: 50%;
    right: 1rem;
    bottom: auto;
    left: auto;
    width: min(20rem, calc(100vw - 2rem));
    margin: 0;
    padding: 1rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 0.9rem;
    transform: translateY(-50%);
}

.color-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.color-picker-close-button {
    appearance: none;
    display: grid;
    width: 2rem;
    height: 2rem;
    padding: 0;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 0.45rem;
    cursor: pointer;
    place-items: center;
}

.color-picker-close-button svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
}

.color-picker-content {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.color-picker-map {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 4 / 3;

    background:
        linear-gradient(to top, var(--color-black), transparent),
        linear-gradient(to right, var(--color-white), transparent),
        hsl(var(--picker-hue) 100% 50%);
    border: 1px solid var(--border-subtle);
    border-radius: 0.65rem;
    cursor: crosshair;
    touch-action: none;
    user-select: none;
}

.color-picker-map-cursor {
    position: absolute;
    top: 20%;
    left: 65%;
    width: 0.9rem;
    height: 0.9rem;
    border: 2px solid var(--color-white);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.color-picker-hue-control,
.color-picker-hex-field {
    display: grid;
    gap: 0.45rem;
}

.color-picker-hue-control label,
.color-picker-hex-field label {
    color: var(--text-secondary);
    font-weight: var(--weight-bold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#color-picker-hue {
    appearance: none;
    width: 100%;
    height: 0.7rem;
    background: var(--hue-gradient);
    border: 0;
    border-radius: var(--radius-pill);
    cursor: pointer;
    touch-action: none;
}

#color-picker-hue::-webkit-slider-thumb {
    appearance: none;
    width: 1.1rem;
    height: 1.1rem;
    background: transparent;
    border: 2px solid var(--color-white);
    border-radius: 50%;
}

#color-picker-hue::-moz-range-thumb {
    width: 1.1rem;
    height: 1.1rem;
    background: transparent;
    border: 2px solid var(--color-white);
    border-radius: 50%;
}

.color-picker-value-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
    gap: 0.75rem;
}

.color-picker-preview {
    width: 2.8rem;
    height: 2.8rem;
    background: var(--neutral-highlight);
    border: 1px solid var(--border-subtle);
    border-radius: 0.55rem;
}

#color-picker-hex {
    width: 100%;
    height: 2.8rem;
    padding: 0 0.75rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 0.55rem;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
    outline: none;
}

#color-picker-hex:focus {
    border-color: var(--neutral-highlight);
}

#finish-color-button {
    min-height: 2.75rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--neutral-highlight);
    border-radius: 0.55rem;
    font-weight: var(--weight-bold);
    cursor: pointer;
}


@keyframes form-enter {
    from {
        opacity: 0;
        transform: translateY(0.4rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


body.dashboard-body dialog {
    line-height: 1.5;
}

body.dashboard-body dialog h2 {
    line-height: 1.3;
}

body.dashboard-body dialog h3 {
    line-height: 1.35;
}

body.dashboard-body dialog label,
body.dashboard-body dialog legend {
    line-height: 1.4;
}

body.dashboard-body dialog button {
    line-height: 1.2;
}

body.dashboard-body dialog button:not([aria-label]):not(.add-track-button),
body.dashboard-body dialog input[type="file"]::file-selector-button {
    min-height: var(--dialog-control-height);
    padding: 0.55rem 0.85rem;
}

body.dashboard-body dialog input[type="file"] {
    padding: 0.3rem;
}

body.dashboard-body dialog input[type="file"]::file-selector-button {
    margin-right: 0.65rem;
    font-family: inherit;
}


.action-dialog-form {
    display: grid;
    gap: 1rem;
    padding: 1.4rem;
}

.action-dialog-form h2 {
    color: var(--text-primary);
    line-height: 1.3;
}

.action-dialog-form>p {
    color: var(--text-secondary);
}

.action-dialog-form fieldset {
    display: grid;
    min-width: 0;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.action-dialog-form legend {
    padding-inline: 0.4rem;
    color: var(--text-primary);
}

.action-dialog-form textarea {
    min-height: 6rem;
    resize: vertical;
}

.action-dialog-form .dialog-actions button {
    min-height: var(--dialog-control-height);
    padding: 0.55rem 0.85rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-weight: var(--weight-medium);
    cursor: pointer;
}

#confirm-delete-button {
    color: var(--danger);
    background: var(--surface);
    border-color: var(--border-strong);
}

@media (hover: hover) and (pointer: fine) {
    .action-dialog-form .dialog-actions button:hover {
        background: var(--surface);
        border-color: var(--neutral-highlight);
    }

    #confirm-delete-button:hover {
        color: var(--danger);
        background: var(--surface);
        border-color: var(--border-strong);
    }
}


.bucket-options {
    display: grid;
    max-height: 14rem;
    gap: 0.5rem;
    overflow-y: auto;
}

.bucket-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--bucket-color, var(--border-subtle));
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.bucket-option-input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--text-primary);
}

.bucket-option-name {
    min-width: 0;
    color: var(--text-primary);
    font-weight: var(--weight-medium);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bucket-option-details {
    grid-column: 2;
    color: var(--text-muted);
}

.bucket-option-details:empty {
    display: none;
}

.bucket-option:has(.bucket-option-input:checked),
.bucket-option:focus-within {
    color: var(--text-primary);
    background: var(--surface);
    border-color: var(--bucket-color, var(--border-subtle));
}

#no-buckets-message {
    color: var(--text-secondary);
}

@media (hover: hover) and (pointer: fine) {
    .bucket-option:hover {
        color: var(--text-primary);
        background: var(--surface);
        border-color: var(--bucket-color, var(--border-subtle));
    }

}


body.song-library-body {
    height: 100dvh;
    overflow: hidden;
}

.dashboard-page.song-library-page {
    display: flex;
    height: 100dvh;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
}

.song-library-workspace {
    display: flex;
    min-width: 0;
    min-height: 0;
    margin: 0 0 calc(-1 * var(--page-gutter, 2rem)) 0;
    flex: 1 1 auto;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 0.85rem;
}

.song-library-toolbar {
    display: grid;
    flex: 0 0 auto;
    gap: 0;
    margin: 0;
}

.song-library-page .song-results {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}


.setlist-tabs {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem var(--page-gutter, 2rem);
    overflow: hidden;
    background: var(--song-results-background);
    border: 0;
    border-bottom: 1px solid var(--border-faint);
    border-radius: 0;
}

.setlist-tabs h2 {
    color: var(--text-primary);
    font-weight: var(--weight-bold);
}

.setlist-tabs #song-collection-toggle {
    padding: 0.2rem 0.35rem;
    color: var(--text-primary);
    background: transparent;
    border: 0;
    border-radius: 0;
    font-weight: var(--weight-bold);
}

#song-collection-toggle span[aria-hidden="true"] {
    margin-left: 0.2rem;
    color: var(--text-muted);
    font-size: 0.85em;
}

.setlist-tabs #song-collection-toggle:is(:hover, :focus-visible) {
    background: transparent;
    border: 0;
    outline: none;
}

.setlist-tabs #song-collection-toggle:is(:hover, :focus-visible) .collection-toggle-label {
    color: var(--accent-border);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.setlist-tab-list {
    display: flex;
    min-width: 0;
    gap: 1rem;
    padding: 0.7rem 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
}

.setlist-tab-list button {
    flex: 0 0 auto;
    scroll-snap-align: start;
    border-radius: var(--radius-md);
}

.setlist-tabs button {
    min-height: 2.4rem;
    padding: 0.45rem 0.75rem;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-weight: var(--weight-medium);
    white-space: nowrap;
    cursor: pointer;
}

.setlist-tabs .setlist-tab-button {
    background: var(--surface);
    border-color: var(--setlist-tab-color, var(--border-subtle));
}

.setlist-tabs .setlist-tab-button:is(:hover, :focus-visible),
.setlist-tabs .setlist-tab-button[aria-pressed="true"] {
    background: var(--surface);
    border-color: var(--setlist-tab-color, var(--border-subtle));
    outline: none;
}

.setlist-tabs button[aria-pressed="true"] {
    color: var(--text-primary);
    background: var(--surface);
    border-color: var(--setlist-tab-color, var(--border-subtle));
}


#all-songs-button:is(:hover, :focus-visible) {
    color: var(--text-primary);
    background: var(--surface);
    border-color: var(--border-subtle);
    outline: none;
}

#all-songs-button[aria-pressed="true"] {
    color: var(--text-primary);
    background: var(--surface);
    border-color: var(--border-strong);
}

.library-controls {
    display: grid;
    gap: 0;
    padding: 0.65rem var(--page-gutter, 2rem);
    background: var(--song-results-background);
    border: 0;
    border-bottom: 1px solid var(--border-faint);
    border-radius: 0;
}

#song-filter-form {
    display: flex;
    align-items: end;
    gap: 0.65rem;
    flex-wrap: wrap;
}

#song-filter-form .filter-field {
    gap: 0.35rem;
}

.search-filter {
    flex: 2 1 14rem;
}

.sort-filter {
    flex: 0 1 11rem;
}

.genre-filter {
    flex: 0 1 8rem;
}

.key-filter {
    flex: 0 1 12.5rem;
}

.key-filter-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.4rem;
}

.tempo-filter {
    display: grid;
    grid-template-columns: 10rem 5rem;
    flex: 0 1 15.65rem;
    gap: 0.65rem;
}

#tempo-target {
    width: 5rem;
    padding-right: 0.35rem;
    padding-left: 0.65rem;
}

#key-mode-button,
#clear-song-filters {
    min-height: var(--control-height);
    padding: 0.65rem 0.85rem;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-weight: var(--weight-medium);
    white-space: nowrap;
    cursor: pointer;
}

.song-library-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0.5rem 0 0;
}

.song-library-actions #open-add-song-button,
.song-library-actions #toggle-song-metadata-button {
    display: inline-flex;
    min-height: 2.5rem;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
}

.song-library-actions #toggle-song-metadata-button {
    appearance: none;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    font-weight: var(--weight-medium);
    white-space: nowrap;
    cursor: pointer;
}


.song-results {
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.65rem var(--page-gutter, 2rem) 1.25rem;
    background: var(--song-results-background);
    border: 0;
    border-radius: 0;
}

#open-add-song-button {
    display: none;
    min-height: 2.5rem;
    padding: 0.5rem 0.9rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-weight: var(--weight-medium);
    white-space: nowrap;
    cursor: pointer;
}

.dashboard-home-body #open-add-song-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#song-list-message {
    color: var(--text-secondary);
}

.song-list {
    flex: 0 0 auto;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    overflow: hidden;
}


.song-card {
    position: relative;
    padding: 0.35rem 0.65rem;
    background: var(--song-card-background);
    border-bottom: 1px solid var(--border-faint);
}

.song-card:nth-child(even) { background: var(--song-row-shaded); }
.song-card:first-child { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.song-card:last-child { border-bottom: 0; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.song-card:only-child { border-radius: var(--radius-sm); }
.song-card-main {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
}
.song-card-primary { min-width: 0; }
.song-card-title,
.song-card-artist {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.song-card-main-actions { display: flex; align-items: center; gap: 0.3rem; }
.song-card-main-actions .song-card-more-button {
    padding-inline: 0.3rem;
    background: transparent;
    border: 0;
    letter-spacing: 0.08em;
}

.song-card-title {
    color: var(--text-primary);
    font-weight: var(--weight-bold);
    line-height: 1.3;
}

.song-card-artist {
    color: var(--text-secondary);
}

.song-card-audio-status {
    margin: 0;
    color: var(--text-muted);
    font-size: var(--text-meta);
}

.song-card-metadata {
    display: none;
    margin-top: 0.4rem;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.song-card-metadata-item {
    display: inline-flex;
    gap: 0.3rem;
    padding: 0.25rem 0.45rem;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-faint);
    border-radius: var(--radius-sm);
}

.song-card-metadata-label {
    color: var(--text-muted);
}

.song-card-metadata-item:has(> span:last-child:empty) {
    display: none;
}

.song-card-metadata:not( :has(.song-card-metadata-item > span:last-child:not(:empty))) {
    display: none;
}

.song-card:has(.song-card-more-button[aria-expanded="true"]) .song-card-metadata,
.song-library-body.show-song-metadata .song-card-metadata {
    display: flex;
}

.song-card:is(:hover, :focus-visible, .is-selected) {
    outline: 1px solid var(--accent-border);
    outline-offset: -1px;
}

.song-card.is-selected {
    outline: 2px solid var(--accent-border);
    outline-offset: -2px;
}

.song-card-details {
    display: flex;
    align-items: center;
    gap: 0.5rem 1rem;
    flex-wrap: wrap;
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--border-faint);
}

.song-card-actions,
.song-card-setlist-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.song-card button {
    min-height: 1.8rem;
    padding: 0.2rem 0.5rem;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-weight: var(--weight-medium);
    cursor: pointer;
}

.song-card-setlists {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    color: var(--text-secondary);
}

.song-card-setlists>span:first-child {
    color: var(--text-muted);
}

.delete-song-button {
    color: var(--danger);
}

@media (hover: hover) and (pointer: fine) {
    .song-card button:hover {
        color: var(--text-primary);
        background: var(--surface);
        border-color: var(--accent-border);
    }

    .delete-song-button:hover {
        color: var(--danger);
        background: var(--surface);
        border-color: var(--border-strong);
    }
}


.song-selection-actions {
    display: flex;
    width: 100%;
    gap: 0.5rem;
    padding: 0.65rem;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--neutral-highlight);
    border-radius: var(--radius-md);
}

#selected-song-summary {
    margin: 0;
    color: var(--text-primary);
    font-weight: var(--weight-medium);
}

.song-selection-actions button {
    min-height: 2.3rem;
    padding: 0.4rem 0.65rem;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-weight: var(--weight-medium);
    white-space: nowrap;
    cursor: pointer;
}

#clear-song-selection-button {
    color: var(--text-muted);
    background: transparent;
    border-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
    .song-selection-actions button:hover {
        color: var(--text-primary);
        background: var(--surface);
        border-color: var(--neutral-highlight);
    }

    #clear-song-selection-button:hover {
        color: var(--text-primary);
        background: transparent;
        border-color: transparent;
    }
}


@media (min-width: 64rem) {

    body.dashboard-body :is(#add-song-dialog, #edit-song-dialog) {
        width: min(92rem, calc(100% - 3rem));
    }

    :is(#add-song-form, #edit-song-form) {
        grid-template-columns:
            minmax(16rem, 0.9fr) minmax(18rem, 1fr) minmax(17rem, 1fr);
        grid-template-areas:
            "heading heading heading"
            "tracks title key"
            "tracks artist tempo"
            "tracks genre collections"
            "tracks subgenres collections"
            "tracks . collections"
            "tracks actions actions";
        align-items: start;
        column-gap: 1.5rem;
    }

    :is(#add-song-form, #edit-song-form)>h2 {
        grid-area: heading;
    }

    :is(#add-song-form>.song-tracks, #edit-song-form>.edit-song-tracks) {
        grid-area: tracks;
        max-height: min(32rem, calc(100svh - 8rem));
        overflow-y: auto;
        scrollbar-gutter: stable;
    }

    :is(#add-song-form>.add-song-title-field, #edit-song-form>.edit-song-title-field) {
        grid-area: title;
    }

    :is(#add-song-form>.add-song-artist-field, #edit-song-form>.edit-song-artist-field) {
        grid-area: artist;
    }

    :is(#add-song-form>.add-song-genre-field, #edit-song-form>.edit-song-genre-field) {
        grid-area: genre;
    }

    :is(#add-song-form>.add-song-subgenres-field, #edit-song-form>.edit-song-subgenres-field) {
        grid-area: subgenres;
    }

    :is(#add-song-form>.song-key-fields, #edit-song-form>.edit-song-key-fields) {
        grid-area: key;
    }

    :is(#add-song-form>.song-tempo-field, #edit-song-form>.edit-song-tempo-field) {
        grid-area: tempo;
    }

    :is(#add-song-form, #edit-song-form)>.song-editor-collections {
        grid-area: collections;
    }

    :is(#add-song-form, #edit-song-form)>.dialog-actions {
        grid-area: actions;
        align-self: end;
    }
}


@media (max-width: 48rem) {

    .mobile-sidebar-backdrop {
        position: fixed;
        z-index: 999;
        inset: 0;
        background: var(--surface-soft);
    }

    .mobile-sidebar-toggle-button {
        appearance: none;
        position: relative;
        z-index: 1001;
        display: inline-flex;
        flex: 0 0 auto;
        padding: 0.25rem;
        color: var(--text-primary);
        background: transparent;
        border: 0;
        cursor: pointer;
    }

    .mobile-sidebar-brand-text {
        max-width: 0;
        overflow: hidden;
        white-space: nowrap;
        opacity: 0;
        transform: translateX(-0.35rem);
    }

    .mobile-sidebar-toggle-button[aria-expanded="false"] {
        gap: 0;
    }

    .mobile-sidebar-toggle-button[aria-expanded="true"] {
        gap: 0.65rem;
    }

    .mobile-sidebar-toggle-button[aria-expanded="true"] .mobile-sidebar-brand-text {
        max-width: 12rem;
        opacity: 1;
        transform: translateX(0);
    }

    .site-sidebar {
        z-index: 1000;
        width: min(18rem, 85vw);
        padding-top: 5rem;
        transform: translateX(-100%);
    }

    .site-sidebar.sidebar-open {
        transform: translateX(0);
    }

    .site-sidebar>.site-name {
        display: none;
    }

    .project-switcher {
        display: none;
    }

    .dashboard-page {
        display: flex;
        width: 100%;
        height: 100dvh;
        min-height: 0;
        margin-left: 0;
        padding: 0.65rem 0.85rem 0;
        flex-direction: column;
        overflow: hidden;
    }

    .dashboard-page.utility-page {
        height: 100dvh;
        min-height: 0;
        padding-bottom: 1rem;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .utility-page .mobile-project-heading strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .page-header {
        position: relative;
        top: auto;
        z-index: auto;
        flex: 0 0 auto;
        align-items: center;
        gap: 0;
        margin: 0 0 0.65rem;
        padding: 0.2rem 0 0.65rem;
    }

    .page-header-project-controls {
        gap: 0.5rem;
        margin-left: 0;
    }

    .mobile-project-heading {
        flex: 1;
    }

    .current-project-button {
        display: inline-flex;
        min-width: 0;
        max-width: 100%;
        padding: 0.3rem 0.35rem;
        text-align: left;
    }

    .current-project-button > strong {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.dashboard-body {
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    body.dashboard-body.production-board-body {
        height: auto;
        min-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .header-project-actions {
        flex-shrink: 0;
        gap: 0.35rem;
    }

    .header-project-action {
        padding: 0.4rem 0.55rem;
    }

    .dashboard-widget-grid {
        flex: 1;
        min-height: 0;
        padding-bottom: 1rem;
        overflow-y: auto;
        overscroll-behavior: contain;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.75rem;
        align-content: start;
    }

    .work-buckets-summary {
        min-height: 11rem;
        grid-row: auto;
    }

    .dashboard-home-body .work-buckets-column {
        grid-row: auto;
    }

    .dashboard-widget {
        min-width: 0;
        padding: 0.95rem;
        border-radius: 0.8rem;
    }

    body.dashboard-body dialog,
    .song-editor-dialog {
        width: calc(100% - 2rem);
        max-height: calc(100svh - 2rem);
    }

    .color-picker-popover {
        top: auto;
        right: 1rem;
        bottom: 1rem;
        left: 1rem;
        width: auto;
        max-height: calc(100svh - 2rem);
        margin: 0;
        overflow-y: auto;
        transform: none;
    }

    .color-picker-map {
        min-height: 15rem;
    }

    .color-picker-map-cursor {
        width: 1.5rem;
        height: 1.5rem;
        border-width: 0.15rem;
    }

    .color-picker-hue-control input[type="range"] {
        height: 2rem;
    }

    .dashboard-home-body .dashboard-widget-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        grid-auto-rows: max-content;
        align-content: start;
        overflow-y: auto;
    }

    .dashboard-home-body .dashboard-widget,
    .dashboard-home-body .work-buckets-summary {
        height: auto;
        min-height: 0;
    }

    .dashboard-home-body #work-bucket-list {
        display: grid;
        width: 100%;
        min-height: 0;
        padding: 0.1rem;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
        grid-auto-rows: minmax(6rem, auto);
        gap: 0.55rem;
        overflow: visible;
    }

    .dashboard-home-body .work-bucket-card {
        width: 100%;
        min-width: 0;
        height: 100%;
        min-height: 6rem;
        aspect-ratio: auto;
    }

    .dashboard-home-body #work-bucket-list > .work-bucket-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}


.form-field select,
.project-switcher select,
#import-collaboration-songs-form select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.4rem;
    background-color: var(--surface);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23555555' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 0.8rem;
    line-height: 1.2;
    cursor: pointer;
}

.form-field select option,
.project-switcher select option,
#import-collaboration-songs-form select option {
    color: var(--text-primary);
    background: var(--surface);
}

.form-field select:disabled,
.project-switcher select:disabled,
#import-collaboration-songs-form select:disabled {
    color: var(--text-disabled);
    cursor: not-allowed;
    opacity: 0.65;
}

@media (max-width: 40rem) {
    .welcome-page {
        display: block;
        min-height: 100svh;
        padding: 0;
    }

    .welcome-panel {
        width: 100%;
        min-height: 100svh;
        padding: 2rem 1.25rem;
        background: transparent;
        border: 0;
        border-radius: 0;
    }

    .welcome-panel>h1 {
        justify-content: flex-end;
        margin-bottom: 4rem;
    }

    .auth-form-panel form:not([hidden]) {
        gap: 1.25rem;
    }

    .auth-form-panel .form-field input {
        min-height: 3.75rem;
        border-radius: var(--radius-lg);
    }

    .auth-form-panel button[type="submit"] {
        height: 3.6rem;
        color: var(--text-primary);
        background: var(--surface);
        border-radius: var(--radius-pill);
    }

    .back-button {
        width: 2.75rem;
        height: 2.75rem;
        margin-bottom: 1.25rem;
    }

    .project-setup-panel {
        padding: 1.25rem;
    }

    .project-setup-panel>h1 {
        top: 1.25rem;
        left: 1.25rem;
    }

    #project-setup-logout-button {
        top: 1.25rem;
        right: 1.25rem;
    }

    .project-setup-panel>form {
        width: 100%;
        padding: 1.25rem;
    }


    .song-library-workspace {
        margin: 0 -0.85rem;
    }

    .song-library-toolbar {
        gap: 0;
        margin: 0;
    }

    .setlist-tabs {
        grid-template-columns: auto auto minmax(0, 1fr) auto;
        gap: 0.4rem;
        padding: 0.55rem;
    }

    .setlist-tabs button {
        min-height: 2.25rem;
        padding: 0.4rem 0.6rem;
    }

    .library-controls {
        padding: 0.6rem;
    }

    #song-filter-form {
        flex-wrap: nowrap;
        align-items: end;
        padding-bottom: 0.25rem;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .search-filter {
        flex: 0 0 13rem;
    }

    .sort-filter {
        flex: 0 0 11rem;
    }

    .genre-filter {
        flex: 0 0 8rem;
    }

    .key-filter {
        flex: 0 0 12.5rem;
    }

    .tempo-filter {
        flex: 0 0 15.65rem;
    }

    #clear-song-filters {
        flex: 0 0 auto;
    }

    .song-results {
        gap: 0.65rem;
        padding: 0.75rem;
    }

    .song-list {
        width: 100%;
    }

    .song-card-main {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.1rem 0.4rem;
    }

    .song-card-artist { grid-column: 1; grid-row: 2; }
    .song-card-main-actions { grid-column: 2; grid-row: 1 / span 2; }
    .song-card-main-actions button { font-size: var(--text-meta); }
    .song-card-details { align-items: flex-start; flex-direction: column; }

}

.library-controls .song-selection-actions {
    display: flex;
    width: 100%;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.5rem 0.6rem;
    background: var(--surface-soft);
    border: 1px solid var(--border-subtle);
}
.library-controls #selected-song-summary { margin-right: 0.35rem; white-space: nowrap; }

@media (max-width: 48rem) {
    .setlist-tabs {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .setlist-tab-list {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    #open-create-setlist-button {
        grid-column: 3;
        grid-row: 1;
    }
}

body > .shared-player.is-library-player {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 250;
    width: min(26rem, calc(100vw - 2rem));
    margin: 0;
    padding: 0.9rem;
    gap: 0.45rem;
    background: var(--surface);
    border-color: var(--neutral-highlight);
}
.is-library-player .shared-player-minimize { display: inline-flex; }

body > .shared-player.is-library-player.is-minimized {
    display: flex;
    width: min(23rem, calc(100vw - 2rem));
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.65rem;
}
.is-library-player.is-minimized :is(
    .shared-player-head span, .shared-player-stop, .shared-player-artist,
    .shared-player-bars,
    .shared-player-progress, .shared-player-footer
) { display: none; }
.is-library-player.is-minimized .shared-player-title {
    order: 1;
    min-width: 0;
    flex: 1;
}
.is-library-player.is-minimized .shared-player-controls { order: 2; flex: none; }
.is-library-player.is-minimized .shared-player-head { order: 3; flex: none; }

.shared-player-volume-label { display: none; }
.shared-player-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.is-library-player .shared-player-volume-label,
.is-session-player .shared-player-volume-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
}
.shared-player-volume { width: 5.5rem; accent-color: var(--text-primary); cursor: pointer; }

.production-open-lane-link {
    color: inherit;
    text-decoration: none;
}
.production-open-lane-link:is(:hover, :focus-visible) { color: var(--text-primary); text-decoration: underline; outline: none; }
.production-lane-workspace {
    display: flex;
    min-height: 14rem;
    flex: 1.2 1 0;
    flex-direction: column;
    gap: 0.6rem;
}
.kboard-workspace-body {
    display: grid;
    min-height: 0;
    flex: 1;
    grid-template-columns: minmax(12rem, 1fr) minmax(0, 3fr);
    gap: 0.6rem;
}
.kboard-workspace-body.is-focus-minimized { grid-template-columns: minmax(0, 1fr); }
.production-focus-column {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 0;
    padding: 0.75rem;
    flex-direction: column;
    gap: 0.6rem;
    background: var(--surface);
    border: 1px solid var(--bucket-color, var(--border-subtle));
    border-radius: var(--radius-md);
}
.production-backlog-drop-hint {
    position: absolute;
    z-index: 2;
    top: 3rem;
    right: 0.7rem;
    left: 0.7rem;
    padding: 0.45rem 0.55rem;
    color: var(--text-primary);
    font-size: var(--text-meta);
    background: var(--surface);
    border: 1px dashed var(--accent-border);
    border-radius: var(--radius-sm);
    text-align: center;
    pointer-events: none;
}
.production-focus-column.is-backlog-drop-target { outline: 2px dashed var(--accent-border); outline-offset: -4px; }
.production-focus-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.6rem 0.7rem;
    background: var(--surface);
    border: 1px solid var(--border-faint);
    border-radius: var(--radius-md);
}
.production-focus-heading .production-kicker {
    color: var(--text-primary);
    font-size: var(--text-h1);
    font-weight: var(--weight-bold);
    letter-spacing: normal;
    text-transform: none;
}
.production-focus-heading-actions { display: flex; align-items: center; gap: 0.6rem; min-width: 0; max-width: 100%; }
.production-focus-heading h1 { margin: 0; min-width: 0; color: var(--bucket-color, var(--text-primary)); overflow-wrap: anywhere; }
.production-focus-heading-actions .production-view-button { flex: none; }
.production-focus-column h2 { margin: 0; }
.production-focus-column > p:not(.production-lane-empty) { margin: 0; color: var(--text-muted); }
.production-focus-switch { display: flex; align-items: center; gap: 0.45rem; }
.production-focus-switch span { color: var(--text-muted); }
.production-focus-minimize { margin-left: auto; padding: 0; color: var(--text-muted); background: transparent; border: 0; cursor: pointer; font-size: var(--text-meta); }
.production-focus-tab { padding: 0; color: var(--text-muted); background: transparent; border: 0; cursor: pointer; }
.production-focus-tab:is(:hover, :focus-visible),
.production-focus-tab[aria-pressed="true"] { color: var(--accent-border); text-decoration: underline; text-underline-offset: 0.2rem; outline: none; }
.production-focus-view { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.production-focus-view .production-focus-song-list { flex: 1; }
.production-focus-add-task { align-self: flex-start; min-height: 2rem; margin-bottom: 0.6rem; padding: 0.3rem 0.55rem; border-radius: var(--radius-sm); cursor: pointer; }
.production-focus-task { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.55rem; text-align: left; border-radius: var(--radius-sm); cursor: pointer; }
.production-focus-task strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.production-focus-task small { flex: none; color: var(--text-muted); }
.production-focus-song-list {
    display: grid;
    min-height: 0;
    align-content: start;
    gap: 0.65rem;
    overflow-y: auto;
    scrollbar-color: var(--neutral-highlight) transparent;
    scrollbar-width: thin;
}
#production-focus-lane-list {
    grid-template-columns: minmax(0, 1fr);
}
.kboard-panel {
    display: flex;
    min-width: 0;
    min-height: 0;
    padding: 0.75rem;
    flex-direction: column;
    gap: 0.8rem;
    background: var(--surface);
    border: 1px solid var(--border-faint);
    border-radius: var(--radius-md);
}
.kboard-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.kboard-panel-heading p { margin: 0; color: var(--text-muted); }
.kboard-panel-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.kboard-panel-actions button { min-height: 2rem; padding: 0.3rem 0.55rem; border-radius: var(--radius-sm); cursor: pointer; }
.kboard-stage-list {
    display: grid;
    min-height: 0;
    flex: 1;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
}
.kboard-stage {
    display: flex;
    min-width: 0;
    min-height: 0;
    padding: 0 0.65rem;
    flex-direction: column;
    gap: 0.7rem;
}
.kboard-stage + .kboard-stage { border-left: 1px dashed var(--border-subtle); }
.kboard-stage-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.25rem 0 0.45rem;
    border-bottom: 2px solid var(--stage-color, var(--border-strong));
}
.kboard-stage-heading h3 { min-width: 0; margin: 0; flex: 1 1 6rem; overflow-wrap: anywhere; cursor: text; }
.kboard-stage-name-input { min-width: 0; flex: 1; padding: 0.2rem 0.35rem; }
.kboard-stage-color { width: 1.7rem; height: 1.7rem; flex: none; }
.kboard-stage-control {
    width: 1.5rem;
    height: 1.5rem;
    flex: none;
    padding: 0;
    color: var(--text-secondary);
    background: transparent;
    border: 0;
    cursor: pointer;
}
.kboard-stage-control:is(:hover, :focus-visible) { color: var(--accent-border); outline: none; }
.kboard-stage-remove:is(:hover, :focus-visible) { background: transparent; border: 0; }
.kboard-stage p { margin: 0; color: var(--text-muted); }
.kboard-card-list {
    display: grid;
    min-height: 0;
    align-content: start;
    gap: 0.55rem;
    overflow-y: auto;
}
.kboard-stage-empty { padding: 0.4rem 0; }
.kboard-card {
    min-width: 0;
    padding: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--member-card-color, var(--border-subtle));
    border-radius: var(--radius-sm);
    box-shadow: var(--song-card-shadow);
    cursor: grab;
    touch-action: none;
    user-select: none;
}
.kboard-card-note { background: var(--surface-soft); }
.kboard-card:focus-visible { outline: 2px solid var(--member-card-color, var(--border-subtle)); outline-offset: 1px; }
.kboard-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.3rem;
    color: var(--text-muted);
}
.kboard-card-meta span { color: var(--text-muted); font-size: var(--text-meta); }
.kboard-card-kind { flex: none; margin-left: auto; }
.kboard-card h4 { margin: 0.2rem 0 0; overflow-wrap: anywhere; }
.kboard-card-song h4 { margin-top: 0.1rem; }
.kboard-card-artist,
.kboard-card-body { margin-top: 0.25rem !important; overflow-wrap: anywhere; }
.kboard-card-body { white-space: pre-wrap; }
.kboard-card-remove { width: 1.5rem; height: 1.5rem; flex: none; font-size: 1.1rem; }
.kboard-card-remove:hover { color: var(--accent-border); background: transparent; border-color: transparent; }
.kboard-card.is-dragging { opacity: 0.35; }
.kboard-card-drag-ghost {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
    cursor: grabbing;
    box-shadow: 0 0.6rem 1.4rem rgb(0 0 0 / 0.18);
}
.kboard-stage.is-drop-target { background: var(--surface-soft); }

.production-song-identity { min-width: 0; }
.production-song-title,
.production-song-artist { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.production-song-heading-actions { display: flex; align-items: center; gap: 0.3rem; }
.production-play-song-button {
    min-height: 2rem;
    flex: none;
    padding: 0.35rem 0.55rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

@media (max-width: 48rem) {
    .library-controls .song-selection-actions {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    .library-controls .song-selection-actions button { flex: 0 0 auto; }
    .production-lane-workspace { min-height: 0; }
    .kboard-workspace-body { grid-template-columns: minmax(0, 1fr); }
    .production-focus-song-list { max-height: 16rem; }
    .kboard-stage-list { min-height: 20rem; grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); }
    .kboard-stage { min-height: 8rem; padding: 0.65rem 0; }
    .kboard-stage + .kboard-stage { border-left: 0; border-top: 1px dashed var(--border-subtle); }
}

body button:not(:disabled):not(#all-songs-button):not(#song-collection-toggle):not(.setlist-tab-button):not(.desktop-sidebar-toggle-button):not(.mobile-sidebar-toggle-button):not(.sidebar-theme-switch):not(.add-track-button):not(.kboard-card-remove):not(.production-focus-tab):not(.current-project-button):not(.project-invitations-nav-button):is(:hover, :focus-visible),
body a:not(.navbar a):not(.dashboard-kboard-card):is(:hover, :focus-visible) {
    color: var(--accent-border) !important;
    border-color: var(--accent-border) !important;
}

.navbar .project-invitations-nav-button {
    display: block;
    width: 100%;
    padding: 0.7rem 0.8rem;
    color: var(--text-muted);
    background: transparent;
    border: 0;
    border-radius: 0.45rem;
    font-weight: var(--weight-medium);
    text-align: left;
    cursor: pointer;
}

.navbar .project-invitations-nav-button:is(:hover, :focus-visible),
.navbar .project-invitations-nav-button.has-invitations {
    color: var(--text-primary);
    background: var(--surface-soft);
    outline: none;
}

body.dashboard-body .project-invitations-dialog {
    width: min(28rem, calc(100% - 2rem));
    padding: 1.25rem;
}

.project-invitations-list {
    display: grid;
    gap: 0.65rem;
    max-height: 55vh;
    overflow-y: auto;
}

.project-invitation-item {
    display: grid;
    gap: 0.25rem;
    padding: 0.8rem;
    background: var(--surface-soft);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

.project-invitation-item span,
.project-invitations-status {
    color: var(--text-muted);
}

.project-invitation-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.project-invitation-actions button {
    padding: 0.4rem 0.7rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.setup-project-invitations {
    width: min(100%, 25rem);
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.setup-project-invitations h2 {
    margin-bottom: 0.75rem;
}
