@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Crimson+Text:ital,wght@0,400;0,600;1,400;1,600&family=Inter:wght@300;400;500&display=swap');

/* ── Variables ─────────────────────────────────────────── */
:root {
    --bg-dark: #0e0905;
    --gold: #c4972a;
    --gold-light: #e0b84a;
    --gold-muted: rgba(196, 151, 42, 0.5);
    --text-warm: #f0e4c8;
    --text-dim: rgba(240, 228, 200, 0.75);
    --text-faint: rgba(240, 228, 200, 0.3);
    --cassette-bg: #d4c9b0;
    --cassette-label: #f5f0e6;
    --reel-dark: #1c1713;
    --shadow-warm: rgba(196, 151, 42, 0.12);
    --ff-serif: 'Playfair Display', 'Crimson Text', Georgia, serif;
    --ff-body: 'Crimson Text', Georgia, serif;
    --ff-sans: 'Inter', sans-serif;
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ─────────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    user-select: none;
}

body {
    background: var(--bg-dark);
    font-family: var(--ff-body);
    color: var(--text-warm);
}

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

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

button:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

ul {
    list-style: none;
}

/* ── Loader ────────────────────────────────────────────── */
.global-loader {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.global-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.gl-logo {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    margin-bottom: 24px;
    animation: pulseLogo 2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(230, 170, 60, 0.2);
}

@keyframes pulseLogo {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 15px rgba(230, 170, 60, 0.2);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 35px rgba(230, 170, 60, 0.6);
    }
}

.gl-text {
    font-family: var(--ff-sans);
    font-size: 11px;
    letter-spacing: 4px;
    color: var(--gold-light);
    text-transform: uppercase;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.blinking {
    animation: pulse 1s ease-in-out infinite;
    color: var(--gold-light) !important;
}

/* ── App Shell — Single Column ── */
.app {
    display: grid;
    grid-template-columns: 1fr;
    width: 100vw;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}


/* ══════════════════════════════════════════════════════════
   CENTER STAGE
══════════════════════════════════════════════════════════ */
.center-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    gap: 0;
    width: 100%;
    height: 100%;
}

/* Background image */
.scene-bg {
    position: absolute;
    inset: -40px;
    background: url('/img/bg_same_platform_desk.jpg') center/cover no-repeat;
    filter: sepia(60%) brightness(0.55) saturate(120%);
    z-index: 0;
    transition: filter 1.2s ease, opacity 1.2s ease;
}

.scene-bg-b {
    opacity: 0;
}

/* Warm gradient overlay */
.scene-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(14, 9, 5, 0.6) 0%,
            rgba(14, 9, 5, 0.1) 30%,
            rgba(14, 9, 5, 0.1) 60%,
            rgba(14, 9, 5, 0.75) 100%),
        radial-gradient(ellipse at 50% 40%, rgba(196, 151, 42, 0.05) 0%, transparent 70%);
    z-index: 1;
    transition: background 1.2s ease;
}

/* Vignette with Vintage Film Grain */
.scene-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.65) 100%);
    z-index: 2;
}

.scene-vignette::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.12;
    pointer-events: none;
    z-index: 3;
}

/* All center content sits above overlays */
.brand-logo,
.banner,
.now-playing-wrap,
.cassette-wrap,
.progress-section,
.controls-row,
.waveform-wrap,
.deco {
    position: relative;
    z-index: 5;
}

