:root {
    --bg: #0a0a0a;
    --bg-elevated: #121212;
    --bg-charcoal: #1a1a1a;
    --card: #ffffff;
    --text: #111111;
    --muted: #5c5c5c;
    --grey-badge: #e6e6e6;
    --grey-badge-text: #6b6b6b;
    --green: #1ed75f;
    --green-hover: #3ee074;
    --green-press: #18c251;
    --white: #ffffff;
    --danger: #c0392b;
    --radius: 1rem;
    --header-h: calc(72px + 2rem);
    --header-banner-w: 728px;
    --header-banner-h: 90px;
    --content-w: 1080px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: #f2f2f2;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    min-height: 100%;
}

body {
    position: relative;
}

a {
    color: var(--green);
    text-decoration: none;
}

a:hover {
    color: var(--green-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #222;
}

.site-footer-inner,
.site-main,
.page-wrap {
    width: min(var(--content-w), calc(100% - 2rem));
    margin: 0 auto;
}

.site-header-inner {
    width: 100%;
    min-height: var(--header-h);
    padding: 1rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 1;
    min-width: 0;
}

.brand-ou {
    display: flex;
    align-items: center;
    line-height: 0;
    flex-shrink: 0;
}

.brand-ou-logo {
    display: block;
    width: 72px;
    height: 72px;
    max-width: 72px;
    max-height: 72px;
    border-radius: 16px;
    object-fit: cover;
    background: #000;
}

.brand {
    display: flex;
    align-items: center;
    line-height: 0;
    flex-shrink: 0;
}

.brand-logo {
    display: block;
    height: 2.75rem;
    width: auto;
}

.brand-ou:hover .brand-ou-logo,
.brand:hover .brand-logo {
    opacity: 0.85;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.header-actions .btn-imx {
    flex-shrink: 0;
}

.header-actions:has(.ad-slot-header) {
    flex-wrap: nowrap;
}

.text-link {
    color: #ddd;
    font-size: 0.95rem;
}

button.text-link {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: inherit;
    line-height: inherit;
}

button.text-link:hover {
    color: var(--green-hover);
}

.text-link.is-current {
    color: var(--green);
    font-weight: 650;
}

.btn-imx,
button.btn-imx {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--green);
    color: var(--white);
    border: 0;
    border-radius: 999px;
    padding: 0.65rem 1.2rem;
    font-weight: 650;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
}

.btn-imx:hover,
button.btn-imx:hover {
    background: var(--green-hover);
    color: var(--white);
}

.btn-imx:disabled,
button.btn-imx:disabled {
    background: var(--green);
    color: var(--white);
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-spotify {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: var(--white);
    color: var(--green);
    border: 0;
    border-radius: 999px;
    padding: 0.55rem 1.1rem 0.55rem 0.7rem;
    font-weight: 650;
    font-size: 0.95rem;
    white-space: nowrap;
}

.btn-spotify:hover {
    background: var(--white);
    color: var(--green-hover);
}

.btn-spotify .bi {
    font-size: 1.45em;
    line-height: 1;
    margin-left: -0.05rem;
}

.btn-imx:disabled:hover,
button.btn-imx:disabled:hover {
    background: var(--green);
    color: var(--white);
}

.site-main {
    padding: 3rem 0 3rem;
    min-height: calc(100vh - 12rem);
}

.ad-rail {
    display: none;
    position: absolute;
    top: var(--header-h);
    z-index: 10;
    width: calc((100% - var(--content-w)) / 2 - 1.25rem);
    height: calc(100dvh - var(--header-h) - 1.5rem);
    padding-top: 1.5rem;
    pointer-events: none;
}

.ad-rail-right {
    right: 0.5rem;
}

.ad-slot {
    background: #2a2a2a;
    border: 1px solid #3f3f3f;
}

.ad-slot-vertical {
    width: 100%;
    height: 100%;
    max-width: 300px;
    margin-inline: auto;
}

.ad-slot-filled {
    display: block;
    height: auto;
    max-height: 100%;
    background: transparent;
    border: none;
    pointer-events: auto;
    line-height: 0;
}

.ad-slot-filled img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    object-position: top center;
}

.ad-slot-header {
    display: none;
    flex: 0 0 var(--header-banner-w);
    width: var(--header-banner-w);
    height: var(--header-banner-h);
}

@media (min-width: 1280px) {
    :root {
        --header-h: calc(var(--header-banner-h) + 2rem);
    }

    .ad-slot-header {
        display: block;
    }
}

@media (min-width: 1440px) {
    .ad-rail {
        display: block;
    }
}

.page-intro {
    margin-bottom: 0.25rem;
}

.page-intro-genre {
    margin-bottom: 1.75rem;
}

.page-intro-genre h1 {
    margin-bottom: 0;
}

.page-intro h1,
.legal h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 750;
    margin: 0 0 0.75rem;
    color: var(--white);
}

