:root {
    color-scheme: dark;
    --ink: #f7edda;
    --muted: #b9aa95;
    --night: #17110d;
    --night-soft: #211812;
    --leather: #4b2d1d;
    --leather-light: #6e4227;
    --gold: #d9a441;
    --gold-soft: #f2ce7e;
    --cream: #f3e7d0;
    --line: rgba(242, 206, 126, 0.2);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    background:
        radial-gradient(circle at 74% 10%, rgba(126, 70, 36, 0.18), transparent 26rem),
        linear-gradient(180deg, #18110d 0, #120d0a 100%);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 5px);
    pointer-events: none;
    content: "";
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid var(--gold-soft);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--cream);
    color: var(--night);
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: none;
}

.site-header,
main,
.site-footer {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 96px;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: var(--ink);
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid var(--gold);
    border-radius: 50% 50% 46% 54%;
    color: var(--gold-soft);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    font-style: italic;
    transform: rotate(-5deg);
}

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

.brand strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    letter-spacing: -0.02em;
}

.brand small {
    margin-top: -3px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.header-note {
    color: var(--muted);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    font-style: italic;
}

.hero {
    position: relative;
    display: grid;
    min-height: 510px;
    align-items: center;
    gap: clamp(36px, 6vw, 86px);
    grid-template-columns: minmax(0, 1fr) minmax(230px, 280px);
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero::after {
    position: absolute;
    right: 9%;
    bottom: -210px;
    width: 490px;
    height: 490px;
    border: 1px solid rgba(217, 164, 65, 0.18);
    border-radius: 50%;
    box-shadow: 0 0 0 45px rgba(217, 164, 65, 0.025), 0 0 0 90px rgba(217, 164, 65, 0.018);
    content: "";
}

.hero-copy {
    position: relative;
    z-index: 1;
    max-width: 710px;
    padding: 80px 0;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--gold-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

h1,
h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
}

h1 {
    margin: 0;
    font-size: clamp(54px, 8vw, 104px);
    letter-spacing: -0.055em;
    line-height: 0.92;
}

h1 em {
    color: var(--gold-soft);
    font-weight: 400;
}

.hero-text {
    max-width: 570px;
    margin: 30px 0 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.75;
}

.hero-photo {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 280px;
    aspect-ratio: 1;
    margin: 0;
    padding: 6px;
    justify-self: end;
    overflow: hidden;
    border: 1px solid rgba(242, 206, 126, 0.52);
    border-radius: 28px;
    background: rgba(217, 164, 65, 0.08);
    box-shadow: 0 26px 65px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.025) inset;
}

.hero-photo img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 21px;
    object-fit: cover;
}

.catalog-section {
    padding: 88px 0 116px;
}

.catalog-toolbar {
    display: grid;
    align-items: end;
    gap: 48px;
    grid-template-columns: 1fr minmax(280px, 420px);
    margin-bottom: 42px;
}

.catalog-toolbar h2 {
    margin: 0;
    font-size: clamp(38px, 5vw, 58px);
    letter-spacing: -0.035em;
}

.catalog-stats {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.search label {
    display: block;
    margin-bottom: 9px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.search-field {
    display: grid;
    align-items: center;
    grid-template-columns: auto 1fr auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    transition: border-color 180ms ease, background 180ms ease;
}

.search-field:focus-within {
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.055);
}

.search-field > span {
    padding-left: 17px;
    color: var(--gold-soft);
    font-size: 22px;
}

.search-field input {
    width: 100%;
    padding: 14px 10px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
}

.search-field input::placeholder {
    color: #8f8170;
}

.search-field button {
    width: 34px;
    height: 34px;
    margin-right: 7px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 22px;
}

.album-grid {
    display: grid;
    gap: 30px 22px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.album-card {
    position: relative;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.album-art,
.dialog-art,
.player-cover {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #6f4328, #2a1a13 70%);
}

.album-art {
    aspect-ratio: 1;
    border: 1px solid rgba(242, 206, 126, 0.13);
    border-radius: var(--radius);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.16);
    transition: transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.album-card:hover .album-art {
    border-color: rgba(242, 206, 126, 0.52);
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.29);
    transform: translateY(-5px);
}

.album-card img,
.dialog-art img,
.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle, transparent 0 19%, rgba(245, 218, 164, 0.08) 19.5% 20.5%, transparent 21% 32%, rgba(245, 218, 164, 0.09) 32.5% 33.5%, transparent 34%),
        linear-gradient(145deg, #704328, #392319 60%, #21150f);
}

.cover-fallback::before {
    position: absolute;
    width: 38%;
    aspect-ratio: 1;
    border: 1px solid rgba(242, 206, 126, 0.58);
    border-radius: 50%;
    box-shadow: 0 0 0 8px rgba(23, 17, 13, 0.15);
    content: "";
}

.cover-fallback span {
    z-index: 1;
    color: var(--gold-soft);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(35px, 5vw, 64px);
    font-style: italic;
}

.album-play {
    position: absolute;
    right: 15px;
    bottom: 15px;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 50%;
    background: var(--gold-soft);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.28);
    color: var(--night);
    font-size: 18px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 200ms ease, transform 200ms ease;
}