/* ── Logo ────────────────────────────────────────────────── */
.brand-logo {
    position: absolute;
    top: 24px;
    left: 32px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid rgba(196, 151, 42, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

/* ── Banner ──────────────────────────────────────────────── */
.banner {
    position: absolute;
    top: 24px;
    right: 32px;
    left: auto;
    display: flex;
    justify-content: flex-end;
    padding-top: 0;
    z-index: 10;
}

.banner-inner {
    background: rgba(14, 9, 5, 0.7);
    backdrop-filter: blur(12px);
    border: 2px solid rgba(196, 151, 42, 0.4);
    border-radius: 35px;
    height: 70px;
    padding: 0 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: all 0.5s ease;
}

.banner-sub {
    font-family: var(--ff-sans);
    font-size: 9px;
    color: var(--text-dim);
    letter-spacing: 3px;
    margin-bottom: 4px;
    display: block;
    text-transform: uppercase;
    text-align: center;
}

.banner-title {
    font-family: var(--ff-serif);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--gold-light);
    line-height: 1;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* ── Now Playing ─────────────────────────────────────────── */
.now-playing-wrap {
    text-align: center;
    margin-bottom: 16px;
}

.np-label {
    font-family: var(--ff-sans);
    font-size: 11px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-dim);
    display: block;
    margin-bottom: 8px;
}

.np-label::before {
    content: "— ";
    opacity: 0.5;
}

.np-label::after {
    content: " —";
    opacity: 0.5;
}

.np-title {
    font-family: var(--ff-serif);
    font-size: clamp(18px, 3.5vw, 26px);
    font-weight: 600;
    color: var(--text-warm);
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    max-width: min(600px, 90vw);
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 0 20px rgba(196, 151, 42, 0.4), 0 2px 4px rgba(0, 0, 0, 0.8);
    transition: opacity 0.3s ease;
    line-height: 1.3;
}

.np-title:hover {
    -webkit-line-clamp: unset;
    display: block;
    overflow: visible;
}

.np-title.fade-out {
    opacity: 0;
}

.np-artists {
    font-family: var(--ff-body);
    font-style: italic;
    font-size: 16px;
    color: #fff;
    letter-spacing: 1.5px;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* ══════════════════════════════════════════════════════════
   CASSETTE TAPE (Skeuomorphic Enhancements)
══════════════════════════════════════════════════════════ */
.cassette-wrap {
    margin-bottom: 24px;
    perspective: 1000px;
    cursor: pointer;
    position: relative;
}

.cassette-wrap:hover .eject-hint {
    color: var(--gold-light) !important;
    text-shadow: 0 0 8px rgba(196, 151, 42, 0.6);
}

.cassette {
    width: min(420px, 85vw);
    height: min(240px, 55vw);
    background: linear-gradient(160deg, #e4dac1 0%, #d4c9b0 40%, #bfb49c 100%);
    border-radius: 14px;
    position: relative;
    box-shadow:
        0 16px 50px rgba(0, 0, 0, 0.8),
        0 6px 12px rgba(0, 0, 0, 0.5),
        inset 0 2px 3px rgba(255, 255, 255, 0.5),
        inset 0 -2px 4px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s var(--ease-smooth);
}

.cassette--ejecting {
    transform: translateY(20px) rotate(-3deg);
    opacity: 0.3;
    filter: blur(2px);
    transition: all 0.5s ease;
}

.cassette--inserting {
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease, filter 0.4s ease;
}

@media (hover: hover) {
    .cassette:hover {
        transform: translateY(-4px) rotateX(2deg);
    }
}

/* Label */
.cassette-label {
    position: absolute;
    top: 12px;
    left: 24px;
    right: 24px;
    height: min(85px, 38%);
    background: linear-gradient(135deg, #fdfbf7, #eae1d0);
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2), inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.label-brand {
    font-family: var(--ff-sans);
    font-size: 8px;
    letter-spacing: 2px;
    color: #8a7a60;
    text-align: center;
    text-transform: uppercase;
}

.label-song-name {
    font-family: var(--ff-serif);
    font-style: italic;
    font-size: clamp(14px, 3vw, 18px);
    font-weight: 600;
    color: #3a2e1e;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
}

.label-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.label-side,
.label-pos {
    font-family: var(--ff-sans);
    font-size: 12px;
    font-weight: 600;
    color: #6b5d48;
    letter-spacing: 0.5px;
}

.label-dots {
    display: flex;
    gap: 4px;
}

.label-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #c4a872;
}

/* Reels row */
.cassette-reels {
    position: absolute;
    bottom: min(35px, 15%);
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 min(45px, 10%);
}

.reel-housing {
    width: min(82px, 20vw);
    height: min(82px, 20vw);
    border-radius: 50%;
    background: #19120b;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.9), 0 1px 1px rgba(255, 255, 255, 0.2);
}

.reel {
    width: 85%;
    height: 85%;
    border-radius: 50%;
    background: radial-gradient(circle, #2c211a 0%, #1a120d 60%, #0e0907 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s linear;
}

.cassette.playing .reel {
    animation: reelSpin 1.8s linear infinite;
}

@keyframes reelSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.reel-hub {
    width: 50%;
    height: 50%;
    border-radius: 50%;
    background: #3a2c22;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.04);
}

.reel-spoke {
    position: absolute;
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 1px;
}

.reel-spoke:nth-child(1) {
    transform: rotate(0deg);
}

.reel-spoke:nth-child(2) {
    transform: rotate(60deg);
}

.reel-spoke:nth-child(3) {
    transform: rotate(120deg);
}

.reel-hole {
    width: 30%;
    height: 30%;
    border-radius: 50%;
    background: #0e0907;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Tape window */
.tape-window {
    width: min(90px, 22vw);
    height: min(32px, 8vw);
    background: #0e0907;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8);
}

.tape-window-inner {
    width: 88%;
    height: 60%;
    background: #1a0f08;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tape-strip {
    width: 80%;
    height: 4px;
    background: linear-gradient(90deg, #3a2a1a, #6b4a28, #3a2a1a);
    border-radius: 2px;
    opacity: 0.8;
}

/* Bottom edge */
.cassette-bottom-edge {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.bottom-hole {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.bottom-slot {
    width: 22px;
    height: 6px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.18);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* ── Progress Bar ────────────────────────────────────────── */
.progress-section {
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(460px, 85vw);
    margin-bottom: 20px;
}

.time-stamp {
    font-family: var(--ff-sans);
    font-size: 13px;
    color: var(--text-dim);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 36px;
}

.sp-progress-bar {
    flex: 1;
    height: 5px;
    border-radius: 99px;
    background: rgba(196, 151, 42, 0.2);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    transition: height 0.2s;
}

.sp-progress-bar:hover {
    height: 7px;
}

.sp-progress-bar:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 4px;
}

.sp-progress-fill {
    width: 0%;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    position: relative;
    transition: width 0.05s linear;
}

.sp-progress-thumb {
    position: absolute;
    left: 0%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold-light);
    box-shadow: 0 0 10px rgba(224, 184, 74, 0.8), 0 0 0 3px rgba(196, 151, 42, 0.3);
    transition: transform 0.2s, left 0.05s linear;
}

.sp-progress-bar:hover .sp-progress-thumb {
    transform: translate(-50%, -50%) scale(1);
}

/* ── Controls (Skeuomorphic) ─────────────────────────────── */
.controls-row {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 20px;
}

.ctrl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-warm);
    transition: all 0.2s var(--ease-smooth);
    border-radius: 50%;
    flex-shrink: 0;
}

.ctrl-sm {
    width: 24px;
    height: 24px;
    opacity: 0.6;
}

.ctrl-sm svg {
    width: 100%;
    height: 100%;
}

.ctrl-sm:hover {
    opacity: 1;
    color: var(--gold-light);
    transform: scale(1.15);
}

.ctrl-sm.active {
    opacity: 1;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(196, 151, 42, 0.8);
}

.ctrl-play {
    width: 68px;
    height: 68px;
    background: linear-gradient(145deg, #e0b84a, #a67a1a);
    box-shadow:
        0 6px 12px rgba(0, 0, 0, 0.5),
        inset 0 4px 6px rgba(255, 255, 255, 0.4),
        inset 0 -4px 6px rgba(0, 0, 0, 0.3),
        0 0 0 2px #2a1a0a;
    color: #1a0e05;
    border: 1px solid #5a4010;
}

.ctrl-play svg {
    width: 42%;
    height: 42%;
}

.ctrl-play:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.6),
        0 0 15px rgba(224, 184, 74, 0.4),
        inset 0 4px 6px rgba(255, 255, 255, 0.5),
        inset 0 -4px 6px rgba(0, 0, 0, 0.2),
        0 0 0 2px #2a1a0a;
}

.ctrl-play:active {
    transform: translateY(2px);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.8),
        inset 0 4px 8px rgba(0, 0, 0, 0.5),
        0 0 0 2px #2a1a0a;
    background: linear-gradient(145deg, #c4972a, #8a6010);
}

/* ── Waveform ────────────────────────────────────────────── */
.waveform-wrap {
    width: min(500px, 90vw);
    height: 48px;
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
}

.waveform {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    opacity: 0.5;
}

.waveform.active {
    opacity: 0.8;
}

.wave-bar {
    width: 4px;
    min-height: 4px;
    max-height: 44px;
    border-radius: 2px 2px 0 0;
    background: linear-gradient(to top, rgba(196, 151, 42, 0.9), rgba(212, 168, 67, 0.1));
    transition: height 0.05s linear;
    flex-shrink: 0;
    will-change: height;
}

/* ── Decorative Elements ─────────────────────────────────── */
.deco {
    position: absolute;
    z-index: 6;
    font-family: var(--ff-body);
    font-size: 14px;
    line-height: 1.6;
}

.deco-postcard {
    bottom: 70px;
    left: 32px;
    background: rgba(245, 235, 210, 0.09);
    border: 1px solid rgba(196, 151, 42, 0.2);
    border-radius: 8px;
    padding: 16px 20px;
    max-width: 180px;
    color: var(--text-warm);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.postcard-stamp {
    font-size: 24px;
    margin-bottom: 6px;
    display: block;
    opacity: 0.7;
}

.deco-postcard strong {
    font-size: 13px;
    letter-spacing: 0.5px;
    color: var(--gold-light);
}

.deco-postcard p {
    margin-top: 8px;
    font-style: italic;
    color: var(--text-dim);
    font-size: 13px;
}

.deco-obs {
    bottom: 70px;
    right: 32px;
    max-width: 200px;
    background: rgba(245, 235, 210, 0.08);
    border: 1px solid rgba(196, 151, 42, 0.15);
    border-radius: 6px;
    padding: 16px 20px;
    color: var(--text-dim);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.obs-header {
    font-family: var(--ff-serif);
    font-size: 15px;
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.deco-obs p {
    font-style: italic;
    font-size: 13px;
    line-height: 1.65;
}

/* Floating quote */
.floating-quote {
    position: fixed;
    top: 32px;
    right: 32px;
    z-index: 20;
    font-family: var(--ff-body);
    font-style: italic;
    font-size: 13px;
    color: var(--text-faint);
    text-align: right;
    line-height: 1.7;
    pointer-events: none;
}


/* ══════════════════════════════════════════════════════════
   CASSETTE SHELF
══════════════════════════════════════════════════════════ */

/* Panel ─────────────────────────────────────────────────── */
.cassette-shelf {
    position: fixed;
    right: 0;
    top: 0;
    transform: translateX(100%);
    transition: transform 0.45s var(--ease-smooth);
    z-index: 20;
    width: 380px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;

    /* Dark walnut wood base */
    background:
        /* Fine vertical wood grain */
        repeating-linear-gradient(93deg,
            transparent 0px, transparent 6px,
            rgba(0, 0, 0, 0.06) 6px, rgba(0, 0, 0, 0.06) 7px),
        /* Horizontal shelf-plank lighting rhythm */
        repeating-linear-gradient(180deg,
            transparent 0px,
            transparent 148px,
            rgba(101, 60, 20, 0.22) 148px,
            rgba(60, 30, 8, 0.45) 152px,
            rgba(0, 0, 0, 0.18) 156px,
            transparent 160px),
        /* Base gradient */
        linear-gradient(170deg, #1e1007 0%, #150c05 60%, #0e0804 100%);

    border-left: 1px solid rgba(196, 151, 42, 0.22);
    box-shadow:
        -6px 0 32px rgba(0, 0, 0, 0.7),
        inset 1px 0 0 rgba(255, 255, 255, 0.03);
}

/* Warm top-light spilling onto the shelf */
.cassette-shelf::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 160% 30% at 50% 0%,
            rgba(196, 151, 42, 0.07) 0%,
            transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Header ─────────────────────────────────────────────────── */
.shelf-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 16px 14px;
    flex-shrink: 0;
    background: linear-gradient(180deg,
            rgba(40, 24, 8, 0.9) 0%,
            rgba(20, 12, 4, 0.6) 100%);
    border-bottom: 1px solid rgba(196, 151, 42, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.shelf-icon {
    font-size: 16px;
    line-height: 1;
}

.shelf-title {
    font-family: var(--ff-sans);
    font-size: 10px;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 500;
}

/* Scrollable list ──────────────────────────────────────── */
.shelf-list {
    position: relative;
    z-index: 2;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
    padding: 32px 24px 24px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: max-content;
    gap: 30px 24px;
    align-content: start;
    scrollbar-width: thin;
    scrollbar-color: rgba(196, 151, 42, 0.2) transparent;
}

.shelf-list::-webkit-scrollbar {
    width: 2px;
}

.shelf-list::-webkit-scrollbar-track {
    background: transparent;
}

.shelf-list::-webkit-scrollbar-thumb {
    background: rgba(196, 151, 42, 0.2);
    border-radius: 99px;
}

/* Shelf slot — one cassette + the plank it sits on ──────── */
.sc-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* ── Individual shelf cassette button ──────────────────── */
.shelf-cassette {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 100%;
    position: relative;
    /* Lift from plank on interact — transform applied to .sc-body */
}

/* ── Cassette body ─────────────────────────────────────── */
.sc-body {
    width: 100%;
    background: var(--c-body, #d4c9b0);
    border-radius: 10px 10px 6px 6px;
    padding: 7px 8px 5px;
    position: relative;
    overflow: hidden;
    /* Default: resting on the shelf */
    transform: translateY(0);
    transition:
        transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.28s var(--ease-smooth);
    box-shadow:
        0 4px 0 rgba(0, 0, 0, 0.5),
        /* edge thickness illusion */
        0 6px 18px rgba(0, 0, 0, 0.65),
        /* drop shadow on shelf */
        inset 0 2px 3px rgba(255, 255, 255, 0.45),
        inset 0 -2px 3px rgba(0, 0, 0, 0.35);
}

/* Top-sheen gloss */
.sc-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.22) 0%,
            rgba(255, 255, 255, 0.04) 100%);
    border-radius: 10px 10px 0 0;
    pointer-events: none;
    z-index: 3;
}

/* Right-edge bevel to simulate cassette thickness */
.sc-body::after {
    content: '';
    position: absolute;
    top: 4px;
    bottom: 4px;
    right: 0;
    width: 3px;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.35) 0%,
            rgba(0, 0, 0, 0.15) 100%);
    border-radius: 0 6px 6px 0;
    pointer-events: none;
}

/* Hover: lift partway off shelf */
.shelf-cassette:hover .sc-body {
    transform: translateY(-7px);
    box-shadow:
        0 10px 0 rgba(0, 0, 0, 0.4),
        0 14px 28px rgba(0, 0, 0, 0.7),
        inset 0 2px 3px rgba(255, 255, 255, 0.45),
        inset 0 -2px 3px rgba(0, 0, 0, 0.35);
}

/* Active: fully pulled out — glowing, higher */
.shelf-cassette--active .sc-body {
    transform: translateY(-13px);
    box-shadow:
        0 0 0 2px var(--c-accent, #c4972a),
        0 16px 0 rgba(0, 0, 0, 0.35),
        0 22px 38px rgba(0, 0, 0, 0.75),
        0 0 28px rgba(196, 151, 42, 0.22),
        inset 0 2px 3px rgba(255, 255, 255, 0.5),
        inset 0 -2px 3px rgba(0, 0, 0, 0.3);
}

/* ── Cassette Label ────────────────────────────────────── */
.sc-label {
    background: linear-gradient(160deg,
            rgba(255, 255, 255, 0.92) 0%,
            rgba(235, 225, 205, 0.78) 100%);
    border-radius: 5px 5px 3px 3px;
    padding: 4px 6px 3px;
    margin-bottom: 5px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    position: relative;
    z-index: 2;
}

/* Coloured top stripe on label */
.sc-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--c-accent, #c4972a);
    border-radius: 5px 5px 0 0;
}

.sc-label-top {
    font-family: var(--ff-sans);
    font-size: 5.5px;
    letter-spacing: 1.5px;
    color: #7a6a50;
    text-transform: uppercase;
    margin-bottom: 2px;
    margin-top: 5px;
    /* clear the colour stripe */
}

.sc-label-name {
    font-family: var(--ff-serif);
    font-style: italic;
    font-size: 10.5px;
    font-weight: 700;
    color: #1e1508;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    letter-spacing: 0.2px;
    line-height: 1.2;
    margin-bottom: 2px;
}

.sc-label-side {
    font-family: var(--ff-sans);
    font-size: 7px;
    font-weight: 800;
    color: var(--c-accent, #8a7a60);
    letter-spacing: 2px;
    display: block;
}

/* ── Reels row ─────────────────────────────────────────── */
.sc-reels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    gap: 4px;
    position: relative;
    z-index: 2;
}

.sc-reel-housing {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #2a1c12, #0e0804);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        inset 0 2px 6px rgba(0, 0, 0, 0.95),
        0 1px 0 rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.sc-reel {
    width: 80%;
    height: 80%;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #362516, #0e0804);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Spoke lines on reel */
.sc-reel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        repeating-conic-gradient(rgba(255, 255, 255, 0.05) 0deg 2deg,
            transparent 2deg 60deg);
}

/* Spinning reels on active playing cassette */
.shelf-cassette--active .sc-reel {
    animation: reelSpin 1.8s linear infinite;
    animation-play-state: paused;
}

.shelf-cassette--active.playing .sc-reel {
    animation-play-state: running;
}

.sc-reel-hole {
    width: 32%;
    height: 32%;
    border-radius: 50%;
    background: #060402;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.9);
    position: relative;
    z-index: 1;
}

.sc-tape-window {
    flex: 1;
    height: 11px;
    background: #070503;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sc-tape-inner {
    width: 75%;
    height: 3px;
    background: linear-gradient(90deg,
            #241508,
            #6b4a28 30%,
            #5a3e20 50%,
            #6b4a28 70%,
            #241508);
    border-radius: 1px;
    opacity: 0.85;
}

/* ── Cassette bottom edge (notches + holes) ────────────── */
.sc-bottom-edge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 4px;
    padding-bottom: 2px;
    position: relative;
    z-index: 2;
}

.sc-bottom-hole {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.28);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.55);
}

.sc-bottom-slot {
    flex: 1;
    max-width: 20px;
    height: 4px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.18);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* ── Shelf plank below each cassette ───────────────────── */
.sc-plank {
    width: calc(100% + 16px);
    margin: 0 -8px;
    height: 14px;
    position: relative;
    flex-shrink: 0;
    /* Walnut wood plank */
    background: linear-gradient(180deg,
            #7a4e24 0%,
            #5c3915 40%,
            #3e2510 70%,
            #2a180a 100%);
    box-shadow:
        0 5px 14px rgba(0, 0, 0, 0.65),
        inset 0 1px 0 rgba(255, 200, 100, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5);
    border-radius: 0 0 2px 2px;
}

/* Wood grain on the plank */
.sc-plank::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: repeating-linear-gradient(90deg,
            transparent 0px,
            transparent 8px,
            rgba(0, 0, 0, 0.06) 8px,
            rgba(0, 0, 0, 0.06) 9px);
    pointer-events: none;
}

/* Plank front lip shadow */
.sc-plank::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, transparent 100%);
    pointer-events: none;
}

/* ── Name tag above cassette ───────────────────────────── */
.sc-name-tag {
    font-family: var(--ff-sans);
    font-size: 11px;
    color: var(--text-faint);
    letter-spacing: 1px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    padding: 4px 4px 6px;
    transition: color 0.2s, opacity 0.2s;
    text-transform: uppercase;
    opacity: 0.7;
}

@keyframes shake {

    0%,
    100% {
        transform: translateY(-13px) translateX(0);
    }

    25% {
        transform: translateY(-13px) translateX(-4px);
    }

    75% {
        transform: translateY(-13px) translateX(4px);
    }
}

.shelf-cassette--active.cooldown-shake .sc-body {
    animation: shake 0.3s ease;
}

.shelf-cassette--active .sc-name-tag,
.shelf-cassette:hover .sc-name-tag {
    color: var(--gold-light);
    opacity: 1;
}

.empty-cassette {
    width: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    outline: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.empty-cassette-body {
    width: 100%;
    height: 60px;
    border: 2px dashed rgba(196, 151, 42, 0.4);
    border-radius: 10px 10px 6px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.3s var(--ease-smooth);
    margin-bottom: 22px; 
}

.empty-cassette:hover .empty-cassette-body {
    border-color: var(--gold-light);
    background: rgba(196, 151, 42, 0.1);
    transform: translateY(-5px);
}

.empty-icon {
    font-size: 24px;
    color: rgba(196, 151, 42, 0.6);
    line-height: 1;
    margin-bottom: 4px;
}

.empty-cassette:hover .empty-icon {
    color: var(--gold-light);
}

.empty-text {
    font-family: var(--ff-sans);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(196, 151, 42, 0.6);
    text-align: center;
}

.empty-cassette:hover .empty-text {
    color: var(--gold-light);
}

/* ══════════════════════════════════════════════════════════
   NEW UI ELEMENTS (Button & Overlay)
══════════════════════════════════════════════════════════ */
#shelf-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s var(--ease-smooth);
    z-index: 15;
}

#shelf-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.cassette-shelf.open {
    transform: translateX(0);
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
    .floating-quote {
        display: none;
    }
}

