:root {
    --bg: #f3f0eb;
    --surface: #fffdf8;
    --ink: #191712;
    --muted: #6f675c;
    --line: #ded4c6;
    --accent: #111111;
    --accent-2: #9a3324;
    --gold: #c48a2c;
    --soft: #ece4d8;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, #fffdf8 0, var(--bg) 360px),
        var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 28px;
    background: rgba(255, 253, 248, .96);
    border-bottom: 1px solid #cfc5b7;
    backdrop-filter: blur(10px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 800;
}

.brand img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    border-radius: 8px;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    color: #080807;
    font-size: 20px;
    line-height: 1;
    text-transform: uppercase;
}

.brand small {
    color: var(--muted);
    font-weight: 600;
}

.main-nav,
.account-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.main-nav {
    margin-left: auto;
}

.account-nav {
    align-items: center;
}

.main-nav a,
.button,
button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 9px 13px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.main-nav a {
    background: transparent;
    color: var(--ink);
    border-color: transparent;
}

.main-nav a:hover {
    background: #f1eadf;
    border-color: #d8ccbc;
}

.account-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.account-nav a:hover {
    background: #f1eadf;
    color: var(--ink);
}

.account-nav .login-cta {
    min-height: 40px;
    border-radius: 6px;
    padding: 9px 15px;
    background: var(--accent);
    color: white;
}

.account-nav .login-cta:hover {
    background: #2a2721;
    color: white;
}

.button.secondary,
button.secondary {
    background: transparent;
    color: var(--accent);
}

.spotify-button {
    border-color: #1db954;
}

.button.spotify-button:not(.secondary) {
    background: #1db954;
    color: #07150c;
}

.button.secondary.spotify-button {
    color: #137a36;
}

.button.spotify-button:hover {
    border-color: #15803d;
}

.shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 54px;
}

.shell.narrow {
    width: min(620px, calc(100% - 32px));
}

.hero,
.detail-head,
.section-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: end;
    padding: 30px 0;
}

.hero {
    align-items: stretch;
    min-height: 330px;
    padding: 40px 0 22px;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 3px solid var(--ink);
    padding-top: 22px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.detail-head {
    grid-template-columns: 180px 1fr;
    align-items: center;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent-2);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 10px;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.02;
    letter-spacing: 0;
}

h2 {
    font-size: 22px;
}

.lead {
    max-width: 760px;
    color: var(--muted);
    font-size: 18px;
}

.hero-stats,
.hero-brand,
.panel-form,
.comment,
.collector-list article,
.copy-row,
.album-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.hero-brand {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 16px;
    align-items: center;
    min-width: 330px;
    padding: 16px;
    box-shadow: 0 18px 45px rgba(30, 26, 20, .08);
}

.hero-brand img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
}

.hero-brand strong {
    display: block;
    font-size: 42px;
    line-height: 1;
}

.hero-brand span {
    display: block;
    color: var(--muted);
    font-weight: 700;
}

.feature-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 4px 0 24px;
}

.feature-strip article {
    min-height: 138px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: rgba(255, 253, 248, .86);
}

.feature-strip strong,
.feature-strip span {
    display: block;
}

.feature-strip strong {
    margin-bottom: 8px;
    font-size: 16px;
}

.feature-strip span {
    color: var(--muted);
    font-size: 14px;
}

.library-section {
    padding-top: 10px;
}

.section-head.compact {
    grid-template-columns: 1fr minmax(220px, 360px);
    align-items: end;
    padding: 14px 0 16px;
}

.section-head.compact h2 {
    margin-bottom: 0;
    font-size: 28px;
}

.section-head.compact p {
    color: var(--muted);
    margin-bottom: 0;
}

.filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    margin-bottom: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 9px 10px;
    background: white;
    color: var(--ink);
    font: inherit;
}

textarea {
    min-height: 84px;
    resize: vertical;
}

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

.album-card {
    display: grid;
    grid-template-columns: 168px 1fr;
    min-height: 168px;
    overflow: hidden;
    align-items: stretch;
    box-shadow: 0 16px 38px rgba(30, 26, 20, .08);
    transition: transform .15s ease, box-shadow .15s ease;
}

.album-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 46px rgba(30, 26, 20, .12);
}

.cover-link {
    display: block;
    width: 168px;
    height: 168px;
    min-height: 168px;
    text-decoration: none;
    overflow: hidden;
    align-self: start;
}

