/* Melon Lite Style - Elegant Dark & Green Theme */
/* Maintenance map:
   - style.css owns base tokens, global layout, common components, and page-level UI.
   - floating-player.css is loaded later and owns late responsive/player overrides.
   - Prefer editing the nearest named section instead of appending broad overrides.
   - Keep new selectors scoped to a page class or component root to avoid regressions.
*/

:root {
    --bg-primary: #121212;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #242424;
    --accent-color: #00CD3C; /* Melon Green */
    --accent-hover: #00B334;
    --text-primary: #ffffff;
    --text-secondary: #a7a7a7;
    --text-muted: #6e6e6e;
    --border-color: #2a2a2a;
    --sidebar-width: 280px;
    --player-height: 90px;
    --font-sans: 'Inter', 'Noto Sans KR', sans-serif;
    --font-title: 'Outfit', sans-serif;
    --player-bg: #181818;
    --player-surface: #1a1a1a;
    --player-elevated: #121212;
    --player-text: #ffffff;
    --player-muted: #a7a7a7;
    --player-border: #2a2a2a;
    --player-progress-bg: #242424;
    --player-button-bg: #ffffff;
    --player-button-text: #000000;
}

/* 22李?紐⑤컮??PWA ?뚮젅?댁뼱 理쒖쥌 蹂댁젙 */
@media (max-width: 767px) {
    .player-bar {
        box-sizing: border-box;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100vw;
        min-height: calc(84px + env(safe-area-inset-bottom));
        padding: 8px 10px calc(10px + env(safe-area-inset-bottom)) !important;
        overflow: hidden;
    }

    .content-body,
    .app-main,
    .main-content {
        padding-bottom: calc(132px + env(safe-area-inset-bottom)) !important;
    }

    .player-song-info,
    .player-song-details {
        min-width: 0;
    }

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

    .progress-bar-wrapper {
        min-height: 18px;
    }

    .expand-player-container {
        width: 100%;
        max-width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        overflow-y: auto;
        border-radius: 0 !important;
        padding-bottom: calc(22px + env(safe-area-inset-bottom)) !important;
    }

    .melon-lite-toast,
    .pwa-install-banner {
        max-width: calc(100vw - 20px);
    }
}

/* 17李? smart organize and tag management */
.tag-cloud,
.song-tags-box,
.tag-suggestion-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tag-badge,
.tag-suggestion-btn {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.2;
    text-decoration: none;
    word-break: keep-all;
}

.tag-badge:hover,
.tag-suggestion-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.tag-empty {
    color: var(--text-muted);
    font-size: 14px;
}

.tag-remove-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
}

.tag-remove-btn:hover {
    color: var(--danger-color, #ff4d4f);
    border-color: var(--danger-color, #ff4d4f);
}

.tag-editor-card,
.smart-organize-page,
.tag-manage-page,
.name-merge-page,
.metadata-quality-page {
    min-width: 0;
}

.song-tag-form,
.tag-admin-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.song-tag-form input,
.tag-admin-form input,
.tag-admin-form select,
.merge-candidate-header input {
    min-width: 180px;
    flex: 1 1 220px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.tag-admin-form.compact {
    margin-top: 10px;
}

.smart-card-grid,
.tag-admin-grid,
.merge-candidate-list,
.metadata-quality-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.smart-summary-card,
.tag-admin-card,
.merge-candidate-card,
.metadata-quality-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
}

.smart-summary-card {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.smart-summary-card span,
.metadata-quality-card p,
.merge-source-list small {
    color: var(--text-secondary);
}

.smart-summary-card strong {
    color: var(--accent-color);
    font-size: 24px;
}

.merge-candidate-card,
.metadata-quality-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.merge-candidate-header {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.merge-source-list {
    display: grid;
    gap: 8px;
}

.merge-source-list label,
.merge-manual-toggle {
    display: flex;
    gap: 8px;
    align-items: center;
    min-height: 34px;
}

.metadata-suggestion-box {
    display: grid;
    gap: 6px;
    padding: 12px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    word-break: break-word;
}

.metadata-suggestion-box strong {
    color: var(--text-primary);
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tab {
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
}

.filter-tab.active,
.filter-tab:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

@media (max-width: 767px) {
    .smart-card-grid,
    .tag-admin-grid,
    .merge-candidate-list,
    .metadata-quality-list {
        grid-template-columns: 1fr;
    }

    .song-tag-form input,
    .tag-admin-form input,
    .tag-admin-form select,
    .tag-admin-form button,
    .merge-candidate-header input {
        width: 100%;
        flex-basis: 100%;
    }

    .smart-summary-card {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* 18李? lyrics, notes and ratings */
.song-title-stack,
.listening-note-main {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.song-list-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.song-rating-badge,
.song-note-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    font-size: 12px;
    text-decoration: none;
}

.recommend-reason-badge {
    max-width: 100%;
    color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-color) 10%, var(--card-bg));
}

.song-rating-badge i,
.rating-star.active {
    color: #f5b301;
}

.rating-panel,
.note-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.rating-stars {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.rating-star,
.rating-clear-btn {
    min-width: 34px;
    min-height: 34px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
}

.rating-stars:not(.rating-stars-editable) .rating-star {
    min-width: auto;
    min-height: auto;
    border: 0;
    background: transparent;
    cursor: default;
}

.rating-clear-btn {
    padding: 0 10px;
    width: auto;
}

.note-text-block,
.lyrics-text-block {
    max-height: 320px;
    overflow: auto;
    padding: 14px;
    border-radius: 10px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    line-height: 1.8;
    word-break: break-word;
}

.song-note-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.song-note-form textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

.listening-note-list {
    display: grid;
    gap: 12px;
}

.listening-note-row {
    display: grid;
    grid-template-columns: 42px 56px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
}

.listening-note-rating {
    justify-self: end;
}

.search-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    min-height: 38px;
}

@media (max-width: 767px) {
    .listening-note-row {
        grid-template-columns: 40px 48px minmax(0, 1fr);
        align-items: start;
    }

    .listening-note-rating {
        grid-column: 3 / -1;
        justify-self: start;
    }

    .rating-star,
    .rating-clear-btn {
        min-width: 38px;
        min-height: 38px;
    }
}

.search-page-form {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
}

.search-page-form input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-color);
    font-size: 15px;
}

mark {
    background: rgba(0, 205, 60, 0.22);
    color: var(--text-color);
    border-radius: 4px;
    padding: 0 3px;
}

.explore-card-grid,
.auto-playlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.explore-card,
.auto-playlist-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-color);
    text-decoration: none;
}

.explore-card strong,
.auto-playlist-card strong {
    font-size: 15px;
    word-break: break-word;
}

.explore-card span,
.auto-playlist-card span,
.auto-playlist-card small {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.45;
}

.auto-playlist-card i {
    color: var(--accent-color);
    font-size: 22px;
}

.auto-playlist-action-panel {
    display: grid;
    gap: 14px;
}

.auto-playlist-actions,
.auto-save-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.auto-save-form {
    display: grid;
    gap: 8px;
    max-width: 680px;
}

.auto-save-form label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
}

.auto-save-row .form-control {
    flex: 1 1 260px;
    min-width: 0;
}

.metadata-tools {
    margin-bottom: 18px;
}

.metadata-error {
    display: block;
    margin-top: 6px;
    color: var(--danger-color, #ff6b6b);
    word-break: break-word;
}

.inline-action-form {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

@media (max-width: 768px) {
    .search-page-form {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .search-page-form input {
        flex-basis: calc(100% - 32px);
    }

    .search-page-form .btn {
        width: 100%;
        justify-content: center;
    }

    .explore-card-grid,
    .auto-playlist-grid {
        grid-template-columns: 1fr;
    }
}

.pwa-install-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(96px + env(safe-area-inset-bottom));
    z-index: 1010;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-color);
    box-shadow: 0 16px 40px rgba(0,0,0,0.22);
}

.pwa-install-banner[hidden] {
    display: none;
}

.pwa-install-banner div {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pwa-install-banner span {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.35;
}

.pwa-install-banner .pwa-install-copy {
    flex: 1 1 auto;
}

.pwa-install-banner .pwa-install-actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.pwa-ios-steps {
    margin: 8px 0 0;
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
}

.pwa-ios-steps[hidden] {
    display: none;
}

html.is-standalone body,
body.is-standalone {
    min-height: 100dvh;
}

body.is-standalone .top-bar {
    padding-top: max(16px, env(safe-area-inset-top));
}

body.is-standalone .sidebar {
    padding-top: env(safe-area-inset-top);
}

body.is-standalone .player-bar {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
}

body.is-standalone .content-body {
    padding-bottom: calc(var(--player-height) + 42px + env(safe-area-inset-bottom));
}

body.is-offline .player-bar::before {
    content: '?ㅽ봽?쇱씤';
    position: absolute;
    top: -24px;
    right: 12px;
    padding: 3px 8px;
    border-radius: 999px;
    color: #fff;
    background: #ef4444;
    font-size: 11px;
    font-weight: 700;
}

.offline-page {
    min-height: 55vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.offline-card {
    width: min(520px, 100%);
    padding: 28px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--card-bg);
    text-align: center;
    box-shadow: var(--ui-shadow-md, 0 14px 34px rgba(15, 23, 42, 0.12));
}

.offline-icon i,
.offline-card > i {
    color: var(--accent-color);
    font-size: 38px;
    margin-bottom: 14px;
}

.offline-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-color) 12%, transparent);
    color: var(--accent-color);
    font-size: 12px;
    font-weight: 800;
}

.offline-card h1 {
    font-size: 24px;
    margin-bottom: 12px;
}

.offline-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.offline-last-seen strong {
    color: var(--text-primary);
}

.offline-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.offline-note {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px dashed color-mix(in srgb, var(--accent-color) 26%, var(--border-color));
    border-radius: 12px;
    background: color-mix(in srgb, var(--accent-color) 6%, transparent);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.55;
    text-align: left;
}

.offline-note strong {
    color: var(--text-primary);
}

.list-cover,
.compact-cover,
.entity-cover,
.album-card-cover,
.queue-item-thumb img,
.player-album-art img,
.expand-album-art img {
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

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

@media (max-width: 767px) {
    .content-body {
        padding-bottom: calc(122px + env(safe-area-inset-bottom));
    }

    .player-bar {
        min-height: 86px;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
        gap: 8px;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .player-song-info {
        min-width: 0;
        gap: 8px;
    }

    .player-album-art,
    .player-album-art img {
        width: 46px;
        height: 46px;
        flex: 0 0 46px;
    }

    .player-song-details {
        min-width: 0;
    }

    .player-controls {
        min-width: 0;
        width: auto;
    }

    .control-buttons {
        gap: 6px;
    }

    .control-btn {
        width: 38px;
        height: 38px;
        min-width: 38px;
    }

    #btn-shuffle,
    #btn-repeat,
    .player-utils .volume-icon,
    .volume-slider-wrapper {
        display: none;
    }

    .player-utils {
        gap: 4px;
    }

    .progress-container {
        max-width: 100%;
        gap: 6px;
    }

    .time-label {
        font-size: 11px;
        min-width: 36px;
    }

    .pwa-install-banner {
        left: 10px;
        right: 10px;
        bottom: calc(96px + env(safe-area-inset-bottom));
        align-items: stretch;
        flex-direction: column;
    }

    .pwa-install-banner .pwa-install-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .pwa-install-banner .pwa-install-actions .btn {
        flex: 1 1 120px;
        min-height: 38px;
    }

    .pwa-install-banner .modal-close-btn {
        min-width: 38px;
        min-height: 38px;
    }
}

/* 14th update: theme-aware player surfaces */
.player-bar {
    background-color: var(--player-bg) !important;
    border-top-color: var(--player-border) !important;
    color: var(--player-text);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.10);
}

.player-song-title,
.queue-item-title,
.expand-song-meta h2 {
    color: var(--player-text) !important;
}

.player-song-artist,
.time-label,
.volume-icon,
.queue-item-artist,
.queue-item-duration,
.expand-lyrics-full-text {
    color: var(--player-muted) !important;
}

.player-album-art,
.queue-item-thumb,
.expand-tab-section {
    background-color: var(--player-surface) !important;
    border-color: var(--player-border) !important;
}

.control-btn {
    color: var(--player-muted);
}

.control-btn:hover {
    color: var(--player-text);
}

.play-btn,
.expand-control-buttons-row .play-btn {
    background-color: var(--player-button-bg) !important;
    color: var(--player-button-text) !important;
}

.progress-bar-wrapper,
.volume-slider-wrapper,
.expand-player-controls .progress-bar-wrapper {
    background-color: var(--player-progress-bg) !important;
}

.progress-bar,
.volume-slider {
    background-color: var(--accent-color);
}

.progress-handle,
.expand-player-controls .progress-handle {
    background-color: var(--player-button-bg) !important;
}

.queue-panel {
    background-color: var(--player-elevated) !important;
    border-color: var(--player-border) !important;
}

.queue-header,
.expand-tab-headers {
    background-color: var(--player-surface) !important;
    border-color: var(--player-border) !important;
}

.queue-header h3 {
    color: var(--player-text) !important;
}

.queue-item {
    border-bottom-color: var(--player-border) !important;
}

.queue-item:hover {
    background-color: color-mix(in srgb, var(--accent-color) 8%, transparent);
}

.expand-player-overlay {
    background-color: color-mix(in srgb, var(--player-elevated) 96%, transparent) !important;
}

.expand-close,
.tab-header-btn:hover {
    color: var(--player-text) !important;
}

.expand-tab-content,
.expand-player-container {
    color: var(--player-text);
}

.player-bar .resume-ready {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color) 24%, transparent);
}

.daily-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.daily-summary-grid div {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
    background: var(--bg-secondary);
}

.daily-summary-grid span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.daily-summary-grid strong {
    color: var(--accent-color);
    font-size: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.stats-card-wide {
    grid-column: span 2;
}

.mini-bar-chart {
    display: grid;
    gap: 10px;
}

.mini-bar-row {
    display: grid;
    grid-template-columns: minmax(70px, 120px) 1fr minmax(32px, auto);
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.mini-bar-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-secondary);
}

.mini-bar-track {
    height: 9px;
    background: var(--bg-tertiary);
    border-radius: 999px;
    overflow: hidden;
}

.mini-bar-fill {
    height: 100%;
    background: var(--accent-color);
    border-radius: inherit;
}

@media (max-width: 767px) {
    .stats-grid,
    .daily-summary-grid {
        grid-template-columns: 1fr;
    }

    .stats-card-wide {
        grid-column: auto;
    }

    .mini-bar-row {
        grid-template-columns: minmax(64px, 92px) 1fr minmax(28px, auto);
    }
}

/* Mobile listening report widgets */
@media (max-width: 767px) {
    .stats-page {
        display: grid;
        gap: 16px;
    }

    .stats-page .page-title-section {
        margin-bottom: 0;
    }

    .stats-page .page-main-title {
        font-size: clamp(28px, 9vw, 36px);
        line-height: 1.12;
        letter-spacing: 0;
    }

    .stats-page .page-subtitle {
        max-width: 30rem;
        font-size: 14px;
        line-height: 1.55;
    }

    .stats-page > .library-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        margin: 0 !important;
    }

    .stats-page > .library-stat-grid + .library-stat-grid {
        margin-top: -6px !important;
    }

    .stats-page .library-stat-card {
        min-height: 92px;
        padding: 14px !important;
        border-radius: 18px !important;
        background:
            linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(239, 253, 244, 0.78)),
            var(--card-bg, var(--bg-secondary));
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    }

    body.theme-dark .stats-page .library-stat-card {
        background:
            linear-gradient(160deg, rgba(30, 41, 59, 0.96), rgba(7, 47, 33, 0.38)),
            var(--card-bg, var(--bg-secondary));
        box-shadow: none;
    }

    .stats-page .library-stat-label {
        font-size: 12px;
        line-height: 1.3;
        font-weight: 700;
    }

    .stats-page .library-stat-value {
        margin-top: 7px;
        font-size: 26px;
        line-height: 1.05;
    }

    .stats-page .stats-grid,
    .stats-page .home-section-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .stats-page .home-section {
        padding: 16px !important;
        border-radius: 20px !important;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 251, 255, 0.94)),
            var(--card-bg, var(--bg-secondary));
        box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
    }

    body.theme-dark .stats-page .home-section {
        background:
            linear-gradient(180deg, rgba(30, 41, 59, 0.97), rgba(15, 23, 42, 0.92)),
            var(--card-bg, var(--bg-secondary));
        box-shadow: none;
    }

    .stats-page .section-heading-row {
        align-items: center;
        margin-bottom: 12px;
    }

    .stats-page .section-title {
        font-size: 17px;
        line-height: 1.3;
    }

    .stats-page .section-more-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 34px;
        padding: 0 12px;
        border-radius: 999px;
        border: 1px solid color-mix(in srgb, var(--accent-color) 24%, var(--border-color));
        background: color-mix(in srgb, var(--accent-color) 8%, var(--card-bg, #fff));
        font-size: 12px;
    }

    .stats-page .stats-card-wide {
        grid-column: auto !important;
    }

    .stats-page .mini-bar-chart {
        gap: 2px;
    }

    .stats-page .mini-bar-row {
        grid-template-columns: minmax(0, 1fr) auto !important;
        gap: 7px 10px;
        padding: 10px 0;
        border-bottom: 1px solid color-mix(in srgb, var(--border-color) 72%, transparent);
    }

    .stats-page .mini-bar-row:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .stats-page .mini-bar-label {
        font-size: 13px;
        font-weight: 700;
        color: var(--text-primary);
    }

    .stats-page .mini-bar-row strong {
        min-width: 34px;
        text-align: right;
        color: var(--accent-color);
        font-size: 13px;
    }

    .stats-page .mini-bar-track {
        grid-column: 1 / -1;
        height: 8px;
        background: color-mix(in srgb, var(--accent-color) 8%, var(--bg-tertiary));
    }

    .stats-page .compact-song-grid {
        gap: 9px !important;
    }

    .stats-page .compact-song-card {
        grid-template-columns: 38px 50px minmax(0, 1fr) auto !important;
        gap: 9px !important;
        padding: 10px 8px !important;
        border: 1px solid color-mix(in srgb, var(--border-color) 82%, transparent);
        border-radius: 18px !important;
        background: color-mix(in srgb, var(--card-bg, var(--bg-secondary)) 88%, var(--accent-color) 3%);
    }

    .stats-page .compact-cover {
        width: 50px;
        height: 50px;
        border-radius: 14px;
    }

    .stats-page .compact-play {
        width: 38px !important;
        height: 38px !important;
        border-radius: 999px;
    }

    .stats-page .compact-title {
        font-size: 14px;
        line-height: 1.3;
    }

    .stats-page .compact-song-meta span,
    .stats-page .recommend-reason {
        font-size: 12px;
    }

    .stats-page .compact-song-actions {
        display: grid !important;
        grid-template-columns: repeat(2, 32px);
        min-width: 68px !important;
        gap: 4px !important;
    }

    .stats-page .compact-song-actions .like-btn,
    .stats-page .compact-song-actions .add-next-btn,
    .stats-page .compact-song-actions .add-playlist-btn,
    .stats-page .compact-song-actions .metadata-request-btn {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
    }
}

body.theme-light {
    --bg-primary: #f6f7f8;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eef0f2;
    --accent-color: #00a832;
    --accent-hover: #008f2b;
    --text-primary: #1f2328;
    --text-secondary: #59636e;
    --text-muted: #7d8790;
    --border-color: #d8dee4;
    --player-bg: #ffffff;
    --player-surface: #f6f7f8;
    --player-elevated: #ffffff;
    --player-text: #1f2328;
    --player-muted: #59636e;
    --player-border: #d8dee4;
    --player-progress-bg: #d8dee4;
    --player-button-bg: #1f2328;
    --player-button-text: #ffffff;
}

body.theme-dark,
body.theme-system {
    --bg-primary: #121212;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #242424;
    --accent-color: #2f81f7;
    --accent-hover: #1f6feb;
    --text-primary: #ffffff;
    --text-secondary: #c9d1d9;
    --text-muted: #8b949e;
    --border-color: #30363d;
    --player-bg: #181818;
    --player-surface: #1a1a1a;
    --player-elevated: #121212;
    --player-text: #ffffff;
    --player-muted: #c9d1d9;
    --player-border: #30363d;
    --player-progress-bg: #242424;
    --player-button-bg: #ffffff;
    --player-button-text: #000000;
}

body.theme-melon {
    --bg-primary: #121212;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #242424;
    --accent-color: #00CD3C;
    --accent-hover: #00B334;
    --text-primary: #ffffff;
    --text-secondary: #a7a7a7;
    --text-muted: #6e6e6e;
    --border-color: #2a2a2a;
}

body.theme-black {
    --bg-primary: #050505;
    --bg-secondary: #0d0d0d;
    --bg-tertiary: #171717;
    --accent-color: #f2f2f2;
    --accent-hover: #d8d8d8;
    --text-primary: #f7f7f7;
    --text-secondary: #b8b8b8;
    --text-muted: #777777;
    --border-color: #242424;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    overflow: hidden; /* App layout uses custom scrolls */
    height: 100vh;
}

/* 5th update: library exploration */
.library-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    width: 100%;
    margin: 18px 0 24px;
}

.library-stat-card,
.home-section,
.entity-card,
.genre-card,
.metadata-edit-form {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.library-stat-card {
    padding: 16px;
}

.library-stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 6px;
}

.library-stat-value {
    display: block;
    color: var(--text-primary);
    font-size: 22px;
}

.home-quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 22px 0 28px;
}

.home-section + .home-quick-links {
    margin-top: 26px;
}

.home-quick-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
}

.home-quick-links i {
    color: var(--accent-color);
}

.home-section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.home-section {
    padding: 18px;
    min-width: 0;
}

.section-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.section-title {
    font-size: 18px;
    margin: 0;
}

.section-more-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.compact-song-grid {
    display: grid;
    gap: 10px;
}

.compact-song-card {
    display: grid;
    grid-template-columns: 34px 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.compact-cover {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-tertiary);
}

.compact-play {
    width: 34px;
    height: 34px;
}

.compact-song-meta {
    display: grid;
    gap: 2px;
    min-width: 0;
    color: var(--text-secondary);
    font-size: 12px;
}