.page-intro-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-intro-row h1 {
    margin: 0;
}

.page-intro-action {
    margin: 0;
    flex-shrink: 0;
}

.page-intro-search {
    flex: 1 1 12rem;
    max-width: 22rem;
    min-width: 10rem;
    margin: 0;
    border: 1px solid #444;
    border-radius: 0.75rem;
    padding: 0.55rem 0.85rem;
    font: inherit;
    color: var(--white);
    background: #1a1a1a;
}

.page-intro-search::placeholder {
    color: #888;
}

.form-card h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: var(--text);
}

.lede,
.legal p {
    color: #cfcfcf;
    max-width: 42rem;
}

.lede-home {
    font-size: 1.2rem;
    font-weight: 600;
    max-width: none;
    white-space: nowrap;
}

.lede-home .brand-name {
    color: var(--white);
}

.form-help {
    color: var(--text);
    max-width: none;
    white-space: nowrap;
    margin: 0 0 1.1rem;
}

.form-help.is-error {
    color: var(--danger);
    white-space: normal;
}

.home-section {
    margin-top: 2.25rem;
}

.home-section h2 {
    font-size: 1.35rem;
    font-weight: 750;
    margin: 0 0 1rem;
    color: var(--white);
}

.home-section .lede {
    margin: -0.35rem 0 1.25rem;
}

.genre-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.home-section .genre-grid,
.home-section .playlist-grid {
    margin-top: 0;
}

.playlist-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.playlist-tile {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius);
    background: #1a1a1a;
    color: var(--white);
}

.playlist-tile img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}

.playlist-tile-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    color: var(--text);
    font-weight: 700;
    text-align: center;
    padding: 0.5rem;
}

.playlist-tile-name {
    line-height: 1.2;
}

.playlist-tile:hover {
    color: var(--white);
}

.playlist-tile-fallback:hover {
    color: var(--text);
    background: #f4f4f4;
}

@media (min-width: 640px) {
    .genre-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 900px) {
    .genre-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.genre-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    color: var(--text);
    border-radius: var(--radius);
    min-height: 4.25rem;
    font-weight: 700;
    padding: 0.85rem 0.75rem;
    text-align: center;
}

.genre-tile:hover {
    color: var(--text);
    background: #f4f4f4;
}

.card-imx {
    background: var(--card);
    color: var(--text);
    border-radius: var(--radius);
    border: 0;
    padding: 1.25rem 1.25rem 1.35rem;
    margin: 0 0 1.1rem;
}

.track-card {
    cursor: pointer;
}

.js .track-card.is-deferred {
    display: none;
}

.js .track-card.is-filter-hidden {
    display: none !important;
}

html.is-filtering-tracks.js .track-card.is-deferred:not(.is-filter-hidden) {
    display: block;
}

html.is-filtering-tracks .load-more-wrap {
    display: none;
}

.track-card-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.track-artist {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 750;
}

.track-title {
    margin: 0.15rem 0 0.85rem;
    color: var(--muted);
    font-weight: 600;
}

.track-card-admin .track-title {
    margin-bottom: 0.15rem;
}

.track-review {
    margin: 0.9rem 0 0;
    color: #222;
}

.track-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0.35rem 0 0.85rem;
}

.status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    font-size: 0.75rem;
    line-height: 1.2;
}

.status-pending {
    background: #f5c518;
    color: #111;
}

.status-approved {
    background: var(--green);
    color: var(--white);
}

.status-rejected {
    background: var(--danger);
    color: var(--white);
}

