* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f0f0f0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

button:not(:disabled) {
    transition: transform 0.08s ease, box-shadow 0.12s ease;
}

button:not(.password-toggle):not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
}

button:not(.password-toggle):not(:disabled):active {
    transform: translateY(0) scale(0.97);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.18);
}

.password-toggle:not(:disabled):active {
    transform: translateY(-50%) scale(0.92);
}

@media (prefers-reduced-motion: reduce) {
    button:not(:disabled) {
        transition: none;
    }

    button:not(.password-toggle):not(:disabled):hover,
    button:not(.password-toggle):not(:disabled):active {
        transform: none;
        box-shadow: none;
    }

    .password-toggle:not(:disabled):active {
        transform: translateY(-50%);
    }
}

.hidden {
    display: none !important;
}

#app-shell {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Login */
#login-screen {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #e8e8e8;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 28px 32px 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.login-title {
    margin: 0 0 24px;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    color: #222;
}

.login-label {
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
}

.login-password-wrap {
    position: relative;
}

.login-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #aaa;
    border-radius: 4px;
}

.login-input-password {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #111;
    background: rgba(0, 0, 0, 0.06);
}

.password-toggle:focus {
    outline: 2px solid #333;
    outline-offset: 1px;
}

.password-toggle-icon {
    display: block;
    flex-shrink: 0;
}

.login-remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    user-select: none;
}

.login-remember-label input {
    width: 1.05rem;
    height: 1.05rem;
    flex-shrink: 0;
    accent-color: #2563eb;
}

.login-submit {
    margin-top: 18px;
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    background: #333;
    color: #fff;
    cursor: pointer;
}

.login-submit:hover {
    background: #222;
}

.login-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-about-wrap {
    margin: 20px 0 0;
    text-align: center;
}

.login-about-btn,
.about-btn {
    padding: 6px 12px;
    font-size: 14px;
    color: #555;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.login-about-btn:hover,
.about-btn:hover {
    color: #111;
    background: rgba(0, 0, 0, 0.06);
}

/* App shell */
.app-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    background-color: #333;
    color: white;
    padding: 16px 20px;
    flex-shrink: 0;
}

.title {
    grid-column: 2;
    justify-self: center;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
}

.header-actions-left {
    grid-column: 1;
    justify-self: start;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.header-actions-right {
    grid-column: 3;
    justify-self: end;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.about-btn {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
}

.about-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.logout-btn,
.header-action-btn {
    padding: 8px 16px;
    font-size: 14px;
    color: #333;
    background: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.logout-btn:hover,
.header-action-btn:hover {
    background: #eee;
}

.mix-action-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(90vw, 420px);
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    z-index: 1021;
    padding: 28px 20px 20px;
}

.mix-action-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
}

.mix-action-close:hover {
    background: rgba(0, 0, 0, 0.08);
}

.mix-action-title {
    margin: 0 36px 12px 0;
    font-size: 18px;
}

.mix-action-message {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
    color: #222;
}

.about-details {
    margin: 0;
}

.about-details-row {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 8px 12px;
    margin-bottom: 10px;
    font-size: 15px;
    line-height: 1.45;
}

.about-details-row:last-child {
    margin-bottom: 0;
}

.about-details dt {
    margin: 0;
    font-weight: 600;
    color: #444;
}

.about-details dd {
    margin: 0;
    color: #222;
    word-break: break-word;
}

.featured-mixes-overlay {
    z-index: 1034;
}

.featured-mixes-dialog {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: min(57vw, 432px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    z-index: 1035;
    padding: 14px 20px 20px;
    max-height: none;
    overflow: hidden;
    text-align: center;
}

.featured-mixes-dialog.featured-mixes-dialog--modal-blocked {
    pointer-events: none;
    filter: brightness(0.9) saturate(0.85);
    opacity: 0.88;
}

.featured-mixes-dialog-header {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    align-items: center;
    width: 100%;
    flex-shrink: 0;
    margin-bottom: 6px;
}

.featured-mixes-header-spacer {
    width: 36px;
    pointer-events: none;
    visibility: hidden;
}

.featured-mixes-dialog-heading {
    margin: 0;
    padding: 0;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    justify-self: center;
}

.featured-mixes-dialog-header .featured-mixes-dialog-close {
    position: relative;
    top: auto;
    right: auto;
    justify-self: end;
}

.featured-mixes-saving-overlay {
    z-index: 1038;
    pointer-events: auto;
    background: rgba(90, 94, 102, 0.38);
}

.featured-mixes-saving-dialog {
    z-index: 1039;
    width: min(90vw, 400px);
    padding-top: 32px;
    padding-bottom: 28px;
}

.featured-mixes-saving-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
}

.featured-mixes-saving-spinner {
    width: 2.5rem !important;
    height: 2.5rem !important;
    border-width: 3px !important;
}

.featured-mixes-saving-message {
    word-break: break-word;
}

#featuredMixesBody {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 4px;
    width: 100%;
}

