@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap");

:root {
    color-scheme: dark;
    --amber: #e5a94f;
    --amber-light: #f4cf8b;
    --cream: #f7efe2;
    --ink: #15110d;
    --muted: #b9afa2;
    --panel: rgba(25, 20, 16, 0.88);
    --panel-light: rgba(51, 40, 31, 0.72);
    --stroke: rgba(244, 207, 139, 0.17);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--ink);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--cream);
    font-family: "DM Sans", system-ui, sans-serif;
    background:
        radial-gradient(circle at 15% 0%, rgba(163, 99, 44, 0.2), transparent 32rem),
        linear-gradient(145deg, #19130f 0%, #0d0b09 70%);
}

button,
input,
select {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 3px solid var(--amber-light);
    outline-offset: 3px;
}

.background {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(10, 8, 6, 0.58), rgba(10, 8, 6, 0.92)),
        url("../images/backgrounds/bg04.jpg") center / cover;
    filter: saturate(0.7);
}

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

.site-header {
    padding: 56px 8px 34px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand-mark {
    position: relative;
    width: 68px;
    height: 68px;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: repeating-radial-gradient(circle, #0d0d0d 0 5px, #292929 6px, #0d0d0d 8px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.36);
}

.brand-mark::after,
.brand-mark span {
    position: absolute;
    inset: 23px;
    content: "";
    border-radius: 50%;
    background: var(--amber);
}

.brand-mark span {
    inset: 31px;
    z-index: 1;
    background: #17110d;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--amber-light);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

h1,
h2,
.modal-heading h2 {
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    letter-spacing: -0.035em;
}

h1 {
    font-size: clamp(2.7rem, 6vw, 5.1rem);
    line-height: 0.94;
}

.navigation-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    gap: 10px;
    min-width: 0;
}

.view-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
}

.view-nav-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--muted);
    background: transparent;
    font-size: 0.88rem;
    font-weight: 700;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.view-nav-button:hover {
    color: var(--cream);
    background: rgba(255, 255, 255, 0.05);
}

.view-nav-button.is-active {
    border-color: rgba(229, 169, 79, 0.35);
    color: var(--amber-light);
    background: rgba(229, 169, 79, 0.1);
}

.view-nav-button span {
    min-width: 23px;
    padding: 2px 6px;
    border-radius: 999px;
    color: var(--cream);
    background: rgba(255, 255, 255, 0.09);
    font-size: 0.68rem;
    text-align: center;
}

.account-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 10px;
    color: var(--muted);
    font-size: 0.82rem;
}

.support-menu {
    position: fixed;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 40;
}

.support-toggle {
    display: grid;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(229, 169, 79, 0.35);
    border-radius: 50%;
    color: var(--cream);
    background: rgba(24, 19, 15, 0.9);
    place-items: center;
    font-size: 1.2rem;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.support-toggle:hover,
.support-toggle[aria-expanded="true"] {
    border-color: var(--amber);
    background: rgba(51, 40, 31, 0.96);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    transform: translateY(-1px);
}

.support-popover {
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    z-index: 20;
    width: min(310px, calc(100vw - 32px));
    padding: 20px;
    border: 1px solid rgba(229, 169, 79, 0.32);
    border-radius: 14px;
    color: var(--cream);
    background: rgba(24, 19, 15, 0.98);
    box-shadow: var(--shadow);
}

.support-popover::before {
    position: absolute;
    right: 19px;
    bottom: -6px;
    width: 10px;
    height: 10px;
    border-right: 1px solid rgba(229, 169, 79, 0.32);
    border-bottom: 1px solid rgba(229, 169, 79, 0.32);
    content: "";
    background: #18130f;
    transform: rotate(45deg);
}

.support-popover .eyebrow {
    margin-bottom: 7px;
    font-size: 0.64rem;
}

.support-popover > strong {
    display: block;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.35rem;
}

.support-popover > p:not(.eyebrow) {
    margin: 5px 0 16px;
    color: var(--muted);
}

.support-popover-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.support-popover-actions a {
    padding: 10px 9px;
    border: 1px solid var(--stroke);
    border-radius: 9px;
    color: var(--cream);
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.04);
}

.support-popover-actions a:first-child {
    border-color: var(--amber);
    color: #21170b;
    background: var(--amber);
}

.support-popover-actions a:hover {
    border-color: var(--amber);
    color: var(--amber-light);
}

.support-popover-actions a:first-child:hover {
    color: #21170b;
    background: var(--amber-light);
}