.spotify-embed {
    margin: 0.4rem 0 0.75rem;
    min-height: 152px;
}

.spotify-embed iframe {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 12px;
}

.genre-list,
.genre-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.35rem 0 0;
}

.genre-chip,
.genre-badge {
    display: inline-flex;
    align-items: center;
    border: 0;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    background: var(--grey-badge);
    color: var(--grey-badge-text);
    font-size: 0.85rem;
    font-weight: 650;
    cursor: pointer;
}

.genre-chip {
    cursor: pointer;
}

.genre-badge.is-selected,
.genre-chip:hover {
    background: var(--green);
    color: var(--white);
}

.genre-flash {
    font-size: 0.8rem;
    color: var(--green-press);
    align-self: center;
    margin-left: 0.25rem;
}

.genre-flash.is-error {
    color: var(--danger);
}

.spotify-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.35rem 0 0;
}

.spotify-genre {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    background: var(--grey-badge);
    color: var(--grey-badge-text);
    font-size: 0.85rem;
    font-weight: 650;
}

.spotify-genres-empty {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.empty-state {
    background: var(--card);
    color: var(--text);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.site-footer {
    border-top: 1px solid #222;
    padding: 1.5rem 0 2rem;
    color: #9a9a9a;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-bottom: 0.75rem;
}

.site-footer a {
    color: #d0d0d0;
}

.copyright {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.7;
    max-width: 52rem;
}

.copyright a {
    color: #d0d0d0;
}

.form-card label {
    display: block;
    font-weight: 650;
    margin: 0 0 0.35rem;
    color: var(--text);
}

.form-card .field {
    margin-bottom: 1.1rem;
}

.form-card .field > .form-help {
    margin: 0.45rem 0 0;
    white-space: normal;
}

.form-card input[type="text"],
.form-card input[type="email"],
.form-card input[type="password"],
.form-card input[type="search"],
.form-card input[type="file"]:not(.cover-drop-input),
.form-card select,
.form-card textarea,
.modal select,
.modal textarea,
.imx-modal select,
.imx-modal textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 0.75rem;
    padding: 0.7rem 0.85rem;
    font: inherit;
    color: var(--text);
    background: #fff;
}

.form-card .submit-attests {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.form-card .field-check label,
.form-card .submit-attests label {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    margin: 0;
}

.form-card .field-check input[type="checkbox"],
.form-card .submit-attests input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.5rem;
    height: 1.5rem;
    margin: 0;
    flex-shrink: 0;
    align-self: center;
    border: 2.5px solid var(--green);
    border-radius: 0.3rem;
    background: #fff;
    cursor: pointer;
}

.form-card .field-check input[type="checkbox"]:checked,
.form-card .submit-attests input[type="checkbox"]:checked {
    background-color: var(--green);
    border-color: var(--green);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3.2 8.4 6.5 11.6 12.8 4.4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 0.95rem 0.95rem;
}

.playlist-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.85rem;
    color: var(--text);
}

.playlist-cover {
    display: block;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    background: #eee;
    flex-shrink: 0;
}

.playlist-cover-lg {
    width: 160px;
    height: 160px;
    margin: 0 0 1rem;
}

.cover-drop-form {
    margin: 0;
    flex-shrink: 0;
}

.cover-drop {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px dotted #c4c4c4;
    border-radius: 12px;
    background: #f7f7f7;
    color: var(--muted);
    box-sizing: border-box;
}

.cover-drop-form .cover-drop {
    cursor: pointer;
}

.cover-drop-form .cover-drop:hover,
.cover-drop.is-dragover {
    border-color: var(--green);
    background: #f3fff7;
    color: #146c2e;
}

.cover-drop.is-busy {
    pointer-events: none;
    opacity: 0.7;
}

.cover-drop-sm {
    width: 72px;
    height: 72px;
    min-width: 72px;
    min-height: 72px;
    border-radius: 10px;
}

.cover-drop-lg {
    width: 200px;
    height: 200px;
    min-width: 200px;
    min-height: 200px;
    margin: 0;
}

.cover-drop-form input.cover-drop-input[type="file"] {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
    border: 0;
    background: transparent;
}