.featured-mixes-loading {
    margin: 0;
    padding: 12px 0;
    color: #444;
    text-align: center;
}

.featured-mixes-audit-fail {
    overflow: auto;
    flex: 1;
    min-height: 0;
    text-align: center;
    width: 100%;
}

.featured-mixes-audit-intro {
    margin: 0 0 10px;
    font-size: 15px;
    color: #333;
    text-align: center;
}

.featured-mixes-audit-list {
    margin: 0 auto;
    padding-left: 1.25rem;
    font-size: 14px;
    line-height: 1.45;
    color: #222;
    text-align: left;
    display: inline-block;
    max-width: 100%;
    box-sizing: border-box;
}

.featured-mixes-audit-list li {
    margin-bottom: 6px;
}

.featured-mixes-editor {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 0;
    flex: 1;
    width: 100%;
}

.featured-mixes-hint {
    margin: 0 0 10px;
    font-size: 14px;
    color: #555;
    text-align: center;
}

.featured-mixes-sortable-list {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    overflow: auto;
    flex: 1;
    min-height: 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    background: #fafafa;
    width: 100%;
    max-width: 236px;
    align-self: center;
    box-sizing: border-box;
}

.featured-mixes-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 10px;
    padding: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: grab;
    touch-action: none;
    user-select: none;
    max-width: 100%;
    transition:
        box-shadow 0.15s ease,
        border-color 0.15s ease,
        background-color 0.15s ease;
}

.featured-mixes-item:last-child {
    margin-bottom: 0;
}

.featured-mixes-item:active {
    cursor: grabbing;
}

.featured-mixes-item.featured-mixes-chosen {
    cursor: grabbing;
    border-color: #2563eb;
    background: #f0f7ff;
    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.45),
        0 10px 28px rgba(0, 0, 0, 0.16);
    z-index: 2;
    position: relative;
}

.featured-mixes-item.featured-mixes-drag,
.featured-mixes-drag {
    opacity: 0.98;
    box-shadow:
        0 0 0 2px rgba(37, 99, 235, 0.6),
        0 14px 40px rgba(0, 0, 0, 0.22);
}

.featured-mixes-thumb {
    display: block;
    width: 200px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    background: #eee;
    pointer-events: none;
}

.sortable-ghost.featured-mixes-item,
.featured-mixes-ghost {
    opacity: 0.55;
}

.featured-mixes-save-wrap {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    width: 100%;
}

.featured-mixes-saved-overlay {
    z-index: 1036;
    pointer-events: auto;
    background: rgba(90, 94, 102, 0.38);
}

.featured-mixes-saved-dialog {
    z-index: 1037;
    width: min(90vw, 400px);
    padding-top: 32px;
    padding-bottom: 28px;
    text-align: center;
}

.featured-mixes-saved-dialog .mix-action-title {
    margin: 0;
    padding: 0 36px;
}

.mix-audit-shell {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 180px);
    --mix-audit-accent: #2563eb;
}

.mix-audit-main-column.mix-audit-page {
    position: relative;
    max-width: 640px;
}

#mix-audit-busy-overlay-chrome {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1018;
    background: rgba(150, 154, 162, 0.09);
    pointer-events: auto;
}

#mix-audit-busy-overlay-chrome:not(.hidden) {
    display: block;
}

.mix-audit-row {
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.mix-audit-row-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

.mix-audit-status-row {
    display: grid;
    grid-template-columns: 1.15rem minmax(0, 1fr);
    column-gap: 0.5rem;
    align-items: start;
    margin: 0.5rem 0 0 0;
}

.mix-audit-status-spinner-cell {
    grid-column: 1;
    width: 1.15rem;
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0.15rem;
}

.mix-audit-status {
    grid-column: 2;
    margin: 0;
    min-width: 0;
    font-size: 14px;
    color: #333;
}

.mix-record-live-status-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0.25rem 0 0;
    margin-left: -1.65rem;
    width: calc(100% + 1.65rem);
    box-sizing: border-box;
}