@media (max-width: 900px) {

    .deco-postcard,
    .deco-obs {
        display: none;
    }
}

@media (max-width: 700px) {
    .cassette-shelf {
        width: 100%;
        height: auto;
        border-left: none;
        border-top: 1px solid rgba(196, 151, 42, 0.22);
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.6);
        top: auto;
        bottom: 0;
        transform: translateY(100%);
    }

    .cassette-shelf.open {
        transform: translateY(0);
    }

    .shelf-list {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 24px 20px 0;
        gap: 20px;
        align-items: flex-end;
    }

    .sc-slot {
        flex-shrink: 0;
        width: 130px;
        margin-bottom: 0;
        margin-right: 0;
        position: relative;
        z-index: 1;
        display: flex;
        flex-direction: column;
    }

    .sc-plank {
        display: block;
        width: calc(100% + 20px);
        margin: 0 -10px;
        height: 14px;
        border-radius: 0;
        /* Inherits gradient from desktop */
    }

    .scene-bg {
        background-image: url('/img/bg_same_platform_phone.png');
    }

    .np-title {
        font-size: 20px;
    }

    .ctrl-play {
        width: 56px;
        height: 56px;
    }

    .brand-logo {
        top: 20px;
        left: 20px;
        width: 56px;
        height: 56px;
    }

    .banner {
        top: 20px;
        right: 20px;
    }

    .banner-inner {
        height: 56px;
        border-radius: 28px;
        padding: 0 20px;
    }

    .banner-title {
        font-size: 14px;
        letter-spacing: 1px;
    }

    .banner-sub {
        font-size: 8px;
        letter-spacing: 2px;
        margin-bottom: 2px;
    }
}