.support-popover > small {
    display: block;
    margin-top: 11px;
    color: #93887d;
    font-size: 0.66rem;
    text-align: center;
}

.profile-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px 8px 14px;
    border: 1px solid var(--stroke);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
}

.profile-summary {
    display: grid;
    gap: 1px;
}

.profile-summary small {
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.profile-summary strong {
    color: var(--cream);
    font-size: 0.88rem;
}

.account-tools .builder-button {
    padding: 10px 14px;
    border: 1px solid rgba(229, 169, 79, 0.35);
    border-radius: 10px;
    color: var(--amber-light);
    background: rgba(229, 169, 79, 0.09);
    font-weight: 700;
}

.account-tools .builder-button:hover,
.account-tools .builder-button.is-active {
    border-color: rgba(229, 169, 79, 0.45);
    color: var(--cream);
    background: rgba(229, 169, 79, 0.16);
}

.account-tools .disconnect-button {
    padding: 3px 0;
    border: 0;
    color: #93887d;
    background: transparent;
    font-size: 0.7rem;
    text-decoration: underline;
    text-decoration-color: rgba(147, 136, 125, 0.45);
    text-underline-offset: 3px;
}

.account-tools .disconnect-button:hover {
    color: var(--muted);
    text-decoration-color: currentColor;
}

.connection-screen {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(32px, 7vw, 100px);
    min-height: 480px;
    padding: clamp(32px, 7vw, 90px);
    border: 1px solid var(--stroke);
    border-radius: 28px 28px 0 0;
    align-items: center;
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}

.connection-copy h2 {
    max-width: 650px;
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(2.2rem, 5vw, 4.6rem);
    line-height: 1.03;
    letter-spacing: -0.04em;
}

.connection-copy > p:last-child {
    max-width: 540px;
    margin: 20px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.connection-form {
    display: grid;
    gap: 12px;
    padding: 28px;
    border: 1px solid var(--stroke);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
}

.connection-form > label {
    color: var(--amber-light);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.connection-field {
    position: relative;
}

.connection-field span {
    position: absolute;
    top: 50%;
    left: 15px;
    color: var(--muted);
    transform: translateY(-50%);
}

.connection-field input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 36px;
    border: 1px solid var(--stroke);
    border-radius: 11px;
    color: var(--cream);
    background: rgba(12, 10, 8, 0.62);
}

.connection-form > button {
    height: 50px;
    border: 1px solid #d99c45;
    border-radius: 11px;
    color: #21170b;
    background: var(--amber);
    font-weight: 800;
}

.connection-form > button:hover {
    background: var(--amber-light);
}

.connection-form > button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.connection-error {
    margin: 4px 0 0;
    color: #f2a29d;
    font-size: 0.84rem;
    line-height: 1.45;
}

.collection-panel {
    min-height: 70vh;
    padding: 32px;
    border: 1px solid var(--stroke);
    border-radius: 28px 28px 0 0;
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}

.collection-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.collection-heading h2 {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.shared-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: -4px 0 22px;
    padding: 14px 17px;
    border: 1px solid rgba(229, 169, 79, 0.28);
    border-radius: 12px;
    background: rgba(229, 169, 79, 0.07);
}

.shared-banner-copy strong,
.shared-banner-copy p {
    display: inline;
}

.shared-banner strong {
    margin-right: 8px;
    color: var(--amber-light);
}

.shared-banner p {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.shared-banner button {
    flex: 0 0 auto;
    padding: 9px 13px;
    border: 1px solid rgba(229, 169, 79, 0.4);
    border-radius: 9px;
    color: var(--amber-light);
    background: rgba(229, 169, 79, 0.09);
}

.shared-banner button:hover {
    border-color: rgba(229, 169, 79, 0.7);
    background: rgba(229, 169, 79, 0.16);
}

.result-count {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    white-space: nowrap;
}

.controls {
    position: sticky;
    top: 12px;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto;
    gap: 12px;
    margin-bottom: 30px;
    padding: 12px;
    border: 1px solid var(--stroke);
    border-radius: 18px;
    background: rgba(19, 15, 12, 0.9);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px);
}

.search-field {
    position: relative;
    display: block;
}

.search-field svg {
    position: absolute;
    top: 50%;
    left: 15px;
    width: 20px;
    fill: none;
    stroke: var(--muted);
    stroke-linecap: round;
    stroke-width: 1.8;
    transform: translateY(-50%);
}

.search-field input,
.select-field select {
    width: 100%;
    height: 48px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--cream);
    background: var(--panel-light);
    transition: border-color 160ms ease, background 160ms ease;
}

.search-field input {
    padding: 0 16px 0 46px;
}

.search-field input::placeholder {
    color: #91877d;
}

.search-field input:hover,
.select-field select:hover {
    border-color: var(--stroke);
    background: rgba(66, 52, 40, 0.8);
}

.select-field {
    display: grid;
    gap: 4px;
}

.select-field span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.select-field select {
    min-width: 164px;
    padding: 0 36px 0 14px;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 18px;
    border: 1px solid rgba(229, 169, 79, 0.4);
    border-radius: 12px;
    color: var(--amber-light);
    background: rgba(229, 169, 79, 0.08);
    font-weight: 700;
    transition: transform 160ms ease, background 160ms ease;
}

.secondary-button:hover {
    background: rgba(229, 169, 79, 0.16);
    transform: translateY(-1px);
}

.secondary-button svg {
    width: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.record-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 30px 22px;
}

.seller-pagination {
    display: grid;
    grid-template-columns: auto minmax(140px, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    margin-top: 34px;
    padding: 14px;
    border: 1px solid var(--stroke);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
}

.seller-pagination p {
    margin: 0;
    color: var(--muted);
    text-align: center;
}

.seller-pagination button,
.seller-pagination a {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--stroke);
    border-radius: 9px;
    color: var(--cream);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.045);
}