.mix-record-live-status-row .mix-audit-status-spinner-cell {
    flex: 0 0 1.15rem;
    width: 1.15rem;
    min-width: 1.15rem;
    justify-self: unset;
    grid-column: unset;
}

.mix-record-live-status-row .mix-record-live-wrap {
    flex: 1;
    min-width: 0;
    margin: 0;
}

.mix-audit-spinner.mix-modal-loading-spinner {
    width: 14px;
    height: 14px;
    border-width: 2px;
    opacity: 0;
    visibility: hidden;
    animation: none;
}

.mix-audit-spinner.mix-audit-spinner--running {
    opacity: 1;
    visibility: visible;
    animation: mix-modal-spin 0.65s linear infinite;
    border-color: #dbeafe;
    border-top-color: var(--mix-audit-accent);
}

.mix-audit-row-top .mix-audit-label {
    flex: 1;
    min-width: min(100%, 200px);
}

.mix-audit-label--with-bpm {
    flex-wrap: wrap;
}

.mix-audit-label--with-bpm > .mix-audit-cb {
    margin-top: 0;
    margin-right: 0.5rem;
}

.mix-audit-label--with-bpm .mix-audit-bpm-switch-row {
    flex-shrink: 0;
    margin-left: 34px;
}

.mix-audit-bpm-switch-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.mix-audit-bpm-label-text {
    white-space: nowrap;
    font-size: 15px;
    line-height: 1.4;
    color: #222;
}

.mix-audit-bpm-switch-wrap {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.mix-audit-bpm-checkbox {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.mix-audit-bpm-switch-ui {
    width: 30px;
    height: 18px;
    border-radius: 9px;
    background: #ccc;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}

.mix-audit-bpm-switch-ui::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
    transition: transform 0.2s;
}

.mix-audit-bpm-checkbox:checked + .mix-audit-bpm-switch-ui {
    background: #333;
}

.mix-audit-bpm-checkbox:checked + .mix-audit-bpm-switch-ui::after {
    transform: translateX(12px);
}

.mix-audit-bpm-checkbox:focus + .mix-audit-bpm-switch-ui {
    outline: 2px solid #333;
    outline-offset: 2px;
}

.mix-audit-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 15px;
    line-height: 1.4;
    color: #222;
}

.mix-audit-label.mix-audit-label--with-bpm {
    align-items: center;
    gap: 0;
}

.mix-audit-cb {
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
    accent-color: var(--mix-audit-accent);
}

.mix-audit-errors {
    margin: 0.5rem 0 0 1.65rem;
    font-size: 14px;
    color: #a30;
}

.mix-record-empty-msg {
    margin: 0.25rem 0 0;
    font-size: 14px;
    color: #555;
}

.mix-record-live-wrap {
    margin: 0.25rem 0 0;
    font-size: 14px;
    color: #222;
}

.mix-record-title-live {
    font-weight: 500;
}

.mix-record-err-block {
    margin: 0.25rem 0 0;
}

.mix-record-title-err-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.4;
}

.mix-record-title-col {
    flex: 0 1 42%;
    min-width: 0;
    word-break: break-word;
    font-weight: 500;
    color: #222;
}

.mix-record-err-col {
    flex: 1;
    min-width: 0;
}

.mix-record-err-msg {
    margin: 0 0 6px;
    font-size: 14px;
    color: #a30;
}

.mix-record-err-msg:last-child {
    margin-bottom: 0;
}

.mix-record-gap {
    height: 14px;
    flex-shrink: 0;
}

.chime-audit-edit-btn,
.dj-audit-edit-btn,
.mix-audit-edit-btn {
    flex: 0 0 auto;
    padding: 6px;
    border: none;
    margin: -2px 0 0;
    background: transparent;
    cursor: pointer;
    color: #1565c0;
    border-radius: 4px;
    line-height: 0;
    align-self: flex-start;
}

.chime-audit-edit-btn:hover:not(:disabled),
.dj-audit-edit-btn:hover:not(:disabled),
.mix-audit-edit-btn:hover:not(:disabled) {
    background: rgba(21, 101, 192, 0.09);
}

.chime-audit-edit-btn:disabled,
.dj-audit-edit-btn:disabled,
.mix-audit-edit-btn:disabled {
    cursor: default;
    opacity: 0.45;
}

