/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
    text-align: center;
    padding: 4rem 0;
}
.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.15;
    margin-bottom: 1.2rem;
}
.hero p {
    font-size: 1.1rem;
    color: var(--color-muted);
    max-width: 520px;
    margin: 0 auto 2.5rem;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; }

/* ── Auth forms ───────────────────────────────────────────────────────────── */
.auth-form {
    max-width: 400px;
    margin: 0 auto;
}
.auth-form h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.auth-form label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-bottom: 0.3rem;
    margin-top: 1rem;
}
.auth-form label:first-of-type { margin-top: 0; }
.auth-form .optional { font-size: 0.75rem; }

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.15s;
}
.auth-form input:focus { border-color: var(--color-accent); }

.auth-form .btn { width: 100%; margin-top: 1.5rem; text-align: center; }
.auth-form p    { margin-top: 1.2rem; font-size: 0.85rem; color: var(--color-muted); }
.auth-form p a  { color: var(--color-text); }

/* ── Dashboard ────────────────────────────────────────────────────────────── */
.dashboard h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
}
.dashboard h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.dashboard .platform-connections > p {
    color: var(--color-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.platform-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.platform-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1.2rem 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--color-text);
    min-width: 160px;
    transition: border-color 0.15s;
}
.platform-card:hover { border-color: var(--color-accent); }
.platform-card--disabled { opacity: 0.4; cursor: default; }
.platform-card .platform-name   { font-weight: 600; }
.platform-card .platform-action { font-size: 0.8rem; color: var(--color-muted); }

/* ── Error pages ──────────────────────────────────────────────────────────── */
.error-page { text-align: center; padding: 4rem 0; }
.error-page h1 { font-size: 4rem; font-weight: 800; letter-spacing: -0.04em; margin-bottom: 1rem; }
.error-page p  { color: var(--color-muted); margin-bottom: 2rem; }

