/* ── Reset & Variables ─────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* Self-hosted IBM Plex (latin, normal) — same-origin so fonts work without third-party CDNs */
@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/static/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("/static/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/static/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/static/fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2");
}
@font-face {
    font-family: "IBM Plex Serif";
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url("/static/fonts/ibm-plex-serif-latin-300-normal.woff2") format("woff2");
}
@font-face {
    font-family: "IBM Plex Serif";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/static/fonts/ibm-plex-serif-latin-400-normal.woff2") format("woff2");
}
@font-face {
    font-family: "IBM Plex Serif";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/static/fonts/ibm-plex-serif-latin-600-normal.woff2") format("woff2");
}
@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/static/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("/static/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}
@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/static/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2");
}
@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/static/fonts/ibm-plex-mono-latin-700-normal.woff2") format("woff2");
}

:root, [data-theme="dark"] {
    --bg-base:      #0c0c0c;
    --bg-panel:     #141417;
    --bg-card:      #19191d;
    --bg-input:     #111114;
    --bg-hover:     #1f1f24;
    --border:       #2a2a2e;
    --border-focus: #4ecdc4;
    --text-primary: #c8c8c8;
    --text-secondary: #707070;
    --text-tertiary: #4a4a4a;
    --accent:       #4ecdc4;
    --accent-dim:   #2a8a84;
    --accent-red:   #ff6b6b;
    --font-sans:    "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono:    "IBM Plex Mono", "SF Mono", "Consolas", "Liberation Mono", monospace;
    --font-serif:   "IBM Plex Serif", "Georgia", "Times New Roman", serif;
}

[data-theme="light"] {
    --bg-base:      #f2f2f5;
    --bg-panel:     #ffffff;
    --bg-card:      #f8f8fa;
    --bg-input:     #ffffff;
    --bg-hover:     #eaeaef;
    --border:       #d4d4d8;
    --border-focus: #2a8a84;
    --text-primary: #1a1a1e;
    --text-secondary: #6b6b73;
    --text-tertiary: #9b9ba3;
    --accent:       #1a8a82;
    --accent-dim:   #b0e8e3;
    --accent-red:   #d93636;
}

[data-theme="light"] .featured-page {
    --fp-bg: var(--bg-base);
    --fp-card: var(--bg-card);
    --fp-border: var(--border);
    --fp-teal: oklch(42% 0.12 180);
    --fp-orange: oklch(48% 0.14 45);
}

html, body {
    height: 100%;
    height: 100dvh;
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.5;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
#app {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
}

.screen { display: none; flex-direction: column; flex: 1; min-height: 0; }
.screen.active { display: flex; }

.screen-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.screen-body::-webkit-scrollbar { width: 6px; }
.screen-body::-webkit-scrollbar-track { background: var(--bg-base); }
.screen-body::-webkit-scrollbar-thumb { background: var(--border); }

.screen-body-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Top Bar ──────────────────────────────────────────────────────────────── */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    padding: 6px 12px;
    height: 40px;
    flex-shrink: 0;
    gap: 8px;
}

.top-bar-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1px;
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-label {
    font-size: 11px;
    color: var(--accent);
}

.user-menu { position: relative; }
.user-menu-btn {
    background: transparent;
    border: none;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 4px 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}
.user-menu-btn svg { width: 12px; height: 12px; }
.user-menu-btn:hover { opacity: 0.7; }

.user-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    min-width: 120px;
    z-index: 100;
    display: flex;
    flex-direction: column;
}
.user-menu-item {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 8px 14px;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 6px;
}
.user-menu-item svg { width: 14px; height: 14px; flex-shrink: 0; }
.user-menu-item:hover { background: var(--bg-hover); color: var(--accent); }
.user-menu-item-danger { color: var(--accent-red); }
.user-menu-item-danger:hover { background: var(--bg-hover); color: var(--accent-red); }

/* ── Inline SVG Icons ─────────────────────────────────────────────────────── */
button svg, .btn-action svg, .btn-play-all svg, .btn-sort-small svg {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.125em;
    flex-shrink: 0;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.btn-icon svg { width: 18px; height: 18px; }
.btn-icon:hover { color: var(--accent); }

.btn-action {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 4px 12px;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn-action svg { width: 13px; height: 13px; }
.btn-action:hover { color: var(--accent); border-color: var(--accent-dim); }

.btn-logout { color: var(--accent-red); border-color: #3a2020; }
.btn-logout:hover { color: #ff4444; border-color: var(--accent-red); }

.btn-theme { font-size: 18px; }
.btn-theme svg { width: 20px; height: 20px; }

.top-bar-title-btn {
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    transition: opacity 0.15s;
}
.top-bar-title-btn:active { opacity: 0.6; }

.mode-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
.mode-panel.hidden { display: none !important; }
.mode-panel > .tab-panel { flex: 1; min-height: 0; }

/* ── Login ────────────────────────────────────────────────────────────────── */
#screen-login {
    position: relative;
    overflow: hidden;
}

.login-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.login-gradient-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(135deg, #0a0a0c 0%, #0e1a19 30%, #0c0c0c 60%, #121218 100%);
    background-size: 300% 300%;
    animation: login-gradient-shift 12s ease infinite;
}

@keyframes login-gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-video {
    z-index: 1;
}

.login-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 2;
}

.login-theme-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.login-theme-btn:hover {
    color: var(--accent);
}

.login-center {
    position: relative;
    z-index: 5;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.login-center::-webkit-scrollbar { display: none; }

.login-brand {
    margin-top: auto;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 3px;
    text-transform: lowercase;
    text-shadow: 0 2px 20px rgba(78, 205, 196, 0.3);
    flex-shrink: 0;
}

.login-card {
    margin-bottom: auto;
    background: rgba(20, 20, 23, 0.65);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 360px;
    max-width: 92vw;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.login-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
}

.login-body {
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#screen-login .form-group label {
    color: rgba(255, 255, 255, 0.45);
}

#screen-login .form-group input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}
#screen-login .form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.15);
}
#screen-login .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.login-error {
    font-size: 11px;
    color: var(--accent-red);
    padding: 4px 0;
}

.btn-login {
    background: var(--accent);
    color: #0c0c0c;
    border: none;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    padding: 12px;
    cursor: pointer;
    text-align: center;
    letter-spacing: 0.5px;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn-login:hover {
    background: #5ee0d6;
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.3);
    transform: translateY(-1px);
}
.btn-login:active {
    transform: translateY(0);
}

/* ── Form ─────────────────────────────────────────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.form-group input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 8px 10px;
    outline: none;
}
.form-group input:focus { border-color: var(--accent-dim); }

/* ── Tab Bar ──────────────────────────────────────────────────────────────── */
.tab-bar {
    display: flex;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 8px 0;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ── Browse Panels ────────────────────────────────────────────────────────── */
.browse-panel {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    min-height: 0;
}
.browse-panel::-webkit-scrollbar { width: 6px; }
.browse-panel::-webkit-scrollbar-track { background: var(--bg-base); }
.browse-panel::-webkit-scrollbar-thumb { background: var(--border); }

/* ── Card Grid ────────────────────────────────────────────────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.music-card {
    background: transparent;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.music-card:hover { opacity: 0.85; }
.music-card:active { opacity: 0.75; }

.music-card-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--bg-hover);
    display: block;
}

.music-card-body {
    padding: 6px 2px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-height: 0;
}

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

.music-card-sub {
    font-size: 10px;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Artist Cards ──────────────────────────────────────────────────────────── */
.artist-card {
    position: relative;
}
.artist-card:hover { opacity: 1; }
.artist-card:active { opacity: 1; }

.artist-card-img-wrap {
    position: relative;
    overflow: hidden;
}
.artist-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(0deg, rgba(0,0,0,.65) 0%, transparent 100%);
    pointer-events: none;
}

.artist-card .music-card-body {
    position: relative;
    margin-top: -36px;
    padding: 0 8px 8px;
    z-index: 1;
}
.artist-card .music-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.artist-card .music-card-sub {
    font-size: 10px;
    color: rgba(255,255,255,.7);
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

/* ── Detail Panels ────────────────────────────────────────────────────────── */
.detail-panel {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    min-height: 0;
}
.detail-panel::-webkit-scrollbar { width: 6px; }
.detail-panel::-webkit-scrollbar-track { background: var(--bg-base); }
.detail-panel::-webkit-scrollbar-thumb { background: var(--border); }

.detail-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.detail-cover {
    width: 160px;
    height: 160px;
    object-fit: cover;
    background: var(--bg-hover);
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding-top: 4px;
}

.detail-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    word-break: break-word;
}

.detail-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}
.detail-subtitle:hover { color: var(--accent); }

