:root {
    --bg: #fff4f8;
    --bg-soft: #fde9f1;
    --card: rgba(255, 251, 253, 0.8);
    --text: #3b2132;
    --text-soft: #745567;
    --primary: #ec5b99;
    --primary-deep: #c83f78;
    --secondary: #ffe0eb;
    --accent: #e6a7bc;
    --gold: #2f1f30;
    --gold-accent: #ffcf7d;
    --border: rgba(183, 95, 128, 0.18);
    --shadow: 0 24px 70px rgba(156, 86, 117, 0.16);
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --font-display: "Baskerville", "Palatino Linotype", "Book Antiqua", serif;
    --font-body: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 10%, rgba(240, 178, 197, 0.54), transparent 28%),
        radial-gradient(circle at 82% 14%, rgba(255, 220, 230, 0.75), transparent 22%),
        linear-gradient(180deg, #fff8fb 0%, #fff1f7 46%, #fbe9f1 100%);
    font-family: var(--font-body);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

input,
select,
button,
textarea {
    font: inherit;
}

.ambient {
    position: fixed;
    inset: auto;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(60px);
    opacity: 0.45;
    z-index: -1;
}

.ambient-one {
    width: 320px;
    height: 320px;
    background: rgba(255, 179, 212, 0.75);
    top: 80px;
    left: -60px;
}

.ambient-two {
    width: 280px;
    height: 280px;
    background: rgba(255, 212, 237, 0.7);
    bottom: 80px;
    right: -40px;
}

.site-header,
.pwa-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-header {
    padding: 1.5rem clamp(1.25rem, 4vw, 3rem);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #ed5e98, #f5b1c7);
    color: white;
    box-shadow: var(--shadow);
}

.site-nav,
.admin-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-shell {
    padding: 0 1.25rem 3rem;
    max-width: 1240px;
    margin: 0 auto;
}

.section-block {
    margin-top: 2rem;
}

.section-block.narrow {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.section-block.no-pad {
    padding: 0;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-head.centered {
    text-align: center;
    justify-content: center;
}

.eyebrow {
    margin: 0 0 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    color: var(--primary-deep);
    font-weight: 700;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: var(--font-display);
}

h1 {
    font-size: clamp(2.1rem, 4vw, 4.4rem);
    line-height: 1;
}

h2 {
    font-size: clamp(1.35rem, 2vw, 2rem);
}

.lede,
p {
    color: var(--text-soft);
}

.hero-grid,
.download-grid,
.pricing-grid,
.admin-grid,
.pwa-grid,
.metric-grid {
    display: grid;
    gap: 1.25rem;
}

.hero-grid {
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    align-items: stretch;
    padding-top: 0.5rem;
}

.glass-card,
.metric-card,
.pricing-card,
.song-card,
.chip-card,
.empty-card {
    border: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 247, 251, 0.78)),
        var(--card);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
}

.glass-card,
.chip-card,
.metric-card,
.empty-card {
    padding: 1.4rem;
}

.hero-copy,
.hero-panel {
    padding: clamp(1.6rem, 4vw, 2.6rem);
}

.editorial-hero .hero-copy {
    position: relative;
    overflow: hidden;
}

.editorial-hero .hero-copy::after {
    content: "";
    position: absolute;
    inset: auto -20% -30% auto;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(228, 167, 187, 0.46), transparent 68%);
    filter: blur(18px);
}

.button-row {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: white;
    padding: 0.85rem 1.25rem;
    font-weight: 700;
    cursor: pointer;
}

.button.subtle {
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary-deep);
    border: 1px solid var(--border);
}

.button.danger {
    background: linear-gradient(135deg, #ff7f9d, #f64768);
}

.button.tiny {
    padding: 0.55rem 0.95rem;
    font-size: 0.9rem;
}

.feature-list {
    margin: 1rem 0 0;
    padding-left: 1.2rem;
    color: var(--text-soft);
    line-height: 1.7;
}

.hero-whisper {
    margin-top: 1.35rem;
    padding: 0.95rem 1.1rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 236, 244, 0.72);
    border: 1px solid rgba(221, 147, 175, 0.22);
}

.hero-whisper p {
    margin: 0;
    color: #8b5770;
    font-style: italic;
}

.quote-ribbon {
    margin-top: 1.15rem;
    font-style: italic;
    color: #8b5770;
}

.stat-grid,
.metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    margin-top: 1.4rem;
}

.stat-grid article,
.metric-card {
    padding: 1rem;
}

