.multimedia-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.multimedia-library-page {
    width: min(1500px, 100%);
    margin: 0 auto;
    padding: 20px 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #f5f7fa;
}

.multimedia-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: .75rem;
    align-items: end;
}

.media-admin-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
}

.media-admin-toolbar .media-count-dot {
    margin-right: 2px;
}

.media-admin-toolbar .media-search-right {
    flex: 1 1 auto;
    min-width: 220px;
    margin-left: auto;
}

.media-admin-toolbar .multimedia-channel-filter {
    flex: 0 1 230px;
    min-width: 190px;
}

.media-admin-toolbar .multimedia-channel-filter .form-field-control {
    min-height: 42px;
    background: #020617;
    border-color: #334155;
    color: #f8fafc;
}

.media-admin-toolbar .project-index-doc-icon-button,
.multimedia-actions .project-index-doc-icon-button {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 50%;
    background: var(--bg-card, #fff);
    color: var(--text-secondary, #64748b);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(15,23,42,.08);
}

.media-admin-toolbar .project-index-doc-icon-button:hover,
.media-admin-toolbar .project-index-doc-icon-button:focus-visible,
.multimedia-actions .project-index-doc-icon-button:hover,
.multimedia-actions .project-index-doc-icon-button:focus-visible {
    background: var(--primary-color, #01a982);
    color: #fff;
    outline: none;
    transform: translateY(-1px);
}

.media-search-inline {
    margin: 0;
}

.media-search-form {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border-soft, #e2e8f0);
    border-radius: 14px;
    background: var(--surface-primary, #fff);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}

.media-search-form .project-index-search-field {
    flex: 1 1 auto;
}

.media-search-form .media-search-right {
    flex: 1 1 420px;
    margin-left: auto;
}

.media-search-form .project-index-filter-field {
    flex: 0 0 180px;
}

.media-search-form .project-index-search-input {
    width: 100%;
    height: 42px;
    padding: 0 .8rem;
    border: 1px solid var(--border-soft, #e2e8f0);
    border-radius: 10px;
    background: var(--surface-primary, #fff);
}

.media-search-form .project-index-select {
    width: 100%;
    height: 42px;
    border: 1px solid var(--border-soft, #e2e8f0);
    border-radius: 10px;
}

.media-search-form .project-index-search-button {
    flex: 0 0 42px;
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    margin-left: 0;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 50%;
    background: var(--bg-card, #fff);
    color: var(--text-secondary, #64748b);
    box-shadow: 0 2px 8px rgba(15,23,42,.08);
}

.media-search-form .project-index-search-button:hover,
.media-search-form .project-index-search-button:focus-visible {
    background: var(--primary-color, #01a982);
    color: #fff;
    outline: none;
    transform: translateY(-1px);
}

.media-count-dot {
    width: 42px;
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    border-radius: 50%;
    background: var(--bg-secondary, #f8fafc);
    color: var(--text-secondary, #64748b);
    border: 1px solid var(--border-soft, #e2e8f0);
    font-size: .88rem;
    font-weight: 800;
    white-space: nowrap;
}

.media-channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
}

.media-channel-card {
    min-height: 170px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--border-soft, #e2e8f0);
    border-radius: 14px;
    background: var(--surface-primary, #fff);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.media-channel-card:hover,
.media-channel-card:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(13, 148, 136, .35);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .1);
    color: inherit;
    outline: none;
}

.media-channel-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(13, 148, 136, .1);
    color: var(--primary-color, #0d9488);
}

.media-channel-card h2 {
    margin: 0 0 6px;
    color: var(--text-main, #1f2937);
    font-size: 1.05rem;
    font-weight: 600;
}

.media-channel-card p {
    margin: 0;
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-secondary, #64748b);
    font-size: .9rem;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.media-channel-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: auto;
    color: var(--text-secondary, #64748b);
    font-size: .8rem;
    font-weight: 500;
}

.multimedia-library-shell {
    min-height: 280px;
}

.multimedia-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
    justify-content: flex-end;
}

.multimedia-table-wrap {
    overflow-x: auto;
}

.multimedia-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
}

.multimedia-table th,
.multimedia-table td {
    padding: .65rem .55rem;
    border-bottom: 1px solid var(--border-soft, #e2e8f0);
    vertical-align: middle;
}

.multimedia-table th {
    color: var(--text-secondary, #64748b);
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.multimedia-title {
    min-width: 180px;
    color: var(--text-main, #0f172a);
    font-weight: 700;
}

.multimedia-desc {
    max-width: 340px;
    color: var(--text-secondary, #64748b);
}

.multimedia-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: .18rem .45rem;
    border-radius: 999px;
    background: var(--bg-secondary, #f8fafc);
    color: var(--text-secondary, #64748b);
    font-size: .72rem;
    font-weight: 800;
}

.multimedia-badge.is-on {
    background: rgba(13, 148, 136, .12);
    color: #0f766e;
}

.multimedia-icon-button {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary, #64748b);
    text-decoration: none;
    cursor: pointer;
}

.multimedia-icon-button:hover,
.multimedia-icon-button:focus-visible {
    background: rgba(13, 148, 136, .09);
    color: #0d9488;
    outline: none;
}

.youtube-subscribe-action {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    border: 1px solid rgba(255, 77, 77, .48);
    border-radius: 8px;
    background: rgba(255, 0, 0, .08);
    color: inherit;
    font-size: .76rem;
    font-weight: 800;
    text-decoration: none;
}

.youtube-subscribe-action i {
    color: #ff4d4d;
}

.youtube-subscribe-action:hover,
.youtube-subscribe-action:focus-visible {
    border-color: #ff4d4d;
    background: rgba(255, 0, 0, .15);
    color: inherit;
    outline: none;
}

.multimedia-player {
    width: 100%;
    max-height: 58vh;
    border-radius: 10px;
    background: #000;
}

.multimedia-youtube-player {
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
}

.multimedia-audio {
    width: 100%;
}

.multimedia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
}

.multimedia-item-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow: hidden;
    border: 1px solid var(--border-soft, #e2e8f0);
    border-radius: 14px;
    background: var(--surface-primary, #fff);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.multimedia-item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .1);
}

.multimedia-thumb {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    width: 100%;
    overflow: hidden;
    background: #111827;
    color: rgba(255, 255, 255, .9);
    text-decoration: none;
}

.multimedia-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.multimedia-thumb.is-broken::before,
.media-placeholder {
    content: "\f03d";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    color: #64748b;
    font-size: 2rem;
}

.media-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 1;
    padding: 3px 7px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .72);
    color: #fff;
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.2;
}

.multimedia-audio-tile,
.multimedia-audio-hero {
    width: 100%;
    height: 100%;
    min-height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f766e, #334155);
    color: #fff;
    font-size: 2.4rem;
}

.multimedia-audio-hero {
    min-height: 220px;
    border-radius: 8px;
}

.multimedia-item-body {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    padding: 12px 16px 16px;
}

.multimedia-item-body h2 {
    margin: 0;
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-main, #1f2937);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.28;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.multimedia-item-body p {
    margin: 0;
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-secondary, #64748b);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.multimedia-meta,
.multimedia-player-info {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem .7rem;
    color: var(--text-secondary, #64748b);
    font-size: .8rem;
    font-weight: 500;
}

.media-card-meta {
    align-items: center;
    min-height: 42px;
    padding: 8px 12px 8px 16px;
    border-bottom: 1px solid var(--border-soft, #e2e8f0);
}

.media-favorite-button {
    margin-left: auto;
    color: #94a3b8;
}

.media-favorite-button:hover,
.media-favorite-button:focus-visible {
    color: var(--primary-color, #0d9488);
}

.media-empty-state {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-secondary, #64748b);
    text-align: center;
}

.media-empty-state[hidden],
.media-skeleton-grid[hidden] {
    display: none;
}

.media-empty-state i {
    font-size: 2.4rem;
    color: #94a3b8;
}

.media-empty-state strong {
    color: var(--text-main, #1f2937);
    font-size: 1rem;
    font-weight: 600;
}

.media-empty-state span {
    font-size: .9rem;
}

.media-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
}

.media-skeleton-card {
    overflow: hidden;
    border: 1px solid var(--border-soft, #e2e8f0);
    border-radius: 14px;
    background: var(--surface-primary, #fff);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}

.media-skeleton-card span,
.media-skeleton-card div,
.media-skeleton-card p {
    display: block;
    margin: 14px 16px;
    border-radius: 8px;
    background: linear-gradient(90deg, #eef2f7, #f8fafc, #eef2f7);
    background-size: 200% 100%;
    animation: mediaSkeleton 1.1s ease-in-out infinite;
}

.media-skeleton-card span {
    aspect-ratio: 16 / 9;
    margin: 0;
    border-radius: 0;
}

.media-skeleton-card div {
    height: 18px;
}

.media-skeleton-card p {
    width: 65%;
    height: 13px;
}

@keyframes mediaSkeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.multimedia-player-info-actions {
    justify-content: space-between;
    align-items: center;
}

.multimedia-player-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem .75rem;
    min-width: 0;
}

.multimedia-player-info-actions .multimedia-actions {
    margin-left: auto;
}

.multimedia-player-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 1rem;
    align-items: start;
}

.multimedia-player-card {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.multimedia-player-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.25;
}

.multimedia-player-card audio {
    width: 100%;
}

.multimedia-side-list {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.multimedia-side-list h2 {
    margin: 0 0 .25rem;
    font-size: 1rem;
    font-weight: 800;
}

.multimedia-side-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: .7rem;
    align-items: center;
    min-width: 0;
    padding: .38rem;
    border: 1px solid var(--border-soft, #e2e8f0);
    border-radius: 0;
    background: var(--surface-primary, #fff);
    color: inherit;
    text-decoration: none;
}

.multimedia-side-card:hover {
    border-color: var(--primary-color, #0d9488);
    background: var(--bg-secondary, #f8fafc);
}

.multimedia-side-thumb {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 0;
    background: #0f172a;
    color: #fff;
}

.multimedia-side-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.multimedia-side-thumb img + i {
    display: none;
}

.multimedia-side-thumb.is-empty i {
    display: inline-flex;
}

.multimedia-side-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: .25rem;
}

.multimedia-side-copy strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-main, #1f2937);
    font-size: .86rem;
    font-weight: 600;
    line-height: 1.24;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.multimedia-side-copy small {
    color: var(--text-secondary, #64748b);
    font-size: .74rem;
}

.multimedia-youtube-fallback {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .6rem .75rem;
    border: 1px solid var(--border-soft, #e2e8f0);
    background: var(--bg-secondary, #f8fafc);
    color: var(--text-secondary, #64748b);
    font-size: .82rem;
}

.multimedia-youtube-fallback a {
    color: var(--primary-color, #0d9488);
    font-weight: 700;
    white-space: nowrap;
}

.multimedia-upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}

.media-video-form-grid {
    align-items: start;
}

.media-add-layout {
    display: grid;
    grid-template-columns: minmax(360px, 560px) minmax(320px, 1fr);
    gap: 1rem;
    align-items: start;
}

.media-add-form {
    min-width: 0;
}

.media-flat-form {
    min-width: 0;
    border-radius: 0;
}

.media-form-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.media-check-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    min-height: 42px;
}

.media-check-row label {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin: 0;
}

.media-recent-panel {
    min-width: 0;
}

.media-recent-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .75rem;
    color: #475569;
    font-size: .86rem;
    font-weight: 600;
}

.media-recent-heading strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 .45rem;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #334155;
    font-size: .8rem;
    font-weight: 700;
}

.media-recent-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: .85rem;
}

.media-recent-card {
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .05);
}

.media-recent-card .media-card-meta {
    min-height: 34px;
    padding: 6px 10px;
    gap: .35rem .55rem;
    font-size: .72rem;
}

.media-recent-card .multimedia-item-body {
    padding: 10px 12px 12px;
}

.media-recent-card .multimedia-item-body h2 {
    font-size: .9rem;
}

.media-recent-card .multimedia-item-body h2 a {
    color: inherit;
    text-decoration: none;
}

.media-recent-empty {
    display: flex;
    align-items: center;
    gap: .55rem;
    color: #64748b;
    font-size: .9rem;
}

.media-images-layout {
    grid-template-columns: minmax(320px, 460px) minmax(420px, 1fr);
}

.media-images-panel {
    min-width: 0;
}

.media-images-heading {
    margin-bottom: .75rem;
}

.media-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: .85rem;
}

.media-image-card {
    min-width: 0;
}

.media-image-card .multimedia-item-body {
    padding: .65rem .75rem 0;
}

.media-image-card .multimedia-item-body p {
    min-height: 34px;
    margin: 0;
    color: var(--text-secondary, #64748b);
    font-size: .78rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.media-image-actions {
    display: flex;
    justify-content: flex-end;
    gap: .25rem;
    padding: .45rem .55rem .55rem;
}

.media-image-actions form {
    margin: 0;
}

.media-index-page {
    max-width: none;
    width: 100%;
}

.media-gallery-toolbar {
    padding: .85rem;
}

.media-gallery-search {
    flex-wrap: wrap;
}

.media-gallery-search.project-index-action-bar {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.media-gallery-search .project-index-search-field {
    flex: 1 1 280px;
    min-width: 220px;
}

.media-gallery-search .project-index-filter-field {
    flex: 0 0 180px;
    min-width: 150px;
}

.media-gallery-search .project-index-search-input,
.media-gallery-search .project-index-select {
    width: 100%;
    min-height: 42px;
    height: 42px;
    padding: 0 .8rem;
    border: 1px solid var(--input-border, #cbd5e1);
    border-radius: 10px;
    background: var(--input-bg, #fff);
    color: var(--input-text, #0f172a);
    font-size: .86rem;
}

.media-gallery-search .project-index-doc-icon-button {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 50%;
    background: var(--bg-card, #fff);
    color: var(--text-secondary, #64748b);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
}

.media-gallery-search .project-index-doc-icon-button:hover,
.media-gallery-search .project-index-doc-icon-button:focus-visible {
    background: var(--primary-color, #01a982);
    color: #fff;
    outline: none;
}

.media-gallery-panel {
    min-height: calc(100vh - 190px);
}

.media-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    align-items: start;
}

.media-gallery-card {
    overflow: hidden;
}

.media-gallery-card .multimedia-thumb {
    aspect-ratio: 4 / 3;
}

.media-gallery-card .multimedia-item-body {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    min-height: 128px;
    padding: .7rem .75rem 0;
}

.media-gallery-card .multimedia-item-body small,
.media-gallery-card .multimedia-item-body em {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-secondary, #64748b);
    font-size: .72rem;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.media-gallery-card .multimedia-item-body em {
    font-style: normal;
    color: #0d9488;
}

.media-index-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
}

.media-index-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: .12rem .45rem;
    border-radius: 999px;
    background: var(--bg-secondary, #f8fafc);
    color: var(--text-secondary, #64748b);
    font-size: .68rem;
    font-weight: 800;
}

.media-index-tags .is-indexed {
    background: rgba(1, 169, 130, .12);
    color: #047857;
}

.media-index-tags .is-pending {
    background: rgba(245, 158, 11, .14);
    color: #92400e;
}

.media-index-error {
    color: #b91c1c;
    font-size: .7rem;
    line-height: 1.35;
}

.media-edit-form {
    display: grid;
    gap: .5rem;
    padding: .65rem .75rem .8rem;
    border-top: 1px solid var(--border-soft, #e2e8f0);
    background: var(--bg-secondary, #f8fafc);
}

.media-edit-form[hidden] {
    display: none;
}

.media-edit-form label {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    color: var(--text-secondary, #64748b);
    font-size: .72rem;
    font-weight: 800;
}

.media-upload-flyout {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.media-upload-flyout[hidden] {
    display: none;
}

.media-upload-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .42);
}

.media-upload-card {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: calc(100vh - 2rem);
    overflow: auto;
}

.media-upload-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .85rem;
}

[data-theme="dark"] .media-edit-form,
[data-bs-theme="dark"] .media-edit-form,
body.dark-mode .media-edit-form,
[data-theme="dark"] .media-upload-card,
[data-bs-theme="dark"] .media-upload-card,
body.dark-mode .media-upload-card {
    background: #111827;
    border-color: rgba(148, 163, 184, .32);
    color: #e5e7eb;
}

[data-theme="dark"] .media-index-tags span,
[data-bs-theme="dark"] .media-index-tags span,
body.dark-mode .media-index-tags span {
    background: #0f172a;
    color: #e5e7eb;
}

.multimedia-upload-grid .form-field-fullwidth {
    grid-column: span 2;
}

.multimedia-recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: .75rem;
}

.multimedia-recent-card {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    padding: .75rem;
    border: 1px solid var(--border-soft, #e2e8f0);
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
}

.multimedia-recent-card video,
.multimedia-recent-card audio,
.multimedia-recent-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    background: #111827;
}

@media (max-width: 760px) {
    .multimedia-library-page {
        padding: 14px 12px 24px;
        gap: 14px;
    }

    .media-search-form {
        flex-wrap: wrap;
        gap: 10px;
    }

    .media-admin-toolbar {
        flex-wrap: wrap;
    }

    .media-admin-toolbar .multimedia-channel-filter {
        flex: 1 1 100%;
        order: 4;
    }

    .media-search-form .project-index-search-field {
        flex: 1 0 100%;
    }

    .media-search-form .media-search-right {
        max-width: none;
        margin-left: 0;
        order: 1;
    }

    .media-search-form .media-search-submit {
        order: 4;
        margin-left: auto;
    }

    .media-admin-toolbar .media-search-right {
        flex: 1 0 100%;
        order: 3;
        margin-left: 0;
    }

    .media-search-form .project-index-filter-field {
        flex: 1 1 160px;
        order: 2;
    }

    .multimedia-grid,
    .media-skeleton-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .multimedia-toolbar,
    .multimedia-upload-grid,
    .multimedia-player-layout,
    .media-add-layout {
        grid-template-columns: 1fr;
    }

    .multimedia-upload-grid .form-field-fullwidth {
        grid-column: span 1;
    }
}

[data-theme="dark"] .multimedia-library-page {
    background: #0f172a;
}

[data-theme="dark"] .media-search-form,
[data-theme="dark"] .media-nav-item,
[data-theme="dark"] .media-nav-channel,
[data-theme="dark"] .multimedia-item-card,
[data-theme="dark"] .multimedia-side-card,
[data-theme="dark"] .media-skeleton-card {
    border-color: rgba(148, 163, 184, .24);
    background: var(--surface-primary, #1e293b);
}

[data-theme="dark"] .media-search-form .project-index-search-input,
[data-theme="dark"] .media-search-form .project-index-select {
    border-color: rgba(148, 163, 184, .24);
    background: var(--input-bg, #0f172a);
    color: var(--input-text, #e2e8f0);
}

[data-theme="dark"] .media-recent-heading,
[data-theme="dark"] .media-recent-empty {
    color: #94a3b8;
}

[data-theme="dark"] .multimedia-side-card:hover,
[data-theme="dark"] .multimedia-youtube-fallback {
    border-color: rgba(148, 163, 184, .28);
    background: #0f172a;
}

[data-theme="dark"] .media-recent-heading strong {
    border-color: rgba(148, 163, 184, .24);
    color: #94a3b8;
}

[data-theme="dark"] .media-placeholder,
[data-theme="dark"] .multimedia-thumb.is-broken::before {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #94a3b8;
}

.multimedia-thumb-action {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 50%;
    background: rgba(2, 6, 23, .78);
    color: #fff;
    font-size: .82rem;
}

.multimedia-thumb:hover .multimedia-thumb-action,
.multimedia-thumb:focus-visible .multimedia-thumb-action {
    background: #01a982;
    border-color: #5eead4;
}

.multimedia-delete-button {
    color: #ff7d8d;
    border-color: rgba(255, 125, 141, .35);
}

.multimedia-delete-button:hover,
.multimedia-delete-button:focus-visible {
    color: #fff;
    background: rgba(220, 53, 69, .22);
    border-color: #ff7d8d;
}

.multimedia-feedback {
    margin: 0 0 1rem;
}

.multimedia-editor-overlay {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(2, 6, 23, .76);
    backdrop-filter: blur(5px);
}

.multimedia-editor-modal {
    width: min(900px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    overflow-y: auto;
    margin: 0;
    background: #111827 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}

.multimedia-editor-modal .content-card-heading {
    position: sticky;
    top: -14px;
    z-index: 1;
    padding: 4px 0 12px;
    background: #111827;
}

.multimedia-editor-modal h2,
.multimedia-editor-modal label {
    color: #f8fafc !important;
}

.multimedia-editor-modal .form-field-control {
    background: #020617 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

@media (max-width: 760px) {
    .multimedia-editor-overlay {
        align-items: end;
        padding: 10px;
    }

    .multimedia-editor-modal {
        max-height: calc(100vh - 20px);
    }
}

.hi-dark-mode .media-edit-form,
.hi-dark-mode .media-upload-card {
    background: #111827;
    border-color: #1f2937;
    color: #e5e7eb;
}

.hi-dark-mode .media-index-tags span {
    background: rgba(148, 163, 184, .14);
    color: #cbd5e1;
}

.hi-dark-mode .multimedia-library-page {
    background: #020617;
}

.hi-dark-mode .media-search-form,
.hi-dark-mode .media-nav-item,
.hi-dark-mode .media-nav-channel,
.hi-dark-mode .multimedia-item-card,
.hi-dark-mode .multimedia-side-card,
.hi-dark-mode .media-skeleton-card,
.hi-dark-mode .content-editor-card,
.hi-dark-mode .media-recent-panel {
    background: #111827;
    border-color: #1f2937;
    color: #e5e7eb;
}

.hi-dark-mode .media-search-form .project-index-search-input,
.hi-dark-mode .media-search-form .project-index-select,
.hi-dark-mode .form-field-control {
    background: #0f172a;
    border-color: #334155;
    color: #e5e7eb;
}

.hi-dark-mode .media-recent-heading,
.hi-dark-mode .media-recent-empty,
.hi-dark-mode .multimedia-youtube-fallback,
.hi-dark-mode .media-placeholder,
.hi-dark-mode .multimedia-thumb.is-broken::before {
    background: #0f172a;
    color: #cbd5e1;
}

.hi-dark-mode .multimedia-table th,
.hi-dark-mode .multimedia-table td,
.hi-dark-mode .multimedia-title,
.hi-dark-mode .multimedia-item-body h2,
.hi-dark-mode .multimedia-item-body a,
.hi-dark-mode .media-recent-heading strong {
    color: #e5e7eb;
}

.hi-dark-mode .multimedia-meta,
.hi-dark-mode .media-card-meta,
.hi-dark-mode .media-form-column label {
    color: #94a3b8;
}

.media-top-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.media-top-tabs a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--border-soft, #e2e8f0);
    border-radius: 8px;
    background: var(--surface-primary, #fff);
    color: var(--text-main, #0f172a);
    font-weight: 800;
    font-size: .86rem;
    text-decoration: none;
}

.media-top-tabs a:hover,
.media-top-tabs a:focus-visible {
    border-color: rgba(1, 169, 130, .42);
    background: rgba(1, 169, 130, .1);
    color: var(--primary-color, #01a982);
}

html:not(.hi-dark-mode) body .multimedia-page,
html:not(.hi-dark-mode) body .multimedia-library-page {
    color: #172033;
}

html:not(.hi-dark-mode) body .media-add-form,
html:not(.hi-dark-mode) body .media-recent-panel,
html:not(.hi-dark-mode) body .multimedia-item-card,
html:not(.hi-dark-mode) body .multimedia-side-card,
html:not(.hi-dark-mode) body .media-search-form,
html:not(.hi-dark-mode) body .media-nav-item,
html:not(.hi-dark-mode) body .media-nav-channel {
    border-color: #dfe4ee;
    background: #fff;
    color: #172033;
}

html:not(.hi-dark-mode) body .multimedia-table {
    color: #172033;
}

html:not(.hi-dark-mode) body .multimedia-table th {
    background: #f1f5fb;
    color: #273246;
}

html:not(.hi-dark-mode) body .multimedia-table td,
html:not(.hi-dark-mode) body .multimedia-title,
html:not(.hi-dark-mode) body .multimedia-item-body h2,
html:not(.hi-dark-mode) body .multimedia-item-body h2 a,
html:not(.hi-dark-mode) body .media-recent-heading strong {
    color: #101827;
}

html:not(.hi-dark-mode) body .multimedia-desc,
html:not(.hi-dark-mode) body .multimedia-meta,
html:not(.hi-dark-mode) body .media-card-meta,
html:not(.hi-dark-mode) body .media-form-column label,
html:not(.hi-dark-mode) body .media-recent-heading,
html:not(.hi-dark-mode) body .media-recent-empty {
    color: #4b5870;
}

html:not(.hi-dark-mode) body .media-placeholder,
html:not(.hi-dark-mode) body .multimedia-thumb.is-broken::before {
    background: linear-gradient(135deg, #eef3fa, #dfe7f2);
    color: #5f6c80;
}

html:not(.hi-dark-mode) body .multimedia-icon-button {
    border-color: #dfe4ee;
    background: #fff;
    color: #273246;
}

html:not(.hi-dark-mode) body .media-admin-toolbar .project-index-doc-icon-button,
html:not(.hi-dark-mode) body .multimedia-actions .project-index-doc-icon-button {
    border-color: #dfe4ee;
    background: #fff;
    color: #273246;
}

html.hi-dark-mode body.admin-page .multimedia-page,
html.hi-dark-mode body.admin-page .multimedia-library-page,
html.hi-dark-mode body.admin-page .media-add-layout,
html.hi-dark-mode body.admin-page .media-add-form,
html.hi-dark-mode body.admin-page .media-flat-form,
html.hi-dark-mode body.admin-page .media-recent-panel,
html.hi-dark-mode body.admin-page .media-recent-card,
html.hi-dark-mode body.admin-page .multimedia-item-card {
    background: #111827 !important;
    border-color: #253145 !important;
    color: #e5e7eb !important;
}

html.hi-dark-mode body.admin-page .multimedia-page {
    background: #020617 !important;
}

html.hi-dark-mode body.admin-page .media-form-column label,
html.hi-dark-mode body.admin-page .media-check-row label,
html.hi-dark-mode body.admin-page .media-recent-heading,
html.hi-dark-mode body.admin-page .media-recent-empty,
html.hi-dark-mode body.admin-page .media-card-meta,
html.hi-dark-mode body.admin-page .multimedia-meta {
    color: #cbd5e1 !important;
    -webkit-text-fill-color: #cbd5e1;
}

html.hi-dark-mode body.admin-page .media-recent-heading strong,
html.hi-dark-mode body.admin-page .multimedia-item-body h2,
html.hi-dark-mode body.admin-page .multimedia-item-body h2 a {
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc;
}

html.hi-dark-mode body.admin-page .media-add-form .form-field-control,
html.hi-dark-mode body.admin-page .media-add-form input,
html.hi-dark-mode body.admin-page .media-add-form textarea,
html.hi-dark-mode body.admin-page .media-add-form select {
    background: #020617 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc;
}

html.hi-dark-mode body.admin-page .media-add-form input::placeholder,
html.hi-dark-mode body.admin-page .media-add-form textarea::placeholder {
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8;
}

[data-theme="dark"] .media-top-tabs a,
.hi-dark-mode .media-top-tabs a {
    background: #111827;
    border-color: #1f2937;
    color: #e5e7eb;
}

[data-theme="dark"] .media-top-tabs a:hover,
[data-theme="dark"] .media-top-tabs a:focus-visible,
.hi-dark-mode .media-top-tabs a:hover,
.hi-dark-mode .media-top-tabs a:focus-visible {
    background: rgba(1, 169, 130, .16);
    border-color: rgba(1, 169, 130, .42);
    color: #5eead4;
}

/* Multimedia admin dark mode hardening. */
html[data-theme="dark"] body.admin-page .multimedia-page,
html[data-theme="dark"] body.admin-page .multimedia-library-page,
html[data-theme="dark"] body.admin-page .media-add-form,
html[data-theme="dark"] body.admin-page .media-recent-panel,
html[data-theme="dark"] body.admin-page .multimedia-item-card,
html[data-theme="dark"] body.admin-page .multimedia-side-card,
html[data-theme="dark"] body.admin-page .media-search-form,
html[data-theme="dark"] body.admin-page .media-nav-item,
html[data-theme="dark"] body.admin-page .media-nav-channel,
html[data-theme="dark"] body.admin-page .multimedia-table {
    background: #111827 !important;
    border-color: #253145 !important;
    color: #e5e7eb !important;
}

html[data-theme="dark"] body.admin-page .multimedia-table th,
html[data-theme="dark"] body.admin-page .multimedia-table td {
    background: transparent !important;
    border-color: #253145 !important;
    color: #e5e7eb !important;
}

html[data-theme="dark"] body.admin-page .multimedia-title,
html[data-theme="dark"] body.admin-page .multimedia-item-body h2,
html[data-theme="dark"] body.admin-page .multimedia-item-body h2 a,
html[data-theme="dark"] body.admin-page .media-recent-heading strong {
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc;
}

html[data-theme="dark"] body.admin-page .multimedia-desc,
html[data-theme="dark"] body.admin-page .multimedia-meta,
html[data-theme="dark"] body.admin-page .media-card-meta,
html[data-theme="dark"] body.admin-page .media-form-column label,
html[data-theme="dark"] body.admin-page .media-recent-heading,
html[data-theme="dark"] body.admin-page .media-recent-empty {
    color: #b8c3d4 !important;
    -webkit-text-fill-color: #b8c3d4;
}

/* Final public media theme matrix. Keep light and dark contrast deterministic. */
html[data-theme="light"] body.music-body .multimedia-library-page,
html[data-theme="light"] body.music-body .multimedia-page {
    background: #f5f7fa !important;
    color: #172033 !important;
    -webkit-text-fill-color: initial;
}

html[data-theme="light"] body.music-body .media-search-form,
html[data-theme="light"] body.music-body .multimedia-item-card,
html[data-theme="light"] body.music-body .media-channel-card,
html[data-theme="light"] body.music-body .multimedia-side-card,
html[data-theme="light"] body.music-body .media-skeleton-card,
html[data-theme="light"] body.music-body .media-recent-panel,
html[data-theme="light"] body.music-body .multimedia-page .content-editor-card {
    border-color: #c6c9ca !important;
    background: #e7ecef !important;
    color: #172033 !important;
    box-shadow: none !important;
}

html[data-theme="light"] body.music-body .multimedia-item-card:hover,
html[data-theme="light"] body.music-body .media-channel-card:hover,
html[data-theme="light"] body.music-body .multimedia-side-card:hover {
    border-color: #01a982 !important;
    background: #edf2f4 !important;
    box-shadow: 0 12px 26px rgba(66, 85, 99, .14) !important;
}

html[data-theme="light"] body.music-body .media-search-form .project-index-search-input,
html[data-theme="light"] body.music-body .media-search-form .project-index-select,
html[data-theme="light"] body.music-body .multimedia-page .form-field-control {
    border-color: #c6c9ca !important;
    background: #ffffff !important;
    color: #172033 !important;
    -webkit-text-fill-color: #172033 !important;
}

html[data-theme="light"] body.music-body .media-search-form .project-index-search-input::placeholder,
html[data-theme="light"] body.music-body .multimedia-page .form-field-control::placeholder {
    color: #5f7a76 !important;
    -webkit-text-fill-color: #5f7a76 !important;
}

html[data-theme="light"] body.music-body .multimedia-item-body h2,
html[data-theme="light"] body.music-body .multimedia-item-body h2 a,
html[data-theme="light"] body.music-body .media-channel-card h2,
html[data-theme="light"] body.music-body .multimedia-player-title,
html[data-theme="light"] body.music-body .multimedia-side-list h2,
html[data-theme="light"] body.music-body .multimedia-side-card strong,
html[data-theme="light"] body.music-body .multimedia-page .content-editor-header h1 {
    color: #172033 !important;
    -webkit-text-fill-color: #172033 !important;
}

html[data-theme="light"] body.music-body .multimedia-item-body p,
html[data-theme="light"] body.music-body .media-channel-card p,
html[data-theme="light"] body.music-body .media-channel-type,
html[data-theme="light"] body.music-body .media-channel-meta,
html[data-theme="light"] body.music-body .multimedia-meta,
html[data-theme="light"] body.music-body .media-card-meta,
html[data-theme="light"] body.music-body .multimedia-player-info,
html[data-theme="light"] body.music-body .multimedia-player-card > p,
html[data-theme="light"] body.music-body .multimedia-side-card small,
html[data-theme="light"] body.music-body .media-empty-state,
html[data-theme="light"] body.music-body .media-recent-empty {
    color: #425563 !important;
    -webkit-text-fill-color: #425563 !important;
}

html[data-theme="light"] body.music-body .media-top-tabs a,
html[data-theme="light"] body.music-body .media-count-dot,
html[data-theme="light"] body.music-body .multimedia-icon-button,
html[data-theme="light"] body.music-body .media-search-form .project-index-search-button {
    border-color: #c6c9ca !important;
    background: #e7ecef !important;
    color: #172033 !important;
    -webkit-text-fill-color: #172033 !important;
    box-shadow: none !important;
}

html[data-theme="light"] body.music-body .media-top-tabs a:hover,
html[data-theme="light"] body.music-body .multimedia-icon-button:hover,
html[data-theme="light"] body.music-body .media-search-form .project-index-search-button:hover {
    border-color: #01a982 !important;
    background: rgba(1, 169, 130, .10) !important;
    color: #008567 !important;
    -webkit-text-fill-color: #008567 !important;
}

html[data-theme="dark"] body.music-body .multimedia-library-page,
html[data-theme="dark"] body.music-body .multimedia-page {
    background: #050607 !important;
    color: #e1e1e1 !important;
}

html[data-theme="dark"] body.music-body .media-search-form,
html[data-theme="dark"] body.music-body .multimedia-item-card,
html[data-theme="dark"] body.music-body .media-channel-card,
html[data-theme="dark"] body.music-body .multimedia-side-card,
html[data-theme="dark"] body.music-body .media-skeleton-card,
html[data-theme="dark"] body.music-body .media-recent-panel,
html[data-theme="dark"] body.music-body .multimedia-page .content-editor-card {
    border-color: #425563 !important;
    background: #0c0f12 !important;
    color: #e1e1e1 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.music-body .media-search-form .project-index-search-input,
html[data-theme="dark"] body.music-body .media-search-form .project-index-select,
html[data-theme="dark"] body.music-body .multimedia-page .form-field-control {
    border-color: #425563 !important;
    background: #11151a !important;
    color: #e1e1e1 !important;
    -webkit-text-fill-color: #e1e1e1 !important;
}

html[data-theme="dark"] body.music-body .multimedia-item-body h2,
html[data-theme="dark"] body.music-body .multimedia-item-body h2 a,
html[data-theme="dark"] body.music-body .media-channel-card h2,
html[data-theme="dark"] body.music-body .multimedia-player-title,
html[data-theme="dark"] body.music-body .multimedia-side-list h2,
html[data-theme="dark"] body.music-body .multimedia-side-card strong,
html[data-theme="dark"] body.music-body .multimedia-page .content-editor-header h1 {
    color: #f6f7f8 !important;
    -webkit-text-fill-color: #f6f7f8 !important;
}

html[data-theme="dark"] body.music-body .multimedia-item-body p,
html[data-theme="dark"] body.music-body .media-channel-card p,
html[data-theme="dark"] body.music-body .media-channel-type,
html[data-theme="dark"] body.music-body .media-channel-meta,
html[data-theme="dark"] body.music-body .multimedia-meta,
html[data-theme="dark"] body.music-body .media-card-meta,
html[data-theme="dark"] body.music-body .multimedia-player-info,
html[data-theme="dark"] body.music-body .multimedia-player-card > p,
html[data-theme="dark"] body.music-body .multimedia-side-card small,
html[data-theme="dark"] body.music-body .media-empty-state,
html[data-theme="dark"] body.music-body .media-recent-empty {
    color: #c6c9ca !important;
    -webkit-text-fill-color: #c6c9ca !important;
}

html[data-theme="dark"] body.music-body .media-top-tabs a,
html[data-theme="dark"] body.music-body .media-count-dot,
html[data-theme="dark"] body.music-body .multimedia-icon-button,
html[data-theme="dark"] body.music-body .media-search-form .project-index-search-button {
    border-color: #425563 !important;
    background: #11151a !important;
    color: #e1e1e1 !important;
    -webkit-text-fill-color: #e1e1e1 !important;
    box-shadow: none !important;
}

/* Channel colors: custom channel colors remain accents, never body text. */
html[data-theme="light"] body.music-body .media-channel-icon {
    border: 1px solid color-mix(in srgb, var(--channel-color, #01a982) 35%, #c6c9ca);
    background: color-mix(in srgb, var(--channel-color, #01a982) 12%, #ffffff) !important;
    color: #008567 !important;
    -webkit-text-fill-color: #008567 !important;
}

html[data-theme="light"] body.music-body .media-channel-cover {
    background: #dce3e6 !important;
}

html[data-theme="light"] body.music-body .media-channel-content-card {
    border-color: #c6c9ca !important;
    background: #e7ecef !important;
    color: #172033 !important;
}

html[data-theme="light"] body.music-body .media-channel-content-card strong {
    color: #172033 !important;
    -webkit-text-fill-color: #172033 !important;
}

html[data-theme="light"] body.music-body .media-channel-content-card span,
html[data-theme="light"] body.music-body .media-channel-content-card p {
    color: #425563 !important;
    -webkit-text-fill-color: #425563 !important;
}

html[data-theme="dark"] body.music-body .media-channel-icon {
    border: 1px solid color-mix(in srgb, var(--channel-color, #01a982) 48%, #425563);
    background: color-mix(in srgb, var(--channel-color, #01a982) 16%, #11151a) !important;
    color: #2ad2c9 !important;
    -webkit-text-fill-color: #2ad2c9 !important;
}

html[data-theme="dark"] body.music-body .media-channel-cover {
    background: #11151a !important;
}

html[data-theme="dark"] body.music-body .media-channel-content-card {
    border-color: #425563 !important;
    background: #0c0f12 !important;
    color: #e1e1e1 !important;
}

html[data-theme="dark"] body.music-body .media-channel-content-card strong {
    color: #f6f7f8 !important;
    -webkit-text-fill-color: #f6f7f8 !important;
}

html[data-theme="dark"] body.music-body .media-channel-content-card span,
html[data-theme="dark"] body.music-body .media-channel-content-card p {
    color: #c6c9ca !important;
    -webkit-text-fill-color: #c6c9ca !important;
}

/* Video editor uses the same compact multimedia geometry as the library. */
.video-edit-page {
    width: min(100%, 1480px);
    margin-inline: auto;
}

.video-edit-header {
    align-items: center;
}

.video-edit-layout {
    display: grid;
    grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.video-edit-form,
.video-edit-preview {
    min-width: 0;
}

.video-edit-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.video-edit-fields .form-field-fullwidth {
    grid-column: 1 / -1;
}

.video-edit-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    padding: 10px 0;
}

.video-edit-options label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.video-edit-player {
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    background: #050607;
}

.video-edit-player iframe,
.video-edit-player video {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    object-fit: contain;
}

.video-edit-meta {
    display: grid;
    gap: 14px;
    padding-top: 16px;
}

.video-edit-meta span {
    color: #008567;
    font-size: .72rem;
    font-weight: 850;
}

.video-edit-meta h2,
.video-edit-meta p {
    margin: 4px 0 0;
}

.video-edit-meta dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.video-edit-meta dl div {
    min-width: 0;
    padding: 10px;
    border: 1px solid currentColor;
    border-radius: 8px;
}

.video-edit-meta dt {
    font-size: .68rem;
    text-transform: uppercase;
}

.video-edit-meta dd {
    margin: 3px 0 0;
    overflow: hidden;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-theme="light"] body.admin-page .video-edit-preview,
html[data-theme="light"] body.admin-page .video-edit-form {
    border-color: #c6c9ca !important;
    background: #e7ecef !important;
    color: #172033 !important;
}

html[data-theme="light"] body.admin-page .video-edit-meta h2 {
    color: #172033 !important;
    -webkit-text-fill-color: #172033 !important;
}

html[data-theme="light"] body.admin-page .video-edit-meta p,
html[data-theme="light"] body.admin-page .video-edit-meta dl {
    color: #425563 !important;
}

html[data-theme="dark"] body.admin-page .video-edit-preview,
html[data-theme="dark"] body.admin-page .video-edit-form {
    border-color: #425563 !important;
    background: #0c0f12 !important;
    color: #e1e1e1 !important;
}

html[data-theme="dark"] body.admin-page .video-edit-meta h2 {
    color: #f6f7f8 !important;
    -webkit-text-fill-color: #f6f7f8 !important;
}

html[data-theme="dark"] body.admin-page .video-edit-meta p,
html[data-theme="dark"] body.admin-page .video-edit-meta dl {
    color: #c6c9ca !important;
}

@media (max-width: 900px) {
    .video-edit-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .video-edit-fields,
    .video-edit-meta dl {
        grid-template-columns: 1fr;
    }
}

.multimedia-preview-modal {
    width: min(960px, 100%);
}

.multimedia-preview-modal .multimedia-player,
.multimedia-preview-modal .multimedia-youtube-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: calc(100vh - 180px);
    border: 0;
    background: #000;
}

.multimedia-preview-modal .multimedia-audio {
    width: 100%;
}

.media-admin-toolbar .multimedia-bulk-delete-icon {
    flex: 0 0 42px;
    width: 42px;
    min-width: 42px;
    color: #c2413b !important;
}

.media-admin-toolbar .multimedia-bulk-delete-icon:not(:disabled):hover,
.media-admin-toolbar .multimedia-bulk-delete-icon:not(:disabled):focus-visible {
    border-color: #ff8d6d !important;
    background: color-mix(in srgb, #ff8d6d 14%, transparent) !important;
}

.media-admin-toolbar .multimedia-bulk-delete-icon:disabled {
    cursor: not-allowed;
    opacity: .35;
}

.media-admin-toolbar .multimedia-bulk-chords-icon {
    border-color: rgba(42, 210, 201, .55);
    color: #2ad2c9;
}

.media-admin-toolbar .multimedia-bulk-chords-icon:not(:disabled):hover,
.media-admin-toolbar .multimedia-bulk-chords-icon:not(:disabled):focus-visible {
    border-color: #01a982;
    background: rgba(1, 169, 130, .14);
    color: #01a982;
}

.media-admin-toolbar .multimedia-bulk-chords-icon:disabled {
    cursor: not-allowed;
    opacity: .42;
}

.multimedia-v2-counter {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    border: 1px solid rgba(1, 169, 130, .38);
    border-radius: 8px;
    color: var(--text-primary, #e1e1e1);
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

.multimedia-v2-counter i {
    color: #01a982;
}

.multimedia-chords-progress {
    margin: 0 0 14px;
}

.multimedia-chords-cell {
    width: 58px;
    text-align: center !important;
}

.multimedia-chords-status {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(95, 122, 118, .45);
    border-radius: 50%;
    background: transparent;
    color: #5f7a76;
    text-decoration: none;
}

.multimedia-chords-status.is-v2 {
    border-color: rgba(1, 169, 130, .72);
    background: rgba(1, 169, 130, .11);
    color: #01a982;
}

.multimedia-chords-status.is-v2:hover,
.multimedia-chords-status.is-v2:focus-visible {
    border-color: #2ad2c9;
    color: #2ad2c9;
    outline: 2px solid rgba(42, 210, 201, .22);
    outline-offset: 2px;
}

.multimedia-chords-status.is-legacy {
    border-color: rgba(255, 141, 109, .65);
    background: rgba(255, 141, 109, .09);
    color: #ff8d6d;
}

.multimedia-chords-status.is-pending {
    color: #80746e;
}

.multimedia-chords-status.is-unavailable {
    opacity: .45;
}

.multimedia-chords-status.is-failed {
    border-color: rgba(255, 141, 109, .75);
    background: rgba(255, 141, 109, .1);
    color: #ff8d6d;
}

.multimedia-select-cell {
    width: 42px;
    text-align: center !important;
}

.multimedia-select-cell input {
    width: 17px;
    height: 17px;
    accent-color: #01a982;
}

.youtube-import-page {
    width: min(100%, 1480px);
    margin-inline: auto;
    padding-top: 18px;
}

.youtube-import-commandbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 8px 10px;
    border: 1px solid var(--admin-border, #c6c9ca);
    border-radius: 8px;
    background: var(--admin-surface, rgba(255, 255, 255, .04));
}

.youtube-import-command-field {
    min-width: 0;
    margin: 0;
}

.youtube-import-command-field input,
.youtube-import-command-field select {
    height: 38px !important;
}

.youtube-url-field {
    flex: 1 1 260px;
}

.youtube-channel-field {
    flex: 0 1 200px;
}

.youtube-import-options {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px 12px;
}

.youtube-import-options label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

.youtube-import-options input {
    width: 16px;
    height: 16px;
    accent-color: #01a982;
}

.youtube-import-working {
    display: none;
    color: var(--admin-text-muted, #5f6b78);
}

.youtube-import-page.is-loading .youtube-import-working {
    display: inline;
}

.youtube-import-command-divider {
    align-self: stretch;
    width: 1px;
    background: var(--admin-border, #c6c9ca);
}

.youtube-import-channel-result {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    line-height: 1.15;
}

.youtube-import-channel-result strong {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .84rem;
}

.youtube-import-channel-result small {
    color: var(--admin-text-muted, #5f6b78);
    font-size: .68rem;
}

.youtube-import-validation:empty {
    display: none;
}

.youtube-import-validation {
    margin: 8px 0 0;
}

.youtube-import-preview {
    margin-top: 14px;
}

.youtube-import-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.youtube-import-select-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: 700;
}

.youtube-import-select-all input,
.youtube-import-video-check {
    width: 18px;
    height: 18px;
    accent-color: #01a982;
}

.youtube-import-selected-count {
    color: var(--admin-text-muted, #5f6b78);
    font-size: .82rem;
    white-space: nowrap;
}

.youtube-import-selected-button {
    margin-left: auto;
    border-color: rgba(1, 169, 130, .6) !important;
    color: #01a982 !important;
}

.youtube-import-video {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--admin-border, #c6c9ca);
    border-radius: 8px;
}

.youtube-import-video-label {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
    margin: 0;
    cursor: pointer;
}

.youtube-import-video:has(.youtube-import-video-check:checked) {
    border-color: #01a982;
    background: rgba(1, 169, 130, .08);
}

.youtube-import-video img {
    width: 112px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 6px;
}

.youtube-import-video-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 4px;
}

.youtube-import-video-copy > span {
    color: #008567;
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.youtube-import-video strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: .86rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.youtube-import-video small {
    color: var(--admin-text-muted, #5f6b78);
}

.youtube-import-video.is-existing {
    opacity: .62;
}

.youtube-import-video.is-existing .youtube-import-video-label {
    cursor: default;
}

html[data-theme="light"] body.admin-page .youtube-import-form,
html[data-theme="light"] body.admin-page .youtube-import-preview {
    background: transparent !important;
    color: #172033 !important;
}

html[data-theme="dark"] body.admin-page .youtube-import-form,
html[data-theme="dark"] body.admin-page .youtube-import-preview {
    background: transparent !important;
    color: #e1e1e1 !important;
}

@media (max-width: 720px) {
    .youtube-import-grid {
        grid-template-columns: 1fr;
    }

    .youtube-import-command-field,
    .youtube-url-field,
    .youtube-channel-field {
        flex-basis: 100%;
    }

    .youtube-import-command-divider {
        width: 100%;
        height: 1px;
    }
}

@media (max-width: 1200px) {
    .youtube-import-commandbar {
        flex-wrap: wrap;
    }
}