.detail-meta {
    font-size: 11px;
    color: var(--text-tertiary);
}

.detail-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.btn-play-all {
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid var(--accent-dim);
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 6px 16px;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background 0.15s, color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-play-all svg { width: 12px; height: 12px; }
.btn-play-all:hover { background: var(--accent); color: var(--bg-base); }

.detail-section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}
.detail-section-row .detail-section-title {
    padding-bottom: 0;
    border-bottom: none;
    margin-bottom: 0;
}
.detail-section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}

/* ── Track Table ──────────────────────────────────────────────────────────── */
.track-table {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.track-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color 0.15s;
    min-height: 40px;
}
.track-row:hover { border-color: var(--accent-dim); }
.track-row.playing { border-color: var(--accent); }

.track-num {
    font-size: 11px;
    color: var(--text-tertiary);
    width: 24px;
    text-align: right;
    flex-shrink: 0;
}

.track-row.playing .track-num { color: var(--accent); }

.track-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.track-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.track-row.playing .track-name { color: var(--accent); }

.track-artist {
    font-size: 10px;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.track-duration {
    font-size: 10px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

/* ── Player Bar ───────────────────────────────────────────────────────────── */
.player-bar {
    background: var(--bg-panel);
    border-top: 1px solid var(--border);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-height: 56px;
    /* The featured page uses position:relative + z-index:0, which creates a
       stacking context. Without an explicit position/z-index on the bar,
       featured-page descendants (e.g. the search results dropdown) can paint
       on top of it. Put the bar in its own positioned layer, above the
       featured-page stacking context (z-index 10) but below modal/lyrics. */
    position: relative;
    z-index: 50;
}

.player-cover {
    width: 40px;
    height: 40px;
    object-fit: cover;
    background: var(--bg-card);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.player-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex-shrink: 0;
    max-width: 180px;
}

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

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

.player-controls {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.player-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 11px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.player-btn svg { width: 14px; height: 14px; pointer-events: none; }
.player-btn:hover { color: var(--accent); }

.player-btn-play {
    width: 34px;
    height: 34px;
    color: var(--accent);
}
.player-btn-play svg { width: 18px; height: 18px; }

.player-seek-area {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.player-time {
    font-size: 10px;
    color: var(--text-tertiary);
    min-width: 30px;
    text-align: center;
    flex-shrink: 0;
}

.player-seek-wrap {
    flex: 1;
    display: flex;
    align-items: center;
}

.player-seek {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: var(--border);
    outline: none;
    cursor: pointer;
}
.player-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    background: var(--accent);
    cursor: pointer;
}
.player-seek::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border: none;
    cursor: pointer;
}
.player-seek::-moz-range-track {
    background: var(--border);
    height: 4px;
}

/* ── Tab Panels ───────────────────────────────────────────────────────────── */
.tab-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.tab-panel.hidden { display: none !important; }

.sub-tab-bar {
    display: flex;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}
.sub-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 6px 0;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sub-tab-btn:hover { color: var(--text-primary); }
.sub-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Editor Layout ────────────────────────────────────────────────────────── */
.editor-layout {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0;
}

.sidebar {
    width: 240px;
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-footer {
    padding: 8px 12px;
    border-top: 1px solid var(--border);
}
.sidebar-footer .btn-action { width: 100%; text-align: center; }

.sidebar-divider { height: 1px; background: var(--border); flex-shrink: 0; }

.btn-add-small {
    background: transparent;
    color: var(--text-secondary);
    border: 1px dashed var(--border);
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 2px 8px;
    cursor: pointer;
}
.btn-add-small:hover { color: var(--accent); border-color: var(--accent-dim); }
.btn-sort-small {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 2px 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.btn-sort-small svg { width: 12px; height: 12px; }
.btn-sort-small:hover { color: var(--accent); border-color: var(--accent-dim); }

.folder-tree {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 0;
}
.folder-tree::-webkit-scrollbar { width: 5px; }
.folder-tree::-webkit-scrollbar-thumb { background: var(--border); }

.tree-item {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-primary);
    gap: 6px;
    min-height: 34px;
    transition: background 0.1s;
}
.tree-item:hover { background: var(--bg-hover); }
.tree-item.active { background: var(--bg-hover); color: var(--accent); }

.tree-folder {
    padding-left: calc(12px + var(--depth, 0) * 14px);
    font-weight: 600;
    color: var(--text-secondary);
}
.tree-folder:hover { color: var(--text-primary); }
.tree-folder.active { color: var(--accent); }

.tree-folder-icon {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s;
}
.tree-folder-icon svg { width: 10px; height: 10px; }
.tree-folder-icon.open { transform: rotate(90deg); }

.tree-text {
    padding-left: calc(26px + var(--depth, 0) * 14px);
    font-size: 11px;
}
.tree-text-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.track-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 0;
}
.track-list::-webkit-scrollbar { width: 5px; }
.track-list::-webkit-scrollbar-thumb { background: var(--border); }

.track-list-folder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-top: 1px solid var(--border);
    margin-top: 2px;
}
.track-list-folder-header:first-child { border-top: none; margin-top: 0; }
.track-list-folder-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-list-folder-count { flex-shrink: 0; }

.track-list-item {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 11px;
    color: var(--text-primary);
    gap: 6px;
    min-height: 32px;
    transition: background 0.1s;
}
.track-list-item:hover { background: var(--bg-hover); }
.track-list-item.active { background: var(--bg-hover); color: var(--accent); }
.track-list-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.track-list-item-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-list-item-subtitle { font-size: 9px; color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-list-item-count { font-size: 9px; color: var(--text-tertiary); flex-shrink: 0; }

/* ── Editor Area ──────────────────────────────────────────────────────────── */
.editor-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
}
.editor-container { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.editor-empty {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 13px;
    padding: 16px;
    overflow-y: auto;
}
.editor-active { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.editor-title {
    background: var(--bg-panel);
    border: none;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 600;
    padding: 10px 14px;
    outline: none;
}
.editor-title:focus { border-bottom-color: var(--accent-dim); }
.editor-content {
    flex: 1;
    min-height: 0;
    background: var(--bg-base);
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.7;
    padding: 14px;
    resize: none;
    outline: none;
    overflow-y: scroll;
}
.editor-content::-webkit-scrollbar { width: 6px; }
.editor-content::-webkit-scrollbar-thumb { background: var(--border); }
.editor-content::placeholder { color: var(--text-tertiary); }

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
}
.btn-toolbar {
    background: var(--bg-card);
    color: var(--accent);
    border: 1px solid var(--accent-dim);
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 4px 14px;
    cursor: pointer;
    min-height: 30px;
}
.btn-toolbar:hover { background: var(--accent-dim); color: #fff; }

/* ── Track Container ──────────────────────────────────────────────────────── */
.track-welcome {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
}
.track-container { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.track-title-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    padding: 0 14px;
    flex-shrink: 0;
}
.track-title-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 600;
    padding: 10px 0;
    outline: none;
}
.track-live-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent); flex-shrink: 0;
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.track-sections-scroll { flex: 1; overflow-y: auto; padding: 10px; min-height: 0; }
.track-sections-scroll::-webkit-scrollbar { width: 6px; }
.track-sections-scroll::-webkit-scrollbar-thumb { background: var(--border); }

.track-footer {
    padding: 8px 12px;
    border-top: 1px solid var(--border);
    background: var(--bg-panel);
    flex-shrink: 0;
}
.track-footer .btn-action { width: 100%; text-align: center; }

/* ── Track Audio Bar ──────────────────────────────────────────────────────── */
.track-audio-assign { padding: 8px 14px; background: var(--bg-panel); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.track-audio-assign .btn-action { width: 100%; text-align: center; }

.track-audio-bar {
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    padding: 8px 12px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.track-audio-info { display: flex; align-items: center; gap: 8px; }
.track-audio-cover { width: 36px; height: 36px; object-fit: cover; flex-shrink: 0; background: var(--bg-card); border: 1px solid var(--border); }
.track-audio-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.track-audio-song-title { font-size: 12px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-audio-artist { font-size: 10px; color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.track-audio-version-toggle { display: flex; flex-shrink: 0; }
.version-btn { background: transparent; border: 1px solid var(--border); color: var(--text-tertiary); font-family: var(--font-mono); font-size: 10px; padding: 2px 6px; cursor: pointer; }
.version-btn:first-child { border-right: none; }
.version-btn.active { background: var(--accent); color: var(--bg-base); border-color: var(--accent); }

.track-audio-controls { display: flex; align-items: center; gap: 8px; }
.track-audio-playbtn {
    background: transparent; border: none; color: var(--accent);
    font-family: var(--font-mono); width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; padding: 0;
}
.track-audio-playbtn svg { width: 16px; height: 16px; pointer-events: none; }
.track-audio-time { font-size: 10px; color: var(--text-tertiary); min-width: 32px; text-align: center; flex-shrink: 0; }
.track-audio-seek-wrap { flex: 1; position: relative; height: 20px; display: flex; align-items: center; }
.track-audio-seek { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; background: var(--border); outline: none; cursor: pointer; position: relative; z-index: 2; }
.track-audio-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 10px; background: var(--accent); cursor: pointer; }
.track-audio-seek::-moz-range-thumb { width: 10px; height: 10px; background: var(--accent); border: none; cursor: pointer; }
.track-audio-markers { position: absolute; left: 0; right: 0; top: 0; bottom: 0; pointer-events: none; z-index: 1; }
.audio-marker { position: absolute; top: 50%; width: 2px; height: 14px; transform: translateY(-50%); }
.audio-marker-cue { background: var(--text-primary); opacity: 0.6; height: 10px; }
.audio-marker-mute { background: var(--accent-red); opacity: 0.7; height: 10px; }

.track-audio-cue-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cue-divider { width: 1px; height: 16px; background: var(--border); margin: 0 2px; }
.cue-label { font-size: 10px; color: var(--text-tertiary); flex-shrink: 0; }
.cue-input { width: 50px; font-family: var(--font-mono); font-size: 11px; padding: 2px 4px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text-primary); text-align: center; }
.cue-input:focus { border-color: var(--accent); outline: none; }

/* ── Section Block ────────────────────────────────────────────────────────── */
.section-block { background: var(--bg-card); border: 1px solid var(--border); margin-bottom: 8px; overflow: hidden; }
.section-block.is-mine { border-color: var(--accent-dim); }
.section-header {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px; background: var(--bg-panel);
    border-bottom: 1px solid var(--border); min-height: 36px;
}
.section-color-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.section-owner { font-size: 11px; font-weight: 600; color: var(--text-secondary); }
.section-label { font-size: 11px; color: var(--text-tertiary); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-controls { display: flex; gap: 2px; flex-shrink: 0; }
.section-btn {
    background: transparent; border: none; color: var(--text-tertiary);
    font-family: var(--font-mono); width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.section-btn svg { width: 14px; height: 14px; }
.section-btn:hover { color: var(--text-primary); }
.section-btn.danger:hover { color: var(--accent-red); }
.section-pos-input {
    width: 32px; height: 26px; background: transparent; border: 1px solid var(--border);
    color: var(--text-secondary); font-family: var(--font-mono); font-size: 11px; text-align: center; padding: 0;
    -moz-appearance: textfield;
}
.section-pos-input::-webkit-inner-spin-button, .section-pos-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.section-pos-input:focus { color: var(--text-primary); border-color: var(--accent); outline: none; }

.section-body textarea {
    width: 100%; background: var(--bg-base); border: none; color: var(--text-primary);
    font-family: var(--font-mono); font-size: 13px; line-height: 1.7;
    padding: 10px 12px; resize: none; outline: none; min-height: 80px; overflow: hidden;
}
.section-body textarea::placeholder { color: var(--text-tertiary); }
.section-readonly { padding: 10px 12px; font-size: 13px; line-height: 1.7; color: var(--text-secondary); white-space: pre-wrap; word-break: break-word; min-height: 40px; }
.section-readonly-empty { color: var(--text-tertiary); font-style: italic; }

.section-timestamps { display: flex; align-items: center; gap: 4px; padding: 4px 10px; background: var(--bg-panel); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.section-ts-btn { background: transparent; border: 1px solid var(--border); color: var(--text-tertiary); font-family: var(--font-mono); font-size: 10px; padding: 2px 8px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }
.section-ts-btn svg { width: 12px; height: 12px; vertical-align: middle; }
.section-ts-btn:hover { color: var(--accent); border-color: var(--accent-dim); }
.section-ts-label { font-size: 10px; color: var(--text-tertiary); padding: 2px 4px; }
.section-loop-btn.active { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.section-mute-btn.active { color: var(--accent-red); border-color: var(--accent-red); background: rgba(255, 107, 107, 0.15); }
.section-ts-clear:hover { color: var(--accent-red); border-color: var(--accent-red); }
.beat-snap-hint { font-size: 9px; color: var(--accent); opacity: 0.8; padding: 0 4px; white-space: nowrap; }
.beat-snap-btn.active { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

/* ── Modal ────────────────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal { background: var(--bg-panel); border: 1px solid var(--border); width: 380px; max-width: 92vw; }
.modal-wide { width: 480px; }
.modal-header { background: var(--bg-card); padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.modal-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); }

.form-group select {
    background: var(--bg-input); border: 1px solid var(--border); color: var(--text-primary);
    font-family: var(--font-mono); font-size: 13px; padding: 8px 10px; outline: none;
}

.btn-modal { font-family: var(--font-mono); font-size: 11px; padding: 6px 18px; cursor: pointer; border: 1px solid var(--border); }
.btn-modal-primary { background: var(--accent-dim); color: var(--accent); border-color: var(--accent-dim); }
.btn-modal-primary:hover { background: var(--accent); color: var(--bg-base); }
.btn-modal-cancel { background: transparent; color: var(--text-secondary); }

.audiosearch-results { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.audiosearch-results::-webkit-scrollbar { width: 5px; }
.audiosearch-results::-webkit-scrollbar-thumb { background: var(--border); }
.audiosearch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; background: var(--bg-card); border: 1px solid var(--border); cursor: pointer; }
.audiosearch-row:hover { border-color: var(--accent-dim); }
.audiosearch-row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.audiosearch-row-title { font-size: 12px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audiosearch-row-artist { font-size: 10px; color: var(--text-secondary); }
.audiosearch-row-meta { font-size: 10px; color: var(--text-tertiary); flex-shrink: 0; text-align: right; }
.audiosearch-empty, .audiosearch-loading { color: var(--text-tertiary); font-size: 11px; text-align: center; padding: 20px 10px; }

/* ── Rhyme Overlay ────────────────────────────────────────────────────────── */
.rhyme-overlay { position: fixed; inset: 0; z-index: 500; background: var(--bg-base); display: flex; flex-direction: column; }
.rhyme-overlay-bar { display: flex; align-items: center; justify-content: space-between; background: var(--bg-panel); border-bottom: 1px solid var(--border); padding: 6px 12px; min-height: 40px; flex-shrink: 0; }
.rhyme-overlay-bar-left { display: flex; align-items: center; gap: 10px; }
.rhyme-overlay-title { font-size: 14px; font-weight: 700; color: var(--accent); letter-spacing: 1px; text-transform: uppercase; }
.rhyme-search-row { display: flex; gap: 6px; padding: 10px 12px; background: var(--bg-panel); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.rhyme-search-row input { flex: 1; background: var(--bg-input); border: 1px solid var(--border); color: var(--text-primary); font-family: var(--font-mono); font-size: 14px; padding: 10px 12px; outline: none; }
.rhyme-search-row input:focus { border-color: var(--accent-dim); }
.rhyme-search-row .btn-modal { padding: 10px 20px; font-size: 12px; }
.rhyme-results-scroll { flex: 1; overflow-y: auto; padding: 10px 12px; }
.rhyme-results-list { display: flex; flex-direction: column; gap: 2px; }
.rhyme-section-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-tertiary); padding: 12px 8px 4px; }
.rhyme-section-label:first-child { padding-top: 0; }
.rhyme-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-card); border: 1px solid var(--border); cursor: pointer; min-height: 44px; }
.rhyme-row:hover { border-color: var(--accent-dim); }
.rhyme-row.inserted { border-color: var(--accent); transition: border-color 0s; }
.rhyme-row-word { flex: 1; font-size: 14px; font-weight: 600; color: var(--text-primary); }
.rhyme-row-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.rhyme-score-bar { width: 40px; height: 4px; background: var(--border); position: relative; overflow: hidden; }
.rhyme-score-fill { height: 100%; background: var(--accent); position: absolute; left: 0; top: 0; }
.rhyme-syllables { font-size: 10px; color: var(--text-tertiary); min-width: 24px; text-align: right; }
.rhyme-empty { color: var(--text-tertiary); font-size: 12px; text-align: center; padding: 40px 20px; }
.rhyme-footer { flex-shrink: 0; padding: 6px 12px; background: var(--bg-panel); border-top: 1px solid var(--border); font-size: 9px; color: var(--text-tertiary); text-align: right; }
.rhyme-footer a { color: var(--text-tertiary); text-decoration: underline; }

/* ── Help Overlay ─────────────────────────────────────────────────────────── */
.help-overlay { position: fixed; inset: 0; z-index: 500; background: var(--bg-base); display: flex; flex-direction: column; }
.help-bar { display: flex; align-items: center; justify-content: space-between; background: var(--bg-panel); border-bottom: 1px solid var(--border); padding: 6px 12px; min-height: 40px; flex-shrink: 0; }
.help-bar-left { display: flex; align-items: center; gap: 10px; }
.help-bar-title { font-size: 14px; font-weight: 700; color: var(--accent); letter-spacing: 1px; text-transform: uppercase; }
.help-scroll { flex: 1; overflow-y: auto; padding: 16px 16px 40px; }
.help-section { margin-bottom: 24px; }
.help-section-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent); font-weight: 700; padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.help-item { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-dim, rgba(255,255,255,0.04)); align-items: baseline; }
.help-item:last-child { border-bottom: none; }
.help-key { flex-shrink: 0; min-width: 110px; font-size: 11px; font-weight: 600; color: var(--text-primary); text-transform: lowercase; }
.help-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.help-desc b { color: var(--text-primary); font-weight: 600; }
@media (max-width: 600px) {
    .help-item { flex-direction: column; gap: 2px; }
    .help-key { min-width: unset; }
}

/* ── Context Menu ─────────────────────────────────────────────────────────── */
.context-menu { position: fixed; background: var(--bg-panel); border: 1px solid var(--border); z-index: 2000; min-width: 130px; padding: 4px 0; }
.context-menu-item { padding: 6px 14px; font-size: 11px; color: var(--text-primary); cursor: pointer; }
.context-menu-item:hover { background: var(--bg-hover); color: var(--accent); }
.context-menu-separator { height: 1px; background: var(--border); margin: 4px 0; }
.context-menu-item.danger { color: var(--accent-red); }
.context-menu-item.danger:hover { background: #2a1515; }

/* ── Welcome Screen ───────────────────────────────────────────────────────── */
.welcome { width: 100%; max-width: 500px; display: flex; flex-direction: column; gap: 20px; padding-top: 10px; }
.welcome-greeting { font-size: 16px; color: var(--accent); font-weight: 600; }
.welcome-section-title { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-tertiary); padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.welcome-list { display: flex; flex-direction: column; gap: 4px; }
.welcome-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-card); border: 1px solid var(--border); cursor: pointer; min-height: 44px; }
.welcome-item:hover { border-color: var(--accent-dim); }
.welcome-item-icon { font-size: 14px; width: 20px; text-align: center; flex-shrink: 0; color: var(--text-tertiary); }
.welcome-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.welcome-item-name { font-size: 13px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.welcome-item-meta { font-size: 10px; color: var(--text-tertiary); flex-shrink: 0; }
.welcome-empty { color: var(--text-tertiary); font-size: 11px; padding: 6px 0; }
.welcome-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.welcome-folder-header { display: flex; align-items: center; gap: 6px; padding: 8px 0 4px; font-size: 12px; font-weight: 600; color: var(--text-secondary); cursor: pointer; }
.welcome-folder-header:hover { color: var(--text-primary); }
.welcome-folder-icon { font-size: 10px; width: 14px; text-align: center; transition: transform 0.15s; }
.welcome-folder-icon.open { transform: rotate(90deg); }
.welcome-folder-children { padding-left: 20px; }
.welcome-folder-actions { margin-left: auto; display: flex; gap: 4px; }
.welcome-folder-btn { background: transparent; border: none; color: var(--text-tertiary); font-family: var(--font-mono); font-size: 10px; cursor: pointer; padding: 2px 4px; }
.welcome-folder-btn:hover { color: var(--accent); }

/* admin color picker */
.admin-user-block { border: 1px solid var(--border); background: var(--bg-card); }
.admin-user-block .welcome-item { border: none; background: transparent; }
.color-picker-row { display: flex; gap: 6px; align-items: center; padding: 0 12px 8px; }
.color-picker-swatch { width: 18px; height: 18px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: border-color 0.15s, transform 0.15s; flex-shrink: 0; }
.color-picker-swatch:hover { transform: scale(1.2); }
.color-picker-swatch.selected { border-color: var(--text-primary); transform: scale(1.15); }
.color-picker-custom { width: 18px; height: 18px; padding: 0; border: 1px solid var(--border); border-radius: 50%; cursor: pointer; background: transparent; -webkit-appearance: none; appearance: none; overflow: hidden; }
.color-picker-custom::-webkit-color-swatch-wrapper { padding: 0; }
.color-picker-custom::-webkit-color-swatch { border: none; border-radius: 50%; }

/* ── Sidebar overlay (mobile) ─────────────────────────────────────────────── */
.sidebar-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 90; }

/* ── Mobile List Panel ────────────────────────────────────────────────────── */
.mobile-list-panel {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
.mobile-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
.mobile-list-actions {
    display: flex;
    gap: 6px;
}
.mobile-list-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}
.mobile-list-scroll::-webkit-scrollbar { width: 5px; }
.mobile-list-scroll::-webkit-scrollbar-thumb { background: var(--border); }

.mobile-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: pointer;
    min-height: 44px;
    margin-bottom: 4px;
}
.mobile-list-item:hover { border-color: var(--accent-dim); }
.mobile-list-item:active { background: var(--bg-hover); }
.mobile-list-item-title {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mobile-list-item-meta {
    font-size: 10px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}
.mobile-list-item-stacked {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
}
.mobile-list-item-top {
    display: flex;
    align-items: center;
    gap: 8px;
}
.mobile-list-item-top .mobile-list-item-title { flex: 1; }
.mobile-list-item-sub {
    font-size: 10px;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mobile-list-folder {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 4px 4px;
}
.mobile-list-folder:first-child { padding-top: 0; }

/* ── Loading Placeholder ──────────────────────────────────────────────────── */
.loading-msg {
    color: var(--text-tertiary);
    font-size: 12px;
    text-align: center;
    padding: 40px 0;
}

.empty-msg {
    color: var(--text-tertiary);
    font-size: 12px;
    text-align: center;
    padding: 40px 0;
}

/* ── Admin Area ───────────────────────────────────────────────────────────── */
.admin-track-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.admin-track-title-input {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: transparent;
    border: none;
    border-bottom: 1px solid transparent;
    font-family: var(--font-mono);
    padding: 2px 0;
    outline: none;
    min-width: 0;
}
.admin-track-title-input:focus {
    border-bottom-color: var(--accent-dim);
}
.admin-track-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}
.admin-audio-section { flex-shrink: 0; }
.admin-audio-assign {
    padding: 8px 14px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
}
.admin-audio-assign .btn-action { width: 100%; text-align: center; }
.admin-audio-bar {
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.admin-instrumental-info {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    font-size: 11px;
    color: var(--text-secondary);
}
.admin-instrumental-label {
    color: var(--text-tertiary);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.admin-sections-header {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    padding: 10px 14px 6px;
    flex-shrink: 0;
}
.admin-sections-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 10px 10px;
    min-height: 0;
}
.admin-sections-scroll::-webkit-scrollbar { width: 6px; }
.admin-sections-scroll::-webkit-scrollbar-thumb { background: var(--border); }

.admin-section-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    margin-bottom: 6px;
}
.admin-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
}
.admin-section-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.admin-section-owner {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}
.admin-section-label {
    font-size: 11px;
    color: var(--text-tertiary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-bpm-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    flex-wrap: wrap;
}
.admin-bpm-row .admin-cue-input {
    width: 70px;
    -moz-appearance: textfield;
    appearance: textfield;
}
.admin-bpm-row .admin-cue-input::-webkit-outer-spin-button,
.admin-bpm-row .admin-cue-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.admin-cue-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    flex-wrap: wrap;
}
.admin-cue-label {
    font-size: 10px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}
.admin-cue-input {
    width: 52px;
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 3px 5px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    text-align: center;
    outline: none;
}
.admin-cue-input:focus { border-color: var(--accent); }
.admin-cue-input::placeholder { color: var(--text-tertiary); }
.admin-cue-grab {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 9px;
    padding: 3px 6px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}
.admin-cue-grab:hover { color: var(--accent); border-color: var(--accent-dim); }
.admin-cue-clear {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
}
.admin-cue-clear svg { width: 14px; height: 14px; }
.admin-cue-clear:hover { color: var(--accent-red); }
.admin-section-text {
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 120px;
    overflow-y: auto;
}
.admin-section-text::-webkit-scrollbar { width: 4px; }
.admin-section-text::-webkit-scrollbar-thumb { background: var(--border); }
.admin-section-text-empty {
    color: var(--text-tertiary);
    font-style: italic;
}

.btn-danger {
    color: var(--accent-red);
    border-color: #3a2020;
}
.btn-danger:hover { color: #ff4444; border-color: var(--accent-red); }

.admin-users-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    min-height: 0;
}
.admin-users-container::-webkit-scrollbar { width: 6px; }
.admin-users-container::-webkit-scrollbar-thumb { background: var(--border); }

.admin-user-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    margin-bottom: 4px;
}
.admin-user-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
}
.admin-user-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.15s;
}
.admin-user-color:hover { transform: scale(1.3); }
.admin-user-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}
.admin-user-name:hover { color: var(--accent); }
.admin-user-badge {
    font-size: 9px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
.admin-user-colors {
    display: none;
    gap: 6px;
    align-items: center;
    padding: 6px 14px 10px;
    flex-wrap: wrap;
}
.admin-user-colors.open { display: flex; }
.admin-toggle {
    position: relative;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}
.admin-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.admin-toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}
.admin-toggle-slider::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    bottom: 2px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}
.admin-toggle input:checked + .admin-toggle-slider {
    background: var(--accent-dim);
}
.admin-toggle input:checked + .admin-toggle-slider::before {
    transform: translateX(16px);
    background: var(--accent);
}