.stat-grid strong,
.metric-card strong {
    display: block;
    font-size: 2rem;
    color: var(--primary-deep);
}

.song-grid,
.chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
}

.song-grid.compact {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.song-card {
    overflow: hidden;
}

.song-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    background: linear-gradient(135deg, #ffe0ee, #ffd2e7);
}

.song-card div {
    padding: 1rem;
}

.premium-card {
    background: linear-gradient(180deg, rgba(44, 33, 48, 0.98), rgba(71, 46, 65, 0.96));
    color: white;
}

.premium-card p {
    color: rgba(255, 255, 255, 0.72);
}

.chip-card p {
    margin-bottom: 0;
}

.pill {
    display: inline-flex;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    background: rgba(255, 95, 162, 0.12);
    color: var(--primary-deep);
    font-size: 0.85rem;
    font-weight: 700;
}

.gold-pill {
    background: rgba(255, 206, 115, 0.16);
    color: var(--gold-accent);
}

.pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.pricing-card {
    padding: 1.6rem;
}

.pricing-card.highlighted {
    border-color: rgba(230, 54, 128, 0.35);
}

.pricing-card.dark {
    background: linear-gradient(180deg, #2e1d2f, #4b314c);
    color: white;
}

.pricing-card.dark p,
.pricing-card.dark li {
    color: rgba(255, 255, 255, 0.8);
}

.price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-deep);
}

.pricing-card.dark .price {
    color: var(--gold-accent);
}

.stack-form {
    display: grid;
    gap: 1rem;
}

.stack-form.compact {
    gap: 0.8rem;
}

label {
    display: grid;
    gap: 0.45rem;
    color: var(--text);
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(235, 159, 189, 0.45);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.85rem 1rem;
    color: var(--text);
}

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

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 600;
}

.checkbox input {
    width: auto;
}

.flash {
    padding: 0.95rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-weight: 700;
}

.flash-success {
    background: rgba(76, 175, 80, 0.12);
    color: #23612f;
}

.flash-error {
    background: rgba(244, 67, 54, 0.12);
    color: #8c2137;
}

.flash-info {
    background: rgba(255, 95, 162, 0.12);
    color: var(--primary-deep);
}

.auth-shell {
    padding-top: 3rem;
}

.auth-card {
    max-width: 560px;
    margin: 0 auto;
}

.download-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.inline-note,
.form-hint {
    color: var(--text-soft);
    font-size: 0.95rem;
}

.success-panel {
    padding: 1rem 1.2rem;
    border-radius: var(--radius-md);
    background: rgba(76, 175, 80, 0.12);
    color: #23612f;
    margin-bottom: 1rem;
}

.admin-body {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    background: linear-gradient(180deg, #fff6fb 0%, #fff0f7 100%);
}

.admin-sidebar {
    min-height: 100vh;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.75);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(18px);
}

.admin-nav {
    margin-top: 2rem;
    display: grid;
    gap: 0.5rem;
}

.admin-nav a {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
}

.admin-nav a:hover {
    background: rgba(255, 95, 162, 0.09);
}

.admin-main {
    padding: 2rem;
}

.admin-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.table-list {
    display: grid;
    gap: 1rem;
}

.table-form {
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border);
}

.table-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
}

.table-form-grid.small {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.table-form-actions {
    margin-top: 0.8rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.mini-table {
    display: grid;
    gap: 0.75rem;
}

.mini-table div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0.9rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.72);
}

.pwa-body {
    padding: 1rem;
}

.pwa-shell {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    gap: 1.2rem;
}

.player-card {
    position: sticky;
    bottom: 1rem;
}

.player-card audio {
    width: 100%;
}

.client-song-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.song-card button {
    margin-top: 0.8rem;
}

.song-card.locked {
    opacity: 0.8;
    border-color: rgba(255, 206, 115, 0.42);
}

.song-card.locked::after {
    content: "Black visual";
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(44, 33, 48, 0.88);
    color: #ffce73;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.song-card {
    position: relative;
}

.curated-card {
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.curated-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px rgba(169, 98, 129, 0.18);
}

.song-card-body {
    display: grid;
    gap: 0.8rem;
}

.song-card-topline {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
}

.song-duration {
    color: var(--text-soft);
    font-size: 0.88rem;
    font-weight: 700;
}

.active-track {
    border-color: rgba(200, 63, 120, 0.44);
    box-shadow: 0 24px 60px rgba(200, 63, 120, 0.18);
}