.seller-pagination a {
    display: inline-flex;
    align-items: center;
    color: var(--amber-light);
}

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

.record-card {
    min-width: 0;
}

.record-card-button {
    width: 100%;
    padding: 0;
    border: 0;
    color: inherit;
    text-align: left;
    background: transparent;
}

.cover-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: #241d17;
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.32);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.record-card-button:hover .cover-wrap {
    transform: translateY(-7px) rotate(-0.6deg);
    box-shadow: 0 26px 45px rgba(0, 0, 0, 0.48);
}

.cover-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms ease;
}

.record-card-button:hover .cover-image {
    transform: scale(1.035);
}

.cover-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(125deg, rgba(255, 255, 255, 0.2), transparent 28%, transparent 70%, rgba(0, 0, 0, 0.25));
    pointer-events: none;
}

.cover-fallback,
.modal-cover-fallback {
    position: absolute;
    inset: 0;
    display: none;
    place-items: center;
    background: radial-gradient(circle at center, #d09b48 0 18%, #1e1d1c 18.5% 20%, #090909 20.5% 100%);
}

.cover-fallback.is-visible,
.modal-cover.image-error .modal-cover-fallback {
    display: grid;
}

.cover-fallback span,
.modal-cover-fallback span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0a0908;
}

.record-copy {
    padding: 15px 4px 0;
}

.record-artist {
    overflow: hidden;
    margin: 0 0 5px;
    color: var(--amber-light);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.record-title {
    display: -webkit-box;
    min-height: 2.8em;
    overflow: hidden;
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.08rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.record-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.meta-tag {
    padding: 4px 7px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    color: #aaa096;
    font-size: 0.68rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.035);
}

.record-year {
    align-self: center;
    color: #aaa096;
    font-size: 0.72rem;
    line-height: 1;
}

.status-message {
    display: grid;
    min-height: 260px;
    place-content: center;
    color: var(--muted);
    text-align: center;
}

.status-message h3 {
    margin: 0 0 8px;
    color: var(--cream);
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.6rem;
}

.status-message p {
    margin: 0;
}

.analytics-dashboard {
    display: grid;
    gap: 24px;
}

.analytics-scope {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border: 1px solid var(--stroke);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
}

.analytics-scope strong,
.analytics-scope p {
    display: block;
}

.analytics-scope strong {
    color: var(--cream);
    font-size: 0.9rem;
}

.analytics-scope p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.76rem;
}

.analytics-scope-buttons {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
}

.analytics-scope-buttons button {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--muted);
    background: transparent;
}

.analytics-scope-buttons button:hover,
.analytics-scope-buttons button.is-active {
    color: var(--amber-light);
    background: rgba(229, 169, 79, 0.1);
}

.analytics-scope-buttons button.is-active {
    border-color: rgba(229, 169, 79, 0.35);
}

.analytics-scope-buttons span {
    min-width: 23px;
    padding: 2px 6px;
    border-radius: 999px;
    color: var(--cream);
    background: rgba(255, 255, 255, 0.09);
    font-size: 0.68rem;
    text-align: center;
}