img.cover-drop-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
}

img.playlist-cover {
    max-width: none;
}

img.playlist-cover.playlist-cover-lg {
    width: 160px;
    height: 160px;
    max-width: 160px;
    max-height: 160px;
}

.cover-drop-hint {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    font-size: 1.5rem;
    line-height: 0;
    pointer-events: none;
}

.cover-drop-hint .bi,
.cover-drop-hint .bi::before {
    display: block;
    line-height: 1;
    vertical-align: 0;
}

.cover-drop-lg .cover-drop-hint {
    font-size: 2.75rem;
}

.cover-drop.has-cover .cover-drop-hint {
    color: #fff;
    background: rgba(0, 0, 0, 0.48);
    opacity: 0;
}

.cover-drop.has-cover:hover .cover-drop-hint,
.cover-drop.has-cover.is-dragover .cover-drop-hint {
    opacity: 1;
}

.playlist-row-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.playlist-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.playlist-row .track-meta {
    margin: 0.35rem 0 0;
}

.playlist-row-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-shrink: 0;
}

.playlist-track-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.playlist-track-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.65rem 0;
    border-top: 1px solid #eee;
}

.playlist-track-list li:first-child {
    border-top: 0;
    padding-top: 0;
}

.admin-back {
    margin: 0 0 1rem;
}

.playlist-embed iframe {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 12px;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.alert {
    border-radius: 0.75rem;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: #fdecea;
    color: #7a1f16;
}

.alert-ok {
    background: #eaf8ef;
    color: #146c2e;
}

.legal {
    background: var(--card);
    color: var(--text);
    border-radius: var(--radius);
    padding: 1.5rem 1.35rem 1.75rem;
}

.legal h1,
.legal h2 {
    color: var(--text);
}

.legal h2 {
    font-size: 1.15rem;
    margin-top: 1.5rem;
}

.legal p,
.legal li {
    color: #333;
}

.admin-actions {
    display: flex;
    gap: 0.4rem;
    margin-left: auto;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border: 0;
    background: #f2f2f2;
    color: #222;
    border-radius: 999px;
    font-size: 1.25rem;
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
}

.icon-btn:hover {
    background: #e6e6e6;
    color: var(--green);
}

.icon-btn-danger:hover {
    color: var(--danger);
}

.imx-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 50;
}

.imx-modal-backdrop[hidden] {
    display: none !important;
}

.imx-modal {
    display: block;
    background: var(--card);
    color: var(--text);
    border-radius: var(--radius);
    width: min(32rem, 100%);
    padding: 1.25rem;
}

.imx-modal h2 {
    margin-top: 0;
}

.imx-modal .field {
    margin-bottom: 1rem;
}

.imx-modal label {
    display: block;
    font-weight: 650;
    margin: 0 0 0.35rem;
}

.imx-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-ghost {
    background: transparent;
    border: 0;
    color: var(--muted);
    padding: 0.55rem 0.9rem;
    cursor: pointer;
    border-radius: 999px;
}

.btn-on-dark {
    color: #ddd;
    border: 1px solid #444;
}

.btn-on-dark:hover {
    color: var(--white);
    border-color: #888;
}

.login-card {
    max-width: 26rem;
    margin: 3rem auto;
}

.login-card h1 {
    font-size: 1.85rem;
    font-weight: 750;
    margin: 0 0 1.5rem;
}

.load-more-wrap {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0 0.5rem;
}

@media (max-width: 639px) {
    .site-header-inner {
        padding: 1rem 0.5rem;
    }

    .site-footer-inner,
    .site-main {
        width: calc(100% - 1.25rem);
    }

    .brand-lockup {
        gap: 0.6rem;
    }

    .brand-logo {
        height: 2rem;
    }

    .btn-imx,
    .btn-spotify {
        padding: 0.55rem 0.9rem;
        font-size: 0.85rem;
    }

    .btn-spotify {
        padding-left: 0.6rem;
    }

    .track-card-top {
        flex-direction: column;
    }

    .admin-actions {
        margin-left: 0;
    }

    .playlist-row,
    .playlist-row-main,
    .playlist-row-actions,
    .playlist-track-list li {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-help {
        white-space: normal;
    }
}