/* ── Utilities ────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

::selection {
    background: var(--accent-dim);
    color: var(--text-primary);
}

[data-theme="light"] ::selection {
    background: #b0e8e3;
    color: #1a1a1e;
}

[data-theme="light"] .btn-logout { color: #d93636; border-color: #e8b0b0; }
[data-theme="light"] .btn-logout:hover { color: #b01010; border-color: #d93636; }

/* ── Fullscreen Player ────────────────────────────────────────────────────── */
.player-full {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: var(--bg-base);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 20px 24px;
    transform: translateY(100%);
    transition: transform 0.3s ease, visibility 0.3s;
    will-change: transform;
    pointer-events: none;
    visibility: hidden;
    overflow: hidden;
}
.player-full.open {
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
}

/* blurred cover art background */
.player-full-bg {
    position: absolute;
    inset: -40px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(30px) brightness(0.4);
    z-index: 0;
}

/* canvas video background */
.player-full-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    display: none;
}
.player-full-canvas.active {
    display: block;
}

/* darken overlay on top of bg/canvas, below UI */
.player-full-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.player-full-close {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: transparent;
    width: 36px;
    height: 5px;
    display: block;
    cursor: pointer;
    z-index: 10;
    font-size: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}
.player-full-close:active { background: rgba(255, 255, 255, 0.4); }