.analytics-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.analytics-stat,
.analytics-visual,
.about-card,
.about-builder,
.coffee-card {
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, 0.025);
}

.analytics-stat {
    min-width: 0;
    padding: 22px;
    border-radius: 16px;
}

.analytics-stat p,
.analytics-stat strong,
.analytics-stat span {
    display: block;
}

.analytics-stat p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.analytics-stat strong {
    overflow: hidden;
    margin-bottom: 6px;
    color: var(--amber-light);
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    line-height: 1;
    text-overflow: ellipsis;
}

.analytics-stat span {
    color: var(--muted);
    font-size: 0.76rem;
}

.analytics-donuts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 14px;
}

.analytics-visual {
    min-width: 0;
    padding: 22px;
    border-radius: 16px;
}

.analytics-section-heading {
    margin-bottom: 22px;
}

.analytics-section-heading h3 {
    margin: 0 0 5px;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.2rem;
}

.analytics-section-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 0.76rem;
}

.donut-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(24px, 5vw, 54px);
    min-height: 230px;
}

.donut-chart {
    position: relative;
    display: grid;
    width: 210px;
    max-width: 52%;
    flex: 0 0 auto;
    aspect-ratio: 1;
    border-radius: 50%;
    place-items: center;
    box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.22), 0 18px 35px rgba(0, 0, 0, 0.24);
}

.donut-chart::after {
    position: absolute;
    width: 57%;
    aspect-ratio: 1;
    border: 1px solid var(--stroke);
    border-radius: 50%;
    content: "";
    background: #1c1713;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.donut-center {
    position: relative;
    z-index: 1;
    text-align: center;
}

.donut-center strong,
.donut-center span {
    display: block;
}

.donut-center strong {
    color: var(--cream);
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.75rem;
    line-height: 1;
}

.donut-center span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.68rem;
}

.donut-legend {
    display: grid;
    min-width: 0;
    flex: 1;
    gap: 11px;
}

.donut-legend-item {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
}

.donut-legend-item > span {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.donut-legend-item p {
    overflow: hidden;
    margin: 0;
    color: #d7cec4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.donut-legend-item strong {
    color: var(--amber-light);
}

.timeline-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-color: rgba(229, 169, 79, 0.35) transparent;
}

.timeline-chart {
    display: block;
    width: max(100%, 760px);
    height: 280px;
}

.timeline-grid-line {
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 1;
}

.timeline-area {
    fill: rgba(229, 169, 79, 0.09);
}

.timeline-line {
    fill: none;
    stroke: var(--amber);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.5;
}

.timeline-point {
    fill: #1c1713;
    stroke: var(--amber-light);
    stroke-width: 2;
}

.timeline-point:hover {
    fill: var(--amber-light);
}

.timeline-axis-label {
    fill: var(--muted);
    font-family: "DM Sans", system-ui, sans-serif;
    font-size: 10px;
}

.timeline-y-label {
    text-anchor: end;
}

.timeline-x-label {
    text-anchor: middle;
}

.analytics-empty {
    margin: 40px 0;
    color: var(--muted);
    text-align: center;
}

.artist-table-wrap {
    overflow-x: auto;
}

.artist-table {
    width: 100%;
    border-collapse: collapse;
}

.artist-table th,
.artist-table td {
    padding: 13px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    text-align: left;
}

.artist-table th {
    color: var(--muted);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.artist-table td {
    color: #ddd4ca;
    font-size: 0.86rem;
}

.distribution-filter-button {
    padding: 0;
    border: 0;
    color: #ddd4ca;
    text-align: left;
    text-decoration: underline;
    text-decoration-color: rgba(229, 169, 79, 0.38);
    text-underline-offset: 3px;
    background: transparent;
}

.distribution-filter-button:hover {
    color: var(--amber-light);
    text-decoration-color: currentColor;
}

.artist-table th:first-child,
.artist-table td:first-child {
    width: 72px;
    color: var(--muted);
    text-align: center;
}

.artist-table th:last-child,
.artist-table td:last-child {
    width: 90px;
    color: var(--amber-light);
    font-weight: 700;
    text-align: right;
}

.artist-table tbody tr:last-child td {
    border-bottom: 0;
}

.artist-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.025);
}

.about-page {
    display: grid;
    gap: 18px;
}

.about-intro {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 28px;
    padding: 26px 10px 34px;
}

.about-intro h3,
.about-builder h3,
.coffee-card h3 {
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    letter-spacing: -0.025em;
}

.about-intro h3 {
    max-width: 720px;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.08;
}