.album-card:hover .album-play,
.album-card:focus-visible .album-play {
    opacity: 1;
    transform: none;
}

.album-card-copy {
    padding: 15px 5px 0;
}

.album-card strong {
    display: block;
    overflow: hidden;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 19px;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.album-card small {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-card {
    display: flex;
    min-height: 220px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
}

.status-card[hidden] {
    display: none;
}

.status-card strong {
    display: block;
    margin-bottom: 7px;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    font-weight: 400;
}

.status-card p {
    max-width: 460px;
    margin: 10px 20px;
}

.loader {
    width: 28px;
    height: 28px;
    border: 2px solid rgba(242, 206, 126, 0.18);
    border-top-color: var(--gold-soft);
    border-radius: 50%;
    animation: spin 800ms linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    margin-top: 52px;
}

.pagination[hidden] {
    display: none;
}

.pagination button {
    padding: 10px 15px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}

.pagination button:hover:not(:disabled) {
    border-color: var(--gold);
}

.pagination button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

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

.site-footer {
    display: flex;
    min-height: 125px;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.site-footer > span {
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
}

.site-footer p {
    font-size: 13px;
}

.album-dialog {
    width: min(760px, calc(100% - 28px));
    max-height: min(800px, calc(100dvh - 40px));
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(242, 206, 126, 0.25);
    border-radius: 24px;
    background: #1c1410;
    box-shadow: var(--shadow);
    color: var(--ink);
}

.album-dialog::backdrop {
    background: rgba(10, 7, 5, 0.78);
    backdrop-filter: blur(7px);
}

.dialog-shell {
    position: relative;
    max-height: min(800px, calc(100dvh - 40px));
    overflow-y: auto;
}

.dialog-close {
    position: sticky;
    top: 15px;
    z-index: 3;
    display: grid;
    width: 38px;
    height: 38px;
    margin: 15px 15px -53px auto;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
    background: rgba(23, 17, 13, 0.82);
    color: var(--ink);
    cursor: pointer;
    font-size: 24px;
    backdrop-filter: blur(8px);
}

.album-dialog-header {
    display: grid;
    align-items: end;
    gap: 28px;
    grid-template-columns: 180px 1fr;
    padding: 34px 34px 30px;
    background: linear-gradient(180deg, rgba(112, 67, 40, 0.36), transparent);
}

.dialog-art {
    width: 180px;
    aspect-ratio: 1;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
}

.album-dialog-header h2 {
    margin: 0;
    font-size: clamp(34px, 6vw, 50px);
    letter-spacing: -0.04em;
    line-height: 1.02;
}

.album-dialog-header p:last-child {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.track-list {
    padding: 0 22px 28px;
}

.track-row {
    display: grid;
    min-height: 62px;
    align-items: center;
    gap: 12px;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(242, 206, 126, 0.1);
}

.track-row.is-current {
    border-radius: 10px;
    background: rgba(217, 164, 65, 0.09);
}

.track-number,
.track-play {
    grid-column: 1;
    grid-row: 1;
}

.track-number {
    color: #847564;
    font-size: 12px;
    text-align: center;
}

.track-play {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--night);
    cursor: pointer;
    font-size: 12px;
    opacity: 0;
}

.track-row:hover .track-play,
.track-row:focus-within .track-play,
.track-row.is-current .track-play {
    opacity: 1;
}

.track-row:hover .track-number,
.track-row:focus-within .track-number,
.track-row.is-current .track-number {
    opacity: 0;
}

.track-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.track-download {
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 12px;
    text-decoration: none;
}

.track-download:hover {
    color: var(--gold-soft);
}

.track-loading {
    padding: 80px 20px;
    color: var(--muted);
    text-align: center;
}

.player {
    position: fixed;
    right: 18px;
    bottom: 18px;
    left: 18px;
    z-index: 20;
    display: grid;
    min-height: 92px;
    align-items: center;
    gap: 30px;
    grid-template-columns: minmax(190px, 0.8fr) minmax(320px, 1.4fr) minmax(190px, 0.8fr);
    padding: 12px 18px;
    border: 1px solid rgba(242, 206, 126, 0.28);
    border-radius: 18px;
    background: rgba(30, 21, 16, 0.95);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.52);
    opacity: 0;
    transform: translateY(calc(100% + 30px));
    transition: opacity 230ms ease, transform 230ms ease;
    backdrop-filter: blur(18px);
}

.player.is-visible {
    opacity: 1;
    transform: none;
}

.player-track {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.player-cover {
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.player-cover .cover-fallback span {
    font-size: 22px;
}

.player-copy {
    min-width: 0;
}

.player-copy strong,
.player-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-copy strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    font-weight: 400;
}

.player-copy span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.player-main {
    min-width: 0;
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 17px;
}

.player-controls button {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    font-size: 12px;
}

.player-controls .play-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--cream);
    color: var(--night);
    font-size: 14px;
}

.player-progress {
    display: grid;
    align-items: center;
    gap: 10px;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    margin-top: 4px;
}

.player-progress span {
    color: var(--muted);
    font-size: 10px;
    text-align: center;
}

input[type="range"] {
    height: 4px;
    accent-color: var(--gold-soft);
    cursor: pointer;
}

.player-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
}