/* bottom-aligned element ordering */
.player-full-cover     { order: 7; }
.player-full-lyrics    { order: 8; }
.player-full-btn-lyrics { order: 9; margin-bottom: 4px; }
.player-full-title     { order: 10; }
.player-full-artist    { order: 11; margin-top: -4px; }
.player-full-controls  { order: 12; }
.player-full-queue     { order: 13; margin-top: -4px; }
.player-full-seek      { order: 14; }

.player-full-cover {
    width: 55vw;
    max-width: 260px;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--bg-hover);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    margin-bottom: 8px;
}
.player-full.has-canvas .player-full-cover {
    display: none;
}
.player-full.has-lyrics .player-full-cover {
    width: 40vw;
    max-width: 180px;
}

/* bottom gradient for readability */
.player-full::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 70%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.8) 100%);
    z-index: 3;
    pointer-events: none;
}

/* canvas-specific tweaks */
.player-full.has-canvas .player-full-overlay {
    background: rgba(0, 0, 0, 0.15);
}
.player-full.has-canvas::after {
    height: 70%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0.85) 100%);
}

/* lyrics max height: fill from controls up to ~1/3 from top */
.player-full-lyrics {
    max-height: calc(67vh - 200px);
    margin-bottom: 4px;
}

.player-full-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    max-width: 80vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    z-index: 10;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.player-full-artist {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    max-width: 80vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: -12px;
    z-index: 10;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.player-full-seek {
    width: 100%;
    max-width: 360px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.player-full-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    min-width: 32px;
    text-align: center;
    flex-shrink: 0;
}

.player-full-seek-wrap {
    flex: 1;
    display: flex;
    align-items: center;
}

.player-full-seek-bar {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
}
.player-full-seek-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
}
.player-full-seek-bar::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}
.player-full-seek-bar::-moz-range-track {
    background: rgba(255, 255, 255, 0.2);
    height: 4px;
}