.active-track::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(236, 91, 153, 0.34);
    pointer-events: none;
}

.closing-note {
    text-align: center;
}

.player-topbar {
    align-items: end;
}

.player-stage {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.95fr);
    gap: 1.25rem;
}

.player-showcase {
    display: grid;
    grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
    gap: 1.35rem;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.player-showcase::before {
    content: "";
    position: absolute;
    inset: auto auto -90px -40px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(230, 167, 186, 0.35), transparent 70%);
    filter: blur(18px);
    pointer-events: none;
}

.player-cover-shell {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(135deg, #f4bfd0, #fce2ec);
    box-shadow: 0 28px 60px rgba(88, 51, 69, 0.18);
}

.player-cover-shell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-vinyl {
    position: absolute;
    right: -58px;
    bottom: -40px;
    width: 180px;
    height: 180px;
    border-radius: 999px;
    background:
        radial-gradient(circle at center, #1f161f 0 16%, transparent 16% 18%, #2d202d 18% 34%, #151015 34% 36%, #2d202d 36% 56%, #161116 56% 58%, #2d202d 58% 100%);
    opacity: 0.88;
    transform: rotate(18deg);
    transition: transform 500ms linear;
    box-shadow: 0 16px 40px rgba(31, 22, 31, 0.28);
}

.player-vinyl span {
    position: absolute;
    inset: 50%;
    width: 24px;
    height: 24px;
    margin-left: -12px;
    margin-top: -12px;
    border-radius: 999px;
    background: #f2c6d4;
}

.is-playing .player-vinyl {
    transform: rotate(230deg);
}

.player-showcase-copy {
    display: grid;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.player-title-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
}

.player-title-row h2 {
    font-size: clamp(1.8rem, 3vw, 3.1rem);
    line-height: 0.95;
}

.player-subtitle {
    margin: 0;
    font-size: 1.02rem;
}

.player-meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.player-mood {
    margin: 0;
    font-size: 1rem;
    color: #8a5d73;
}

.player-visualizer {
    display: flex;
    align-items: end;
    gap: 0.35rem;
    min-height: 42px;
}

.player-visualizer span {
    width: 8px;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ef6aa2, #d24782);
    transform-origin: bottom;
    opacity: 0.66;
}

.is-playing .player-visualizer span {
    animation: player-bounce 0.95s ease-in-out infinite alternate;
    opacity: 1;
}

.is-playing .player-visualizer span:nth-child(2) {
    animation-delay: 0.08s;
}

.is-playing .player-visualizer span:nth-child(3) {
    animation-delay: 0.16s;
}

.is-playing .player-visualizer span:nth-child(4) {
    animation-delay: 0.24s;
}

.is-playing .player-visualizer span:nth-child(5) {
    animation-delay: 0.32s;
}

.player-showcase audio {
    width: 100%;
}

.player-footer-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    color: var(--text-soft);
    font-weight: 700;
}

.player-status {
    color: var(--primary-deep);
}

.player-side-column {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.profile-panel,
.membership-panel,
.player-message-card {
    height: fit-content;
}

.profile-story strong,
.membership-hero strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.profile-story p,
.membership-hero p,
.player-message-card strong {
    margin-top: 0.15rem;
}

.membership-hero {
    display: grid;
    gap: 0.55rem;
}

.membership-hero.black {
    color: white;
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #2e1d2f, #4b314c);
}

.membership-hero.black p {
    color: rgba(255, 255, 255, 0.8);
}

.membership-hero.premium {
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 226, 236, 0.9), rgba(255, 242, 247, 0.9));
}

.membership-hero.free {
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 242, 247, 0.82);
}

@keyframes player-bounce {
    from {
        transform: scaleY(0.8);
        height: 12px;
    }

    to {
        transform: scaleY(1.2);
        height: 34px;
    }
}

@media (max-width: 980px) {
    .hero-grid,
    .player-stage,
    .player-showcase,
    .admin-body,
    .table-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        min-height: auto;
    }

    .admin-main {
        padding: 1rem;
    }

    .player-cover-shell {
        max-width: 420px;
    }
}

@media (max-width: 720px) {
    .site-header,
    .pwa-header,
    .admin-hero,
    .section-head {
        flex-direction: column;
        align-items: stretch;
    }

    .split-row {
        grid-template-columns: 1fr;
    }

    .page-shell {
        padding-inline: 1rem;
    }

    .player-title-row,
    .player-footer-row,
    .song-card-topline {
        flex-direction: column;
        align-items: start;
    }
}