/* ── Alert info ───────────────────────────────────────────────────────────── */
.alert--info { background: rgba(59,130,246,0.12); border: 1px solid #3b82f6; color: #93c5fd; }

/* ── Dashboard v2 ─────────────────────────────────────────────────────────── */
.dash-header { margin-bottom: 2.5rem; }
.dash-header h1 { font-size: 2rem; font-weight: 700; }

.platform-section { margin-bottom: 2.5rem; }
.platform-section h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.platform-section > p { color: var(--color-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }

.platform-connected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    gap: 1rem;
}
.platform-connected__info { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.platform-connected__label { font-weight: 600; font-size: 0.9rem; }
.platform-connected__meta  { font-size: 0.8rem; color: var(--color-muted); }

.platform-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.platform-badge--spotify { background: var(--color-accent); color: #000; }
.platform-badge--tidal   { background: #00ffff; color: #000; }

.sync-status { font-size: 0.85rem; color: var(--color-muted); }
.sync-status--pending { color: #f0a500; }

.btn--sm { padding: 0.4rem 0.9rem; font-size: 0.82rem; }

.stat-strip {
    display: flex;
    gap: 2rem;
    padding: 1rem 1.5rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
}
.stat-strip__item { display: flex; flex-direction: column; gap: 0.1rem; }
.stat-strip__value { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; }
.stat-strip__label { font-size: 0.75rem; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* ── Analyze setup screen ─────────────────────────────────────────────────── */
.analyze-header { margin-bottom: 2.5rem; }
.analyze-header h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.4rem; }
.analyze-subtitle { color: var(--color-muted); font-size: 1rem; margin-bottom: 1rem; }

.analyze-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-muted);
    margin-top: 0.5rem;
}
.analyze-stats .divider { color: var(--color-border); }
.analyze-stats strong { color: var(--color-text); }

.analyze-section { margin-bottom: 2.5rem; }
.analyze-section h2 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.3rem; display: flex; align-items: center; }
.analyze-section__desc { font-size: 0.875rem; color: var(--color-muted); margin-bottom: 1.25rem; }
.analyze-section__note { font-size: 0.8rem; color: var(--color-muted); margin-top: 0.75rem; }

/* Mode cards */
.mode-cards { display: flex; flex-direction: column; gap: 0.75rem; }

.mode-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.15s;
    user-select: none;
}
.mode-card:hover { border-color: #555; }
.mode-card--selected { border-color: var(--color-accent); }
.mode-card input[type="radio"] { display: none; }

.mode-card__body { flex: 1; }
.mode-card__title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.mode-card__desc { font-size: 0.82rem; color: var(--color-muted); line-height: 1.5; }
.mode-card__counter { margin-top: 0.5rem; font-size: 0.8rem; color: var(--color-accent); font-weight: 500; }

.mode-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(201,149,42,0.2);
    color: var(--color-accent);
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
}

/* Playlist grid */
.playlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.playlist-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.15s;
    user-select: none;
}
.playlist-card:hover { border-color: #555; }
.playlist-card--checked { border-color: var(--color-accent); }
.playlist-card input[type="checkbox"] { margin-top: 0.15rem; flex-shrink: 0; accent-color: var(--color-accent); }

.playlist-card__body { flex: 1; min-width: 0; }
.playlist-card__name {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.playlist-card__meta { font-size: 0.75rem; color: var(--color-muted); margin-top: 0.15rem; }
.playlist-card__desc { font-size: 0.75rem; color: var(--color-muted); margin-top: 0.3rem; line-height: 1.4; }

/* Link-style buttons */
.link-btn {
    background: none;
    border: none;
    color: var(--color-accent);
    cursor: pointer;
    font-size: inherit;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.link-btn:hover { opacity: 0.8; }

/* Submit */
.analyze-submit { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); }
.analyze-submit__note { margin-top: 0.75rem; font-size: 0.85rem; color: var(--color-muted); }
.btn--lg { padding: 0.8rem 2rem; font-size: 1rem; }

/* ── Story CTA ────────────────────────────────────────────────────────────── */
.story-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.2rem 1.5rem;
    background: rgba(201,149,42,0.08);
    border: 1px solid rgba(201,149,42,0.3);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}
.story-cta__text { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.875rem; }
.story-cta__text strong { color: var(--color-text); }
.story-cta__text span { color: var(--color-muted); }

/* ── Page header (shared across playlists, analyze, etc.) ─────────────────── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}
.page-header__text h1 { margin-bottom: 0.25rem; }
.page-header__sub { font-size: 0.875rem; color: var(--color-muted); margin-top: 0.25rem; }
.page-header__breadcrumb { font-size: 0.82rem; margin-bottom: 0.4rem; }
.page-header__breadcrumb a { color: var(--color-muted); text-decoration: none; }
.page-header__breadcrumb a:hover { color: var(--color-text); }
.page-header__actions { display: flex; gap: 0.5rem; align-items: center; flex-shrink: 0; margin-top: 0.25rem; }

/* ── Empty state ──────────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-muted);
    font-size: 0.9rem;
}

/* ── Playlist list (index) ────────────────────────────────────────────────── */
.playlist-section { margin-bottom: 2.5rem; }
.playlist-section__heading {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.playlist-section__note { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 0.75rem; }

.playlist-list { display: flex; flex-direction: column; gap: 2px; }

.playlist-row {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.75rem 1rem;
    background: var(--color-surface);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--color-text);
    transition: background 0.12s;
}
.playlist-row:hover { background: #222; }
.playlist-row--muted .playlist-row__name { color: var(--color-muted); }
.playlist-row__name { font-size: 0.95rem; font-weight: 500; }
.playlist-row__meta { display: flex; gap: 1rem; font-size: 0.78rem; color: var(--color-muted); flex-wrap: wrap; }
.playlist-row__desc { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.playlist-row__date { margin-left: auto; white-space: nowrap; }

/* ── Track table (playlist show) ─────────────────────────────────────────── */
.track-table-wrap { overflow-x: auto; }

.track-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.track-table thead th {
    text-align: left;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-muted);
    padding: 0 0.75rem 0.6rem;
    border-bottom: 1px solid var(--color-border);
}
.track-table tbody tr { border-bottom: 1px solid #1e1e1e; }
.track-table tbody tr:hover { background: var(--color-surface); }
.track-table tbody tr:last-child { border-bottom: none; }
.track-table td { padding: 0.55rem 0.75rem; vertical-align: middle; }

.track-table__num { width: 2.5rem; color: var(--color-muted); text-align: right; }
.track-table__dur { width: 4rem; text-align: right; color: var(--color-muted); font-variant-numeric: tabular-nums; }
.track-table__mood { width: 7rem; }
.track-table__album { color: var(--color-muted); font-size: 0.82rem; width: 14%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.track-table__title { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.track-table__title > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.track-thumb {
    width: 40px;
    height: 40px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
}
.track-thumb--empty {
    display: inline-block;
    background: var(--color-border);
}

.track-row--stub td { color: var(--color-muted); }
.track-explicit {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--color-muted);
    border: 1px solid var(--color-border);
    border-radius: 2px;
    padding: 0 2px;
    vertical-align: middle;
    margin-left: 4px;
    line-height: 1.4;
}

/* ── Track detail modal ───────────────────────────────────────────────────── */
.tmodal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.tmodal[hidden] { display: none; }

.tmodal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(2px);
}

.tmodal__panel {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    width: 100%;
    max-width: 680px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}
.tmodal__panel::-webkit-scrollbar { width: 4px; }
.tmodal__panel::-webkit-scrollbar-track { background: transparent; }
.tmodal__panel::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }

.tmodal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--color-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    line-height: 1;
    z-index: 1;
}
.tmodal__close:hover { color: var(--color-text); background: var(--color-border); }

.tmodal__hero {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.tmodal__art {
    width: 72px;
    height: 72px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
}

.tmodal__hero-text { flex: 1; min-width: 0; }
.tmodal__title  { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.15rem; line-height: 1.3; }
.tmodal__artist { font-size: 0.9rem; color: var(--color-text); margin-bottom: 0.1rem; }
.tmodal__album  { font-size: 0.8rem; color: var(--color-muted); margin-bottom: 0.4rem; }
.tmodal__badges { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }

.tmodal__body { padding: 0 1.25rem 1.25rem; }

.tmodal__section { margin-top: 1.1rem; }
.tmodal__section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-muted);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.tmodal__source-note { font-weight: 400; text-transform: none; letter-spacing: 0; }

/* Feature bars */
.tmodal__features { display: flex; flex-direction: column; gap: 0.45rem; }
.tmodal__feat-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    margin-bottom: 0.2rem;
    color: var(--color-text);
}
.tmodal__feat-val { color: var(--color-muted); font-variant-numeric: tabular-nums; }
.tmodal__feat-track {
    height: 5px;
    background: var(--color-border);
    border-radius: 3px;
    overflow: hidden;
}
.tmodal__feat-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}
.tmodal__feat-fill--valence  { background: #5dbf6e; }
.tmodal__feat-fill--energy   { background: var(--color-accent); }
.tmodal__feat-fill--dance    { background: #6e7fbf; }
.tmodal__feat-fill--neutral  { background: #555; }

/* Details dl */
.tmodal__dl { display: grid; gap: 0.25rem; }
.tmodal__dl-row { display: flex; justify-content: space-between; font-size: 0.82rem; }
.tmodal__dl-row dt { color: var(--color-muted); }
.tmodal__dl-row dd { font-variant-numeric: tabular-nums; }

/* Pills */
.tmodal__pills { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tmodal__pill {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.tmodal__pill--tag     { background: #1e2a3a; color: #6eaabf; }
.tmodal__pill--genre   { background: #1a2a1e; color: #72b87a; }
.tmodal__pill--theme   { background: #2a1e3a; color: #a06ebf; }
.tmodal__pill--keyword { background: #1e2420; color: #7aaa88; font-style: italic; }

/* Lyrics */
.tmodal__lyrics {
    font-size: 0.82rem;
    color: var(--color-muted);
    line-height: 1.9;
    white-space: pre-wrap;
}

/* Wiki */
.tmodal__wiki {
    font-size: 0.82rem;
    color: var(--color-muted);
    line-height: 1.6;
    margin-top: 0.5rem;
}

/* Clickable rows */
.track-row[data-track] { cursor: pointer; }
.track-row[data-track]:hover { background: rgba(255,255,255,0.04); }
.track-row[data-track]:focus { outline: 2px solid var(--color-accent); outline-offset: -2px; }

/* ── Playlist card grid ───────────────────────────────────────────────────── */
.pl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 0.6rem;
    margin-top: 1.25rem;
}

.pl-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: var(--color-surface);
    transition: border-color 0.15s, box-shadow 0.15s;
    min-height: 88px;
}
.pl-card:hover {
    border-color: #555;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

/* Body — left side */
.pl-card__body {
    flex: 1;
    min-width: 0;
    padding: 0.7rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.pl-card__name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pl-card:hover .pl-card__name { color: var(--color-accent); }

.pl-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.pl-badge {
    display: inline-block;
    font-size: 0.62rem;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.pl-badge--platform {
    background: rgba(255,255,255,0.06);
    color: var(--color-muted);
    border: 1px solid rgba(255,255,255,0.08);
}
.pl-badge--followed {
    background: rgba(59,130,246,0.12);
    color: #93c5fd;
    border: 1px solid rgba(59,130,246,0.2);
}

.pl-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.6rem;
    font-size: 0.72rem;
    color: var(--color-muted);
    margin-top: auto;
}
.pl-card__enriched { color: var(--color-accent); }
.pl-card__synced   { color: #555; }

.pl-card__desc {
    font-size: 0.72rem;
    color: var(--color-muted);
    line-height: 1.4;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Art — right side */
.pl-card__art {
    position: relative;
    width: 88px;
    flex-shrink: 0;
    background: #1a1a1a;
    overflow: hidden;
}
.pl-card__art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pl-card__art-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1c1c1c, #2a2a2a);
}
.pl-card__mood {
    position: absolute;
    bottom: 4px;
    left: 4px;
    right: 4px;
    text-align: center;
    font-size: 0.6rem;
    padding: 2px 4px;
}

/* ── Playlist stats bar (show page) ─────────────────────────────────────── */
.playlist-stats {
    display: flex;
    gap: 2rem;
    padding: 1rem 0 1.5rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
}

.playlist-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.playlist-stat--muted .playlist-stat__value,
.playlist-stat--muted .playlist-stat__label {
    color: var(--color-muted);
    opacity: 0.6;
}

.playlist-stat__value {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1;
}

.playlist-stat__label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-muted);
}

.playlist-pagination {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 0 0.5rem;
    font-size: 0.85rem;
    color: var(--color-muted);
}
.playlist-pagination__btn {
    color: var(--color-accent);
    text-decoration: none;
}
.playlist-pagination__btn:hover { text-decoration: underline; }

/* Liked Songs row (index page) */
.liked-songs-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.5rem;
    margin-bottom: 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--color-text);
    transition: background 0.1s;
}
.liked-songs-row:hover { background: var(--color-surface); }

.liked-songs-icon {
    color: #e05260;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.liked-songs-name {
    font-size: 0.875rem;
    font-weight: 500;
    flex: 1;
}
.liked-songs-count {
    font-size: 0.75rem;
    color: var(--color-muted);
}

/* Liked Songs heading (show page) */
.liked-songs-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}
.liked-songs-heading svg { color: #e05260; flex-shrink: 0; }

/* Liked-at column */
.track-table__liked {
    width: 5.5rem;
    font-size: 0.75rem;
    color: var(--color-muted);
    white-space: nowrap;
    text-align: right;
}

/* Followed section spacing */
.playlist-section--followed { margin-top: 2.5rem; }

/* ── Folder actions bar ──────────────────────────────────────────────────── */
.folder-actions { padding: 0.5rem 0; }

.btn--ghost {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-muted);
}
.btn--ghost:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ── Import page ─────────────────────────────────────────────────────────── */
.import-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.import-section h2 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}
.import-section__desc {
    margin: 0 0 1rem;
    color: var(--color-muted);
    font-size: 0.875rem;
}

.import-steps {
    margin: 0 0 1rem;
    padding-left: 1.5rem;
    font-size: 0.875rem;
    line-height: 1.7;
}
.import-steps__note {
    font-size: 0.8rem;
    color: var(--color-muted);
}

.import-format-note {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    color: var(--color-muted);
    line-height: 1.6;
}

/* File drop zone */
.import-form { display: flex; flex-direction: column; gap: 1rem; }

.file-drop-zone {
    border: 2px dashed var(--color-border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    position: relative;
}
.file-drop-zone--over {
    border-color: var(--color-accent);
    background: color-mix(in srgb, var(--color-accent) 5%, transparent);
}
.file-drop-zone__input {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}
.file-drop-zone__content { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.file-drop-zone__content svg { color: var(--color-muted); }
.file-drop-zone__content p { margin: 0; font-size: 0.875rem; color: var(--color-muted); }
.file-drop-zone__hint { font-size: 0.75rem !important; }

.file-drop-zone__selected { padding: 0.5rem 0; }
.file-drop-zone__count {
    font-size: 0.8rem;
    color: var(--color-muted);
    margin: 0 0 0.5rem;
}
.file-chip {
    display: inline-block;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    margin: 0.15rem 0.25rem 0.15rem 0;
}
.file-chip em { font-style: normal; color: var(--color-muted); }

/* Past import batches */
.import-batch-list { display: flex; flex-direction: column; gap: 0.75rem; }

.import-batch {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 0.75rem 1rem;
}
.import-batch__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}
.import-batch__date,
.import-batch__files {
    font-size: 0.8rem;
    color: var(--color-muted);
}
.import-batch__result {
    font-size: 0.875rem;
    color: var(--color-muted);
}
.import-batch__result strong { color: var(--color-text); }
.import-batch__error {
    font-size: 0.8rem;
    color: var(--color-danger, #e05260);
    margin-top: 0.25rem;
}

/* Status badges */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge--success  { background: rgba(201,149,42,0.15); color: var(--color-accent); }
.badge--danger   { background: color-mix(in srgb, #e05260 15%, transparent); color: #e05260; }
.badge--info     { background: color-mix(in srgb, var(--color-accent) 15%, transparent); color: var(--color-accent); }
.badge--muted    { background: var(--color-border); color: var(--color-muted); }

/* ── Home page ───────────────────────────────────────────────────────────── */

/* Shared section label style */
.home-prose h2,
.home-finds h2,
.home-how h2,
.home-what h2 {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted, #888);
    margin-bottom: 2rem;
}

/* Hero */
.hero-eyebrow {
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    font-style: italic;
    color: var(--color-accent, #c9952a);
    margin-bottom: 1.75rem;
}
.hero h1 {
    font-size: clamp(2.6rem, 7vw, 5rem);
    line-height: 1.08;
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}
.hero-verse {
    max-width: 46ch;
    margin: 0 auto 2.5rem;
    text-align: left;
}
.hero-verse p {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--color-text-muted, #aaa);
    margin: 0 0 1.25rem;
}
.hero-verse__close {
    color: var(--color-text, #e8e8e8) !important;
    font-weight: 500;
}
.hero-sub {
    max-width: 52ch;
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--color-text-muted, #aaa);
    margin-bottom: 2rem;
}
.hero-notice {
    margin-top: 1rem;
    font-size: 0.88rem;
    color: var(--color-text-muted, #888);
}
.hero-notice--maintenance {
    color: var(--color-accent, #c9952a);
    font-size: 1rem;
}
.btn--ghost {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--color-text, #e8e8e8);
}
.btn--ghost:hover {
    border-color: rgba(255,255,255,0.45);
    background: rgba(255,255,255,0.05);
}
.btn--lg {
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
}

/* Home — prose section */
.home-prose {
    max-width: 640px;
    margin: 6rem auto;
    padding: 0 1.5rem;
    text-align: left;
}
.home-prose p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text-muted, #aaa);
    margin: 0 0 1rem;
}
.home-prose p:nth-child(4) {   /* "These shifts aren't random." */
    color: var(--color-text, #e8e8e8);
    font-weight: 500;
    font-size: 1.05rem;
}

/* Home — what it finds */
.home-finds {
    max-width: 900px;
    margin: 0 auto 6rem;
    padding: 0 1.5rem;
}
.home-finds__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.home-finds__item {
    padding: 1.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius, 8px);
}
.home-finds__item h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--color-text, #e8e8e8);
}
.home-finds__item p {
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--color-text-muted, #aaa);
    margin: 0;
}

/* Home — how it works */
.home-how {
    max-width: 900px;
    margin: 0 auto 6rem;
    padding: 0 1.5rem;
}
.home-how__steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}
.home-how__step { padding: 1.5rem 1.5rem 1.5rem 0; }
.home-how__num {
    font-size: 2.25rem;
    font-weight: 700;
    color: rgba(201,149,42,0.18);
    line-height: 1;
    margin-bottom: 0.75rem;
    font-variant-numeric: tabular-nums;
}
.home-how__step h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.home-how__step p {
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--color-text-muted, #aaa);
    margin: 0;
}

/* Home — what you get */
.home-what {
    max-width: 640px;
    margin: 0 auto 5rem;
    padding: 0 1.5rem;
    text-align: left;
}
.home-what__intro {
    font-size: 0.95rem;
    color: var(--color-text-muted, #aaa);
    margin-bottom: 1rem;
}
.home-what__list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.home-what__list li {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text-muted, #ccc);
    padding-left: 1.25rem;
    position: relative;
}
.home-what__list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--color-accent, #c9952a);
}
.home-what__close {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--color-text, #e8e8e8);
    margin: 0;
}

/* Home — coda */
.home-coda {
    max-width: 640px;
    margin: 0 auto 8rem;
    padding: 3.5rem 1.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    text-align: left;
}
.home-coda p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--color-text-muted, #888);
    margin: 0 0 0.25rem;
    font-style: italic;
}

/* ── Dashboard updates ────────────────────────────────────────────────────── */
.dash-empty {
    text-align: center;
    padding: 4rem 1.5rem;
}
.dash-empty__text {
    color: var(--color-text-muted, #aaa);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}
.dash-section {
    margin-bottom: 2.5rem;
}
.dash-section__header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1rem;
}
.dash-section__header h2 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}
.dash-section__link {
    font-size: 0.82rem;
    color: var(--color-accent, #c9952a);
    text-decoration: none;
}
.dash-section__link:hover { text-decoration: underline; }

.dash-runs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.dash-run {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius, 8px);
    flex-wrap: wrap;
}
.dash-run__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}
.dash-run__mode {
    font-size: 0.85rem;
    font-weight: 500;
}
.dash-run__style { font-size: 0.82rem; }
.dash-run__date  { font-size: 0.78rem; white-space: nowrap; }

/* ── Listening portrait glimpses ─────────────────────────────────────────── */
.glimpse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.glimpse-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.25rem;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius, 8px);
}

.glimpse-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-muted);
}

.glimpse-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
}

.glimpse-sub {
    font-size: 0.75rem;
    color: var(--color-muted);
    line-height: 1.4;
}

/* ── Account page ────────────────────────────────────────────────────────── */
.account-section {
    max-width: 640px;
    margin-bottom: 3rem;
}
.account-section__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.account-section__subtitle {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-muted, #888);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin: 1.5rem 0 0.5rem;
}
.account-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.account-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.account-field label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted, #ccc);
}
.form-input {
    padding: 0.55rem 0.75rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius, 8px);
    color: var(--color-text, #e8e8e8);
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
}
.form-input:focus {
    outline: none;
    border-color: var(--color-accent, #c9952a);
}
.account-hint {
    font-size: 0.82rem;
    color: var(--color-text-muted, #888);
    margin: 0 0 0.5rem;
    line-height: 1.5;
}

/* Import history table inside account */
.import-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-top: 0.75rem;
}
.import-history-table th {
    text-align: left;
    padding: 0.4rem 0.6rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted, #888);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.import-history-table td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: top;
}

/* ── Account import drop zone ───────────────────────────────────────────── */
.drop-zone {
    border: 2px dashed var(--color-border);
    border-radius: 8px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-size: 0.875rem;
    color: var(--color-text-muted, #888);
}
.drop-zone p { margin: 0.25rem 0; }
.drop-zone--over {
    border-color: var(--color-accent);
    background: color-mix(in srgb, var(--color-accent) 5%, transparent);
}
.drop-zone__link { color: var(--color-accent); cursor: pointer; text-decoration: underline; }
.drop-zone__hint { font-size: 0.75rem; }
.file-list { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.5rem; }
.file-list__item {
    font-size: 0.8rem;
    color: var(--color-text-muted, #888);
    background: var(--color-bg-card, rgba(255,255,255,0.04));
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
}

/* ── Import preview / confirm page ─────────────────────────────────────── */
.import-preview-header {
    margin-bottom: 2rem;
}
.import-preview-header h1 {
    margin: 0.5rem 0 0.4rem;
    font-size: 1.6rem;
}
.import-preview-sub {
    margin: 0;
    color: var(--color-text-muted, #888);
    font-size: 0.9rem;
}
.back-link {
    font-size: 0.82rem;
    color: var(--color-text-muted, #888);
    text-decoration: none;
}
.back-link:hover { color: var(--color-text); }

.import-preview-card {
    background: var(--color-bg-card, rgba(255,255,255,0.04));
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.import-summary-grid {
    display: flex;
    gap: 2.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.import-summary-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.import-summary-stat__value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
}
.import-summary-stat__value--sm {
    font-size: 1.15rem;
    letter-spacing: 0;
}
.import-summary-stat__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted, #888);
}

.import-summary-format {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}
.import-summary-format__hint {
    color: var(--color-text-muted, #888);
}
.import-summary-zip-note {
    font-size: 0.82rem;
    color: var(--color-text-muted, #888);
    margin: 0.5rem 0 0.75rem;
}

.import-file-list {
    font-size: 0.82rem;
    color: var(--color-text-muted, #888);
    margin-top: 0.75rem;
    border-top: 1px solid var(--color-border);
    padding-top: 0.75rem;
}
.import-file-list summary {
    cursor: pointer;
    user-select: none;
    margin-bottom: 0.5rem;
}
.import-file-list ul {
    margin: 0;
    padding: 0 0 0 1rem;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.import-file-list li code {
    font-size: 0.8rem;
}

.import-preview-warning {
    background: color-mix(in srgb, #f59e0b 12%, transparent);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.import-preview-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.import-preview-note {
    font-size: 0.78rem;
    color: var(--color-text-muted, #888);
    margin: 0;
    line-height: 1.6;
}

/* ── Import preview page ─────────────────────────────────────────────────── */
.prev-header { margin-bottom: 2rem; }
.prev-header h1 { margin: 0.5rem 0 0.5rem; font-size: 1.75rem; }
.prev-sub {
    font-size: 0.85rem;
    color: var(--color-text-muted, #888);
    margin: 0;
}

.prev-warning {
    background: color-mix(in srgb, #f59e0b 12%, transparent);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* Headline stats */
.prev-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}
.prev-stat { display: flex; flex-direction: column; gap: 0.2rem; }
.prev-stat__value {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
}
.prev-stat__value--sm {
    font-size: 1.1rem;
    letter-spacing: 0;
    font-weight: 600;
}
.prev-stat__label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-text-muted, #888);
}

/* Section wrapper */
.prev-section {
    margin-bottom: 2.5rem;
}
.prev-section__heading {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--color-text-muted, #888);
    margin-bottom: 1rem;
}
.prev-section__sub {
    font-size: 0.85rem;
    color: var(--color-text-muted, #aaa);
    margin: -0.5rem 0 1rem;
}

/* Shared art placeholder / loaded state */
.prev-art-placeholder {
    flex-shrink: 0;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
.prev-art-placeholder.prev-art-loaded { background: transparent; }
.prev-art-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    animation: artFadeIn 0.25s ease;
}
@keyframes artFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Top artists */
.prev-artists {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.prev-artist {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.prev-artist__rank {
    font-size: 0.72rem;
    color: var(--color-text-muted, #888);
    width: 1.25rem;
    text-align: right;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}
.prev-artist .prev-art-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 4px;
}
.prev-artist__body {
    flex: 1;
    min-width: 0;
}
.prev-artist__name {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.prev-artist__bar-wrap {
    height: 3px;
    background: rgba(255,255,255,0.07);
    border-radius: 2px;
    overflow: hidden;
}
.prev-artist__bar {
    height: 100%;
    background: var(--color-accent, #c9952a);
    border-radius: 2px;
    min-width: 4px;
    transition: width 0.3s ease;
}
.prev-artist__count {
    font-size: 0.78rem;
    color: var(--color-text-muted, #888);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    width: 4.5rem;
    text-align: right;
}

/* Activity chart */
.prev-chart {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.prev-chart__row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.prev-chart__year {
    font-size: 0.78rem;
    color: var(--color-text-muted, #888);
    width: 2.5rem;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}
.prev-chart__track {
    flex: 1;
    height: 16px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    overflow: hidden;
}
.prev-chart__bar {
    height: 100%;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    min-width: 4px;
}
.prev-chart__bar--peak {
    background: var(--color-accent, #c9952a);
}
.prev-chart__count {
    font-size: 0.75rem;
    color: var(--color-text-muted, #888);
    width: 4.5rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* Top tracks */
.prev-tracks {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    counter-reset: track-counter;
}
/*
 * Track row grid:
 *   col 1 = artwork (44px, spans 2 rows)
 *   col 2 = track name / artist name (stacked, 2 rows)
 *   col 3 = play count (right-aligned, spans 2 rows)
 * Rank number is absolute-positioned to the left.
 */
.prev-tracks li {
    counter-increment: track-counter;
    display: grid;
    grid-template-columns: 44px 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 0.85rem;
    row-gap: 0;
    padding: 0.55rem 0 0.55rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
}
.prev-tracks li::before {
    content: counter(track-counter);
    position: absolute;
    left: 0;
    font-size: 0.72rem;
    color: var(--color-text-muted, #888);
    font-variant-numeric: tabular-nums;
    width: 1.5rem;
    text-align: right;
    top: 50%;
    transform: translateY(-50%);
}
.prev-tracks li .prev-art-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
}
.prev-track__name {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    grid-column: 2;
    grid-row: 1;
    align-self: end;
}
.prev-track__artist {
    font-size: 0.8rem;
    color: var(--color-text-muted, #888);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    grid-column: 2;
    grid-row: 2;
    align-self: start;
}
.prev-track__count {
    font-size: 0.78rem;
    color: var(--color-text-muted, #888);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
    text-align: right;
}

/* File list */
.prev-files {
    font-size: 0.82rem;
    color: var(--color-text-muted, #888);
    margin-bottom: 2rem;
    border-top: 1px solid var(--color-border);
    padding-top: 1rem;
}
.prev-files summary { cursor: pointer; user-select: none; margin-bottom: 0.5rem; }
.prev-files ul { margin: 0; padding: 0 0 0 1rem; list-style: none; }
.prev-files li { padding: 0.1rem 0; }

/* Actions */
.prev-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.prev-note {
    font-size: 0.78rem;
    color: var(--color-text-muted, #888);
    margin: 0;
    line-height: 1.6;
    max-width: 60ch;
}


/* ── Privacy Policy ──────────────────────────────────────────────────────── */
.privacy-policy {
    max-width: 70ch;
    margin: 3rem auto;
    padding: 0 1.5rem;
    line-height: 1.7;
}
.privacy-policy h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}
.privacy-policy__updated {
    color: var(--color-text-muted, #888);
    font-size: 0.85rem;
    margin-bottom: 2.5rem;
}
.privacy-policy h2 {
    font-size: 1.25rem;
    margin-top: 2.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.25rem;
}
.privacy-policy h3 {
    font-size: 1rem;
    margin-top: 1.25rem;
    margin-bottom: 0.25rem;
}
.privacy-policy ul {
    padding-left: 1.5rem;
    margin: 0.5rem 0 1rem;
}
.privacy-policy li { margin-bottom: 0.25rem; }
.privacy-policy a { color: var(--color-accent, #7c6aff); }

/* ── Library / Playlists redesign ─────────────────────────────────────────── */

.lib-page { padding: 2.5rem 0 5rem; }

/* Page header */
.lib-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 3.5rem;
}
.lib-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 300;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 0.4rem;
}
.lib-header p { color: var(--color-muted); font-size: 0.95rem; }
.lib-header__sync { flex-shrink: 0; padding-top: 0.25rem; }

/* Facets */
.lib-facet {
    padding: 3rem 0;
    border-top: 1px solid var(--color-border);
}
.lib-facet__eye {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 0.65rem;
}
.lib-facet__heading {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 300;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-bottom: 0.85rem;
    max-width: 580px;
}
.lib-facet__body {
    font-size: 0.92rem;
    color: var(--color-muted);
    max-width: 56ch;
    line-height: 1.75;
    margin-bottom: 2rem;
}

/* Signal cards */
.lib-signals {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 2rem;
}
.lib-signal {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.875rem 1.2rem;
    min-width: 100px;
}
.lib-signal--wide { min-width: 170px; }
.lib-signal__n {
    display: block;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--color-text);
    line-height: 1;
    margin-bottom: 0.3rem;
}
.lib-signal__n--mood {
    /* mood-pill color bleeds into the big number — inherits color from mood-pill-* class */
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    background: none;
    padding: 0;
    border-radius: 0;
}
.lib-signal__label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 0.45rem;
}
.lib-signal__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.4rem;
}

/* Soft prompt — no listening history */
.lib-history-prompt {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-accent);
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    max-width: 52ch;
}
.lib-history-prompt p {
    font-size: 0.88rem;
    color: var(--color-muted);
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

/* Section CTA link */
.lib-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: opacity 0.15s;
    margin-top: 0.25rem;
}
.lib-cta:hover { opacity: 0.75; }

/* ── Playlist facet cards ──────────────────────────────────────────────────── */

.pf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.pf-grid--sm {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}
@media (max-width: 860px) {
    .pf-grid     { grid-template-columns: repeat(2, 1fr); }
    .pf-grid--sm { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 540px) {
    .pf-grid     { grid-template-columns: repeat(2, 1fr); }
    .pf-grid--sm { grid-template-columns: repeat(2, 1fr); }
}

.pf-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.pf-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    border-color: #444;
}
.pf-card__img {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    flex-shrink: 0;
}
.pf-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.pf-card:hover .pf-card__img img { transform: scale(1.04); }
.pf-card__img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #1e1e2e 0%, #0d0d18 100%);
}
.pf-card__img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.1) 55%,
        transparent 100%
    );
    pointer-events: none;
}
.pf-card__body {
    padding: 0.875rem 1rem 1rem;
}
.pf-card__name {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.45rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s;
}
.pf-card:hover .pf-card__name { color: var(--color-accent); }
.pf-card__mood { margin-bottom: 0.4rem; }
.pf-card__meta {
    font-size: 0.7rem;
    color: var(--color-muted);
    letter-spacing: 0.01em;
}

/* Small variant for followed playlists */
.pf-card--sm .pf-card__body { padding: 0.65rem 0.75rem 0.75rem; }
.pf-card--sm .pf-card__name { font-size: 0.78rem; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/* Library page — the excavation                                              */
/* ═══════════════════════════════════════════════════════════════════════════ */

.libx-page {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 2rem 1.5rem 5rem;
}

/* ── Page header ─────────────────────────────────────────────────────────── */
.libx-header {
    padding: 3rem 0 2.5rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 3rem;
}
.libx-header__eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}
.libx-header__title {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.6rem;
}
.libx-header__sub {
    font-size: 1rem;
    color: var(--color-muted);
    max-width: 46ch;
}

/* ── Hero stats bar ──────────────────────────────────────────────────────── */
.libx-hero-stats {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    padding: 1.5rem 0 2.5rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 3.5rem;
}
.libx-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.libx-stat__n {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--color-text);
}
.libx-stat__label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-muted);
}

/* ── Sections ────────────────────────────────────────────────────────────── */
.libx-section {
    padding: 3rem 0;
    border-bottom: 1px solid var(--color-border);
}
.libx-section:last-child { border-bottom: none; }

.libx-section__eye {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 0.6rem;
}
.libx-section__heading {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}
.libx-section__body {
    font-size: 0.9rem;
    color: var(--color-muted);
    max-width: 58ch;
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* ── Findings ────────────────────────────────────────────────────────────── */
.libx-findings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.libx-finding {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}
.libx-finding__label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
}
.libx-finding__value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.3;
    word-break: break-word;
}
.libx-finding__note {
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-top: 0.1rem;
}

/* ── Thematic map ────────────────────────────────────────────────────────── */
.libx-themes {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1.2rem;
    padding: 0.5rem 0;
}
.libx-theme {
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--color-text);
    line-height: 1.3;
    cursor: default;
    transition: opacity 0.15s;
}
.libx-theme:hover { opacity: 1 !important; color: var(--color-accent); }

/* ── Sensory vocabulary ──────────────────────────────────────────────────── */
.libx-vocab {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 0.9rem;
    padding: 0.5rem 0;
}
.libx-word {
    font-weight: 500;
    color: var(--color-text);
    letter-spacing: 0.01em;
    cursor: default;
    transition: color 0.15s;
}
.libx-word:hover { color: var(--color-accent); }
.libx-word--t5 { font-size: 1.3rem; font-weight: 700; opacity: 1.0; }
.libx-word--t4 { font-size: 1.05rem; font-weight: 600; opacity: 0.88; }
.libx-word--t3 { font-size: 0.9rem; opacity: 0.74; }
.libx-word--t2 { font-size: 0.8rem; opacity: 0.6; }
.libx-word--t1 { font-size: 0.72rem; opacity: 0.48; }

/* ── Emotional register bars ─────────────────────────────────────────────── */
.libx-registers {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-width: 480px;
}
.libx-register__head {
    margin-bottom: 0.35rem;
}
.libx-register__bar-wrap {
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    overflow: hidden;
}
.libx-register__bar {
    height: 100%;
    background: var(--color-accent);
    border-radius: 2px;
    transition: width 0.6s ease;
}

/* ── Arc timeline ────────────────────────────────────────────────────────── */
.libx-arc {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.libx-arc-year {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem 0.45rem 0.65rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.8rem;
}
.libx-arc-year__yr {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--color-text);
    min-width: 2.5rem;
}
.libx-arc-year__n {
    font-size: 0.68rem;
    color: var(--color-muted);
    white-space: nowrap;
}
.libx-arc-note {
    font-size: 0.85rem;
    color: var(--color-muted);
    font-style: italic;
    line-height: 1.6;
    max-width: 52ch;
    padding-top: 0.25rem;
}

/* ── Playlist browser in library ─────────────────────────────────────────── */
.libx-section--playlists .libx-section__body { margin-bottom: 1.25rem; }

.libx-folder-name {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}
.libx-folder-name:first-of-type { margin-top: 0; }

/* Library grid: 4-column default (tighter than /playlists featured) */
.pf-grid--lib {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
    margin-bottom: 0.5rem;
}
.pf-grid--sm.pf-grid--lib {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.65rem;
}
@media (max-width: 900px) {
    .pf-grid--lib     { grid-template-columns: repeat(3, 1fr); }
    .pf-grid--sm.pf-grid--lib { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 600px) {
    .libx-header__title { font-size: 1.75rem; }
    .libx-hero-stats { gap: 1.5rem; }
    .pf-grid--lib     { grid-template-columns: repeat(2, 1fr); }
    .pf-grid--sm.pf-grid--lib { grid-template-columns: repeat(3, 1fr); }
    .libx-findings { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
    .pf-grid--sm.pf-grid--lib { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* Explore pages — Arc, Themes, Vocabulary                                    */
/* ═══════════════════════════════════════════════════════════════════════════ */

.main--explore { background: var(--color-bg); }

.explore-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 5rem;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.explore-header { margin-bottom: 2.5rem; }

.explore-header__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}
.explore-back {
    font-size: 0.8rem;
    color: var(--color-muted);
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: color 0.15s;
}
.explore-back:hover { color: var(--color-text); }

.explore-header__siblings { display: flex; gap: 1.25rem; }
.explore-sibling {
    font-size: 0.8rem;
    color: var(--color-muted);
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: color 0.15s;
}
.explore-sibling:hover { color: var(--color-accent); }

.explore-eyebrow {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 0.6rem;
}
.explore-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.65rem;
}
.explore-title em { font-style: normal; color: var(--color-accent); }
.explore-sub {
    font-size: 0.9rem;
    color: var(--color-muted);
    max-width: 58ch;
    line-height: 1.7;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.explore-empty {
    padding: 4rem 0 2rem;
    max-width: 42ch;
}
.explore-empty__hed {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.explore-empty__body {
    font-size: 0.9rem;
    color: var(--color-muted);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

/* ── Progress note ───────────────────────────────────────────────────────── */
.explore-progress {
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

/* ── Arc page ────────────────────────────────────────────────────────────── */
.arc-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 1.25rem;
}
.arc-legend__item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    color: var(--color-muted);
    letter-spacing: 0.02em;
}
.arc-legend__swatch {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}
.arc-swatch--dark       { background: #3a3560; }
.arc-swatch--tense      { background: #8b3050; }
.arc-swatch--reflective { background: #2a5490; }
.arc-swatch--peaceful   { background: #1e7060; }
.arc-swatch--energetic  { background: #b86820; }
.arc-swatch--euphoric   { background: #c9952a; }

.arc-canvas-wrap {
    position: relative;
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    background: #111;
    margin-bottom: 2rem;
}
.arc-tooltip {
    position: absolute;
    background: rgba(10, 10, 15, 0.92);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    font-size: 0.78rem;
    line-height: 1.6;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}
.arc-keychanges {
    margin-bottom: 1.5rem;
}
.arc-keychanges__label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 0.6rem;
}
.arc-keychange {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    font-size: 0.82rem;
}
.arc-keychange__period {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--color-muted);
    min-width: 5rem;
}
.arc-keychange__arrow { color: var(--color-border); }
.arc-keychange__type {
    font-size: 0.72rem;
    color: var(--color-muted);
    font-style: italic;
}
.arc-shape-note {
    font-size: 0.88rem;
    color: var(--color-muted);
    font-style: italic;
    line-height: 1.65;
    max-width: 52ch;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

/* ── Themes page ─────────────────────────────────────────────────────────── */
.themes-canvas-wrap {
    position: relative;
    width: 100%;
    border-radius: var(--radius);
    background: #0e0e14;
    overflow: hidden;
    margin-bottom: 1rem;
}
.themes-detail {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(10, 10, 15, 0.95);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem 1.25rem 1.25rem;
    min-width: 200px;
    max-width: 240px;
    backdrop-filter: blur(6px);
    z-index: 10;
}
.themes-detail__close {
    position: absolute;
    top: 0.5rem;
    right: 0.6rem;
    background: none;
    border: none;
    color: var(--color-muted);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.1rem 0.3rem;
}
.themes-detail__close:hover { color: var(--color-text); }
.themes-detail__theme {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.4rem;
    padding-right: 1rem;
}
.themes-detail__reg-wrap { margin-bottom: 0.4rem; }
.themes-detail__count {
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-bottom: 0.75rem;
}
.themes-detail__related-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-muted);
    margin-bottom: 0.4rem;
}
.themes-detail__related {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.themes-detail__related em { font-size: 0.78rem; color: var(--color-muted); }

/* ── Vocabulary page ─────────────────────────────────────────────────────── */
.vocab-canvas-wrap {
    width: 100%;
    border-radius: var(--radius);
    background: #0a0a10;
    overflow: hidden;
    margin-bottom: 1rem;
}
.vocab-detail {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    min-height: 2rem;
    font-size: 0.82rem;
}
.vocab-detail__word {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text);
}
.vocab-detail__count {
    font-size: 0.75rem;
    color: var(--color-muted);
}

/* ── Gateway cards on /record ────────────────────────────────────────────── */
.libx-section--gateways .libx-section__heading { margin-bottom: 1.5rem; }

.libx-gateways {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.libx-gateway {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--color-text);
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.libx-gateway:hover {
    border-color: #444;
    transform: translateX(3px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.libx-gateway__icon {
    font-size: 1.4rem;
    opacity: 0.5;
    flex-shrink: 0;
    padding-top: 0.1rem;
    min-width: 1.8rem;
}
.libx-gateway__body { flex: 1; min-width: 0; }
.libx-gateway__name {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    transition: color 0.15s;
}
.libx-gateway:hover .libx-gateway__name { color: var(--color-accent); }
.libx-gateway__desc {
    font-size: 0.82rem;
    color: var(--color-muted);
    line-height: 1.6;
    margin-bottom: 0.6rem;
}
.libx-gateway__preview {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.5rem;
}
.libx-gateway__preview--words {
    font-size: 0.78rem;
    color: var(--color-muted);
    gap: 0.4rem 0.75rem;
}
.libx-gateway__tag {
    font-size: 0.72rem;
    padding: 0.2rem 0.55rem;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    color: var(--color-muted);
}
.libx-gateway__more {
    font-size: 0.7rem;
    color: var(--color-muted);
    opacity: 0.6;
}
.libx-gateway__arrow {
    font-size: 1.1rem;
    color: var(--color-muted);
    flex-shrink: 0;
    align-self: center;
    transition: color 0.15s, transform 0.15s;
}
.libx-gateway:hover .libx-gateway__arrow { color: var(--color-accent); transform: translateX(3px); }

@media (max-width: 540px) {
    .explore-title { font-size: 1.6rem; }
    .explore-header__siblings { gap: 0.75rem; }
    .arc-keychange { flex-wrap: wrap; }
    .themes-detail { position: static; max-width: 100%; margin-top: 1rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   STATUS BADGES (queue / run status — used on user dashboard)
   ═══════════════════════════════════════════════════════════════════════════ */

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge--pending  { background: rgba(240,165,0,0.15);  color: #f0a500; }
.badge--claimed  { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge--complete { background: rgba(34,197,94,0.15);  color: #4ade80; }
.badge--failed   { background: rgba(239,68,68,0.15);  color: #f87171; }
.badge--success  { background: rgba(201,149,42,0.15); color: var(--color-accent); }
.badge--muted    { background: var(--color-border);   color: var(--color-muted); }

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD — Vinyl record triptych
   ═══════════════════════════════════════════════════════════════════════════ */

.dash-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

.dash-welcome {
    text-align: center;
    padding: 2.5rem 0 2rem;
}

.dash-welcome h1 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    margin: 0 0 0.4rem;
    letter-spacing: -0.03em;
}

.dash-welcome__sub {
    color: var(--color-muted);
    font-size: 1rem;
    margin: 0;
}

/* ── Triptych grid ─────────────────────────────────────────────────────── */

.record-triptych {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin: 0 0 2.5rem;
}

@media (max-width: 720px) {
    .record-triptych {
        grid-template-columns: 1fr;
        max-width: 360px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ── Record card ───────────────────────────────────────────────────────── */

.record-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 1.75rem 1.5rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
}

.record-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.35);
    text-decoration: none;
}

.record-card--a:hover  { border-color: rgba(201, 149, 42, 0.45); }
.record-card--b:hover  { border-color: rgba(45,  64, 112, 0.55); }
.record-card--ln:hover { border-color: rgba(139, 108, 74, 0.45); }

/* ── Vinyl disc ─────────────────────────────────────────────────────────── */

.record-disc {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.55),
        inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    transition: transform 0.5s ease;
}

.record-card:hover .record-disc {
    transform: rotate(9deg);
}

.record-disc--a {
    background:
        radial-gradient(circle at 50% 50%, #090909 0%, #090909 5%, transparent 5.5%),
        radial-gradient(circle at 50% 50%, #c9952a 0%, #c9952a 29%, #9a6e18 29%, #9a6e18 31%, transparent 31.5%),
        radial-gradient(ellipse at 35% 28%, rgba(255, 255, 255, 0.07) 0%, transparent 55%),
        repeating-radial-gradient(circle at 50% 50%, #0f0f0f 0px, #1e1e1e 1.5px, #0f0f0f 3px);
}

.record-disc--b {
    background:
        radial-gradient(circle at 50% 50%, #090909 0%, #090909 5%, transparent 5.5%),
        radial-gradient(circle at 50% 50%, #2d4070 0%, #2d4070 29%, #1a2850 29%, #1a2850 31%, transparent 31.5%),
        radial-gradient(ellipse at 35% 28%, rgba(255, 255, 255, 0.06) 0%, transparent 55%),
        repeating-radial-gradient(circle at 50% 50%, #0f0f0f 0px, #1e1e1e 1.5px, #0f0f0f 3px);
}

.record-disc--ln {
    background:
        radial-gradient(circle at 50% 50%, #090909 0%, #090909 5%, transparent 5.5%),
        radial-gradient(circle at 50% 50%, #7a5c3a 0%, #7a5c3a 29%, #563e22 29%, #563e22 31%, transparent 31.5%),
        radial-gradient(ellipse at 35% 28%, rgba(255, 255, 255, 0.07) 0%, transparent 55%),
        repeating-radial-gradient(circle at 50% 50%, #0f0f0f 0px, #1e1e1e 1.5px, #0f0f0f 3px);
}

.record-disc__side {
    position: relative;
    z-index: 1;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    user-select: none;
    margin-top: -2px;
}

/* ── Record card body ──────────────────────────────────────────────────── */

.record-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-align: center;
    width: 100%;
}

.record-card__side-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.record-card--a  .record-card__side-label { color: #c9952a; }
.record-card--b  .record-card__side-label { color: #5a7abf; }
.record-card--ln .record-card__side-label { color: #a0845a; }

.record-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--color-text);
}

.record-card__desc {
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--color-muted);
    margin: 0.1rem 0 0.5rem;
}

.record-card__cta {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--color-muted);
    transition: color 0.2s ease;
}

.record-card--a:hover  .record-card__cta { color: #c9952a; }
.record-card--b:hover  .record-card__cta { color: #7090d0; }
.record-card--ln:hover .record-card__cta { color: #a0845a; }

/* ── Stat strip (dashboard context) ───────────────────────────────────── */
.dash-page .stat-strip {
    margin-bottom: 2rem;
    border-radius: var(--radius);
}