.chime-audit-title-err-row .mix-record-title-col,
.dj-audit-title-err-row .mix-record-title-col,
.mix-audit-title-err-row .mix-record-title-col {
    flex: 0 1 36%;
}

.dj-audit-file-action-cell {
    flex: 0 0 auto;
    min-width: 36px;
    align-self: flex-start;
}

.dj-audit-file-err-block .genre-mix-remove {
    margin: -2px 0 0;
}

.genre-audit-edit-btn {
    flex: 0 0 auto;
    padding: 6px;
    border: none;
    margin: -2px 0 0;
    background: transparent;
    cursor: pointer;
    color: #1565c0;
    border-radius: 4px;
    line-height: 0;
    align-self: flex-start;
}

.genre-audit-edit-btn:hover:not(:disabled) {
    background: rgba(21, 101, 192, 0.09);
}

.genre-audit-edit-btn:disabled {
    cursor: default;
    opacity: 0.45;
}

.genre-audit-title-err-row .mix-record-title-col {
    flex: 0 1 36%;
}

.genre-audit-file-action-cell {
    flex: 0 0 auto;
    min-width: 36px;
    align-self: flex-start;
}

.genre-audit-file-err-block .genre-mix-remove {
    margin: -2px 0 0;
}

.mix-audit-file-action-cell {
    flex: 0 0 auto;
    min-width: 36px;
    align-self: flex-start;
}

.mix-audit-file-err-block .genre-mix-remove {
    margin: -2px 0 0;
}

.mix-audit-end-msg {
    margin-top: 1.25rem;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.mix-audit-run-wrap {
    position: relative;
    max-width: 640px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 1.75rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
    scroll-margin-bottom: 20px;
}

#mixAuditAbortBtn.mix-modal-btn-secondary {
    background-color: #fff;
    background-image: none;
    border: 3px solid #c62828;
    color: #333;
    padding: 9px 16px;
    font-size: 16px;
    line-height: 1.3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#mixAuditAbortBtn.mix-modal-btn-secondary:hover {
    background-color: #fff;
    background-image: none;
    border-color: #b71c1c;
}

.mix-action-message:empty {
    display: none;
}

.mixes-tab h2 {
    margin: 0 0 12px;
}

.mixes-scroll {
    max-height: calc(100vh - 200px);
    overflow: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.mixes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.mixes-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f5f5f5;
    text-align: left;
    padding: 10px 8px;
    border-bottom: 2px solid #999;
    box-shadow: 0 1px 0 #ddd;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.mixes-table th:hover {
    background: #ebebeb;
}

.mixes-table td {
    padding: 10px 8px;
    vertical-align: top;
    border-bottom: 1px solid #ccc;
}

.mix-row {
    cursor: pointer;
}

.mix-row:hover {
    background: #fafafa;
}

.mix-row:focus {
    outline: 2px solid #333;
    outline-offset: -2px;
}

.tabs-container {
    display: flex;
    background-color: #ddd;
    padding: 10px 0 0 20px;
    gap: 2px;
    flex-shrink: 0;
}

.tab {
    width: 10%;
    padding: 12px 0;
    text-align: center;
    background-color: #ccc;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.tab.active {
    background-color: white;
}

.content {
    flex: 1;
    min-height: 0;
    background-color: white;
    padding: 20px;
    overflow-y: auto;
}

.content-loading {
    margin: 0;
    color: #555;
}

.home-media-section {
    margin: 16px 0 24px;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
}

.home-media-heading {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.home-media-wrap {
    max-width: 100%;
}

.home-media-img {
    display: block;
    max-width: min(100%, 560px);
    height: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
}

.home-media-caption {
    margin: 10px 0 0;
    font-size: 14px;
    color: #444;
}

.home-media-empty {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.tab-placeholder {
    margin: 12px 0 0;
    color: #555;
}

.home-media-url-note {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.45;
    color: #444;
}

.home-media-urls {
    margin: 14px 0 0;
    font-size: 13px;
    color: #333;
}

.home-media-urls dt {
    margin-top: 10px;
    font-weight: bold;
}

.home-media-urls dt:first-child {
    margin-top: 0;
}

.home-media-urls dd {
    margin: 4px 0 0;
}

.home-media-url-code {
    display: block;
    word-break: break-all;
    white-space: pre-wrap;
    font-size: 12px;
    line-height: 1.4;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Error dialog — high enough to sit above mix modal (see #error-overlay) */
.dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1001;
}

#error-overlay {
    z-index: 1060;
}

/* Above mix modal (1006/1007) so result toasts (no changes, success, etc.) show on top */
#mix-action-overlay,
#about-overlay {
    z-index: 1020;
}

/* Delete Mix confirm — above mix modal */
#delete-mix-confirm-overlay {
    z-index: 1032;
}