@media (max-width: 400px) {
    .cassette {
        width: min(290px, 92vw);
    }

    .controls-row {
        gap: 16px;
    }

    .ctrl-play {
        width: 48px;
        height: 48px;
    }
}

/* ── Add Cassette UI ─────────────────────────────────────── */
.add-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(196, 151, 42, 0.15);
    color: var(--gold-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-smooth);
}
.add-btn:hover {
    background: rgba(196, 151, 42, 0.4);
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(196, 151, 42, 0.5);
}
.add-btn svg {
    width: 18px;
    height: 18px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 5, 2, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: all 0.4s ease;
}
.modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}
.modal-content {
    background: linear-gradient(145deg, #1f1610, #110b07);
    border: 1px solid rgba(196, 151, 42, 0.3);
    border-radius: 12px;
    width: min(400px, 90vw);
    padding: 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: translateY(0);
    transition: transform 0.4s var(--ease-smooth);
}
.modal-overlay.hidden .modal-content {
    transform: translateY(20px);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.modal-header h3 {
    font-family: var(--ff-serif);
    font-size: 20px;
    color: var(--gold-light);
    font-weight: 600;
    letter-spacing: 1px;
}
.close-btn {
    font-size: 28px;
    color: var(--text-dim);
    line-height: 1;
}
.close-btn:hover {
    color: var(--gold-light);
}

.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-family: var(--ff-sans);
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}
.form-group input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(196, 151, 42, 0.2);
    border-radius: 6px;
    padding: 12px 16px;
    color: var(--text-warm);
    font-family: var(--ff-sans);
    font-size: 14px;
    transition: all 0.3s ease;
}
.form-group input:focus {
    outline: none;
    border-color: var(--gold-light);
    box-shadow: 0 0 8px rgba(196, 151, 42, 0.3);
    background: rgba(0, 0, 0, 0.6);
}