.about-intro p:last-child,
.about-builder p:last-child,
.coffee-card p:last-child {
    max-width: 700px;
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.about-record {
    position: relative;
    width: 110px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: repeating-radial-gradient(circle, #0d0d0d 0 7px, #2a2928 8px, #0d0d0d 10px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.about-record::after,
.about-record span {
    position: absolute;
    inset: 37px;
    border-radius: 50%;
    content: "";
    background: var(--amber);
}

.about-record span {
    inset: 51px;
    z-index: 1;
    background: #15110d;
}

.about-feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.about-card,
.about-builder,
.coffee-card {
    padding: 26px;
    border-radius: 16px;
}

.about-icon {
    display: block;
    margin-bottom: 16px;
    font-size: 1.8rem;
}

.about-card h4 {
    margin: 0 0 10px;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.35rem;
}

.about-card p,
.about-card li {
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.6;
}

.about-card p {
    margin: 0;
}

.about-card ul {
    display: grid;
    gap: 5px;
    margin: 18px 0 0;
    padding-left: 19px;
}

.about-builder,
.coffee-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.builder-links,
.coffee-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 10px;
}

.builder-links a,
.coffee-actions a {
    padding: 11px 15px;
    border: 1px solid var(--stroke);
    border-radius: 10px;
    color: var(--cream);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.04);
}

.builder-links a:hover {
    border-color: var(--amber);
    color: var(--amber-light);
}

.coffee-card {
    justify-content: flex-start;
    background: linear-gradient(125deg, rgba(123, 75, 34, 0.26), rgba(255, 255, 255, 0.025));
}

.coffee-icon {
    display: grid;
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    border-radius: 50%;
    place-items: center;
    font-size: 1.8rem;
    background: rgba(229, 169, 79, 0.12);
}

.coffee-actions {
    margin-left: auto;
}

.coffee-actions a:first-child {
    border-color: var(--amber);
    color: #21170b;
    background: var(--amber);
}

.coffee-actions a:first-child:hover {
    background: var(--amber-light);
}

.coffee-actions a:last-child:hover {
    border-color: var(--amber);
    color: var(--amber-light);
}

.about-footer {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    text-align: center;
}

.about-footer span {
    color: #e26860;
}

.share-page {
    display: grid;
    gap: 22px;
}

.share-intro {
    padding: 22px 4px 12px;
}

.share-intro h3 {
    max-width: 760px;
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.share-intro > p:last-child {
    max-width: 720px;
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.share-option {
    display: grid;
    min-height: 205px;
    padding: 24px;
    border: 1px solid var(--stroke);
    border-radius: 16px;
    align-content: start;
    color: var(--cream);
    text-align: left;
    background: rgba(255, 255, 255, 0.025);
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.share-option:hover {
    border-color: rgba(229, 169, 79, 0.5);
    background: rgba(229, 169, 79, 0.06);
    transform: translateY(-2px);
}

.share-option-icon {
    display: grid;
    width: 44px;
    height: 44px;
    margin-bottom: 18px;
    border-radius: 50%;
    place-items: center;
    color: var(--amber-light);
    font-size: 1.2rem;
    background: rgba(229, 169, 79, 0.1);
}

.share-option strong {
    margin-bottom: 7px;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.2rem;
}

.share-option > span:not(.share-option-icon) {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.share-option small {
    align-self: end;
    margin-top: 18px;
    color: var(--amber-light);
    font-weight: 700;
}

.share-description {
    display: grid;
    gap: 8px;
}

.share-description > span {
    color: var(--amber-light);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.share-description small {
    color: var(--muted);
    font-weight: 500;
}

.share-description textarea {
    min-height: 105px;
    resize: vertical;
    padding: 14px;
    border: 1px solid var(--stroke);
    border-radius: 12px;
    color: var(--cream);
    background: rgba(255, 255, 255, 0.035);
}

.custom-share-panel,
.share-result {
    padding: 24px;
    border: 1px solid var(--stroke);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
}

.custom-share-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.custom-share-heading h4,
.share-result h4 {
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.35rem;
}

.custom-share-heading p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.custom-share-heading > div:last-child {
    display: flex;
    gap: 8px;
}

.custom-share-heading button {
    padding: 7px 10px;
    border: 1px solid var(--stroke);
    border-radius: 8px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.035);
}

.custom-share-search {
    display: block;
    margin: 20px 0 14px;
}

.custom-share-search input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--stroke);
    border-radius: 10px;
    color: var(--cream);
    background: rgba(12, 10, 8, 0.62);
}

.custom-share-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 9px;
    max-height: 430px;
    overflow-y: auto;
    padding: 2px;
}

.custom-share-item {
    display: grid;
    grid-template-columns: auto 48px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
}

.custom-share-item.is-selected {
    border-color: rgba(229, 169, 79, 0.48);
    background: rgba(229, 169, 79, 0.07);
}

.custom-share-item input {
    accent-color: var(--amber);
}

.custom-share-cover {
    width: 48px;
    height: 48px;
    overflow: hidden;
    border-radius: 6px;
    background: radial-gradient(circle, var(--amber) 0 18%, #111 19%);
}

.custom-share-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.custom-share-copy {
    min-width: 0;
}

.custom-share-copy strong,
.custom-share-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-share-copy strong {
    font-size: 0.82rem;
}

.custom-share-copy small {
    margin-top: 3px;
    color: var(--muted);
}

.create-share-button {
    width: 100%;
    height: 48px;
    margin-top: 16px;
    border: 1px solid var(--amber);
    border-radius: 10px;
    color: #21170b;
    background: var(--amber);
    font-weight: 800;
}

.create-share-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.share-result {
    display: grid;
    grid-template-columns: auto minmax(260px, 1fr);
    align-items: center;
    gap: 18px 30px;
    border-color: rgba(229, 169, 79, 0.32);
    background: rgba(229, 169, 79, 0.06);
}

.share-link-field {
    display: flex;
    gap: 8px;
}

.share-link-field input {
    min-width: 0;
    flex: 1;
    height: 46px;
    padding: 0 12px;
    border: 1px solid var(--stroke);
    border-radius: 9px;
    color: var(--cream);
    background: rgba(12, 10, 8, 0.72);
}

.share-link-field button {
    padding: 0 15px;
    border: 1px solid var(--amber);
    border-radius: 9px;
    color: #21170b;
    background: var(--amber);
    font-weight: 800;
}

.share-result > p {
    grid-column: 2;
    margin: -10px 0 0;
    color: var(--amber-light);
    font-size: 0.76rem;
}

.loader {
    width: 38px;
    height: 38px;
    margin: 0 auto 14px;
    border: 3px solid rgba(229, 169, 79, 0.2);
    border-top-color: var(--amber);
    border-radius: 50%;
    animation: spin 800ms linear infinite;
}

.modal[hidden],
[hidden] {
    display: none !important;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    padding: 24px;
    place-items: center;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 5, 4, 0.84);
    backdrop-filter: blur(12px);
}

.modal-dialog {
    position: relative;
    z-index: 1;
    width: min(960px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    border: 1px solid var(--stroke);
    border-radius: 24px;
    background: #1c1713;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7);
}

.modal-dialog:focus {
    outline: none;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    place-items: center;
    color: var(--cream);
    background: rgba(12, 10, 8, 0.75);
}

.modal-close:hover {
    color: var(--amber-light);
    background: #0d0b09;
}

.modal-close svg {
    width: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
}

.modal-layout {
    display: grid;
    grid-template-columns: minmax(300px, 0.95fr) 1.05fr;
    gap: 42px;
    padding: 42px;
}

.modal-tracklist {
    grid-column: 1 / -1;
    padding-top: 32px;
    border-top: 1px solid var(--stroke);
}

.tracklist-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 15px;
}

.tracklist-heading h3 {
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.35rem;
}

.tracklist-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 0.76rem;
}

.tracklist-status {
    margin: 28px 0;
    color: var(--muted);
    text-align: center;
}

.tracklist-status .loader {
    margin-bottom: 12px;
}

.track-list {
    display: grid;
    gap: 3px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.track-list li {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
}

.track-list li:hover {
    background: rgba(255, 255, 255, 0.05);
}

.track-list li > span {
    color: var(--muted);
    font-size: 0.76rem;
}

.track-list li > span:first-child {
    text-align: center;
}

.track-list li > span:last-child {
    text-align: right;
}

.track-list li strong {
    font-size: 0.86rem;
    font-weight: 600;
}

.modal-tracklist details {
    margin-top: 18px;
    padding: 13px;
    border: 1px solid var(--stroke);
    border-radius: 9px;
    color: var(--muted);
}

.modal-tracklist summary {
    cursor: pointer;
    color: var(--cream);
    font-weight: 700;
}

.modal-tracklist details p {
    white-space: pre-wrap;
}

.related-albums {
    grid-column: 1 / -1;
    min-width: 0;
    padding-top: 28px;
    border-top: 1px solid var(--stroke);
}

.related-albums-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.related-albums-heading h3 {
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.35rem;
}

.related-albums-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 0.76rem;
}

.related-albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 9px 14px;
}