.player-full-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    z-index: 10;
    width: 100%;
}

.player-full-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-mono);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}
.player-full-btn svg { width: 22px; height: 22px; pointer-events: none; }
.player-full-btn:active { color: #fff; background: rgba(255, 255, 255, 0.1); }

.player-full-btn-play {
    width: 56px;
    height: 56px;
    color: #fff;
}
.player-full-btn-play svg { width: 30px; height: 30px; }

.player-full-queue {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.5px;
    z-index: 10;
}

.player-btn-lyrics {
    color: var(--accent);
}
.player-btn-lyrics svg { width: 16px; height: 16px; }

.player-full-btn-lyrics {
    width: 40px;
    height: 40px;
    margin-top: 4px;
    background: rgba(255, 255, 255, 0.1);
}
.player-full-btn-lyrics svg { width: 20px; height: 20px; }

.player-full-lyrics {
    z-index: 10;
    width: 100%;
    max-width: 360px;
    max-height: 30vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
    scrollbar-width: thin;
}
.player-full-lyrics::-webkit-scrollbar { width: 4px; }
.player-full-lyrics::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); }

.pf-lyrics-section {
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}
.pf-lyrics-section.active {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.45);
}
.pf-lyrics-header {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 2px;
}
.pf-lyrics-author { font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.6); }
.pf-lyrics-label { font-size: 9px; color: rgba(255,255,255,0.35); }
.pf-lyrics-text {
    font-size: 11px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
    white-space: pre-wrap;
    word-break: break-word;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.pf-lyrics-section.active .pf-lyrics-text { color: #fff; }

/* ── Lyrics Panel ─────────────────────────────────────────────────────────── */
.lyrics-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 380px;
    max-width: 100vw;
    background: var(--bg-panel);
    border-left: 1px solid var(--border);
    z-index: 600;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    pointer-events: none;
    visibility: hidden;
}
.lyrics-panel.open {
    transform: translateX(0);
    pointer-events: auto;
    visibility: visible;
}

.lyrics-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.lyrics-panel-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lyrics-panel-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}
.lyrics-panel-scroll::-webkit-scrollbar { width: 5px; }
.lyrics-panel-scroll::-webkit-scrollbar-thumb { background: var(--border); }