.volume-control input {
    width: 80px;
}

.download-current {
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    font-size: 11px;
    text-decoration: none;
}

.download-current:hover {
    border-color: var(--gold);
    color: var(--gold-soft);
}

.player-status {
    position: absolute;
    right: 12px;
    bottom: calc(100% + 10px);
    max-width: min(420px, calc(100vw - 40px));
    margin: 0;
    padding: 10px 14px;
    border: 1px solid rgba(242, 206, 126, 0.28);
    border-radius: 10px;
    background: #2d1d14;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    color: var(--cream);
    font-size: 12px;
}

.player-status:empty {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body.has-player {
    padding-bottom: 122px;
}

@media (max-width: 900px) {
    .album-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .player {
        gap: 15px;
        grid-template-columns: minmax(150px, 0.8fr) minmax(280px, 1.4fr);
    }

    .player-actions {
        display: none;
    }
}

@media (max-width: 700px) {
    .site-header,
    main,
    .site-footer {
        width: min(100% - 28px, 1180px);
    }

    .site-header {
        min-height: 80px;
    }

    .header-note {
        display: none;
    }

    .hero {
        min-height: auto;
        gap: 0;
        grid-template-columns: 1fr;
    }

    .hero-copy {
        padding: 72px 0 34px;
    }

    .hero-text {
        font-size: 16px;
    }

    .hero-photo {
        width: min(100%, 340px);
        max-width: none;
        margin-bottom: 68px;
        justify-self: center;
    }

    .catalog-section {
        padding: 70px 0 100px;
    }

    .catalog-toolbar {
        gap: 26px;
        grid-template-columns: 1fr;
    }

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

    .album-play {
        width: 42px;
        height: 42px;
        opacity: 1;
        transform: none;
    }

    .album-card strong {
        font-size: 16px;
    }

    .site-footer {
        min-height: 110px;
    }

    .site-footer p {
        display: none;
    }

    .album-dialog-header {
        align-items: center;
        gap: 18px;
        grid-template-columns: 110px 1fr;
        padding: 28px 22px 24px;
    }

    .dialog-art {
        width: 110px;
    }

    .track-list {
        padding: 0 10px 22px;
    }

    .track-row {
        grid-template-columns: 34px minmax(0, 1fr) auto;
    }

    .player {
        right: 8px;
        bottom: 8px;
        left: 8px;
        min-height: 116px;
        gap: 5px 10px;
        grid-template-columns: 1fr auto;
        padding: 10px 12px;
        border-radius: 15px;
    }

    .player-track {
        grid-column: 1;
        grid-row: 1;
    }

    .player-cover {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .player-main {
        display: contents;
    }

    .player-controls {
        grid-column: 2;
        grid-row: 1;
        gap: 4px;
    }

    .player-controls button:first-child {
        display: none;
    }

    .player-progress {
        grid-column: 1 / -1;
        grid-row: 2;
        margin: 2px 0 0;
    }

    body.has-player {
        padding-bottom: 136px;
    }
}

@media (max-width: 420px) {
    h1 {
        font-size: 50px;
    }

    .album-dialog-header {
        align-items: start;
        grid-template-columns: 82px 1fr;
    }

    .dialog-art {
        width: 82px;
    }

    .album-dialog-header h2 {
        font-size: 28px;
    }

    .track-download {
        padding-inline: 4px;
        font-size: 0;
    }

    .track-download::after {
        font-size: 18px;
        content: "↓";
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