.related-album-button {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 5px;
    border: 0;
    border-radius: 8px;
    color: var(--cream);
    text-align: left;
    background: transparent;
}

.related-album-button:hover {
    background: rgba(255, 255, 255, 0.04);
}

.related-album-cover {
    position: relative;
    display: block;
    overflow: hidden;
    width: 34px;
    height: 34px;
    border: 1px solid var(--stroke);
    border-radius: 9px;
    background: radial-gradient(circle, var(--amber) 0 17%, #171513 18% 21%, #080808 22%);
    transition: transform 160ms ease, border-color 160ms ease;
}

.related-album-button:hover .related-album-cover {
    border-color: rgba(229, 169, 79, 0.55);
    transform: translateY(-3px);
}

.related-album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-album-copy {
    display: block;
    min-width: 0;
    padding-top: 0;
}

.related-album-copy strong,
.related-album-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-album-copy strong {
    font-size: 0.78rem;
}

.related-album-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.68rem;
}

.modal-media {
    min-width: 0;
}

.modal-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: 16px;
    background: #0d0b09;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

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

.modal-cover.image-error > img {
    display: none;
}

.modal-cover-fallback {
    color: var(--muted);
    text-align: center;
}

.modal-cover-fallback p {
    position: absolute;
    bottom: 20px;
    margin: 0;
    font-size: 0.8rem;
}