.lyrics-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    margin-bottom: 6px;
    padding: 8px 10px;
    transition: border-color 0.2s;
}
.lyrics-section.active {
    border-color: var(--accent);
}
.lyrics-section-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}
.lyrics-section-author {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}
.lyrics-section-label {
    font-size: 10px;
    color: var(--text-tertiary);
}
.lyrics-section-text {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 600px) {
    .lyrics-panel {
        width: 100vw;
        border-left: none;
    }
}

/* ── Details Panel (audio features) ─────────────────────────────────────── */
.player-btn-details {
    color: var(--accent);
}
.player-btn-details svg { width: 16px; height: 16px; }

.details-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 380px;
    max-width: 100vw;
    background: var(--bg-panel);
    border-left: 1px solid var(--border);
    z-index: 600;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    pointer-events: none;
    visibility: hidden;
}
.details-panel.open {
    transform: translateX(0);
    pointer-events: auto;
    visibility: visible;
}
.details-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.details-panel-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.details-panel-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
}
.details-panel-scroll::-webkit-scrollbar { width: 5px; }
.details-panel-scroll::-webkit-scrollbar-thumb { background: var(--border); }

.dp-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}
.dp-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 10px 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.dp-stat-num {
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}
.dp-stat-lbl {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-tertiary);
}

.dp-section { margin-bottom: 18px; }
.dp-section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    font-weight: 700;
}

.dp-bar-row {
    display: grid;
    grid-template-columns: 90px 1fr 32px;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.dp-bar-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: lowercase;
}
.dp-bar-track {
    height: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
    border-radius: 3px;
}
.dp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(78,205,196,0.45), var(--accent));
    transition: width 0.3s ease;
}
.dp-bar-fill.dp-bar-accent {
    background: linear-gradient(90deg, rgba(78,205,196,0.55), var(--accent));
}
.dp-bar-pct {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.dp-vox-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
}
.dp-vox-side {
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.dp-vox-track {
    display: flex;
    height: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.dp-vox-inst {
    background: linear-gradient(90deg, rgba(255,255,255,0.10), rgba(255,255,255,0.25));
    transition: width 0.3s ease;
}
.dp-vox-vox {
    background: linear-gradient(90deg, rgba(78,205,196,0.55), var(--accent));
    transition: width 0.3s ease;
}
.dp-vox-pct {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-sans);
    font-size: 10px;
    color: var(--text-tertiary);
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}

.dp-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.dp-genre-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    color: var(--text-primary);
}
.dp-genre-label { font-weight: 600; }
.dp-genre-score {
    font-family: var(--font-sans);
    font-size: 10px;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 600px) {
    .details-panel {
        width: 100vw;
        border-left: none;
    }
}

/* hide fullscreen player on desktop */
@media (min-width: 601px) {
    .player-full { display: none; }
}

/* ── Mobile Responsive ────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }

    .detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .detail-cover { width: 200px; height: 200px; }
    .detail-info { align-items: center; }
    .detail-actions { justify-content: center; }

    .player-bar {
        gap: 8px;
        padding: 6px 10px;
        cursor: pointer;
    }
    .player-bar .player-controls #btn-prev,
    .player-bar .player-controls #btn-next { display: none; }
    .player-bar .player-seek-area { display: none; }
    .player-meta { flex: 1; min-width: 0; max-width: none; }

    .sidebar { display: none !important; }
    .sidebar-overlay { display: none !important; }
    .welcome { max-width: 100%; }
    .editor-title { font-size: 14px; padding: 8px 12px; }
    .editor-content { font-size: 14px; padding: 12px; }
    .section-body textarea { font-size: 14px; }
    .section-readonly { font-size: 14px; }

    .mobile-list-panel { display: flex; }
    .mobile-list-panel.hidden { display: none !important; }

    .editor-layout { display: none; }
    .editor-layout.mobile-open { display: flex; flex: 1; }

    #mode-admin .editor-layout { display: flex; flex-direction: column; }
    #mode-admin .sidebar {
        display: flex !important;
        width: 100%;
        max-height: 35vh;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .admin-users-container { padding: 8px; }

    .top-bar { position: relative; }
    .top-bar-title {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        pointer-events: auto;
    }

    .login-brand { font-size: 22px; letter-spacing: 2px; }
    .login-card { width: 100%; max-width: 92vw; }
    .login-center { gap: 16px; padding: 16px; }

    .featured-verse-title { font-size: 18px; }
    .featured-newest-strip { flex-wrap: wrap; }
    .featured-hl-row { font-size: 10px; gap: 6px; }
    .admin-featured-container { padding: 8px; }
}

/* ── Featured Search ────────────────────────────────────────────────────────── */
.featured-search-wrap {
    position: relative;
    z-index: 10;
    margin-bottom: 20px;
}
.featured-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    transition: border-color .15s;
}
.featured-search-box:focus-within {
    border-color: var(--border-focus);
}
.featured-search-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--text-secondary);
}
.featured-search-box input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
}
.featured-search-box input::placeholder {
    color: var(--text-tertiary);
}
.featured-search-clear {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 0 2px;
}
.featured-search-clear:hover { color: var(--text-primary); }