#delete-mix-confirm-dialog {
    z-index: 1033;
}

.delete-mix-confirm-actions {
    margin-top: 1.25rem;
    display: flex;
    justify-content: center;
}

.webp-convert-offer-actions {
    flex-wrap: wrap;
    gap: 0.75rem;
}

.delete-processing-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1045;
    background: rgba(0, 0, 0, 0.65);
}

.delete-processing-overlay:not(.hidden) {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.delete-processing-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.delete-processing-text {
    margin: 0;
    font-size: 1.15rem;
    color: #fff;
    text-align: center;
}

.delete-processing-overlay .mix-modal-loading-spinner {
    border-color: rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
}

/* Mix add/edit modal (Phase 3B — UI only) */
.mix-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1006;
}

.mix-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75vw;
    max-width: none;
    max-height: 90vh;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    z-index: 1007;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mix-modal-loading {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 8px;
}

.mix-modal-loading.hidden {
    display: none;
}

.mix-modal-loading-msg {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mix-modal-loading-spinner {
    display: inline-block;
    width: 1.1em;
    height: 1.1em;
    border: 2px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: mix-modal-spin 0.65s linear infinite;
    vertical-align: middle;
}

@keyframes mix-modal-spin {
    to {
        transform: rotate(360deg);
    }
}

.mix-modal-header {
    position: relative;
    z-index: 25;
    background: #fff;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #ddd;
    flex-shrink: 0;
}

.mix-modal-heading {
    margin: 0;
    font-size: 1.35rem;
    font-weight: bold;
    line-height: 1.3;
    padding-right: 8px;
}

.mix-modal-close {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
}

.mix-modal-close:hover {
    background: rgba(0, 0, 0, 0.08);
}

.mix-modal-close:focus:not(:focus-visible) {
    outline: none;
}

.mix-modal-close:focus-visible {
    outline: 2px solid #333;
    outline-offset: 2px;
}

.mix-modal-validation {
    margin: 0;
    padding: 10px 1.25rem;
    border-bottom: 1px solid #ddd;
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1.45;
    color: #7f1d1d;
    background: #fef2f2;
}

.mix-modal-validation-list {
    margin: 0;
    padding-left: 1.25rem;
}

.mix-modal-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 1.5rem 2rem;
    display: grid;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .mix-modal-body {
        grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
        align-items: start;
    }
}

.mix-modal-col-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mix-modal-col-right {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 200px;
}

.mix-modal-field {
    margin: 0;
}

.mix-modal-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.mix-modal-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid #aaa;
    border-radius: 4px;
}

.mix-modal-input-title {
    font-size: 1.125rem;
}

.mix-modal-file-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.mix-modal-file-row .mix-modal-input {
    flex: 1;
    min-width: 0;
}

.mix-modal-file-input {
    position: fixed;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.mix-modal-duration {
    margin: 8px 0 0;
    font-size: 14px;
    color: #444;
}

.mix-modal-image-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
}

.mix-modal-img-card {
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fafafa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.mix-modal-img-cover-wrap {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
}

.mix-modal-img-marquee-wrap {
    width: min(600px, 100%);
    aspect-ratio: 2 / 1;
    max-width: 100%;
    flex-shrink: 0;
}

.mix-modal-img-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mix-modal-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px dashed #ccc;
    background: #f5f5f5;
    color: #999;
}

.mix-modal-camera-icon {
    opacity: 0.7;
}

.mix-modal-img-ph-text {
    font-size: 13px;
}

.mix-modal-bpm-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: end;
}

.mix-modal-bpm-cell {
    min-width: 0;
}