.recommend-reason {
    display: block;
    max-width: 100%;
    color: var(--accent-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-title {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.library-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.library-toolbar input,
.library-toolbar select,
.metadata-edit-form input {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    min-height: 40px;
    padding: 0 12px;
}

.library-toolbar input {
    min-width: min(320px, 100%);
    flex: 1;
}

.entity-grid,
.genre-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.entity-grid.small {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.entity-card {
    display: flex;
    gap: 14px;
    padding: 14px;
    color: var(--text-primary);
    text-decoration: none;
    min-width: 0;
}

.entity-cover,
.detail-cover {
    background: var(--bg-tertiary);
    object-fit: cover;
    flex-shrink: 0;
}

.entity-cover {
    width: 72px;
    height: 72px;
    border-radius: 6px;
}

.entity-info {
    min-width: 0;
}

.entity-info h2,
.genre-card h2 {
    font-size: 16px;
    margin: 0 0 6px;
    overflow-wrap: anywhere;
}

.entity-info p,
.entity-info span,
.genre-card p,
.genre-card span {
    color: var(--text-secondary);
    font-size: 13px;
}

.genre-card {
    display: block;
    padding: 18px;
    color: var(--text-primary);
    text-decoration: none;
}

.detail-hero {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    margin-bottom: 24px;
}

.detail-cover {
    width: 190px;
    height: 190px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.detail-kicker {
    color: var(--accent-color);
    font-size: 13px;
    font-weight: 700;
}

.album-intro-section {
    display: grid;
    gap: 14px;
    margin: 0 0 22px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
}

.album-intro-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.album-intro-header h2 {
    margin: 4px 0 0;
    font-size: 20px;
    line-height: 1.25;
    color: var(--text-primary);
}

.album-intro-source {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.album-intro-text {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.75;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.album-intro-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.album-intro-meta span {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.album-intro-meta strong,
.album-intro-tracks > strong {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
}

.album-intro-tracks {
    display: grid;
    gap: 8px;
}

.album-intro-tracks div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.album-intro-tracks a {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
}

.album-intro-tracks a:hover,
.album-intro-tracks a:focus-visible {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.album-intro-editor {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.album-intro-editor summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 700;
}

.album-intro-editor summary::marker {
    content: "";
}

.album-intro-edit-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.album-intro-edit-form label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
}

.album-intro-edit-form textarea {
    width: 100%;
    min-height: 150px;
    resize: vertical;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    line-height: 1.65;
}

.album-intro-edit-form textarea::placeholder {
    color: var(--text-muted);
}

.album-intro-editor-help {
    margin: 0;
    color: var(--text-secondary);
    font-size: 12px;
}

.metadata-edit-form {
    display: grid;
    gap: 14px;
    max-width: 720px;
    padding: 22px;
}

.metadata-edit-form label {
    display: grid;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.metadata-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.metadata-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    margin: 2px;
    border-radius: 999px;
    background: rgba(255, 193, 7, 0.14);
    color: #ffd166;
    font-size: 12px;
    font-weight: 700;
}

.stats-card-link {
    color: inherit;
    text-decoration: none;
}

.queue-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.error-log-console {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
    color: #ff8882;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.6;
    max-height: 260px;
    overflow-y: auto;
}

.list-play-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.song-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.list-cover {
    width: 38px;
    height: 38px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

.song-title-link {
    color: var(--text-primary);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.file-ext-badge {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    padding: 2px 7px;
    border-radius: 5px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
}

.song-action-group {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.empty-list-cell {
    padding: 42px 18px;
}

.empty-list-state i {
    display: block;
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 40px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.settings-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    min-width: 0;
}

.settings-card h2 {
    font-size: 18px;
    margin-bottom: 16px;
}

.settings-card label {
    display: grid;
    gap: 7px;
    margin-bottom: 14px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}

.settings-card input[type="text"],
.settings-card input[type="number"],
.settings-card input[type="color"],
.settings-card input[type="file"],
.settings-card select {
    width: 100%;
    min-height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 0 12px;
}

.settings-card input[type="color"] {
    padding: 4px;
}

.check-row {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 10px !important;
}

.check-row input {
    width: 18px;
    height: 18px;
}

.settings-submit-row {
    grid-column: 1 / -1;
}

.settings-warning {
    color: #ffd166;
    background: rgba(255, 193, 7, 0.12);
    border: 1px solid rgba(255, 193, 7, 0.28);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 14px;
}

.settings-muted {
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.inline-action-form,
.maintenance-actions {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.maintenance-actions .btn,
.inline-action-form .btn {
    justify-content: center;
}

.backup-list {
    display: grid;
    gap: 10px;
}

.backup-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.backup-row small {
    color: var(--text-secondary);
}

.backup-row .btn {
    grid-row: span 2;
}

.settings-log-list {
    display: grid;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
}

.settings-log-row {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.settings-log-row strong,
.settings-log-row span,
.settings-log-row p {
    display: block;
}

.settings-log-row span {
    color: var(--text-secondary);
    font-size: 12px;
    margin: 4px 0;
}

.settings-log-row p {
    color: var(--text-primary);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.btn-danger {
    background: #d1242f;
    border-color: #d1242f;
    color: #fff;
}

body.theme-light .brand-name {
    -webkit-text-fill-color: initial;
    background: none;
    color: var(--text-primary);
}

body.theme-light .song-title-link,
body.theme-light .compact-title {
    color: var(--text-primary);
}

@media (max-width: 640px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .settings-card {
        padding: 16px;
    }

    .backup-row {
        grid-template-columns: 1fr;
    }

    .backup-row .btn {
        grid-row: auto;
        width: 100%;
    }

    body.player-mobile-compact {
        --player-height: 72px;
    }

    body.player-mobile-compact .player-utils,
    body.player-mobile-compact .progress-container {
        display: none;
    }

    body.player-mobile-compact .player-bar {
        min-height: 72px;
    }
}

@media (max-width: 900px) {
    .home-section-grid {
        grid-template-columns: 1fr;
    }

    .detail-hero {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        width: min(220px, 100%);
        height: auto;
        aspect-ratio: 1;
    }

    .album-intro-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .content-body {
        padding: 18px 14px 120px;
    }

    .library-toolbar,
    .list-filter-section,
    .filter-sort-form {
        align-items: stretch;
    }

    .library-toolbar input,
    .library-toolbar select,
    .library-toolbar .btn,
    .filter-sort-form select {
        width: 100%;
    }

    .entity-grid,
    .genre-card-grid {
        grid-template-columns: 1fr;
    }

    .album-intro-section {
        padding: 16px;
        border-radius: 12px;
    }

    .album-intro-header {
        flex-direction: column;
    }

    .album-intro-meta {
        grid-template-columns: 1fr;
    }

    .entity-card {
        align-items: center;
    }

    .compact-song-card {
        grid-template-columns: 34px 42px minmax(0, 1fr);
    }
}

/* App Container Layout */
.app-container {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: 1fr var(--player-height);
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px;
    grid-row: 1 / 2;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 36px;
    padding-left: 8px;
}

.brand-icon {
    font-size: 28px;
    color: var(--accent-color);
    animation: spin 8s linear infinite;
    animation-play-state: paused;
}

.brand-name {
    font-family: var(--font-title);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 30%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu ul {
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.nav-item:hover {
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

.nav-item.active {
    color: var(--text-primary);
    background-color: var(--accent-color);
}

.nav-item.active .nav-icon {
    color: var(--text-primary);
}

.nav-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.sidebar-footer {
    margin-top: auto;
    font-size: 12px;
    color: var(--text-muted);
    padding-left: 16px;
}

/* Main Content Area */
.main-content {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-primary) 300px);
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background-color: color-mix(in srgb, var(--bg-primary) 85%, transparent);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.search-container {
    width: 350px;
}

.search-form {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-form input {
    width: 100%;
    background-color: var(--bg-tertiary);
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 10px 16px 10px 42px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.search-form input:focus {
    border-color: var(--accent-color);
    background-color: var(--bg-secondary);
    box-shadow: 0 0 8px rgba(0, 205, 60, 0.2);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.user-profile:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
    background-color: rgba(255, 255, 255, 0.05);
}

.profile-icon {
    font-size: 18px;
}

/* Content Body */
.content-body {
    padding: 24px 32px 48px 32px;
}

/* Page Headers */
.page-title-section {
    margin-bottom: 28px;
}

.page-main-title {
    font-family: var(--font-title);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 6px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Dashboard & Cards (Admin Scan Page) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stats-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    border-color: #3a3a3a;
}

.card-icon {
    background-color: rgba(0, 205, 60, 0.1);
    color: var(--accent-color);
    font-size: 28px;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.card-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 20px;
    font-weight: 700;
}

.path-value {
    font-size: 14px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 24px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #000;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: scale(1.02);
}

.btn-primary:disabled, .btn-primary.loading {
    background-color: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.scan-action-section {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.scan-status-summary h3 {
    font-size: 16px;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.scan-status-summary .scan-msg {
    color: var(--text-secondary);
    font-size: 14px;
}

.scan-button-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.scan-countdown-info {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Alert Boxes */
.alert-box {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.alert-icon {
    font-size: 24px;
}

.alert-content h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.alert-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff6b76;
}

.alert-info {
    background-color: rgba(13, 110, 253, 0.1);
    border: 1px solid rgba(13, 110, 253, 0.3);
    color: #6ea8fe;
}

.current-path-info {
    margin-top: 8px;
}

.current-path-info span {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: #fff;
}

/* Tables & Lists */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.data-table th, .data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table th {
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--text-secondary);
    font-weight: 600;
}

.data-table tbody tr {
    transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.data-table tbody tr.playing {
    background-color: rgba(0, 205, 60, 0.05);
}

.data-table tbody tr.playing td {
    color: var(--accent-color);
}

.text-center {
    text-align: center;
}

.text-success { color: var(--accent-color); }
.text-info { color: #0d6efd; }
.text-warning { color: #ffc107; }

.log-message-td {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* List controls (Index page list styling) */
.list-filter-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-left {
    display: flex;
    gap: 12px;
}

.filter-tab {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.filter-tab:hover, .filter-tab.active {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

.filter-tab.active {
    border-bottom: 2px solid var(--accent-color);
    border-radius: 4px 4px 0 0;
}

.sort-select-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.sort-select {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

/* Music play button styling */
.play-row-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.play-row-btn:hover {
    color: var(--accent-color);
    background-color: rgba(0, 205, 60, 0.1);
    transform: scale(1.1);
}

tr.playing .play-row-btn {
    color: var(--accent-color);
    background-color: rgba(0, 205, 60, 0.1);
}

/* Bottom Player Bar */
.player-bar {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    background-color: #181818;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 100;
}

/* Left part: Song info */
.player-song-info {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 30%;
    min-width: 180px;
}

.player-album-art {
    width: 56px;
    height: 56px;
    background-color: var(--bg-tertiary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.player-album-art.playing {
    border-color: var(--accent-color);
    animation: pulse 2s infinite;
}

.player-song-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.player-song-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.player-song-artist {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Center part: Controls & Progress */
.player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 40%;
    max-width: 600px;
}

.control-buttons {
    display: flex;
    align-items: center;
    gap: 24px;
}

.control-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    color: var(--text-primary);
}

.play-btn {
    width: 36px;
    height: 36px;
    background-color: #fff;
    color: #000;
    border-radius: 50%;
    font-size: 14px;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.play-btn:hover {
    transform: scale(1.05);
    background-color: var(--accent-color);
    color: #000;
}

/* Progress bar */
.progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.time-label {
    font-size: 11px;
    color: var(--text-secondary);
    min-width: 35px;
    text-align: center;
}

.progress-bar-wrapper {
    flex: 1;
    height: 4px;
    background-color: var(--bg-tertiary);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.progress-bar-wrapper:hover .progress-bar {
    background-color: var(--accent-color);
}

.progress-bar-wrapper:hover .progress-handle {
    opacity: 1;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--text-primary);
    border-radius: 2px;
    position: relative;
    transition: background-color 0.1s ease;
}

.progress-handle {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.1s ease;
}

/* Right part: Utils & Volume */
.player-utils {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 30%;
    justify-content: flex-end;
}

.volume-icon {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
    width: 18px;
    text-align: center;
}

.volume-icon:hover {
    color: var(--text-primary);
}

.volume-slider-wrapper {
    width: 100px;
    height: 4px;
    background-color: var(--bg-tertiary);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
}

.volume-slider {
    height: 100%;
    width: 100%; /* Default volume 100% */
    background-color: var(--text-secondary);
    border-radius: 2px;
    transition: background-color 0.2s ease;
}

.volume-slider-wrapper:hover .volume-slider {
    background-color: var(--accent-color);
}

/* Keyframes & Animations */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 205, 60, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(0, 205, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 205, 60, 0); }
}

.spinner-icon {
    animation: spin 1s linear infinite;
}

/* Responsive design */
@media (max-width: 900px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none; /* Hide sidebar on small mobile, can implement slide later */
    }
    
    .main-content {
        grid-column: 1 / 2;
    }
    
    .player-bar {
        padding: 0 16px;
    }
    
    .player-song-info {
        width: 35%;
    }
    
    .player-controls {
        width: 45%;
    }
    
    .player-utils {
        width: 20%;
    }
    
    .volume-slider-wrapper {
        width: 60px;
    }
}

@media (max-width: 600px) {
    .player-song-info {
        width: 50%;
    }
    .player-controls {
        width: 50%;
    }
    .player-utils {
        display: none; /* Hide volume on extra small screens */
    }
    .top-bar {
        padding: 12px 16px;
    }
    .content-body {
        padding: 16px;
    }
    .search-container {
        width: 200px;
    }
}

/* 2李??낅뜲?댄듃 異붽? ?ㅽ???*/

/* ?뷀뵆, 諛섎났 ?ъ깮 ?쒖꽦???곹깭 ?ㅽ???*/
.control-btn.active {
    color: var(--accent-color) !important;
}

/* 醫뗭븘???섑듃 踰꾪듉 */
.like-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.like-btn:hover {
    color: #ff3b30; /* Red on hover */
    background-color: rgba(255, 59, 48, 0.1);
    transform: scale(1.1);
}

.like-btn.liked {
    color: #ff3b30;
}

/* ?뚮젅?대━?ㅽ듃 異붽? 踰꾪듉 */
.add-playlist-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.add-playlist-btn:hover {
    color: var(--accent-color);
    background-color: rgba(0, 205, 60, 0.1);
    transform: scale(1.1);
}

/* 紐⑤떖 ?앹뾽 ?ㅽ???*/
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.modal-box {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 700;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

.modal-content {
    padding: 20px;
    max-height: 350px;
    overflow-y: auto;
}

/* 紐⑤떖 ???뚮젅?대━?ㅽ듃 ?듭뀡 由ъ뒪??*/
.playlist-selection-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.playlist-option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: var(--bg-tertiary);
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.playlist-option-item:hover {
    border-color: var(--accent-color);
    background-color: rgba(0, 205, 60, 0.05);
}

.playlist-option-name {
    font-size: 14px;
    font-weight: 500;
}

.playlist-option-count {
    font-size: 12px;
    color: var(--text-muted);
}

.loading-text, .empty-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 20px 0;
}

/* 異붽??곸씤 踰꾪듉 ?ㅽ???*/
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 16px;
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-secondary);
    border-color: var(--text-secondary);
}

.btn-danger {
    background-color: #ff3b30;
    color: #fff;
}

.btn-danger:hover {
    background-color: #e03126;
    transform: scale(1.02);
}

/* ?낅젰 ?꾨뱶 怨듯넻 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    border-color: var(--accent-color);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.actions-row {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* 紐⑤컮??諛섏쓳???믪씠 蹂댁젙 */
.content-body {
    padding-bottom: 140px; /* ?명꽣 ?뚮젅?댁뼱 諛붽? 蹂몃Ц????? ?딅룄濡??섎떒 ?ㅽ럹?댁떛 ?됰꼮???뺣낫 */
}

/* 3李?諛섏쓳??UI ?낅뜲?댄듃 */

/* ?꾨쾭嫄?踰꾪듉 湲곕낯媛?(?곗뒪?ы넲 諛??쒕툝由우뿉?쒕뒗 誘몃끂異? */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    margin-right: 12px;
    transition: color 0.2s ease;
}

.mobile-menu-btn:hover {
    color: var(--accent-color);
}

/* ?ъ씠?쒕컮 ?ㅻ쾭?덉씠 湲곕낯媛?*/
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.open {
    display: block;
    opacity: 1;
}

/* ?뚮젅?댁뼱 ?⑤쾾?꾪듃 ?대?吏 ?ㅽ??쇰쭅 */
.player-album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   諛섏쓳??誘몃뵒??荑쇰━ 援ш컙 ?뺤쓽 (紐⑤컮?? ~767px / ?쒕툝由? 768~1023px / PC: 1024px~)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 紐⑤컮??(360px ~ 767px)
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
    /* ?덉씠?꾩썐 援ъ“ ?댁젣 */
    .app-container {
        grid-template-columns: 1fr; /* ?ъ씠?쒕컮瑜?洹몃━?쒖뿉??諛곗젣 */
    }
    
    /* ?ъ씠?쒕컮瑜??щ씪?대뱶 ?ㅻ쾭 Drawer 硫붾돱濡?媛뺤젣 ?꾪솚 */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 260px;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.5);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        grid-column: 1 / 2;
    }
    
    /* ?곷떒 諛????꾨쾭嫄?踰꾪듉 ?몄텧 */
    .mobile-menu-btn {
        display: block;
    }
    
    .top-bar {
        padding: 12px 16px;
        justify-content: flex-start;
        gap: 8px;
    }
    
    .search-container {
        flex: 1;
        width: auto;
    }
    
    .user-profile {
        padding: 6px;
        border: none;
    }
    
    .user-profile span {
        display: none; /* 紐⑤컮???꾨줈???띿뒪??媛먯땄 */
    }
    
    .content-body {
        padding: 16px;
    }
    
    /* ??쒕낫??洹몃━??1??怨좎젙 */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* ---------------------------------------------------------
       ??以묒슂: ?뚯븙 紐⑸줉 ?뚯씠釉?-> 紐⑤컮???꾩슜 移대뱶 酉??꾪솚
       --------------------------------------------------------- */
    .table-container {
        border: none;
        background: none;
    }
    
    .data-table, 
    .data-table thead, 
    .data-table tbody, 
    .data-table tr, 
    .data-table td {
        display: block;
    }
    
    .data-table thead {
        display: none; /* ?뚯씠釉??ㅻ뜑 ?ㅻ뱶 ?④? */
    }
    
    .data-table tbody tr.song-item {
        background-color: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 12px;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        position: relative;
        gap: 12px;
        transition: transform 0.2s ease, border-color 0.2s ease;
    }
    
    .data-table tbody tr.song-item:hover {
        border-color: #3a3a3a;
        transform: translateY(-2px);
    }
    
    .data-table tbody tr.song-item.playing {
        border-color: var(--accent-color);
        background-color: rgba(0, 205, 60, 0.03);
    }
    
    /* 媛쒕퀎 ? ?덉씠?꾩썐 媛쒗렪 */
    .data-table td {
        padding: 0 !important;
        border-bottom: none;
        white-space: normal;
    }
    
    /* ?쒖쐞 ?쒖떆 ?④? ?뱀? ?꾩튂議곗젙 */
    .data-table td:nth-child(1) {
        /* 泥?????쒖쐞(show_rank)?????뱀? ?ъ깮 踰꾪듉????*/
    }
    
    /* 1. ?ъ깮 踰꾪듉 ?곸뿭 */
    .data-table tr.song-item td:has(.play-row-btn) {
        order: 1;
        display: flex;
        align-items: center;
    }
    
    /* 2. 怨〓챸 諛??곸꽭 ?뺣낫 蹂듯빀 諛곗튂 */
    .data-table tr.song-item td:nth-child(2),
    .data-table tr.song-item td:nth-child(3) {
        /* ??援ъ“?먯꽌??怨듯넻 ?쒗뵆由우쓽 td ?몃뜳?ㅻ? ?ъ슜?섎?濡??ㅼ쓬怨?媛숈씠 ?뺣젹 */
    }
    
    /* 怨?移대뱶 ?덉씠?꾩썐???꾪븳 而ㅼ뒪? 援ъ“??*/
    .data-table tr.song-item {
        flex-direction: row;
        justify-content: flex-start;
    }
    
    /* 泥?踰덉㎏ ?? ?쒖쐞 ?뱀? ?ъ깮 踰꾪듉 */
    .data-table tr.song-item td.text-center:first-child {
        order: 1;
        font-size: 16px;
        font-weight: 700;
        min-width: 24px;
    }
    
    /* ?ъ깮 踰꾪듉 */
    .data-table tr.song-item td:has(.play-row-btn) {
        order: 2;
    }
    
    /* 怨??뺣낫 ?곸뿭 (?쒕ぉ + ?꾪떚?ㅽ듃) */
    .data-table tr.song-item td:nth-of-type(3) { /* 怨〓챸 */
        order: 3;
        flex: 1;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .data-table tr.song-item td:nth-of-type(4) { /* ?꾪떚?ㅽ듃 */
        order: 4;
        font-size: 13px;
        color: var(--text-secondary);
        margin-right: auto;
        padding-left: 8px !important;
    }
    
    /* 紐⑤컮?쇱뿉???⑤쾾, ?λⅤ, ?뺤옣??????以묒슂???댁? ?붾㈃ 怨듦컙???꾪빐 怨쇨컧??媛먯땄 */
    .data-table tr.song-item td:nth-of-type(5), /* ?⑤쾾 */
    .data-table tr.song-item td:nth-of-type(6), /* ?λⅤ */
    .data-table tr.song-item td:nth-of-type(8)  /* ?щ㎎ */ {
        display: none !important;
    }
    
    /* ?ъ깮?쒓컙 */
    .data-table tr.song-item td:nth-of-type(7) {
        order: 5;
        font-size: 12px;
        color: var(--text-muted);
        margin-left: 8px;
    }
    
    /* ?ъ깮 ?잛닔 */
    .data-table tr.song-item td.play-count-td {
        display: none !important; /* 紐⑤컮??紐⑸줉?먯꽌???ъ깮 ?잛닔 ?쒖쇅 */
    }
    
    /* 愿由?踰꾪듉 ?곸뿭 (醫뗭븘?? 異붽?, ?쒓굅) */
    .data-table tr.song-item td:last-child {
        order: 6;
        margin-left: auto;
        display: flex;
        gap: 4px;
    }
    
    .data-table tr.song-item .like-btn,
    .data-table tr.song-item .add-playlist-btn,
    .data-table tr.song-item .remove-playlist-song-btn {
        width: 36px;
        height: 36px; /* 紐⑤컮???곗튂 ????ш린 ?곹뼢 */
        font-size: 16px;
    }
    
    /* ---------------------------------------------------------
       ?섎떒 怨좎젙 ?뚮젅?댁뼱 紐⑤컮??理쒖쟻??       --------------------------------------------------------- */
    .player-bar {
        padding: 0 16px;
        height: 80px;
        gap: 12px;
    }
    
    .player-song-info {
        width: 45%;
        min-width: 0;
        gap: 10px;
    }
    
    .player-album-art {
        width: 44px;
        height: 44px;
    }
    
    .player-song-title {
        font-size: 13px;
    }
    
    .player-song-artist {
        font-size: 11px;
    }
    
    .player-controls {
        width: 55%;
        gap: 4px;
    }
    
    .control-buttons {
        gap: 12px;
    }
    
    /* 紐⑤컮?쇱뿉?쒕뒗 ?쒕뜡/諛섎났??而⑦듃濡ㅻ윭?먯꽌 ?④꺼 ?ㅼ옉???곗튂 諛⑹? */
    #btn-shuffle,
    #btn-repeat {
        display: none !important;
    }
    
    .progress-container {
        width: 100%;
        gap: 6px;
    }
    
    .time-label {
        font-size: 9px;
        min-width: auto;
    }
    
    .player-utils {
        display: none !important; /* 紐⑤컮??蹂쇰ⅷ 而⑦듃濡ㅻ윭 ?쒖쇅 */
    }
    
    /* 愿由ъ옄 ?ㅼ틪 ??쒕낫???ㅼ틪 ?≪뀡 ?뱀뀡 */
    .scan-action-section {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }
    
    .scan-button-group {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 10px;
    }
    
    .scan-countdown-info {
        text-align: center;
    }
    
    /* ?뚮젅?대━?ㅽ듃 紐⑸줉 1???뺣젹 */
    .playlists-page .data-table tr {
        background-color: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 12px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .playlists-page .data-table tr td {
        display: block;
        padding: 0 !important;
        text-align: left;
    }
    
    .playlists-page .data-table tr td.text-center {
        text-align: left;
    }
    
    /* 紐⑤떖 ?앹뾽 ?덈퉬 蹂댁젙 */
    .modal-box {
        width: 95%;
        margin: 0 10px;
    }
}

/* ----------------------------------------------------------
   2. ?쒕툝由?(768px ~ 1023px)
   ---------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 1023px) {
    /* ?쒕툝由?誘몃땲硫 ?ъ씠?쒕컮 蹂??*/
    :root {
        --sidebar-width: 80px;
    }
    
    .sidebar {
        padding: 20px 8px;
    }
    
    .brand-name, 
    .nav-item span, 
    .sidebar-footer {
        display: none; /* ?ъ씠?쒕컮 ?꾩씠肄섎쭔 ?몄텧 */
    }
    
    .brand {
        justify-content: center;
        padding-left: 0;
        margin-bottom: 24px;
    }
    
    .brand-icon {
        font-size: 24px;
    }
    
    .nav-item {
        justify-content: center;
        padding: 12px;
    }
    
    .nav-icon {
        font-size: 20px;
    }
    
    .top-bar {
        padding: 16px 20px;
    }
    
    .content-body {
        padding: 20px;
    }
    
    /* ?쒕툝由우슜 ?뚮젅?댁뼱 諛??щ갚 */
    .player-bar {
        padding: 0 20px;
    }
    
    .player-song-info {
        width: 25%;
    }
    
    .player-controls {
        width: 50%;
    }
    
    .player-utils {
        width: 25%;
    }
    
    .volume-slider-wrapper {
        width: 80px;
    }
}

/* ----------------------------------------------------------
   3. ?곗뒪?ы넲 (1024px ?댁긽)
   ---------------------------------------------------------- */
@media (min-width: 1024px) {
    /* 1李? 2李⑥쓽 湲곕낯 怨좎궗???덉씠?꾩썐 ?좎? */
    .app-container {
        grid-template-columns: var(--sidebar-width) 1fr;
    }
}

/* 4李??湲곗뿴 諛??뺤옣 ?뚮젅?댁뼱 ?ㅽ???異붽? */

/* 1. ?ъ깮 ?湲곗뿴(Queue) ?ъ씠???⑤꼸 */
.queue-panel {
    position: fixed;
    right: 0;
    bottom: 90px;
    width: 400px;
    height: 580px;
    background-color: #121212;
    border-left: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    border-top-left-radius: 16px;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
    z-index: 1002;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: #1a1a1a;
}

.queue-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

/* ?湲곗뿴 由ъ뒪??怨??꾩씠??*/
.queue-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: background-color 0.2s ease;
    gap: 12px;
}

.queue-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.queue-item.active {
    background-color: rgba(0, 205, 60, 0.08);
}

.queue-item-thumb {
    width: 38px;
    height: 38px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.queue-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.queue-item-meta {
    flex: 1;
    min-width: 0;
}

.queue-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.queue-item.active .queue-item-title {
    color: var(--accent-color);
}

.queue-item-artist {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-item-duration {
    font-size: 11px;
    color: var(--text-muted);
}

.queue-item-order {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    justify-content: center;
}

.queue-item-move {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-soft, var(--bg-secondary));
    color: var(--text-secondary);
    font-size: 10px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.queue-item-move:hover:not(:disabled),
.queue-item-move:focus-visible {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-color) 8%, var(--surface-soft, var(--bg-secondary)));
}

.queue-item-move:disabled {
    cursor: default;
    opacity: 0.35;
}

/* Search result category cards */
.search-category-grid .home-section {
    min-width: 0;
    overflow: hidden;
}

.search-category-grid .explore-card-grid,
.search-category-grid .album-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    align-items: stretch;
}

.search-category-grid .explore-card,
.search-category-grid .album-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 8px 12px;
    align-items: center;
    min-width: 0;
    min-height: 96px;
    padding: 14px;
    border: 1px solid var(--ui-border, var(--border-color));
    border-radius: var(--ui-radius-md, 8px);
    background: var(--ui-card-bg, var(--card-bg));
    color: var(--text-color);
    text-decoration: none;
    box-shadow: var(--ui-shadow-sm, none);
}

.search-category-grid .explore-card:hover,
.search-category-grid .album-card:hover {
    border-color: color-mix(in srgb, var(--accent-color) 42%, var(--ui-border, var(--border-color)));
    color: var(--text-color);
    text-decoration: none;
    box-shadow: var(--ui-shadow-md, 0 10px 22px rgba(0, 0, 0, 0.08));
}

.search-category-grid .explore-card img,
.search-category-grid .album-card-cover {
    grid-row: 1 / span 2;
    width: 64px !important;
    height: 64px !important;
    max-width: 64px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--surface-soft, var(--bg-tertiary));
}

.search-category-grid .explore-card strong,
.search-category-grid .album-card strong {
    min-width: 0;
    overflow: hidden;
    color: var(--text-color);
    font-size: 15px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-category-grid .explore-card span,
.search-category-grid .album-card span {
    min-width: 0;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-category-grid .tag-cloud {
    align-items: flex-start;
    min-height: 64px;
}

.search-category-grid .empty-text {
    width: 100%;
    margin: 8px 0 0;
    color: var(--text-muted);
    text-align: center;
}

@media (max-width: 767px) {
    .search-category-grid .explore-card-grid,
    .search-category-grid .album-card-grid {
        grid-template-columns: 1fr;
    }
}

/* Search page polish */
.enhanced-search-page {
    display: grid;
    gap: 18px;
}

.enhanced-search-page .page-title-section {
    margin-bottom: 0;
}

.enhanced-search-page .search-page-form {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--ui-border, var(--border-color));
    border-radius: 18px;
    background: var(--ui-card-bg, var(--card-bg));
    box-shadow: var(--ui-shadow-sm, 0 8px 20px rgba(15, 23, 42, 0.06));
}

.enhanced-search-page .search-page-form > i {
    color: var(--text-muted);
    font-size: 18px;
}

.enhanced-search-page .search-page-form input {
    min-width: 0;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--text-color);
    font-size: 16px;
    outline: none;
}

.enhanced-search-page .search-page-form input::placeholder {
    color: var(--text-muted);
}

.enhanced-search-page .search-page-form:focus-within {
    border-color: color-mix(in srgb, var(--accent-color) 42%, var(--ui-border, var(--border-color)));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-color) 13%, transparent);
}

.enhanced-search-page .advanced-filter-panel,
.enhanced-search-page .search-recent-panel,
.enhanced-search-page .home-section {
    border: 1px solid var(--ui-border, var(--border-color));
    border-radius: 16px;
    background: var(--ui-card-bg, var(--card-bg));
    box-shadow: var(--ui-shadow-sm, 0 8px 22px rgba(15, 23, 42, 0.06));
}

.enhanced-search-page .advanced-filter-panel {
    margin: 0;
}

.enhanced-search-page .advanced-filter-panel summary {
    min-height: 42px;
    color: var(--text-color);
}

.enhanced-search-page .filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.enhanced-search-page .filter-grid label {
    font-size: 13px;
    color: var(--text-secondary);
}

.enhanced-search-page .filter-grid .form-control {
    min-height: 42px;
}

.enhanced-search-page .filter-check-row {
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--surface-soft, var(--bg-secondary));
}

.enhanced-search-page .active-filter-badges {
    margin-top: -4px;
}

.enhanced-search-page .filter-badge {
    background: color-mix(in srgb, var(--accent-color) 8%, var(--ui-card-bg, var(--card-bg)));
    border-color: color-mix(in srgb, var(--accent-color) 24%, var(--ui-border, var(--border-color)));
}

.enhanced-search-page .section-heading-row {
    gap: 12px;
    align-items: flex-start;
}

.enhanced-search-page .section-title {
    margin: 0;
}

.enhanced-search-page .settings-muted {
    white-space: nowrap;
}

.enhanced-search-page .song-list-container {
    margin-top: 12px;
    overflow-x: auto;
    border: 1px solid var(--ui-border, var(--border-color));
    border-radius: 14px;
    background: var(--ui-card-bg, var(--card-bg));
}

.enhanced-search-page .song-table {
    min-width: 860px;
    border-collapse: separate;
    border-spacing: 0;
}

.enhanced-search-page .song-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--surface-soft, var(--bg-secondary));
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 800;
}

.enhanced-search-page .song-table td,
.enhanced-search-page .song-table th {
    padding: 14px 12px;
}

.enhanced-search-page .song-title-wrap {
    min-width: 240px;
}

.enhanced-search-page .song-title-link {
    color: var(--text-color);
    font-weight: 800;
    text-decoration: none;
}

.enhanced-search-page .song-title-link:hover,
.enhanced-search-page .song-title-link:focus-visible {
    color: var(--accent-color);
    text-decoration: underline;
}

.enhanced-search-page .song-action-group {
    justify-content: center;
}

.search-category-grid {
    align-items: stretch;
}

.search-category-grid .home-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
}

.search-category-grid .section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
}

.search-category-grid .explore-card-grid,
.search-category-grid .album-card-grid {
    grid-template-columns: 1fr;
    gap: 10px;
}

.search-category-grid .explore-card,
.search-category-grid .album-card {
    grid-template-columns: 72px minmax(0, 1fr);
    min-height: 92px;
    padding: 12px;
    border-radius: 14px;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.search-category-grid .explore-card:hover,
.search-category-grid .album-card:hover,
.search-category-grid .explore-card:focus-visible,
.search-category-grid .album-card:focus-visible {
    transform: translateY(-1px);
}

.search-category-grid .explore-card img,
.search-category-grid .album-card-cover {
    width: 72px !important;
    height: 72px !important;
    max-width: 72px;
    border-radius: 12px;
}

.search-category-grid .explore-card strong,
.search-category-grid .album-card strong {
    font-size: 15px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.search-category-grid .explore-card span,
.search-category-grid .album-card span {
    white-space: normal;
    overflow-wrap: anywhere;
}

.search-category-grid .tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-category-grid .tag-badge {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 768px) and (max-width: 1199px) {
    .enhanced-search-page .filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .search-category-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .enhanced-search-page {
        gap: 14px;
    }

    .enhanced-search-page .search-page-form {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 10px 12px;
    }

    .enhanced-search-page .search-page-form .btn {
        grid-column: 1 / -1;
        width: 100%;
    }

    .enhanced-search-page .filter-grid,
    .search-category-grid {
        grid-template-columns: 1fr;
    }

    .enhanced-search-page .filter-check-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .enhanced-search-page .section-heading-row {
        align-items: flex-start;
    }

    .enhanced-search-page .settings-muted {
        white-space: normal;
    }

    .enhanced-search-page .song-list-container {
        margin-left: -2px;
        margin-right: -2px;
    }

    .search-category-grid .home-section {
        padding: 14px;
    }
}

.queue-item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    padding: 6px;
    transition: color 0.2s ease;
}

.queue-item-remove:hover {
    color: #ff3b30;
}

/* ?湲곗뿴 鍮꾩뼱?덉쓣 ??*/
.queue-empty-text {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 60px 20px;
    font-size: 13px;
}


/* 2. ?꾩껜 ?붾㈃ ?뺤옣 ?뚮젅?댁뼱 紐⑤떖 */
.expand-player-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(10, 10, 10, 0.96);
    backdrop-filter: blur(20px);
    z-index: 1005;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInExpand 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.expand-player-container {
    width: 100%;
    max-width: 900px;
    height: 100%;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    padding: 40px;
    position: relative;
}

.expand-close {
    position: absolute;
    top: 24px;
    left: 40px;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s ease;
    z-index: 10;
}

.expand-close:hover {
    transform: translateY(2px);
    color: var(--accent-color);
}

/* ?뚮젅?댁뼱 蹂몄껜 */
.expand-player-main {
    flex: 1;
    display: flex;
    gap: 48px;
    margin-top: 30px;
    align-items: center;
    min-height: 0; /* flex ?먯떇 ?ㅽ겕濡??곸뿭???꾪빐 以묒슂 */
}

/* 醫뚯륫: ????⑤쾾?꾪듃 ?됱뀡 */
.expand-art-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.expand-album-art {
    width: 280px;
    height: 280px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 24px;
}

.expand-album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.expand-song-meta h2 {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    line-height: 1.3;
}

.expand-song-meta p {
    font-size: 15px;
    color: var(--accent-color);
    margin: 0;
}

/* ?곗륫: 硫?????곸뿭 (?湲곗뿴/媛?? */
.expand-tab-section {
    flex: 1;
    height: 100%;
    max-height: 480px;
    display: flex;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

.expand-tab-headers {
    display: flex;
    background-color: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--border-color);
}

.tab-header-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

.tab-header-btn:hover {
    color: #fff;
}

.tab-header-btn.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    background-color: rgba(255,255,255,0.01);
}

.expand-tab-content {
    flex: 1;
    overflow-y: auto;
    display: none;
}

.expand-tab-content.active {
    display: block;
}

/* ?湲곗뿴 ???댁슜 */
#expand-queue-list .queue-item {
    padding: 12px 20px;
}

/* 媛?????댁슜 */
.expand-lyrics-full-text {
    padding: 24px;
    height: 100%;
    overflow-y: auto;
    text-align: left;
    color: var(--player-text, var(--text-primary));
    font-size: 14px;
    line-height: 1.9;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.expand-lyrics-full-text .queue-empty-text {
    margin: 0 0 14px;
    text-align: center;
}

.expand-lyrics-full-text .lyrics-edit-inline-link {
    display: inline-flex;
    margin: 6px auto 0;
    min-height: 40px;
}

.tab-header-btn.has-lyrics,
.expand-player-container .control-btn.has-lyrics,
#expand-btn-lyrics-toggle.has-lyrics {
    color: var(--accent-color);
    border-color: color-mix(in srgb, var(--accent-color) 36%, var(--player-border, var(--border-color)));
}

.tab-header-btn.no-lyrics,
#expand-btn-lyrics-toggle.no-lyrics {
    color: var(--player-muted, var(--text-secondary));
}

/* ?섎떒 ?뚮젅???쒖뼱 ?μ튂 */
.expand-player-controls {
    margin-top: 30px;
}

.expand-player-controls .progress-container {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 700px;
    margin: 0 auto 24px;
}

.expand-player-controls .progress-bar-wrapper {
    flex: 1;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.expand-player-controls .progress-bar {
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 3px;
    position: relative;
    width: 0%;
}

.expand-player-controls .progress-handle {
    position: absolute;
    right: -6px;
    top: -4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
    display: none;
}

.expand-player-controls .progress-bar-wrapper:hover .progress-handle {
    display: block;
}

.expand-control-buttons-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    margin-bottom: 24px;
}

.expand-control-buttons-row .play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #fff;
    color: #000;
    border: none;
    font-size: 22px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.2s ease;
}

.expand-control-buttons-row .play-btn:hover {
    transform: scale(1.05);
}

.expand-actions-row {
    display: flex;
    justify-content: center;
    gap: 12px;
}


/* ==========================================================================
   ?좊땲硫붿씠???④낵
   ========================================================================== */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes fadeInExpand {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* ==========================================================================
   諛섏쓳??異붽? 蹂댁셿 (紐⑤컮???섍꼍?먯꽌???뺤옣 ?뚮젅?댁뼱 ?꾩껜?붾㈃)
   ========================================================================== */
@media (max-width: 767px) {
    /* 紐⑤컮?쇱뿉?쒕뒗 ?湲곗뿴 ?⑤꼸???섎떒諛??꾧? ?꾨땶 ?꾩껜?붾㈃ 紐⑤떖濡?蹂??*/
    .queue-panel {
        bottom: 0;
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        z-index: 1006;
    }
    
    /* 紐⑤컮???뺤옣 ?뚮젅?댁뼱 理쒖쟻??*/
    .expand-player-overlay {
        z-index: 1007; /* ?湲곗뿴 ?꾩뿉 ?щ씪?????*/
    }
    
    .expand-player-container {
        padding: 20px;
        max-height: 100%;
        justify-content: space-between;
    }
    
    .expand-close {
        top: 20px;
        left: 20px;
    }
    
    .expand-player-main {
        flex-direction: column;
        gap: 20px;
        margin-top: 40px;
        overflow-y: auto;
    }
    
    .expand-art-section {
        width: 100%;
    }
    
    .expand-album-art {
        width: 200px;
        height: 200px;
        margin-bottom: 16px;
    }
    
    .expand-song-meta h2 {
        font-size: 18px;
    }
    
    .expand-song-meta p {
        font-size: 13px;
    }
    
    .expand-tab-section {
        width: 100%;
        height: 240px;
        min-height: 200px;
    }
    
    .expand-control-buttons-row {
        gap: 16px;
        margin-bottom: 16px;
    }
    
    .expand-control-buttons-row .play-btn {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    
    .expand-actions-row {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ==========================================================================
   9李? 洹몃９???ъ씠?쒕컮, 紐⑤컮??硫붾돱, 愿由???쒕낫??   ========================================================================== */
.sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.sidebar-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 12px 96px;
    scrollbar-width: thin;
}

.sidebar-search-form {
    display: grid;
    grid-template-columns: 18px 1fr 32px;
    align-items: center;
    gap: 8px;
    margin: 4px 0 14px;
    padding: 8px 8px 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-secondary);
}

.sidebar-search-form input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-color);
    font-size: 13px;
}

.sidebar-search-form button {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 7px;
    background: var(--accent-color);
    color: #fff;
    cursor: pointer;
}

.sidebar-single-menu,
.menu-group-items {
    display: grid;
    gap: 3px;
}

.menu-group {
    margin-top: 12px;
}

.menu-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    cursor: pointer;
}

.menu-group-toggle i {
    transition: transform 0.18s ease;
    font-size: 11px;
}

.menu-group.collapsed .menu-group-toggle i {
    transform: rotate(-90deg);
}

.menu-group.collapsed .menu-group-items {
    display: none;
}

.nav-item {
    min-height: 40px;
    border-radius: 8px;
    gap: 10px;
}

.nav-item .nav-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-item.active {
    background: color-mix(in srgb, var(--accent-color) 16%, transparent);
    color: var(--accent-color);
    font-weight: 800;
}

.nav-item.active .nav-icon {
    color: var(--accent-color);
}

.sidebar-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.sidebar-quick-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-color);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

.sidebar-quick-actions a:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.sidebar-compact {
    --sidebar-width: 92px;
}

.sidebar-compact .brand-name,
.sidebar-compact .sidebar-search-form,
.sidebar-compact .menu-group-toggle span,
.sidebar-compact .nav-label,
.sidebar-compact .sidebar-footer,
.sidebar-compact .sidebar-quick-actions span {
    display: none;
}

.sidebar-compact .sidebar-scroll {
    padding-left: 8px;
    padding-right: 8px;
}

.sidebar-compact .nav-item {
    justify-content: center;
    padding: 12px;
}

.sidebar-compact .menu-group-toggle {
    justify-content: center;
}

.sidebar-compact .sidebar-quick-actions {
    grid-template-columns: 1fr;
}

.dashboard-quick-actions,
.admin-card-grid,
.missing-file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.missing-file-grid {
    display: none;
}

.quick-action-card,
.admin-hub-card,
.missing-file-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-color);
    text-decoration: none;
    min-width: 0;
}

.quick-action-card:hover,
.admin-hub-card:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.quick-action-card i,
.admin-hub-card i {
    font-size: 20px;
}

.quick-action-card strong,
.admin-hub-card strong,
.missing-file-card strong {
    overflow-wrap: anywhere;
}

.admin-center-menu-section {
    display: grid;
    gap: 18px;
}

.admin-center-menu-head {
    align-items: center;
}

.admin-center-search {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: min(340px, 100%);
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--input-bg);
    color: var(--text-muted);
}

.admin-center-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-color);
    font: inherit;
}

.admin-center-sections,
.admin-center-section {
    display: grid;
    gap: 14px;
}

.admin-center-section {
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface-soft) 74%, var(--card-bg));
}

.admin-center-section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.admin-center-section-title strong {
    color: var(--text-primary);
    font-size: 1rem;
}

.admin-center-section-title span {
    color: var(--text-muted);
    font-size: 0.88rem;
    overflow-wrap: anywhere;
}

.admin-center-empty {
    margin: 0;
}

.admin-alert-list,
.admin-log-list {
    display: grid;
    gap: 10px;
}

.admin-log-row,
.admin-alert-row {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
}

.admin-alert-row strong,
.admin-log-row strong {
    display: block;
    margin-bottom: 4px;
}

.admin-log-row.compact {
    padding: 10px;
}

.admin-log-row p,
.admin-log-row small {
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.admin-log-row small {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    line-height: 1.45;
}

.admin-issue-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.admin-issue-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--card-bg);
    box-shadow: var(--shadow-soft);
}

.admin-issue-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.admin-issue-card-head strong {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    overflow-wrap: anywhere;
}

.admin-issue-card-head i {
    color: var(--accent-color);
}

.admin-issue-card-head a {
    flex: 0 0 auto;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
}

.admin-issue-card .empty-text {
    margin: 0;
    padding: 14px;
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    background: var(--surface-soft);
}

.duplicate-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.duplicate-guide-grid > div {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface-soft);
}

.duplicate-guide-grid strong,
.duplicate-guide-grid span {
    display: block;
    overflow-wrap: anywhere;
}

.duplicate-guide-grid span {
    margin-top: 6px;
    color: var(--text-muted);
    line-height: 1.5;
}

.duplicate-manage-form {
    display: grid;
    gap: 12px;
}

.duplicate-actions {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface-soft) 78%, var(--card-bg));
}

.duplicate-action-help {
    min-width: 0;
}

.duplicate-action-help .settings-muted {
    display: block;
    line-height: 1.55;
    margin: 0;
    overflow-wrap: anywhere;
}

.duplicate-action-primary,
.duplicate-action-danger {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.duplicate-action-danger {
    grid-column: 1 / -1;
    padding-top: 10px;
    border-top: 1px dashed color-mix(in srgb, var(--border-color) 78%, transparent);
}

.duplicate-file-delete-confirm {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 240px;
    padding: 6px 8px;
    border: 1px solid color-mix(in srgb, #ef4444 34%, var(--border-color));
    border-radius: 12px;
    background: color-mix(in srgb, #ef4444 6%, var(--card-bg));
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.duplicate-file-delete-confirm input {
    min-width: 0;
    width: 96px;
    height: 32px;
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--input-bg);
    color: var(--text-color);
}

.duplicate-file-delete-btn {
    border-color: color-mix(in srgb, #ef4444 70%, var(--border-color));
}

.duplicate-table-container {
    margin-top: 0;
}

.duplicate-table {
    table-layout: fixed;
    min-width: 980px;
}

.duplicate-table th,
.duplicate-table td {
    vertical-align: middle;
    overflow: hidden;
}

.duplicate-table th:nth-child(1),
.duplicate-table td:nth-child(1),
.duplicate-table th:nth-child(2),
.duplicate-table td:nth-child(2) {
    width: 72px;
    text-align: center;
}

.duplicate-table th:nth-child(3),
.duplicate-table td:nth-child(3) {
    width: 300px;
}

.duplicate-table th:nth-child(4),
.duplicate-table td:nth-child(4),
.duplicate-table th:nth-child(5),
.duplicate-table td:nth-child(5) {
    width: 180px;
}

.duplicate-table th:nth-child(6),
.duplicate-table td:nth-child(6),
.duplicate-table th:nth-child(7),
.duplicate-table td:nth-child(7) {
    width: 92px;
}

.duplicate-table th:nth-child(8),
.duplicate-table td:nth-child(8) {
    width: 230px;
}

.duplicate-table td:nth-child(4),
.duplicate-table td:nth-child(5) {
    text-overflow: ellipsis;
    white-space: nowrap;
}

.duplicate-table .song-action-group {
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 6px;
}

.duplicate-table .song-action-group .btn {
    white-space: nowrap;
}

.duplicate-song-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.duplicate-song-cell img {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--surface-soft);
    box-shadow: 0 1px 0 color-mix(in srgb, var(--border-color) 75%, transparent);
}

.duplicate-song-cell > div {
    min-width: 0;
}

.duplicate-song-cell a,
.duplicate-song-cell small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.duplicates-page input[type="checkbox"],
.duplicates-page input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-color);
}

.app-announcement-banner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    max-width: min(1180px, calc(100% - 56px));
    margin: 12px auto 0;
    padding: 14px 16px 14px 14px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--card-bg);
    color: var(--text-color);
    box-shadow: var(--shadow-soft);
    transition: opacity 0.18s ease, transform 0.18s ease;
    position: relative;
    z-index: 20;
    overflow: hidden;
}

.app-announcement-banner::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--accent-color);
}

.app-announcement-banner.is-hidden {
    opacity: 0;
    transform: translateY(-8px);
}

.app-announcement-banner.announcement-update {
    border-color: color-mix(in srgb, var(--accent-color) 44%, var(--border-color));
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent-color) 10%, var(--card-bg)), var(--card-bg) 58%);
}

.app-announcement-banner.announcement-maintenance {
    border-color: color-mix(in srgb, #f59e0b 44%, var(--border-color));
}

.app-announcement-banner.announcement-maintenance::before {
    background: #f59e0b;
}

.app-announcement-banner.announcement-important {
    border-color: color-mix(in srgb, #ef4444 48%, var(--border-color));
}

.app-announcement-banner.announcement-important::before {
    background: #ef4444;
}

.announcement-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent-color) 12%, var(--surface-soft));
    color: var(--accent-color);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-color) 14%, transparent);
}

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

.announcement-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
}

.announcement-title-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--text-primary);
    line-height: 1.25;
}

.announcement-type,
.announcement-important {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 0.8rem;
    font-weight: 800;
}

.announcement-type {
    background: color-mix(in srgb, var(--accent-color) 12%, var(--surface-soft));
    color: var(--accent-color);
}

.announcement-important {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.announcement-content p,
.announcement-details {
    margin: 6px 0 0;
    color: var(--text-muted);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.announcement-details summary {
    cursor: pointer;
    color: var(--text-muted);
    list-style-position: inside;
}

.announcement-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.announcement-close-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text-color);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.16s ease, background 0.16s ease;
}

.announcement-close-btn:hover,
.announcement-close-btn:focus-visible {
    background: color-mix(in srgb, var(--accent-color) 10%, var(--surface-soft));
    transform: translateY(-1px);
}

.announcement-editor-card {
    overflow: hidden;
}

.announcement-form {
    gap: 16px;
}

.announcement-option-row {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--surface-soft);
}

.announcement-form-footer {
    padding-top: 4px;
}

.announcement-admin-list {
    display: grid;
    gap: 12px;
}

.announcement-admin-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--card-bg);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.announcement-admin-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--accent-color);
}

.announcement-admin-card.announcement-maintenance::before {
    background: #f59e0b;
}

.announcement-admin-card.announcement-important::before {
    background: #ef4444;
}

.announcement-admin-card.is-hidden {
    opacity: 0.72;
    background: color-mix(in srgb, var(--surface-soft) 58%, var(--card-bg));
}

.announcement-admin-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent-color) 12%, var(--surface-soft));
    color: var(--accent-color);
    margin-left: 4px;
}

.announcement-admin-main {
    min-width: 0;
}

.announcement-admin-main p {
    margin: 8px 0;
    color: var(--text-muted);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.announcement-admin-main small {
    color: var(--text-muted);
}

.announcement-admin-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.announcement-admin-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text-muted);
    font-size: 0.84rem;
    overflow-wrap: anywhere;
}

.announcement-admin-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.announcement-form textarea {
    resize: vertical;
    min-height: 120px;
}

.status-badge-missing {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 59, 48, 0.12);
    color: #ff6b61;
    font-size: 12px;
    font-weight: 800;
}

.metadata-bulk-actions {
    display: flex;
    justify-content: flex-end;
    margin: 12px 0;
}

.metadata-card-list {
    display: none;
}

.metadata-mobile-card,
.metadata-status-panel {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-color);
}

.metadata-mobile-card {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metadata-status-panel {
    display: grid;
    gap: 8px;
    padding: 14px;
    margin: 12px 0;
}

.metadata-error {
    color: #ff6b61;
    overflow-wrap: anywhere;
}

.metadata-badge {
    display: inline-flex;
    margin: 2px;
    padding: 3px 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-color) 14%, transparent);
    color: var(--accent-color);
    font-size: 12px;
    font-weight: 800;
}

.bulk-edit-page .compact-filter-form .form-row,
.bulk-edit-controls .form-row {
    align-items: end;
}

.bulk-edit-page .form-group-actions {
    justify-content: flex-end;
}

.bulk-edit-controls .section-heading-row {
    align-items: flex-start;
}

.bulk-edit-controls .bulk-option-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--surface-soft);
}

.bulk-edit-table {
    table-layout: fixed;
    min-width: 1040px;
}

.bulk-edit-table th,
.bulk-edit-table td {
    vertical-align: middle;
}

.bulk-edit-table th:nth-child(1),
.bulk-edit-table td:nth-child(1) {
    width: 76px;
    text-align: center;
}

.bulk-edit-table th:nth-child(2),
.bulk-edit-table td:nth-child(2) {
    width: 240px;
}

.bulk-edit-table th:nth-child(3),
.bulk-edit-table td:nth-child(3),
.bulk-edit-table th:nth-child(4),
.bulk-edit-table td:nth-child(4),
.bulk-edit-table th:nth-child(5),
.bulk-edit-table td:nth-child(5),
.bulk-edit-table th:nth-child(7),
.bulk-edit-table td:nth-child(7) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bulk-edit-table th:nth-child(6),
.bulk-edit-table td:nth-child(6) {
    width: 90px;
}

.bulk-edit-table th:nth-child(8),
.bulk-edit-table td:nth-child(8) {
    width: 170px;
}

.bulk-edit-page input[type="checkbox"],
.bulk-edit-page input[type="radio"] {
    accent-color: var(--accent-color);
}

.bulk-edit-card-list {
    display: none;
}

.bulk-edit-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--card-bg);
    box-shadow: var(--shadow-soft);
    min-width: 0;
}

.bulk-edit-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.bulk-edit-card-head .check-row {
    min-width: 0;
    flex: 1 1 auto;
    align-items: flex-start;
}

.bulk-edit-card-head strong {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--text-primary);
    line-height: 1.35;
}

.bulk-edit-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.bulk-edit-card-meta span {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 8px;
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--text-color);
    overflow-wrap: anywhere;
}