.spotify-player {
    width: 100%;
    height: 152px;
    margin-top: 18px;
    border: 0;
    border-radius: 12px;
}

.modal-details {
    align-self: center;
    min-width: 0;
}

.modal-heading {
    padding-right: 42px;
}

.modal-heading h2 {
    overflow-wrap: anywhere;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.06;
}

.modal-artist {
    margin: 12px 0 0;
    color: var(--amber-light);
    font-size: 1.18rem;
    font-weight: 600;
}

.modal-details dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
    margin: 30px 0;
    padding: 24px 0;
    border-block: 1px solid var(--stroke);
}

.modal-details dt {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.73rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.modal-details dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 0.95rem;
    font-weight: 600;
}

.market-values {
    margin-bottom: 26px;
}

.market-values h3 {
    margin: 0 0 12px;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.1rem;
}

.market-grid {
    display: flex;
    gap: 10px;
}

.market-grid div {
    flex: 1;
    padding: 11px;
    border: 1px solid var(--stroke);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
}

.market-grid span,
.market-grid strong {
    display: block;
}

.market-grid span {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 0.72rem;
}

.market-grid strong {
    color: var(--amber-light);
}

.external-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.artist-metadata {
    grid-column: 1 / -1;
    display: grid;
    gap: 15px;
    padding: 18px 0;
    border-top: 1px solid var(--stroke);
    border-bottom: 1px solid var(--stroke);
}

.artist-metadata > div {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 14px;
}

