:root {
    --archive-bg: #080808;
    --archive-muted: rgba(255,255,255,.46);
    --archive-border: rgba(255,255,255,.11);
}
body { background: var(--archive-bg); }
.library-shell {
    width: min(1440px, 100%);
    min-height: calc(100vh - 82px);
    min-height: calc(100svh - 82px);
    margin: 0 auto;
    padding: 34px clamp(20px, 4.5vw, 68px) 60px;
    animation: archiveFadeIn .8s ease both;
}
.library-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: clamp(260px, 33vw, 390px);
    margin-bottom: 42px;
    padding: clamp(28px, 5vw, 64px);
    overflow: hidden;
    isolation: isolate;
    border: 1px solid var(--archive-border);
    border-radius: 7px;
    background: linear-gradient(115deg, #151515, #0b0b0b 55%, #151515);
}
.library-hero::before {
    content: "S";
    position: absolute;
    z-index: -1;
    left: auto;
    right: clamp(28px, 5vw, 64px);
    top: calc(50% + 47px);
    width: 1em;
    height: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    color: rgba(255, 255, 255, 0.055);
    font-family: "Allura", cursive;
    font-size: clamp(18rem, 35vw, 29rem);
    font-weight: 400;
    line-height: 1;
    transform: translateY(-50%);
    pointer-events: none;
}
.hero-copy { position: relative; max-width: 620px; }
.hero-copy h1 {
    color: #fff;
    font-size: clamp(3.3rem, 8vw, 7rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -.085em;
}
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 17px;
    border-bottom: 1px solid var(--archive-border);
}
.section-head h2 {
    color: rgba(255,255,255,.88);
    font-size: .82rem;
    font-weight: 400;
    letter-spacing: .08em;
}
.favourites-section { margin-bottom: 42px; }
.favourites-count { color: var(--archive-muted); font-size: .68rem; letter-spacing: .08em; }
.favourites-list { display: grid; gap: 4px; list-style: none; }
.favourite-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    border-radius: 5px;
    transition: background .2s ease;
}
.favourite-row:hover { background: rgba(255,255,255,.045); }
.favourite-open {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 6px 8px;
    color: #fff;
    background: transparent;
    border: 0;
    border-radius: 5px;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}
.favourite-art {
    position: relative;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    overflow: hidden;
    border-radius: 4px;
    background: linear-gradient(145deg, #242424, #101010);
    color: rgba(255,255,255,.75);
    font-size: .78rem;
    letter-spacing: -.04em;
}
.favourite-art img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .25s ease;
}
.favourite-art.has-image img { opacity: 1; }
.favourite-art.has-image { color: transparent; }
.favourite-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.favourite-heading { display: flex; align-items: center; gap: 8px; min-width: 0; }
.favourite-title {
    overflow: hidden;
    color: #f5f5f5;
    font-size: .84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.favourite-artist { color: var(--archive-muted); font-size: .7rem; }
.favourite-play {
    margin-left: auto;
    padding-left: 12px;
    color: rgba(255,255,255,.38);
    font-size: .64rem;
    letter-spacing: .08em;
}
.favourite-open:hover .favourite-play { color: #fff; }
.favourite-remove {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    color: #ff7a92;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: color .2s ease, background .2s ease, transform .2s ease;
}
.favourite-remove:hover { color: #ff9cad; background: rgba(255,255,255,.07); }
.favourite-remove:active { transform: scale(.9); }
.favourite-remove:disabled { opacity: .45; cursor: default; }
.favourite-remove svg { width: 16px; height: 16px; }
.favourites-empty { padding: 16px 8px 4px; color: var(--archive-muted); font-size: .78rem; }
.favourites-empty[hidden] { display: none; }
.artist-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}
.artist-card {
    display: block;
    min-width: 0;
    padding: 10px;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 7px;
    color: #fff;
    text-decoration: none;
    transition: background .22s ease, border-color .22s ease, transform .22s ease;
}
.artist-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255,255,255,.08);
    background: rgba(255,255,255,.035);
}
.artist-art {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 5px;
    background: linear-gradient(145deg, #242424, #101010);
}
.artist-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .25s ease, transform .35s ease;
}
.artist-art img.loaded { opacity: 1; }
.artist-card:hover .artist-art img { transform: scale(1.035); }
.artist-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255,255,255,.8);
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 300;
    letter-spacing: -.12em;
}
.artist-art.has-image .artist-placeholder { display: none; }
.artist-info { padding: 14px 2px 4px; }
.artist-info h3 {
    overflow: hidden;
    color: #f5f5f5;
    font-size: .84rem;
    font-weight: 400;
    letter-spacing: -.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.artist-info p {
    margin-top: 6px;
    color: var(--archive-muted);
    font-size: .69rem;
}
.library-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-top: 70px;
    padding-top: 20px;
    border-top: 1px solid var(--archive-border);
    color: rgba(255,255,255,.35);
    font-size: .62rem;
    letter-spacing: .08em;
}
.library-footer .site-credits { display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
.library-footer .site-credit { color: rgba(255,255,255,.28); }
.library-footer .site-copy { margin-left:auto; white-space:nowrap; }
@keyframes archiveFadeIn {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 1050px) {
    .artist-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .artist-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
}
@media (max-width: 520px) {
    .library-shell { padding: 22px 14px 40px; }
    .library-hero { min-height: 280px; margin-bottom: 34px; padding: 24px; }
    .library-hero::before { font-size: 17rem; }
    .hero-copy h1 { font-size: clamp(3.2rem, 15vw, 5rem); }
    .artist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
    .artist-card { padding: 7px; }
    .artist-info { padding-top: 11px; }
    .artist-info h3 { font-size: .78rem; }
    .library-footer { margin-top: 48px; font-size: .56rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .fetch-dots i { animation: fetchJump .9s ease-in-out infinite !important; }
    .library-shell { opacity: 1; }
}