.bulk-edit-card-meta b {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.bulk-edit-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 4px;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.song-title-link,
.compact-title,
.player-song-title,
.player-song-artist {
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-cover,
.compact-cover,
.player-album-art,
.album-art-large,
.album-art-large img {
    aspect-ratio: 1 / 1;
}

@media (max-width: 1023px) and (min-width: 768px) {
    body:not(.sidebar-compact) {
        --sidebar-width: 220px;
    }

    .sidebar-search-form {
        grid-template-columns: 1fr 32px;
    }

    .sidebar-search-form > i {
        display: none;
    }
}

@media (max-width: 767px) {
    .sidebar {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: min(86vw, 340px);
        height: 100vh;
        height: 100dvh;
        transform: translateX(-104%);
        transition: transform 0.22s ease;
        z-index: 1004;
        padding-bottom: calc(92px + env(safe-area-inset-bottom));
    }

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

    .sidebar-scroll {
        padding-bottom: calc(118px + env(safe-area-inset-bottom));
    }

    .sidebar-footer {
        display: none;
    }

    .sidebar-overlay.open {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .menu-group:not(.has-active) {
        margin-top: 8px;
    }

    .nav-item {
        min-height: 44px;
    }

    .top-bar {
        gap: 10px;
    }

    .search-container {
        min-width: 0;
    }

    .dashboard-quick-actions,
    .admin-card-grid,
    .missing-file-grid {
        grid-template-columns: 1fr;
    }

    .missing-file-grid {
        display: grid;
    }

    .missing-files-page .metadata-table {
        display: none;
    }

    .metadata-table-container {
        display: none;
    }

    .metadata-bulk-actions {
        display: none;
    }

    .metadata-card-list {
        display: grid;
        gap: 12px;
    }

    .bulk-edit-page .compact-filter-form .form-row,
    .bulk-edit-controls .form-row,
    .bulk-edit-controls .section-heading-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        align-items: stretch;
    }

    .bulk-edit-page .form-group-actions .btn,
    .bulk-edit-controls .section-heading-row .btn {
        width: 100%;
        justify-content: center;
    }

    .bulk-edit-controls .bulk-option-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .bulk-edit-table-container {
        display: none;
    }

    .bulk-edit-card-list {
        display: grid;
        gap: 12px;
    }

    .bulk-edit-card-head {
        display: grid;
        grid-template-columns: 1fr;
    }

    .bulk-edit-card-head .btn {
        width: 100%;
        justify-content: center;
    }

    .bulk-edit-card-meta {
        grid-template-columns: 1fr;
    }

    .metadata-edit-form,
    .settings-grid,
    .maintenance-actions,
    .filter-sort-form,
    .list-filter-section {
        max-width: 100%;
    }

    .metadata-edit-form label,
    .settings-card label {
        min-width: 0;
    }

    .song-action-group,
    .maintenance-actions,
    .form-actions {
        flex-wrap: wrap;
    }

    .player-bar {
        min-width: 0;
        gap: 8px;
    }

    .player-song-info {
        min-width: 0;
        flex: 1 1 auto;
    }

    .player-song-details {
        min-width: 0;
    }

    .player-utils .volume-icon,
    .player-utils .volume-slider-wrapper,
    #btn-shuffle,
    #btn-repeat {
        display: none;
    }

    .content-body {
        padding-bottom: calc(120px + env(safe-area-inset-bottom));
    }
}

.auth-page {
    min-height: calc(100vh - 140px);
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(100%, 440px);
    position: relative;
    z-index: 2;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 28px;
    box-shadow: var(--shadow-sm, 0 8px 24px rgba(0, 0, 0, 0.08));
}

.auth-heading {
    display: grid;
    gap: 8px;
    margin-bottom: 22px;
    text-align: center;
}

.auth-heading i {
    color: var(--accent-color);
    font-size: 34px;
}

.auth-heading h1 {
    margin: 0;
    color: var(--text-color);
}

.auth-heading p,
.auth-card p {
    color: var(--muted-text, #6b7280);
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-form label {
    display: grid;
    gap: 7px;
    font-weight: 700;
    color: var(--text-color);
}

.auth-form input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 12px;
    background: var(--input-bg, var(--card-bg));
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.3;
    touch-action: manipulation;
    -webkit-user-select: text;
    user-select: text;
    pointer-events: auto;
    -webkit-appearance: none;
    appearance: none;
}

.auth-form input:focus {
    outline: 2px solid color-mix(in srgb, var(--accent-color) 38%, transparent);
    outline-offset: 2px;
}

.auth-submit {
    min-height: 46px;
    justify-content: center;
}

.admin-session-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.no-player-page .content-body {
    padding-bottom: 32px;
}

@media (max-width: 767px) {
    .auth-page {
        min-height: auto;
        padding: 12px 0 32px;
        place-items: start stretch;
    }

    .auth-card {
        padding: 20px;
    }

    .auth-form input {
        min-height: 48px;
        font-size: 16px !important;
    }

    .admin-session-card {
        align-items: stretch;
        flex-direction: column;
    }
}
/* Admin diagnostics and logs */
.diagnostics-page,
.logs-page,
.performance-page,
.alerts-page {
    min-width: 0;
}

.diagnostic-grid,
.alert-grid,
.performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.diagnostic-card,
.alert-card,
.performance-card,
.log-detail-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    padding: 16px;
    min-width: 0;
}

.diagnostic-card h3,
.alert-card h3,
.performance-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.diagnostic-card p,
.alert-card p,
.performance-card p,
.log-detail-card p {
    overflow-wrap: anywhere;
}

.diagnostic-badge,
.log-level {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.status-ok,
.level-info {
    background: rgba(0, 199, 60, 0.12);
    color: #047831;
}

.status-warning,
.level-warning {
    background: rgba(245, 158, 11, 0.16);
    color: #92400e;
}

.status-error,
.level-error,
.level-critical {
    background: rgba(239, 68, 68, 0.14);
    color: #b91c1c;
}

.status-unknown {
    background: rgba(107, 114, 128, 0.14);
    color: #4b5563;
}

.log-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    margin-bottom: 16px;
}

.log-filter-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 150px;
}

.log-message-cell {
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-card-list {
    display: none;
}

.log-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 10px;
}

.log-card p {
    overflow-wrap: anywhere;
}

.log-context,
.log-detail-pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: rgba(127, 127, 127, 0.08);
    border-radius: 8px;
    padding: 12px;
    max-width: 100%;
    overflow-x: auto;
}

@media (max-width: 767px) {
    .log-filter-form,
    .maintenance-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .log-filter-form label,
    .log-filter-form .btn,
    .maintenance-actions .btn {
        width: 100%;
    }

    .log-table {
        display: none;
    }

    .log-card-list {
        display: block;
    }

    .diagnostic-grid,
    .alert-grid,
    .performance-grid {
        grid-template-columns: 1fr;
    }
}