.artist-metadata h3 {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.7rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.artist-metadata-links {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.artist-metadata-links a {
    padding: 5px 9px;
    border: 1px solid var(--stroke);
    border-radius: 999px;
    color: var(--amber-light);
    font-size: 0.74rem;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.025);
}

.artist-metadata-links a:hover {
    border-color: rgba(229, 169, 79, 0.48);
}

.artist-metadata-status {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.external-link {
    padding: 11px 15px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: white;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.spotify-link {
    background: #187d3f;
}

.spotify-link:hover {
    background: #1d914a;
}

.spotify-search-link,
.marketplace-link,
.artist-link,
.listing-link {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
}

.discogs-link {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
}

.discogs-link:hover {
    border-color: var(--amber);
    color: var(--amber-light);
}

.modal-open {
    overflow: hidden;
}

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

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

@media (max-width: 1280px) {
    .header-content {
        align-items: flex-start;
        flex-direction: column;
        gap: 22px;
    }

    .navigation-row {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .header-content {
        align-items: flex-start;
        flex-direction: column;
        gap: 22px;
    }

    .navigation-row {
        align-items: stretch;
        gap: 6px;
        width: 100%;
    }

    .account-tools {
        gap: 8px;
        justify-content: flex-end;
    }

    .view-nav {
        gap: 6px;
        justify-content: flex-end;
    }

    .view-nav-button {
        padding-inline: 8px;
    }

    .account-tools .builder-button {
        padding-inline: 12px;
    }

    .controls {
        grid-template-columns: 1fr 1fr;
    }

    .connection-screen {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .analytics-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-builder,
    .coffee-card {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .modal-layout {
        grid-template-columns: minmax(240px, 0.8fr) 1.2fr;
        gap: 28px;
        padding: 30px;
    }

    .share-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .navigation-row {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 680px) {
    .site-header,
    main {
        width: min(100% - 24px, 1440px);
    }

    .site-header {
        padding: 34px 2px 24px;
    }

    .brand-mark {
        width: 52px;
        height: 52px;
    }

    .brand-mark::after {
        inset: 18px;
    }

    .brand-mark span {
        inset: 24px;
    }

    .view-nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
    }

    .view-nav-button {
        justify-content: center;
        padding-inline: 8px;
    }

    .navigation-row {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .account-tools {
        display: grid;
        grid-template-columns: 1fr;
        justify-content: stretch;
        width: 100%;
    }

    .account-tools .builder-button {
        width: 100%;
        justify-content: center;
    }

    .support-menu {
        right: max(14px, env(safe-area-inset-right));
        bottom: max(14px, env(safe-area-inset-bottom));
    }

    .support-toggle {
        width: 44px;
        height: 44px;
    }

    .support-popover {
        width: min(310px, calc(100vw - 28px));
    }

    .profile-tools {
        grid-column: 1 / -1;
        justify-content: space-between;
        min-width: 0;
        width: 100%;
    }

    .profile-summary {
        min-width: 0;
    }

    .profile-summary strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .shared-banner {
        align-items: flex-start;
        flex-direction: column;
    }

    .analytics-scope {
        align-items: flex-start;
        flex-direction: column;
    }

    .analytics-scope-buttons {
        width: 100%;
    }

    .analytics-scope-buttons button {
        flex: 1;
        justify-content: center;
    }

    .connection-screen {
        min-height: 0;
        padding: 34px 18px;
        border-radius: 20px 20px 0 0;
    }

    .connection-form {
        padding: 20px;
    }

    .collection-panel {
        padding: 22px 16px;
        border-radius: 20px 20px 0 0;
    }

    .collection-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .controls {
        position: sticky;
        top: max(8px, env(safe-area-inset-top));
        z-index: 20;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        padding: 8px;
        border-radius: 14px;
        background: rgba(19, 15, 12, 0.97);
    }

    .controls .select-field select {
        min-width: 0;
    }

    .controls .secondary-button {
        padding-inline: 14px;
    }

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

    .select-field select {
        min-width: 0;
    }

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

    .seller-pagination {
        grid-template-columns: 1fr 1fr;
    }

    .seller-pagination p,
    .seller-pagination a {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .seller-pagination p {
        grid-row: 1;
    }

    .seller-pagination button {
        grid-row: 2;
    }

    .seller-pagination a {
        grid-row: 3;
    }

    .analytics-stats,
    .analytics-donuts,
    .about-feature-grid {
        grid-template-columns: 1fr;
    }

    .donut-content {
        min-height: 200px;
    }

    .about-intro {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-top: 10px;
    }

    .about-record {
        width: 82px;
    }

    .about-record::after {
        inset: 28px;
    }

    .about-record span {
        inset: 38px;
    }

    .builder-links,
    .coffee-actions {
        width: 100%;
    }

    .builder-links a,
    .coffee-actions a {
        flex: 1;
        text-align: center;
    }

    .record-copy {
        padding-top: 12px;
    }

    .record-title {
        font-size: 0.95rem;
    }

    .record-artist {
        font-size: 0.67rem;
    }

    .modal {
        align-items: end;
        padding: 0;
    }

    .modal-dialog {
        width: 100%;
        max-height: 94vh;
        border-radius: 24px 24px 0 0;
    }

    .modal-layout {
        grid-template-columns: 1fr;
        padding: 22px 20px 34px;
    }

    .modal-cover {
        max-width: 420px;
        margin-inline: auto;
    }

    .modal-heading {
        padding-right: 0;
    }

    .related-albums-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .related-albums-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .custom-share-panel,
    .share-result {
        padding: 18px;
    }

    .custom-share-heading {
        flex-direction: column;
    }

    .custom-share-heading > div:last-child,
    .custom-share-heading button {
        width: 100%;
    }

    .share-result {
        grid-template-columns: 1fr;
    }

    .share-result > p {
        grid-column: auto;
        margin-top: -8px;
    }

    .share-link-field {
        flex-direction: column;
    }

    .share-link-field button {
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