.mix-modal-featured-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mix-modal-featured-wrap {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.mix-modal-featured-checkbox {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.mix-modal-featured-ui {
    width: 48px;
    height: 28px;
    border-radius: 14px;
    background: #ccc;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}

.mix-modal-featured-ui::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

.mix-modal-featured-checkbox:checked + .mix-modal-featured-ui {
    background: #333;
}

.mix-modal-featured-checkbox:checked + .mix-modal-featured-ui::after {
    transform: translateX(20px);
}

.mix-modal-featured-checkbox:focus + .mix-modal-featured-ui {
    outline: 2px solid #333;
    outline-offset: 2px;
}

.mix-modal-select {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid #aaa;
    border-radius: 4px;
    background: #fff;
}

.mix-modal-dj-select {
    cursor: pointer;
}

.mix-modal-btn-genres-prompt {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: bold;
    border: 2px solid #333;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
}

.mix-modal-btn-genres-prompt:hover {
    background: #f0f0f0;
}

.mix-modal-genre-expanded {
    margin-top: 10px;
}

.mix-modal-genre-chips {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.mix-modal-genre-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.mix-modal-genre-chip-remove {
    flex-shrink: 0;
    padding: 4px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #555;
    border-radius: 4px;
    line-height: 0;
}

.mix-modal-genre-chip-remove:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #c00;
}

.mix-modal-genre-add-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.mix-modal-genre-select {
    flex: 1;
    min-width: 160px;
}

.mix-modal-btn-secondary {
    padding: 8px 14px;
    font-size: 14px;
    border: 1px solid #666;
    border-radius: 4px;
    background: #fff;
    color: #333;
    cursor: pointer;
}

.mix-modal-btn-secondary:hover {
    background: #f5f5f5;
}

.mix-modal-btn-primary {
    padding: 10px 28px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    background: #333;
    color: #fff;
    cursor: pointer;
}

.mix-modal-btn-primary:hover {
    background: #222;
}

.mix-modal-btn-danger {
    padding: 10px 28px;
    font-size: 16px;
    border: 2px solid #c62828;
    border-radius: 4px;
    background: #fff;
    color: #c62828;
    cursor: pointer;
}

.mix-modal-btn-danger:hover {
    background: #ffebee;
}

.mix-modal-track-heading {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: bold;
}

.mix-modal-tracks-scroll {
    flex: 1;
    min-height: 0;
    max-height: 560px;
    overflow: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    padding: 8px;
}

.mix-modal-tracks-scroll.mix-modal-tracks-scroll-hidden {
    display: none;
}

.mix-modal-track-row {
    display: grid;
    grid-template-columns: 2.35rem minmax(0, 2.05fr) minmax(0, 1fr) minmax(5rem, 6rem) auto;
    gap: 6px 8px;
    align-items: center;
    padding: 8px 4px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.mix-modal-track-seq {
    justify-self: end;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    color: #555;
    line-height: 1.2;
}

.mix-modal-track-row:last-child {
    border-bottom: none;
}

.mix-modal-track-time {
    font-family: Consolas, "Courier New", monospace;
    text-align: right;
}

.mix-modal-track-remove {
    padding: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #555;
    border-radius: 4px;
    line-height: 0;
}

.mix-modal-track-remove:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #c00;
}

.mix-modal-track-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.mix-modal-csv-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.mix-modal-csv-label {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.mix-modal-csv-filename {
    font-size: 13px;
    color: #555;
    word-break: break-all;
}

.mix-modal-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    padding: 1rem 1.5rem;
    border-top: 1px solid #ddd;
    flex-shrink: 0;
    background: #fafafa;
}

.error-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(90vw, 560px);
    max-height: min(80vh, 480px);
    background: white;
    border: 2px solid #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1061;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.error-dialog-title {
    margin: 0 0 12px;
    font-size: 18px;
}

.error-message {
    margin: 0;
    flex: 1;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 13px;
    line-height: 1.45;
    background: #f7f7f7;
    border: 1px solid #ddd;
    padding: 12px;
    min-height: 80px;
}

.error-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
}

.error-retry,
.error-close {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #333;
    background: #fff;
}

.error-retry {
    background: #333;
    color: #fff;
    border-color: #333;
}

/* Confirmation dialog (exit) */
#overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
}

#confirmDialog {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    background: white;
    border: 2px solid #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 20px;
    text-align: center;
}

#confirmBtn {
    margin-top: 15px;
    padding: 10px 25px;
    background: #d9534f;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

#confirmBtn:focus {
    outline: 3px solid #ffeb3b;
}

/* Phase 5 — Genres tab */
.genres-tab {
    padding: 0 20px 24px;
    max-width: 960px;
}

.genres-tab > h2 {
    margin-top: 0;
}