.featured-search-mode {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 999px;
    padding: 3px 10px;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    flex-shrink: 0;
    line-height: 1;
}
.featured-search-mode:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
}
.featured-search-mode.active {
    background: var(--accent);
    color: var(--bg-input);
    border-color: var(--accent);
}

.featured-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.featured-search-results.hidden { display: none; }

.fs-loading, .fs-empty {
    padding: 16px;
    text-align: center;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 12px;
}
.fs-section-label {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    padding: 10px 14px 4px;
}
.fs-result-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background .1s;
}
.fs-result-row:hover, .fs-result-row.active {
    background: var(--bg-hover);
}
.fs-result-row:last-child { border-radius: 0 0 8px 8px; }
.fs-result-row-meta-missing .fs-result-title { color: var(--text-secondary); font-style: italic; }
.fs-result-row-meta-missing .fs-result-sub { color: var(--text-tertiary); }
.fs-result-row.playing { background: var(--bg-hover); }
.fs-result-row.playing .fs-result-title { color: var(--accent); }
.fs-result-thumb {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-card);
}
.fs-result-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.fs-result-title {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fs-result-sub {
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fs-result-score {
    margin-left: auto;
    flex-shrink: 0;
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    background: rgba(78, 205, 196, .12);
    border: 1px solid rgba(78, 205, 196, .35);
    border-radius: 999px;
    padding: 2px 8px;
    letter-spacing: .5px;
}
.fs-empty-detail {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    color: var(--text-tertiary);
}

/* parser interpretation summary above vibe search results */
.fs-vibe-intent {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 4px 14px 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}
.fs-intent-label {
    font-family: var(--font-sans);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-tertiary);
    font-weight: 700;
    margin-right: 2px;
}
.fs-intent-chip {
    font-family: var(--font-sans);
    font-size: 10px;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px 8px;
    letter-spacing: 0.3px;
}
.fs-intent-mood { color: var(--accent); border-color: rgba(78, 205, 196, 0.4); }
.fs-intent-bpm { color: var(--accent); }
.fs-intent-genre { color: var(--text-primary); }
.fs-intent-pool {
    font-family: var(--font-sans);
    font-size: 9px;
    color: var(--text-tertiary);
    letter-spacing: 0.4px;
    margin-left: 2px;
}

/* feature-bonus indicator on each vibe result row */
.fs-result-bonus {
    margin-left: 4px;
    font-size: 9px;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* ── Featured Page ──────────────────────────────────────────────────────────── */
.featured-page {
    --fp-bg: #0a0b0d;
    --fp-card: #17181c;
    --fp-border: #26272b;
    --fp-teal: oklch(78% 0.14 180);
    --fp-orange: oklch(75% 0.14 45);
    /* Ensure IBM Plex stacks apply here even if outer context changes */
    --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: "IBM Plex Mono", "SF Mono", "Consolas", "Liberation Mono", monospace;
    font-family: var(--font-sans);
    background: var(--fp-bg);
    /* Bleed horizontally past .browse-panel padding only — negative top margin overlapped sub-tab bar */
    margin: 0 -12px;
    padding: 16px 12px;
    min-height: 100%;
    position: relative;
    z-index: 0;
}
.featured-page .featured-section { margin-bottom: 24px; }
.featured-page .featured-section:empty { margin-bottom: 0; }
#featured-soundboard {
    position: relative;
}
.featured-section-title {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

/* featured verse hero */
.featured-verse-card {
    position: relative;
    background: var(--fp-card);
    border: 1px solid var(--fp-border);
    border-radius: 3px;
    overflow: hidden;
    padding: 20px 20px 20px 22px;
}
.featured-verse-glow {
    position: absolute;
    top: -40%;
    right: -25%;
    width: 70%;
    height: 120%;
    background: radial-gradient(ellipse at center, rgba(255, 150, 90, 0.35) 0%, rgba(255, 120, 60, 0.12) 45%, transparent 70%);
    filter: blur(48px);
    pointer-events: none;
    z-index: 0;
}
.featured-verse-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    align-items: start;
}
@media (max-width: 820px) {
    .featured-verse-inner { grid-template-columns: 1fr; }
}
.featured-verse-label {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-tertiary);
    margin-bottom: 10px;
}
.featured-verse-title {
    font-family: var(--font-sans);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.featured-verse-sub {
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-bottom: 14px;
}
.featured-verse-cta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.featured-verse-cta {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 2px;
    border: none;
    cursor: pointer;
    background: var(--fp-teal);
    color: var(--fp-bg);
}
.featured-verse-cta:hover { filter: brightness(1.08); }
.featured-verse-dur {
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
}
.featured-verse-rule {
    height: 1px;
    background: var(--fp-border);
    margin-bottom: 12px;
}
.featured-collab-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.featured-collab-dots {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.featured-collab-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--fp-bg);
    margin-left: -4px;
}
.featured-collab-dot:first-child { margin-left: 0; }
.featured-collab-names {
    font-family: var(--font-sans);
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1.4;
    min-width: 0;
}
.featured-verse-body-wrap {
    max-height: 320px;
    overflow: auto;
    padding-right: 4px;
}
.featured-verse-columns {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
    color: var(--text-primary);
    column-count: 2;
    column-gap: 24px;
    column-rule: 1px solid var(--fp-border);
}
@media (max-width: 600px) {
    .featured-verse-columns { column-count: 1; column-rule: none; }
}
.featured-verse-line {
    break-inside: avoid;
    margin-bottom: 0.25em;
}
.featured-verse-gap {
    break-inside: avoid;
    height: 0.85em;
}

/* newest release strip */
.featured-newest-strip {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: var(--fp-card);
    border: 1px solid var(--fp-border);
    border-radius: 3px;
    cursor: pointer;
}
.featured-newest-strip:hover { background: #1a1b20; }
.featured-newest-cover {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
    background: var(--bg-card);
}
.featured-newest-body { flex: 1; min-width: 0; }
.featured-newest-title {
    font-family: var(--font-sans);
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.featured-newest-meta {
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--text-tertiary);
}
.featured-newest-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}
.featured-newest-play {
    width: 40px;
    height: 40px;
    border-radius: 2px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--fp-teal);
    color: var(--fp-bg);
    padding: 0;
}
.featured-newest-play:hover { filter: brightness(1.08); }
.featured-newest-play svg { width: 18px; height: 18px; }
.featured-newest-plays {
    font-family: var(--font-sans);
    font-size: 10px;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
}