.cover {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    min-height: 168px;
    aspect-ratio: 1;
    background:
        radial-gradient(circle at center, #171512 0 18%, transparent 19%),
        repeating-radial-gradient(circle at center, #2d2923 0 2px, #15130f 2px 5px);
    color: #f0d08b;
    font-size: 38px;
    font-weight: 900;
    overflow: hidden;
}

.cover.large {
    width: 180px;
    height: 180px;
    border-radius: 8px;
}

.cover.mini {
    width: 70px;
    height: 70px;
    min-height: 70px;
    border-radius: 6px;
    font-size: 22px;
    flex: 0 0 auto;
}

.image-cover {
    background: #111;
    width: 100%;
    height: 100%;
}

.image-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px 18px;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.card-body h2 {
    margin-bottom: 4px;
    font-size: 24px;
    line-height: 1.05;
}

.card-body p {
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.3;
}

.meta,
.empty,
.footer,
.card-body p {
    color: var(--muted);
}

.counts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 9px 0 11px;
}

.counts span {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 8px;
    background: #fff7e7;
    color: #4b4338;
    font-size: 12px;
    font-weight: 700;
}

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

.album-card .button {
    min-height: 34px;
    padding: 7px 12px;
    font-size: 13px;
}

.actions form {
    margin: 0;
}

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

.row-link,
.copy-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    text-decoration: none;
}

.row-link {
    border-bottom: 1px solid var(--line);
}

.row-link span,
.row-link em,
.copy-row span {
    display: block;
    color: var(--muted);
    font-style: normal;
}

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

.track-list div {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.track-list span {
    color: var(--muted);
    font-weight: 800;
}

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

.collector-list article {
    padding: 14px;
}

.collector-list span,
.collector-list em,
.collector-list b {
    display: block;
    color: var(--muted);
    font-style: normal;
}

details {
    margin-top: 12px;
}

summary {
    cursor: pointer;
    color: var(--accent);
    font-weight: 800;
}

.collectors-drawer {
    margin: 16px 0 26px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 253, 248, .72);
}

.collectors-drawer > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 16px;
    color: var(--ink);
    list-style: none;
}

.collectors-drawer > summary::-webkit-details-marker {
    display: none;
}

.collectors-drawer > summary span {
    font-weight: 800;
}

.collectors-drawer > summary em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    font-weight: 700;
}

.collectors-drawer > summary::after {
    content: "+";
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--ink);
    flex: 0 0 auto;
}

.collectors-drawer[open] > summary::after {
    content: "-";
}

.collectors-drawer .collector-list,
.collectors-drawer .empty {
    margin: 0;
    padding: 0 16px 16px;
}

.copy-settings-form {
    display: grid;
    gap: 10px;
}

.copy-summary {
    display: flex;
    align-items: center;
    gap: 12px;
}

.copy-controls {
    display: grid;
    grid-template-columns: 150px 170px 90px auto;
    gap: 8px;
}

.story-field {
    grid-column: 1 / -1;
}

.story-field textarea {
    min-height: 92px;
}

.story-check {
    justify-content: flex-start;
}

.public-story {
    margin: 12px 0 0;
    border-left: 3px solid var(--gold);
    padding-left: 10px;
    color: var(--ink);
    font-size: 14px;
}