.genres-tab-validation {
    background: #fff3f3;
    border: 1px solid #e0a0a0;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 1rem;
    font-size: 14px;
    color: #222;
}

.genres-tab-validation.hidden {
    display: none;
}

.genres-tab-validation ul {
    margin: 0;
    padding-left: 1.25rem;
}

.genre-row {
    border-bottom: 1px solid #ddd;
    padding: 12px 0;
}

.genre-row-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.genre-thumb-btn {
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    line-height: 0;
}

.genre-thumb-btn:focus-visible {
    outline: 2px solid #333;
    outline-offset: 2px;
}

.genre-thumb {
    width: 96px;
    height: 51px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ccc;
    display: block;
    background: #f5f5f5;
}

.genre-name-btn {
    flex: 1 1 140px;
    text-align: left;
    padding: 6px 8px;
    border: none;
    background: transparent;
    font: inherit;
    color: #1565c0;
    cursor: pointer;
    border-radius: 4px;
}

.genre-name-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

.genre-mix-count {
    min-width: 2rem;
    font-variant-numeric: tabular-nums;
    color: #444;
}

.genre-expand-btn {
    margin-left: auto;
    padding: 6px 10px;
    border: 1px solid #ccc;
    background: #fafafa;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.genre-expand-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.genre-expand-btn:disabled:hover {
    background: #fafafa;
}

.genre-expand-btn svg {
    transition: transform 0.2s ease;
}

.genre-expand-btn[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.genre-expanded-mixes {
    margin: 12px 0 0 1.5rem;
    padding-left: 12px;
    border-left: 2px solid #e0e0e0;
}

.genre-expanded-mixes.hidden {
    display: none;
}

.genre-expand-loading {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.genre-mix-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.genre-mix-line:last-child {
    border-bottom: none;
}

.genre-mix-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #f5f5f5;
}

.genre-mix-title {
    flex: 1;
    font-size: 14px;
}

.genre-mix-remove {
    padding: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #c62828;
    border-radius: 4px;
    line-height: 0;
}

.genre-mix-remove:hover {
    background: rgba(198, 40, 40, 0.08);
}

.genre-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 520px);
    max-height: 90vh;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    z-index: 1007;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.genre-modal-body {
    overflow-y: auto;
    flex: 1;
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
}

.genre-modal-body .mix-modal-field {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.genre-modal-field-name .mix-modal-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.genre-modal-field-name .mix-modal-input-title {
    font-size: 1.35rem;
    padding: 14px 16px;
    min-height: 3.25rem;
}

.genre-modal-image-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.genre-modal-img-card {
    width: 256px;
    height: 136px;
    flex-shrink: 0;
}

.genre-modal-img-placeholder {
    width: 100%;
    height: 100%;
}

.genre-modal-img-card .mix-modal-img-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f8f8f8;
}

.genre-modal-footer-edit {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* Chime add modal */
.chime-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 480px);
    max-height: 90vh;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    z-index: 1007;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chime-modal-body {
    overflow-y: auto;
    flex: 1;
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
}