/* catalog grid: tracks | albums */
.featured-catalog {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}
@media (max-width: 900px) {
    .featured-catalog { grid-template-columns: 1fr; }
}
.featured-hl-tracks-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--fp-border);
    border-radius: 3px;
    overflow: hidden;
    background: var(--fp-card);
}
.featured-hl-row {
    display: grid;
    grid-template-columns: 24px 36px 1fr auto auto auto 22px;
    align-items: center;
    gap: 8px 10px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--fp-border);
    cursor: pointer;
    font-variant-numeric: tabular-nums;
}
.featured-hl-row:last-child { border-bottom: none; }
.featured-hl-row:hover { background: #1a1b20; }
.featured-hl-idx {
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--text-tertiary);
    text-align: right;
}
.featured-hl-cover {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 2px;
    background: var(--bg-base);
}
.featured-hl-main { min-width: 0; }
.featured-hl-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.featured-hl-title {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.featured-verse-star {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--fp-orange);
    flex-shrink: 0;
}
.featured-hl-meta {
    font-family: var(--font-sans);
    font-size: 10px;
    color: var(--text-tertiary);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.featured-hl-plays, .featured-hl-dur {
    font-family: var(--font-sans);
    font-size: 10px;
    color: var(--text-tertiary);
}
.featured-hl-playicon {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.featured-hl-playicon svg { width: 14px; height: 14px; }

.featured-hl-album-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.featured-hl-album-tile {
    background: var(--fp-card);
    border: 1px solid var(--fp-border);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    transition: background 0.12s;
}
.featured-hl-album-tile:hover { background: #1a1b20; }
.featured-hl-album-cover {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: var(--bg-base);
}
.featured-hl-album-body { padding: 8px 10px 10px; }
.featured-hl-album-title {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.featured-hl-album-meta {
    font-family: var(--font-sans);
    font-size: 10px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* soundboard header + legend */
.soundboard-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.soundboard-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    justify-content: flex-end;
}
.soundboard-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-sans);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
}
.soundboard-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.soundboard-hint {
    font-family: var(--font-sans);
    font-size: 9px;
    color: var(--text-tertiary);
    letter-spacing: 0.04em;
}
.soundboard-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.soundboard-btn {
    background: transparent;
    border: 1px solid var(--fp-border);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
    text-align: center;
    white-space: nowrap;
}
.soundboard-btn.soundboard-more,
.soundboard-btn.soundboard-less {
    width: 3.25rem;
    min-width: 3.25rem;
    max-width: 3.25rem;
    flex-shrink: 0;
    padding-left: 0;
    padding-right: 0;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.soundboard-btn.sb-rapper {
    color: var(--text-primary);
    background: transparent;
}
.soundboard-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.soundboard-btn.sb-rapper:hover {
    color: var(--text-primary);
    filter: brightness(1.08);
}
.soundboard-btn:active { transform: scale(0.96); }
.soundboard-btn.sb-playing {
    background: var(--fp-teal);
    color: var(--fp-bg);
    border-color: var(--fp-teal);
    font-weight: 700;
}
.soundboard-btn.sb-rapper.sb-playing {
    color: var(--fp-bg);
    font-weight: 700;
}

/* admin featured verse */
.admin-featured-verse-panel {
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 12px;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.admin-fv-track-label { font-size: 12px; color: var(--text-primary); }
.admin-fv-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
}
.admin-fv-input, .admin-fv-textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 8px;
    border-radius: 3px;
}
.admin-fv-textarea { resize: vertical; min-height: 120px; }
.admin-fv-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.admin-btn-muted { opacity: 0.75; }
.admin-muted { font-size: 11px; color: var(--text-tertiary); }
.admin-fv-hint { margin-top: 4px; }
.admin-fv-row { margin-bottom: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.admin-fv-header-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.admin-fv-section-badge {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    border: 1px solid var(--accent-dim);
    padding: 2px 8px;
    border-radius: 3px;
}
.fv-texter-section-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: pointer;
    text-align: left;
}
.fv-texter-section-row:hover { border-color: var(--accent-dim); }
.fv-texter-section-meta {
    font-size: 10px;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}
.fv-texter-section-preview {
    font-size: 11px;
    color: var(--text-secondary);
    max-height: 4.5em;
    overflow: hidden;
    line-height: 1.4;
}

/* ── Admin Featured ─────────────────────────────────────────────────────────── */
.admin-featured-container {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.admin-featured-category {
    margin-bottom: 20px;
}
.admin-featured-cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}
.admin-featured-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}
.admin-featured-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 8px 10px;
    gap: 8px;
}
.admin-featured-item-label {
    font-size: 12px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.admin-featured-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.admin-featured-item-actions button {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
}
.admin-featured-item-actions button:hover { color: var(--text-primary); }
.admin-featured-item-actions button svg { width: 14px; height: 14px; }
.admin-featured-delete:hover { color: var(--accent-red) !important; }
.admin-soundboard-upload {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.admin-sb-title-input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 4px 8px;
    flex: 1;
    min-width: 100px;
}
.admin-sb-title-input:focus { border-color: var(--border-focus); outline: none; }
.admin-sb-user-select,
.admin-sb-item-user {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 3px 6px;
    min-width: 80px;
    max-width: 120px;
}
.admin-sb-item-user {
    border-width: 2px;
}
.admin-sb-file-label {
    cursor: pointer;
}
.audiosearch-row-cover {
    width: 40px;
    height: 40px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-hover);
}

/* ── Soundboard → sequencer ───────────────────────────────────────────────── */
.soundboard-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.soundboard-seq-btn {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 5px 10px;
    border-radius: 2px;
    border: 1px solid var(--fp-border, var(--border));
    background: var(--fp-card, var(--bg-elevated));
    color: var(--fp-teal, var(--accent));
    cursor: pointer;
}
.soundboard-seq-btn:hover {
    filter: brightness(1.08);
}

/* ── Step sequencer page ───────────────────────────────────────────────────── */
.sequencer-body {
    margin: 0;
    min-height: 100vh;
    background: var(--fp-bg, var(--bg-base));
}
.sequencer-page {
    --fp-bg: #0a0b0d;
    --fp-card: #17181c;
    --fp-border: #26272b;
    --fp-teal: oklch(78% 0.14 180);
    font-family: var(--font-sans, system-ui, sans-serif);
    max-width: 960px;
    margin: 0 auto;
    padding: 16px 14px 32px;
    color: var(--text-primary);
    box-sizing: border-box;
}
.sequencer-top {
    margin-bottom: 16px;
}
.sequencer-back {
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 8px;
}
.sequencer-back:hover {
    color: var(--fp-teal);
}
.sequencer-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.02em;
}
.sequencer-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.sequencer-transport-btn {
    font-family: var(--font-sans, system-ui, sans-serif);
    font-size: 12px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 2px;
    border: 1px solid var(--fp-border);
    background: var(--fp-card);
    color: var(--text-primary);
    cursor: pointer;
}
.sequencer-transport-btn:hover:not(:disabled) {
    border-color: var(--fp-teal);
    color: var(--fp-teal);
}
.sequencer-transport-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.sequencer-random-btn {
    font-weight: 500;
    color: var(--text-secondary);
}
.sequencer-random-btn:hover:not(:disabled) {
    color: var(--text-primary);
}
.sequencer-bpm-label {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.sequencer-bpm-input {
    width: 4.5em;
    padding: 6px 8px;
    border: 1px solid var(--fp-border);
    border-radius: 2px;
    background: var(--fp-card);
    color: var(--text-primary);
    font-family: var(--font-mono, monospace);
    font-size: 12px;
}
.sequencer-status {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 12px;
}
.sequencer-empty {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.sequencer-empty a {
    color: var(--fp-teal);
}
.sequencer-grid-wrap {
    overflow-x: auto;
    padding-bottom: 8px;
}
.sequencer-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: min(100%, 720px);
}
.sequencer-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}
.sequencer-row-label {
    flex: 0 0 100px;
    max-width: 100px;
    font-size: 11px;
    line-height: 1.3;
    padding: 8px 6px;
    border-radius: 2px;
    border: 1px solid var(--fp-border);
    background: var(--fp-card);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    border-left-width: 3px;
    border-left-color: var(--fp-border);
}
.sequencer-row-label-accent {
    color: var(--text-primary);
}
.sequencer-cell {
    flex: 1;
    min-width: 22px;
    max-width: 40px;
    aspect-ratio: 1;
    padding: 0;
    border-radius: 2px;
    border: 1px solid var(--fp-border);
    background: var(--fp-bg);
    cursor: pointer;
}
.sequencer-cell:hover {
    border-color: var(--text-tertiary);
}
.sequencer-cell.seq-cell-on {
    background: color-mix(in oklab, var(--fp-teal) 35%, var(--fp-card));
    border-color: color-mix(in oklab, var(--fp-teal) 60%, var(--fp-border));
}
.sequencer-cell.seq-cell-playhead {
    box-shadow: 0 0 0 1px var(--fp-teal);
}
@media (max-width: 520px) {
    .sequencer-row-label {
        flex: 0 0 72px;
        max-width: 72px;
        font-size: 10px;
    }
}