/* 14李? player surfaces must follow the active theme even when older rules appear earlier. */
.player-bar,
.queue-panel,
.expand-player-container,
.expand-tab-section,
.lyrics-panel,
.modal-content {
    background: var(--player-bg, var(--card-bg, #fff)) !important;
    color: var(--player-text, var(--text-color, #222)) !important;
    border-color: var(--player-border, var(--border-color, #ddd)) !important;
}

.player-bar .player-title,
.player-bar .player-artist,
.player-bar .time-current,
.player-bar .time-total,
.queue-panel,
.queue-item,
.queue-item-title,
.queue-item-artist,
.expand-player-container,
.expand-player-title,
.expand-player-artist,
.expand-player-album,
.lyrics-line,
.mini-lyrics-line {
    color: var(--player-text, var(--text-color, #222)) !important;
}

.player-bar button,
.queue-panel button,
.expand-player-container button,
.player-control-btn,
.expand-control-btn {
    color: var(--player-text, var(--text-color, #222)) !important;
}

.player-bar button:hover,
.queue-panel button:hover,
.expand-player-container button:hover,
.queue-item:hover {
    background: var(--player-hover-bg, rgba(0, 0, 0, 0.06)) !important;
}

.progress-bar,
.expand-player-controls .progress-bar,
.volume-bar {
    background: var(--accent-color, var(--primary-color, #00c73c)) !important;
}

.progress-container,
.expand-player-controls .progress-bar-wrapper,
.volume-wrapper {
    background: var(--player-progress-bg, rgba(0, 0, 0, 0.14)) !important;
}

.melon-lite-toast {
    position: fixed;
    left: 50%;
    bottom: calc(104px + env(safe-area-inset-bottom));
    transform: translate(-50%, 16px);
    z-index: 1200;
    max-width: min(420px, calc(100vw - 28px));
    padding: 11px 14px;
    border-radius: 8px;
    background: var(--player-elevated, var(--card-bg));
    color: var(--player-text, var(--text-color));
    border: 1px solid var(--player-border, var(--border-color));
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    font-size: 14px;
}

.melon-lite-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.melon-lite-toast[data-type="error"] {
    border-color: color-mix(in srgb, #ef4444 52%, var(--player-border, #ddd));
}

.expand-secondary-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

@supports (padding: max(0px)) {
    .player-bar {
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
}

@media (max-width: 767px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .app-main,
    .content-body,
    .admin-dashboard,
    .settings-page {
        padding-bottom: calc(132px + env(safe-area-inset-bottom)) !important;
    }

    .player-bar {
        width: 100%;
        max-width: 100vw;
        min-height: calc(84px + env(safe-area-inset-bottom));
        padding: 8px 10px calc(10px + env(safe-area-inset-bottom)) !important;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        overflow: hidden;
    }

    .player-song-info {
        min-width: 0;
        gap: 9px;
    }

    .player-song-details,
    .player-song-title,
    .player-song-artist {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .player-album-art {
        width: 46px;
        height: 46px;
        flex: 0 0 46px;
    }

    .player-controls {
        min-width: 0;
    }

    .control-buttons {
        gap: 4px;
    }

    .control-btn {
        min-width: 40px;
        min-height: 40px;
        touch-action: manipulation;
    }

    .play-btn {
        min-width: 46px;
        min-height: 46px;
    }

    .progress-container {
        width: 100%;
        min-width: 0;
        gap: 6px;
    }

    .progress-bar-wrapper,
    .expand-player-controls .progress-bar-wrapper {
        min-height: 18px;
        display: flex;
        align-items: center;
    }

    .player-utils {
        display: none;
    }

    .queue-panel {
        height: calc(100dvh - env(safe-area-inset-top));
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    .expand-player-overlay {
        align-items: stretch;
        padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
    }

    .expand-player-container {
        width: 100%;
        max-width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        overflow-y: auto;
        overscroll-behavior: contain;
        border-radius: 0;
        padding: 18px 14px calc(22px + env(safe-area-inset-bottom)) !important;
    }

    .expand-close {
        position: sticky;
        top: 8px;
        z-index: 2;
        align-self: flex-start;
    }

    .expand-tab-headers {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .expand-tab-headers::-webkit-scrollbar {
        display: none;
    }

    .expand-control-buttons-row {
        gap: 8px;
        justify-content: center;
    }

    .expand-secondary-actions .btn {
        min-height: 38px;
    }

    .pwa-install-banner {
        left: 10px;
        right: 10px;
        bottom: calc(94px + env(safe-area-inset-bottom));
        max-width: none;
    }

    .melon-lite-toast {
        bottom: calc(100px + env(safe-area-inset-bottom));
    }
}

body.pjax-loading .content-body {
    position: relative;
}

body.pjax-loading .content-body::before {
    content: "";
    position: sticky;
    top: 0;
    display: block;
    height: 3px;
    width: 100%;
    z-index: 30;
    background: linear-gradient(90deg, transparent, var(--accent-color, #00c73c), transparent);
    animation: pjaxLoadingBar 1s infinite linear;
}

.melon-lite-page-loading {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 18px);
    left: 50%;
    z-index: 1450;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    max-width: calc(100vw - 32px);
    padding: 10px 16px;
    border: 1px solid color-mix(in srgb, var(--accent-color, #00c73c) 30%, var(--border-color, #d8e2ee));
    border-radius: 999px;
    background: var(--player-elevated, var(--card-bg, #fff));
    color: var(--text-primary, #0f172a);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
    font-size: 14px;
    font-weight: 800;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -8px);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.melon-lite-page-loading.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.page-loading-spinner {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    border: 2px solid color-mix(in srgb, var(--accent-color, #00c73c) 20%, transparent);
    border-top-color: var(--accent-color, #00c73c);
    border-radius: 50%;
    animation: melonLiteLoadingSpin 0.75s linear infinite;
}

@keyframes melonLiteLoadingSpin {
    to { transform: rotate(360deg); }
}

@keyframes pjaxLoadingBar {
    from { transform: translateX(-60%); }
    to { transform: translateX(60%); }
}

@media (max-width: 767px) {
    .melon-lite-page-loading {
        top: calc(env(safe-area-inset-top, 0px) + 12px);
        width: min(320px, calc(100vw - 32px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .melon-lite-page-loading,
    .page-loading-spinner,
    body.pjax-loading .content-body::before {
        animation: none;
        transition: none;
    }
}

/* 15李? playlist polish */
.playlist-polish-page {
    max-width: 1180px;
    margin: 0 auto;
    padding-bottom: 120px;
}

.playlist-hero,
.playlist-detail-hero {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.playlist-create-card,
.playlist-card,
.playlist-song-item,
.playlist-toolbar,
.playlist-detail-hero {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
}

.playlist-create-card {
    padding: 16px;
    margin-bottom: 18px;
}

.playlist-create-card h2 {
    margin: 0 0 12px;
    font-size: 1rem;
}

.playlist-inline-form,
.playlist-filter-form,
.playlist-action-row,
.playlist-card-actions,
.playlist-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.playlist-inline-form input,
.playlist-inline-form select {
    min-width: 200px;
    flex: 1 1 220px;
}

.playlist-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.playlist-card {
    overflow: hidden;
    min-width: 0;
}

.playlist-card-cover {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    aspect-ratio: 1 / 1;
    background: var(--player-progress-bg, rgba(0, 0, 0, 0.08));
}

.playlist-card-cover img,
.playlist-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-width: 0;
}

.playlist-card-cover img:only-child {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
}

.playlist-card-body {
    padding: 14px;
    min-width: 0;
    display: grid;
    gap: 8px;
}

.playlist-card-title {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-color, #222);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.playlist-card-body p {
    min-height: 42px;
    margin: 0;
    color: var(--text-secondary, #666);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.playlist-scope-badge {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid var(--border-color, #e5e7eb);
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-secondary, #64748b);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
}

.playlist-scope-badge.scope-home {
    border-color: rgba(0, 199, 60, 0.24);
    background: rgba(0, 199, 60, 0.12);
    color: var(--accent-color, #00a832);
}

.playlist-scope-badge.scope-hidden {
    border-color: rgba(239, 68, 68, 0.22);
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}

.playlist-card-meta,
.playlist-summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--text-muted, #777);
    font-size: 0.86rem;
}

.playlist-card-actions form {
    margin: 0;
}

.playlist-detail-hero {
    padding: 18px;
    align-items: stretch;
}

.playlist-detail-cover {
    width: 180px;
    min-width: 180px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    background: var(--player-progress-bg, rgba(0, 0, 0, 0.08));
}

.playlist-detail-cover img:only-child {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
}

.playlist-detail-meta {
    min-width: 0;
    flex: 1;
    display: grid;
    align-content: start;
    gap: 8px;
}

.breadcrumb-link {
    display: inline-flex;
    gap: 6px;
    color: var(--accent-color, #00c73c);
    text-decoration: none;
    margin-bottom: 8px;
    font-weight: 700;
}

.playlist-action-row {
    margin-top: 6px;
}

.playlist-toolbar {
    justify-content: space-between;
    padding: 12px;
    margin-bottom: 12px;
}

.playlist-filter-form {
    flex: 1 1 360px;
}

.playlist-filter-form .form-control {
    flex: 1 1 220px;
}

.empty-action-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.playlist-song-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.playlist-song-item {
    display: grid;
    grid-template-columns: 70px 44px 52px minmax(0, 1.5fr) minmax(130px, 0.8fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    min-width: 0;
}

.playlist-song-item.playing {
    border-color: var(--accent-color, #00c73c);
    box-shadow: 0 0 0 1px var(--accent-color, #00c73c);
}

.playlist-song-item.is-missing {
    opacity: 0.72;
}

.playlist-song-order {
    display: flex;
    align-items: center;
    gap: 8px;
}

.playlist-order-number {
    width: 28px;
    text-align: right;
    font-weight: 800;
    color: var(--text-muted, #777);
}

.playlist-order-buttons {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.playlist-move-btn {
    width: 28px;
    min-width: 28px;
    height: 24px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
    background: transparent;
    color: var(--text-color, #222);
    cursor: pointer;
}

.playlist-row-play {
    width: 40px;
    height: 40px;
}

.playlist-song-main,
.playlist-song-sub {
    min-width: 0;
}

.playlist-song-main .song-title-link,
.playlist-song-main span,
.playlist-song-sub span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.playlist-song-main span,
.playlist-song-sub {
    color: var(--text-secondary, #666);
    font-size: 0.9rem;
}

.playlist-song-sub {
    display: grid;
    gap: 2px;
}

.playlist-song-actions {
    justify-content: flex-end;
}

.playlist-save-order-btn.is-dirty {
    border-color: var(--accent-color, #00c73c);
    color: var(--accent-color, #00c73c);
}

.missing-badge {
    display: inline-flex;
    width: max-content;
    margin-top: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
    font-size: 0.75rem;
    font-weight: 700;
}

@media (max-width: 1023px) {
    .playlist-song-item {
        grid-template-columns: 58px 40px 52px minmax(0, 1fr) auto;
    }

    .playlist-song-sub {
        grid-column: 4 / -1;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
}

@media (max-width: 767px) {
    .playlist-hero,
    .playlist-detail-hero {
        flex-direction: column;
    }

    .playlist-detail-cover {
        width: 100%;
        min-width: 0;
        max-width: 220px;
    }

    .playlist-inline-form,
    .playlist-filter-form,
    .playlist-action-row,
    .playlist-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .playlist-inline-form input,
    .playlist-inline-form select,
    .playlist-filter-form .form-control,
    .playlist-toolbar .btn,
    .playlist-action-row .btn {
        width: 100%;
    }

    .playlist-card-grid {
        grid-template-columns: 1fr;
    }

    .playlist-song-item {
        grid-template-columns: 46px 42px 48px minmax(0, 1fr);
        align-items: start;
    }

    .playlist-song-sub,
    .playlist-song-actions {
        grid-column: 4 / -1;
    }

    .playlist-song-actions {
        justify-content: flex-start;
    }

    .playlist-order-buttons {
        flex-direction: row;
    }

    .playlist-move-btn {
        width: 26px;
        height: 30px;
    }
}

/* Backup center */
.backup-center-page {
    max-width: 1180px;
}

.backup-summary-grid,
.backup-two-column,
.backup-table-counts,
.form-grid {
    display: grid;
    gap: 14px;
}

.backup-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    margin-bottom: 18px;
}

.backup-two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 18px;
}

.backup-summary-card,
.check-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
}

.backup-summary-card {
    padding: 16px;
    min-width: 0;
}

.backup-summary-card span,
.backup-summary-card small,
.backup-file-main small,
.backup-file-status small {
    color: var(--text-muted);
}

.backup-summary-card strong {
    display: block;
    margin: 6px 0;
    color: var(--text-color);
    font-size: 1.35rem;
}

.backup-form {
    display: grid;
    gap: 12px;
}

.admin-password-panel {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.admin-password-panel summary {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
    color: var(--text-color);
}

.admin-password-panel .backup-form {
    margin-top: 10px;
}

.password-field {
    display: grid;
    gap: 6px;
    font-weight: 700;
    color: var(--text-color);
}

.api-token-once {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    margin-top: 8px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-soft, var(--card-bg));
    color: var(--text-color);
}

/* Floating mini player for mobile and tablet */
@media (max-width: 1023px) {
    :root {
        --floating-player-size: 74px;
        --floating-player-width: min(360px, calc(100vw - 28px));
    }

    .player-bar {
        position: fixed !important;
        left: auto !important;
        right: 14px !important;
        bottom: calc(14px + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
        width: var(--floating-player-width) !important;
        max-width: var(--floating-player-width) !important;
        min-width: 0 !important;
        height: var(--floating-player-size) !important;
        min-height: var(--floating-player-size) !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 9px 10px !important;
        border: 1px solid var(--player-control-border, var(--border-color)) !important;
        border-radius: 22px !important;
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28) !important;
        overflow: visible !important;
        z-index: var(--z-player, 1000) !important;
        cursor: pointer;
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    .player-bar:focus-visible {
        outline: 3px solid color-mix(in srgb, var(--accent-color) 44%, transparent);
        outline-offset: 3px;
    }

    .player-song-info {
        width: auto !important;
        min-width: 0 !important;
        gap: 10px !important;
    }

    .player-album-art,
    .player-album-art img {
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        border-radius: 15px !important;
    }

    .player-song-details {
        min-width: 0 !important;
    }

    .player-song-title,
    .player-song-artist {
        max-width: 100% !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .player-song-title {
        font-size: 0.9rem !important;
        line-height: 1.25 !important;
    }

    .player-song-artist {
        font-size: 0.78rem !important;
    }

    .player-controls {
        width: auto !important;
        min-width: 52px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .control-buttons {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0 !important;
    }

    #btn-shuffle,
    #btn-prev,
    #btn-next,
    #btn-repeat,
    .player-utils,
    .player-bar .progress-container {
        display: none !important;
    }

    #btn-play-pause {
        display: inline-flex !important;
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        min-height: 52px !important;
        border-radius: 999px !important;
        flex: 0 0 52px !important;
    }

    .content-body,
    .app-main,
    .main-content,
    .admin-dashboard,
    .settings-page {
        padding-bottom: calc(104px + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
    }

    .queue-panel,
    .melon-lite-toast,
    .pwa-install-banner:not(.pwa-install-modal),
    .guest-preview-prompt.preview-premium-sheet {
        bottom: calc(104px + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
    }

    .expand-player-overlay {
        padding-bottom: var(--safe-bottom, env(safe-area-inset-bottom, 0px)) !important;
    }
}

@media (max-width: 520px) {
    :root {
        --floating-player-size: 68px;
        --floating-player-width: min(300px, calc(100vw - 24px));
    }

    .player-bar {
        right: 12px !important;
        bottom: calc(12px + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
        border-radius: 20px !important;
        padding: 8px !important;
    }

    .player-album-art,
    .player-album-art img {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        border-radius: 14px !important;
    }

    #btn-play-pause {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
        flex-basis: 48px !important;
    }

    .player-song-title {
        font-size: 0.84rem !important;
    }

    .player-song-artist {
        font-size: 0.74rem !important;
    }
}

.form-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.check-card {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px;
    min-height: 44px;
}

.check-card input {
    width: 18px;
    height: 18px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    background: var(--surface-color);
    color: var(--text-color);
}

.status-badge.ok,
.notice-success {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.status-badge.info {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.status-badge.warning {
    background: rgba(245, 158, 11, 0.16);
    color: #b45309;
}

.status-badge.danger,
.notice-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.notice {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 700;
}

.danger-zone {
    border-color: rgba(239, 68, 68, 0.24);
}

.backup-table-counts {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.backup-table-counts div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--surface-color);
    min-width: 0;
}

.backup-table-counts span,
.backup-file-main strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.backup-file-list {
    display: grid;
    gap: 12px;
}

.backup-file-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
}

.backup-file-main,
.backup-file-status,
.backup-file-actions {
    min-width: 0;
}

.backup-file-main,
.backup-file-status {
    display: grid;
    gap: 5px;
}

.backup-file-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.backup-file-actions form {
    margin: 0;
}

.backup-table-wrap {
    overflow-x: auto;
    max-width: 100%;
}

.backup-table {
    width: 100%;
    border-collapse: collapse;
}

.backup-table th,
.backup-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.backup-message-list {
    margin: 0 0 14px;
    padding-left: 20px;
}

.backup-message-list.muted {
    color: var(--text-muted);
}

.danger-confirm-input {
    min-width: 150px;
    border-color: rgba(239, 68, 68, 0.45) !important;
    background: color-mix(in srgb, var(--card-bg) 92%, rgba(239, 68, 68, 0.12)) !important;
}

@media (max-width: 767px) {
    .backup-two-column,
    .backup-file-card {
        grid-template-columns: 1fr;
    }

    .backup-file-actions {
        justify-content: stretch;
    }

    .backup-file-actions .btn,
    .backup-file-actions form,
    .backup-form .btn {
        width: 100%;
    }

    .backup-table-counts {
        grid-template-columns: 1fr;
    }
}

/* Enhanced search */
.enhanced-search-page {
    max-width: 1180px;
}

.enhanced-search-form,
.sidebar-search-form,
.quick-search-form {
    position: relative;
}

.quick-suggest-box {
    position: absolute;
    z-index: 1200;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: min(420px, 70vh);
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.quick-suggest-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "type title play"
        "type sub play";
    gap: 2px 10px;
    align-items: center;
    padding: 9px;
    border-radius: 8px;
    cursor: pointer;
}

.quick-suggest-item:hover {
    background: var(--surface-color);
}

.quick-suggest-item .suggest-type {
    grid-area: type;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 800;
}

.quick-suggest-item strong {
    grid-area: title;
    min-width: 0;
    overflow: hidden;
    color: var(--text-color);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-suggest-item small {
    grid-area: sub;
    min-width: 0;
    overflow: hidden;
    color: var(--text-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggest-play-btn {
    grid-area: play;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: var(--accent-color);
    color: #fff;
    cursor: pointer;
}

.search-recent-panel,
.advanced-filter-panel {
    margin: 16px 0;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
}

.advanced-filter-panel summary {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 800;
}

.advanced-filter-form {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.filter-grid label,
.filter-check-row label {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--text-color);
    font-weight: 700;
}

.filter-check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.filter-check-row label {
    grid-template-columns: auto 1fr;
    align-items: center;
    min-height: 36px;
}

.filter-check-row input {
    width: 18px;
    height: 18px;
}

.filter-actions,
.active-filter-badges,
.recent-search-list,
.search-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.filter-badge,
.recent-search-chip,
.pager-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--card-bg);
    color: var(--text-color);
    text-decoration: none;
    max-width: 100%;
}

.filter-badge span,
.recent-search-chip small {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.pager-link.active {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: #fff;
}

.search-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.media-explore-card {
    grid-template-columns: 48px minmax(0, 1fr);
}

.media-explore-card img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    grid-row: span 2;
}

@media (max-width: 767px) {
    .search-category-grid,
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .enhanced-search-form {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .enhanced-search-form .btn,
    .filter-actions .btn {
        width: 100%;
    }

    .quick-suggest-box {
        position: fixed;
        top: auto;
        left: 12px;
        right: 12px;
        bottom: calc(var(--player-height, 92px) + 14px);
        max-height: 55vh;
    }

    .quick-suggest-item {
        grid-template-columns: auto minmax(0, 1fr) 34px;
    }
}

/* 22李?紐⑤컮??PWA ?뚮젅?댁뼱 final pass */
@media (max-width: 767px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .player-bar {
        box-sizing: border-box;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100vw;
        min-height: calc(84px + env(safe-area-inset-bottom));
        padding: 8px 10px calc(10px + env(safe-area-inset-bottom)) !important;
        overflow: hidden;
    }

    .content-body,
    .app-main,
    .main-content {
        padding-bottom: calc(132px + env(safe-area-inset-bottom)) !important;
    }

    .player-song-info,
    .player-song-details {
        min-width: 0;
    }

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

    .progress-bar-wrapper {
        min-height: 18px;
    }

    .expand-player-container {
        width: 100%;
        max-width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        overflow-y: auto;
        border-radius: 0 !important;
        padding-bottom: calc(22px + env(safe-area-inset-bottom)) !important;
    }

    .melon-lite-toast,
    .pwa-install-banner {
        max-width: calc(100vw - 20px);
    }
}
/* 23李??먮룞 ?뚮젅?대━?ㅽ듃/異붿쿇 紐⑤컮??蹂댁젙 */
@media (max-width: 767px) {
    .auto-playlist-actions,
    .auto-save-row {
        align-items: stretch;
    }

    .auto-playlist-actions .btn,
    .auto-save-row .btn,
    .auto-save-row .form-control {
        width: 100%;
    }

    .recommend-reason-badge {
        white-space: normal;
        text-align: left;
    }
}
/* 25李?PWA ?ㅼ튂 ?덈궡/?뚮젅?댁뼱 ?덉씠??理쒖쥌 ?뺣━ */
:root {
    --z-sidebar-overlay: 900;
    --z-sidebar: 1000;
    --z-player: 1300;
    --z-install-banner: 1320;
    --z-toast: 1340;
    --z-queue: 1350;
    --z-expanded-player: 1500;
    --z-modal: 1600;
}

.player-bar {
    z-index: var(--z-player) !important;
}

.queue-panel {
    z-index: var(--z-queue) !important;
}

.expand-player-overlay {
    z-index: var(--z-expanded-player) !important;
}

.modal-overlay,
.pwa-guide-modal {
    z-index: var(--z-modal) !important;
}

.melon-lite-toast,
.guest-preview-prompt {
    z-index: var(--z-toast) !important;
}

.pwa-install-banner {
    left: auto !important;
    right: 18px !important;
    bottom: calc(var(--player-height) + 18px + env(safe-area-inset-bottom)) !important;
    width: min(390px, calc(100vw - var(--sidebar-width) - 52px)) !important;
    max-width: calc(100vw - 32px) !important;
    z-index: var(--z-install-banner) !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    border-radius: 999px !important;
}

.pwa-install-banner .pwa-install-copy {
    min-width: 0;
    gap: 0 !important;
}

.pwa-install-banner .pwa-install-copy strong {
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-install-banner .pwa-install-copy span {
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-install-banner .pwa-install-actions {
    flex: 0 0 auto !important;
    flex-direction: row !important;
    gap: 6px !important;
}

.pwa-install-banner .btn {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 12px;
    border-radius: 999px;
}

.pwa-install-banner .modal-close-btn {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 999px;
}

.pwa-guide-modal[hidden] {
    display: none;
}

.pwa-guide-modal {
    position: fixed;
    inset: 0;
}

.pwa-guide-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.46);
}

.pwa-guide-card {
    position: absolute;
    left: 50%;
    bottom: calc(var(--player-height) + 24px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: min(420px, calc(100vw - 28px));
    max-height: min(70dvh, 460px);
    overflow-y: auto;
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--text-color);
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.34);
}

.pwa-guide-card h2 {
    margin: 0 40px 12px 0;
    font-size: 18px;
}

.pwa-guide-body {
    color: var(--text-secondary);
    line-height: 1.6;
}

.guest-preview-prompt {
    position: fixed;
    right: 18px;
    bottom: calc(var(--player-height) + 18px + env(safe-area-inset-bottom));
    width: min(390px, calc(100vw - 32px));
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--text-color);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.26);
}

.guest-preview-copy {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 3px;
}

.guest-preview-copy span {
    color: var(--text-secondary);
    font-size: 12px;
}

.guest-preview-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.player-preview-badge {
    display: inline-flex;
    width: fit-content;
    margin-top: 3px;
    padding: 2px 7px;
    border-radius: 999px;
    color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-color) 12%, transparent);
    font-size: 11px;
    font-weight: 700;
}

body.guest-preview-ended .pwa-install-banner {
    display: none !important;
}

@media (max-width: 1023px) {
    .pwa-install-banner {
        width: min(360px, calc(100vw - 24px)) !important;
        right: 12px !important;
    }
}

@media (max-width: 767px) {
    .pwa-install-banner {
        left: 12px !important;
        right: 12px !important;
        bottom: calc(var(--player-height) + 16px + env(safe-area-inset-bottom)) !important;
        width: auto !important;
        border-radius: 14px !important;
        align-items: stretch !important;
    }

    .pwa-install-banner .pwa-install-actions {
        justify-content: flex-end;
    }

    .pwa-install-banner .pwa-install-copy span {
        display: none;
    }

    .pwa-guide-card {
        bottom: calc(var(--player-height) + 16px + env(safe-area-inset-bottom));
        width: calc(100vw - 24px);
        max-height: calc(100dvh - var(--player-height) - 58px - env(safe-area-inset-bottom));
    }

    .guest-preview-prompt {
        left: 12px;
        right: 12px;
        bottom: calc(var(--player-height) + 16px + env(safe-area-inset-bottom));
        width: auto;
        align-items: stretch;
        flex-direction: column;
    }

    .guest-preview-actions .btn {
        flex: 1 1 120px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pwa-install-banner,
    .pwa-guide-card,
    .guest-preview-prompt {
        transition: none !important;
        animation: none !important;
    }
}

/* 32李?理쒖쥌 ?곗꽑?쒖쐞 蹂댁젙: light theme, sidebar expand handle, tablet player */
body.theme-light {
    --bg-primary: #f6f8fb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #edf2f7;
    --surface: #ffffff;
    --surface-soft: #f3f6fa;
    --card-bg: #ffffff;
    --input-bg: #ffffff;
    --text-color: #111827;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --muted-text: #6b7280;
    --border-color: #d8e1ea;
    --sidebar-bg: #ffffff;
    --player-bg: #ffffff;
    --player-surface: #f6f8fb;
    --player-elevated: #ffffff;
    --player-text: #111827;
    --player-muted: #4b5563;
    --player-border: #d8e1ea;
    --player-progress-bg: #e2e8f0;
    --player-button-bg: #111827;
    --player-button-text: #ffffff;
    --ui-bg: #f6f8fb;
    --ui-surface: #ffffff;
    --ui-card-bg: #ffffff;
    --ui-soft-bg: #f3f7f5;
    --ui-border: #d8e1ea;
}

body.theme-light,
body.theme-light .app-container,
body.theme-light .main-content,
body.theme-light .content-body {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

body.theme-light .top-bar,
body.theme-light .sidebar,
body.theme-light .player-bar,
body.theme-light .expanded-player,
body.theme-light .queue-panel,
body.theme-light .modal-box,
body.theme-light .pwa-install-card,
body.theme-light .pwa-guide-card,
body.theme-light .guest-preview-card,
body.theme-light .melon-lite-toast,
body.theme-light .stats-card,
body.theme-light .library-stat-card,
body.theme-light .entity-card,
body.theme-light .genre-card,
body.theme-light .explore-card,
body.theme-light .auto-playlist-card,
body.theme-light .playlist-card,
body.theme-light .quick-action-card,
body.theme-light .admin-card,
body.theme-light .form-card,
body.theme-light .panel,
body.theme-light .section-card {
    background: var(--surface) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

body.theme-light .top-bar {
    background: color-mix(in srgb, var(--surface) 92%, transparent) !important;
}

body.theme-light input,
body.theme-light select,
body.theme-light textarea,
body.theme-light .search-input,
body.theme-light .filter-input {
    background: var(--input-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

body.theme-light input::placeholder,
body.theme-light textarea::placeholder,
body.theme-light .search-input::placeholder {
    color: #8a96a8 !important;
}

body.theme-light table,
body.theme-light .data-table,
body.theme-light .song-list-table,
body.theme-light .admin-table {
    background: var(--surface) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

body.theme-light th,
body.theme-light thead,
body.theme-light .table-header {
    background: var(--surface-soft) !important;
    color: var(--text-primary) !important;
}

body.theme-light .nav-item,
body.theme-light .menu-group-toggle,
body.theme-light .brand,
body.theme-light .card-title,
body.theme-light .player-track-title,
body.theme-light .expanded-title {
    color: var(--text-primary) !important;
}

body.theme-light .nav-item.active,
body.theme-light .menu-group.has-active > .menu-group-toggle {
    background: color-mix(in srgb, var(--accent-color) 14%, #ffffff) !important;
    color: #14532d !important;
    border-color: color-mix(in srgb, var(--accent-color) 34%, var(--border-color)) !important;
}

body.theme-light .muted,
body.theme-light .subtitle,
body.theme-light .nav-meta,
body.theme-light .card-meta,
body.theme-light .player-track-artist,
body.theme-light .expanded-artist,
body.theme-light .empty-text,
body.theme-light .loading-text {
    color: var(--text-secondary) !important;
}

body.theme-light .btn-secondary,
body.theme-light .btn-ghost,
body.theme-light .icon-btn,
body.theme-light .player-icon-btn,
body.theme-light .player-utility-btn {
    background: var(--surface-soft) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

body.theme-light .play-btn,
body.theme-light .main-play-btn,
body.theme-light .player-play-btn,
body.theme-light .expanded-play-btn,
body.theme-light #btn-play-pause,
body.theme-light #expand-btn-play-pause {
    background: var(--player-button-bg) !important;
    color: var(--player-button-text) !important;
    border-color: var(--player-button-bg) !important;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.24) !important;
}

@media (min-width: 768px) {
    body.sidebar-collapsed .sidebar {
        width: var(--sidebar-collapsed-width) !important;
        min-width: var(--sidebar-collapsed-width) !important;
        padding: 16px 10px 18px !important;
        overflow: visible !important;
    }

    body.sidebar-collapsed .brand {
        display: grid !important;
        grid-template-columns: 1fr !important;
        justify-items: center !important;
        gap: 10px !important;
        min-height: 100px !important;
        padding: 0 !important;
        margin-bottom: 16px !important;
    }

    body.sidebar-collapsed .brand-icon {
        width: 44px !important;
        height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    body.sidebar-collapsed .sidebar-collapse-btn {
        position: static !important;
        display: inline-flex !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        z-index: 45 !important;
        border-radius: 14px !important;
        background: var(--surface-soft) !important;
        color: var(--text-primary) !important;
        border: 1px solid var(--border-color) !important;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12) !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    :root {
        --player-height: 104px;
        --sidebar-width: 230px;
        --sidebar-collapsed-width: 76px;
    }

    .app-container {
        grid-template-rows: minmax(0, 1fr) auto !important;
    }

    .player-bar {
        height: auto !important;
        min-height: calc(var(--player-height) + var(--safe-bottom)) !important;
        grid-template-columns: minmax(170px, 1fr) minmax(280px, 1.35fr) auto !important;
        gap: 12px !important;
        padding: 10px 14px calc(10px + var(--safe-bottom)) !important;
        overflow: visible !important;
    }

    .player-song-info,
    .player-track-meta,
    .player-controls,
    .player-utils {
        min-width: 0 !important;
    }

    .control-buttons,
    .player-utils {
        gap: 8px !important;
    }

    .player-utils {
        justify-content: flex-end !important;
    }

    .player-utils .volume-icon,
    .player-utils .volume-slider-wrapper {
        display: none !important;
    }

    .content-body {
        padding-bottom: calc(var(--player-height) + 36px + var(--safe-bottom)) !important;
    }
}

/* 33李?EOF ?댁쁺 ?덉젙?? 理쒖쥌 ?곗꽑?쒖쐞 */
html,
body {
    overflow-x: hidden;
}

.content-body {
    padding-bottom: max(140px, calc(var(--player-height) + 42px + var(--safe-bottom))) !important;
}

.no-player-page .content-body {
    padding-bottom: 40px !important;
}

.pwa-install-banner.pwa-install-modal,
.guest-preview-prompt.preview-premium-modal,
.modal-overlay,
.pwa-guide-modal {
    max-width: 100vw;
    max-height: 100dvh;
    overflow: auto;
    overscroll-behavior: contain;
}

.pwa-install-card,
.guest-preview-card,
.pwa-guide-card,
.modal-box {
    max-width: min(560px, calc(100vw - 32px)) !important;
    max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 48px);
    overflow: auto;
}

body.guest-preview-ended .pwa-install-banner,
body.guest-preview-ended .pwa-guide-modal {
    display: none !important;
}

.melon-lite-toast {
    bottom: calc(var(--player-height) + 18px + var(--safe-bottom)) !important;
    max-width: min(420px, calc(100vw - 32px)) !important;
}

body.pwa-install-open .melon-lite-toast,
body.guest-preview-ended .melon-lite-toast {
    bottom: calc(var(--player-height) + 24px + var(--safe-bottom)) !important;
}

.table-responsive,
.table-wrapper,
.song-table-wrapper,
.admin-table-wrapper,
.backup-table-wrapper {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body.theme-light .table-responsive,
body.theme-light .table-wrapper,
body.theme-light .song-table-wrapper,
body.theme-light .admin-table-wrapper,
body.theme-light .backup-table-wrapper {
    background: var(--surface);
    border-color: var(--border-color);
}

body.theme-light .alert-box,
body.theme-light .empty-state,
body.theme-light .empty-list-state,
body.theme-light .loading-text {
    color: var(--text-primary);
    border-color: var(--border-color);
}

body.theme-light .alert-danger,
body.theme-light .alert-error {
    background: rgba(239, 68, 68, 0.10) !important;
    color: #7f1d1d !important;
}

body.theme-light .alert-warning {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #78350f !important;
}

body.theme-light .alert-success {
    background: color-mix(in srgb, var(--accent-color) 11%, #ffffff) !important;
    color: #14532d !important;
}

body.theme-dark .stats-card,
body.theme-dark .library-stat-card,
body.theme-dark .entity-card,
body.theme-dark .genre-card,
body.theme-dark .explore-card,
body.theme-dark .auto-playlist-card,
body.theme-dark .playlist-card,
body.theme-dark .quick-action-card,
body.theme-dark .admin-card,
body.theme-dark .form-card,
body.theme-dark .panel,
body.theme-dark .section-card {
    border-color: color-mix(in srgb, var(--border-color, #2f3a35) 78%, #ffffff 8%);
}

@media (min-width: 768px) {
    body.sidebar-collapsed .main-content {
        min-width: 0;
    }

    body.sidebar-collapsed .content-body {
        max-width: min(1760px, 100%) !important;
    }

    body.sidebar-collapsed .sidebar-collapse-btn:focus-visible {
        outline: 3px solid color-mix(in srgb, var(--accent-color) 42%, transparent);
        outline-offset: 3px;
    }
}

@media (max-width: 767px) {
    .content-body {
        padding-left: 14px !important;
        padding-right: 14px !important;
        padding-bottom: calc(var(--player-height) + 42px + var(--safe-bottom)) !important;
    }

    .player-bar {
        max-width: 100vw !important;
        overflow: visible !important;
    }

    .pwa-install-card,
    .guest-preview-card,
    .pwa-guide-card,
    .modal-box {
        width: calc(100vw - 32px) !important;
        max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - var(--player-height) - 24px);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .content-body {
        padding-bottom: calc(var(--player-height) + 46px + var(--safe-bottom)) !important;
    }

    .player-bar {
        align-items: center !important;
    }
}

/* 47李?理쒖쥌 ?ъ슜???붾㈃ ?곗꽑?쒖쐞 蹂댁젙 */
.compact-song-card {
    grid-template-columns: 34px 44px minmax(0, 1fr) auto !important;
}

.compact-song-actions {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    min-width: 82px !important;
}

.compact-song-actions .like-btn,
.compact-song-actions .add-next-btn,
.compact-song-actions .add-playlist-btn,
.song-action-group .like-btn,
.song-action-group .add-next-btn,
.song-action-group .add-playlist-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

@media (min-width: 768px) and (max-width: 1199px) {
    .compact-song-card {
        grid-template-columns: 38px 50px minmax(0, 1fr) auto !important;
    }
}

@media (max-width: 767px) {
    .compact-song-card {
        grid-template-columns: 38px 48px minmax(0, 1fr) auto !important;
    }

    .compact-song-actions {
        min-width: 42px !important;
        flex-direction: column !important;
    }
}

/* Season 2 stability: keep the admin center as a predictable single-column workspace. */
.admin-dashboard {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
}

.admin-dashboard > .page-title-section { order: 1 !important; }
.admin-dashboard > .admin-session-card { order: 2 !important; }
.admin-dashboard > .library-stat-grid { order: 3 !important; }
.admin-dashboard > .admin-operation-center-section { order: 4 !important; }
.admin-dashboard > .admin-library-health-section { order: 5 !important; }
.admin-dashboard > .admin-center-menu-section { order: 6 !important; }
.admin-dashboard > .admin-workspace-section { order: 7 !important; }
.admin-dashboard > .recovery-action-section { order: 8 !important; }
.admin-dashboard > #auto-diagnostic-report { order: 9 !important; }
.admin-dashboard > .backup-status-dashboard-section { order: 10 !important; }
.admin-dashboard > .operation-overview-section { order: 11 !important; }
.admin-dashboard > .admin-issue-section { order: 12 !important; }
.admin-dashboard > .home-section-grid { order: 13 !important; }

.admin-dashboard .operation-overview-section {
    display: grid !important;
    width: auto !important;
    margin-left: 0 !important;
}

.admin-workspace-section[hidden] {
    display: none !important;
}

.admin-workspace-body img {
    max-width: 100%;
    height: auto;
}

/* Season 2 43rd update: library health check summary. */
.admin-dashboard > .admin-operation-center-section { order: 4 !important; }
.admin-dashboard > .admin-library-health-section { order: 5 !important; }
.admin-dashboard > .admin-center-menu-section { order: 6 !important; }
.admin-dashboard > .admin-workspace-section { order: 7 !important; }
.admin-dashboard > .recovery-action-section { order: 8 !important; }
.admin-dashboard > #auto-diagnostic-report { order: 9 !important; }
.admin-dashboard > .backup-status-dashboard-section { order: 10 !important; }
.admin-dashboard > .operation-overview-section { order: 11 !important; }
.admin-dashboard > .admin-issue-section { order: 12 !important; }
.admin-dashboard > .home-section-grid { order: 13 !important; }

.admin-library-health-section,
.library-health-summary-section,
.library-health-sample-section {
    display: grid;
    gap: 16px;
}

.admin-library-health-head,
.library-health-action-section .section-heading-row {
    align-items: center;
    gap: 14px;
}

.admin-library-health-actions,
.library-health-action-section .toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-library-health-grid,
.library-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.admin-library-health-card,
.library-health-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: 88px;
    padding: 14px;
    border: 1px solid var(--border-color, #dfe5e1);
    border-radius: 18px;
    background: color-mix(in srgb, var(--card-bg, #ffffff) 92%, #f7fbff 8%);
    color: var(--text-color, #111827);
    text-decoration: none;
    box-shadow: 0 12px 26px rgba(17, 24, 39, 0.06);
}

.admin-library-health-card:hover,
.admin-library-health-card:focus-visible,
.library-health-card:hover,
.library-health-card:focus-visible {
    border-color: color-mix(in srgb, var(--accent-color, #16a34a) 44%, var(--border-color, #dfe5e1));
    transform: translateY(-1px);
}

.admin-library-health-card.status-warning,
.library-health-card.status-warning {
    border-color: color-mix(in srgb, #f59e0b 42%, var(--border-color, #dfe5e1));
    background: color-mix(in srgb, var(--card-bg, #ffffff) 88%, #fff7ed 12%);
}

.admin-library-health-card.status-error,
.library-health-card.status-error {
    border-color: color-mix(in srgb, #ef4444 46%, var(--border-color, #dfe5e1));
    background: color-mix(in srgb, var(--card-bg, #ffffff) 88%, #fef2f2 12%);
}

.admin-library-health-icon,
.library-health-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent-color, #16a34a) 14%, transparent);
    color: var(--accent-color, #16a34a);
}

.admin-library-health-main,
.library-health-card-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.admin-library-health-main strong,
.admin-library-health-main small,
.library-health-card-main strong,
.library-health-card-main small,
.library-health-card-main em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-library-health-main small,
.library-health-card-main small,
.library-health-card-main em {
    color: var(--muted-text, #667085);
    font-size: 0.82rem;
    font-style: normal;
}

.admin-library-health-count,
.library-health-card-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-color, #16a34a) 12%, var(--card-bg, #ffffff));
    color: var(--accent-color, #16a34a);
    font-weight: 900;
}

.admin-library-health-empty {
    margin: 0;
    color: var(--muted-text, #667085);
}

.library-health-table-wrap {
    overflow-x: auto;
}

.library-health-table td,
.library-health-table th {
    vertical-align: middle;
}

body.theme-dark .admin-library-health-card,
body.theme-dark .library-health-card {
    background: color-mix(in srgb, var(--card-bg, #111827) 88%, #0b1f2a 12%);
    box-shadow: none;
}

body.theme-dark .admin-library-health-card.status-warning,
body.theme-dark .library-health-card.status-warning {
    background: color-mix(in srgb, var(--card-bg, #111827) 88%, #422006 12%);
}

body.theme-dark .admin-library-health-card.status-error,
body.theme-dark .library-health-card.status-error {
    background: color-mix(in srgb, var(--card-bg, #111827) 88%, #450a0a 12%);
}

@media (max-width: 767px) {
    .admin-library-health-head,
    .library-health-action-section .section-heading-row {
        display: grid;
        align-items: start;
    }

    .admin-library-health-actions,
    .library-health-action-section .toolbar-actions {
        justify-content: flex-start;
    }

    .admin-library-health-grid,
    .library-health-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-library-health-card,
    .library-health-card {
        grid-template-columns: 38px minmax(0, 1fr) auto;
        min-height: 82px;
        padding: 12px;
        border-radius: 16px;
    }

    .admin-library-health-icon,
    .library-health-card-icon {
        width: 38px;
        height: 38px;
        border-radius: 13px;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .admin-library-health-grid,
    .library-health-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Season 2 42nd update: admin operation center summary. */
.admin-dashboard > .admin-operation-center-section { order: 4 !important; }
.admin-dashboard > .admin-center-menu-section { order: 5 !important; }
.admin-dashboard > .admin-workspace-section { order: 6 !important; }
.admin-dashboard > .recovery-action-section { order: 7 !important; }
.admin-dashboard > #auto-diagnostic-report { order: 8 !important; }
.admin-dashboard > .backup-status-dashboard-section { order: 9 !important; }
.admin-dashboard > .operation-overview-section { order: 10 !important; }
.admin-dashboard > .admin-issue-section { order: 11 !important; }
.admin-dashboard > .home-section-grid { order: 12 !important; }

.admin-operation-center-section {
    display: grid;
    gap: 16px;
}

.admin-operation-center-head {
    align-items: center;
    gap: 16px;
}

.admin-operation-center-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
}

.admin-operation-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: 92px;
    padding: 14px;
    border: 1px solid var(--border-color, #dfe5e1);
    border-radius: 18px;
    background: color-mix(in srgb, var(--card-bg, #ffffff) 92%, #f5fbf7 8%);
    color: var(--text-color, #111827);
    text-decoration: none;
    box-shadow: 0 12px 26px rgba(17, 24, 39, 0.06);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.admin-operation-card:hover,
.admin-operation-card:focus-visible {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent-color, #16a34a) 46%, var(--border-color, #dfe5e1));
    box-shadow: 0 16px 32px rgba(17, 24, 39, 0.1);
}

.admin-operation-card.status-warning {
    border-color: color-mix(in srgb, #f59e0b 42%, var(--border-color, #dfe5e1));
    background: color-mix(in srgb, var(--card-bg, #ffffff) 88%, #fff7ed 12%);
}

.admin-operation-card.status-error {
    border-color: color-mix(in srgb, #ef4444 46%, var(--border-color, #dfe5e1));
    background: color-mix(in srgb, var(--card-bg, #ffffff) 88%, #fef2f2 12%);
}

.admin-operation-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent-color, #16a34a) 14%, transparent);
    color: var(--accent-color, #16a34a);
    font-size: 1.02rem;
}

.admin-operation-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.admin-operation-main strong,
.admin-operation-main small,
.admin-operation-main em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-operation-main strong {
    font-size: 0.98rem;
    font-weight: 800;
}

.admin-operation-main small,
.admin-operation-main em {
    color: var(--muted-text, #667085);
    font-size: 0.82rem;
    font-style: normal;
}

.admin-operation-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-color, #16a34a) 12%, var(--card-bg, #ffffff));
    color: var(--accent-color, #16a34a);
    font-weight: 900;
}

body.theme-dark .admin-operation-card {
    background: color-mix(in srgb, var(--card-bg, #111827) 88%, #0f1f18 12%);
    box-shadow: none;
}

body.theme-dark .admin-operation-card.status-warning {
    background: color-mix(in srgb, var(--card-bg, #111827) 88%, #422006 12%);
}

body.theme-dark .admin-operation-card.status-error {
    background: color-mix(in srgb, var(--card-bg, #111827) 88%, #450a0a 12%);
}

@media (max-width: 767px) {
    .admin-operation-center-head {
        display: grid;
        align-items: start;
    }

    .admin-operation-center-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-operation-card {
        grid-template-columns: 38px minmax(0, 1fr) auto;
        min-height: 84px;
        padding: 12px;
        border-radius: 16px;
    }

    .admin-operation-icon {
        width: 38px;
        height: 38px;
        border-radius: 13px;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .admin-operation-center-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Admin workspace: load management pages in-place instead of forcing a round trip. */
.admin-dashboard > .page-title-section {
    order: 1 !important;
}

.admin-dashboard > .admin-session-card {
    order: 2 !important;
}

.admin-dashboard > .library-stat-grid {
    order: 3 !important;
}

.admin-dashboard > .admin-center-menu-section {
    order: 4 !important;
}

.admin-dashboard > .admin-workspace-section {
    order: 5 !important;
}

.admin-dashboard > .recovery-action-section {
    order: 6 !important;
}

.admin-dashboard > #auto-diagnostic-report {
    order: 7 !important;
}

.admin-dashboard > .backup-status-dashboard-section {
    order: 8 !important;
}

.admin-dashboard > .operation-overview-section {
    order: 9 !important;
}

.admin-dashboard > .admin-issue-section {
    order: 10 !important;
}

.admin-dashboard > .home-section-grid {
    order: 11 !important;
}

.admin-workspace-section {
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid color-mix(in srgb, var(--accent-color) 18%, var(--border-color)) !important;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08) !important;
}

.admin-workspace-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent-color) 8%, transparent), var(--surface-color));
}

.admin-workspace-eyebrow {
    display: inline-flex;
    margin-bottom: 4px;
    color: var(--accent-color);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.admin-workspace-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-workspace-status {
    margin: 14px 18px 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--accent-color) 9%, var(--surface-muted));
    color: var(--text-primary);
    font-weight: 700;
}

.admin-workspace-status.status-error {
    background: color-mix(in srgb, #ef4444 12%, var(--surface-muted));
    color: #b91c1c;
}

.admin-workspace-body {
    max-height: min(78vh, 920px);
    overflow: auto;
    padding: 18px;
    background: var(--bg-color);
    outline: none;
}

.admin-workspace-body > .admin-dashboard,
.admin-workspace-body > .metadata-quality-page,
.admin-workspace-body > .feedback-admin-page {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
}

.admin-workspace-body .page-title-section {
    margin-bottom: 0 !important;
}

.admin-workspace-body .page-main-title {
    font-size: clamp(1.35rem, 2.2vw, 2rem) !important;
}

.admin-workspace-body .home-section,
.admin-workspace-body .settings-card {
    border-radius: 14px !important;
}

.admin-workspace-body .table-container {
    max-width: 100%;
    overflow-x: auto;
}

.admin-hub-card.is-active {
    border-color: color-mix(in srgb, var(--accent-color) 54%, var(--border-color)) !important;
    background: color-mix(in srgb, var(--accent-color) 13%, var(--surface-color)) !important;
    box-shadow: inset 3px 0 0 var(--accent-color), 0 12px 26px rgba(15, 23, 42, 0.08) !important;
}

@media (min-width: 1200px) {
    .admin-dashboard .operation-overview-section {
        display: grid !important;
        width: auto !important;
        margin-left: 0 !important;
    }
}

@media (max-width: 767px) {
    .admin-workspace-head {
        display: grid;
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .admin-workspace-actions {
        justify-content: stretch;
    }

    .admin-workspace-actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .admin-workspace-body {
        max-height: calc(100dvh - var(--safe-top) - var(--player-height) - 170px);
        padding: 14px;
    }
}

/* Admin center priority order: keep the management menu near the top for repeated tasks. */
.admin-dashboard {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: var(--admin-panel-gap, 18px) !important;
}

.admin-dashboard > .page-title-section {
    order: 1;
}

.admin-dashboard > .admin-session-card {
    order: 2;
}

.admin-dashboard > .library-stat-grid {
    order: 3;
}

.admin-dashboard > .admin-center-menu-section {
    order: 4;
}

.admin-dashboard > .recovery-action-section {
    order: 5;
}

.admin-dashboard > #auto-diagnostic-report {
    order: 6;
}

.admin-dashboard > .backup-status-dashboard-section {
    order: 7;
}

.admin-dashboard > .operation-overview-section {
    order: 8;
}

.admin-dashboard > .admin-issue-section {
    order: 9;
}

.admin-dashboard > .home-section-grid {
    order: 10;
}

@media (min-width: 1200px) {
    .admin-dashboard .operation-overview-section {
        width: auto !important;
        margin-left: 0 !important;
    }
}

/* Final admin-center redesign override: compact, grouped, and search-first. */
.admin-dashboard {
    --admin-panel-gap: clamp(12px, 1.8vw, 18px);
}

.admin-dashboard > .page-title-section {
    margin-bottom: 12px !important;
}

.admin-dashboard > .page-title-section .page-subtitle {
    max-width: 760px;
}

.admin-dashboard .admin-session-card {
    padding: 14px 16px !important;
    border-radius: 14px !important;
}

.admin-dashboard .admin-session-card .section-title {
    font-size: 1rem !important;
    margin-bottom: 4px !important;
}

.admin-dashboard > .library-stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)) !important;
    gap: 10px !important;
}

.admin-dashboard > .library-stat-grid .library-stat-card {
    min-height: auto !important;
    padding: 13px 14px !important;
    border-radius: 14px !important;
}

.admin-dashboard > .library-stat-grid .library-stat-label {
    font-size: 0.78rem !important;
}

.admin-dashboard > .library-stat-grid .library-stat-value {
    font-size: clamp(1.25rem, 2.4vw, 1.7rem) !important;
}

.admin-dashboard .home-section {
    border-radius: 16px !important;
}

.admin-dashboard .section-title {
    font-size: clamp(1.02rem, 1.8vw, 1.18rem) !important;
}

.admin-dashboard .operation-status-grid,
.admin-dashboard .backup-status-dashboard-grid,
.admin-dashboard .admin-auto-diagnostic-grid,
.admin-dashboard .admin-issue-grid {
    gap: 10px !important;
}

.admin-dashboard .operation-status-card,
.admin-dashboard .backup-status-dashboard-card,
.admin-dashboard .admin-auto-diagnostic-card {
    min-height: auto !important;
    padding: 13px 14px !important;
    border-radius: 14px !important;
}

.admin-dashboard .recovery-action-section .dashboard-quick-actions {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
    gap: 10px !important;
}

.admin-dashboard .recovery-action-section .dashboard-quick-actions .btn {
    justify-content: center !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding-inline: 12px !important;
}

.admin-dashboard .admin-center-menu-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 340px) !important;
    align-items: end !important;
    gap: 14px !important;
}

.admin-dashboard .admin-center-search {
    width: 100% !important;
    min-height: 42px !important;
    border-radius: 14px !important;
}

.admin-dashboard .admin-center-sections {
    gap: 10px !important;
}

.admin-dashboard .admin-center-section {
    display: grid !important;
    grid-template-columns: minmax(150px, 210px) minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 14px !important;
    padding: 12px !important;
    border-radius: 14px !important;
}

.admin-dashboard .admin-center-section-title {
    display: grid !important;
    gap: 4px !important;
    align-items: start !important;
}

.admin-dashboard .admin-center-section-title strong {
    font-size: 0.96rem !important;
}

.admin-dashboard .admin-center-section-title span {
    font-size: 0.8rem !important;
    line-height: 1.42 !important;
}

.admin-dashboard .admin-center-section .admin-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
    gap: 8px !important;
}

.admin-dashboard .admin-center-section .admin-hub-card {
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    grid-template-areas:
        "icon title"
        "icon desc" !important;
    align-items: center !important;
    gap: 2px 10px !important;
    min-height: 58px !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
}

.admin-dashboard .admin-center-section .admin-hub-card i {
    grid-area: icon !important;
    width: 34px !important;
    height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    background: color-mix(in srgb, var(--accent-color) 12%, transparent) !important;
    color: var(--accent-color) !important;
    font-size: 0.95rem !important;
}

.admin-dashboard .admin-center-section .admin-hub-card strong {
    grid-area: title !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 0.92rem !important;
}

.admin-dashboard .admin-center-section .admin-hub-card span {
    grid-area: desc !important;
    min-width: 0 !important;
    color: var(--text-muted) !important;
    font-size: 0.78rem !important;
    line-height: 1.35 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

@media (min-width: 1200px) {
    .admin-dashboard .operation-overview-section {
        display: inline-grid !important;
        width: calc(50% - var(--admin-panel-gap) / 2) !important;
        vertical-align: top !important;
    }

    .admin-dashboard .operation-overview-section + .operation-overview-section {
        margin-left: var(--admin-panel-gap) !important;
    }
}

@media (max-width: 1023px) {
    .admin-dashboard .admin-center-menu-head,
    .admin-dashboard .admin-center-section {
        grid-template-columns: 1fr !important;
    }

    .admin-dashboard .admin-center-section .admin-card-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    }
}

@media (max-width: 767px) {
    .admin-dashboard > .library-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .admin-dashboard .recovery-action-section .dashboard-quick-actions,
    .admin-dashboard .admin-center-section .admin-card-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Mobile input zoom guard: iOS zooms focused fields below 16px. */
@media (hover: none), (max-width: 1199px) {
    input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    select,
    textarea,
    .form-control,
    .search-input,
    .filter-input,
    .download-filename-input,
    .sidebar-menu-filter input {
        font-size: 16px !important;
        line-height: 1.35 !important;
        -webkit-text-size-adjust: 100%;
    }

    input::placeholder,
    textarea::placeholder,
    .search-input::placeholder,
    .filter-input::placeholder {
        font-size: 16px !important;
        line-height: 1.35 !important;
    }
}

/* Admin music upload */
.page-title-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.music-upload-page {
    padding-bottom: calc(var(--bottom-player-height, 96px) + var(--safe-bottom, 0px) + 32px);
}

.music-upload-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 18px;
    align-items: start;
}

.music-upload-form,
.music-upload-side,
.music-upload-result {
    min-width: 0;
}

.music-upload-form {
    display: grid;
    gap: 16px;
}

.music-upload-panel,
.music-upload-info-card,
.music-upload-result {
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--bg-primary);
    box-shadow: var(--shadow-soft);
}

.music-upload-panel {
    display: grid;
    gap: 18px;
    padding: 20px;
}

.music-upload-panel-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.music-upload-panel-head > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent-color) 12%, var(--bg-tertiary));
    color: var(--accent-color);
    font-size: 1.15rem;
}

.music-upload-panel-head h2 {
    margin: 0 0 5px;
    color: var(--text-primary);
    font-size: 1.08rem;
}

.music-upload-panel-head p,
.music-upload-field small,
.music-upload-info-card p,
.music-upload-drop span {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.music-upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.music-upload-field {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.music-upload-field-wide {
    grid-column: 1 / -1;
}

.music-upload-field span {
    color: var(--text-primary);
    font-weight: 900;
}

.music-upload-field input {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.music-folder-browser {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--bg-secondary);
}

.music-folder-browser-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.music-folder-current {
    min-width: 0;
}

.music-folder-current small {
    display: block;
    margin-bottom: 3px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
}

.music-folder-current strong {
    display: block;
    max-width: 100%;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-folder-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.music-folder-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    max-height: 260px;
    overflow: auto;
    padding: 2px;
}

.music-folder-item,
.music-folder-empty {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.music-folder-item {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.music-folder-item:hover,
.music-folder-item:focus-visible {
    border-color: color-mix(in srgb, var(--accent-color) 42%, var(--border-color));
    box-shadow: 0 10px 24px color-mix(in srgb, var(--accent-color) 10%, transparent);
    outline: none;
    transform: translateY(-1px);
}

.music-folder-item i {
    color: var(--accent-color);
}

.music-folder-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 900;
}

.music-folder-item small {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
}

.music-folder-empty {
    grid-column: 1 / -1;
    padding: 12px;
    color: var(--text-secondary);
    text-align: center;
}

.music-upload-drop {
    position: relative;
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 190px;
    padding: 22px;
    border: 1px dashed color-mix(in srgb, var(--accent-color) 42%, var(--border-color));
    border-radius: 18px;
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--accent-color) 9%, transparent), transparent 65%),
        var(--bg-secondary);
    text-align: center;
    cursor: pointer;
}

.music-upload-drop input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.music-upload-drop i {
    color: var(--accent-color);
    font-size: 2rem;
}

.music-upload-drop strong {
    color: var(--text-primary);
    font-size: 1.05rem;
}

.music-upload-file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 34px;
}

.music-upload-file-list span,
.music-upload-file-list strong {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-upload-file-list strong {
    color: var(--accent-color);
}

.music-upload-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.music-upload-side {
    display: grid;
    gap: 12px;
}

.music-upload-info-card {
    display: grid;
    gap: 8px;
    padding: 18px;
}

.music-upload-info-card span {
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 800;
}

.music-upload-info-card strong {
    color: var(--text-primary);
    font-size: 1.08rem;
}

.music-upload-info-card.is-ok {
    border-color: color-mix(in srgb, var(--accent-color) 34%, var(--border-color));
}

.music-upload-info-card.is-warning {
    border-color: color-mix(in srgb, #f59e0b 52%, var(--border-color));
}

.music-upload-info-card b {
    color: var(--text-primary);
}

.music-upload-result {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    padding: 20px;
}

.music-upload-result-list {
    display: grid;
    gap: 10px;
}

.music-upload-result-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) minmax(120px, 220px) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-secondary);
}

.music-upload-result-row i {
    color: var(--accent-color);
}

.music-upload-result-row strong,
.music-upload-result-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-upload-result-row strong {
    color: var(--text-primary);
}

.music-upload-result-row span,
.music-upload-result-row small {
    color: var(--text-secondary);
}

/* Commercial 16: home today recommendation card */
.today-recommend-section {
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid color-mix(in srgb, var(--accent-color) 22%, var(--border-color));
    border-radius: 22px;
    background:
        radial-gradient(circle at 12% 12%, color-mix(in srgb, var(--accent-color) 13%, transparent), transparent 36%),
        linear-gradient(145deg, color-mix(in srgb, var(--accent-color) 6%, var(--bg-primary)), var(--bg-primary));
    box-shadow: var(--shadow-soft);
    min-width: 0;
}

.today-recommend-heading {
    margin-bottom: 0;
}

.today-recommend-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 14px;
    min-width: 0;
}

.today-recommend-primary,
.today-recommend-mini {
    min-width: 0;
    border: 1px solid var(--border-color);
    background: color-mix(in srgb, var(--bg-primary) 88%, var(--accent-color) 4%);
}

.today-recommend-primary {
    display: grid;
    grid-template-columns: 176px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 18px;
    border-radius: 20px;
}

.today-recommend-cover {
    width: 176px;
    height: 176px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.15);
}

.today-recommend-main {
    display: grid;
    align-content: center;
    gap: 10px;
    min-width: 0;
}

.today-recommend-title {
    color: var(--text-primary);
    font-size: clamp(1.55rem, 3vw, 2.2rem);
    font-weight: 950;
    line-height: 1.12;
    letter-spacing: 0;
    text-decoration: none;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.today-recommend-main p {
    margin: 0;
    min-width: 0;
    color: var(--text-secondary);
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.today-recommend-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.today-recommend-actions .today-recommend-play-btn {
    width: auto;
    min-width: 118px;
    height: 42px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    color: #fff;
    background: var(--accent-color);
    box-shadow: 0 14px 26px color-mix(in srgb, var(--accent-color) 24%, transparent);
}

.today-recommend-actions .today-recommend-play-btn i {
    margin: 0;
    font-size: 0.9rem;
}

.today-recommend-actions .like-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.today-recommend-actions .like-btn.liked {
    color: var(--accent-color);
    border-color: color-mix(in srgb, var(--accent-color) 34%, var(--border-color));
    background: color-mix(in srgb, var(--accent-color) 10%, var(--bg-secondary));
}

.today-recommend-list {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.today-recommend-mini {
    display: grid;
    grid-template-columns: 38px 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 16px;
}

.today-recommend-mini-meta {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.today-recommend-mini-meta a,
.today-recommend-mini-meta span,
.today-recommend-mini-meta small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.today-recommend-mini-meta a {
    color: var(--text-primary);
    font-weight: 900;
    text-decoration: none;
}

.today-recommend-mini-meta span,
.today-recommend-mini-meta small {
    color: var(--text-secondary);
    font-size: 0.84rem;
}

@media (min-width: 768px) and (max-width: 1199px) {
    .music-upload-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .music-upload-side {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .today-recommend-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .today-recommend-primary {
        grid-template-columns: 150px minmax(0, 1fr);
    }

    .today-recommend-cover {
        width: 150px;
        height: 150px;
    }

    .today-recommend-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .page-title-actions,
    .music-upload-actions,
    .music-upload-title .page-title-actions {
        justify-content: stretch;
        width: 100%;
    }

    .page-title-actions .btn,
    .music-upload-actions .btn {
        flex: 1 1 100%;
        justify-content: center;
    }

    .music-upload-shell {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .music-upload-panel {
        padding: 16px;
        border-radius: 16px;
    }

    .music-upload-panel-head {
        align-items: center;
    }

    .music-upload-grid,
    .music-upload-side {
        grid-template-columns: minmax(0, 1fr);
    }

    .music-folder-browser {
        padding: 12px;
        border-radius: 14px;
    }

    .music-folder-browser-top {
        align-items: stretch;
        flex-direction: column;
    }

    .music-folder-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .music-folder-actions .btn {
        justify-content: center;
        width: 100%;
    }

    .music-folder-list {
        grid-template-columns: minmax(0, 1fr);
        max-height: 220px;
    }

    .music-upload-drop {
        min-height: 160px;
        padding: 18px 14px;
    }

    .today-recommend-section {
        gap: 14px;
        padding: 16px;
        border-radius: 20px;
    }

    .today-recommend-layout,
    .today-recommend-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .today-recommend-primary {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        text-align: center;
        padding: 16px;
    }

    .today-recommend-cover {
        width: min(64vw, 180px);
        height: min(64vw, 180px);
    }

    .today-recommend-main {
        justify-items: center;
        width: 100%;
    }

    .today-recommend-main p {
        max-width: 100%;
    }

    .today-recommend-actions {
        justify-content: center;
        width: 100%;
    }

    .today-recommend-actions .btn {
        min-height: 40px;
    }

    .today-recommend-actions .today-recommend-play-btn {
        flex: 1 1 150px;
        min-width: 0;
    }

    .music-upload-result {
        padding: 16px;
        border-radius: 16px;
    }

    .music-upload-result-row {
        grid-template-columns: 28px minmax(0, 1fr);
        gap: 8px 10px;
    }

    .music-upload-result-row span,
    .music-upload-result-row small {
        grid-column: 2;
    }
}

/* User music request board */
.music-request-page {
    display: grid;
    gap: 18px;
    padding-bottom: calc(var(--bottom-player-height, 96px) + var(--safe-bottom, 0px) + 32px);
}

.music-request-hero {
    align-items: flex-end;
}

.music-request-counts {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.music-request-counts > span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 7px 13px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-primary);
    color: var(--accent-color);
    font-weight: 900;
}

.music-request-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 18px;
    align-items: start;
}

.music-request-main,
.music-request-side,
.music-request-list {
    min-width: 0;
}

.music-request-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.music-request-filter a,
.music-request-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 900;
}

.music-request-filter a.active,
.music-request-status.status-pending {
    border-color: color-mix(in srgb, var(--accent-color) 35%, var(--border-color));
    background: color-mix(in srgb, var(--accent-color) 12%, var(--bg-primary));
    color: var(--accent-color);
}

.music-request-status.status-in_progress {
    border-color: color-mix(in srgb, #f59e0b 50%, var(--border-color));
    background: color-mix(in srgb, #f59e0b 12%, var(--bg-primary));
    color: #b45309;
}

.music-request-status.status-completed {
    border-color: color-mix(in srgb, #22c55e 46%, var(--border-color));
    background: color-mix(in srgb, #22c55e 12%, var(--bg-primary));
    color: #16a34a;
}

.music-request-list {
    display: grid;
    gap: 12px;
}

.music-request-card,
.music-request-form,
.music-request-login-card,
.music-request-guide,
.music-request-empty {
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--bg-primary);
    box-shadow: var(--shadow-soft);
}

.music-request-card {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.music-request-card-head,
.music-request-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.music-request-card-head time,
.music-request-foot,
.music-request-meta,
.music-request-body,
.music-request-guide p,
.music-request-login-card p,
.music-request-form-head p {
    color: var(--text-secondary);
}

.music-request-card h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    overflow-wrap: anywhere;
}

.music-request-meta,
.music-request-body {
    margin: 0;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.music-request-meta span {
    margin: 0 6px;
    color: var(--text-muted);
}

.music-request-admin-note {
    display: grid;
    gap: 5px;
    padding: 12px;
    border-radius: 14px;
    background: var(--bg-secondary);
}

.music-request-admin-note strong {
    color: var(--text-primary);
}

.music-request-admin-note p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.music-request-status-form {
    display: grid;
    grid-template-columns: minmax(120px, 160px) minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding-top: 4px;
}

.music-request-status-form select,
.music-request-status-form input,
.music-request-form input,
.music-request-form textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--border-color);
    border-radius: 13px;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.music-request-status-form select,
.music-request-status-form input,
.music-request-form input {
    min-height: 42px;
    padding: 0 12px;
}

.music-request-form textarea {
    resize: vertical;
    min-height: 120px;
    padding: 12px;
}

.music-request-side {
    display: grid;
    gap: 14px;
}

.music-request-form {
    display: grid;
    gap: 13px;
    padding: 18px;
}

.music-request-form-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.music-request-form-head i,
.music-request-login-card i,
.music-request-empty i {
    color: var(--accent-color);
    font-size: 1.55rem;
}

.music-request-form-head h2 {
    margin: 0 0 4px;
    color: var(--text-primary);
    font-size: 1.08rem;
}

.music-request-form-head p,
.music-request-form label {
    margin: 0;
}

.music-request-form label {
    display: grid;
    gap: 7px;
}

.music-request-form label span {
    color: var(--text-primary);
    font-weight: 900;
}

.music-request-login-card,
.music-request-guide,
.music-request-empty {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.music-request-login-card strong,
.music-request-guide strong,
.music-request-empty strong {
    color: var(--text-primary);
}

.music-request-guide b {
    color: var(--text-primary);
}

.music-request-pagination {
    margin-top: 14px;
}

@media (min-width: 768px) and (max-width: 1199px) {
    .music-request-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .music-request-side {
        grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
    }
}

@media (max-width: 767px) {
    .music-request-hero {
        align-items: stretch;
    }

    .music-request-counts {
        justify-content: stretch;
        width: 100%;
    }

    .music-request-counts .btn,
    .music-request-counts > span {
        flex: 1 1 100%;
        justify-content: center;
    }

    .music-request-layout,
    .music-request-side {
        grid-template-columns: minmax(0, 1fr);
    }

    .music-request-filter {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .music-request-filter a {
        width: 100%;
    }

    .music-request-card,
    .music-request-form,
    .music-request-login-card,
    .music-request-guide,
    .music-request-empty {
        border-radius: 16px;
        padding: 16px;
    }

    .music-request-status-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .music-request-status-form .btn {
        justify-content: center;
    }
}

/* Mobile home widget redesign */
@media (max-width: 767px) {
    .home-dashboard {
        display: grid;
        gap: 16px;
    }

    .home-dashboard .page-title-section {
        margin-bottom: 2px;
    }

    .home-dashboard .page-main-title {
        font-size: clamp(28px, 9vw, 36px);
        line-height: 1.12;
        letter-spacing: 0;
    }

    .home-dashboard .page-subtitle {
        max-width: 28rem;
        font-size: 14px;
        line-height: 1.55;
    }

    .home-dashboard .library-stat-grid,
    .home-dashboard .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        margin: 4px 0 2px !important;
    }

    .home-dashboard .library-stat-card,
    .home-dashboard .stats-card {
        min-height: 88px;
        padding: 14px 14px 13px !important;
        border-radius: 18px !important;
        background:
            linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(246, 250, 255, 0.9)),
            var(--card-bg, var(--bg-secondary));
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    }

    body.theme-dark .home-dashboard .library-stat-card,
    body.theme-dark .home-dashboard .stats-card {
        background:
            linear-gradient(160deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.92)),
            var(--card-bg, var(--bg-secondary));
        box-shadow: none;
    }

    .home-dashboard .library-stat-label {
        font-size: 12px;
        font-weight: 700;
    }

    .home-dashboard .library-stat-value {
        font-size: 24px;
        line-height: 1.05;
    }

    .home-dashboard .home-section {
        padding: 16px !important;
        border-radius: 20px !important;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.94)),
            var(--card-bg, var(--bg-secondary));
        box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
    }

    body.theme-dark .home-dashboard .home-section {
        background:
            linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.92)),
            var(--card-bg, var(--bg-secondary));
        box-shadow: none;
    }

    .home-dashboard .section-heading-row {
        align-items: center;
        margin-bottom: 13px;
    }

    .home-dashboard .section-title {
        font-size: 18px;
        line-height: 1.25;
    }

    .home-dashboard .section-more-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 34px;
        padding: 0 12px;
        border-radius: 999px;
        border: 1px solid color-mix(in srgb, var(--accent-color) 24%, var(--border-color));
        background: color-mix(in srgb, var(--accent-color) 8%, var(--card-bg, #fff));
        font-size: 12px;
    }

    .home-dashboard .dashboard-quick-actions {
        display: grid !important;
        grid-auto-flow: column;
        grid-auto-columns: minmax(236px, 82vw);
        grid-template-columns: none !important;
        gap: 12px !important;
        margin: 0 -16px;
        padding: 0 16px 4px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .home-dashboard .dashboard-quick-actions::-webkit-scrollbar {
        display: none;
    }

    .home-dashboard .quick-action-card {
        display: grid !important;
        grid-template-columns: 48px minmax(0, 1fr);
        grid-template-areas:
            "icon title"
            "icon copy";
        align-items: center;
        min-height: 94px;
        padding: 16px !important;
        border-radius: 20px !important;
        scroll-snap-align: start;
        background:
            linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(239, 253, 244, 0.82)),
            var(--card-bg, var(--bg-secondary));
        box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    }

    body.theme-dark .home-dashboard .quick-action-card {
        background:
            linear-gradient(145deg, rgba(30, 41, 59, 0.96), rgba(7, 47, 33, 0.42)),
            var(--card-bg, var(--bg-secondary));
        box-shadow: none;
    }

    .home-dashboard .quick-action-card i {
        grid-area: icon;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 16px;
        background: color-mix(in srgb, var(--accent-color) 13%, var(--surface-soft, var(--bg-tertiary)));
        color: var(--accent-color);
        font-size: 19px;
    }

    .home-dashboard .quick-action-card strong {
        grid-area: title;
        min-width: 0;
        font-size: 16px;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .home-dashboard .quick-action-card span {
        grid-area: copy;
        min-width: 0;
        color: var(--text-secondary);
        font-size: 13px;
        line-height: 1.35;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .home-dashboard .home-quick-links {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        margin: 0 !important;
    }

    .home-dashboard .home-quick-links a {
        min-height: 48px;
        padding: 12px 12px !important;
        border-radius: 16px !important;
        background: color-mix(in srgb, var(--accent-color) 6%, var(--card-bg, var(--bg-secondary)));
        box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
    }

    .home-dashboard .home-quick-links span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: 700;
        font-size: 13px;
    }

    .home-dashboard .home-section-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .home-dashboard .daily-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .home-dashboard .daily-summary-grid div,
    .home-dashboard .admin-alert-row,
    .home-dashboard .explore-card {
        border-radius: 16px !important;
    }

    .home-dashboard .tag-cloud {
        display: flex;
        gap: 8px;
        margin: 0 -16px;
        padding: 0 16px 2px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }

    .home-dashboard .tag-cloud::-webkit-scrollbar {
        display: none;
    }

    .home-dashboard .tag-badge {
        flex: 0 0 auto;
        max-width: 70vw;
        min-height: 36px;
        display: inline-flex;
        align-items: center;
    }

    .home-dashboard .compact-song-grid {
        gap: 9px !important;
    }

    .home-dashboard .compact-song-card {
        grid-template-columns: 38px 50px minmax(0, 1fr) auto !important;
        gap: 9px !important;
        padding: 10px 8px !important;
        border: 1px solid color-mix(in srgb, var(--border-color) 82%, transparent);
        border-radius: 18px !important;
        background: color-mix(in srgb, var(--card-bg, var(--bg-secondary)) 88%, var(--accent-color) 3%);
    }

    .home-dashboard .compact-cover {
        width: 50px;
        height: 50px;
        border-radius: 14px;
    }

    .home-dashboard .compact-play {
        width: 38px !important;
        height: 38px !important;
        border-radius: 999px;
    }

    .home-dashboard .compact-title {
        font-size: 14px;
        line-height: 1.3;
    }

    .home-dashboard .compact-song-meta span,
    .home-dashboard .recommend-reason {
        font-size: 12px;
    }

    .home-dashboard .compact-song-actions {
        display: grid !important;
        grid-template-columns: repeat(2, 32px);
        min-width: 68px !important;
        gap: 4px !important;
    }

    .home-dashboard .compact-song-actions .like-btn,
    .home-dashboard .compact-song-actions .add-next-btn,
    .home-dashboard .compact-song-actions .add-playlist-btn,
    .home-dashboard .compact-song-actions .metadata-request-btn {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
    }
}

/* Metadata correction request */
.metadata-request-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text);
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease;
}

.metadata-request-btn:hover,
.metadata-request-btn:focus-visible {
    border-color: rgba(0, 200, 83, .45);
    color: var(--primary);
    background: rgba(0, 200, 83, .08);
    outline: none;
}

.compact-song-actions .metadata-request-btn,
.song-action-group .metadata-request-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
}

.compact-song-actions {
    flex-wrap: wrap !important;
    min-width: 86px !important;
    max-width: 90px !important;
}

.metadata-request-context {
    display: grid;
    gap: 5px;
}

.metadata-request-context strong {
    color: var(--text);
}

.metadata-request-context span {
    overflow-wrap: anywhere;
}

.metadata-request-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 16px 0;
}

.metadata-request-detail-grid h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.metadata-request-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0;
}

.metadata-request-admin-page .feedback-body-box {
    min-height: 120px;
}

.feedback-status-badge.status-applied {
    background: rgba(0, 200, 83, .12);
    color: var(--primary);
}

.feedback-status-badge.status-rejected {
    background: rgba(239, 68, 68, .1);
    color: var(--danger);
}

@media (max-width: 767px) {
    .metadata-request-detail-grid {
        grid-template-columns: 1fr;
    }

    .metadata-request-btn {
        width: 38px;
        height: 38px;
        min-width: 38px;
    }

    .compact-song-actions {
        min-width: 42px !important;
        max-width: 42px !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
    }
}

.admin-jobs-page .admin-job-filter-card,
.admin-jobs-page .admin-job-list-section {
    overflow: hidden;
}

.admin-job-filter-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.admin-job-filter-form label {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.admin-job-filter-form label span {
    font-weight: 700;
    color: var(--text-secondary);
}

.admin-job-name-cell,
.admin-job-time-cell,
.admin-job-summary-cell {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.admin-job-name-cell strong,
.admin-job-summary-cell span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.admin-job-name-cell small,
.admin-job-time-cell small,
.admin-job-summary-cell small,
.job-failed-count {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.job-type-chip {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    background: color-mix(in srgb, var(--accent-color, #00c73c) 12%, var(--surface-soft, #f3f6f8));
    color: var(--accent-color, #00a83b);
    font-size: 0.78rem;
    font-weight: 800;
}

.admin-job-progress {
    width: min(180px, 100%);
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--player-progress-bg, rgba(15, 23, 42, 0.12));
}

.admin-job-progress-bar {
    height: 100%;
    border-radius: inherit;
    background: var(--accent-color, #00c73c);
    transition: width 0.25s ease;
}

.status-badge.job-status-ok {
    background: color-mix(in srgb, var(--accent-color, #00c73c) 14%, #fff);
    color: #047857;
}

.status-badge.job-status-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.status-badge.job-status-info {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.status-badge.job-status-warning {
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
}

.status-badge.job-status-muted {
    background: var(--surface-soft, #eef2f7);
    color: var(--text-secondary);
}

.admin-job-empty-state {
    min-height: 220px;
    display: grid;
    place-items: center;
    gap: 8px;
    text-align: center;
    color: var(--text-secondary);
}

.admin-job-empty-state i {
    font-size: 2rem;
    color: var(--accent-color, #00c73c);
}

.admin-job-empty-state strong {
    color: var(--text-primary);
    font-size: 1.1rem;
}

.admin-job-pagination {
    margin-top: 18px;
}

@media (max-width: 1023px) {
    .admin-job-filter-form {
        grid-template-columns: 1fr;
    }

    .admin-jobs-table th,
    .admin-jobs-table td {
        white-space: normal;
    }

    .admin-job-progress {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .admin-job-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-jobs-table {
        min-width: 760px;
    }
}

/* ?곸슜?쒕퉬?ㅽ솕 11李? ?ъ슜???ㅼ젙 ?쇳꽣 */
.user-settings-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
}

.user-settings-hero,
.user-settings-footer-card,
.user-settings-card {
    border: 1px solid var(--border-color);
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--accent-color) 11%, transparent), transparent 42%),
        var(--bg-secondary);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.user-settings-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 28px;
    border-radius: 18px;
}

.user-settings-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-color);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
}

.user-settings-status {
    min-width: 180px;
    padding: 10px 14px;
    border: 1px solid color-mix(in srgb, var(--accent-color) 28%, var(--border-color));
    border-radius: 999px;
    color: var(--text-secondary);
    background: color-mix(in srgb, var(--accent-color) 7%, var(--bg-secondary));
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    opacity: 0.82;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.user-settings-status.is-visible {
    opacity: 1;
    transform: translateY(-1px);
}

.user-settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.user-settings-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    padding: 20px;
    border-radius: 16px;
}

.user-settings-card-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.user-settings-card-head h2,
.user-settings-footer-card h2 {
    margin: 0 0 4px;
    font-size: 18px;
    line-height: 1.25;
}

.user-settings-card-head p,
.user-settings-footer-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.user-settings-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-color) 12%, var(--bg-tertiary));
}

.settings-segmented {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: color-mix(in srgb, var(--bg-tertiary) 72%, transparent);
}

.settings-segmented label {
    min-width: 0;
}

.settings-segmented input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.settings-segmented span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 10px;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.settings-segmented input:checked + span {
    color: var(--text-primary);
    background: var(--bg-secondary);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-color) 38%, var(--border-color));
}

.setting-toggle-row,
.setting-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: color-mix(in srgb, var(--bg-secondary) 78%, var(--bg-tertiary));
}

.setting-toggle-row span,
.setting-field span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.setting-toggle-row strong {
    color: var(--text-primary);
    font-size: 14px;
}

.setting-toggle-row small {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.35;
}

.setting-toggle-row input[type="checkbox"] {
    width: 48px;
    height: 28px;
    min-width: 48px;
    accent-color: var(--accent-color);
}

.setting-field {
    align-items: stretch;
    flex-direction: column;
}

.setting-field > span {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 800;
}

.setting-field select,
.setting-field input[type="range"] {
    width: 100%;
    min-width: 0;
}

.settings-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.settings-action-row .btn {
    min-height: 44px;
}

.user-settings-footer-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    border-radius: 16px;
}

body.user-pref-hide-player .player-bar {
    display: none !important;
}

body.user-pref-hide-player .content-body {
    padding-bottom: calc(40px + var(--safe-bottom)) !important;
}

body.user-pref-hide-feedback #feedback-open-btn {
    display: none !important;
}

body.user-pref-hide-announcements #app-announcement-banner,
body.user-pref-hide-update-notices #app-announcement-banner.announcement-update {
    display: none !important;
}

body.user-pref-density-compact .compact-song-card {
    min-height: 70px !important;
}

body.user-pref-density-compact .song-table td,
body.user-pref-density-compact .data-table td {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

body.user-pref-density-card .song-table-wrapper {
    border-radius: 18px;
}

body.theme-light .user-settings-hero,
body.theme-light .user-settings-footer-card,
body.theme-light .user-settings-card {
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--accent-color) 9%, transparent), transparent 44%),
        #ffffff;
    border-color: #d8e2ee;
}

@media (max-width: 1199px) {
    .user-settings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .user-settings-page {
        max-width: 100%;
    }

    .user-settings-hero {
        padding: 24px;
    }
}

@media (max-width: 767px) {
    .user-settings-page {
        gap: 14px;
    }

    .user-settings-hero,
    .user-settings-footer-card {
        align-items: stretch;
        flex-direction: column;
        padding: 18px;
        border-radius: 16px;
    }

    .user-settings-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .user-settings-card {
        padding: 16px;
    }

    .setting-toggle-row {
        align-items: center;
    }

    .settings-segmented span {
        min-height: 40px;
        padding: 0 6px;
    }

    .settings-action-row .btn,
    .user-settings-footer-card .btn {
        width: 100%;
    }
}

/* ?곸슜?쒕퉬?ㅽ솕 9李? 理쒓렐 ?낅뜲?댄듃 / ?⑥튂?명듃 */
.patch-notes-page,
.patch-notes-admin-page {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.patch-notes-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 28px;
    border: 1px solid var(--border-color);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--accent-color) 14%, transparent), transparent 32%),
        var(--surface);
    box-shadow: var(--shadow-soft);
}

.patch-eyebrow,
.patch-latest-badge,
.patch-type-badge,
.patch-version,
.patch-new-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    border-radius: 999px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.patch-eyebrow {
    margin-bottom: 10px;
    color: var(--accent-color);
    font-size: 0.9rem;
}

.patch-latest-badge {
    padding: 10px 14px;
    background: color-mix(in srgb, var(--accent-color) 13%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--accent-color) 28%, var(--border-color));
    color: var(--accent-color);
}

.patch-notes-list-section {
    margin-top: 18px;
}

.patch-note-timeline {
    position: relative;
    display: grid;
    gap: 16px;
}

.patch-note-card {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 14px;
}

.patch-note-marker {
    width: 14px;
    height: 14px;
    margin-top: 22px;
    border-radius: 50%;
    background: var(--accent-color);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent-color) 13%, transparent);
}

.patch-note-card-body,
.patch-admin-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.patch-note-card-body h2,
.patch-admin-card h3 {
    margin: 10px 0 8px;
    color: var(--text-primary);
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.patch-note-card-body p,
.patch-note-details p,
.patch-admin-card p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.75;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.patch-note-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.patch-type-badge {
    padding: 6px 10px;
    background: color-mix(in srgb, var(--accent-color) 10%, var(--surface-soft));
    border: 1px solid color-mix(in srgb, var(--accent-color) 24%, var(--border-color));
    color: var(--accent-color);
}

.patch-version,
.patch-new-badge {
    padding: 6px 10px;
    background: var(--surface-soft);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.patch-new-badge {
    background: color-mix(in srgb, #22c55e 16%, var(--surface));
    border-color: color-mix(in srgb, #22c55e 34%, var(--border-color));
    color: #16a34a;
}

.patch-note-details summary {
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.patch-note-details summary::marker {
    color: var(--accent-color);
}

.patch-admin-list {
    display: grid;
    gap: 14px;
}

.patch-admin-empty-state {
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 170px;
    padding: 28px 18px;
    border: 1px dashed color-mix(in srgb, var(--accent-color) 26%, var(--border-color));
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface-soft) 72%, var(--surface));
    color: var(--text-secondary);
    text-align: center;
}

.patch-admin-empty-state strong {
    color: var(--text-primary);
    font-size: 1rem;
}

.patch-admin-empty-state p {
    max-width: 520px;
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.patch-admin-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--accent-color) 12%, var(--surface));
    color: var(--accent-color);
    font-size: 1.25rem;
}

.patch-admin-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
}

.patch-admin-card.is-hidden {
    opacity: 0.72;
}

.patch-admin-main {
    min-width: 0;
}

.patch-admin-actions,
.inline-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.patch-note-form-footer {
    gap: 14px;
}

.patch-note-editor-card {
    overflow: hidden;
    margin-bottom: 24px;
}

.patch-note-list-card {
    margin-top: 0;
}

.patch-note-form {
    display: grid;
    gap: 18px;
}

.patch-note-form .form-row {
    display: grid;
    grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1.2fr) minmax(220px, 1fr);
    gap: 14px;
    align-items: end;
}

.patch-note-form .form-group {
    min-width: 0;
    margin-bottom: 0;
}

.patch-note-form input[type="text"],
.patch-note-form input[type="datetime-local"],
.patch-note-form select,
.patch-note-form textarea {
    width: 100%;
    max-width: 100%;
    min-height: 42px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text-primary);
    font: inherit;
}

.patch-note-form input[type="text"],
.patch-note-form input[type="datetime-local"],
.patch-note-form select {
    padding: 0 14px;
}

.patch-note-form textarea {
    display: block;
    min-height: 180px;
    padding: 14px;
    resize: vertical;
    line-height: 1.6;
}

.patch-note-form textarea::placeholder,
.patch-note-form input::placeholder {
    color: var(--text-muted);
}

.patch-note-form-footer {
    align-items: center;
    justify-content: space-between;
    padding-top: 2px;
    margin-bottom: 0;
}

.patch-note-form-footer .check-row {
    margin-bottom: 0;
}

.patch-type-feature .patch-note-marker,
.patch-type-feature .patch-type-badge {
    --accent-color: #16a34a;
}

.patch-type-bugfix .patch-note-marker,
.patch-type-bugfix .patch-type-badge {
    --accent-color: #dc2626;
}

.patch-type-stability .patch-note-marker,
.patch-type-stability .patch-type-badge {
    --accent-color: #2563eb;
}

.patch-type-design .patch-note-marker,
.patch-type-design .patch-type-badge {
    --accent-color: #7c3aed;
}

.patch-type-security .patch-note-marker,
.patch-type-security .patch-type-badge {
    --accent-color: #ea580c;
}

@media (max-width: 767px) {
    .patch-notes-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px;
        border-radius: 18px;
    }

    .patch-note-card {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .patch-note-marker {
        display: none;
    }

    .patch-note-card-body,
    .patch-admin-card {
        padding: 18px;
        border-radius: 16px;
    }

    .patch-admin-card {
        grid-template-columns: 1fr;
    }

    .patch-admin-actions,
    .inline-actions {
        justify-content: flex-start;
    }

    .patch-note-form-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .patch-note-form .form-row {
        grid-template-columns: 1fr;
    }

    .patch-note-form textarea {
        min-height: 220px;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .patch-note-form .form-row {
        grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr);
    }

    .patch-note-form .form-row .form-group:last-child {
        grid-column: 1 / -1;
    }
}

/* ?곸슜?쒕퉬?ㅽ솕 10李? ?쒕퉬???곹깭 / ?먭? ?덈궡 */
.service-status-page,
.service-status-admin-page {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.service-status-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 14px;
    padding: 14px 18px;
    border: 1px solid color-mix(in srgb, #f59e0b 36%, var(--border-color));
    border-radius: 18px;
    background: color-mix(in srgb, #f59e0b 12%, var(--surface));
    box-shadow: var(--shadow-soft);
}

.service-status-banner-icon,
.service-status-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 16px;
}

.service-status-banner-icon {
    width: 42px;
    height: 42px;
    background: color-mix(in srgb, #f59e0b 17%, var(--surface));
    color: #d97706;
}

.service-status-banner-content {
    min-width: 0;
    flex: 1;
}

.service-status-banner-content strong {
    display: block;
    color: var(--text-primary);
    line-height: 1.35;
}

.service-status-banner-content p {
    margin: 4px 0 0;
    color: var(--text-secondary);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.service-status-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 28px;
    border: 1px solid var(--border-color);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--accent-color) 14%, transparent), transparent 34%),
        var(--surface);
    box-shadow: var(--shadow-soft);
}

.service-status-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--accent-color);
    font-weight: 800;
}

.service-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--surface-soft);
    color: var(--text-primary);
    font-weight: 800;
    white-space: nowrap;
}

.service-status-pill.status-ok,
.service-status-card-icon.status-ok {
    background: color-mix(in srgb, #22c55e 15%, var(--surface));
    color: #16a34a;
    border-color: color-mix(in srgb, #22c55e 34%, var(--border-color));
}

.service-status-pill.status-warning,
.service-status-card-icon.status-warning,
.service-status-card-icon.status-unknown {
    background: color-mix(in srgb, #f59e0b 15%, var(--surface));
    color: #d97706;
    border-color: color-mix(in srgb, #f59e0b 34%, var(--border-color));
}

.service-status-pill.status-maintenance,
.service-status-card-icon.status-maintenance {
    background: color-mix(in srgb, #2563eb 13%, var(--surface));
    color: #2563eb;
    border-color: color-mix(in srgb, #2563eb 30%, var(--border-color));
}

.service-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.service-status-card,
.service-maintenance-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.service-status-card-icon {
    width: 44px;
    height: 44px;
    border: 1px solid transparent;
}

.service-status-card div:last-child,
.service-maintenance-card div:last-child {
    min-width: 0;
}

.service-status-card span {
    color: var(--accent-color);
    font-size: 0.86rem;
    font-weight: 800;
}

.service-status-card h2,
.service-maintenance-card h2 {
    margin: 4px 0 6px;
    color: var(--text-primary);
    font-size: 1.08rem;
    line-height: 1.3;
}

.service-status-card p,
.service-maintenance-card p,
.service-status-help p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.service-maintenance-card {
    margin-top: 18px;
    border-color: color-mix(in srgb, #2563eb 28%, var(--border-color));
}

.service-maintenance-editor {
    margin: 18px 0 20px;
}

.service-maintenance-form {
    display: grid;
    gap: 16px;
}

.service-maintenance-form .form-group {
    margin-bottom: 0;
}

.service-maintenance-form input[type="text"],
.service-maintenance-form textarea {
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text-primary);
    font: inherit;
}

.service-maintenance-form input[type="text"] {
    min-height: 42px;
    padding: 0 14px;
}

.service-maintenance-form textarea {
    min-height: 150px;
    padding: 14px;
    resize: vertical;
    line-height: 1.6;
}

.service-maintenance-footer {
    align-items: center;
    margin-bottom: 0;
}

.service-status-admin-grid {
    margin-top: 0;
}

@media (max-width: 767px) {
    .service-status-banner,
    .service-status-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .service-status-banner {
        padding: 14px;
    }

    .service-status-hero {
        padding: 22px;
        border-radius: 18px;
    }

    .service-status-grid {
        grid-template-columns: 1fr;
    }

    .service-maintenance-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Feedback / bug report */
.feedback-fab {
    position: fixed;
    left: max(18px, env(safe-area-inset-left));
    bottom: calc(var(--player-height, 96px) + env(safe-area-inset-bottom) + 18px);
    z-index: 1300;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-lg, 0 16px 34px rgba(15, 23, 42, .16));
    font-weight: 800;
    cursor: pointer;
}

.feedback-fab:hover,
.feedback-fab:focus-visible {
    border-color: rgba(0, 200, 83, .45);
    color: var(--primary);
    outline: none;
}

.feedback-modal-overlay[hidden] {
    display: none !important;
}

.feedback-modal-overlay {
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.feedback-modal-box {
    width: min(560px, calc(100vw - 32px));
    max-height: min(760px, calc(100vh - 40px));
    overflow: hidden;
}

.feedback-form {
    display: grid;
    gap: 14px;
}

.feedback-field {
    display: grid;
    gap: 7px;
    font-weight: 800;
    color: var(--text);
}

.feedback-field input,
.feedback-field select,
.feedback-field textarea,
.feedback-status-form select,
.feedback-status-form textarea,
.feedback-filter-form input,
.feedback-filter-form select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--input-bg, var(--surface));
    color: var(--text);
    padding: 11px 13px;
    font: inherit;
}

.feedback-field textarea,
.feedback-status-form textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.55;
}

.feedback-context {
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--text-muted);
    font-size: .92rem;
    line-height: 1.45;
}

.feedback-modal-actions {
    justify-content: flex-end;
}

.feedback-admin-layout {
    display: grid;
    grid-template-columns: minmax(320px, .9fr) minmax(0, 1.3fr);
    gap: 18px;
}

.feedback-filter-form {
    display: grid;
    grid-template-columns: minmax(140px, 180px) minmax(140px, 180px) minmax(180px, 1fr) auto auto;
    gap: 10px;
    align-items: center;
}

.feedback-ticket-list {
    display: grid;
    gap: 10px;
}

.feedback-ticket {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
}

.feedback-ticket:hover,
.feedback-ticket.active {
    border-color: rgba(0, 200, 83, .45);
    box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
}

.feedback-ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.feedback-type-badge,
.feedback-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: .78rem;
}

.feedback-type-badge.type-bug,
.feedback-status-badge.status-held {
    background: rgba(239, 68, 68, .1);
    color: var(--danger);
}

.feedback-status-badge.status-completed,
.feedback-status-badge.status-resolved {
    background: rgba(0, 200, 83, .12);
    color: var(--primary);
}

.feedback-status-badge.status-reviewing {
    background: rgba(59, 130, 246, .12);
    color: #2563eb;
}

.feedback-status-badge.status-ignored {
    background: rgba(100, 116, 139, .12);
    color: var(--text-muted);
}

.feedback-ticket small,
.feedback-ticket-page {
    color: var(--text-muted);
    font-size: .9rem;
}

.feedback-detail-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.feedback-detail-head h2 {
    margin: 10px 0 0;
}

.feedback-detail-meta {
    display: grid;
    gap: 8px;
    margin: 0 0 16px;
}

.feedback-detail-meta div {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
}

.feedback-detail-meta dt {
    color: var(--text-muted);
    font-weight: 800;
}

.feedback-detail-meta dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.feedback-body-box {
    min-height: 160px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
    line-height: 1.65;
    white-space: normal;
    overflow-wrap: anywhere;
}

.feedback-status-form {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.feedback-status-form label {
    display: grid;
    gap: 7px;
    font-weight: 800;
}

.playback-failure-page .feedback-filter-form {
    grid-template-columns: minmax(120px, 150px) minmax(160px, 220px) minmax(120px, 150px) minmax(180px, 1fr) auto auto;
}

@media (max-width: 1199px) {
    .feedback-admin-layout {
        grid-template-columns: 1fr;
    }

    .playback-failure-page .feedback-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .feedback-fab {
        left: 14px;
        bottom: calc(var(--player-height, 88px) + env(safe-area-inset-bottom) + 12px);
        width: 46px;
        min-width: 46px;
        padding: 0;
        justify-content: center;
    }

    .feedback-fab span {
        display: none;
    }

    .feedback-modal-overlay {
        align-items: flex-end;
        padding: 12px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .feedback-modal-box {
        width: 100%;
        max-height: calc(100vh - 24px - env(safe-area-inset-bottom));
        border-radius: 22px;
    }

    .feedback-filter-form {
        grid-template-columns: 1fr;
    }

    .playback-failure-page .feedback-filter-form {
        grid-template-columns: 1fr;
    }

    .feedback-detail-meta div {
        grid-template-columns: 1fr;
    }
}

/* popular.php final column spacing override */
@media (min-width: 768px) {
    .popular-page .song-list-container {
        overflow-x: clip !important;
    }

    .popular-page .song-table {
        table-layout: auto !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .popular-page .song-table th,
    .popular-page .song-table td {
        box-sizing: border-box !important;
    }

    .popular-page .song-table th:nth-child(1),
    .popular-page .song-table td:nth-child(1) {
        width: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;
        padding-left: 4px !important;
        padding-right: 2px !important;
    }

    .popular-page .song-table th:nth-child(2),
    .popular-page .song-table td:nth-child(2) {
        width: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
        padding-left: 2px !important;
        padding-right: 4px !important;
    }

    .popular-page .song-table th:nth-child(3),
    .popular-page .song-table td:nth-child(3) {
        width: auto !important;
        min-width: 220px !important;
        padding-left: 4px !important;
    }

    .popular-page .song-table .play-row-btn {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
    }

    .popular-page .song-table .song-title-wrap {
        gap: 8px !important;
    }
}

@media (min-width: 768px) and (max-width: 899px) {
    .popular-page .song-table th:nth-child(1),
    .popular-page .song-table td:nth-child(1) {
        width: 32px !important;
        min-width: 32px !important;
        max-width: 32px !important;
    }

    .popular-page .song-table th:nth-child(2),
    .popular-page .song-table td:nth-child(2) {
        width: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;
    }

    .popular-page .song-table th:nth-child(3),
    .popular-page .song-table td:nth-child(3) {
        min-width: 180px !important;
    }
}

/* popular.php dedicated ranking list */
.popular-rank-list {
    display: grid;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-secondary);
}

.popular-rank-head,
.popular-rank-row {
    display: grid;
    grid-template-columns: 42px 42px minmax(240px, 1.8fr) minmax(110px, 0.8fr) minmax(150px, 1fr) minmax(90px, 0.7fr) 70px 76px 126px;
    align-items: center;
    column-gap: 8px;
}

.popular-rank-head {
    min-height: 52px;
    padding: 0 14px;
    background: var(--surface-soft);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 800;
}

.popular-rank-row {
    min-height: 72px;
    padding: 10px 14px;
    border-top: 1px solid var(--border-color);
}

.popular-rank-row.playing {
    background: color-mix(in srgb, var(--accent-color) 7%, transparent);
}

.popular-rank-number,
.popular-rank-play,
.popular-rank-duration,
.popular-rank-count,
.popular-rank-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.popular-rank-number {
    color: var(--text-primary);
    font-weight: 800;
}

.popular-rank-track {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.popular-rank-title-stack {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.popular-rank-title-stack span,
.popular-rank-artist,
.popular-rank-album,
.popular-rank-genre {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.popular-rank-title-stack span {
    display: none;
    color: var(--text-secondary);
    font-size: 12px;
}

.popular-rank-actions .song-action-group {
    flex-wrap: nowrap;
    justify-content: center;
}

.popular-empty-state {
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

@media (min-width: 900px) and (max-width: 1199px) {
    .popular-rank-head,
    .popular-rank-row {
        grid-template-columns: 34px 38px minmax(220px, 1.7fr) minmax(110px, 0.8fr) minmax(130px, 0.9fr) 64px 112px;
    }

    .popular-rank-head span:nth-child(6),
    .popular-rank-row .popular-rank-genre,
    .popular-rank-head span:nth-child(8),
    .popular-rank-row .popular-rank-count {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 899px) {
    .popular-rank-head,
    .popular-rank-row {
        grid-template-columns: 30px 36px minmax(0, 1fr) 62px 104px;
        column-gap: 6px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .popular-rank-head span:nth-child(4),
    .popular-rank-row .popular-rank-artist,
    .popular-rank-head span:nth-child(5),
    .popular-rank-row .popular-rank-album,
    .popular-rank-head span:nth-child(6),
    .popular-rank-row .popular-rank-genre,
    .popular-rank-head span:nth-child(8),
    .popular-rank-row .popular-rank-count {
        display: none;
    }

    .popular-rank-track {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 7px;
    }

    .popular-rank-title-stack span {
        display: block;
    }
}

@media (max-width: 767px) {
    .popular-rank-head {
        display: none;
    }

    .popular-rank-list {
        border: 0;
        background: transparent;
        gap: 10px;
    }

    .popular-rank-row {
        grid-template-columns: 30px 38px 48px minmax(0, 1fr) auto;
        column-gap: 8px;
        min-height: 76px;
        padding: 12px;
        border: 1px solid var(--border-color);
        border-radius: 14px;
        background: var(--bg-secondary);
    }

    .popular-rank-number {
        grid-column: 1;
    }

    .popular-rank-play {
        grid-column: 2;
    }

    .popular-rank-track {
        grid-column: 3 / 5;
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 9px;
    }

    .popular-rank-title-stack span {
        display: block;
    }

    .popular-rank-artist,
    .popular-rank-album,
    .popular-rank-genre,
    .popular-rank-duration,
    .popular-rank-count {
        display: none;
    }

    .popular-rank-actions {
        grid-column: 5;
    }

    .popular-rank-actions .song-action-group {
        flex-direction: column;
        gap: 5px;
    }
}

/* popular.php chart polish */
.popular-page {
    display: grid;
    gap: 18px;
}

.popular-page .page-title-section {
    margin-bottom: 0;
}

.popular-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: end;
}

.page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    color: var(--accent-color);
    font-size: 13px;
    font-weight: 800;
}

.popular-title-copy {
    min-width: 0;
}

.popular-stat-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    min-width: min(440px, 100%);
}

.popular-stat-row span {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--surface-soft);
    box-shadow: var(--shadow-soft);
}

.popular-stat-row b {
    color: var(--text-primary);
    font-size: 20px;
    line-height: 1.1;
}

.popular-stat-row small {
    color: var(--text-secondary);
    font-size: 12px;
}

.popular-filter-card {
    padding: 16px;
}

.popular-filter-form {
    display: grid;
    gap: 9px;
}

.popular-filter-form label {
    margin: 0;
    color: var(--text-secondary);
    font-weight: 700;
}

.popular-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
}

.popular-search-row input[type="search"] {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 0 14px;
}

.popular-page .song-list-container {
    max-width: 100%;
    overflow-x: auto;
}

.popular-page .song-table {
    table-layout: fixed;
    min-width: 1120px;
}

.popular-page .song-table th,
.popular-page .song-table td {
    padding: 14px 10px;
    max-width: none;
}

.popular-page .song-table th:nth-child(1),
.popular-page .song-table td:nth-child(1) {
    width: 46px;
    padding-left: 6px;
    padding-right: 6px;
}

.popular-page .song-table th:nth-child(2),
.popular-page .song-table td:nth-child(2) {
    width: 46px;
    padding-left: 6px;
    padding-right: 6px;
}

.popular-page .song-table th:nth-child(3),
.popular-page .song-table td:nth-child(3) {
    width: 280px;
    padding-left: 8px;
}

.popular-page .song-table th:nth-child(4),
.popular-page .song-table td:nth-child(4) {
    width: 150px;
}

.popular-page .song-table th:nth-child(5),
.popular-page .song-table td:nth-child(5) {
    width: 210px;
}

.popular-page .song-table th:nth-child(6),
.popular-page .song-table td:nth-child(6) {
    width: 110px;
}

.popular-page .song-table th:nth-child(7),
.popular-page .song-table td:nth-child(7),
.popular-page .song-table th:nth-child(8),
.popular-page .song-table td:nth-child(8),
.popular-page .song-table th:nth-child(9),
.popular-page .song-table td:nth-child(9) {
    width: 82px;
}

.popular-page .song-table th:nth-child(10),
.popular-page .song-table td:nth-child(10) {
    width: 142px;
}

.popular-page .song-table .song-title-cell,
.popular-page .song-table .artist-cell,
.popular-page .song-table .album-cell,
.popular-page .song-table .genre-cell {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.popular-page .song-table .song-title-wrap {
    min-width: 0;
    gap: 9px;
}

.popular-page .song-table .actions-cell {
    overflow: visible;
}

.popular-page .song-table .song-action-group {
    justify-content: center;
    flex-wrap: nowrap;
    gap: 6px;
    min-width: max-content;
}

@media (min-width: 768px) and (max-width: 1199px) {
    .popular-hero {
        grid-template-columns: 1fr;
    }

    .popular-stat-row {
        width: 100%;
    }

    .popular-page .song-table {
        min-width: 0;
        width: 100%;
        table-layout: fixed;
    }

    .popular-page .song-list-container {
        overflow-x: clip;
    }

    .popular-page .song-table th,
    .popular-page .song-table td {
        padding: 14px 8px;
    }

    .popular-page .song-table th:nth-child(1),
    .popular-page .song-table td:nth-child(1) {
        width: 40px;
        padding-left: 4px;
        padding-right: 4px;
    }

    .popular-page .song-table th:nth-child(2),
    .popular-page .song-table td:nth-child(2) {
        width: 40px;
        padding-left: 4px;
        padding-right: 4px;
    }

    .popular-page .song-table th:nth-child(3),
    .popular-page .song-table td:nth-child(3) {
        width: auto;
    }

    .popular-page .song-table th:nth-child(4),
    .popular-page .song-table td:nth-child(4) {
        width: 128px;
    }

    .popular-page .song-table th:nth-child(5),
    .popular-page .song-table td:nth-child(5),
    .popular-page .song-table th:nth-child(6),
    .popular-page .song-table td:nth-child(6),
    .popular-page .song-table th:nth-child(8),
    .popular-page .song-table td:nth-child(8) {
        display: none;
    }

    .popular-page .song-table th:nth-child(7),
    .popular-page .song-table td:nth-child(7) {
        width: 68px;
    }

    .popular-page .song-table th:nth-child(9),
    .popular-page .song-table td:nth-child(9) {
        width: 64px;
    }

    .popular-page .song-table th:nth-child(10),
    .popular-page .song-table td:nth-child(10) {
        width: 118px;
    }

    .popular-page .song-table .song-title-wrap {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 8px;
    }

    .popular-page .song-table .list-cover {
        width: 42px;
        height: 42px;
    }
}

@media (min-width: 768px) and (max-width: 899px) {
    .popular-page .song-table th:nth-child(4),
    .popular-page .song-table td:nth-child(4),
    .popular-page .song-table th:nth-child(9),
    .popular-page .song-table td:nth-child(9) {
        display: none;
    }

    .popular-page .song-table th:nth-child(10),
    .popular-page .song-table td:nth-child(10) {
        width: 108px;
    }
}

@media (max-width: 767px) {
    .popular-page {
        gap: 14px;
    }

    .popular-hero {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .popular-stat-row {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .popular-search-row {
        grid-template-columns: 1fr;
    }

    .popular-search-row .btn {
        width: 100%;
        justify-content: center;
    }

    .popular-page .song-list-container {
        overflow-x: clip;
    }

    .popular-page .song-table {
        min-width: 0;
    }

    .popular-page .song-table .actions-cell {
        overflow: visible;
    }
}

/* ?곸슜?쒕퉬?ㅽ솕 2李? 怨듯넻 ?ㅻ쪟/鍮??곹깭/湲??띿뒪???덉젙??*/
.modal-overlay[hidden],
.download-modal-overlay[hidden],
.pwa-install-modal[hidden],
.guest-preview-prompt[hidden],
.pwa-guide-modal[hidden] {
    display: none !important;
    pointer-events: none !important;
}

[aria-busy="true"] {
    cursor: progress;
}

.empty-state,
.empty-list-state,
.empty-text,
.queue-empty-text,
.loading-text {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.empty-state,
.empty-list-state {
    display: grid;
    place-items: center;
    gap: 12px;
    min-height: 132px;
    padding: clamp(22px, 4vw, 34px);
    text-align: center;
}

.empty-state .btn,
.empty-list-state .btn,
.empty-state-actions {
    justify-content: center;
    max-width: 100%;
}

.song-title,
.track-title,
.album-title,
.artist-name,
.playlist-title,
.card-title,
.song-title-text,
.song-title-wrap,
.song-title-stack,
.compact-song-title,
.compact-song-meta,
.player-song-title,
.player-song-artist,
.download-track-title,
.download-track-meta,
.queue-track-title,
.queue-track-meta,
.lyrics-text,
.note-text-block {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.song-title,
.track-title,
.album-title,
.artist-name,
.playlist-title,
.card-title,
.song-title-text,
.compact-song-title,
.player-song-title,
.queue-track-title {
    word-break: keep-all;
}

.badge,
.status-badge,
.metadata-badge,
.quality-badge,
.tag-chip,
.format-badge {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.table-responsive,
.table-wrapper,
.song-table-wrapper,
.admin-table-wrapper,
.backup-table-wrapper {
    overscroll-behavior-x: contain;
}

.song-table td,
.song-table th,
.admin-table td,
.admin-table th {
    min-width: 0;
}

.melon-lite-page-loading {
    max-width: calc(100vw - 32px);
}

@media (min-width: 768px) and (max-width: 1199px) {
    body.is-tablet-layout .content-body,
    body.is-tablet-layout .page-section,
    body.is-tablet-layout .section-card,
    body.is-tablet-layout .panel,
    body.is-tablet-layout .song-list-container {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    body.is-tablet-layout .song-table-wrapper,
    body.is-tablet-layout .admin-table-wrapper,
    body.is-tablet-layout .table-responsive {
        border-radius: 18px;
    }
}

@media (max-width: 767px) {
    .empty-state,
    .empty-list-state {
        min-height: 112px;
        padding: 22px 16px;
        border-radius: 18px;
    }

    .song-table-wrapper,
    .admin-table-wrapper,
    .table-responsive {
        margin-inline: 0 !important;
        max-width: 100% !important;
    }

    .btn,
    .action-btn,
    .filter-tab,
    .status-badge,
    .metadata-badge {
        white-space: normal;
    }
}

/* ?곸슜?쒕퉬?ㅽ솕 3李? 愿由ъ옄/?댁쁺 UI ?덉젙??*/
.alert-box,
.admin-card,
.settings-card,
.stats-card,
.operation-log-card,
.log-card,
.diagnostic-card,
.metadata-quality-card,
.playlist-card,
.auto-playlist-card {
    min-width: 0;
    max-width: 100%;
}

.alert-box .alert-content,
.alert-box .alert-content *,
.admin-log-row,
.admin-log-row *,
.operation-log-card,
.operation-log-card *,
.log-card,
.log-card *,
.diagnostic-timeline-item,
.diagnostic-timeline-item *,
.settings-log-row,
.settings-log-row * {
    min-width: 0;
    overflow-wrap: anywhere;
}

.log-context,
.log-detail-pre,
.error-log-console,
.diagnostic-detail,
.admin-log-row p,
.operation-log-card small,
.operation-log-card strong,
.log-message-cell,
.log-file-cell,
.log-message-td {
    max-width: 100%;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.compact-filter-form,
.advanced-filter-form,
.log-filter-form,
.playlist-filter-form,
.filter-sort-form {
    min-width: 0;
}

.compact-filter-form .form-control,
.advanced-filter-form .form-control,
.log-filter-form .form-control,
.playlist-filter-form .form-control,
.filter-sort-form .form-control,
.compact-filter-form select,
.advanced-filter-form select,
.log-filter-form select,
.playlist-filter-form select,
.filter-sort-form select,
.compact-filter-form input,
.advanced-filter-form input,
.log-filter-form input,
.playlist-filter-form input,
.filter-sort-form input {
    min-width: 0;
    max-width: 100%;
}

.form-actions,
.action-bar,
.page-actions,
.toolbar-actions,
.admin-actions,
.bulk-actions,
.empty-state-actions {
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
}

.data-table td,
.data-table th,
.admin-table td,
.admin-table th,
.metadata-table td,
.metadata-table th,
.log-table td,
.log-table th {
    overflow-wrap: anywhere;
}

body.theme-light .log-context,
body.theme-light .log-detail-pre,
body.theme-light .error-log-console {
    background: var(--surface-soft, #f6f8fb);
    color: var(--text-primary, #0f172a);
    border-color: var(--border-color, #d7e2ee);
}

body.theme-dark .log-context,
body.theme-dark .log-detail-pre,
body.theme-dark .error-log-console {
    background: color-mix(in srgb, var(--surface-soft, #111827) 92%, #000000);
    color: var(--text-primary, #f8fafc);
    border-color: color-mix(in srgb, var(--border-color, #334155) 80%, #ffffff 8%);
}

@media (min-width: 768px) and (max-width: 1199px) {
    body.is-tablet-layout .dashboard-grid,
    body.is-tablet-layout .settings-grid,
    body.is-tablet-layout .admin-grid,
    body.is-tablet-layout .operation-log-grid {
        min-width: 0;
        max-width: 100%;
    }

    body.is-tablet-layout .form-actions,
    body.is-tablet-layout .action-bar,
    body.is-tablet-layout .page-actions,
    body.is-tablet-layout .toolbar-actions,
    body.is-tablet-layout .admin-actions {
        gap: 10px;
    }
}

@media (max-width: 767px) {
    .alert-box {
        align-items: flex-start;
        gap: 12px;
    }

    .form-actions,
    .action-bar,
    .page-actions,
    .toolbar-actions,
    .admin-actions,
    .bulk-actions,
    .empty-state-actions {
        display: flex;
        gap: 10px;
    }

    .form-actions > *,
    .action-bar > *,
    .page-actions > *,
    .toolbar-actions > *,
    .admin-actions > *,
    .bulk-actions > *,
    .empty-state-actions > * {
        min-width: min(100%, 148px);
    }

    .log-context,
    .log-detail-pre,
    .error-log-console {
        font-size: 0.82rem;
        line-height: 1.55;
    }
}

/* ?곸슜?쒕퉬?ㅽ솕 1李? 怨듯넻 ?덉젙??蹂댁젙 */
html,
body {
    max-width: 100%;
}

body {
    overflow-x: clip;
}

.content-body,
.main-content,
.app-container {
    min-width: 0;
}

.content-body img,
.modal-box img,
.empty-state img,
.empty-list-state img {
    max-width: 100%;
    height: auto;
}

.empty-state,
.empty-list-state,
.empty-list-cell {
    text-align: center;
}

.empty-state .btn,
.empty-list-state .btn,
.empty-state-actions .btn {
    margin-top: 10px;
}

.empty-state-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

button:disabled,
.btn:disabled,
.btn[aria-disabled="true"],
input[type="submit"]:disabled {
    cursor: not-allowed !important;
    opacity: 0.62 !important;
    box-shadow: none !important;
}

.song-table,
.admin-table,
.log-table {
    width: 100%;
}

.song-table td,
.admin-table td,
.log-table td {
    vertical-align: middle;
}

.song-title-link,
.song-title-cell,
.artist-cell,
.album-cell,
.log-message-cell,
.log-file-cell,
.lyrics-container,
.empty-state,
.empty-list-state {
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.table-responsive,
.table-wrapper,
.song-table-wrapper,
.admin-table-wrapper,
.backup-table-wrapper,
.log-table-wrapper {
    overscroll-behavior-x: contain;
}

.melon-lite-page-loading {
    z-index: calc(var(--z-toast, 1340) + 20);
}

body.pjax-loading .melon-lite-page-loading {
    pointer-events: none;
}

@media (max-width: 1199px) {
    .content-body {
        overflow-x: clip;
    }

    .page-header,
    .section-header,
    .home-section,
    .admin-card,
    .form-card,
    .panel,
    .section-card {
        max-width: 100%;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .top-bar {
        gap: 14px;
    }

    .search-container {
        min-width: 0;
    }

    .content-body {
        padding-bottom: calc(var(--player-height) + 54px + var(--safe-bottom)) !important;
    }
}

@media (max-width: 767px) {
    .empty-state,
    .empty-list-state {
        padding: 20px 16px;
    }

    .empty-state-actions,
    .form-actions,
    .modal-actions {
        align-items: stretch;
    }

    .empty-state-actions .btn,
    .form-actions .btn,
    .modal-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Keyless music discovery admin page */
.discovery-page {
    display: grid;
    gap: 18px;
}

.discovery-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
}

.discovery-hero-copy h2 {
    margin: 10px 0 8px;
    font-size: clamp(1.3rem, 2vw, 1.85rem);
    line-height: 1.25;
}

.discovery-hero-copy p,
.discovery-reason,
.discovery-note-list {
    color: var(--text-secondary);
    line-height: 1.65;
}

.discovery-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.discovery-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.discovery-summary-grid .stats-card {
    min-height: 128px;
}

.discovery-summary-grid .card-value {
    overflow-wrap: anywhere;
    line-height: 1.2;
}

.discovery-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.discovery-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 9px 12px;
    border: 1px solid color-mix(in srgb, var(--accent-color) 24%, var(--border-color));
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-color) 8%, var(--surface-color));
    color: var(--text-primary);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.discovery-chip i {
    color: var(--accent-color);
}

.discovery-chip-soft {
    background: var(--surface-soft);
}

.discovery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.discovery-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 260px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--accent-color) 12%, transparent), transparent 34%),
        var(--surface-color);
    box-shadow: var(--shadow-sm);
}

.discovery-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.discovery-card h3 {
    margin: 16px 0 8px;
    font-size: 1.18rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.discovery-artist {
    margin: 0;
    color: var(--accent-color);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.discovery-album {
    margin: 6px 0 0;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}

.discovery-reason {
    margin: 14px 0 18px;
    flex: 1;
}

.discovery-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.discovery-link-row a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 11px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.discovery-link-row a:hover,
.discovery-link-row a:focus-visible {
    border-color: color-mix(in srgb, var(--accent-color) 50%, var(--border-color));
    color: var(--accent-color);
}

.discovery-note-list {
    margin: 12px 0 0;
    padding-left: 20px;
}

.discovery-note-list li + li {
    margin-top: 8px;
}

@media (max-width: 1199px) {
    .discovery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1023px) {
    .discovery-hero {
        grid-template-columns: 1fr;
    }

    .discovery-toolbar {
        justify-content: flex-start;
    }

    .discovery-summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .discovery-grid {
        grid-template-columns: 1fr;
    }

    .discovery-card {
        padding: 16px;
        border-radius: 16px;
        min-height: auto;
    }

    .discovery-toolbar .btn {
        width: 100%;
        justify-content: center;
    }
}

/* 56.2 long metadata overflow guard: titles, albums, artists, tags */
html,
body {
    max-width: 100%;
    overflow-x: clip;
}

.app-shell,
.main-content,
.content-body,
.page-card,
.home-section,
.section-card,
.card,
.playlist-card,
.auto-playlist-card,
.compact-song-card,
.song-item,
.song-title-wrap,
.song-title-stack,
.album-card,
.artist-card,
.explore-card,
.search-result-card,
.metadata-quality-page,
.song-detail-page,
.album-detail-page,
.artist-detail-page,
.playlist-detail-page,
.enhanced-search-page,
.table-container,
.song-list-container,
.data-table,
.data-table tr,
.data-table th,
.data-table td {
    min-width: 0;
}

.song-title-link,
.song-title-cell,
.song-title-wrap,
.song-title-stack,
.compact-title,
.compact-song-meta,
.compact-song-meta span,
.song-meta,
.song-meta span,
.playlist-card-title,
.auto-playlist-card strong,
.album-card strong,
.album-card span,
.artist-card strong,
.artist-card span,
.explore-card strong,
.explore-card span,
.search-result-card strong,
.search-result-card span,
.track-title,
.album-title,
.artist-name,
.genre-name,
.tag-name,
.page-title-section h1,
.content-body h1,
.content-body h2,
.content-body h3,
.data-table td,
.data-table th {
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.song-title-link,
.compact-title,
.playlist-card-title,
.album-card strong,
.artist-card strong,
.explore-card strong,
.search-result-card strong,
.track-title,
.album-title,
.artist-name {
    display: block;
    max-width: 100%;
}

@media (min-width: 1024px) {
    .song-table,
    .data-table {
        table-layout: fixed;
        width: 100%;
    }

    .song-table .song-title-cell {
        width: 30%;
    }

    .song-table td:not(.song-title-cell),
    .song-table th {
        max-width: 1px;
    }

    .song-table td:not(.song-title-cell),
    .song-table th,
    .song-title-link,
    .song-title-stack .song-meta {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .song-table td:not(.song-title-cell),
    .song-table th,
    .song-title-link {
        white-space: nowrap;
    }

    .song-title-wrap {
        grid-template-columns: auto minmax(0, 1fr);
    }
}

@media (max-width: 1199px) {
    .dashboard-grid,
    .stats-grid,
    .recent-grid,
    .songs-grid,
    .playlist-grid,
    .playlist-card-grid,
    .explore-card-grid,
    .genre-card-grid,
    .admin-card-grid,
    .settings-grid,
    .metadata-grid,
    .quality-grid,
    .recommend-grid,
    .auto-playlist-grid,
    .search-category-grid,
    .album-card-grid,
    .home-section-grid,
    .daily-summary-grid,
    .folder-card-grid,
    .filter-grid,
    .form-grid {
        min-width: 0;
    }

    .compact-song-card,
    .playlist-card,
    .auto-playlist-card,
    .album-card,
    .artist-card,
    .explore-card,
    .search-result-card {
        max-width: 100%;
        overflow: hidden;
    }

    .song-title-link,
    .compact-title,
    .playlist-card-title,
    .album-card strong,
    .artist-card strong,
    .explore-card strong,
    .search-result-card strong {
        line-height: 1.28;
    }
}

@media (max-width: 767px) {
    html,
    body {
        overflow-x: hidden;
    }

    .content-body,
    .main-content,
    .app-main {
        max-width: 100vw;
    }

    .table-container,
    .song-list-container {
        width: 100%;
        max-width: 100%;
        overflow-x: clip;
    }

    .data-table,
    .song-table,
    .data-table tbody,
    .song-table tbody {
        width: 100%;
        max-width: 100%;
    }

    .song-item,
    .compact-song-card,
    .playlist-card,
    .auto-playlist-card,
    .album-card,
    .artist-card,
    .explore-card,
    .search-result-card {
        width: 100%;
        min-width: 0 !important;
        max-width: 100%;
    }

    .song-title-link,
    .compact-title,
    .playlist-card-title,
    .album-card strong,
    .artist-card strong,
    .explore-card strong,
    .search-result-card strong,
    .track-title,
    .album-title,
    .artist-name {
        white-space: normal !important;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .song-meta,
    .compact-song-meta,
    .album-card span,
    .artist-card span,
    .explore-card span,
    .search-result-card span,
    .data-table td {
        white-space: normal !important;
        max-width: 100%;
    }

    .tag-badge,
    .badge,
    .format-badge {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* 56.3 song detail responsive polish */
.song-detail-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.song-detail-page .page-title-section {
    min-width: 0;
}

.song-detail-page .page-main-title,
.song-detail-page .page-subtitle {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.song-detail-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    align-items: flex-start;
}

.song-detail-art-card,
.song-detail-info-card,
.song-art-meta,
.song-detail-info-card table,
.metadata-status-summary,
.tag-editor-card,
.listening-note-card,
.song-lyrics-card {
    min-width: 0 !important;
    max-width: 100%;
    box-sizing: border-box;
}

.song-detail-art-card {
    flex-basis: 320px !important;
}

.song-detail-info-card {
    flex: 1 1 min(620px, 100%) !important;
}

.song-detail-page .album-art-large {
    aspect-ratio: 1 / 1;
}

.song-art-meta h3,
.song-art-meta p,
.song-detail-info-card td,
.metadata-status-panel span,
.metadata-status-panel p,
.song-tags-box,
.note-text-block,
.lyrics-container {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.song-detail-info-card .data-table {
    table-layout: fixed;
}

.song-detail-info-card .data-table td:first-child {
    width: 132px;
}

.song-detail-page .song-item {
    max-width: 100%;
}

.song-detail-page .song-note-form textarea,
.song-detail-page .song-tag-form input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) and (max-width: 1199px) {
    .song-detail-container {
        display: grid !important;
        grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr) !important;
        gap: 22px !important;
        flex-wrap: nowrap !important;
    }

    .song-detail-art-card,
    .song-detail-info-card {
        width: 100% !important;
        max-width: 100% !important;
    }

    .song-detail-page .album-art-large {
        width: min(220px, 100%) !important;
        height: auto !important;
    }

    .song-detail-info-card .data-table td:first-child {
        width: 118px !important;
    }
}

@media (max-width: 767px) {
    .song-detail-page {
        padding-bottom: calc(var(--player-height) + 44px + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
    }

    .song-detail-page .page-title-section {
        margin-bottom: 16px !important;
    }

    .song-detail-page .page-main-title {
        font-size: clamp(1.55rem, 7vw, 2.05rem) !important;
        line-height: 1.15 !important;
    }

    .song-detail-page .page-subtitle {
        font-size: 0.94rem !important;
        line-height: 1.55 !important;
    }

    .song-detail-container {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 16px !important;
        margin-bottom: 18px !important;
    }

    .song-detail-art-card,
    .song-detail-info-card,
    .metadata-status-summary,
    .tag-editor-card,
    .listening-note-card,
    .song-lyrics-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 18px 16px !important;
        border-radius: 18px !important;
    }

    .song-detail-art-card {
        gap: 16px !important;
    }

    .song-detail-page .album-art-large {
        width: min(72vw, 240px) !important;
        height: auto !important;
        max-width: 100% !important;
        border-radius: 18px !important;
        box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18) !important;
    }

    .song-art-meta {
        width: 100%;
    }

    .song-art-meta h3 {
        font-size: 1.1rem !important;
        line-height: 1.28 !important;
        margin-bottom: 6px !important;
        word-break: keep-all !important;
        overflow-wrap: anywhere !important;
    }

    .song-art-meta p {
        font-size: 0.92rem !important;
        line-height: 1.35 !important;
    }

    .song-detail-page .song-item {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 44px 44px !important;
        gap: 8px !important;
        width: 100% !important;
        margin-top: 4px !important;
    }

    .song-detail-page .song-item .btn {
        min-height: 44px !important;
        height: 44px !important;
        border-radius: 14px !important;
        white-space: nowrap;
    }

    .song-detail-info-card h3 {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 1rem !important;
        line-height: 1.35 !important;
        margin-bottom: 12px !important;
    }

    .song-detail-info-card .data-table,
    .song-detail-info-card .data-table tbody,
    .song-detail-info-card .data-table tr,
    .song-detail-info-card .data-table td {
        display: block !important;
        width: 100% !important;
    }

    .song-detail-info-card .data-table tr {
        padding: 10px 0 !important;
        border-top: 1px solid var(--border-color) !important;
    }

    .song-detail-info-card .data-table tr:first-child {
        border-top: 0 !important;
    }

    .song-detail-info-card .data-table td {
        padding: 0 !important;
        max-width: 100% !important;
        white-space: normal !important;
    }

    .song-detail-info-card .data-table td:first-child {
        width: 100% !important;
        margin-bottom: 4px;
        font-size: 0.78rem;
        color: var(--text-muted) !important;
    }

    .song-detail-info-card .data-table td:last-child {
        font-size: 0.95rem;
        line-height: 1.45;
        color: var(--text-primary) !important;
    }

    .metadata-status-panel {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 8px !important;
    }

    .song-tag-form,
    .note-action-row {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 10px !important;
    }

    .song-tag-form .btn,
    .note-action-row .btn,
    .song-lyrics-header .btn,
    .song-detail-page > div:last-child .btn {
        width: 100%;
        min-height: 44px;
        justify-content: center;
    }

    .rating-panel {
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .rating-stars {
        flex-wrap: wrap;
    }

    .song-note-form textarea {
        min-height: 110px;
    }

    .song-lyrics-header {
        gap: 10px !important;
    }

    .song-lyrics-title {
        font-size: 1rem !important;
        line-height: 1.3 !important;
    }

    .lyrics-container {
        max-height: min(54vh, 520px) !important;
        padding: 14px !important;
        font-size: 0.94rem !important;
        line-height: 1.85 !important;
    }
}

/* Final search page UI overrides */
.enhanced-search-page {
    display: grid !important;
    gap: 18px !important;
    max-width: 1180px !important;
}

.enhanced-search-page .page-title-section {
    margin-bottom: 0 !important;
}

.enhanced-search-page .search-page-form {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 14px !important;
    border: 1px solid var(--ui-border, var(--border-color)) !important;
    border-radius: 18px !important;
    background: var(--ui-card-bg, var(--card-bg)) !important;
    box-shadow: var(--ui-shadow-sm, 0 8px 20px rgba(15, 23, 42, 0.06)) !important;
}

.enhanced-search-page .search-page-form > i {
    color: var(--text-muted) !important;
    font-size: 18px !important;
}

.enhanced-search-page .search-page-form input {
    min-width: 0 !important;
    height: 44px !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--text-color) !important;
    font-size: 16px !important;
    outline: none !important;
}

.enhanced-search-page .search-page-form input::placeholder {
    color: var(--text-muted) !important;
}

.enhanced-search-page .search-page-form:focus-within {
    border-color: color-mix(in srgb, var(--accent-color) 42%, var(--ui-border, var(--border-color))) !important;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-color) 13%, transparent) !important;
}

.enhanced-search-page .advanced-filter-panel,
.enhanced-search-page .search-recent-panel,
.enhanced-search-page .home-section {
    border: 1px solid var(--ui-border, var(--border-color)) !important;
    border-radius: 16px !important;
    background: var(--ui-card-bg, var(--card-bg)) !important;
    box-shadow: var(--ui-shadow-sm, 0 8px 22px rgba(15, 23, 42, 0.06)) !important;
}

.enhanced-search-page .advanced-filter-panel {
    margin: 0 !important;
}

.enhanced-search-page .filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.enhanced-search-page .filter-check-row {
    padding: 10px 12px !important;
    border-radius: 14px !important;
    background: var(--surface-soft, var(--bg-secondary)) !important;
}

.enhanced-search-page .filter-badge {
    background: color-mix(in srgb, var(--accent-color) 8%, var(--ui-card-bg, var(--card-bg))) !important;
    border-color: color-mix(in srgb, var(--accent-color) 24%, var(--ui-border, var(--border-color))) !important;
}

.enhanced-search-page .song-list-container {
    margin-top: 12px !important;
    overflow-x: auto !important;
    border: 1px solid var(--ui-border, var(--border-color)) !important;
    border-radius: 14px !important;
    background: var(--ui-card-bg, var(--card-bg)) !important;
}

.enhanced-search-page .song-table {
    min-width: 860px !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.enhanced-search-page .song-table th {
    position: sticky !important;
    top: 0 !important;
    z-index: 1 !important;
    background: var(--surface-soft, var(--bg-secondary)) !important;
    color: var(--text-secondary) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
}

.enhanced-search-page .song-table td,
.enhanced-search-page .song-table th {
    padding: 14px 12px !important;
}

.enhanced-search-page .song-title-wrap {
    min-width: 240px !important;
}

.enhanced-search-page .song-title-link {
    color: var(--text-color) !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}

.enhanced-search-page .song-title-link:hover,
.enhanced-search-page .song-title-link:focus-visible {
    color: var(--accent-color) !important;
    text-decoration: underline !important;
}

.enhanced-search-page .search-category-grid {
    align-items: stretch !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.enhanced-search-page .search-category-grid .home-section {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    padding: 18px !important;
}

.enhanced-search-page .search-category-grid .explore-card-grid,
.enhanced-search-page .search-category-grid .album-card-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
}

.enhanced-search-page .search-category-grid .explore-card,
.enhanced-search-page .search-category-grid .album-card {
    grid-template-columns: 72px minmax(0, 1fr) !important;
    min-height: 92px !important;
    padding: 12px !important;
    border-radius: 14px !important;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease !important;
}

.enhanced-search-page .search-category-grid .explore-card:hover,
.enhanced-search-page .search-category-grid .album-card:hover,
.enhanced-search-page .search-category-grid .explore-card:focus-visible,
.enhanced-search-page .search-category-grid .album-card:focus-visible {
    transform: translateY(-1px) !important;
}

.enhanced-search-page .search-category-grid .explore-card img,
.enhanced-search-page .search-category-grid .album-card-cover {
    width: 72px !important;
    height: 72px !important;
    max-width: 72px !important;
    border-radius: 12px !important;
}

.enhanced-search-page .search-category-grid .explore-card strong,
.enhanced-search-page .search-category-grid .album-card strong,
.enhanced-search-page .search-category-grid .explore-card span,
.enhanced-search-page .search-category-grid .album-card span {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
}

.enhanced-search-page .search-category-grid .tag-cloud {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

.enhanced-search-page .search-category-grid .tag-badge {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

@media (min-width: 768px) and (max-width: 1199px) {
    .enhanced-search-page .filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 767px) {
    .enhanced-search-page {
        gap: 14px !important;
    }

    .enhanced-search-page .search-page-form {
        grid-template-columns: auto minmax(0, 1fr) !important;
        padding: 10px 12px !important;
    }

    .enhanced-search-page .search-page-form .btn {
        grid-column: 1 / -1 !important;
        width: 100% !important;
    }

    .enhanced-search-page .filter-grid,
    .enhanced-search-page .search-category-grid {
        grid-template-columns: 1fr !important;
    }

    .enhanced-search-page .filter-check-row {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    .enhanced-search-page .settings-muted {
        white-space: normal !important;
    }

    .enhanced-search-page .search-category-grid .home-section {
        padding: 14px !important;
    }
}

/* Admin operation summary UI fix */
.operation-overview-section .operation-status-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)) !important;
    align-items: start !important;
    gap: 14px !important;
}

.operation-overview-section .operation-status-card {
    min-height: 0 !important;
    height: auto !important;
    padding: 18px !important;
    overflow: hidden !important;
}

.operation-overview-section .operation-status-label {
    margin-bottom: 10px !important;
    color: var(--text-secondary, var(--text-muted)) !important;
    line-height: 1.35 !important;
}

.operation-overview-section .operation-status-card strong {
    color: var(--text-primary, var(--text-color)) !important;
    font-size: clamp(1.35rem, 1.6vw, 1.65rem) !important;
    line-height: 1.18 !important;
    letter-spacing: 0 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    hyphens: manual !important;
}

.operation-overview-section .operation-status-card small {
    margin-top: 10px !important;
    color: var(--text-secondary, var(--text-muted)) !important;
    line-height: 1.45 !important;
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
}

.operation-overview-section .section-heading-row {
    align-items: flex-start !important;
}

.operation-overview-section .section-more-link {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

@media (min-width: 1200px) {
    .operation-overview-section .operation-status-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .operation-overview-section .operation-status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 767px) {
    .operation-overview-section .operation-status-grid {
        grid-template-columns: 1fr !important;
    }

    .operation-overview-section .operation-status-card {
        padding: 14px !important;
    }

    .operation-overview-section .section-heading-row {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }
}

/* 48李?媛쒖씤??異붿쿇 / ?먮젅?댁뀡 UI */
.recommendation-v48 {
    display: grid;
    gap: 18px;
}

.recommendation-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.recommendation-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.recommendation-section-stack {
    display: grid;
    gap: 18px;
}

.recommendation-section .section-heading-row {
    align-items: flex-start;
}

.section-description {
    margin: 6px 0 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.recommendation-song-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.preference-pill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.preference-pill {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-areas:
        "icon title"
        "icon meta";
    gap: 2px 10px;
    align-items: center;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--card-bg, var(--bg-secondary));
    color: var(--text-primary);
    text-decoration: none;
}

.preference-pill i {
    grid-area: icon;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
}

.preference-pill strong {
    grid-area: title;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preference-pill span {
    grid-area: meta;
    color: var(--text-secondary);
    font-size: 12px;
}

.recommendation-empty {
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 220px;
    text-align: center;
}

.recommendation-empty > i {
    color: var(--accent-color);
    font-size: 32px;
}

.empty-state-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

@media (min-width: 768px) and (max-width: 1199px) {
    .recommendation-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .recommendation-hero-actions {
        justify-content: flex-start;
    }

    .recommendation-song-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .recommendation-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .recommendation-hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .recommendation-song-grid,
    .preference-pill-grid {
        grid-template-columns: 1fr;
    }
}

/* 47李??ъ슜???붾㈃ UX polish */
.compact-song-card {
    grid-template-columns: 34px 44px minmax(0, 1fr) auto !important;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 10px;
    transition: background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.compact-song-card:hover,
.compact-song-card:focus-within {
    background: color-mix(in srgb, var(--accent-color) 7%, var(--card-bg, var(--bg-secondary)));
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.compact-song-card .compact-title,
.compact-song-card .compact-song-meta span,
.compact-song-card .recommend-reason {
    min-width: 0;
    max-width: 100%;
}

.compact-song-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    min-width: 82px;
}

.compact-song-actions .like-btn,
.compact-song-actions .add-playlist-btn,
.song-action-group .like-btn,
.song-action-group .add-playlist-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--surface-soft, var(--bg-tertiary));
    color: var(--text-primary);
    cursor: pointer;
}

.compact-song-actions .like-btn.liked,
.song-action-group .like-btn.liked {
    color: var(--accent-color);
    border-color: color-mix(in srgb, var(--accent-color) 32%, var(--border-color));
    background: color-mix(in srgb, var(--accent-color) 10%, var(--surface-soft, var(--bg-tertiary)));
}

.queue-item-position {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    margin-right: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
    color: var(--accent-color);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.empty-action-state {
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 132px;
    padding: 22px 16px;
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    text-align: center;
    background: color-mix(in srgb, var(--surface-soft, var(--bg-secondary)) 82%, transparent);
}

.empty-action-state i {
    color: var(--accent-color);
    font-size: 24px;
}

.quick-suggest-box {
    border-radius: 14px !important;
    background: var(--card-bg, var(--surface)) !important;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18) !important;
}

.quick-suggest-item {
    min-height: 52px;
}

.quick-suggest-item:hover,
.quick-suggest-item:focus-within {
    background: color-mix(in srgb, var(--accent-color) 8%, var(--surface-soft, var(--bg-tertiary))) !important;
}

.quick-suggest-status {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 12px;
    color: var(--text-secondary, #64748b);
    font-size: 0.92rem;
    font-weight: 800;
    text-align: center;
}

.quick-suggest-status.loading {
    background: color-mix(in srgb, var(--accent-color, #00c73c) 8%, transparent);
    color: var(--text-primary, #0f172a);
}

.quick-suggest-status.error {
    background: color-mix(in srgb, var(--danger, #dc2626) 8%, transparent);
    color: var(--danger, #dc2626);
}

.suggest-play-btn {
    min-width: 38px;
    min-height: 38px;
}

@media (min-width: 768px) and (max-width: 1199px) {
    .home-section-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .compact-song-card {
        grid-template-columns: 38px 50px minmax(0, 1fr) auto !important;
        gap: 10px;
        padding: 10px;
    }

    .compact-cover {
        width: 50px;
        height: 50px;
    }

    .compact-play {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 767px) {
    .compact-song-card {
        grid-template-columns: 38px 48px minmax(0, 1fr) auto !important;
        gap: 9px;
        padding: 9px 8px;
    }

    .compact-song-actions {
        min-width: 42px;
        flex-direction: column;
        gap: 3px;
    }

    .compact-song-actions .like-btn,
    .compact-song-actions .add-next-btn,
    .compact-song-actions .add-playlist-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }

    .quick-suggest-box {
        position: fixed;
        left: 12px !important;
        right: 12px !important;
        top: calc(var(--safe-top) + 76px) !important;
        max-height: min(420px, calc(100dvh - var(--safe-top) - var(--player-height) - 112px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .compact-song-card {
        transition: none;
    }
}

/* 45李??댁쁺 紐⑤땲?곕쭅 / ?먭?吏꾨떒 由ы룷??*/
.diagnostic-section,
.diagnostic-report-hero,
.operation-alert-list,
.diagnostic-report-groups,
.diagnostic-two-column {
    min-width: 0;
}

.diagnostic-section {
    margin-top: 20px;
}

.diagnostic-report-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 18px;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: clamp(18px, 2vw, 24px);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent-color) 12%, transparent), transparent 58%),
        var(--card-bg, var(--surface));
    box-shadow: var(--shadow-soft);
}

.diagnostic-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.diagnostic-report-hero h2,
.diagnostic-section h2,
.diagnostic-group-card h3 {
    margin: 0;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.diagnostic-report-hero p,
.diagnostic-section p,
.diagnostic-group-card p,
.operation-alert-row p,
.diagnostic-timeline-item p {
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.diagnostic-summary-grid,
.operation-log-grid,
.diagnostic-report-groups,
.diagnostic-two-column {
    display: grid;
    gap: 14px;
}

.diagnostic-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.diagnostic-summary-card,
.operation-log-card,
.diagnostic-group-card,
.operation-alert-row {
    min-width: 0;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--card-bg, var(--surface));
    box-shadow: var(--shadow-soft);
}

.diagnostic-summary-card {
    padding: 14px;
}

.diagnostic-summary-card span,
.operation-log-card span,
.diagnostic-summary-card strong,
.operation-log-card strong,
.operation-log-card small {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.diagnostic-summary-card span,
.operation-log-card span,
.operation-log-card small {
    color: var(--text-muted);
}

.diagnostic-summary-card strong,
.operation-log-card strong {
    color: var(--text-primary);
    font-size: clamp(1.35rem, 3vw, 2rem);
    line-height: 1.1;
    margin-top: 6px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-end;
    margin-bottom: 12px;
}

.section-heading p {
    margin: 6px 0 0;
}

.diagnostic-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.operation-alert-list {
    display: grid;
    gap: 10px;
}

.operation-alert-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    padding: 15px;
}

.operation-alert-row strong,
.diagnostic-timeline-item strong,
.diagnostic-card-head strong {
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.operation-alert-row p,
.operation-alert-row small {
    display: block;
    margin: 6px 0 0;
}

.operation-log-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.operation-log-card {
    padding: 15px;
}

.diagnostic-report-groups {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.diagnostic-group-card {
    padding: 16px;
}

.diagnostic-group-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.diagnostic-group-head p {
    margin: 6px 0 0;
}

.diagnostic-group-items {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.diagnostic-mini-status {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid currentColor;
    background: color-mix(in srgb, currentColor 7%, transparent);
}

.diagnostic-mini-status strong,
.diagnostic-mini-status span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.diagnostic-mini-status span {
    flex: 0 0 auto;
    font-size: 0.82rem;
    font-weight: 800;
}

.diagnostic-two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.diagnostic-timeline {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.diagnostic-timeline-item {
    min-width: 0;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    background: color-mix(in srgb, var(--surface-soft, var(--card-bg)) 82%, transparent);
}

.diagnostic-timeline-item .log-level {
    margin-bottom: 6px;
}

.diagnostic-timeline-item p,
.diagnostic-timeline-item small {
    display: block;
    margin: 6px 0 0;
}

.diagnostic-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

body.theme-dark .diagnostic-report-hero,
body.theme-dark .diagnostic-summary-card,
body.theme-dark .operation-log-card,
body.theme-dark .diagnostic-group-card,
body.theme-dark .operation-alert-row,
body.theme-dark .diagnostic-timeline-item {
    border-color: color-mix(in srgb, var(--border-color) 78%, #fff 8%);
}

@media (min-width: 768px) and (max-width: 1199px) {
    .diagnostic-report-hero {
        grid-template-columns: 1fr;
    }

    .diagnostic-summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .operation-log-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .diagnostic-report-groups,
    .diagnostic-two-column {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .diagnostic-report-hero,
    .section-heading,
    .operation-alert-row,
    .diagnostic-group-head {
        display: block;
    }

    .diagnostic-summary-grid,
    .operation-log-grid,
    .diagnostic-report-groups,
    .diagnostic-two-column {
        grid-template-columns: 1fr;
    }

    .diagnostic-summary-grid,
    .operation-log-grid,
    .diagnostic-report-groups {
        margin-top: 12px;
    }

    .diagnostic-actions {
        justify-content: stretch;
        margin-top: 12px;
    }

    .diagnostic-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .operation-alert-row .diagnostic-badge,
    .diagnostic-group-head .diagnostic-badge {
        margin-top: 10px;
    }
}

/* 46李?愿由ъ옄 ?뚮┝?쇳꽣 / 二쇨컙 ?댁쁺 由ы룷??*/
.admin-alert-center-page,
.alert-center-list,
.alert-center-split,
.alert-center-filter,
.weekly-report-grid {
    min-width: 0;
}

.alert-center-hero {
    margin-bottom: 20px;
}

.alert-center-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.alert-center-filter {
    margin-bottom: 14px;
}

.alert-center-heading {
    gap: 14px;
    align-items: flex-start;
}

.alert-center-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    min-width: 0;
}

.alert-center-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    align-items: end;
}

.alert-center-list-form {
    min-width: 0;
}

.alert-center-list {
    display: grid;
    gap: 12px;
}

.alert-center-item {
    align-items: stretch;
    position: relative;
}

.alert-center-item.is-read {
    opacity: 0.76;
}

.alert-center-item.is-pinned {
    border-color: color-mix(in srgb, var(--accent-color) 48%, var(--border-color));
    box-shadow: 0 18px 36px rgba(0, 184, 64, 0.1);
}

.alert-select {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    padding-top: 4px;
}

.alert-select input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-color);
}

.alert-center-main {
    min-width: 0;
    flex: 1 1 auto;
}

.alert-center-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.alert-center-meta span:not(.diagnostic-badge) {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    border-radius: 999px;
    padding: 2px 8px;
    background: color-mix(in srgb, var(--border-color) 45%, transparent);
    max-width: 100%;
    overflow-wrap: anywhere;
}

.alert-pin-badge {
    background: rgba(0, 184, 64, 0.14) !important;
    color: #047857 !important;
    font-weight: 800;
}

.alert-center-actions,
.alert-center-bulk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
}

.alert-center-bulk-actions {
    justify-content: space-between;
}

.level-critical,
.level-error {
    background: rgba(239, 68, 68, 0.14);
    color: #b91c1c;
}

.level-warning {
    background: rgba(245, 158, 11, 0.16);
    color: #92400e;
}

.level-info {
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 15李? ?⑤낫??/ ?꾩?留?*/
.help-page {
    display: grid;
    gap: 22px;
    padding-bottom: calc(var(--bottom-player-height, 96px) + var(--safe-bottom, env(safe-area-inset-bottom)) + 32px);
}

.help-hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-end;
    padding: 28px;
    border: 1px solid var(--border-color);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(0, 184, 64, 0.08), rgba(255,255,255,0.72));
    box-shadow: var(--card-shadow);
}

.help-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-color);
    font-weight: 800;
    margin-bottom: 8px;
}

.help-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.help-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.help-guide-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
}

.help-guide-icon,
.onboarding-step-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    background: rgba(0, 184, 64, 0.12);
    font-size: 1.25rem;
    flex: 0 0 auto;
}

.help-guide-body {
    min-width: 0;
}

.help-guide-body h2 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.help-guide-body p {
    margin: 0 0 14px;
    color: var(--text-muted);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.onboarding-modal-overlay[hidden] {
    display: none !important;
}

.onboarding-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2600;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: calc(env(safe-area-inset-top) + 18px) 18px calc(var(--bottom-player-height, 96px) + env(safe-area-inset-bottom) + 18px);
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(14px);
}

.onboarding-card {
    position: relative;
    width: min(520px, 100%);
    max-height: min(720px, 100%);
    overflow: auto;
    padding: 28px;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.38);
    background: color-mix(in srgb, var(--card-bg) 92%, white);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.26);
}

.onboarding-close {
    position: absolute;
    top: 14px;
    right: 14px;
}

.onboarding-step-count {
    margin-top: 16px;
    color: var(--text-muted);
    font-weight: 800;
    font-size: 0.86rem;
}

.onboarding-card h2 {
    margin: 8px 0 10px;
    font-size: clamp(1.45rem, 4vw, 2rem);
    line-height: 1.2;
}

.onboarding-card p {
    color: var(--text-muted);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.onboarding-progress {
    display: flex;
    gap: 8px;
    margin: 20px 0;
}

.onboarding-progress span {
    height: 6px;
    flex: 1;
    border-radius: 999px;
    background: color-mix(in srgb, var(--border-color) 75%, transparent);
}

.onboarding-progress span.is-active {
    background: var(--accent-color);
}

.onboarding-actions,
.onboarding-secondary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.onboarding-actions {
    justify-content: space-between;
}

.onboarding-secondary-actions {
    justify-content: flex-end;
    margin-top: 12px;
}

body.theme-dark .help-hero,
body.theme-dark .onboarding-card {
    background: color-mix(in srgb, var(--card-bg) 90%, #0f172a);
}

@media (min-width: 768px) and (max-width: 1199px) {
    .alert-center-split {
        grid-template-columns: 1fr;
    }

    .alert-center-item {
        border-radius: 18px;
    }
}

@media (max-width: 767px) {
    .help-hero {
        display: grid;
        padding: 22px;
    }

    .help-hero-actions,
    .help-hero-actions .btn,
    .onboarding-actions .btn,
    .onboarding-actions a,
    .onboarding-secondary-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .help-guide-grid {
        grid-template-columns: 1fr;
    }

    .help-guide-card {
        grid-template-columns: 1fr;
    }

    .onboarding-modal-overlay {
        align-items: flex-end;
        padding-left: 12px;
        padding-right: 12px;
    }

    .onboarding-card {
        padding: 24px;
        border-radius: 24px 24px 18px 18px;
    }

    .alert-center-split {
        grid-template-columns: 1fr;
    }

    .alert-center-heading {
        display: grid;
        grid-template-columns: 1fr;
    }

    .alert-center-toolbar {
        justify-content: stretch;
    }

    .alert-center-form-grid {
        grid-template-columns: 1fr;
    }

    .alert-center-item {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .alert-center-actions .btn,
    .alert-center-bulk-actions .btn,
    .alerts-page .inline-action-form .btn {
        width: 100%;
        justify-content: center;
    }

    .alert-center-bulk-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* 43李??댁쁺 ?먭? ??쒕낫??*/
.operation-overview-section,
.recovery-action-section {
    overflow: hidden;
}

.operation-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.operation-status-card {
    min-width: 0;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--card-bg, var(--surface));
    padding: 16px;
    box-shadow: var(--shadow-soft);
}

.operation-status-card strong,
.operation-status-card small,
.operation-status-label {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.operation-status-label {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 8px;
}

.operation-status-card strong {
    color: var(--text-primary);
    font-size: clamp(1.05rem, 2vw, 1.45rem);
    line-height: 1.2;
}

.operation-status-card small {
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.45;
}

.operation-status-card.status-ok {
    border-color: color-mix(in srgb, var(--accent-color) 34%, var(--border-color));
}

.operation-status-card.status-warning,
.operation-status-card.status-unknown {
    border-color: color-mix(in srgb, #f59e0b 44%, var(--border-color));
}

.operation-status-card.status-error {
    border-color: color-mix(in srgb, #ef4444 48%, var(--border-color));
}

.dashboard-quick-actions {
    min-width: 0;
}

@media (min-width: 768px) and (max-width: 1023px) {
    .operation-status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-issue-grid {
        grid-template-columns: 1fr;
    }

    .duplicate-guide-grid {
        grid-template-columns: 1fr;
    }

    .duplicate-actions {
        grid-template-columns: 1fr;
    }

    .duplicate-action-primary,
    .duplicate-action-danger {
        justify-content: stretch;
    }

    .duplicate-action-primary {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .duplicate-action-danger {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, auto);
    }

    .duplicate-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .app-announcement-banner {
        grid-template-columns: auto minmax(0, 1fr);
        max-width: calc(100% - 40px);
        margin: 10px auto 0;
    }

    .announcement-actions {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: flex-end;
    }

    .announcement-admin-card {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
    }

    .announcement-admin-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .operation-status-card {
        padding: 14px;
        border-radius: 14px;
    }

    .recovery-action-section .dashboard-quick-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .recovery-action-section .dashboard-quick-actions .btn {
        width: 100%;
        justify-content: center;
        min-width: 0;
        white-space: normal;
    }

    .admin-center-menu-head {
        align-items: stretch;
    }

    .admin-center-search {
        width: 100%;
    }

    .admin-center-section-title {
        display: grid;
        gap: 4px;
    }
}

@media (max-width: 767px) {
    .operation-status-grid,
    .admin-issue-grid,
    .duplicate-guide-grid,
    .recovery-action-section .dashboard-quick-actions {
        grid-template-columns: 1fr;
    }

    .duplicate-actions {
        grid-template-columns: 1fr;
    }

    .duplicate-action-primary,
    .duplicate-action-danger {
        display: grid;
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .duplicate-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .duplicate-file-delete-confirm {
        width: 100%;
        min-width: 0;
        justify-content: space-between;
    }

    .duplicate-table {
        min-width: 900px;
    }

    .app-announcement-banner {
        grid-template-columns: 1fr;
        align-items: start;
        max-width: calc(100% - 28px);
        margin: 10px auto 0;
        padding: 12px;
        border-radius: 14px;
    }

    .announcement-icon {
        display: none;
    }

    .announcement-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr auto;
    }

    .announcement-actions .btn {
        width: 100%;
        justify-content: center;
        min-width: 0;
        white-space: normal;
    }

    .announcement-admin-card {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .announcement-admin-icon {
        display: none;
    }

    .announcement-admin-actions {
        display: grid;
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .announcement-admin-actions .btn,
    .announcement-admin-actions .inline-action-form,
    .announcement-admin-actions .inline-action-form button {
        width: 100%;
        justify-content: center;
    }

    .announcement-form-footer {
        display: grid;
        grid-template-columns: 1fr;
    }

    .announcement-form-footer .btn {
        width: 100%;
        justify-content: center;
    }

    .admin-center-menu-head,
    .admin-center-section-title {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        align-items: stretch;
    }

    .admin-center-search {
        width: 100%;
    }

    .admin-center-section {
        padding: 12px;
        border-radius: 14px;
    }

    .operation-status-card {
        padding: 14px;
    }
}

/* Absolute final override: floating player must win over older responsive rules. */
@media (max-width: 1023px) {
    :root {
        --floating-player-size-final: 74px;
        --floating-player-width-final: min(360px, calc(100vw - 28px));
    }

    .player-bar {
        position: fixed !important;
        grid-column: auto !important;
        grid-row: auto !important;
        left: auto !important;
        right: 14px !important;
        bottom: calc(14px + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
        width: var(--floating-player-width-final) !important;
        max-width: var(--floating-player-width-final) !important;
        min-width: 0 !important;
        height: var(--floating-player-size-final) !important;
        min-height: var(--floating-player-size-final) !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 9px 10px !important;
        border: 1px solid var(--player-control-border, var(--border-color)) !important;
        border-radius: 22px !important;
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28) !important;
        overflow: visible !important;
        z-index: var(--z-player, 1000) !important;
        cursor: pointer;
    }

    .player-song-info {
        width: auto !important;
        min-width: 0 !important;
        gap: 10px !important;
    }

    .player-album-art,
    .player-album-art img {
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        border-radius: 15px !important;
    }

    .player-song-details {
        min-width: 0 !important;
    }

    .player-song-title,
    .player-song-artist {
        max-width: 100% !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .player-song-title {
        font-size: 0.9rem !important;
        line-height: 1.25 !important;
    }

    .player-song-artist {
        font-size: 0.78rem !important;
    }

    .player-controls {
        width: auto !important;
        min-width: 52px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .control-buttons {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0 !important;
    }

    #btn-shuffle,
    #btn-prev,
    #btn-next,
    #btn-repeat,
    .player-utils,
    .player-bar .progress-container {
        display: none !important;
    }

    #btn-play-pause {
        display: inline-flex !important;
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        min-height: 52px !important;
        border-radius: 999px !important;
        flex: 0 0 52px !important;
    }

    .content-body,
    .app-main,
    .main-content,
    .admin-dashboard,
    .settings-page {
        padding-bottom: calc(104px + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
    }
}

@media (max-width: 520px) {
    :root {
        --floating-player-size-final: 68px;
        --floating-player-width-final: min(300px, calc(100vw - 24px));
    }

    .player-bar {
        right: 12px !important;
        bottom: calc(12px + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
        border-radius: 20px !important;
        padding: 8px !important;
    }

    .player-album-art,
    .player-album-art img {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        border-radius: 14px !important;
    }

    #btn-play-pause {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
        flex-basis: 48px !important;
    }
}
*** End of File
*** End of File

/* Absolute final override: floating player must win over older responsive rules. */
@media (max-width: 1023px) {
    :root {
        --floating-player-size-final: 74px;
        --floating-player-width-final: min(360px, calc(100vw - 28px));
    }

    .player-bar {
        position: fixed !important;
        grid-column: auto !important;
        grid-row: auto !important;
        left: auto !important;
        right: 14px !important;
        bottom: calc(14px + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
        width: var(--floating-player-width-final) !important;
        max-width: var(--floating-player-width-final) !important;
        min-width: 0 !important;
        height: var(--floating-player-size-final) !important;
        min-height: var(--floating-player-size-final) !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 9px 10px !important;
        border: 1px solid var(--player-control-border, var(--border-color)) !important;
        border-radius: 22px !important;
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28) !important;
        overflow: visible !important;
        z-index: var(--z-player, 1000) !important;
        cursor: pointer;
    }

    .player-song-info {
        width: auto !important;
        min-width: 0 !important;
        gap: 10px !important;
    }

    .player-album-art,
    .player-album-art img {
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        border-radius: 15px !important;
    }

    .player-song-details {
        min-width: 0 !important;
    }

    .player-song-title,
    .player-song-artist {
        max-width: 100% !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .player-song-title {
        font-size: 0.9rem !important;
        line-height: 1.25 !important;
    }

    .player-song-artist {
        font-size: 0.78rem !important;
    }

    .player-controls {
        width: auto !important;
        min-width: 52px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .control-buttons {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0 !important;
    }

    #btn-shuffle,
    #btn-prev,
    #btn-next,
    #btn-repeat,
    .player-utils,
    .player-bar .progress-container {
        display: none !important;
    }

    #btn-play-pause {
        display: inline-flex !important;
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        min-height: 52px !important;
        border-radius: 999px !important;
        flex: 0 0 52px !important;
    }

    .content-body,
    .app-main,
    .main-content,
    .admin-dashboard,
    .settings-page {
        padding-bottom: calc(104px + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
    }
}

@media (max-width: 520px) {
    :root {
        --floating-player-size-final: 68px;
        --floating-player-width-final: min(300px, calc(100vw - 24px));
    }

    .player-bar {
        right: 12px !important;
        bottom: calc(12px + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
        border-radius: 20px !important;
        padding: 8px !important;
    }

    .player-album-art,
    .player-album-art img {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        border-radius: 14px !important;
    }

    #btn-play-pause {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
        flex-basis: 48px !important;
    }
}

/* Final override: mobile/tablet floating player */
@media (max-width: 1023px) {
    :root {
        --floating-player-size: 74px;
        --floating-player-width: min(360px, calc(100vw - 28px));
    }

    .player-bar {
        position: fixed !important;
        grid-column: auto !important;
        grid-row: auto !important;
        left: auto !important;
        right: 14px !important;
        bottom: calc(14px + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
        width: var(--floating-player-width) !important;
        max-width: var(--floating-player-width) !important;
        min-width: 0 !important;
        height: var(--floating-player-size) !important;
        min-height: var(--floating-player-size) !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 9px 10px !important;
        border: 1px solid var(--player-control-border, var(--border-color)) !important;
        border-radius: 22px !important;
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28) !important;
        overflow: visible !important;
        z-index: var(--z-player, 1000) !important;
        cursor: pointer;
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    .player-bar:focus-visible {
        outline: 3px solid color-mix(in srgb, var(--accent-color) 44%, transparent);
        outline-offset: 3px;
    }

    .player-song-info {
        width: auto !important;
        min-width: 0 !important;
        gap: 10px !important;
    }

    .player-album-art,
    .player-album-art img {
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        border-radius: 15px !important;
    }

    .player-song-details {
        min-width: 0 !important;
    }

    .player-song-title,
    .player-song-artist {
        max-width: 100% !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .player-song-title {
        font-size: 0.9rem !important;
        line-height: 1.25 !important;
    }

    .player-song-artist {
        font-size: 0.78rem !important;
    }

    .player-controls {
        width: auto !important;
        min-width: 52px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .control-buttons {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0 !important;
    }

    #btn-shuffle,
    #btn-prev,
    #btn-next,
    #btn-repeat,
    .player-utils,
    .player-bar .progress-container {
        display: none !important;
    }

    #btn-play-pause {
        display: inline-flex !important;
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        min-height: 52px !important;
        border-radius: 999px !important;
        flex: 0 0 52px !important;
    }

    .content-body,
    .app-main,
    .main-content,
    .admin-dashboard,
    .settings-page {
        padding-bottom: calc(104px + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
    }

    .queue-panel,
    .melon-lite-toast,
    .pwa-install-banner:not(.pwa-install-modal),
    .guest-preview-prompt.preview-premium-sheet {
        bottom: calc(104px + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
    }

    .expand-player-overlay {
        padding-bottom: var(--safe-bottom, env(safe-area-inset-bottom, 0px)) !important;
    }
}

@media (max-width: 520px) {
    :root {
        --floating-player-size: 68px;
        --floating-player-width: min(300px, calc(100vw - 24px));
    }

    .player-bar {
        right: 12px !important;
        bottom: calc(12px + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
        border-radius: 20px !important;
        padding: 8px !important;
    }

    .player-album-art,
    .player-album-art img {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        border-radius: 14px !important;
    }

    #btn-play-pause {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
        flex-basis: 48px !important;
    }

    .player-song-title {
        font-size: 0.84rem !important;
    }

    .player-song-artist {
        font-size: 0.74rem !important;
    }
}

/* Lyrics editor playback-safe layout */
.lyrics-edit-page {
    width: 100%;
    padding-bottom: max(150px, calc(var(--player-height) + 56px + var(--safe-bottom))) !important;
}

.lyrics-edit-shell {
    width: min(1040px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 18px;
}

.lyrics-edit-hero,
.lyrics-helper-card,
.lyrics-editor-card,
.lyrics-delete-card {
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.12);
}

.lyrics-edit-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 22px;
    border-radius: 18px;
}

.lyrics-edit-art {
    width: 96px;
    height: 96px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    flex: 0 0 auto;
}

.lyrics-edit-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lyrics-edit-title-block {
    min-width: 0;
}

.lyrics-edit-title-block .page-main-title {
    margin-bottom: 8px;
}

.lyrics-edit-title-block .page-subtitle {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    margin: 0;
}

.lyrics-edit-title-block .page-subtitle span::before {
    content: "쨌";
    margin-right: 10px;
    color: var(--text-muted);
}

.lyrics-edit-back {
    white-space: nowrap;
}

.lyrics-helper-card {
    display: grid;
    gap: 18px;
    padding: 22px;
    border-radius: 18px;
}

.lyrics-helper-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.lyrics-helper-heading h2 {
    margin: 4px 0 8px;
    color: var(--text-primary);
    font-size: 1.08rem;
}

.lyrics-helper-heading p,
.lyrics-helper-note {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.55;
}

.lyrics-helper-note.is-error {
    color: #ff6b61;
    font-weight: 700;
}

.lyrics-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    min-height: 34px;
    border-radius: 999px;
    padding: 7px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 800;
    font-size: 0.86rem;
}

.lyrics-status-badge.has-lyrics {
    color: var(--accent-color);
    border-color: rgba(0, 205, 60, 0.32);
    background: rgba(0, 205, 60, 0.09);
}

.lyrics-status-badge.no-lyrics {
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.34);
    background: rgba(245, 158, 11, 0.1);
}

.lyrics-helper-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.lyrics-helper-meta > div {
    min-width: 0;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-primary);
    padding: 13px 14px;
}

.lyrics-helper-meta span {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
}

.lyrics-helper-meta strong {
    display: block;
    color: var(--text-primary);
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.lyrics-search-actions,
.lyrics-helper-shortcuts,
.lyrics-tool-actions,
.lyrics-lrc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.lyrics-search-link,
.lyrics-tool-actions .btn,
.lyrics-lrc-actions .btn {
    min-height: 42px;
}

.lyrics-lrc-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid color-mix(in srgb, var(--accent-color) 26%, var(--border-color));
    border-radius: 18px;
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--accent-color) 8%, transparent), transparent 58%),
        var(--bg-primary);
}

.lyrics-lrc-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.lyrics-lrc-heading h3 {
    margin: 4px 0 7px;
    color: var(--text-primary);
    font-size: 1.02rem;
}

.lyrics-lrc-heading p,
.lyrics-lrc-status {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.55;
}

.lyrics-lrc-status.is-error {
    color: #ff6b61;
    font-weight: 800;
}

.lyrics-lrc-mode {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 900;
}

.lyrics-lrc-mode.is-lrc {
    color: var(--accent-color);
    border-color: color-mix(in srgb, var(--accent-color) 40%, var(--border-color));
    background: color-mix(in srgb, var(--accent-color) 12%, var(--bg-tertiary));
}

.lyrics-lrc-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 180px));
    gap: 10px;
}

.lyrics-lrc-options label {
    display: grid;
    grid-template-columns: 1fr 82px auto;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 9px 11px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-secondary);
}

.lyrics-lrc-options span {
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 800;
}

.lyrics-lrc-options input {
    min-width: 0;
    min-height: 32px;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.lyrics-lrc-options small {
    color: var(--text-muted);
    font-size: 0.76rem;
}

.lyrics-preview-body.is-lrc-preview {
    display: grid;
    gap: 8px;
    white-space: normal;
}

.lyrics-lrc-preview-line {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid color-mix(in srgb, var(--border-color) 82%, transparent);
    border-radius: 12px;
    background: var(--bg-secondary);
}

.lyrics-lrc-preview-line span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 26px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-color) 10%, var(--bg-tertiary));
    color: var(--accent-color);
    font-size: 0.78rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.lyrics-lrc-preview-line strong {
    min-width: 0;
    color: var(--text-primary);
    font-size: 0.92rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.lyrics-lrc-preview-more {
    margin: 6px 0 0;
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.86rem;
}

.lyrics-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 18px;
    align-items: start;
}

.lyrics-preview-card {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--bg-primary);
    padding: 18px;
    min-width: 0;
    position: sticky;
    top: 96px;
}

.lyrics-preview-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.lyrics-preview-head h3 {
    margin: 0 0 4px;
    color: var(--text-primary);
    font-size: 1rem;
}

.lyrics-preview-head p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.84rem;
}

.lyrics-preview-pill {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 5px 9px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 800;
}

.lyrics-preview-body {
    max-height: min(54vh, 620px);
    overflow: auto;
    white-space: pre-line;
    overflow-wrap: anywhere;
    color: var(--text-primary);
    line-height: 1.82;
    font-size: 0.98rem;
}

.lyrics-preview-body.is-empty {
    min-height: 180px;
    display: grid;
    place-items: center;
    color: var(--text-secondary);
    text-align: center;
}

.lyrics-editor-card {
    border-radius: 18px;
    padding: 24px;
}

.lyrics-editor-form {
    display: grid;
    gap: 18px;
}

.lyrics-editor-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.lyrics-editor-heading h2,
.lyrics-delete-card h2 {
    margin: 0 0 6px;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.lyrics-editor-heading p,
.lyrics-delete-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.lyrics-editor-count {
    flex: 0 0 auto;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    font-size: 0.85rem;
    font-weight: 700;
}

.lyrics-editor-field {
    display: grid;
    gap: 10px;
}

.lyrics-editor-field label {
    font-weight: 800;
    color: var(--text-primary);
}

.lyrics-edit-page textarea,
.lyrics-edit-page .form-control {
    max-width: 100%;
}

.lyrics-editor-textarea {
    width: 100%;
    min-height: clamp(420px, 52vh, 680px);
    resize: vertical;
    line-height: 1.75;
    font-family: var(--font-sans);
    font-size: 1rem;
    border-radius: 16px;
    padding: 18px;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.lyrics-editor-textarea::placeholder {
    color: var(--text-muted);
}

.lyrics-edit-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.lyrics-edit-actions .btn,
.lyrics-delete-card .btn {
    min-height: 44px;
}

.lyrics-delete-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-radius: 18px;
    padding: 20px 22px;
    border-color: rgba(255, 59, 48, 0.32);
}

.lyrics-delete-card h2 {
    color: #ff6b61;
}

.lyrics-save-toast {
    display: none;
    position: fixed;
    left: 50%;
    bottom: calc(var(--player-height) + var(--safe-bottom) + 18px);
    transform: translateX(-50%);
    z-index: 9999;
    background: var(--accent-color);
    color: #fff;
    padding: 11px 22px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
    pointer-events: none;
}

.lyrics-save-toast.is-error {
    background: #ff3b30;
}

@media (max-width: 767px) {
    .lyrics-edit-page {
        padding-bottom: calc(var(--player-height) + 72px + var(--safe-bottom)) !important;
    }

    .lyrics-edit-shell {
        gap: 14px;
    }

    .lyrics-edit-hero {
        grid-template-columns: 72px minmax(0, 1fr);
        padding: 16px;
        gap: 14px;
    }

    .lyrics-edit-art {
        width: 72px;
        height: 72px;
        border-radius: 14px;
    }

    .lyrics-edit-back {
        grid-column: 1 / -1;
        justify-content: center;
        width: 100%;
    }

    .lyrics-editor-card {
        padding: 16px;
        border-radius: 16px;
    }

    .lyrics-helper-card {
        padding: 16px;
        border-radius: 16px;
    }

    .lyrics-helper-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .lyrics-status-badge {
        width: fit-content;
    }

    .lyrics-helper-meta {
        grid-template-columns: 1fr;
    }

    .lyrics-search-actions,
    .lyrics-helper-shortcuts,
    .lyrics-tool-actions,
    .lyrics-lrc-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .lyrics-lrc-card {
        padding: 16px;
        border-radius: 16px;
    }

    .lyrics-lrc-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .lyrics-lrc-mode {
        width: fit-content;
    }

    .lyrics-lrc-options {
        grid-template-columns: 1fr;
    }

    .lyrics-lrc-options label {
        grid-template-columns: 1fr 90px auto;
    }

    .lyrics-lrc-preview-line {
        grid-template-columns: 68px minmax(0, 1fr);
        padding: 8px;
    }

    .lyrics-workspace {
        grid-template-columns: 1fr;
    }

    .lyrics-preview-card {
        position: static;
        padding: 16px;
    }

    .lyrics-preview-body {
        max-height: 360px;
    }

    .lyrics-editor-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .lyrics-editor-count {
        width: fit-content;
    }

    .lyrics-editor-textarea {
        min-height: 420px;
        font-size: 0.96rem;
        padding: 14px;
        border-radius: 14px;
    }

    .lyrics-edit-page .actions-row {
        align-items: stretch !important;
    }

    .lyrics-edit-page .actions-row,
    .lyrics-edit-page .actions-row > div {
        width: 100%;
    }

    .lyrics-edit-page .actions-row .btn {
        width: 100%;
        justify-content: center;
    }

    .lyrics-delete-card {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .lyrics-delete-card .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .lyrics-edit-shell {
        width: min(920px, 100%);
    }

    .lyrics-helper-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lyrics-workspace {
        grid-template-columns: 1fr;
    }

    .lyrics-preview-card {
        position: static;
    }

    .lyrics-editor-textarea {
        min-height: 520px;
    }
}

/* 33李??댁쁺 ?덉젙?? ?덉씠?? 諛섏쓳?? ?뚮쭏 ?뚭? 諛⑹? */
html,
body {
    overflow-x: hidden;
}

.content-body {
    padding-bottom: max(140px, calc(var(--player-height) + 42px + var(--safe-bottom))) !important;
}

.no-player-page .content-body {
    padding-bottom: 40px !important;
}

.pwa-install-banner.pwa-install-modal,
.guest-preview-prompt.preview-premium-modal,
.modal-overlay,
.pwa-guide-modal {
    max-width: 100vw;
    max-height: 100dvh;
    overflow: auto;
    overscroll-behavior: contain;
}

.pwa-install-card,
.guest-preview-card,
.pwa-guide-card,
.modal-box {
    max-width: min(560px, calc(100vw - 32px)) !important;
    max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 48px);
    overflow: auto;
}

body.guest-preview-ended .pwa-install-banner,
body.guest-preview-ended .pwa-guide-modal {
    display: none !important;
}

body.pwa-install-open .guest-preview-prompt.preview-premium-modal {
    z-index: calc(var(--z-modal, 1400) + 8) !important;
}

.melon-lite-toast {
    bottom: calc(var(--player-height) + 18px + var(--safe-bottom)) !important;
    max-width: min(420px, calc(100vw - 32px)) !important;
}

body.pwa-install-open .melon-lite-toast,
body.guest-preview-ended .melon-lite-toast {
    bottom: calc(var(--player-height) + 24px + var(--safe-bottom)) !important;
}

.table-responsive,
.table-wrapper,
.song-table-wrapper,
.admin-table-wrapper,
.backup-table-wrapper {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

img[src=""],
img:not([src]) {
    visibility: hidden;
}

body.theme-light .table-responsive,
body.theme-light .table-wrapper,
body.theme-light .song-table-wrapper,
body.theme-light .admin-table-wrapper,
body.theme-light .backup-table-wrapper {
    background: var(--surface);
    border-color: var(--border-color);
}

body.theme-light .alert-box,
body.theme-light .empty-state,
body.theme-light .empty-list-state,
body.theme-light .loading-text {
    color: var(--text-primary);
    border-color: var(--border-color);
}

body.theme-light .alert-danger,
body.theme-light .alert-error {
    background: rgba(239, 68, 68, 0.10) !important;
    color: #7f1d1d !important;
}

body.theme-light .alert-warning {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #78350f !important;
}

body.theme-light .alert-success {
    background: color-mix(in srgb, var(--accent-color) 11%, #ffffff) !important;
    color: #14532d !important;
}

body.theme-dark .stats-card,
body.theme-dark .library-stat-card,
body.theme-dark .entity-card,
body.theme-dark .genre-card,
body.theme-dark .explore-card,
body.theme-dark .auto-playlist-card,
body.theme-dark .playlist-card,
body.theme-dark .quick-action-card,
body.theme-dark .admin-card,
body.theme-dark .form-card,
body.theme-dark .panel,
body.theme-dark .section-card {
    border-color: color-mix(in srgb, var(--border-color, #2f3a35) 78%, #ffffff 8%);
}

@media (min-width: 768px) {
    body.sidebar-collapsed .main-content {
        min-width: 0;
    }

    body.sidebar-collapsed .content-body {
        max-width: min(1760px, 100%) !important;
    }

    body.sidebar-collapsed .sidebar-collapse-btn:focus-visible {
        outline: 3px solid color-mix(in srgb, var(--accent-color) 42%, transparent);
        outline-offset: 3px;
    }
}

@media (max-width: 767px) {
    .content-body {
        padding-left: 14px !important;
        padding-right: 14px !important;
        padding-bottom: calc(var(--player-height) + 42px + var(--safe-bottom)) !important;
    }

    .player-bar {
        max-width: 100vw !important;
        overflow: visible !important;
    }

    .pwa-install-card,
    .guest-preview-card,
    .pwa-guide-card,
    .modal-box {
        width: calc(100vw - 32px) !important;
        max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - var(--player-height) - 24px);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .content-body {
        padding-bottom: calc(var(--player-height) + 46px + var(--safe-bottom)) !important;
    }

    .player-bar {
        align-items: center !important;
    }
}

/* 32李??낅뜲?댄듃: ?쇱씠?몃え???꾩뿭 蹂댁젙, ?ъ씠?쒕컮 ?ы렯移? ?쒕툝由??뚮젅?댁뼱 吏ㅻ┝ 諛⑹? */
body.theme-light {
    --bg-primary: #f6f8fb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #edf2f7;
    --surface: #ffffff;
    --surface-soft: #f3f6fa;
    --card-bg: #ffffff;
    --input-bg: #ffffff;
    --text-color: #111827;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --muted-text: #6b7280;
    --border-color: #d8e1ea;
    --sidebar-bg: #ffffff;
    --sidebar-hover: #eef7f0;
    --shadow: 0 14px 34px rgba(15, 23, 42, 0.10);
    --player-bg: #ffffff;
    --player-surface: #f6f8fb;
    --player-elevated: #ffffff;
    --player-text: #111827;
    --player-muted: #4b5563;
    --player-border: #d8e1ea;
    --player-progress-bg: #e2e8f0;
    --player-button-bg: #111827;
    --player-button-text: #ffffff;
    --ui-bg: #f6f8fb;
    --ui-surface: #ffffff;
    --ui-card-bg: #ffffff;
    --ui-soft-bg: #f3f7f5;
    --ui-border: #d8e1ea;
}

body.theme-light,
body.theme-light .app-container,
body.theme-light .main-content,
body.theme-light .content-body {
    background: var(--bg-primary);
    color: var(--text-primary);
}

body.theme-light .top-bar,
body.theme-light .sidebar,
body.theme-light .player-bar,
body.theme-light .expanded-player,
body.theme-light .queue-panel,
body.theme-light .modal-box,
body.theme-light .pwa-install-card,
body.theme-light .pwa-guide-card,
body.theme-light .guest-preview-card,
body.theme-light .melon-lite-toast {
    background: var(--surface);
    color: var(--text-primary);
    border-color: var(--border-color);
}

body.theme-light .top-bar {
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

body.theme-light .sidebar {
    box-shadow: 10px 0 30px rgba(15, 23, 42, 0.05);
}

body.theme-light .brand,
body.theme-light .sidebar-section-title,
body.theme-light .nav-item,
body.theme-light .menu-group-toggle,
body.theme-light .player-track-title,
body.theme-light .expanded-title,
body.theme-light .card-title {
    color: var(--text-primary);
}

body.theme-light .muted,
body.theme-light .subtitle,
body.theme-light .nav-meta,
body.theme-light .player-track-artist,
body.theme-light .expanded-artist,
body.theme-light .card-meta,
body.theme-light .empty-text,
body.theme-light .loading-text {
    color: var(--text-secondary);
}

body.theme-light .nav-item:hover,
body.theme-light .menu-group-toggle:hover,
body.theme-light .sidebar-collapse-btn:hover,
body.theme-light .mobile-hamburger:hover {
    background: var(--sidebar-hover);
    color: var(--text-primary);
}

body.theme-light .nav-item.active,
body.theme-light .menu-group.has-active > .menu-group-toggle {
    background: color-mix(in srgb, var(--accent-color) 14%, #ffffff);
    color: #14532d;
    border-color: color-mix(in srgb, var(--accent-color) 34%, var(--border-color));
}

body.theme-light input,
body.theme-light select,
body.theme-light textarea,
body.theme-light .search-input,
body.theme-light .filter-input {
    background: var(--input-bg);
    color: var(--text-primary);
    border-color: var(--border-color);
}

body.theme-light input::placeholder,
body.theme-light textarea::placeholder,
body.theme-light .search-input::placeholder {
    color: #8a96a8;
}

body.theme-light table,
body.theme-light .data-table,
body.theme-light .song-list-table,
body.theme-light .admin-table {
    background: var(--surface);
    color: var(--text-primary);
    border-color: var(--border-color);
}

body.theme-light th,
body.theme-light .table-header,
body.theme-light thead {
    background: var(--surface-soft);
    color: var(--text-primary);
    border-color: var(--border-color);
}

body.theme-light td,
body.theme-light tr,
body.theme-light .table-row {
    border-color: var(--border-color);
}

body.theme-light .btn-secondary,
body.theme-light .btn-ghost,
body.theme-light .icon-btn,
body.theme-light .player-icon-btn,
body.theme-light .player-utility-btn {
    background: var(--surface-soft);
    color: var(--text-primary);
    border-color: var(--border-color);
}

body.theme-light .btn-secondary:hover,
body.theme-light .btn-ghost:hover,
body.theme-light .icon-btn:hover,
body.theme-light .player-icon-btn:hover,
body.theme-light .player-utility-btn:hover {
    background: #e8f2ec;
    border-color: color-mix(in srgb, var(--accent-color) 38%, var(--border-color));
    color: #14532d;
}

body.theme-light .play-btn,
body.theme-light .main-play-btn,
body.theme-light .player-play-btn,
body.theme-light .expanded-play-btn {
    background: var(--player-button-bg) !important;
    color: var(--player-button-text) !important;
    border-color: color-mix(in srgb, var(--player-button-bg) 88%, #ffffff) !important;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.22);
}

body.theme-light .play-btn:hover,
body.theme-light .main-play-btn:hover,
body.theme-light .player-play-btn:hover,
body.theme-light .expanded-play-btn:hover,
body.theme-light .play-btn:focus-visible,
body.theme-light .main-play-btn:focus-visible,
body.theme-light .player-play-btn:focus-visible,
body.theme-light .expanded-play-btn:focus-visible {
    background: #0f172a !important;
    color: #ffffff !important;
    box-shadow: 0 14px 34px rgba(17, 24, 39, 0.30);
}

body.theme-light .modal-overlay,
body.theme-light .pwa-install-banner.pwa-install-modal,
body.theme-light .guest-preview-prompt.preview-premium-modal {
    background: rgba(15, 23, 42, 0.24);
}

@media (min-width: 768px) {
    body.sidebar-collapsed .sidebar {
        width: var(--sidebar-collapsed-width) !important;
        min-width: var(--sidebar-collapsed-width) !important;
        padding: 16px 10px 18px !important;
        overflow: visible;
    }

    body.sidebar-collapsed .brand {
        display: grid !important;
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 10px;
        min-height: 100px;
        padding: 0;
        margin-bottom: 16px;
    }

    body.sidebar-collapsed .brand-icon {
        width: 44px;
        height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    body.sidebar-collapsed .sidebar-collapse-btn {
        position: static !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        z-index: 45;
        border-radius: 14px;
        background: var(--surface-soft);
        color: var(--text-primary);
        border: 1px solid var(--border-color);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    }

    body.sidebar-collapsed .sidebar-scroll {
        overflow-x: visible;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    :root {
        --player-height: 104px;
        --sidebar-width: 230px;
        --sidebar-collapsed-width: 76px;
    }

    .app-container {
        grid-template-rows: minmax(0, 1fr) auto !important;
    }

    .player-bar {
        height: auto !important;
        min-height: calc(var(--player-height) + var(--safe-bottom));
        grid-template-columns: minmax(170px, 1fr) minmax(280px, 1.35fr) auto !important;
        gap: 12px;
        padding: 10px 14px calc(10px + var(--safe-bottom)) !important;
        overflow: visible !important;
    }

    .player-song-info,
    .player-track-meta,
    .player-controls,
    .player-utils {
        min-width: 0;
    }

    .control-buttons {
        gap: 8px;
    }

    .player-utils {
        justify-content: flex-end;
        gap: 8px;
    }

    .player-utils .volume-icon,
    .player-utils .volume-slider-wrapper {
        display: none !important;
    }

    .content-body {
        padding-bottom: calc(var(--player-height) + 36px + var(--safe-bottom)) !important;
    }
}

/* 27李?鍮꾨줈洹몄씤 誘몃━?ｊ린 醫낅즺 premium UI */
:root {
    --z-preview-modal: 1420;
}

.guest-preview-prompt.preview-premium-sheet {
    right: 18px;
    bottom: calc(var(--player-height) + 20px + env(safe-area-inset-bottom)) !important;
    width: min(430px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas:
        "media copy"
        "actions actions";
    gap: 12px 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--accent-color) 30%, var(--border-color));
    border-radius: 16px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent-color) 12%, transparent), transparent 42%),
        var(--card-bg, var(--bg-secondary));
    color: var(--text-color, var(--text-primary));
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
    z-index: var(--z-preview-modal) !important;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 160ms ease, transform 160ms ease;
}

.guest-preview-prompt.preview-premium-sheet.show {
    opacity: 1;
    transform: translateY(0);
}

.guest-preview-media {
    grid-area: media;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-tertiary);
    box-shadow: inset 0 0 0 1px var(--border-color);
}

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

.guest-preview-prompt .guest-preview-copy {
    grid-area: copy;
    min-width: 0;
    display: grid;
    gap: 4px;
    padding-right: 28px;
}

.guest-preview-prompt .guest-preview-badge {
    width: fit-content;
    padding: 3px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-color) 16%, transparent);
    color: var(--accent-color);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
}

.guest-preview-prompt .guest-preview-copy strong {
    font-size: 16px;
    line-height: 1.25;
}

.guest-preview-prompt .guest-preview-copy span,
.guest-preview-prompt .guest-preview-track {
    min-width: 0;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.35;
}

.guest-preview-prompt .guest-preview-track {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: normal;
}

.guest-preview-prompt .guest-preview-actions {
    grid-area: actions;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.guest-preview-prompt .guest-preview-login {
    min-width: 126px;
    justify-content: center;
    font-weight: 800;
}

.guest-preview-dismiss {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}

.guest-preview-dismiss:hover,
.guest-preview-dismiss:focus-visible {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

body.guest-preview-ended .melon-lite-toast {
    bottom: calc(var(--player-height) + 18px + env(safe-area-inset-bottom));
}

body.expand-player-open .guest-preview-prompt.preview-premium-sheet {
    z-index: calc(var(--z-expanded-player) + 1) !important;
}

@media (max-width: 767px) {
    .guest-preview-prompt.preview-premium-sheet {
        left: 12px;
        right: 12px;
        bottom: calc(var(--player-height) + 14px + env(safe-area-inset-bottom)) !important;
        width: auto;
        max-width: calc(100vw - 24px);
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 10px 12px;
        padding: 14px;
        border-radius: 18px;
    }

    .guest-preview-media {
        width: 48px;
        height: 48px;
        border-radius: 10px;
    }

    .guest-preview-prompt .guest-preview-actions {
        justify-content: stretch;
    }

    .guest-preview-prompt .guest-preview-actions .btn {
        flex: 1 1 0;
        min-height: 42px;
    }
}

/* 28李?誘몃━?ｊ린 醫낅즺 以묒븰 紐⑤떖 + ?뚮젅?댁뼱 踰꾪듉 ?쒖씤??蹂닿컯 */
:root {
    --z-preview-modal: 1460;
    --preview-backdrop: rgba(0, 0, 0, 0.42);
    --player-control-surface: color-mix(in srgb, var(--player-text) 10%, transparent);
    --player-control-surface-hover: color-mix(in srgb, var(--accent-color) 18%, transparent);
    --player-control-border: color-mix(in srgb, var(--player-text) 18%, transparent);
    --player-control-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

body.theme-light {
    --preview-backdrop: rgba(15, 23, 42, 0.28);
    --player-control-surface: #ffffff;
    --player-control-surface-hover: #eef7f0;
    --player-control-border: #cfd8dc;
    --player-control-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
}

.guest-preview-prompt.preview-premium-modal {
    position: fixed;
    inset: 0;
    width: auto;
    max-width: none;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    padding-bottom: calc(var(--player-height) + 28px + env(safe-area-inset-bottom));
    background:
        radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--accent-color) 14%, transparent), transparent 34%),
        var(--preview-backdrop);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: var(--z-preview-modal) !important;
    opacity: 0;
    transform: none;
    transition: opacity 180ms ease;
}

.guest-preview-prompt.preview-premium-modal.show {
    opacity: 1;
    transform: none;
}

.guest-preview-card {
    position: relative;
    width: min(540px, calc(100vw - 36px));
    max-height: calc(100dvh - var(--player-height) - 72px - env(safe-area-inset-bottom));
    overflow-y: auto;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    grid-template-areas:
        "media copy"
        "actions actions";
    gap: 18px 20px;
    align-items: center;
    padding: 28px;
    border: 1px solid color-mix(in srgb, var(--accent-color) 28%, var(--border-color));
    border-radius: 22px;
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--accent-color) 13%, transparent), transparent 48%),
        var(--card-bg, var(--bg-secondary));
    color: var(--text-color, var(--text-primary));
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.guest-preview-card .guest-preview-media {
    grid-area: media;
    width: 88px;
    height: 88px;
    border-radius: 18px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.25), inset 0 0 0 1px var(--border-color);
}

.guest-preview-card .guest-preview-copy {
    grid-area: copy;
    padding-right: 34px;
    gap: 8px;
}

.guest-preview-card .guest-preview-badge {
    padding: 5px 10px;
    font-size: 12px;
}

.guest-preview-card .guest-preview-copy strong {
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: 0;
}

.guest-preview-card .guest-preview-copy span {
    font-size: 15px;
    line-height: 1.55;
}

.guest-preview-card .guest-preview-track {
    max-width: 100%;
    padding-top: 2px;
    font-size: 13px;
}

.guest-preview-card .guest-preview-actions {
    grid-area: actions;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 4px;
}

.guest-preview-card .guest-preview-actions .btn {
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 14px;
}

.guest-preview-card .guest-preview-login {
    min-width: 168px;
    box-shadow: 0 12px 28px color-mix(in srgb, var(--accent-color) 30%, transparent);
}

.guest-preview-card .guest-preview-dismiss {
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
}

body.guest-preview-ended .pwa-install-banner {
    display: none !important;
}

body.expand-player-open .guest-preview-prompt.preview-premium-modal {
    z-index: calc(var(--z-expanded-player) + 1) !important;
}

.player-bar .control-btn,
.expand-player-container .control-btn {
    border: 1px solid transparent;
    color: var(--player-text) !important;
    background: transparent;
}

.player-bar .control-btn:not(.play-btn),
.expand-player-container .control-btn:not(.play-btn) {
    background: var(--player-control-surface);
    border-color: var(--player-control-border);
}

.player-bar .control-btn:not(.play-btn):hover,
.player-bar .control-btn:not(.play-btn):focus-visible,
.expand-player-container .control-btn:not(.play-btn):hover,
.expand-player-container .control-btn:not(.play-btn):focus-visible {
    background: var(--player-control-surface-hover);
    border-color: color-mix(in srgb, var(--accent-color) 42%, var(--player-control-border));
    color: var(--accent-color) !important;
}

.player-bar .control-btn.play-btn,
.expand-player-container .control-btn.play-btn,
#btn-play-pause,
#expand-btn-play-pause {
    min-width: 46px;
    min-height: 46px;
    background: var(--player-button-bg) !important;
    color: var(--player-button-text) !important;
    border: 1px solid color-mix(in srgb, var(--player-button-bg) 70%, var(--player-control-border)) !important;
    box-shadow: var(--player-control-shadow);
}

.player-bar .control-btn.play-btn:hover,
.player-bar .control-btn.play-btn:focus-visible,
.expand-player-container .control-btn.play-btn:hover,
.expand-player-container .control-btn.play-btn:focus-visible,
#btn-play-pause:hover,
#btn-play-pause:focus-visible,
#expand-btn-play-pause:hover,
#expand-btn-play-pause:focus-visible {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 10px 28px color-mix(in srgb, var(--accent-color) 26%, rgba(0, 0, 0, 0.18));
}

.player-bar .control-btn.active,
.expand-player-container .control-btn.active {
    color: var(--accent-color) !important;
    border-color: color-mix(in srgb, var(--accent-color) 48%, var(--player-control-border));
    background: color-mix(in srgb, var(--accent-color) 16%, transparent);
}

body.theme-light .player-bar .control-btn,
body.theme-light .expand-player-container .control-btn {
    color: #23313d !important;
}

body.theme-light .player-bar .control-btn.play-btn,
body.theme-light .expand-player-container .control-btn.play-btn,
body.theme-light #btn-play-pause,
body.theme-light #expand-btn-play-pause {
    background: #111827 !important;
    color: #ffffff !important;
    border-color: #111827 !important;
}

body.theme-light .player-bar .control-btn.active,
body.theme-light .expand-player-container .control-btn.active {
    color: #087a2f !important;
    background: #dff8e7;
    border-color: #86d39c;
}

@media (max-width: 767px) {
    .guest-preview-prompt.preview-premium-modal {
        padding: 16px;
        padding-bottom: calc(var(--player-height) + 22px + env(safe-area-inset-bottom));
        align-items: center;
    }

    .guest-preview-card {
        width: min(540px, calc(100vw - 32px));
        max-height: calc(100dvh - var(--player-height) - 48px - env(safe-area-inset-bottom));
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 14px;
        padding: 22px 18px 18px;
        border-radius: 20px;
    }

    .guest-preview-card .guest-preview-media {
        width: 64px;
        height: 64px;
        border-radius: 14px;
    }

    .guest-preview-card .guest-preview-copy {
        padding-right: 30px;
    }

    .guest-preview-card .guest-preview-copy strong {
        font-size: 20px;
    }

    .guest-preview-card .guest-preview-actions {
        flex-direction: column;
    }

    .guest-preview-card .guest-preview-actions .btn {
        width: 100%;
        min-height: 46px;
    }

    .player-bar .control-btn.play-btn,
    #btn-play-pause {
        min-width: 44px;
        min-height: 44px;
    }

    .player-bar .control-btn,
    .expand-player-container .control-btn,
    .progress-bar-wrapper,
    .expand-player-controls .progress-bar-wrapper {
        min-height: 44px;
    }

    .progress-bar-wrapper,
    .expand-player-controls .progress-bar-wrapper {
        display: flex;
        align-items: center;
        padding-block: 18px;
        background-clip: content-box;
    }
}

@media (prefers-reduced-motion: reduce) {
    .guest-preview-prompt.preview-premium-modal,
    .guest-preview-card,
    .player-bar .control-btn,
    .expand-player-container .control-btn {
        transition: none !important;
    }
}

/* 29李?PWA ?ㅼ튂 以묒븰 ?꾨━誘몄뾼 紐⑤떖 */
:root {
    --z-pwa-install-modal: 1440;
    --pwa-install-backdrop: rgba(0, 0, 0, 0.34);
}

body.theme-light {
    --pwa-install-backdrop: rgba(15, 23, 42, 0.24);
}

.pwa-install-banner.pwa-install-modal[hidden] {
    display: none !important;
}

.pwa-install-banner.pwa-install-modal {
    position: fixed !important;
    inset: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    width: auto !important;
    max-width: none !important;
    min-height: 100dvh;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
    padding-bottom: calc(var(--player-height) + 28px + env(safe-area-inset-bottom)) !important;
    border: 0 !important;
    border-radius: 0 !important;
    background:
        radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--accent-color) 13%, transparent), transparent 36%),
        var(--pwa-install-backdrop) !important;
    color: var(--text-color, var(--text-primary));
    box-shadow: none !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: var(--z-pwa-install-modal) !important;
}

.pwa-install-card {
    position: relative;
    width: min(540px, calc(100vw - 36px));
    max-height: calc(100dvh - var(--player-height) - 72px - env(safe-area-inset-bottom));
    overflow-y: auto;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    grid-template-areas:
        "hero copy"
        "steps steps"
        "actions actions";
    gap: 18px 20px;
    align-items: center;
    padding: 28px;
    border: 1px solid color-mix(in srgb, var(--accent-color) 28%, var(--border-color));
    border-radius: 22px;
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--accent-color) 13%, transparent), transparent 48%),
        var(--card-bg, var(--bg-secondary));
    color: var(--text-color, var(--text-primary));
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.pwa-install-hero {
    grid-area: hero;
    width: 88px;
    height: 88px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent-color) 24%, transparent), transparent),
        var(--bg-tertiary);
    color: var(--accent-color);
    font-size: 32px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22), inset 0 0 0 1px var(--border-color);
}

.pwa-install-card .pwa-install-copy {
    grid-area: copy;
    min-width: 0;
    display: grid;
    gap: 8px !important;
    padding-right: 34px;
}

.pwa-install-card .pwa-install-badge {
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-color) 16%, transparent);
    color: var(--accent-color);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}

.pwa-install-card .pwa-install-copy strong {
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: 0;
    white-space: normal;
}

.pwa-install-card .pwa-install-copy span:not(.pwa-install-badge) {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.55;
    white-space: normal;
}

.pwa-install-steps {
    grid-area: steps;
    padding: 14px 16px;
    border: 1px solid color-mix(in srgb, var(--accent-color) 18%, var(--border-color));
    border-radius: 16px;
    background: color-mix(in srgb, var(--accent-color) 8%, transparent);
    color: var(--text-secondary);
    line-height: 1.6;
}

.pwa-install-steps[hidden] {
    display: none !important;
}

.pwa-install-steps strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text-primary);
    font-size: 14px;
}

.pwa-install-steps ol {
    margin: 0;
    padding-left: 20px;
}

.pwa-install-steps li + li {
    margin-top: 4px;
}

.pwa-install-card .pwa-install-actions {
    grid-area: actions;
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-end;
    gap: 10px !important;
    flex-wrap: wrap;
    padding-top: 4px;
}

.pwa-install-card .pwa-install-actions .btn {
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 14px;
}

.pwa-install-card #pwa-install-btn {
    min-width: 152px;
    justify-content: center;
    font-weight: 800;
    box-shadow: 0 12px 28px color-mix(in srgb, var(--accent-color) 30%, transparent);
}

.pwa-install-card .pwa-install-x {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
}

body.guest-preview-ended .pwa-install-banner.pwa-install-modal,
body.expand-player-open .pwa-install-banner.pwa-install-modal {
    display: none !important;
}

body.pwa-install-open .melon-lite-toast {
    bottom: calc(var(--player-height) + 18px + env(safe-area-inset-bottom));
}

@media (max-width: 767px) {
    .pwa-install-banner.pwa-install-modal {
        padding: 16px !important;
        padding-bottom: calc(var(--player-height) + 22px + env(safe-area-inset-bottom)) !important;
    }

    .pwa-install-card {
        width: min(540px, calc(100vw - 32px));
        max-height: calc(100dvh - var(--player-height) - 48px - env(safe-area-inset-bottom));
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 14px;
        padding: 22px 18px 18px;
        border-radius: 20px;
    }

    .pwa-install-hero {
        width: 64px;
        height: 64px;
        border-radius: 16px;
        font-size: 24px;
    }

    .pwa-install-card .pwa-install-copy {
        padding-right: 30px;
    }

    .pwa-install-card .pwa-install-copy strong {
        font-size: 20px;
    }

    .pwa-install-card .pwa-install-actions {
        flex-direction: column !important;
    }

    .pwa-install-card .pwa-install-actions .btn {
        width: 100%;
        min-height: 46px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pwa-install-banner.pwa-install-modal,
    .pwa-install-card {
        transition: none !important;
        animation: none !important;
    }
}

/* 30李?濡쒓렇??諛섏쓳???ъ씠?쒕컮 ?묎린 理쒖쥌 蹂닿컯 */
:root {
    --sidebar-collapsed-width: 76px;
    --z-mobile-hamburger: 1310;
}

.brand {
    min-width: 0;
}

.brand-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-collapse-btn {
    margin-left: auto;
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.sidebar-collapse-btn:hover,
.sidebar-collapse-btn:focus-visible {
    border-color: color-mix(in srgb, var(--accent-color) 45%, var(--border-color));
    background: color-mix(in srgb, var(--accent-color) 12%, var(--card-bg));
    color: var(--accent-color);
}

body.sidebar-collapsed {
    --sidebar-width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .sidebar {
    padding: 20px 10px;
}

body.sidebar-collapsed .brand {
    justify-content: center;
    padding-left: 0;
    margin-bottom: 24px;
}

body.sidebar-collapsed .brand-name,
body.sidebar-collapsed .sidebar-search-form,
body.sidebar-collapsed .menu-group-toggle span,
body.sidebar-collapsed .menu-group-toggle > i,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .sidebar-footer,
body.sidebar-collapsed .sidebar-quick-actions span {
    display: none !important;
}

body.sidebar-collapsed .sidebar-collapse-btn {
    position: absolute;
    top: 18px;
    right: 8px;
    width: 32px;
    height: 32px;
    min-width: 32px;
}

body.sidebar-collapsed .sidebar-scroll {
    padding-left: 0;
    padding-right: 0;
}

body.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 12px 8px;
}

body.sidebar-collapsed .nav-icon {
    width: 24px;
    font-size: 18px;
}

body.sidebar-collapsed .menu-group {
    margin-top: 8px;
}

body.sidebar-collapsed .menu-group-toggle {
    justify-content: center;
    min-height: 16px;
    padding: 4px 0;
    pointer-events: auto;
}

body.sidebar-collapsed .menu-group-toggle::before {
    content: "";
    width: 26px;
    height: 1px;
    border-radius: 999px;
    background: var(--border-color);
}

body.sidebar-collapsed .sidebar-quick-actions {
    grid-template-columns: 1fr;
}

body.sidebar-collapsed .sidebar-quick-actions a {
    min-height: 42px;
    padding: 8px;
}

body.sidebar-collapsed .nav-item,
body.sidebar-collapsed .sidebar-quick-actions a {
    position: relative;
}

body.sidebar-collapsed .nav-item::after,
body.sidebar-collapsed .sidebar-quick-actions a::after {
    content: attr(title);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    max-width: 220px;
    padding: 6px 9px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
    z-index: calc(var(--z-sidebar, 1000) + 3);
}

body.sidebar-collapsed .nav-item:hover::after,
body.sidebar-collapsed .nav-item:focus-visible::after,
body.sidebar-collapsed .sidebar-quick-actions a:hover::after,
body.sidebar-collapsed .sidebar-quick-actions a:focus-visible::after {
    opacity: 1;
}

body.sidebar-collapsed .content-body {
    max-width: min(1680px, 100%);
}

.mobile-menu-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid color-mix(in srgb, var(--text-primary) 16%, var(--border-color));
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg-secondary) 92%, transparent);
    color: var(--text-primary);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
    z-index: var(--z-mobile-hamburger);
}

body.theme-light .mobile-menu-btn {
    background: #ffffff;
    color: #111827;
    border-color: #d6dee3;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
}

.mobile-menu-btn:hover,
.mobile-menu-btn:focus-visible,
.mobile-menu-btn:active {
    color: var(--accent-color);
    border-color: color-mix(in srgb, var(--accent-color) 48%, var(--border-color));
    background: color-mix(in srgb, var(--accent-color) 12%, var(--bg-secondary));
}

body.theme-light .mobile-menu-btn:hover,
body.theme-light .mobile-menu-btn:focus-visible,
body.theme-light .mobile-menu-btn:active {
    background: #eef7f0;
}

.top-bar {
    z-index: calc(var(--z-sidebar, 1000) + 5);
}

.auth-layout .auth-page {
    min-height: calc(100dvh - var(--player-height) - 120px - env(safe-area-inset-bottom));
}

@media (min-width: 768px) {
    .app-container {
        grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
        transition: grid-template-columns 180ms ease;
    }

    .sidebar {
        width: var(--sidebar-width);
        transition: width 180ms ease, padding 180ms ease;
    }

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

    .mobile-menu-btn {
        display: none !important;
    }
}

@media (max-width: 767px) {
    body.sidebar-collapsed {
        --sidebar-width: 260px;
    }

    body.sidebar-collapsed .sidebar {
        padding: 24px;
    }

    body.sidebar-collapsed .brand-name,
    body.sidebar-collapsed .sidebar-search-form,
    body.sidebar-collapsed .menu-group-toggle span,
    body.sidebar-collapsed .menu-group-toggle > i,
    body.sidebar-collapsed .nav-label,
    body.sidebar-collapsed .sidebar-footer,
    body.sidebar-collapsed .sidebar-quick-actions span {
        display: initial !important;
    }

    body.sidebar-collapsed .sidebar-search-form {
        display: grid !important;
    }

    body.sidebar-collapsed .nav-item {
        justify-content: flex-start;
        padding: 12px 16px;
    }

    body.sidebar-collapsed .menu-group-toggle {
        justify-content: space-between;
        min-height: auto;
        padding: 8px 10px;
    }

    body.sidebar-collapsed .menu-group-toggle::before,
    body.sidebar-collapsed .nav-item::after,
    body.sidebar-collapsed .sidebar-quick-actions a::after {
        display: none !important;
    }

    .sidebar-collapse-btn {
        display: none !important;
    }

    .mobile-menu-btn {
        display: inline-flex !important;
        margin-right: 4px;
    }

    .top-bar {
        padding-top: calc(10px + env(safe-area-inset-top));
        gap: 10px;
    }

    .auth-layout .auth-page {
        min-height: auto;
        padding-bottom: calc(32px + env(safe-area-inset-bottom));
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    :root {
        --sidebar-width: 248px;
        --sidebar-collapsed-width: 72px;
    }

    .sidebar {
        padding: 20px 14px;
    }

    .top-bar {
        padding-left: 22px;
        padding-right: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-container,
    .sidebar,
    .sidebar-collapse-btn,
    .mobile-menu-btn {
        transition: none !important;
    }
}

/* 31李?UI/UX ?붿옄???쒖뒪??polish + PWA standalone safe-area */
:root {
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --ui-radius-sm: 8px;
    --ui-radius-md: 12px;
    --ui-radius-lg: 18px;
    --ui-radius-xl: 22px;
    --ui-border: var(--border-color);
    --ui-card-bg: var(--card-bg, var(--bg-secondary));
    --ui-soft-bg: color-mix(in srgb, var(--accent-color) 8%, var(--bg-secondary));
    --ui-shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.12);
    --ui-shadow-md: 0 18px 52px rgba(0, 0, 0, 0.28);
    --ui-shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.40);
    --ui-focus-ring: 0 0 0 3px color-mix(in srgb, var(--accent-color) 34%, transparent);
}

body.theme-light {
    --ui-soft-bg: color-mix(in srgb, var(--accent-color) 8%, #ffffff);
    --ui-shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
    --ui-shadow-md: 0 18px 52px rgba(15, 23, 42, 0.16);
    --ui-shadow-lg: 0 28px 80px rgba(15, 23, 42, 0.22);
}

html,
body {
    max-width: 100%;
}

body.is-standalone .app-container {
    padding-top: var(--safe-top);
    height: calc(100dvh - var(--safe-top));
}

body.is-standalone .top-bar {
    top: 0;
    padding-top: 16px !important;
}

body.is-standalone .sidebar {
    padding-top: max(24px, calc(18px + var(--safe-top))) !important;
}

body.is-standalone.sidebar-collapsed .sidebar {
    padding-top: max(20px, calc(16px + var(--safe-top))) !important;
}

body.is-standalone .sidebar-collapse-btn {
    top: max(18px, calc(12px + var(--safe-top)));
}

body.is-standalone .mobile-menu-btn {
    margin-top: 0;
}

body.is-standalone .pwa-install-banner.pwa-install-modal,
body.is-standalone .guest-preview-prompt.preview-premium-modal,
body.is-standalone .modal-overlay,
body.is-standalone .pwa-guide-modal {
    padding-top: calc(18px + var(--safe-top)) !important;
}

body.is-standalone .melon-lite-toast {
    top: auto;
    bottom: calc(var(--player-height) + 18px + var(--safe-bottom));
}

.btn,
button.btn,
a.btn,
.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    max-width: 100%;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0 15px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.btn-sm {
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
}

.btn-primary {
    border-color: color-mix(in srgb, var(--accent-color) 82%, #000);
    background: var(--accent-color);
    color: #ffffff;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--accent-color) 22%, transparent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: color-mix(in srgb, var(--accent-color) 88%, #ffffff);
    border-color: color-mix(in srgb, var(--accent-color) 72%, #ffffff);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-secondary {
    border-color: var(--ui-border);
    background: color-mix(in srgb, var(--ui-card-bg) 88%, var(--text-primary) 4%);
    color: var(--text-primary);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    border-color: color-mix(in srgb, var(--accent-color) 48%, var(--ui-border));
    background: var(--ui-soft-bg);
    color: var(--accent-color);
}

.btn-danger,
.danger-btn,
.btn-delete {
    border-color: color-mix(in srgb, #ef4444 70%, var(--ui-border));
    background: #ef4444;
    color: #ffffff;
}

.btn:disabled,
.btn.disabled,
button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none !important;
    box-shadow: none !important;
}

.btn:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.control-btn:focus-visible,
.modal-close-btn:focus-visible,
.close-btn:focus-visible {
    outline: 2px solid transparent;
    box-shadow: var(--ui-focus-ring);
}

.stats-card,
.library-stat-card,
.entity-card,
.genre-card,
.explore-card,
.auto-playlist-card,
.playlist-card,
.playlist-create-card,
.settings-card,
.quick-action-card,
.admin-hub-card,
.diagnostic-card,
.alert-card,
.performance-card,
.log-detail-card,
.log-card,
.backup-summary-card,
.backup-file-card,
.check-card,
.media-explore-card,
.auth-card,
.smart-summary-card,
.tag-admin-card,
.merge-candidate-card,
.metadata-quality-card,
.metadata-mobile-card,
.missing-file-card {
    border: 1px solid var(--ui-border) !important;
    border-radius: var(--ui-radius-md) !important;
    background: var(--ui-card-bg) !important;
    box-shadow: var(--ui-shadow-sm);
}

.stats-card:hover,
.library-stat-card:hover,
.entity-card:hover,
.genre-card:hover,
.explore-card:hover,
.auto-playlist-card:hover,
.playlist-card:hover,
.quick-action-card:hover,
.admin-hub-card:hover,
.media-explore-card:hover {
    border-color: color-mix(in srgb, var(--accent-color) 42%, var(--ui-border)) !important;
    box-shadow: var(--ui-shadow-md);
}

.card-title,
.playlist-card-title,
.song-title,
.entity-card strong,
.explore-card strong,
.auto-playlist-card strong,
.compact-song-title,
.track-title {
    min-width: 0;
    overflow-wrap: anywhere;
}

.compact-song-title,
.playlist-card-title,
.player-song-title,
.player-song-artist {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-overlay {
    align-items: center;
    justify-content: center;
    padding: 24px;
    padding-bottom: calc(var(--player-height) + 24px + var(--safe-bottom));
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.modal-box,
.pwa-guide-card,
.guest-preview-card,
.pwa-install-card {
    width: min(560px, calc(100vw - 36px));
    max-height: calc(100dvh - var(--player-height) - 72px - var(--safe-top) - var(--safe-bottom));
    overflow-y: auto;
    border-radius: var(--ui-radius-xl) !important;
    box-shadow: var(--ui-shadow-lg) !important;
}

.modal-header {
    gap: 12px;
}

.modal-close-btn,
.close-btn,
.guest-preview-dismiss,
.pwa-install-x,
.expand-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: color-mix(in srgb, var(--text-primary) 8%, transparent);
    color: var(--text-secondary);
    cursor: pointer;
}

.modal-close-btn:hover,
.modal-close-btn:focus-visible,
.close-btn:hover,
.close-btn:focus-visible,
.guest-preview-dismiss:hover,
.guest-preview-dismiss:focus-visible,
.pwa-install-x:hover,
.pwa-install-x:focus-visible,
.expand-close:hover,
.expand-close:focus-visible {
    border-color: color-mix(in srgb, var(--accent-color) 36%, var(--ui-border));
    background: var(--ui-soft-bg);
    color: var(--accent-color);
}

.melon-lite-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(420px, calc(100vw - 32px));
    min-height: 46px;
    border: 1px solid color-mix(in srgb, var(--accent-color) 22%, var(--ui-border));
    border-radius: var(--ui-radius-md);
    background: var(--player-elevated, var(--ui-card-bg));
    color: var(--player-text, var(--text-primary));
    box-shadow: var(--ui-shadow-md);
}

.melon-lite-toast::before {
    content: "i";
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-color) 18%, transparent);
    color: var(--accent-color);
    font-size: 13px;
    font-weight: 900;
    font-family: var(--font-sans);
}

.melon-lite-toast[data-type="success"] {
    border-color: color-mix(in srgb, var(--accent-color) 40%, var(--ui-border));
}

.melon-lite-toast[data-type="warning"] {
    border-color: color-mix(in srgb, #f59e0b 55%, var(--ui-border));
}

.melon-lite-toast[data-type="warning"]::before {
    content: "!";
    background: rgba(245, 158, 11, 0.16);
    color: #f59e0b;
}

.melon-lite-toast[data-type="error"] {
    border-color: color-mix(in srgb, #ef4444 58%, var(--ui-border));
}

.melon-lite-toast[data-type="error"]::before {
    content: "!";
    background: rgba(239, 68, 68, 0.16);
    color: #ef4444;
}

.loading-text,
.empty-text,
.queue-empty-text,
.tag-empty,
.empty-list-state,
.empty-list-cell {
    color: var(--text-secondary);
    line-height: 1.6;
}

.empty-list-state,
.empty-state,
.queue-empty-text,
.loading-text,
.empty-text {
    border-radius: var(--ui-radius-md);
}

.empty-list-state,
.empty-state {
    padding: 24px;
    border: 1px dashed color-mix(in srgb, var(--accent-color) 24%, var(--ui-border));
    background: color-mix(in srgb, var(--accent-color) 6%, transparent);
}

.song-lyrics-card {
    margin-bottom: 30px;
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--card-bg, var(--bg-secondary));
    color: var(--text-primary);
}

.song-lyrics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.song-lyrics-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
}

.song-lyrics-title i {
    color: var(--accent-color);
}

.lyrics-container {
    max-height: min(56vh, 520px);
    overflow-y: auto;
    padding: 18px 20px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--bg-primary) 72%, var(--card-bg, var(--bg-secondary)));
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.9;
    text-align: left;
    overflow-wrap: anywhere;
}

.lyrics-text-block {
    max-width: 760px;
    max-height: none;
    overflow: visible;
    margin: 0 auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    white-space: pre-line;
    color: var(--text-primary);
}

.lyrics-container .empty-text {
    margin: 0;
    text-align: center;
    font-style: normal;
}

@media (max-width: 767px) {
    .song-lyrics-card {
        padding: 18px 16px;
        border-radius: 14px;
    }

    .song-lyrics-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .lyrics-container {
        max-height: 52vh;
        padding: 16px;
        font-size: 15px;
        line-height: 1.85;
    }
}

.loading-text {
    position: relative;
    padding-left: 28px;
}

.loading-text::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.35em;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 2px solid color-mix(in srgb, var(--accent-color) 22%, transparent);
    border-top-color: var(--accent-color);
    animation: uiSpin 0.8s linear infinite;
}

@keyframes uiSpin {
    to { transform: rotate(360deg); }
}

.alert-box {
    border-radius: var(--ui-radius-md);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-sm);
}

.alert-success {
    border-color: color-mix(in srgb, var(--accent-color) 42%, var(--ui-border));
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
}

.alert-danger,
.alert-error {
    border-color: color-mix(in srgb, #ef4444 50%, var(--ui-border));
    background: rgba(239, 68, 68, 0.10);
}

.alert-warning {
    border-color: color-mix(in srgb, #f59e0b 52%, var(--ui-border));
    background: rgba(245, 158, 11, 0.10);
}

input,
select,
textarea {
    max-width: 100%;
}

@media (min-width: 768px) {
    .content-body {
        max-width: min(1600px, 100%);
    }

    body.sidebar-collapsed .content-body {
        max-width: min(1760px, 100%);
    }
}

@media (max-width: 767px) {
    body.is-standalone .app-container {
        padding-top: var(--safe-top);
        height: calc(100dvh - var(--safe-top));
    }

    body.is-standalone .top-bar {
        padding-top: 12px !important;
    }

    body.is-standalone .sidebar {
        padding-top: calc(18px + var(--safe-top)) !important;
        height: calc(100dvh - var(--safe-top));
    }

    .btn,
    button.btn,
    a.btn {
        min-height: 44px;
    }

    .btn-sm {
        min-height: 40px;
    }

    .modal-overlay,
    .pwa-install-banner.pwa-install-modal,
    .guest-preview-prompt.preview-premium-modal {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .modal-box,
    .pwa-guide-card,
    .guest-preview-card,
    .pwa-install-card {
        width: calc(100vw - 32px);
        max-height: calc(100dvh - var(--player-height) - 48px - var(--safe-top) - var(--safe-bottom));
    }

    .melon-lite-toast {
        left: 16px;
        right: 16px;
        width: auto;
    }

    .stats-grid,
    .dashboard-quick-actions,
    .admin-card-grid,
    .playlist-card-grid,
    .explore-card-grid,
    .genre-card-grid,
    .smart-card-grid {
        grid-template-columns: 1fr !important;
    }

    .home-quick-links {
        margin: 18px 0 24px;
    }

    .home-section + .home-quick-links {
        margin-top: 20px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .dashboard-quick-actions,
    .admin-card-grid,
    .playlist-card-grid,
    .explore-card-grid,
    .genre-card-grid,
    .smart-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .home-section + .home-quick-links {
        margin-top: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn,
    .stats-card,
    .library-stat-card,
    .entity-card,
    .genre-card,
    .explore-card,
    .auto-playlist-card,
    .playlist-card,
    .quick-action-card,
    .modal-box,
    .pwa-guide-card,
    .guest-preview-card,
    .pwa-install-card,
    .melon-lite-toast,
    .loading-text::before {
        transition: none !important;
        animation: none !important;
    }
}

/* 32李?EOF 蹂댁젙: 留덉?留??곗꽑?쒖쐞 */
body.theme-light {
    --bg-primary: #f6f8fb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #edf2f7;
    --surface: #ffffff;
    --surface-soft: #f3f6fa;
    --card-bg: #ffffff;
    --input-bg: #ffffff;
    --text-color: #111827;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --muted-text: #6b7280;
    --border-color: #d8e1ea;
    --sidebar-bg: #ffffff;
    --player-bg: #ffffff;
    --player-surface: #f6f8fb;
    --player-elevated: #ffffff;
    --player-text: #111827;
    --player-muted: #4b5563;
    --player-border: #d8e1ea;
    --player-progress-bg: #e2e8f0;
    --player-button-bg: #111827;
    --player-button-text: #ffffff;
    --ui-bg: #f6f8fb;
    --ui-surface: #ffffff;
    --ui-card-bg: #ffffff;
    --ui-soft-bg: #f3f7f5;
    --ui-border: #d8e1ea;
}

body.theme-light,
body.theme-light .app-container,
body.theme-light .main-content,
body.theme-light .content-body {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

body.theme-light .top-bar,
body.theme-light .sidebar,
body.theme-light .player-bar,
body.theme-light .expanded-player,
body.theme-light .queue-panel,
body.theme-light .modal-box,
body.theme-light .pwa-install-card,
body.theme-light .pwa-guide-card,
body.theme-light .guest-preview-card,
body.theme-light .melon-lite-toast,
body.theme-light .stats-card,
body.theme-light .library-stat-card,
body.theme-light .entity-card,
body.theme-light .genre-card,
body.theme-light .explore-card,
body.theme-light .auto-playlist-card,
body.theme-light .playlist-card,
body.theme-light .quick-action-card,
body.theme-light .admin-card,
body.theme-light .form-card,
body.theme-light .panel,
body.theme-light .section-card {
    background: var(--surface) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

body.theme-light input,
body.theme-light select,
body.theme-light textarea,
body.theme-light .search-input,
body.theme-light .filter-input {
    background: var(--input-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

body.theme-light input::placeholder,
body.theme-light textarea::placeholder,
body.theme-light .search-input::placeholder {
    color: #8a96a8 !important;
}

body.theme-light table,
body.theme-light .data-table,
body.theme-light .song-list-table,
body.theme-light .admin-table {
    background: var(--surface) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

body.theme-light th,
body.theme-light thead,
body.theme-light .table-header {
    background: var(--surface-soft) !important;
    color: var(--text-primary) !important;
}

body.theme-light .nav-item,
body.theme-light .menu-group-toggle,
body.theme-light .brand,
body.theme-light .card-title,
body.theme-light .player-track-title,
body.theme-light .expanded-title {
    color: var(--text-primary) !important;
}

body.theme-light .nav-item.active,
body.theme-light .menu-group.has-active > .menu-group-toggle {
    background: color-mix(in srgb, var(--accent-color) 14%, #ffffff) !important;
    color: #14532d !important;
    border-color: color-mix(in srgb, var(--accent-color) 34%, var(--border-color)) !important;
}

body.theme-light .muted,
body.theme-light .subtitle,
body.theme-light .nav-meta,
body.theme-light .card-meta,
body.theme-light .player-track-artist,
body.theme-light .expanded-artist,
body.theme-light .empty-text,
body.theme-light .loading-text {
    color: var(--text-secondary) !important;
}

body.theme-light .btn-secondary,
body.theme-light .btn-ghost,
body.theme-light .icon-btn,
body.theme-light .player-icon-btn,
body.theme-light .player-utility-btn {
    background: var(--surface-soft) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

body.theme-light .play-btn,
body.theme-light .main-play-btn,
body.theme-light .player-play-btn,
body.theme-light .expanded-play-btn,
body.theme-light #btn-play-pause,
body.theme-light #expand-btn-play-pause {
    background: var(--player-button-bg) !important;
    color: var(--player-button-text) !important;
    border-color: var(--player-button-bg) !important;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.24) !important;
}

@media (min-width: 768px) {
    body.sidebar-collapsed .sidebar {
        width: var(--sidebar-collapsed-width) !important;
        min-width: var(--sidebar-collapsed-width) !important;
        padding: 16px 10px 18px !important;
        overflow: visible !important;
    }

    body.sidebar-collapsed .brand {
        display: grid !important;
        grid-template-columns: 1fr !important;
        justify-items: center !important;
        gap: 10px !important;
        min-height: 100px !important;
        padding: 0 !important;
        margin-bottom: 16px !important;
    }

    body.sidebar-collapsed .brand-icon {
        width: 44px !important;
        height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    body.sidebar-collapsed .sidebar-collapse-btn {
        position: static !important;
        display: inline-flex !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        z-index: 45 !important;
        border-radius: 14px !important;
        background: var(--surface-soft) !important;
        color: var(--text-primary) !important;
        border: 1px solid var(--border-color) !important;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12) !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    :root {
        --player-height: 104px;
        --sidebar-width: 230px;
        --sidebar-collapsed-width: 76px;
    }

    .app-container {
        grid-template-rows: minmax(0, 1fr) auto !important;
    }

    .player-bar {
        height: auto !important;
        min-height: calc(var(--player-height) + var(--safe-bottom)) !important;
        grid-template-columns: minmax(170px, 1fr) minmax(280px, 1.35fr) auto !important;
        gap: 12px !important;
        padding: 10px 14px calc(10px + var(--safe-bottom)) !important;
        overflow: visible !important;
    }

    .player-song-info,
    .player-track-meta,
    .player-controls,
    .player-utils {
        min-width: 0 !important;
    }

    .control-buttons,
    .player-utils {
        gap: 8px !important;
    }

    .player-utils {
        justify-content: flex-end !important;
    }

    .player-utils .volume-icon,
    .player-utils .volume-slider-wrapper {
        display: none !important;
    }

    .content-body {
        padding-bottom: calc(var(--player-height) + 36px + var(--safe-bottom)) !important;
    }
}

/* 33李?EOF ?댁쁺 ?덉젙?? 理쒖쥌 ?곗꽑?쒖쐞 */
html,
body {
    overflow-x: hidden;
}

.content-body {
    padding-bottom: max(140px, calc(var(--player-height) + 42px + var(--safe-bottom))) !important;
}

.no-player-page .content-body {
    padding-bottom: 40px !important;
}

.pwa-install-banner.pwa-install-modal,
.guest-preview-prompt.preview-premium-modal,
.modal-overlay,
.pwa-guide-modal {
    max-width: 100vw;
    max-height: 100dvh;
    overflow: auto;
    overscroll-behavior: contain;
}

.pwa-install-card,
.guest-preview-card,
.pwa-guide-card,
.modal-box {
    max-width: min(560px, calc(100vw - 32px)) !important;
    max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 48px);
    overflow: auto;
}

body.guest-preview-ended .pwa-install-banner,
body.guest-preview-ended .pwa-guide-modal {
    display: none !important;
}

.melon-lite-toast {
    bottom: calc(var(--player-height) + 18px + var(--safe-bottom)) !important;
    max-width: min(420px, calc(100vw - 32px)) !important;
}

body.pwa-install-open .melon-lite-toast,
body.guest-preview-ended .melon-lite-toast {
    bottom: calc(var(--player-height) + 24px + var(--safe-bottom)) !important;
}

.table-responsive,
.table-wrapper,
.song-table-wrapper,
.admin-table-wrapper,
.backup-table-wrapper {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body.theme-light .table-responsive,
body.theme-light .table-wrapper,
body.theme-light .song-table-wrapper,
body.theme-light .admin-table-wrapper,
body.theme-light .backup-table-wrapper {
    background: var(--surface);
    border-color: var(--border-color);
}

body.theme-light .alert-box,
body.theme-light .empty-state,
body.theme-light .empty-list-state,
body.theme-light .loading-text {
    color: var(--text-primary);
    border-color: var(--border-color);
}

body.theme-light .alert-danger,
body.theme-light .alert-error {
    background: rgba(239, 68, 68, 0.10) !important;
    color: #7f1d1d !important;
}

body.theme-light .alert-warning {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #78350f !important;
}

body.theme-light .alert-success {
    background: color-mix(in srgb, var(--accent-color) 11%, #ffffff) !important;
    color: #14532d !important;
}

body.theme-dark .stats-card,
body.theme-dark .library-stat-card,
body.theme-dark .entity-card,
body.theme-dark .genre-card,
body.theme-dark .explore-card,
body.theme-dark .auto-playlist-card,
body.theme-dark .playlist-card,
body.theme-dark .quick-action-card,
body.theme-dark .admin-card,
body.theme-dark .form-card,
body.theme-dark .panel,
body.theme-dark .section-card {
    border-color: color-mix(in srgb, var(--border-color, #2f3a35) 78%, #ffffff 8%);
}

@media (min-width: 768px) {
    body.sidebar-collapsed .main-content {
        min-width: 0;
    }

    body.sidebar-collapsed .content-body {
        max-width: min(1760px, 100%) !important;
    }

    body.sidebar-collapsed .sidebar-collapse-btn:focus-visible {
        outline: 3px solid color-mix(in srgb, var(--accent-color) 42%, transparent);
        outline-offset: 3px;
    }
}

@media (max-width: 767px) {
    .content-body {
        padding-left: 14px !important;
        padding-right: 14px !important;
        padding-bottom: calc(var(--player-height) + 42px + var(--safe-bottom)) !important;
    }

    .player-bar {
        max-width: 100vw !important;
        overflow: visible !important;
    }

    .pwa-install-card,
    .guest-preview-card,
    .pwa-guide-card,
    .modal-box {
        width: calc(100vw - 32px) !important;
        max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - var(--player-height) - 24px);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .content-body {
        padding-bottom: calc(var(--player-height) + 46px + var(--safe-bottom)) !important;
    }

    .player-bar {
        align-items: center !important;
    }
}
/* 47李?EOF ?ъ슜???붾㈃ ?곗꽑?쒖쐞 蹂댁젙 */
.compact-song-card {
    grid-template-columns: 34px 44px minmax(0, 1fr) auto !important;
}

.compact-song-actions {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    min-width: 82px !important;
}

.compact-song-actions .like-btn,
.compact-song-actions .add-next-btn,
.compact-song-actions .add-playlist-btn,
.song-action-group .like-btn,
.song-action-group .add-next-btn,
.song-action-group .add-playlist-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

@media (min-width: 768px) and (max-width: 1199px) {
    .compact-song-card {
        grid-template-columns: 38px 50px minmax(0, 1fr) auto !important;
    }
}

@media (max-width: 767px) {
    .compact-song-card {
        grid-template-columns: 38px 48px minmax(0, 1fr) auto !important;
    }

    .compact-song-actions {
        min-width: 42px !important;
        flex-direction: column !important;
    }
}

/* Season 2 final stability override: keep admin operations accessible and predictable. */
.admin-dashboard {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
}

.admin-dashboard > .page-title-section { order: 1 !important; }
.admin-dashboard > .admin-session-card { order: 2 !important; }
.admin-dashboard > .library-stat-grid { order: 3 !important; }
.admin-dashboard > .admin-operation-center-section { order: 4 !important; }
.admin-dashboard > .admin-library-health-section { order: 5 !important; }
.admin-dashboard > .admin-center-menu-section { order: 6 !important; }
.admin-dashboard > .admin-workspace-section { order: 7 !important; }
.admin-dashboard > .recovery-action-section { order: 8 !important; }
.admin-dashboard > #auto-diagnostic-report { order: 9 !important; }
.admin-dashboard > .backup-status-dashboard-section { order: 10 !important; }
.admin-dashboard > .operation-overview-section { order: 11 !important; }
.admin-dashboard > .admin-issue-section { order: 12 !important; }
.admin-dashboard > .home-section-grid { order: 13 !important; }

.admin-dashboard .operation-overview-section {
    display: grid !important;
    width: auto !important;
    margin-left: 0 !important;
}

.admin-workspace-section[hidden] {
    display: none !important;
}

.admin-workspace-body img {
    max-width: 100%;
    height: auto;
}