.cover-upload-form {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 180px 1fr auto;
    gap: 8px;
    align-items: end;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.online-cover-form {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.online-cover-form span {
    color: var(--muted);
    font-size: 13px;
}

.panel-form {
    display: grid;
    gap: 14px;
    padding: 22px;
}

.check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.check input {
    width: auto;
    min-height: auto;
}

.flash {
    width: min(1180px, calc(100% - 32px));
    margin: 14px auto 0;
    border: 1px solid #bad9cf;
    border-radius: 8px;
    padding: 12px 14px;
    background: #e9f7f2;
    color: #164d43;
    font-weight: 700;
}

.footer {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 34px;
    border-top: 1px solid var(--line);
    font-size: 13px;
}

.album-grid .album-card:first-child {
    border-color: #cab28c;
}

.topbar {
    background: rgba(18, 18, 18, .94);
    border-bottom-color: #262626;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .32);
}

.brand strong,
.main-nav a {
    color: #f7f7f7;
}

.brand small,
.account-nav a {
    color: #b3b3b3;
}

.main-nav a:hover,
.account-nav a:hover {
    background: #242424;
    border-color: #323232;
    color: #ffffff;
}

.account-nav .login-cta,
.button,
button {
    border-color: #1ed760;
    background: #1ed760;
    color: #061208;
}

.account-nav .login-cta:hover,
.button:hover,
button:hover {
    background: #1fdf64;
    border-color: #1fdf64;
    color: #061208;
}

.button.secondary,
button.secondary {
    border-color: #535353;
    background: #242424;
    color: #f2f2f2;
}

.button.secondary:hover,
button.secondary:hover {
    border-color: #777;
    background: #303030;
    color: #fff;
}

body {
    background:
        radial-gradient(circle at 20% 0, rgba(30, 215, 96, .18), transparent 28rem),
        linear-gradient(180deg, #121212 0, #191414 24rem, #121212 100%);
    color: #f6f6f6;
}

.shell {
    width: min(1240px, calc(100% - 36px));
}

.hero {
    min-height: 300px;
    padding: 42px 0 28px;
}

.hero-copy {
    border-top: 0;
    padding: 26px 0;
}

.hero h1 {
    max-width: 820px;
    color: #ffffff;
}

.lead,
.section-head.compact p,
.meta,
.empty,
.footer,
.card-body p {
    color: #b3b3b3;
}

.eyebrow {
    color: #1ed760;
}

.hero-brand,
.feature-strip article,
.filters,
.album-card,
.panel-form,
.comment,
.collector-list article,
.copy-row {
    border-color: #2c2c2c;
    background: #181818;
}

.hero-brand {
    box-shadow: 0 24px 70px rgba(0, 0, 0, .34);
}

.hero-brand img {
    background: #ffffff;
}

.feature-strip article {
    background: #181818;
}

.feature-strip span,
.row-link span,
.row-link em,
.copy-row span,
.collector-list span,
.collector-list em,
.collector-list b,
label {
    color: #b3b3b3;
}

input,
select,
textarea {
    border-color: #333333;
    background: #101010;
    color: #f6f6f6;
}

input::placeholder,
textarea::placeholder {
    color: #8b8b8b;
}

.album-card {
    grid-template-columns: 178px 1fr;
    min-height: 178px;
    border-radius: 8px;
    background: #181818;
    box-shadow: none;
}

.album-card:hover {
    transform: translateY(-3px);
    background: #242424;
    box-shadow: 0 22px 54px rgba(0, 0, 0, .3);
}

.cover-link {
    width: 178px;
    height: 100%;
    min-height: 178px;
    align-self: stretch;
}

.cover {
    min-height: 178px;
}

.card-body {
    justify-content: space-between;
    padding: 18px 18px 16px;
}

.card-body h2 a {
    color: #ffffff;
    text-decoration-color: rgba(255, 255, 255, .25);
}

.counts span {
    border-color: #333;
    background: #101010;
    color: #d9d9d9;
}

.row-link {
    border-color: #303030;
}

.row-link:hover {
    background: #1d1d1d;
}

.detail-head {
    grid-template-columns: 230px 1fr;
    align-items: center;
    margin-top: 18px;
    padding: 22px;
    border: 1px solid #2c2c2c;
    border-radius: 8px;
    background: linear-gradient(135deg, #242424 0, #181818 58%, #121212 100%);
}

.detail-head .cover.large {
    width: 230px;
    height: 230px;
}

.detail-actions {
    margin-top: 18px;
}

.spotify-button {
    border-color: #1ed760;
    background: #1ed760;
    color: #061208;
}

.button.spotify-button:not(.secondary) {
    background: #1ed760;
    color: #061208;
}

.button.secondary.spotify-button {
    background: #1ed760;
    color: #061208;
}

.spotify-button::before {
    content: "";
    width: 10px;
    height: 10px;
    margin-right: 8px;
    border-radius: 999px;
    background: currentColor;
}

.track-list div {
    border-bottom-color: #303030;
}

.collectors-drawer {
    border-color: #2c2c2c;
    background: #181818;
}

.collectors-drawer > summary {
    color: #f6f6f6;
}

.collectors-drawer > summary em {
    color: #b3b3b3;
}

.collectors-drawer > summary::after {
    background: #242424;
    color: #1ed760;
}

.flash {
    border-color: #1ed760;
    background: #12351f;
    color: #d9ffe5;
}

.footer {
    border-top-color: #303030;
}

pre {
    white-space: pre-wrap;
    overflow: auto;
}

@media (max-width: 820px) {
    .topbar,
    .hero,
    .detail-head,
    .section-head,
    .row-link,
    .copy-row {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
        padding: 10px 16px;
    }

    .filters,
    .grid,
    .feature-strip,
    .collector-list,
    .copy-settings-form,
    .copy-controls,
    .online-cover-form,
    .cover-upload-form {
        grid-template-columns: 1fr;
    }

    .section-head.compact {
        grid-template-columns: 1fr;
    }

    .feature-strip article {
        min-height: 0;
    }

    .hero-brand {
        grid-template-columns: 96px 1fr;
        min-width: 0;
    }

    .hero-brand img {
        width: 96px;
        height: 96px;
    }

    .brand img {
        width: 44px;
        height: 44px;
    }

    .track-list div {
        grid-template-columns: 42px 1fr;
    }

    h1 {
        font-size: 36px;
    }

    .main-nav {
        margin-left: 0;
    }

    .account-nav {
        gap: 4px;
    }

    .account-nav a {
        font-size: 12px;
        padding: 4px 8px;
    }

    .album-card {
        grid-template-columns: 118px 1fr;
        min-height: 118px;
    }

    .cover-link {
        width: 118px;
        height: 118px;
        min-height: 118px;
    }

    .album-card .cover {
        min-height: 118px;
    }

    .card-body h2 {
        font-size: 18px;
    }

    .card-body p {
        font-size: 12px;
    }

    .counts span {
        font-size: 10px;
        padding: 3px 6px;
    }
}