.chime-modal-body .mix-modal-field {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.chime-modal-footer {
    justify-content: center;
}

.chime-modal-file-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.chime-modal-filename-input {
    width: 100%;
    max-width: 200px;
    box-sizing: border-box;
}

.chime-modal-browse-btn {
    align-self: flex-start;
}

/* Chimes tab */
.chimes-tab {
    padding: 0 20px 24px;
    max-width: 960px;
}

.chimes-tab > h2 {
    margin-top: 0;
}

.chimes-empty-msg {
    color: #555;
    margin: 0.5rem 0;
}

.chime-row {
    border-bottom: 1px solid #ddd;
    padding: 12px 0;
}

.chime-row-main {
    display: grid;
    grid-template-columns: 300px 30px 36px minmax(4.5rem, 6rem);
    align-items: center;
    column-gap: 0;
}

.chime-name {
    grid-column: 1;
    width: 300px;
    max-width: 300px;
    box-sizing: border-box;
    font-weight: 500;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.chime-delete-btn {
    grid-column: 3;
    justify-self: center;
    padding: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #c62828;
    border-radius: 4px;
    line-height: 0;
}

.chime-delete-btn:hover {
    background: rgba(198, 40, 40, 0.08);
}

.chime-user-count {
    grid-column: 4;
    padding-left: 12px;
    font-variant-numeric: tabular-nums;
    color: #444;
    white-space: nowrap;
}

/* Phase 6 — DJs tab */
.djs-tab {
    padding: 0 20px 24px;
    max-width: 960px;
}

.djs-tab > h2 {
    margin-top: 0;
}

.djs-tab-validation {
    background: #fff3f3;
    border: 1px solid #e0a0a0;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 1rem;
    font-size: 14px;
    color: #222;
}

.djs-tab-validation.hidden {
    display: none;
}

.djs-tab-validation ul {
    margin: 0;
    padding-left: 1.25rem;
}

.dj-row {
    border-bottom: 1px solid #ddd;
    padding: 12px 0;
}

.dj-row-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.dj-thumb-btn {
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    line-height: 0;
}

.dj-thumb-btn:focus-visible {
    outline: 2px solid #333;
    outline-offset: 2px;
}

.dj-thumb {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ccc;
    display: block;
    background: #f5f5f5;
}

.dj-name-btn {
    flex: 1 1 140px;
    text-align: left;
    padding: 6px 8px;
    border: none;
    background: transparent;
    font: inherit;
    color: #1565c0;
    cursor: pointer;
    border-radius: 4px;
}

.dj-name-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

.dj-mix-count {
    min-width: 2rem;
    font-variant-numeric: tabular-nums;
    color: #444;
}

.dj-expand-btn {
    margin-left: auto;
    padding: 6px 10px;
    border: 1px solid #ccc;
    background: #fafafa;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.dj-expand-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.dj-expand-btn:disabled:hover {
    background: #fafafa;
}

.dj-expand-btn svg {
    transition: transform 0.2s ease;
}

.dj-expand-btn[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.dj-expanded-mixes {
    margin: 12px 0 0 1.5rem;
    padding-left: 12px;
    border-left: 2px solid #e0e0e0;
}

.dj-expanded-mixes.hidden {
    display: none;
}

.dj-expand-loading {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.dj-mix-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.dj-mix-line:last-child {
    border-bottom: none;
}

.dj-mix-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #f5f5f5;
}

.dj-mix-title {
    flex: 1;
    font-size: 14px;
}

.dj-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: max-content;
    max-width: min(92vw, 680px);
    max-height: 90vh;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    z-index: 1007;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dj-modal-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 1.5rem 2rem;
    box-sizing: border-box;
}

.dj-modal-grid {
    --dj-modal-field-col: 300px;
    display: grid;
    grid-template-columns: var(--dj-modal-field-col) var(--dj-modal-field-col);
    column-gap: 20px;
    row-gap: 1.25rem;
    grid-template-rows: auto auto;
    width: max-content;
    max-width: 100%;
    box-sizing: border-box;
}

.dj-modal-cell-name {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}

.dj-modal-cell-bio {
    grid-column: 2;
    grid-row: 1 / -1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

.dj-modal-cell-image {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
}

.dj-modal-cell-bio .dj-modal-field-bio {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin: 0;
}

.dj-modal-field-name .mix-modal-input {
    width: 100%;
    max-width: var(--dj-modal-field-col);
    box-sizing: border-box;
}

.dj-modal-field-name .mix-modal-input-title {
    font-size: 1.35rem;
    padding: 14px 16px;
    min-height: 3.25rem;
}

.dj-modal-image-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.dj-modal-img-card {
    width: 300px;
    height: 300px;
    flex-shrink: 0;
}

.dj-modal-img-placeholder {
    width: 100%;
    height: 100%;
}

.dj-modal-img-card .mix-modal-img-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f8f8f8;
}

.dj-modal-bio-textarea {
    flex: 1;
    width: 100%;
    min-height: 0;
    resize: vertical;
    font-size: 15px;
    line-height: 1.45;
    font-family: inherit;
    box-sizing: border-box;
}

@media (max-width: 700px) {
    .dj-modal {
        max-width: 92vw;
    }

    .dj-modal-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        width: 100%;
    }

    .dj-modal-cell-name {
        grid-column: 1;
        grid-row: 1;
    }

    .dj-modal-cell-bio {
        grid-column: 1;
        grid-row: 2;
    }

    .dj-modal-cell-image {
        grid-column: 1;
        grid-row: 3;
    }

    .dj-modal-field-name .mix-modal-input {
        max-width: none;
    }

    .dj-modal-bio-textarea {
        min-height: 12rem;
    }
}

.dj-modal-footer-edit {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}