.submit-btn {
    width: 100%;
    background: linear-gradient(145deg, #c4972a, #8a6010);
    color: #1a0e05;
    font-family: var(--ff-sans);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1px;
    padding: 14px;
    border-radius: 6px;
    margin-top: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.submit-btn:hover {
    background: linear-gradient(145deg, #e0b84a, #a67a1a);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(196, 151, 42, 0.3);
}

.form-error {
    color: #e63946;
    font-family: var(--ff-sans);
    font-size: 12px;
    margin-bottom: 12px;
    text-align: center;
}
.form-error.hidden {
    display: none;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(26, 14, 5, 0.3);
    border-top-color: #1a0e05;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.spinner.hidden {
    display: none;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Toast Notifications ─────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 11000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.vintage-toast {
    background: linear-gradient(145deg, #1f1610, #110b07);
    border: 1px solid rgba(196, 151, 42, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(196, 151, 42, 0.15);
    border-radius: 8px;
    padding: 14px 24px;
    color: var(--text-warm);
    font-family: var(--ff-sans);
    font-size: 13px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 90vw;
    pointer-events: auto;
    
    /* Animation start state */
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.vintage-toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.vintage-toast.fade-out {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
}

.toast-icon {
    font-size: 18px;
}

.toast-success .toast-icon {
    color: var(--gold-light);
    text-shadow: 0 0 8px rgba(196, 151, 42, 0.6);
}

.toast-error {
    border-color: #e63946;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(230, 57, 70, 0.15);
}

.toast-error .toast-icon {
    color: #e63946;
    text-shadow: 0 0 8px rgba(230, 57, 70, 0.6);
}

.toast-message {
    flex-grow: 1;
}