/* ============================================
   SONIC JOURNEYS - Award-Winning Interface
   Transcendent soundscapes with ancient frequencies
   ============================================ */

/* Full-bleed: html background must match body so the 1px header margin in
   design-system.css doesn't reveal a contrast frame around the viewport.
   Without this you get a perceived "white frame" effect at the edges. */
html {
    background: #0d1220;
}
/* ==========================================
   STARFIELD — three GPU-accelerated layers
   Far/mid stars are tiled radial-gradient backgrounds animated via
   single transform translate3d. Near stars are 12 individual elements
   with per-element twinkle. Total: 3 fixed layers + 12 absolute spans.
   Pauses when document.hidden, when fullscreen playback active, or
   when prefers-reduced-motion. Sits behind everything (z-index -1).
   ========================================== */
.sj-starfield {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}
.sj-starfield-layer {
    position: absolute;
    inset: -10%;
    background-repeat: repeat;
    will-change: transform;
    transform: translate3d(0,0,0);
}
/* Far layer — tiny pinprick stars, slow drift */
.sj-starfield-far {
    background-image:
        radial-gradient(0.5px 0.5px at 13% 17%, rgba(255,255,255,0.85), transparent),
        radial-gradient(0.5px 0.5px at 41% 9%, rgba(220,230,255,0.7), transparent),
        radial-gradient(0.5px 0.5px at 67% 23%, rgba(255,250,230,0.75), transparent),
        radial-gradient(0.5px 0.5px at 89% 41%, rgba(255,255,255,0.65), transparent),
        radial-gradient(0.5px 0.5px at 7% 53%, rgba(220,225,255,0.6), transparent),
        radial-gradient(0.5px 0.5px at 24% 71%, rgba(255,240,220,0.7), transparent),
        radial-gradient(0.5px 0.5px at 53% 87%, rgba(255,255,255,0.55), transparent),
        radial-gradient(0.5px 0.5px at 79% 63%, rgba(230,235,255,0.7), transparent),
        radial-gradient(0.5px 0.5px at 19% 29%, rgba(255,255,255,0.5), transparent),
        radial-gradient(0.5px 0.5px at 33% 47%, rgba(255,250,235,0.55), transparent),
        radial-gradient(0.5px 0.5px at 59% 11%, rgba(255,255,255,0.5), transparent),
        radial-gradient(0.5px 0.5px at 71% 79%, rgba(220,230,255,0.55), transparent),
        radial-gradient(0.5px 0.5px at 43% 33%, rgba(255,255,255,0.45), transparent),
        radial-gradient(0.5px 0.5px at 91% 81%, rgba(255,245,225,0.55), transparent),
        radial-gradient(0.5px 0.5px at 3% 91%, rgba(255,255,255,0.5), transparent),
        radial-gradient(0.5px 0.5px at 27% 5%, rgba(220,235,255,0.6), transparent);
    background-size: 380px 380px;
    animation: sj-stars-drift-far 240s linear infinite;
    opacity: 0.85;
}
/* Mid layer — slightly larger stars, faster drift */
.sj-starfield-mid {
    background-image:
        radial-gradient(0.8px 0.8px at 21% 8%, rgba(255,255,255,0.95), transparent 60%),
        radial-gradient(0.8px 0.8px at 73% 31%, rgba(255,235,200,0.9), transparent 60%),
        radial-gradient(0.7px 0.7px at 47% 53%, rgba(220,230,255,0.85), transparent 60%),
        radial-gradient(0.8px 0.8px at 11% 79%, rgba(255,255,255,0.85), transparent 60%),
        radial-gradient(0.8px 0.8px at 89% 67%, rgba(255,250,230,0.9), transparent 60%),
        radial-gradient(0.7px 0.7px at 31% 27%, rgba(255,255,255,0.8), transparent 60%),
        radial-gradient(0.8px 0.8px at 59% 91%, rgba(220,225,255,0.85), transparent 60%),
        radial-gradient(0.8px 0.8px at 83% 17%, rgba(255,255,255,0.7), transparent 60%);
    background-size: 280px 280px;
    animation: sj-stars-drift-mid 140s linear infinite;
    opacity: 0.9;
}
@keyframes sj-stars-drift-far {
    0%   { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-380px, -190px, 0); }
}
@keyframes sj-stars-drift-mid {
    0%   { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-280px, 280px, 0); }
}

/* Near layer — 12 individually-twinkling brighter stars */
.sj-starfield-near {
    position: absolute;
    inset: 0;
}
.sj-star-near {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.7);
    will-change: opacity, transform;
    animation: sj-star-twinkle 4s ease-in-out infinite;
}
@keyframes sj-star-twinkle {
    0%, 100% { opacity: 0.4; transform: scale(0.8); }
    50%      { opacity: 1; transform: scale(1.3); }
}
/* 12 near stars at hand-picked positions, each with different timing */
.sj-star-near:nth-child(1)  { top: 8%;  left: 14%; animation-duration: 3.2s; animation-delay: 0s; }
.sj-star-near:nth-child(2)  { top: 22%; left: 73%; animation-duration: 4.7s; animation-delay: 0.6s; background: #fff5e0; box-shadow: 0 0 6px rgba(255, 235, 180, 0.85); }
.sj-star-near:nth-child(3)  { top: 41%; left: 28%; animation-duration: 5.3s; animation-delay: 1.2s; }
.sj-star-near:nth-child(4)  { top: 17%; left: 91%; animation-duration: 3.8s; animation-delay: 1.8s; }
.sj-star-near:nth-child(5)  { top: 64%; left: 6%;  animation-duration: 4.4s; animation-delay: 0.3s; background: #e0e8ff; box-shadow: 0 0 6px rgba(200, 215, 255, 0.85); }
.sj-star-near:nth-child(6)  { top: 79%; left: 47%; animation-duration: 5.1s; animation-delay: 2.4s; }
.sj-star-near:nth-child(7)  { top: 53%; left: 82%; animation-duration: 3.6s; animation-delay: 0.9s; }
.sj-star-near:nth-child(8)  { top: 88%; left: 23%; animation-duration: 4.2s; animation-delay: 1.5s; }
.sj-star-near:nth-child(9)  { top: 33%; left: 56%; animation-duration: 5.7s; animation-delay: 2.1s; background: #fff5e0; box-shadow: 0 0 6px rgba(255, 230, 175, 0.85); }
.sj-star-near:nth-child(10) { top: 71%; left: 67%; animation-duration: 4.0s; animation-delay: 0s; }
.sj-star-near:nth-child(11) { top: 12%; left: 38%; animation-duration: 3.4s; animation-delay: 1.0s; }
.sj-star-near:nth-child(12) { top: 47%; left: 11%; animation-duration: 5.5s; animation-delay: 0.4s; }

/* Pause animations when fullscreen playback is active so the cymatic stays
   visually focal, and respect reduced-motion preferences. */
body.sj-playback-active .sj-starfield-far,
body.sj-playback-active .sj-starfield-mid,
body.sj-playback-active .sj-star-near {
    animation-play-state: paused;
}
body.sj-playback-active .sj-starfield {
    opacity: 0;
    transition: opacity 0.4s ease;
}
@media (prefers-reduced-motion: reduce) {
    .sj-starfield-far, .sj-starfield-mid, .sj-star-near {
        animation: none;
    }
}

/* ==========================================
   AURORA CURTAIN — real OVATION-driven canvas overlay.
   Sits above the starfield, below all content. Slow horizontal drift
   + breath opacity LFO via CSS so the curtain feels alive without
   per-frame canvas redraws (canvas only repaints on data fetch + resize).
   ========================================== */
.sj-aurora-curtain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;  /* above starfield (-1), below page content (anything not absolutely positioned) */
    will-change: transform, opacity;
    /* FAR depth — slowest harmonic of the 12s page heartbeat (4×). Drift is
       horizontal (the auroral current); breath is the vertical secondary. */
    animation: sj-aurora-breath 24s ease-in-out infinite;
    mix-blend-mode: screen;
}
@keyframes sj-aurora-breath {
    0%, 100% { opacity: 0.85; transform: translate3d(0, 0, 0); }
    50%      { opacity: 1.0;  transform: translate3d(-2%, 0.5%, 0); }
}
/* During fullscreen playback the curtain hides — the cymatic is the focal point */
body.sj-playback-active .sj-aurora-curtain {
    opacity: 0;
    transition: opacity 0.5s ease;
    animation-play-state: paused;
}
/* Tier-aware extra mood — storm gets a slow violet halo behind it */
.sj-aurora-curtain[data-kp-tier="storm"] {
    filter: hue-rotate(-8deg) saturate(1.15);
}
@media (prefers-reduced-motion: reduce) {
    .sj-aurora-curtain { animation: none; }
}

/* No panel background — the body owns the atmosphere via .magna-theme::before
   below. Eliminating the .sonic-journeys background entirely means there is no
   rectangular element to leave a visible edge. */
.sonic-journeys {
    min-height: 100%;
    background: transparent;
    padding: 24px;
    position: relative;
    overflow: visible;
    border: none;
    box-shadow: none;
}

/* Morphing aurora field — drifting color blobs.
   Fixed to viewport, sits above body's dark gradient bg, tints page content
   above it via screen blend mode. */
#sj-aurora {
    position: fixed;
    /* Extend past viewport edges so the blur halo falls off OUTSIDE the visible
       area. iOS Safari clips filter:blur() at element boundaries, which leaves
       a hard sharp top edge when inset is exactly 0. -15% inset moves that
       clipped edge out of sight. */
    inset: -15vh -15vw;
    pointer-events: none;
    /* COLOR FLOOR. z:0 puts it BELOW the cards/content (which paint later in DOM
       order) so it stops washing the glass — it was at z:2, screen-blending over
       the cards, the muddy haze. Now it's the saturated body of the sky the faint
       OVATION oval rides on. Vertical bands (tall, narrow ellipses) = curtain form;
       a single horizontal drift = the shared aurora current. */
    z-index: 0;
    background:
        radial-gradient(ellipse 26% 70% at 20% 30%, rgba(140, 70, 240, 0.50) 0%, transparent 60%),
        radial-gradient(ellipse 24% 66% at 80% 26%, rgba(240, 90, 200, 0.42) 0%, transparent 60%),
        radial-gradient(ellipse 30% 72% at 16% 80%, rgba(40, 200, 220, 0.38) 0%, transparent 60%),
        radial-gradient(ellipse 28% 68% at 78% 84%, rgba(70, 150, 255, 0.40) 0%, transparent 60%),
        radial-gradient(ellipse 34% 82% at 50% 52%, rgba(200, 90, 240, 0.22) 0%, transparent 64%);
    filter: blur(80px) saturate(1.4);
    -webkit-filter: blur(80px) saturate(1.4);
    /* MID depth — same slow horizontal current as the backdrop (48s ≈ 4× the 12s
       heartbeat). No more omnidirectional scale/drift fighting the canvas. */
    animation: sj-aurora-drift 48s ease-in-out infinite;
    will-change: transform;
    transform: translateZ(0);
    mix-blend-mode: screen;
    contain: layout paint;
    /* The sky leans toward the card you touch — set on hover by journeys-aurora-bg.js */
    transition: filter 1.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
body[data-sky-tilt="1"] #sj-aurora {
    filter: blur(80px) saturate(1.4) hue-rotate(var(--sky-hue, 0deg));
    -webkit-filter: blur(80px) saturate(1.4) hue-rotate(var(--sky-hue, 0deg));
}
/* iOS Safari struggles with large blur radii combined with mix-blend-mode on a
   fixed-positioned canvas sibling. Ease the load: smaller blur, no mix-blend.
   Still soft and atmospheric, but no hard top-edge line. */
@supports (-webkit-touch-callout: none) {
    #sj-aurora {
        filter: blur(48px) saturate(1.2);
        -webkit-filter: blur(48px) saturate(1.2);
        mix-blend-mode: normal;
        opacity: 0.55;
    }
    .sj-aurora-curtain {
        mix-blend-mode: normal;
        opacity: 0.85;
    }
}
@keyframes sj-aurora-drift {
    /* Horizontal current only — the sky slides, it does not pulse or zoom. */
    0%, 100% { transform: translate3d(0, 0, 0); }
    50%      { transform: translate3d(-3%, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
    #sj-aurora { animation: none; }
}

/* Ambient particle dots — CSS-only background effect */
.sonic-journeys::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 10% 15%, rgba(168, 85, 247, 0.4), transparent),
        radial-gradient(1px 1px at 30% 25%, rgba(232, 121, 249, 0.3), transparent),
        radial-gradient(1px 1px at 50% 10%, rgba(0, 255, 136, 0.25), transparent),
        radial-gradient(1px 1px at 70% 20%, rgba(34, 211, 238, 0.3), transparent),
        radial-gradient(1px 1px at 85% 30%, rgba(255, 170, 0, 0.25), transparent),
        radial-gradient(1px 1px at 15% 40%, rgba(168, 85, 247, 0.2), transparent),
        radial-gradient(1px 1px at 40% 50%, rgba(232, 121, 249, 0.2), transparent),
        radial-gradient(1px 1px at 60% 45%, rgba(0, 255, 136, 0.2), transparent),
        radial-gradient(1px 1px at 90% 55%, rgba(34, 211, 238, 0.2), transparent),
        radial-gradient(1px 1px at 25% 60%, rgba(255, 170, 0, 0.2), transparent);
    background-size: 200px 200px;
    animation: sj-ambient-drift 30s linear infinite;
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
}

@keyframes sj-ambient-drift {
    0% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-30px) translateX(15px); }
    100% { transform: translateY(0) translateX(0); }
}

/* ==========================================
   JOURNEY SELECTION VIEW
   ========================================== */

.soundscape-selection {
    max-width: none;
    margin: 0;
}

.soundscape-selection.hidden {
    display: none;
}

/* ==========================================
   UNIFIED HERO STACK
   Page header + Aurora hero card form one cohesive zone.
   Subtle ambient motion only — no audio-reactive previews on the
   index. Live Kp readout in the header itself.
   ========================================== */

.journeys-header {
    text-align: center;
    margin-bottom: 12px;
    padding: 14px 16px 12px;
    position: relative;
    z-index: 1;
    border-bottom: none;
    overflow: visible;
}

/* Three drifting orbs that breathe behind the title — restrained, slow */
.journeys-header::before {
    content: '';
    position: absolute;
    inset: -20px 0 0;
    background:
        radial-gradient(ellipse 720px 360px at 50% 30%, rgba(40, 100, 200, 0.10), transparent 60%),
        radial-gradient(ellipse 480px 280px at 25% 65%, rgba(212, 175, 55, 0.06), transparent 60%),
        radial-gradient(ellipse 480px 280px at 75% 55%, rgba(160, 80, 220, 0.06), transparent 60%);
    border-radius: 16px;
    z-index: -1;
    animation: sj-hero-drift 28s ease-in-out infinite;
    pointer-events: none;
}
@keyframes sj-hero-drift {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.85; }
    33%      { transform: translate3d(-1.5%, 1%, 0) scale(1.04); opacity: 1; }
    66%      { transform: translate3d(2%, -1%, 0) scale(0.98); opacity: 0.9; }
}
@media (prefers-reduced-motion: reduce) {
    .journeys-header::before { animation: none; }
}

.sj-hero-eyebrow {
    position: relative;
    z-index: 1;
    font-family: 'Space Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: rgba(184, 192, 216, 0.55);
    margin: 0 0 0.3rem;
}

.journeys-header h2 {
    font-size: 2.2rem;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    color: #f5e6c4;
    margin-bottom: 6px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    text-shadow: 0 2px 30px rgba(212, 175, 55, 0.18);
}

.journeys-subtitle {
    color: rgba(237, 230, 214, 0.62);
    font-size: 0.92rem;
    font-style: italic;
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 0.04em;
    max-width: 620px;
    margin: 0 auto 10px;
    line-height: 1.35;
}
.journeys-subtitle-link {
    display: inline-block;
    margin-left: 6px;
    color: rgba(245, 217, 119, 0.78);
    font-style: normal;
    font-family: 'Cinzel', serif;
    font-size: 0.78em;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    border-bottom: 0.5px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 1px;
    transition: color 0.3s ease, border-color 0.3s ease;
}
.journeys-subtitle-link:hover {
    color: #fff8e0;
    border-bottom-color: rgba(245, 217, 119, 0.7);
}

/* Big live Kp readout — the platform's pulse, in the header itself */
.sj-hero-pulse {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    padding: 9px 18px 8px;
    margin: 0 auto 20px;
    background: rgba(4, 6, 12, 0.55);
    border: 0.5px solid rgba(212, 175, 55, 0.28);
    border-radius: 999px;
    backdrop-filter: blur(10px) saturate(1.1);
    -webkit-backdrop-filter: blur(10px) saturate(1.1);
    box-shadow: 0 0 0 0.5px rgba(212, 175, 55, 0.12) inset;
    transition: all 0.4s ease;
}
.sj-hero-pulse-label {
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(237, 230, 214, 0.42);
}
.sj-hero-pulse-value {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    letter-spacing: 0.10em;
    color: #f5d977;
    font-weight: 500;
}
.sj-hero-pulse-state {
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: rgba(245, 217, 119, 0.7);
    padding-left: 8px;
    border-left: 0.5px solid rgba(212, 175, 55, 0.20);
}
.sj-hero-pulse[data-state="loading"] .sj-hero-pulse-value { color: rgba(237, 230, 214, 0.4); }
.sj-hero-pulse[data-state="loading"] .sj-hero-pulse-state { color: rgba(237, 230, 214, 0.32); }
.sj-hero-pulse[data-state="quiet"] { border-color: rgba(120, 200, 160, 0.32); }
.sj-hero-pulse[data-state="quiet"] .sj-hero-pulse-value { color: #b8e8c8; }
.sj-hero-pulse[data-state="quiet"] .sj-hero-pulse-state { color: rgba(184, 232, 200, 0.72); }
.sj-hero-pulse[data-state="active"] { border-color: rgba(255, 165, 100, 0.42); }
.sj-hero-pulse[data-state="active"] .sj-hero-pulse-value { color: #ffc89a; }
.sj-hero-pulse[data-state="active"] .sj-hero-pulse-state { color: rgba(255, 200, 154, 0.78); }
.sj-hero-pulse[data-state="storm"] { border-color: rgba(255, 110, 110, 0.5); animation: sj-hero-pulse-storm 2.4s ease-in-out infinite; }
.sj-hero-pulse[data-state="storm"] .sj-hero-pulse-value { color: #ff8a8a; }
.sj-hero-pulse[data-state="storm"] .sj-hero-pulse-state { color: rgba(255, 138, 138, 0.85); }
@keyframes sj-hero-pulse-storm {
    0%, 100% { box-shadow: 0 0 0 0.5px rgba(255, 110, 110, 0.18) inset, 0 0 12px rgba(255, 110, 110, 0.10); }
    50%      { box-shadow: 0 0 0 0.5px rgba(255, 110, 110, 0.32) inset, 0 0 24px rgba(255, 110, 110, 0.20); }
}
@media (max-width: 640px) {
    .journeys-header h2 { font-size: 2.4rem; letter-spacing: 0.22em; }
    .journeys-subtitle { font-size: 0.95rem; padding: 0 16px; }
    .sj-hero-pulse-value { font-size: 15px; }
    .sj-hero-pulse-label, .sj-hero-pulse-state { font-size: 8px; }
}

/* Category filter bar */
.sj-categories {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 16px;
    margin-top: 20px;
}
.sj-cat {
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    background: transparent;
    color: rgba(255,255,255,0.45);
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}
.sj-cat:hover {
    border-color: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
}
.sj-cat.active {
    border-color: #00ff88;
    color: #00ff88;
    background: rgba(0,255,136,0.06);
}

/* Journey Cards Grid */
.journeys-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    padding: 0 16px 24px;
    max-width: 960px;
    margin: 0 auto;
}
@media (max-width: 640px) {
    .journeys-grid {
        grid-template-columns: 1fr;
        padding: 0 12px 20px;
    }
}

/* Hero card — Aurora gets a doubled-width slot at the top of the grid.
   The card visually continues the page header's atmosphere — same drifting
   orbs at lower opacity, gold rim, and the description is allowed to
   breathe at full width without clipping. */
.soundscape-card--hero {
    grid-column: span 2;
    border: 1px solid rgba(212, 175, 55, 0.36);
    background:
        radial-gradient(ellipse 75% 55% at 25% 15%, rgba(40, 100, 200, 0.22), transparent 60%),
        radial-gradient(ellipse 55% 45% at 80% 75%, rgba(160, 80, 220, 0.16), transparent 60%),
        radial-gradient(ellipse 40% 80% at 100% 50%, rgba(212, 175, 55, 0.06), transparent 55%),
        rgba(8, 12, 24, 0.82);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.05) inset,
        0 0 0 0.5px rgba(212, 175, 55, 0.18) inset,
        0 6px 36px rgba(0, 0, 0, 0.40),
        0 0 48px rgba(40, 100, 200, 0.14);
    overflow: hidden;
    position: relative;
}
/* Subtle drifting wash inside the hero card — same animation as the page
   header so the two zones read as one continuous atmosphere */
.soundscape-card--hero::after {
    content: '';
    position: absolute;
    inset: -10%;
    background:
        radial-gradient(ellipse 60% 80% at 30% 30%, rgba(40, 100, 200, 0.10), transparent 55%),
        radial-gradient(ellipse 50% 60% at 75% 70%, rgba(160, 80, 220, 0.08), transparent 55%);
    z-index: 0;
    pointer-events: none;
    animation: sj-hero-drift 28s ease-in-out infinite reverse;
}
.soundscape-card--hero .soundscape-card-content {
    position: relative;
    z-index: 1;
    padding: 28px 32px 24px;
}
.soundscape-card--hero::before {
    background: linear-gradient(
        180deg,
        rgba(212, 175, 55, 0.85) 0%,
        rgba(212, 175, 55, 0.3) 50%,
        transparent 100%);
    width: 3px;
    z-index: 2;
}
.soundscape-card--hero .soundscape-name {
    font-size: 1.65rem;
    letter-spacing: 0.18em;
}
.soundscape-card--hero .soundscape-subtitle {
    color: rgba(237, 230, 214, 0.65);
    font-style: italic;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.05rem;
    margin-bottom: 10px;
    font-weight: 400;
}
.soundscape-card--hero .soundscape-description {
    font-size: 0.98rem;
    line-height: 1.68;
    max-width: none;
    color: rgba(237, 230, 214, 0.78);
    padding-right: 0;
    overflow: visible;
    text-overflow: clip;
    -webkit-line-clamp: unset;
    display: block;
}
@media (max-width: 640px) {
    .soundscape-card--hero { grid-column: span 1; }
    .soundscape-card--hero .soundscape-name { font-size: 1.35rem; letter-spacing: 0.14em; }
    .soundscape-card--hero .soundscape-card-content { padding: 22px 22px 20px; }
    .soundscape-card--hero .soundscape-description { font-size: 0.92rem; }
}

/* Featured cards (rows 1-2) get a slightly warmer rim than the rest.
   Subtle: 0.10 vs 0.045 border alpha. */
.soundscape-card--featured:not(.soundscape-card--hero) {
    border: 1px solid rgba(212, 175, 55, 0.10);
}

/* Live NOAA Kp badge — top-right corner of the Aurora hero card.
   States: loading (dim), quiet (steady gold), unsettled (gold), active
   (warm amber pulse), storm (warm red pulse). offline = LIVE FEED label. */
.sj-live-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px 5px 9px;
    background: rgba(4, 6, 12, 0.55);
    border: 0.5px solid rgba(212, 175, 55, 0.32);
    border-radius: 999px;
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(237, 230, 214, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 4;
    pointer-events: none;
    box-shadow: 0 0 0 0.5px rgba(212, 175, 55, 0.18) inset;
}
.sj-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.5);
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.4);
    flex-shrink: 0;
}
/* The signal a live soundscape rides, named on the badge (e.g. "the ISS overhead"). */
.sj-live-src {
    padding-left: 7px;
    margin-left: 1px;
    border-left: 0.5px solid rgba(212, 175, 55, 0.28);
    color: rgba(237, 230, 214, 0.5);
    letter-spacing: 0.1em;
    text-transform: none;
}
/* Back-face "Rides …" line — reuses .sj-freq-sig; tint the source marker warm. */
.sj-source-sig .sj-freq-ico { color: rgba(212, 175, 55, 0.6); }
.sj-live-badge[data-state="loading"] .sj-live-dot {
    background: rgba(160, 170, 190, 0.4);
    box-shadow: none;
    animation: sj-live-pulse-loading 1.6s ease-in-out infinite;
}
.sj-live-badge[data-state="quiet"] .sj-live-dot { background: rgba(120, 200, 160, 0.85); box-shadow: 0 0 8px rgba(120, 200, 160, 0.6); }
.sj-live-badge[data-state="unsettled"] .sj-live-dot { background: rgba(212, 175, 55, 0.85); box-shadow: 0 0 8px rgba(212, 175, 55, 0.6); }
.sj-live-badge[data-state="active"] .sj-live-dot { background: rgba(255, 165, 100, 0.95); box-shadow: 0 0 10px rgba(255, 165, 100, 0.7); animation: sj-live-pulse-active 2.2s ease-in-out infinite; }
.sj-live-badge[data-state="storm"] .sj-live-dot { background: rgba(255, 110, 110, 0.95); box-shadow: 0 0 12px rgba(255, 80, 80, 0.8); animation: sj-live-pulse-active 1.4s ease-in-out infinite; }
.sj-live-badge[data-state="storm"] { border-color: rgba(255, 110, 110, 0.45); color: rgba(255, 200, 200, 0.85); }
.sj-live-badge[data-state="active"] { color: rgba(255, 220, 190, 0.85); }
@keyframes sj-live-pulse-loading {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}
@keyframes sj-live-pulse-active {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.35); }
}
@media (max-width: 640px) {
    .sj-live-badge { top: 12px; right: 12px; padding: 4px 8px; font-size: 8px; }
}

/* LIVE pill for non-hero reactive journeys — same shape as .sj-live-badge but
   without the hero-aurora dynamic states. Sits in the same top-right corner. */
.soundscape-card:not(.soundscape-card--hero) .sj-live-badge {
    top: 14px;
    right: 14px;
    padding: 4px 9px;
    font-size: 8.5px;
    letter-spacing: 0.16em;
    border-color: rgba(212, 175, 55, 0.28);
    color: rgba(237, 230, 214, 0.72);
}

/* LOCAL pill — quieter than LIVE. For clock-driven journeys (moon, time-of-day,
   sky overhead) that adapt to your local context but don't hit a feed. */
.sj-local-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    background: rgba(4, 6, 12, 0.45);
    border: 0.5px solid rgba(160, 170, 190, 0.18);
    border-radius: 999px;
    font-family: 'Space Mono', monospace;
    font-size: 8.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(200, 210, 220, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 4;
    pointer-events: none;
}
@media (max-width: 640px) {
    .sj-local-badge { top: 12px; right: 12px; padding: 3px 7px; font-size: 7.5px; }
}

/* Sofia personalized welcome pill — standalone band above the journeys grid.
   Only visible for signed-in users (data-state ≠ hidden). Click to play
   Sofia's 30-45s contextual welcome (Kp + last journey + name). */
.sj-sofia-band {
    display: flex;
    justify-content: center;
    margin: 8px 0 24px;
}
.sj-sofia-pill {
    position: relative;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 10px;
    background: rgba(4, 6, 12, 0.55);
    border: 0.5px solid rgba(212, 175, 55, 0.36);
    border-radius: 999px;
    color: rgba(245, 230, 196, 0.85);
    font-family: 'Cinzel', serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    backdrop-filter: blur(10px) saturate(1.15);
    -webkit-backdrop-filter: blur(10px) saturate(1.15);
    box-shadow:
        0 0 0 0.5px rgba(212, 175, 55, 0.16) inset,
        0 2px 12px rgba(0, 0, 0, 0.35);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 4;
    line-height: 1;
}
.sj-sofia-pill[data-state="idle"],
.sj-sofia-pill[data-state="loading"],
.sj-sofia-pill[data-state="playing"] {
    display: inline-flex;
}
.sj-sofia-pill[data-state="hidden"] {
    display: none;
}
.sj-sofia-pill:hover {
    border-color: rgba(212, 175, 55, 0.65);
    color: #fff8e0;
    transform: translateY(-1px);
    box-shadow:
        0 0 0 0.5px rgba(212, 175, 55, 0.24) inset,
        0 4px 18px rgba(212, 175, 55, 0.14);
}
.sj-sofia-pill:active { transform: translateY(0); }

.sj-sofia-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(245, 217, 119, 0.85);
    box-shadow: 0 0 8px rgba(245, 217, 119, 0.6);
    flex-shrink: 0;
}
.sj-sofia-label {
    font-family: 'Cinzel', serif;
    color: rgba(245, 217, 119, 0.95);
    font-size: 10px;
    letter-spacing: 0.18em;
    padding-right: 7px;
    border-right: 0.5px solid rgba(212, 175, 55, 0.22);
}
.sj-sofia-text {
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(237, 230, 214, 0.62);
}

/* Loading: dot pulses */
.sj-sofia-pill[data-state="loading"] .sj-sofia-dot {
    animation: sj-sofia-loading 1.4s ease-in-out infinite;
}
@keyframes sj-sofia-loading {
    0%, 100% { opacity: 0.4; box-shadow: 0 0 4px rgba(245, 217, 119, 0.3); }
    50%      { opacity: 1; box-shadow: 0 0 14px rgba(245, 217, 119, 0.85); }
}

/* Playing: stronger glow, slow breathing */
.sj-sofia-pill[data-state="playing"] {
    border-color: rgba(245, 217, 119, 0.55);
    box-shadow:
        0 0 0 0.5px rgba(245, 217, 119, 0.3) inset,
        0 4px 24px rgba(245, 217, 119, 0.18);
}
.sj-sofia-pill[data-state="playing"] .sj-sofia-dot {
    animation: sj-sofia-playing 2.6s ease-in-out infinite;
}
@keyframes sj-sofia-playing {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.4); box-shadow: 0 0 14px rgba(245, 217, 119, 0.9); }
}

@media (max-width: 640px) {
    .sj-sofia-pill {
        padding: 5px 10px 5px 9px;
        font-size: 9px;
    }
    .sj-sofia-label, .sj-sofia-text { font-size: 8px; }
    .sj-sofia-band { margin: 4px 0 16px; }
}

/* Sofia auto-greeting overlay — once-per-session hotel-doorman moment.
   Soft tap-to-begin gesture (browsers won't autoplay audio without one).
   Restrained luxe: clip-path geometric card, single gold-rim button. */
.sj-sofia-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at 30% 30%, rgba(246, 217, 119, 0.10), transparent 60%),
        radial-gradient(ellipse at 70% 70%, rgba(180, 200, 255, 0.08), transparent 65%),
        rgba(20, 22, 38, 0.32);
    backdrop-filter: blur(22px) saturate(1.3) brightness(1.05);
    -webkit-backdrop-filter: blur(22px) saturate(1.3) brightness(1.05);
    opacity: 0;
    transition: opacity 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
    padding: 24px;
}
.sj-sofia-overlay--in { opacity: 1; }

.sj-sofia-overlay-card {
    max-width: 440px;
    width: 100%;
    padding: 44px 36px 32px;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(255, 248, 230, 0.08), rgba(255, 245, 220, 0.04)),
        rgba(28, 32, 52, 0.32);
    border: 1px solid rgba(255, 248, 230, 0.22);
    backdrop-filter: blur(28px) saturate(1.2);
    -webkit-backdrop-filter: blur(28px) saturate(1.2);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        0 12px 60px rgba(120, 100, 60, 0.18);
    border-radius: 22px;
    transform: translateY(8px);
    transition: transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sj-sofia-overlay--in .sj-sofia-overlay-card {
    transform: translateY(0);
}

.sj-sofia-overlay-eyebrow {
    font-family: 'Cinzel', serif;
    font-size: 10px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(255, 230, 160, 0.95);
    margin-bottom: 14px;
}
.sj-sofia-overlay-title {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: #fff8e0;
    margin-bottom: 10px;
    text-shadow: 0 1px 24px rgba(255, 240, 200, 0.18);
}
.sj-sofia-overlay-sub {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    font-style: italic;
    line-height: 1.55;
    color: rgba(255, 250, 235, 0.82);
    margin: 0 auto 26px;
    max-width: 320px;
}
.sj-sofia-overlay-begin {
    display: inline-block;
    width: 200px;
    padding: 11px 0;
    background: linear-gradient(180deg, rgba(246, 217, 119, 0.18), rgba(212, 175, 55, 0.08));
    border: 1px solid rgba(246, 217, 119, 0.7);
    color: #fff8e0;
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 999px;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    margin-bottom: 12px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 4px 18px rgba(212, 175, 55, 0.18);
}
.sj-sofia-overlay-begin:hover {
    background: rgba(212, 175, 55, 0.18);
    border-color: rgba(255, 215, 130, 0.85);
    color: #fff8e0;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(212, 175, 55, 0.18);
}
.sj-sofia-overlay-begin:active { transform: translateY(0); }
.sj-sofia-overlay-skip {
    display: block;
    margin: 0 auto;
    padding: 6px 14px;
    background: none;
    border: none;
    color: rgba(237, 230, 214, 0.4);
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s ease;
}
.sj-sofia-overlay-skip:hover { color: rgba(237, 230, 214, 0.7); }
@media (max-width: 640px) {
    .sj-sofia-overlay-card { padding: 36px 24px 28px; }
    .sj-sofia-overlay-title { font-size: 18px; }
    .sj-sofia-overlay-sub { font-size: 13px; }
    .sj-sofia-overlay-begin { width: 220px; }
}

/* ==========================================
   JOURNEY CARD — quieted, dignified, gold-and-cyan disciplined system
   Replaces the 8-color crayon-box rails with a single restrained accent.
   ========================================== */

:root {
    --sj-gold: #d4af37;
    --sj-gold-soft: rgba(212, 175, 55, 0.7);
    --sj-gold-faint: rgba(212, 175, 55, 0.18);
    --sj-text: #e8e4dc;
    --sj-text-dim: rgba(232, 228, 220, 0.55);
    --sj-text-mute: rgba(232, 228, 220, 0.32);
}

.soundscape-card {
    position: relative;
    border: 1px solid rgba(255,255,255,0.045);
    border-radius: 16px;
    background: rgba(14, 16, 26, 0.66);
    backdrop-filter: blur(12px) saturate(1.05);
    -webkit-backdrop-filter: blur(12px) saturate(1.05);
    cursor: pointer;
    transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
                border-color 0.45s ease,
                background 0.45s ease;
    overflow: hidden;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.035) inset,
        0 2px 24px rgba(0,0,0,0.22),
        0 12px 36px rgba(0,0,0,0.18);
}
/* Quiet rail — desaturated, fades to nothing, only present at top */
.soundscape-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(
        180deg,
        var(--gradient-2, rgba(212, 175, 55, 0.45)) 0%,
        rgba(212, 175, 55, 0.0) 65%
    );
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
    pointer-events: none;
    opacity: 0.4;
    transition: opacity 0.45s ease, width 0.45s ease;
}
/* Dual-rim — barely-there inner glow */
.soundscape-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
    transition: box-shadow 0.45s ease;
}
.soundscape-card:hover {
    border-color: var(--sj-gold-faint);
    background: rgba(20, 22, 32, 0.78);
    transform: translateY(-4px);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.06) inset,
        0 6px 36px rgba(0,0,0,0.32),
        0 24px 64px rgba(212, 175, 55, 0.06);
}
.soundscape-card:hover::before {
    opacity: 1;
    width: 3px;
}
.soundscape-card:hover::after {
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.08);
}
.soundscape-card-bg { display: none; }

/* ==========================================
   CARD INTERIOR — disciplined typography, jewelry tags, confident button
   ========================================== */

.soundscape-card-content {
    padding: 24px 22px 22px !important;
}
.soundscape-icon {
    font-size: 22px !important;
    margin-bottom: 12px !important;
    opacity: 0.85;
    filter: saturate(0.7);
}
.soundscape-name {
    font-family: 'Cinzel', serif !important;
    font-size: 17px !important;
    color: var(--sj-text) !important;
    letter-spacing: 0.02em !important;
    line-height: 1.25 !important;
    margin-bottom: 6px !important;
}
/* Tagline: quiet, single muted text-dim color — not the rail color */
.soundscape-subtitle {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-style: italic !important;
    font-size: 13px !important;
    color: var(--sj-text-mute) !important;
    letter-spacing: 0 !important;
    line-height: 1.4 !important;
    margin-bottom: 14px !important;
    text-transform: none !important;
}
.soundscape-description {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-size: 14px !important;
    color: var(--sj-text-dim) !important;
    line-height: 1.55 !important;
    margin-bottom: 18px !important;
}
/* Meta row */
.soundscape-meta {
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 14px !important;
    padding-bottom: 14px !important;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.soundscape-duration {
    font-size: 11px !important;
    color: var(--sj-text-mute) !important;
    letter-spacing: 0.08em !important;
}
.soundscape-intensity {
    font-size: 8px !important;
    padding: 3px 9px !important;
    border-radius: 999px !important;
    border-width: 1px !important;
    color: var(--sj-text-dim) !important;
    border-color: rgba(255,255,255,0.08) !important;
    background: rgba(255,255,255,0.02);
}
/* Strip the noisy color-coded intensity variants — single understated treatment */
.soundscape-intensity.gentle,
.soundscape-intensity.moderate,
.soundscape-intensity.deep,
.soundscape-intensity.intense {
    color: var(--sj-text-dim) !important;
    border-color: rgba(255,255,255,0.08) !important;
}
.soundscape-headphones {
    opacity: 0.35 !important;
    margin-left: auto;
}
/* Tags as jewelry — borderless, tight, single warm tone */
.soundscape-benefits {
    gap: 6px !important;
    margin-bottom: 18px !important;
}
.benefit-tag {
    font-size: 9px !important;
    color: var(--sj-text-mute) !important;
    padding: 3px 8px !important;
    border: none !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,0.025) !important;
    letter-spacing: 0.04em !important;
}
/* PLAY: gold confident pill */
.soundscape-start-btn {
    padding: 11px !important;
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.14) 0%,
        rgba(212, 175, 55, 0.06) 100%) !important;
    border: 1px solid rgba(212, 175, 55, 0.28) !important;
    border-radius: 999px !important;
    color: var(--sj-gold) !important;
    font-size: 10px !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset;
}
.soundscape-start-btn:hover {
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.22) 0%,
        rgba(212, 175, 55, 0.10) 100%) !important;
    border-color: var(--sj-gold-soft) !important;
    color: #f0d175 !important;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.06) inset,
        0 0 24px rgba(212, 175, 55, 0.18) !important;
    transform: translateY(-1px);
}
.soundscape-card-content {
    padding: 16px 18px;
    position: relative;
}
.soundscape-icon {
    font-size: 20px;
    margin-bottom: 6px;
}
.soundscape-name {
    font-family: 'Cinzel', serif;
    font-size: 15px;
    color: #e8e0d4;
    margin-bottom: 2px;
}
.soundscape-subtitle {
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    color: var(--gradient-2, rgba(180,195,215,0.5));
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.soundscape-description {
    font-size: 12px;
    color: rgba(180,195,215,0.6);
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.soundscape-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.soundscape-duration {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    color: rgba(180,195,215,0.6);
}
.soundscape-intensity {
    font-family: 'Space Mono', monospace;
    font-size: 8px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid rgba(255,255,255,0.1);
}
.soundscape-intensity.gentle { color: #34d399; border-color: rgba(52,211,153,0.2); }
.soundscape-intensity.moderate { color: #60a5fa; border-color: rgba(96,165,250,0.2); }
.soundscape-intensity.deep { color: #a78bfa; border-color: rgba(167,139,250,0.2); }
.soundscape-intensity.intense { color: #f97316; border-color: rgba(249,115,22,0.2); }

.soundscape-headphones {
    font-size: 1rem;
    opacity: 0.6;
}

.soundscape-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}
.benefit-tag {
    font-family: 'Space Mono', monospace;
    font-size: 8px;
    letter-spacing: 0.04em;
    color: rgba(180,195,215,0.5);
    padding: 2px 6px;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 3px;
    background: rgba(255,255,255,0.02);
}
.soundscape-start-btn {
    width: 100%;
    padding: 8px;
    background: linear-gradient(135deg, rgba(0,255,136,0.08), rgba(0,204,102,0.04));
    border: 1px solid rgba(0,255,136,0.15);
    border-radius: 4px;
    color: #00ff88;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}
.soundscape-start-btn:hover {
    background: rgba(0,255,136,0.12);
    border-color: rgba(0,255,136,0.3);
}

/* Info Section */
.journeys-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 24px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.journeys-advanced {
    text-align: center;
    margin-top: 18px;
    padding: 0 16px;
}
.journeys-advanced-link {
    display: inline-block;
    padding: 6px 14px;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.38);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.journeys-advanced-link:hover {
    color: rgba(232, 136, 96, 0.9);
    border-color: rgba(232, 136, 96, 0.35);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.info-icon {
    font-size: 1.5rem;
}

/* ==========================================
   PLAYBACK VIEW
   ========================================== */

/* Playback view becomes a fullscreen ceremonial space.
   Body class .sj-playback-active hides nav + footer + body chrome. */
body.sj-playback-active #unified-nav,
body.sj-playback-active .site-footer,
body.sj-playback-active footer,
body.sj-playback-active #magna-connections,
body.sj-playback-active .journeys-info,
body.sj-playback-active .journeys-advanced { display: none !important; }
/* The two background auroras part outward + dim together as the lemniscate gate
   blooms — one coordinated recession, not a snap. (Was display:none on #sj-aurora,
   which broke the cross-fade and left the backdrop curtain fading alone.) */
body.sj-playback-active #sj-aurora {
    opacity: 0;
    transform: translate3d(0, -6%, 0) scale(1.06);
    animation-play-state: paused;
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
}
body.sj-playback-active { overflow: hidden; }
body.sj-playback-active .lab-panel { padding: 0; max-width: none; }
body.sj-playback-active .sonic-journeys { padding: 0; }
body.sj-playback-active .soundscape-selection { display: none !important; }

.soundscape-playback {
    max-width: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.sj-playback-active .soundscape-playback {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 10000;
    background: #050508;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.soundscape-playback.hidden { display: none; }

/* ── Back button: small ceremonial pill, top-left corner ── */
.back-btn {
    position: absolute;
    top: max(22px, env(safe-area-inset-top));
    left: max(12px, env(safe-area-inset-left));
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    /* Containerless: a bare HUD label in the same Space Mono language as the
       binaural readout on the right, so the two flank the title as one HUD. */
    background: none;
    border: 0;
    border-radius: 0;
    color: rgba(237, 230, 214, 0.58);
    font-family: 'Space Mono', monospace;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    cursor: pointer;
    line-height: 1;
    transition: color 0.25s ease;
}
.back-btn::before {
    content: '\2190';
    display: inline-block;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: rgba(237, 230, 214, 0.5);
    letter-spacing: 0;
    transition: transform 0.25s ease;
}
.back-btn:hover { color: #fff8e0; }
.back-btn:hover::before { transform: translateX(-3px); color: #f6d977; }
.back-btn:active { transform: scale(0.97); }

/* Visualization Area — fills viewport when fullscreen */
.playback-visual {
    flex: 1;
    min-height: 400px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}
body.sj-playback-active .playback-visual {
    border-radius: 0;
    margin-bottom: 0;
    flex: 1 1 auto;
    min-height: 0;
}

#soundscape-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Title overlay — used to be a heavy bottom-gradient strip; now top-center,
   minimal, lets the canvas + sigil border breathe. */
.soundscape-info-overlay {
    position: absolute;
    top: 72px;
    left: 50%;
    /* +0.16em compensates the title's trailing letter-spacing so it reads
       optically centered, not pulled left. Dropped below the HUD line so it
       has room to breathe and can carry full size. */
    transform: translateX(calc(-50% + 0.16em));
    padding: 0;
    background: none;
    pointer-events: none;
    text-align: center;
    z-index: 5;
}
.soundscape-info-overlay h2 {
    font-size: 1.35rem;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(255, 248, 224, 0.92);
    margin: 0 0 4px;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
}
#playback-phase {
    color: rgba(237, 230, 214, 0.5);
    font-size: 0.78rem;
    font-family: 'Space Mono', monospace;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-style: normal;
}

/* Playback Controls */
.playback-controls {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ── Fullscreen player: morphing geometric outline ──
   Aesthetic: Patek Philippe complication. Hairline gold, blackest glass.
   The top edge morphs continuously (45s cycle) between four geometric
   forms via JS-driven clip-path; bottom edge stays straight and flush.
   Stroke is faked with inset box-shadow because clip-path crops the real
   border, and a 0.5px CSS border isn't reliably sub-pixel anyway. */
/* ── PANEL: vintage hi-tech brushed-aluminum instrument face ──
   Stack: warm graphite base + 1px vertical metal grain + top-light gradient.
   Edge: 0.5px champagne gold hairline (inset) + dual inset highlights/shadows
   simulate milled bevel under overhead light. Outer drop shadow for AO. */
body.sj-playback-active .playback-controls {
    /* ── Floating island ──
       Inset from the screen sides and lifted off the bottom so it reads as a
       discrete black-glass island, NOT a docked bar with hard vertical edges
       cutting down the left and right of the screen. All four corners round. */
    /* Docked flush to the bottom + both side edges (not a floating island).
       Flat bottom, top corners rounded; safe-area insets are absorbed as INNER
       padding so content clears the notch/home-indicator while the panel itself
       still reaches every edge. */
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: auto;
    padding:
        7px
        calc(16px + env(safe-area-inset-right, 0px))
        calc(7px + env(safe-area-inset-bottom, 0px))
        calc(16px + env(safe-area-inset-left, 0px));
    background:
        /* faint wet top edge — just enough to catch the glass highlight */
        linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.015) 12%, rgba(255, 255, 255, 0) 30%),
        /* blackest glass body — near-opaque so the bright field can't grey it out */
        linear-gradient(180deg, rgba(8, 10, 15, 0.90) 0%, rgba(2, 3, 6, 0.965) 100%);
    border: 0;
    border-radius: 18px 18px 0 0;
    box-shadow:
        /* bright specular top edge — wet highlight */
        inset 0 1px 0.5px 0 rgba(255, 255, 255, 0.32),
        /* full hairline perimeter — it's a floating object now, not docked */
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.09),
        /* bottom inner shade — gives the glass depth */
        inset 0 -10px 20px rgba(0, 0, 0, 0.42),
        /* soft cool inner glow */
        inset 0 10px 26px rgba(120, 160, 210, 0.045),
        /* soft drop shadow floating it above the field on all sides */
        0 10px 34px rgba(0, 0, 0, 0.62);
    /* keep refraction but pull brightness DOWN so the panel stays black, not grey */
    backdrop-filter: blur(22px) saturate(1.3) brightness(0.82);
    -webkit-backdrop-filter: blur(22px) saturate(1.3) brightness(0.82);
    overflow: hidden;
    z-index: 15;
    display: grid;
    /* [ play+vol cluster ] [ progress bar fills middle ] [ time block ] */
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
}

/* ── Controls auto-hide: after a few seconds of stillness the chrome fades so
   the meditation is pure visualization; any input reveals it (JS toggles
   body.sj-controls-idle). Idle chrome is pointer-events:none so the first tap
   only wakes it. ── */
body.sj-playback-active .playback-controls,
body.sj-playback-active .back-btn,
body.sj-playback-active .soundscape-info-overlay {
    transition: opacity 0.45s ease;
}
body.sj-playback-active.sj-controls-idle .playback-controls,
body.sj-playback-active.sj-controls-idle .back-btn,
body.sj-playback-active.sj-controls-idle .soundscape-info-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

/* ── Desktop: a slim transport bar docked across the whole bottom edge ──
   On phones the island floats (rules above). On a wide screen it becomes a
   full-width bar flush to the bottom of the viewport — spanning edge to edge,
   flat corners, and roughly half the height of the old floating island so it
   reads as a docked player, not a fat box. */
@media (min-width: 769px) {
    body.sj-playback-active .playback-controls {
        left: 0;
        right: 0;
        transform: none;
        width: 100%;
        max-width: none;
        bottom: 0;
        border-radius: 0;
        padding: 6px 28px;
    }
    body.sj-playback-active .playback-controls::before { border-radius: 0; }
    body.sj-playback-active .playback-controls::after { bottom: 2px; }
}

/* ── Field intensity slider — inline on the single transport line. 0 = the
   still base visualization; sliding up brings in the drift, the dispersed
   tones, the comets and the stronger bloom (window.__sjFieldIntensity). ── */
.sj-field-control { display: inline-flex; align-items: center; gap: 6px; }
.sj-field-label {
    font-family: 'Space Mono', monospace;
    font-size: 8px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(237, 230, 214, 0.5);
    white-space: nowrap;
}
/* On the tight phone bar, drop the word and let the ✦ + tooltip carry it. */
@media (max-width: 520px) { .sj-field-label { display: none; } }
.sj-field-control .sj-field-ico {
    font-size: 12px; line-height: 1; color: rgba(216, 220, 230, 0.55);
    transition: color 0.2s ease;
}
.sj-field-control .sj-field-ico.armed {
    color: #d4af37; animation: sjFieldPulse 2.6s ease-in-out infinite;
}
@keyframes sjFieldPulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
#sj-field-range {
    -webkit-appearance: none; appearance: none;
    width: 64px; height: 4px; border-radius: 3px; outline: none; cursor: pointer;
    background: linear-gradient(90deg, rgba(120, 150, 180, 0.35), rgba(212, 175, 55, 0.78));
}
#sj-field-range::-webkit-slider-thumb {
    -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%;
    background: #f0e6cf; border: 1px solid rgba(212, 175, 55, 0.8); cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
#sj-field-range::-moz-range-thumb {
    width: 13px; height: 13px; border-radius: 50%;
    background: #f0e6cf; border: 1px solid rgba(212, 175, 55, 0.8); cursor: pointer;
}
@media (max-width: 600px) { #sj-field-range { width: 48px; } }
/* Slow chrome specular sweep — a band of light scanning across the metal. */
body.sj-playback-active .playback-controls::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 22px;
    background: linear-gradient(105deg,
        transparent 38%,
        rgba(200, 224, 255, 0.10) 47%,
        rgba(255, 255, 255, 0.18) 50%,
        rgba(200, 224, 255, 0.10) 53%,
        transparent 62%);
    transform: translateX(-130%);
    animation: sj-chrome-sweep 7s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}
@keyframes sj-chrome-sweep {
    0% { transform: translateX(-130%); }
    55%, 100% { transform: translateX(130%); }
}
@media (prefers-reduced-motion: reduce) {
    body.sj-playback-active .playback-controls::before { animation: none; opacity: 0; }
}
/* Etched model designation, bottom-center (between the play cluster
   and the times so it doesn't crowd either). */
/* The 'MAGNA · SJ-01' maker's-mark tag was removed (Jason 2026-10-09): pinned
   dead-center at the bottom it sat directly under the play button + FIELD slider,
   clipping against them and reading as an unexplained smudge. The bar is a tight
   47px strip with no clear real estate for a vanity reference, so it's gone. */

/* Layout order on the bar:
   transport-controls (play + volume tight together) | progress bar | times */
body.sj-playback-active .transport-controls {
    order: 1;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}
body.sj-playback-active .playback-progress {
    order: 2;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}
/* ── PROGRESS BAR: tape-transport meter ──
   Recessed channel (inset shadow) with hairline tick graduations.
   Fill is warm amber with soft inner glow + bright needle dot at the
   leading edge (like a VU meter peak indicator). */
body.sj-playback-active .progress-bar {
    height: 2px;
    background:
        /* tick marks every 10% — sub-pixel hairlines */
        linear-gradient(90deg,
            transparent calc(10% - 0.5px), rgba(212, 175, 55, 0.28) 10%, transparent calc(10% + 0.5px),
            transparent calc(20% - 0.5px), rgba(212, 175, 55, 0.28) 20%, transparent calc(20% + 0.5px),
            transparent calc(30% - 0.5px), rgba(212, 175, 55, 0.28) 30%, transparent calc(30% + 0.5px),
            transparent calc(40% - 0.5px), rgba(212, 175, 55, 0.28) 40%, transparent calc(40% + 0.5px),
            transparent calc(50% - 0.5px), rgba(212, 175, 55, 0.45) 50%, transparent calc(50% + 0.5px),
            transparent calc(60% - 0.5px), rgba(212, 175, 55, 0.28) 60%, transparent calc(60% + 0.5px),
            transparent calc(70% - 0.5px), rgba(212, 175, 55, 0.28) 70%, transparent calc(70% + 0.5px),
            transparent calc(80% - 0.5px), rgba(212, 175, 55, 0.28) 80%, transparent calc(80% + 0.5px),
            transparent calc(90% - 0.5px), rgba(212, 175, 55, 0.28) 90%, transparent calc(90% + 0.5px)),
        /* recessed channel */
        linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(12, 8, 4, 0.45));
    border-radius: 2px;
    overflow: visible;
    box-shadow:
        inset 0 1px 1px rgba(0, 0, 0, 0.65),
        inset 0 0 0 0.5px rgba(212, 175, 55, 0.22);
    transition: height 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.sj-playback-active .progress-bar:hover {
    height: 4px;
}
body.sj-playback-active .progress-fill {
    background:
        linear-gradient(90deg,
            rgba(255, 145, 50, 0.85) 0%,
            rgba(255, 180, 90, 0.95) 60%,
            rgba(255, 215, 150, 1) 100%);
    border-radius: 2px;
    box-shadow:
        inset 0 0 4px rgba(255, 200, 120, 0.5),
        0 0 6px rgba(255, 170, 70, 0.45);
    /* Imperial morph: 6s ease-in-out so colors bleed into each other
       across the full half of a phase, never snapping. The bar also
       slow-pulses via a separate animation below. */
    transition:
        background 6s cubic-bezier(0.42, 0, 0.58, 1),
        box-shadow 6s cubic-bezier(0.42, 0, 0.58, 1);
    animation: sj-line-pulse 8s ease-in-out infinite;
}

/* Slow imperial line pulse - the bar's outer glow swells and falls
   like a single breath every 8 seconds. Never jarring, never fast. */
@keyframes sj-line-pulse {
    0%, 100% {
        filter: brightness(0.92) saturate(0.95);
    }
    50% {
        filter: brightness(1.12) saturate(1.18);
    }
}

/* ── Phase-tinted progress fill + needle ──
   .playback-controls[data-active-phase] is set every ~11s by
   sonic-journeys-bar.js. Each slot shifts the bar through a warm
   VU-meter color progression: champagne gold -> warm amber -> deep
   amber -> ember. Transition is slow enough to feel like the
   instrument's mood drifting, not a strobe. */
body.sj-playback-active .playback-controls[data-active-phase="0"] .progress-fill {
    background: linear-gradient(90deg,
        rgba(212, 175, 55, 0.85) 0%,
        rgba(240, 200, 110, 0.95) 60%,
        rgba(255, 230, 170, 1) 100%);
    box-shadow:
        inset 0 0 4px rgba(240, 200, 110, 0.5),
        0 0 6px rgba(212, 175, 55, 0.5);
}
body.sj-playback-active .playback-controls[data-active-phase="0"] .progress-fill::after {
    background: radial-gradient(circle, rgba(255, 245, 200, 1), rgba(212, 175, 55, 0.95)) !important;
    box-shadow:
        0 0 6px rgba(240, 200, 110, 0.9),
        0 0 12px rgba(212, 175, 55, 0.5),
        inset 0 0 1px rgba(255, 255, 255, 0.6);
}
body.sj-playback-active .playback-controls[data-active-phase="1"] .progress-fill {
    background: linear-gradient(90deg,
        rgba(255, 145, 50, 0.85) 0%,
        rgba(255, 180, 90, 0.95) 60%,
        rgba(255, 215, 150, 1) 100%);
    box-shadow:
        inset 0 0 4px rgba(255, 200, 120, 0.5),
        0 0 6px rgba(255, 170, 70, 0.5);
}
body.sj-playback-active .playback-controls[data-active-phase="1"] .progress-fill::after {
    background: radial-gradient(circle, rgba(240, 250, 255, 1), rgba(120, 185, 240, 0.95)) !important;
    box-shadow:
        0 0 6px rgba(255, 180, 90, 0.9),
        0 0 12px rgba(255, 150, 60, 0.5),
        inset 0 0 1px rgba(255, 255, 255, 0.6);
}
body.sj-playback-active .playback-controls[data-active-phase="2"] .progress-fill {
    background: linear-gradient(90deg,
        rgba(232, 122, 44, 0.9) 0%,
        rgba(255, 150, 70, 0.95) 60%,
        rgba(255, 195, 130, 1) 100%);
    box-shadow:
        inset 0 0 4px rgba(255, 160, 80, 0.55),
        0 0 7px rgba(232, 122, 44, 0.55);
}
body.sj-playback-active .playback-controls[data-active-phase="2"] .progress-fill::after {
    background: radial-gradient(circle, rgba(255, 215, 165, 1), rgba(232, 122, 44, 0.95)) !important;
    box-shadow:
        0 0 7px rgba(255, 150, 70, 0.95),
        0 0 14px rgba(232, 110, 40, 0.55),
        inset 0 0 1px rgba(255, 255, 255, 0.6);
}
body.sj-playback-active .playback-controls[data-active-phase="3"] .progress-fill {
    background: linear-gradient(90deg,
        rgba(200, 74, 24, 0.92) 0%,
        rgba(232, 122, 44, 0.95) 60%,
        rgba(255, 175, 110, 1) 100%);
    box-shadow:
        inset 0 0 4px rgba(232, 122, 44, 0.6),
        0 0 8px rgba(200, 74, 24, 0.6);
}
body.sj-playback-active .playback-controls[data-active-phase="3"] .progress-fill::after {
    background: radial-gradient(circle, rgba(255, 195, 140, 1), rgba(200, 74, 24, 0.95)) !important;
    box-shadow:
        0 0 8px rgba(232, 122, 44, 0.95),
        0 0 16px rgba(200, 74, 24, 0.55),
        inset 0 0 1px rgba(255, 255, 255, 0.6);
}
body.sj-playback-active .progress-fill::after {
    content: '';
    position: absolute;
    right: -3px;
    top: 50%;
    left: auto;
    width: 6px;
    height: 6px;
    inset: auto -3px auto auto;
    transform: translateY(-50%) !important;
    animation: sj-needle-pulse 8s ease-in-out infinite !important;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(240, 250, 255, 1), rgba(120, 185, 240, 0.9)) !important;
    box-shadow:
        0 0 6px rgba(255, 180, 90, 0.9),
        0 0 12px rgba(255, 150, 60, 0.5),
        inset 0 0 1px rgba(255, 255, 255, 0.6);
    transition:
        background 6s cubic-bezier(0.42, 0, 0.58, 1),
        box-shadow 6s cubic-bezier(0.42, 0, 0.58, 1);
}
/* Needle dot slow imperial pulse - swells gently in lockstep with
   the line and play button. Same 8s breath, never rigid. */
@keyframes sj-needle-pulse {
    0%, 100% {
        opacity: 0.85;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-50%) scale(1.18);
    }
}
/* ── TIMES: precision tabular LCD numerals ── */
body.sj-playback-active .progress-times {
    font-size: 10px;
    letter-spacing: 0.08em;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 180, 90, 0.72);
    text-shadow:
        0 0 4px rgba(255, 170, 70, 0.32),
        0 1px 0 rgba(0, 0, 0, 0.6);
    margin: 0;
    /* In the corner layout the container is only as wide as the two numbers, so
       space-between butts "2:36" and "50:00" together into an unreadable
       "2:3650:00". Group them at the end with a gap + an elapsed/total slash. */
    justify-content: flex-end;
    gap: 7px;
}
body.sj-playback-active .progress-times #playback-duration::before {
    content: "/";
    margin-right: 7px;
    opacity: 0.5;
}

/* ── PLAY BUTTON: McIntosh-style backlit milled disc ──
   Layer stack from back to front:
     1. Outer amber halo (box-shadow, breathes when playing)
     2. Milled disc face (radial gradient = curved metal under overhead light)
     3. Inset rim highlights/shadow simulate machined edge
     4. SVG play/pause icon sub-pixel etched into the face */
body.sj-playback-active .transport-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 0;
    flex-shrink: 0;
    position: relative;
    background:
        radial-gradient(circle at 50% 28%,
            rgba(184, 204, 230, 0.96) 0%,
            rgba(74, 90, 112, 0.95) 52%,
            rgba(18, 26, 38, 1) 100%);
    color: rgba(226, 242, 255, 0.96);
    box-shadow:
        /* bright chrome top rim */
        inset 0 1px 0 0 rgba(255, 255, 255, 0.5),
        /* bottom rim shadow */
        inset 0 -1px 0 0 rgba(0, 0, 0, 0.72),
        /* silver edge */
        inset 0 0 0 0.5px rgba(202, 224, 248, 0.7),
        /* cool cyan backlight (the minimal pop color) */
        0 0 0 1px rgba(118, 180, 232, 0.2),
        0 0 12px rgba(98, 168, 234, 0.26),
        0 2px 4px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition:
        transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 200ms cubic-bezier(0.2, 0.8, 0.2, 1),
        color 200ms ease;
}
body.sj-playback-active .transport-btn:hover {
    transform: translateY(-0.5px);
    color: rgba(240, 250, 255, 1);
    box-shadow:
        inset 0 1px 0 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 0 rgba(0, 0, 0, 0.7),
        inset 0 0 0 0.5px rgba(225, 242, 255, 0.85),
        0 0 0 1px rgba(118, 180, 232, 0.34),
        0 0 18px rgba(98, 178, 240, 0.45),
        0 3px 6px rgba(0, 0, 0, 0.55);
}
body.sj-playback-active .transport-btn:active {
    transform: translateY(0.5px);
    transition-duration: 90ms;
    box-shadow:
        inset 0 1px 2px 0 rgba(0, 0, 0, 0.5),
        inset 0 0 0 0.5px rgba(225, 242, 255, 0.8),
        0 0 0 1px rgba(118, 180, 232, 0.42),
        0 0 8px rgba(98, 178, 240, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.6);
}
body.sj-playback-active .transport-btn svg {
    width: 13px;
    height: 13px;
    filter: drop-shadow(0 0 3px rgba(110, 185, 245, 0.5));
}

/* ── Raised machined-metal pills (Light + Sleep) ──────────────────────────────
   The play/pause is chrome; these two read as flat plastic. Give them a milled
   metal face: vertical light-catching gradient, top highlight + bottom bevel
   shade (raised edge), hairline metal rim, drop shadow for lift; pressed = the
   bevel inverts to an inset. */
body.sj-playback-active .transport-controls .photic-toggle,
body.sj-playback-active .transport-controls .sj-sleep-btn {
    border: 0.5px solid rgba(188, 204, 224, 0.26);
    background:
        linear-gradient(180deg, rgba(74, 84, 99, 0.96) 0%, rgba(42, 49, 61, 0.97) 48%, rgba(19, 24, 32, 0.98) 100%);
    color: rgba(228, 238, 250, 0.92);
    box-shadow:
        inset 0 1px 0 0 rgba(255, 255, 255, 0.30),      /* top milled highlight */
        inset 0 -1px 1px 0 rgba(0, 0, 0, 0.60),         /* bottom bevel shade */
        inset 0 0 0 0.5px rgba(202, 218, 238, 0.12),    /* silver inner rim */
        0 2px 5px rgba(0, 0, 0, 0.5);                    /* lift off the glass */
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
    transition: transform 160ms cubic-bezier(0.2,0.8,0.2,1), box-shadow 160ms, background 160ms, color 160ms;
}
body.sj-playback-active .transport-controls .photic-toggle:hover,
body.sj-playback-active .transport-controls .sj-sleep-btn:hover {
    transform: translateY(-0.5px);
    color: #fff;
    box-shadow:
        inset 0 1px 0 0 rgba(255, 255, 255, 0.42),
        inset 0 -1px 1px 0 rgba(0, 0, 0, 0.55),
        inset 0 0 0 0.5px rgba(220, 234, 250, 0.22),
        0 3px 7px rgba(0, 0, 0, 0.55);
}
body.sj-playback-active .transport-controls .photic-toggle:active,
body.sj-playback-active .transport-controls .sj-sleep-btn:active {
    transform: translateY(0.5px);
    box-shadow:
        inset 0 1px 3px 0 rgba(0, 0, 0, 0.6),           /* pressed-in */
        inset 0 0 0 0.5px rgba(202, 218, 238, 0.18),
        0 1px 2px rgba(0, 0, 0, 0.5);
}
/* Light engaged: warm champagne backlight so the metal glows when on. */
body.sj-playback-active .transport-controls .photic-toggle.on {
    color: #fff;
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow:
        inset 0 1px 0 0 rgba(255, 255, 255, 0.38),
        inset 0 -1px 1px 0 rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(212, 175, 55, 0.35),
        0 0 16px rgba(212, 175, 55, 0.4),
        0 2px 5px rgba(0, 0, 0, 0.5);
}
/* PLAYING state: cyan backlight intensifies and breathes */
body.sj-playback-active .playback-controls[data-state="playing"] .transport-btn {
    color: rgba(232, 246, 255, 1);
    /* Matches sj-line-pulse cadence so the whole panel breathes
       on one slow imperial heartbeat. */
    animation: sj-amber-breathe 8s ease-in-out infinite;
}
body.sj-playback-active .playback-controls[data-state="playing"] .transport-btn::after {
    display: none;
}
@keyframes sj-amber-breathe {
    0%, 100% {
        box-shadow:
            inset 0 1px 0 0 rgba(255, 255, 255, 0.42),
            inset 0 -1px 0 0 rgba(0, 0, 0, 0.7),
            inset 0 0 0 0.5px rgba(210, 232, 252, 0.72),
            0 0 0 1px rgba(118, 180, 232, 0.32),
            0 0 16px rgba(98, 174, 238, 0.42),
            0 2px 5px rgba(0, 0, 0, 0.5);
    }
    50% {
        box-shadow:
            inset 0 1px 0 0 rgba(255, 255, 255, 0.6),
            inset 0 -1px 0 0 rgba(0, 0, 0, 0.7),
            inset 0 0 0 0.5px rgba(230, 244, 255, 0.95),
            0 0 0 1px rgba(140, 195, 240, 0.45),
            0 0 28px rgba(110, 186, 244, 0.72),
            0 2px 6px rgba(0, 0, 0, 0.5);
    }
}

/* Hide the chunky 5-bar audio indicators, keep it clean */
body.sj-playback-active .sj-bars { display: none; }

/* ── VOLUME: recessed channel + knurled brass thumb ──
   Track is an etched groove (inset shadow). Thumb is a 10px milled brass
   disc with vertical knurl striations via repeating conic gradient. */
body.sj-playback-active .volume-control {
    order: 2;
    transform: none;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
body.sj-playback-active .volume-control svg {
    width: 11px;
    height: 11px;
    color: rgba(212, 175, 55, 0.55);
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.04));
}
body.sj-playback-active .volume-control input[type="range"] {
    width: 64px;
    /* Tall, finger-grabbable hit area — the groove is painted thin via a
       centered background, but the *box* is 18px so a fingertip (or a mouse)
       can actually catch the thumb to drag it, not just tap-to-jump. */
    height: 18px;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    accent-color: rgba(110, 186, 244, 0.9);
    background:
        linear-gradient(180deg,
            rgba(0, 0, 0, 0.5) 0%,
            rgba(20, 14, 8, 0.4) 100%) center / 100% 4px no-repeat !important;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    /* Own the horizontal drag. Without this, iPad/iPhone (and any ancestor
       with touch-action: pan-y) treat a thumb-drag as a scroll and steal it,
       which is exactly the "tap moves it but I can't slide it" bug. */
    touch-action: none !important;
    -webkit-tap-highlight-color: transparent;
    transition: none;
}
body.sj-playback-active .volume-control input[type="range"]:hover {
    background-size: 100% 6px;
}
body.sj-playback-active .volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 11px !important;
    height: 11px !important;
    border-radius: 50%;
    background:
        /* knurled vertical striations */
        repeating-conic-gradient(from 0deg,
            rgba(225, 240, 255, 0.55) 0deg,
            rgba(120, 145, 175, 0.55) 8deg,
            rgba(225, 240, 255, 0.55) 16deg),
        radial-gradient(circle at 50% 30%,
            rgba(232, 245, 255, 0.97),
            rgba(110, 135, 165, 0.95)) !important;
    border: none !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 230, 170, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4),
        inset 0 0 0 0.5px rgba(90, 120, 155, 0.7),
        0 0 6px rgba(98, 168, 234, 0.45),
        0 1px 2px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: transform 150ms cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 150ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.sj-playback-active .volume-control input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.12);
    box-shadow:
        inset 0 1px 0 rgba(255, 240, 200, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4),
        inset 0 0 0 0.5px rgba(110, 140, 175, 0.7),
        0 0 10px rgba(110, 186, 244, 0.7),
        0 2px 3px rgba(0, 0, 0, 0.5);
}
body.sj-playback-active .volume-control input[type="range"]::-moz-range-thumb {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background:
        repeating-conic-gradient(from 0deg,
            rgba(225, 240, 255, 0.55) 0deg,
            rgba(120, 145, 175, 0.55) 8deg,
            rgba(225, 240, 255, 0.55) 16deg),
        radial-gradient(circle at 50% 30%,
            rgba(232, 245, 255, 0.97),
            rgba(110, 135, 165, 0.95));
    border: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 230, 170, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4),
        inset 0 0 0 0.5px rgba(90, 120, 155, 0.7),
        0 0 6px rgba(98, 168, 234, 0.45),
        0 1px 2px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

body.sj-playback-active .frequency-display { display: none; }

/* ── Phase dots: micro indicator for the morphing-shape cycle ──
   4 hairline circles top-right inside the bar. Active phase glows in the
   single restrained gold; the rest are dim ivory. DOM is injected by
   js/sonic-journeys-bar.js — this rule only styles it. */
body.sj-playback-active .sj-phase-dots {
    position: absolute;
    top: 6px;
    right: 12px;
    display: flex;
    gap: 4px;
    pointer-events: none;
    z-index: 2;
}
body.sj-playback-active .sj-phase-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(40, 28, 16, 0.9);
    box-shadow:
        inset 0 0 0 0.5px rgba(80, 55, 25, 0.6),
        inset 0 1px 0 rgba(0, 0, 0, 0.4);
    /* --sj-band (live brainwave-band color) + --sj-pulse (0..1 loudness) are
       set per-frame by the renderer. Gold fallback when no journey is live. */
    transition: background 600ms ease, box-shadow 220ms ease, transform 160ms ease;
}
body.sj-playback-active .playback-controls[data-active-phase="0"] .sj-phase-dots span:nth-child(1),
body.sj-playback-active .playback-controls[data-active-phase="1"] .sj-phase-dots span:nth-child(2),
body.sj-playback-active .playback-controls[data-active-phase="2"] .sj-phase-dots span:nth-child(3),
body.sj-playback-active .playback-controls[data-active-phase="3"] .sj-phase-dots span:nth-child(4) {
    background: radial-gradient(circle at 50% 30%,
        #fff,
        var(--sj-band, #ffaa46));
    box-shadow:
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.7),
        0 0 calc(4px + var(--sj-pulse, 0) * 6px) var(--sj-band, #ffaa46),
        0 0 calc(9px + var(--sj-pulse, 0) * 10px) var(--sj-band, #ff963c);
    transform: scale(calc(1 + var(--sj-pulse, 0) * 0.55));
}

.playback-progress {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00ffcc);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}

.progress-times {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Monaco', 'Consolas', monospace;
}

.transport-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.transport-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00ff88, #00cc66);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: #0a0a0f;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3);
}

.transport-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 255, 136, 0.5);
}

.transport-btn:active {
    transform: scale(0.92) !important;
}

/* ── SVG play/pause icon swap (CSS-driven) ── */
.sj-play-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.sj-icon-pause { display: none; }
.playback-controls[data-state="playing"] .sj-icon-play { display: none; }
.playback-controls[data-state="playing"] .sj-icon-pause { display: block; }

/* ── Loader ring (spins on loading) ──
   Recolored to warm amber to match the vintage hi-tech palette. The
   green border-top read as a spiral around the button when loading
   state lingered. */
.sj-play-loader {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: rgba(255, 170, 70, 0.85);
    opacity: 0;
    pointer-events: none;
}
.playback-controls[data-state="loading"] .sj-play-loader {
    opacity: 1;
    animation: sj-spin 0.7s linear infinite;
}
.playback-controls[data-state="loading"] .sj-play-icon {
    opacity: 0.3;
}
@keyframes sj-spin { to { transform: rotate(360deg); } }

/* ── Ambient glow ring when playing ── */
.playback-controls[data-state="playing"] .transport-btn::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.12), transparent 70%);
    animation: sj-glow 2.5s ease-in-out infinite;
    pointer-events: none;
}
@keyframes sj-glow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

/* ── Mini waveform bars ── */
.sj-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 22px;
    flex-shrink: 0;
}
.sj-bars span {
    display: block;
    width: 3px;
    border-radius: 2px;
    background: #00ff88;
    transform-origin: bottom;
    transform: scaleY(0.15);
}
.sj-bars span:nth-child(1) { height: 7px; }
.sj-bars span:nth-child(2) { height: 16px; }
.sj-bars span:nth-child(3) { height: 11px; }
.sj-bars span:nth-child(4) { height: 20px; }
.sj-bars span:nth-child(5) { height: 9px; }

.playback-controls[data-state="playing"] .sj-bars span:nth-child(1) { animation: sj-bv 0.9s ease-in-out 0.00s infinite; }
.playback-controls[data-state="playing"] .sj-bars span:nth-child(2) { animation: sj-bv 0.7s ease-in-out 0.08s infinite; }
.playback-controls[data-state="playing"] .sj-bars span:nth-child(3) { animation: sj-bv 1.1s ease-in-out 0.15s infinite; }
.playback-controls[data-state="playing"] .sj-bars span:nth-child(4) { animation: sj-bv 0.6s ease-in-out 0.05s infinite; }
.playback-controls[data-state="playing"] .sj-bars span:nth-child(5) { animation: sj-bv 0.85s ease-in-out 0.12s infinite; }

@keyframes sj-bv {
    0%, 100% { transform: scaleY(0.15); opacity: 0.5; }
    50% { transform: scaleY(1); opacity: 1; }
}

.playback-controls[data-state="paused"] .sj-bars span {
    transform: scaleY(0.3);
    transition: transform 0.3s ease;
}

.playback-controls[data-state="loading"] .sj-bars span {
    animation: sj-load-bars 0.5s ease-in-out infinite alternate;
}
@keyframes sj-load-bars {
    from { transform: scaleY(0.15); opacity: 0.3; }
    to { transform: scaleY(0.5); opacity: 0.6; }
}

/* ── Loading shimmer on progress bar ── */
.progress-load {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(0, 255, 136, 0.06);
    border-radius: 3px;
    width: 0%;
    pointer-events: none;
}
.progress-bar {
    position: relative;
}
.playback-controls[data-state="loading"] .progress-fill {
    width: 100% !important;
    background: linear-gradient(90deg, transparent 30%, rgba(0, 255, 136, 0.25) 50%, transparent 70%);
    background-size: 200% 100%;
    animation: sj-shimmer 1.5s ease-in-out infinite;
}
@keyframes sj-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Progress bar hover expand ── */
.progress-bar {
    transition: height 0.15s ease;
}
.progress-bar:hover {
    height: 10px;
}
.progress-fill::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    width: 10px;
    height: 10px;
    background: #00ff88;
    border-radius: 50%;
    transform: translateY(-50%) scale(0);
    transition: transform 0.15s ease;
    box-shadow: 0 0 6px rgba(0, 255, 136, 0.4);
}
.progress-bar:hover .progress-fill::after {
    transform: translateY(-50%) scale(1);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.volume-icon {
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
}

#playback-volume {
    width: 120px;
    height: 18px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1) center / 100% 4px no-repeat;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
}

/* Legacy thumb rule — superseded by the .volume-control rules above.
   Kept as a hard override-of-the-override in case any other stylesheet
   tries to re-paint it green. */
#playback-volume::-webkit-slider-thumb {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 11px !important;
    height: 11px !important;
    border-radius: 50% !important;
    background:
        repeating-conic-gradient(from 0deg,
            rgba(225, 240, 255, 0.55) 0deg,
            rgba(120, 145, 175, 0.55) 8deg,
            rgba(225, 240, 255, 0.55) 16deg),
        radial-gradient(circle at 50% 30%,
            rgba(232, 245, 255, 0.97),
            rgba(110, 135, 165, 0.95)) !important;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 230, 170, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4),
        inset 0 0 0 0.5px rgba(90, 120, 155, 0.7),
        0 0 6px rgba(98, 168, 234, 0.45),
        0 1px 2px rgba(0, 0, 0, 0.5) !important;
}
#playback-volume::-moz-range-thumb {
    appearance: none !important;
    -moz-appearance: none !important;
    width: 11px !important;
    height: 11px !important;
    border-radius: 50% !important;
    background:
        repeating-conic-gradient(from 0deg,
            rgba(225, 240, 255, 0.55) 0deg,
            rgba(120, 145, 175, 0.55) 8deg,
            rgba(225, 240, 255, 0.55) 16deg),
        radial-gradient(circle at 50% 30%,
            rgba(232, 245, 255, 0.97),
            rgba(110, 135, 165, 0.95)) !important;
    border: none !important;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 230, 170, 0.6),
        0 0 6px rgba(255, 170, 70, 0.4),
        0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

/* Frequency Display */
.frequency-display {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.freq-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    border: 1px solid var(--freq-color, #00ff88);
}

.freq-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--freq-color, #00ff88);
    box-shadow: 0 0 8px var(--freq-color, #00ff88);
    animation: freq-pulse 1.5s infinite;
}

@keyframes freq-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.freq-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.freq-hz {
    font-size: 0.75rem;
    color: var(--freq-color, #00ff88);
    font-family: 'Monaco', 'Consolas', monospace;
}

/* ==========================================
   MOBILE RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .sonic-journeys {
        padding: 16px;
    }

    .journeys-header h2 {
        font-size: 1.8rem;
    }

    .journeys-info {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .playback-visual {
        min-height: 300px;
    }

    .soundscape-info-overlay {
        padding: 20px;
    }

    .soundscape-info-overlay h2 {
        font-size: 1.5rem;
    }

    .transport-btn {
        width: 56px;
        height: 56px;
    }

    .transport-controls {
        gap: 12px;
    }

    .sj-bars {
        display: none;
    }

    #playback-volume {
        width: 80px;
    }

    /* ── Back button: keep tappable but compact, away from title ── */
    .back-btn {
        top: max(20px, env(safe-area-inset-top));
        left: max(10px, env(safe-area-inset-left));
        padding: 6px 8px;
        font-size: 9.5px;
        z-index: 10005;
    }

    /* ── Title overlay: reserve horizontal space so the back pill never
       collides with the title text on narrow widths. Pull title down a
       touch and cap its width. ── */
    body.sj-playback-active .soundscape-info-overlay {
        top: max(64px, calc(env(safe-area-inset-top) + 56px));
        left: 50%;
        right: auto;
        max-width: calc(100vw - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
        padding: 0 12px;
        box-sizing: border-box;
    }
    body.sj-playback-active .soundscape-info-overlay h2 {
        font-size: 1.18rem;
        letter-spacing: 0.22em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    body.sj-playback-active #playback-phase {
        font-size: 0.62rem;
        letter-spacing: 0.12em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* ── Playback controls bar: compress play+volume cluster, allow
       progress to take what remains. Volume slider shrinks on narrow. ── */
    /* ── Two-row stack on phones ──
       Row 1: full-width progress bar + times (current left / duration right).
       Row 2: the transport cluster spread edge-to-edge.
       The single-row grid squeezed the progress to zero width and mashed the
       two times into "0:0245:00" — stacking gives each its own room. */
    body.sj-playback-active .playback-controls {
        /* Docked flush to bottom + both side edges (not a floating island).
           Flat bottom, top corners rounded; safe-area insets absorbed as inner
           padding so content clears the home indicator while the panel reaches
           every edge. */
        left: 0;
        right: 0;
        bottom: 0;
        transform: none;
        width: auto;
        padding:
            9px
            calc(14px + env(safe-area-inset-right, 0px))
            calc(9px + env(safe-area-inset-bottom, 0px))
            calc(14px + env(safe-area-inset-left, 0px));
        border-radius: 16px 16px 0 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    body.sj-playback-active .playback-progress {
        order: 0;
        width: 100%;
        margin: 0;
    }
    body.sj-playback-active .transport-controls {
        order: 1;
        width: 100%;
        justify-content: space-between;
        gap: 8px;
        flex-wrap: nowrap;
    }
    /* Hard two-line bar on phones: progress row + transport row only. The
       live-data readout and the auto-DJ "add your own sound" row are hidden
       here to keep the meditation bar clean (both stay on the desktop bar). */
    body.sj-playback-active .frequency-display,
    body.sj-playback-active .sj-dj {
        display: none;
    }
    /* full-width times row: current pinned left, duration pinned right */
    body.sj-playback-active .progress-times {
        display: flex;
        justify-content: space-between;
        width: 100%;
    }
    body.sj-playback-active .transport-btn {
        width: 32px;
        height: 32px;
    }
    body.sj-playback-active .transport-btn svg {
        width: 13px;
        height: 13px;
    }
    body.sj-playback-active .volume-control input[type="range"] {
        width: 56px;
    }
    body.sj-playback-active .volume-control svg {
        width: 12px;
        height: 12px;
    }
    body.sj-playback-active .progress-times {
        font-size: 9px;
    }
}

/* iPad portrait / narrow tablets: hide the volume control to give play+progress
   room. Tap-to-mute remains possible via the system volume keys. */
@media (max-width: 520px) {
    body.sj-playback-active .volume-control input[type="range"] {
        width: 44px;
    }
}

    .sj-categories {
        gap: 3px;
        padding: 0 8px;
    }
    .sj-cat {
        padding: 5px 10px;
        font-size: 9px;
    }
}

/* ==========================================
   SLEEP JOURNEY STYLES
   ========================================== */

/* SLEEP category badge */
.soundscape-category-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 4;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(100, 120, 180, 0.4);
    color: rgba(140, 160, 220, 0.9);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

/* Sleep card dark variant */
.soundscape-card--sleep {
    border-left-color: rgba(100, 120, 180, 0.4);
}

.soundscape-card--sleep:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.soundscape-card--sleep .soundscape-start-btn {
    background: linear-gradient(135deg, rgba(60, 80, 140, 0.1), rgba(40, 50, 100, 0.06));
    border-color: rgba(100, 120, 180, 0.2);
    color: rgba(140, 160, 220, 0.8);
}

.soundscape-card--sleep .soundscape-start-btn:hover {
    background: rgba(60, 80, 140, 0.15);
    border-color: rgba(120, 140, 200, 0.3);
}

/* Sleep intensity badge */
.soundscape-intensity.sleep {
    background: rgba(60, 80, 140, 0.3);
    color: rgba(140, 160, 220, 0.9);
    border: 1px solid rgba(80, 100, 160, 0.4);
}

/* Sleep benefit tags */
.soundscape-card--sleep .benefit-tag {
    background: rgba(60, 80, 140, 0.15);
    border: 1px solid rgba(80, 100, 160, 0.2);
}

/* ==========================================
   ANIMATIONS & EFFECTS
   ========================================== */

/* Shimmer effect removed — conflicts with image overlay gradient */

/* Breathing glow on active journey */
.soundscape-card.active {
    animation: breathing-glow 4s infinite;
}

@keyframes breathing-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 136, 0.2); }
    50% { box-shadow: 0 0 40px rgba(0, 255, 136, 0.4); }
}

/* Loading state */
.soundscape-loading {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.soundscape-loading::after {
    content: '';
    width: 48px;
    height: 48px;
    border: 3px solid rgba(0, 255, 136, 0.3);
    border-top-color: #00ff88;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Focus states for accessibility */
.soundscape-card:focus-visible,
.soundscape-start-btn:focus-visible,
.transport-btn:focus-visible {
    outline: 2px solid #00ff88;
    outline-offset: 4px;
}

/* Smooth transitions for everything */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   LIQUID GLASS AESTHETIC — body.sj-glass
   Each card is a pane of glass tinted by its own hue (--jh/--js/--jl/--jt).
   Live-data journeys (Aurora) get their tint pushed by JS as Kp shifts.
   Layers (z): card base → glass-tint → aurora-curtain → glass-specular →
   soundscape-card-content. All structural classes preserved for JS hit-testing.
   ========================================================================== */

body.sj-glass .journeys-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    max-width: 1180px;
    padding: 0 24px 32px;
}

body.sj-glass .soundscape-card {
    --jh: 200; --js: 28%; --jl: 50%; --jt: 0.08; --jd: 12s;
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    isolation: isolate;
    cursor: pointer;
    border: none;
    background:
        linear-gradient(165deg,
            rgba(8, 14, 24, 0.55) 0%,
            rgba(4, 10, 18, 0.72) 50%,
            rgba(2, 6, 12, 0.82) 100%);
    backdrop-filter: blur(20px) saturate(1.35);
    -webkit-backdrop-filter: blur(20px) saturate(1.35);
    box-shadow:
        inset 0 0 0 0.5px rgba(212, 175, 55, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        inset 0 -1px 0 rgba(0, 0, 0, 0.45),
        0 10px 30px rgba(0, 0, 0, 0.45),
        0 0 0 0.5px rgba(212, 175, 55, 0.08);
    transition:
        transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
    min-height: 260px;
}

body.sj-glass .soundscape-card::before,
body.sj-glass .soundscape-card::after {
    display: none;
}

body.sj-glass .soundscape-card .glass-tint {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(ellipse 95% 80% at 28% 22%,
        hsla(var(--jh), var(--js), var(--jl), var(--jt)) 0%,
        hsla(var(--jh), calc(var(--js) - 8%), calc(var(--jl) - 6%), calc(var(--jt) * 0.55)) 45%,
        transparent 82%);
    mix-blend-mode: screen;
    transition: background 1.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.sj-glass .soundscape-card .aurora-curtain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    filter: blur(14px);
    opacity: calc(var(--jt) * 2.4);
    transition: opacity 1.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.sj-glass .soundscape-card .aurora-curtain svg {
    width: 100%;
    height: 100%;
    display: block;
}
body.sj-glass .soundscape-card .aurora-curtain path {
    fill: hsl(var(--jh), calc(var(--js) + 14%), calc(var(--jl) + 8%));
    mix-blend-mode: screen;
    transition: fill 1.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    animation: sj-glass-curtain-breathe var(--jd) ease-in-out infinite;
    transform-origin: center;
}
body.sj-glass .soundscape-card .aurora-curtain path.band-2 {
    animation-delay: -4.5s;
    animation-duration: calc(var(--jd) * 1.3);
}
@keyframes sj-glass-curtain-breathe {
    /* NEAR depth — the same gesture as the page sky: horizontal drift is primary
       (±2.5%), the vertical breath is now the secondary (was 6%/-4%, the lone
       vertical motion that fought the horizontal backdrop). One curtain, one
       current, just closer and faster than the sky behind it. */
    0%, 100% { transform: translate3d(2.5%, 3%, 0) scaleY(0.99); opacity: 0.6; }
    50%      { transform: translate3d(-2.5%, -2%, 0) scaleY(1.01); opacity: 1; }
}

body.sj-glass .soundscape-card .glass-specular {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 55%;
    pointer-events: none;
    z-index: 3;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.07) 0%,
        rgba(255, 255, 255, 0.02) 45%,
        transparent 100%);
    border-radius: 22px 22px 0 0;
}

body.sj-glass .soundscape-card .soundscape-card-content {
    position: relative;
    z-index: 4;
    padding: 20px 22px 18px !important;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 260px;
}

body.sj-glass .soundscape-card .soundscape-icon {
    font-size: 22px !important;
    opacity: 0.78;
    margin-bottom: 12px !important;
    filter: drop-shadow(0 2px 8px hsla(var(--jh), var(--js), calc(var(--jl) + 10%), calc(var(--jt) * 2.2)));
    transition: filter 1.6s;
}

body.sj-glass .soundscape-card .soundscape-name {
    font-family: 'Cinzel', serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    letter-spacing: 0.06em !important;
    color: #f5e6c4 !important;
    line-height: 1.2 !important;
    margin-bottom: 6px !important;
}

body.sj-glass .soundscape-card .soundscape-subtitle {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-style: italic !important;
    font-size: 12.5px !important;
    line-height: 1.45 !important;
    color: rgba(237, 230, 214, 0.55) !important;
    margin-bottom: 12px !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

body.sj-glass .soundscape-card .soundscape-description {
    display: none !important;
}

body.sj-glass .soundscape-card .soundscape-meta {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: auto !important;
    margin-bottom: 10px !important;
    padding: 0 !important;
    padding-top: 12px !important;
    border-top: 0.5px solid rgba(212, 175, 55, 0.14) !important;
    border-bottom: none !important;
    font-family: 'Space Mono', monospace !important;
    font-size: 9px !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    color: rgba(237, 230, 214, 0.45) !important;
}

body.sj-glass .soundscape-card .soundscape-duration {
    font-family: 'Space Mono', monospace !important;
    font-size: 9px !important;
    color: rgba(237, 230, 214, 0.55) !important;
    letter-spacing: 0.18em !important;
}

body.sj-glass .soundscape-card .soundscape-intensity {
    font-family: 'Space Mono', monospace !important;
    font-size: 8px !important;
    padding: 2px 7px !important;
    background: transparent !important;
    border: 0.5px solid rgba(212, 175, 55, 0.18) !important;
    border-radius: 999px !important;
    color: rgba(245, 217, 119, 0.55) !important;
    letter-spacing: 0.18em !important;
}

body.sj-glass .soundscape-card .soundscape-headphones {
    font-size: 10px;
    opacity: 0.4 !important;
    margin-left: auto;
}

body.sj-glass .soundscape-card .soundscape-benefits {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    margin-bottom: 14px !important;
    max-height: 38px;
    overflow: hidden;
}

body.sj-glass .soundscape-card .benefit-tag {
    font-family: 'Space Mono', monospace !important;
    font-size: 7.5px !important;
    padding: 2px 6px !important;
    background: rgba(2, 6, 14, 0.4) !important;
    border: 0.5px solid rgba(212, 175, 55, 0.10) !important;
    color: rgba(237, 230, 214, 0.45) !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase !important;
    border-radius: 999px !important;
}

body.sj-glass .soundscape-card .soundscape-start-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: flex-start;
    width: auto !important;
    padding: 7px 18px !important;
    font-family: 'Cinzel', serif !important;
    font-size: 10px !important;
    letter-spacing: 0.22em !important;
    text-transform: uppercase !important;
    color: #f6d977 !important;
    background: rgba(212, 175, 55, 0.08) !important;
    border: 0.5px solid rgba(212, 175, 55, 0.4) !important;
    border-radius: 999px !important;
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: none !important;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

body.sj-glass .soundscape-card .soundscape-start-btn:hover {
    background: rgba(212, 175, 55, 0.16) !important;
    border-color: rgba(245, 217, 119, 0.75) !important;
    color: #fff8e0 !important;
    transform: translateY(-1px);
    box-shadow: 0 0 16px rgba(245, 217, 119, 0.18) !important;
}

/* ==========================================================================
   CARD CLARITY (Phases 1-4) — readability + type + richness + grouping.
   ========================================================================== */

/* PHASE 1 — readability. The aurora is atmosphere at the TOP of the card; the
   lower zone is a reading surface. A scrim sits ABOVE the card aurora (z2) and
   BELOW the text (z4) so the text always has a contrast floor, whatever the
   aurora is doing behind it. */
body.sj-glass .soundscape-card .sj-card-scrim {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    border-radius: 22px;
    background: linear-gradient(180deg,
        rgba(2, 6, 12, 0) 0%,
        rgba(2, 6, 12, 0) 30%,
        rgba(2, 6, 12, 0.42) 62%,
        rgba(2, 6, 12, 0.66) 100%);
}
/* Confine the per-card aurora to the top band — it's a curtain, it hangs up top.
   Keeps the lower reading zone clean. */
body.sj-glass .soundscape-card .aurora-curtain {
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 36%, transparent 72%);
    mask-image: linear-gradient(180deg, #000 0%, #000 36%, transparent 72%);
}
/* Raise dim text + add a hairline shadow so the name survives the brightest frame. */
body.sj-glass .soundscape-card .soundscape-name {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55) !important;
}
body.sj-glass .soundscape-card .soundscape-subtitle {
    color: rgba(237, 230, 214, 0.72) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* PHASE 2 — type clarity. The type SPINE: a left rail coded to the three kinds.
   Re-enables ::before (the glass layout had disabled it). */
body.sj-glass .soundscape-card[data-type]::before {
    display: block !important;
    content: '' !important;
    position: absolute;
    left: 0; top: 14px; bottom: 14px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    z-index: 5;
}
body.sj-glass .soundscape-card[data-type="composed"]::before {
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.75), rgba(212, 175, 55, 0.12));
}
body.sj-glass .soundscape-card[data-type="local"]::before {
    background: linear-gradient(180deg, rgba(150, 195, 235, 0.85), rgba(150, 195, 235, 0.12));
    animation: sj-spine-breathe 6s ease-in-out infinite;
}
body.sj-glass .soundscape-card[data-type="live"]::before {
    background: linear-gradient(180deg, #46f0a0, #1f8f60);
    box-shadow: 0 0 9px rgba(70, 240, 160, 0.55);
    animation: sj-spine-pulse 2.2s ease-in-out infinite;
}
@keyframes sj-spine-pulse   { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
@keyframes sj-spine-breathe { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.85; } }
@media (prefers-reduced-motion: reduce) {
    body.sj-glass .soundscape-card[data-type]::before { animation: none !important; }
}

/* The type chip — top-left, names the kind in one word. */
body.sj-glass .soundscape-card .sj-card-top {
    display: flex;
    align-items: center;
    min-height: 16px;
    margin-bottom: 10px;
}
body.sj-glass .soundscape-card .sj-type-chip {
    font-family: 'Space Mono', monospace !important;
    font-size: 7.5px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 2.5px 8px;
    border-radius: 999px;
    border: 0.5px solid currentColor;
    opacity: 0.92;
}
body.sj-glass .soundscape-card .sj-type-live      { color: #6ef0b0; }
body.sj-glass .soundscape-card .sj-type-local     { color: #9cc8ec; }
body.sj-glass .soundscape-card .sj-type-composed,
body.sj-glass .soundscape-card .sj-type-generative { color: rgba(245, 217, 119, 0.85); }

/* The plain-language type line — the differentiator, in words. */
body.sj-glass .soundscape-card .sj-type-line {
    font-family: 'Space Mono', monospace !important;
    font-size: 9px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: rgba(237, 230, 214, 0.62);
    margin: 0 0 12px 0 !important;
}
body.sj-glass .soundscape-card[data-type="live"] .sj-type-line { color: rgba(150, 240, 195, 0.72); }

/* Functional descriptor eyebrow — "20-min sleep journey". Orients, doesn't poeticize. */
body.sj-glass .soundscape-card .sj-func-desc {
    font-family: 'Space Mono', monospace !important;
    font-size: 8px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(237, 230, 214, 0.42);
    margin: 0 0 4px 0 !important;
}

/* PHASE 3 — richness signals. The arc: one tick per phase = "this goes somewhere." */
body.sj-glass .soundscape-card .sj-arc {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
body.sj-glass .soundscape-card .sj-arc-track {
    display: flex;
    gap: 3px;
    flex: 1;
    max-width: 120px;
}
body.sj-glass .soundscape-card .sj-arc-seg {
    height: 3px;
    flex: 1;
    border-radius: 2px;
    background: hsla(var(--jh), calc(var(--js) + 18%), calc(var(--jl) + 12%), 0.55);
}
body.sj-glass .soundscape-card .sj-arc-seg:first-child { opacity: 0.6; }
body.sj-glass .soundscape-card .sj-arc-seg:last-child  { opacity: 0.35; }
body.sj-glass .soundscape-card .sj-arc-label {
    font-family: 'Space Mono', monospace !important;
    font-size: 7.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(237, 230, 214, 0.4);
    white-space: nowrap;
}

/* Frequency signature — the engineering proof. */
body.sj-glass .soundscape-card .sj-freq-sig {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Space Mono', monospace !important;
    font-size: 8.5px;
    letter-spacing: 0.08em;
    color: rgba(150, 220, 235, 0.62);
    margin-bottom: 12px;
}
body.sj-glass .soundscape-card .sj-freq-ico {
    font-size: 12px;
    line-height: 1;
    opacity: 0.8;
}

/* Meta row additions. */
body.sj-glass .soundscape-card .sj-meta-sep { opacity: 0.35; }
body.sj-glass .soundscape-card .sj-meta-phases {
    font-family: 'Space Mono', monospace !important;
    font-size: 9px;
    color: rgba(237, 230, 214, 0.5) !important;
    letter-spacing: 0.14em;
}
/* Signature benefit reads brighter than the rest. */
body.sj-glass .soundscape-card .benefit-tag.benefit-signature {
    color: rgba(245, 225, 165, 0.82) !important;
    border-color: rgba(212, 175, 55, 0.28) !important;
    background: rgba(212, 175, 55, 0.07) !important;
}

/* PHASE 4 — grouped sections. Heads span the full grid row. */
body.sj-glass .sj-group-head {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
    margin: 22px 4px 2px;
    padding-bottom: 8px;
    border-bottom: 0.5px solid rgba(212, 175, 55, 0.14);
}
body.sj-glass .sj-group-head:first-child { margin-top: 4px; }
body.sj-glass .sj-group-title {
    font-family: 'Cinzel', serif !important;
    font-size: 15px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #e9d9b0;
}
body.sj-glass .sj-group-head[data-group="live"] .sj-group-title { color: #8af0c0; }
body.sj-glass .sj-group-sub {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-style: italic;
    font-size: 13px;
    color: rgba(237, 230, 214, 0.5);
}

/* The "Live now" filter chip carries the same green data-signal. */
body.sj-glass .sj-cat.sj-cat-live,
.sj-categories .sj-cat.sj-cat-live { color: #6ef0b0; }
.sj-categories .sj-cat.sj-cat-live.active { background: rgba(70, 240, 160, 0.14); border-color: rgba(70, 240, 160, 0.4); }

body.sj-glass .soundscape-card:hover {
    transform: translateY(-3px) scale(1.012);
    background:
        linear-gradient(165deg,
            rgba(10, 18, 28, 0.55) 0%,
            rgba(4, 10, 18, 0.72) 50%,
            rgba(2, 6, 12, 0.82) 100%);
    box-shadow:
        inset 0 0 0 0.5px rgba(212, 175, 55, 0.50),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.50),
        0 18px 50px rgba(0, 0, 0, 0.55),
        0 0 0 0.5px rgba(212, 175, 55, 0.16),
        0 0 28px hsla(var(--jh), var(--js), calc(var(--jl) + 8%), calc(var(--jt) * 1.4));
}

body.sj-glass .soundscape-card.soundscape-card--hero {
    grid-column: span 2;
    min-height: 300px;
    border-radius: 24px;
    background:
        linear-gradient(165deg,
            rgba(10, 16, 26, 0.55) 0%,
            rgba(6, 12, 20, 0.72) 50%,
            rgba(2, 6, 12, 0.82) 100%);
    box-shadow:
        inset 0 0 0 0.5px rgba(212, 175, 55, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.09),
        inset 0 -1px 0 rgba(0, 0, 0, 0.45),
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 0 0 0.5px rgba(212, 175, 55, 0.12);
}
body.sj-glass .soundscape-card.soundscape-card--hero .glass-specular {
    border-radius: 24px 24px 0 0;
}
body.sj-glass .soundscape-card.soundscape-card--hero .soundscape-name {
    font-size: 22px !important;
    letter-spacing: 0.04em !important;
}
body.sj-glass .soundscape-card.soundscape-card--hero .soundscape-subtitle {
    font-size: 14px !important;
}
body.sj-glass .soundscape-card.soundscape-card--hero .soundscape-card-content {
    padding: 26px 28px 24px !important;
}

body.sj-glass .soundscape-card .sj-live-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px 4px 8px;
    background: rgba(2, 6, 14, 0.55);
    border: 0.5px solid rgba(108, 217, 154, 0.5);
    border-radius: 999px;
    font-family: 'Space Mono', monospace;
    font-size: 8px;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: rgba(245, 230, 196, 0.85);
    z-index: 5;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

@media (max-width: 760px) {
    body.sj-glass .soundscape-card.soundscape-card--hero {
        grid-column: span 1;
        min-height: 260px;
    }
    body.sj-glass .journeys-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

/* ── VIVIANE orb clears the floating player island ──
   The Session Orchestrator orb (journeys-orchestrator.js) pins bottom-right
   (orb bottom:56px, label:70px, name:118px) — which lands right on top of the
   player island. While a journey is playing, lift the whole orb group above
   the island so it stops clipping the bar. */
body.sj-playback-active .viviane-orb {
    bottom: calc(112px + env(safe-area-inset-bottom, 0px)) !important;
}
body.sj-playback-active .viviane-label {
    bottom: calc(126px + env(safe-area-inset-bottom, 0px)) !important;
}
body.sj-playback-active .viviane-name {
    bottom: calc(174px + env(safe-area-inset-bottom, 0px)) !important;
}

/* ============================================================================
   THE ROOM CAROUSEL  (Tier-1 rooms → Tier-2 flip-card tracks)
   Replaces the flat 26-card grid. Browse by swiping rooms, open one, flip
   through its handful of pieces. Deliberately re-laid-out at four viewports:
   iPhone (one-per-screen swipe) · iPad (peek neighbours) · desktop (cover-flow
   centred) · fullscreen (wider, breathing). Fills the viewport at every size.
   ============================================================================ */

/* Full-bleed: escape the .sonic-journeys 24px padding + the .soundscape-selection
   max-width so the rail/track centre on the VIEWPORT, symmetrically. Without
   this the side gaps are lopsided and the active card reads as off-centre. */
.sj-carousel-wrap { position: relative; z-index: 1; width: 100vw; margin-inline: calc(50% - 50vw); }

.sj-rooms { display: flex; flex-direction: column; gap: clamp(18px, 3vh, 40px); }

/* ── Tier 1 — the room rail ─────────────────────────────────────────────── */
.sj-room-rail {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Side padding sized so the first/only cover rests dead-centre and every
       snapped cover lands centred on the viewport. */
    padding: 8px calc((100vw - min(64vw, 300px)) / 2) 22px;
    perspective: 1600px;
}
.sj-room-rail::-webkit-scrollbar { display: none; }

.sj-room-cover {
    position: relative;
    flex: 0 0 64vw;
    max-width: 300px;
    /* Grow to fit the text — never clip it. Flex align-items:stretch keeps the
       whole rail the same height as the tallest cover, so the row stays tidy. */
    min-height: clamp(150px, 42vw, 200px);
    height: auto;
    scroll-snap-align: center;
    border: 0.5px solid rgba(255,255,255,0.10);
    border-radius: 22px;
    background: linear-gradient(158deg, var(--gradient-1, #20243a), var(--gradient-2, #2a2f52) 54%, var(--gradient-3, #141726));
    cursor: pointer;
    overflow: hidden;
    padding: 0;
    color: #f3ecdd;
    text-align: left;
    font-family: inherit;
    opacity: 0.62;
    filter: saturate(0.85);
    transform: scale(0.9);
    transition: transform 0.55s cubic-bezier(0.2,0.8,0.2,1), opacity 0.55s ease,
                box-shadow 0.55s ease, border-color 0.55s ease, filter 0.55s ease;
    box-shadow: 0 10px 34px rgba(0,0,0,0.4);
    -webkit-tap-highlight-color: transparent;
}
.sj-room-cover.active {
    opacity: 1;
    filter: saturate(1.05);
    transform: scale(1);
    border-color: rgba(212,175,55,0.5);
    box-shadow:
        0 0 0 0.5px rgba(212,175,55,0.28) inset,
        0 18px 54px rgba(0,0,0,0.5),
        0 0 60px rgba(120,90,220,0.22);
}
@media (hover: hover) {
    .sj-room-cover:not(.active):hover { opacity: 0.85; transform: scale(0.94); }
}
.sj-room-aura {
    position: absolute; inset: -30%;
    background:
        radial-gradient(ellipse 55% 60% at 28% 22%, rgba(255,255,255,0.16), transparent 60%),
        radial-gradient(ellipse 60% 70% at 80% 90%, rgba(0,0,0,0.28), transparent 60%);
    pointer-events: none;
}
.sj-room-glass {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(6,8,16,0) 30%, rgba(6,8,16,0.55) 100%);
    pointer-events: none;
}
.sj-room-cover-inner {
    position: relative;
    z-index: 2;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 4px;
    padding: 46px 20px 18px;
}
.sj-room-ico {
    position: absolute;
    top: 18px; left: 20px;
    font-size: 2rem;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.45));
}
.sj-room-livedot {
    position: absolute;
    top: 22px; right: 22px;
    width: 8px; height: 8px; border-radius: 50%;
    background: #46d6c4;
    box-shadow: 0 0 10px rgba(70,214,196,0.8);
    animation: sj-live-pulse-loading 1.8s ease-in-out infinite;
}
.sj-room-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.2rem, 4.6vw, 1.5rem);
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1.05;
    color: #fbf3df;
    text-shadow: 0 2px 18px rgba(0,0,0,0.6);
}
.sj-room-sub {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 0.98rem;
    line-height: 1.28;
    color: rgba(245,238,220,0.82);
    max-width: 26ch;
    text-shadow: 0 1px 10px rgba(0,0,0,0.6);
}
.sj-room-count {
    margin-top: 6px;
    font-family: 'Space Mono', monospace;
    font-size: 9.5px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(245,217,119,0.9);
}

/* ── Tier 2 — the flip-card track for the open room ─────────────────────── */
.sj-room-panel[hidden] { display: none; }
.sj-room-panel { animation: sj-panel-in 0.5s cubic-bezier(0.2,0.8,0.2,1) both; }
@keyframes sj-panel-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.sj-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-padding: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 6px calc((100vw - min(78vw, 330px)) / 2) 30px;
    perspective: 2000px;
}
.sj-track::-webkit-scrollbar { display: none; }

/* In-track cards: neutralise the flat-grid backing; the faces carry the look. */
.sj-track .soundscape-card {
    flex: 0 0 78vw;
    max-width: 330px;
    /* Auto-size to content — the inner grid-stacks both faces so the card grows
       to the TALLER of front/back and never clips. min-height is only a floor;
       flex align-items:stretch keeps every card in the row the same height. */
    min-height: clamp(340px, 52vh, 440px);
    scroll-snap-align: center;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
    padding: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    grid-column: auto;
}
.sj-track .soundscape-card--hero { grid-column: auto; }

/* ══════════════════════════════════════════════════════════════════════════
   THE REEL — one continuous cover-flow rolodex of every soundscape.
   Replaces the covers→hidden-panels two-tier browse. The whole breadth is one
   swipeable surface; the centred card is the one you play.
   ══════════════════════════════════════════════════════════════════════════ */
.sj-reel-wrap { display: flex; flex-direction: column; gap: clamp(12px, 2vh, 22px); }

/* Chapter rail — macro index. Not a gate; a jump + a scroll-spy readout. */
.sj-chapter-rail {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    padding: 2px clamp(14px, 4vw, 40px) 4px;
    scroll-behavior: smooth;
    justify-content: flex-start;
    align-items: center;
}
.sj-chapter-rail::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .sj-chapter-rail { justify-content: center; flex-wrap: wrap; } }
.sj-chapter {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 0.5px solid rgba(255,255,255,0.14);
    background: linear-gradient(140deg, color-mix(in srgb, var(--gradient-1,#20243a) 55%, transparent), color-mix(in srgb, var(--gradient-2,#2a2f52) 45%, transparent));
    color: rgba(245,238,220,0.72);
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.04em;
    cursor: pointer;
    white-space: nowrap;
    transition: color .3s ease, border-color .3s ease, background .3s ease, transform .3s ease, box-shadow .3s ease;
    -webkit-tap-highlight-color: transparent;
}
.sj-chapter:hover { color: #f3ecdd; transform: translateY(-1px); }
.sj-chapter.active {
    color: #fbf3df;
    border-color: rgba(212,175,55,0.55);
    box-shadow: 0 0 0 0.5px rgba(212,175,55,0.3) inset, 0 6px 22px rgba(120,90,220,0.22);
    transform: translateY(-1px);
}
.sj-chapter-name { font-family: 'Cinzel', serif; font-size: 12px; letter-spacing: 0.06em; }
.sj-chapter-count {
    min-width: 17px; text-align: center;
    padding: 1px 6px; border-radius: 999px;
    background: rgba(0,0,0,0.28);
    font-size: 9.5px; color: rgba(245,217,119,0.9);
}
.sj-chapter-livedot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #46d6c4; box-shadow: 0 0 9px rgba(70,214,196,0.85);
    animation: sj-live-pulse-loading 1.8s ease-in-out infinite;
}

/* The reel itself reuses .sj-track's scroll-snap mechanics. Each card gets a
   cover-flow transform from --d (distance-from-centre, in card-widths) and --dir
   (side), set by _updateReel on every scroll frame. */
.sj-reel { cursor: grab; }
.sj-reel.sj-dragging { cursor: grabbing; scroll-snap-type: none; }
.sj-reel.sj-dragging .soundscape-card { transition: none; }
.sj-reel .soundscape-card {
    --d: 1; --dir: 1;
    transform:
        rotateY(calc(var(--dir) * min(var(--d), 2.2) * -11deg))
        scale(calc(1 - min(var(--d), 2.4) * 0.11));
    opacity: calc(1 - min(var(--d), 3) * 0.17);
    transform-origin: center center;
    transition: transform .22s cubic-bezier(0.2,0.8,0.2,1), opacity .22s ease;
}
.sj-reel .soundscape-card.is-centered {
    --d: 0;
    transform: rotateY(0deg) scale(1.05);
    opacity: 1;
    z-index: 3;
}
.sj-reel .soundscape-card.is-centered .jc-front {
    box-shadow: 0 0 0 0.5px rgba(212,175,55,0.28) inset, 0 22px 60px rgba(0,0,0,0.5), 0 0 64px rgba(120,90,220,0.2);
}
.sj-reel-hint {
    text-align: center;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(245,238,220,0.4);
    margin-top: -4px;
}
@media (prefers-reduced-motion: reduce) {
    .sj-reel .soundscape-card { transition: opacity .2s ease; transform: scale(calc(1 - min(var(--d),2)*0.06)); }
    .sj-reel .soundscape-card.is-centered { transform: scale(1.02); }
}

/* The reel MUST stay a horizontal cover-flow scroller. The global
   `@media (pointer: fine), (pointer: coarse)` rule forces every .sj-track into a
   wrapping display:grid (that was the old "grid of doors" look) — these
   higher-specificity rules win it back to flex + x-snap on every device. */
.sj-track.sj-reel {
    display: flex;
    position: relative;
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    max-width: none;
    margin: 0;
    gap: clamp(12px, 3vw, 20px);
    padding: 10px calc((100vw - min(74vw, 330px)) / 2) 30px;
    perspective: 1600px;
}
.sj-track.sj-reel .soundscape-card {
    flex: 0 0 min(74vw, 330px);
    max-width: 330px;
    min-height: clamp(360px, 54vh, 460px);
    scroll-snap-align: center;
    /* Only render cards near the viewport — all 45 heavy flip-cards painting at
       once (each with SVG auroras + glass layers) exhausted the compositor and
       crashed the tab. The box is reserved so offsets + snap still work. */
    content-visibility: auto;
    contain-intrinsic-size: 330px 460px;
}
/* iPhone/iPad: backdrop-filter blur across many cards crashes iOS Safari's
   compositor. The reel cards are gradient-based and read fine without it. */
@media (pointer: coarse) {
    .sj-reel .soundscape-card,
    .sj-reel .soundscape-card *,
    .sj-reel .soundscape-card::before,
    .sj-reel .soundscape-card::after {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* ── PHONES: the reel becomes a clean VERTICAL stack ─────────────────────────
   The horizontal cover-flow fought vertical page-scroll on phones (a documented
   past failure) and the big 3D cards strained iOS Safari. On small screens the
   reel is a simple vertical list: natural page scrolling, one full-width card at
   a time, no 3D, light rendering. The chapter rail still jumps to a room. */
@media (max-width: 640px) {
    .sj-track.sj-reel {
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow-x: hidden;
        overflow-y: visible;
        scroll-snap-type: none;
        touch-action: auto;               /* vertical page scroll always works */
        perspective: none;
        gap: 16px;
        padding: 4px 12px 30px;
        max-width: none;
        margin: 0;
    }
    .sj-track.sj-reel .soundscape-card {
        flex: 0 0 auto;
        width: 92vw;
        max-width: 460px;
        min-height: clamp(320px, 56vh, 440px);
        scroll-snap-align: none;
        transform: none !important;       /* no cover-flow 3D on phones */
        opacity: 1 !important;
        content-visibility: auto;
        contain-intrinsic-size: 340px 420px;
    }
    .sj-reel .soundscape-card.is-centered { transform: none !important; }
    .sj-reel .soundscape-card.is-centered .jc-front {
        box-shadow: 0 10px 30px rgba(0,0,0,0.45);
    }
    .sj-reel-hint { display: none; }      /* "drag" doesn't apply to a vertical list */
}

.soundscape-card-inner {
    position: relative;
    width: 100%;
    min-height: 100%;
    display: grid;
    grid-template-areas: "stack";
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.2,0.8,0.2,1);
}
.soundscape-card.flipped .soundscape-card-inner { transform: rotateY(180deg); }

/* A backdrop-filter (or overflow other than visible) on the flip container
   FLATTENS the preserve-3d context, so the back face renders as a flat 2D
   mirror — reversed copy. Keep the flip card itself free of both; each face
   carries its own background, so nothing is lost visually. */
.soundscape-card.sj-flip,
.sj-track .soundscape-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible !important;
}

.jc-face {
    grid-area: stack;           /* both faces share one cell → card grows to taller */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    border: 0.5px solid rgba(255,255,255,0.09);
    overflow: hidden;
    background: linear-gradient(158deg, var(--gradient-1, #1a1d30), var(--gradient-2, #262b4c) 55%, var(--gradient-3, #12141f));
    box-shadow:
        0 1px 0 rgba(255,255,255,0.05) inset,
        0 14px 44px rgba(0,0,0,0.42);
}
.jc-back { transform: rotateY(180deg); }

/* Only the forward-facing side receives taps. `backface-visibility: hidden`
   hides the rear face visually, but on iOS/Safari (and the installed PWA) the
   hidden back face STILL intercepts touches — it sits in the same grid cell
   over the visible front and eats every tap meant for Play / details, so cards
   look unresponsive. Gate pointer-events by flip state instead of trusting
   backface-visibility for hit-testing. */
.jc-back { pointer-events: none; }
.soundscape-card.flipped .jc-front { pointer-events: none; }
.soundscape-card.flipped .jc-back  { pointer-events: auto; }

/* Front face — the decorative glass layers live here and fill it. */
.jc-front .soundscape-card-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 22px 22px 20px;
}
.jc-front .soundscape-icon { font-size: 2.1rem; margin-bottom: 6px; }
.jc-front .soundscape-name { margin-top: auto; }
.jc-front .sj-type-line { margin-bottom: 10px; }

.sj-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}
.jc-front .sj-card-actions { margin-top: 12px; }

.jc-flip-btn {
    background: none;
    border: 0.5px solid rgba(255,255,255,0.18);
    color: rgba(245,238,220,0.72);
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 8px 12px;
    border-radius: 40px;
    cursor: pointer;
    transition: border-color 0.3s ease, color 0.3s ease;
    white-space: nowrap;
}
.jc-flip-btn:hover { border-color: rgba(245,217,119,0.6); color: #fff8e0; }

/* Back face — the proof: description, arc, frequency, benefits. */
.jc-back-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 24px 22px 20px;
    overflow: hidden;
}
.jc-back-name {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #f5e6c4;
    margin: 0 0 10px;
}
.jc-back-desc {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.02rem;
    line-height: 1.55;
    color: rgba(237,230,214,0.82);
    margin: 0 0 14px;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 12em;              /* long descriptions scroll, don't balloon the card */
    -webkit-overflow-scrolling: touch;
}
.jc-back-desc::-webkit-scrollbar { width: 4px; }
.jc-back-desc::-webkit-scrollbar-thumb { background: rgba(245,217,119,0.24); border-radius: 4px; }
.jc-back .sj-freq-sig,
.jc-back .sj-arc { margin: 8px 0; }
.jc-back .soundscape-benefits { margin-top: 6px; }

/* Rooms mode neutralises the old grid media rules that stacked to one column. */
.sj-carousel-wrap .sj-group-head { display: none; }

/* ── iPad / medium ──────────────────────────────────────────────────────── */
@media (min-width: 768px) {
    .sj-room-cover { flex-basis: 300px; }
    .sj-track .soundscape-card { flex-basis: 340px; min-height: clamp(440px, 56vh, 520px); }
    .sj-room-rail { padding-inline: calc((100vw - 300px) / 2); }
    .sj-track { padding-inline: calc((100vw - 340px) / 2); }
}

/* ── Desktop — centred cover-flow feel ──────────────────────────────────── */
@media (min-width: 1200px) {
    .sj-room-rail {
        justify-content: safe center;
        flex-wrap: nowrap;
        max-width: 1440px;
        margin: 0 auto;
        padding-inline: 40px;
    }
    .sj-room-cover { flex-basis: 260px; aspect-ratio: 4 / 5; }
    .sj-room-cover.active { transform: scale(1.06); }
    .sj-room-cover:not(.active) { transform: scale(0.92) rotateY(2deg); }
    /* Track stays a horizontal carousel — centred when the room's pieces fit,
       scrolling from the start when they don't (safe center = never clip). */
    .sj-track {
        justify-content: safe center;
        max-width: 1440px;
        margin: 0 auto;
        padding-inline: 40px;
    }
    .sj-track .soundscape-card { flex-basis: 300px; min-height: 470px; }
}

/* ── Fullscreen desktop — wider, breathing, no dead space ───────────────── */
@media (min-width: 1800px) {
    .sj-rooms { gap: 52px; }
    .sj-room-rail { max-width: 1760px; gap: 22px; }
    .sj-room-cover { flex-basis: 300px; }
    .sj-track { max-width: 1760px; gap: 22px; }
    .sj-track .soundscape-card { flex-basis: 320px; min-height: 500px; }
    .journeys-header h2 { font-size: 4rem; }
}

/* ── Wrap into a dense grid on EVERY device (mouse and touch) ─────────────────
   The horizontal scroll-snap carousel was a problem on both: on a mouse it
   hijacked the wheel (Chrome commits a vertical wheel to the snap container,
   cancelable:false, so the page can't scroll); on a phone each card was ~78vw —
   nearly the whole viewport left-to-right — and the swipe fought vertical
   scroll. Dropping the horizontal scroller entirely for a centred wrapping grid
   fixes all of it: cards are half-size (two-plus per row), vertical scroll
   always moves the page, and far more of the variety shows at once. */
@media (pointer: fine), (pointer: coarse) {
    .sj-carousel-wrap { width: auto; margin-inline: 0; }

    /* CSS Grid with auto-fill: fills as many equal columns as fit, so cards are
       never the full viewport (always ≥2 up on a phone, more on desktop) and the
       gap/padding math can't force a single full-width column the way flex did. */
    .sj-room-rail,
    .sj-track {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
        justify-items: stretch;
        overflow: visible;
        scroll-snap-type: none;
        touch-action: auto;      /* it's a grid, not a scroller — normal taps + vertical scroll */
        overscroll-behavior-x: auto;
        max-width: 1180px;
        margin: 0 auto;
    }
    .sj-room-rail { gap: 12px; padding: 8px 14px 18px; }
    .sj-track     { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; row-gap: 16px; padding: 4px 14px 26px; }

    /* Denser + RAISED METAL: smaller covers that keep each room's colour face
       but sit up off the field like machined tiles — a milled top-edge highlight,
       a bottom bevel shade, a hairline metal rim, and a lift shadow. More of the
       variety shows at once, and the cards read as raised metal, not flat glass. */
    .sj-room-cover,
    .sj-room-cover.active,
    .sj-room-cover:not(.active) {
        /* preferred width tracks the viewport (≈2 per row on a phone, more on a
           wide screen) but never grows past 190px — so a card is never the whole
           viewport, and at least two always fit even on a 360px phone. */
        flex: 0 0 clamp(118px, 40vw, 190px);
        min-height: 0;
        transform: none;
        border: none;
        background:
            linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 15%),
            linear-gradient(158deg, var(--gradient-1, #20243a), var(--gradient-2, #2a2f52) 54%, var(--gradient-3, #141726));
        box-shadow:
            inset 0 1px 0 rgba(255,255,255,0.26),        /* milled top edge */
            inset 0 -1.5px 2px rgba(0,0,0,0.5),          /* bottom bevel shade */
            inset 0 0 0 0.5px rgba(200,214,235,0.16),    /* hairline metal rim */
            0 6px 18px rgba(0,0,0,0.42);                  /* lift off the field */
        border-radius: 14px;
        transition: transform 200ms cubic-bezier(0.2,0.8,0.2,1), box-shadow 200ms ease;
    }
    .sj-room-cover:hover {
        transform: translateY(-1.5px);
        box-shadow:
            inset 0 1px 0 rgba(255,255,255,0.34),
            inset 0 -1.5px 2px rgba(0,0,0,0.45),
            inset 0 0 0 0.5px rgba(216,228,246,0.24),
            0 10px 26px rgba(0,0,0,0.5);
    }
    .sj-room-cover:active { transform: translateY(0.5px); }
    .sj-room-cover-inner { padding: 34px 14px 12px; gap: 2px; }
    .sj-room-title { font-size: clamp(0.92rem, 3.4vw, 1.14rem); }
    .sj-room-sub   { font-size: 0.84rem; line-height: 1.22; max-width: 22ch; }
    .sj-room-count { font-size: 8px; margin-top: 3px; }
    .sj-room-ico   { font-size: 1.4rem; top: 12px; left: 14px; }
    .sj-track .soundscape-card {
        /* ≈2 per row on a phone, more on desktop; capped so a card is never the
           full viewport width and two always fit even at 360px. */
        flex: 0 0 clamp(150px, 43vw, 230px);
        min-height: clamp(210px, 28vh, 270px);
    }
}

/* Motion / a11y — no 3D flip transition for reduced-motion users. */
@media (prefers-reduced-motion: reduce) {
    .soundscape-card-inner { transition: none; }
    .sj-room-cover { transition: opacity 0.2s ease; transform: none !important; }
    .sj-room-panel { animation: none; }
}

/* ============================================================================
   TUNE TO ME  —  the config drawer ("show me more/less" + "play me more/less")
   ============================================================================ */
.sj-tune-btn {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    background: rgba(4,6,12,0.5);
    border: 0.5px solid rgba(212,175,55,0.32);
    border-radius: 999px;
    color: rgba(245,230,196,0.9);
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    backdrop-filter: blur(10px) saturate(1.1);
    -webkit-backdrop-filter: blur(10px) saturate(1.1);
    transition: border-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}
.sj-tune-btn:hover { border-color: rgba(245,217,119,0.65); color: #fff8e0; transform: translateY(-1px); }
.sj-tune-btn span { color: #f5d977; font-size: 13px; }

.sj-tune-scrim {
    position: fixed; inset: 0; z-index: 2147483000;
    background: radial-gradient(ellipse at 70% 30%, rgba(20,14,40,0.5), rgba(3,5,10,0.72));
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    animation: sj-fade-in 0.35s ease both;
}
@keyframes sj-fade-in { from { opacity: 0; } to { opacity: 1; } }

.sj-tune-drawer {
    position: fixed; z-index: 2147483001;
    top: 0; right: 0; height: 100%;
    width: min(440px, 93vw);
    /* No hard edge line — a soft aura + deep shadow do the separating. A faint
       gold gradient sliver glows at the leading edge instead of a hairline. */
    background:
        radial-gradient(ellipse 120% 60% at 90% 0%, rgba(60,44,110,0.28), transparent 60%),
        radial-gradient(ellipse 100% 50% at 10% 100%, rgba(30,60,90,0.22), transparent 60%),
        linear-gradient(180deg, rgba(12,15,26,0.985), rgba(6,8,14,0.99));
    border: none;
    border-radius: 20px 0 0 20px;
    box-shadow:
        -1px 0 0 rgba(212,175,55,0.10) inset,
        -30px 0 90px rgba(0,0,0,0.62);
    transform: translateX(100%);
    transition: transform 0.46s cubic-bezier(0.2,0.85,0.25,1);
    display: flex; flex-direction: column;
    color: #e6e9f2;
}
.sj-tune-drawer::before {                 /* soft glowing leading edge, not a line */
    content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 24px;
    background: linear-gradient(90deg, rgba(245,217,119,0.14), transparent);
    pointer-events: none;
}
.sj-tune-drawer.open { transform: translateX(0); }

.sj-tune-head {
    position: relative;
    display: flex; align-items: center; justify-content: space-between;
    padding: 26px 26px 18px;
}
.sj-tune-head::after {                     /* divider that fades out at both ends */
    content: ''; position: absolute; left: 26px; right: 26px; bottom: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212,175,55,0.35), transparent);
}
.sj-tune-head h3 {
    margin: 0; font-family: 'Cinzel', serif; font-weight: 600;
    font-size: 1.22rem; letter-spacing: 0.16em; color: #f5e6c4;
    text-shadow: 0 2px 24px rgba(212,175,55,0.2);
}
.sj-tune-close {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 14px;
    color: rgba(245,230,196,0.8);
    background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    border: 0.5px solid rgba(212,175,55,0.28);
    box-shadow: 0 0 0 0.5px rgba(212,175,55,0.12) inset, 0 4px 14px rgba(0,0,0,0.4);
    transition: border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}
.sj-tune-close:hover {
    border-color: rgba(245,217,119,0.7); color: #fff8e0; transform: rotate(90deg);
    box-shadow: 0 0 0 0.5px rgba(245,217,119,0.3) inset, 0 4px 20px rgba(245,217,119,0.18);
}

.sj-tune-body { padding: 6px 26px 34px; overflow-y: auto; flex: 1; scrollbar-width: none; -ms-overflow-style: none; }
.sj-tune-body::-webkit-scrollbar { width: 0; height: 0; display: none; }
.sj-tune-sec { margin-top: 26px; }
.sj-tune-sec-title {
    font-family: 'Cinzel', serif; font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase;
    color: #f5d977; margin-bottom: 4px;
}
.sj-tune-sec-sub {
    font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 1.02rem;
    color: rgba(237,230,214,0.62); margin: 0 0 16px; line-height: 1.4;
}
.sj-tune-row {
    position: relative;
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 12px 0;
}
.sj-tune-row + .sj-tune-row::before {      /* faint divider, faded at the ends */
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06) 20%, rgba(255,255,255,0.06) 80%, transparent);
}
.sj-tune-row-label {
    font-family: 'Cormorant Garamond', serif; font-size: 1.16rem; color: rgba(240,233,218,0.94);
    display: flex; flex-direction: column; line-height: 1.2;
}
.sj-tune-row-label em {
    font-family: 'Space Mono', monospace; font-style: normal; font-size: 8.5px;
    letter-spacing: 0.12em; text-transform: uppercase; color: rgba(160,170,190,0.5); margin-top: 4px;
}
/* Segmented control — larger, richer, premium. Gold gradient + glow when on. */
.sj-seg {
    display: inline-flex; flex: 0 0 auto; gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
    box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 2px 10px rgba(0,0,0,0.35), 0 0 0 0.5px rgba(255,255,255,0.06);
}
.sj-seg-btn {
    background: transparent; border: none; color: rgba(230,233,242,0.55);
    width: 46px; height: 40px; border-radius: 999px; cursor: pointer; font-size: 17px; line-height: 1;
    font-family: 'Space Mono', monospace;
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
}
.sj-seg-btn:hover { color: #fff8e0; background: rgba(245,217,119,0.1); }
.sj-seg-btn:active { transform: scale(0.94); }
.sj-seg-btn.on {
    color: #0a0805; font-weight: 700;
    background: radial-gradient(circle at 40% 30%, #ffe9a8, #f0c65a 70%);
    box-shadow: 0 2px 10px rgba(240,198,90,0.4), 0 0 0 0.5px rgba(255,255,255,0.4) inset;
}
.sj-tune-reset {
    margin-top: 30px; width: 100%; padding: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
    border: 0.5px solid rgba(255,255,255,0.12); border-radius: 12px;
    color: rgba(230,233,242,0.62); font-family: 'Space Mono', monospace; font-size: 10px;
    letter-spacing: 0.22em; text-transform: uppercase; cursor: pointer;
    transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}
.sj-tune-reset:hover { border-color: rgba(245,217,119,0.5); color: #f5e6c4; background: rgba(245,217,119,0.06); }

/* Mobile — the drawer becomes a bottom sheet with a grab handle. */
@media (max-width: 640px) {
    .sj-tune-drawer {
        top: auto; bottom: 0; right: 0; left: 0;
        width: 100%; height: min(86vh, 660px);
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
        box-shadow: 0 -1px 0 rgba(212,175,55,0.12) inset, 0 -30px 90px rgba(0,0,0,0.62);
    }
    .sj-tune-drawer::before {              /* handle bar instead of edge glow */
        top: 0; left: 50%; right: auto; bottom: auto; width: 40px; height: 4px; transform: translateX(-50%);
        margin-top: 10px; border-radius: 4px;
        background: rgba(245,230,196,0.28);
    }
    .sj-tune-head { padding-top: 30px; }
    .sj-tune-drawer.open { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .sj-tune-drawer { transition: none; }
    .sj-tune-scrim { animation: none; }
    .sj-tune-close:hover { transform: none; }
}

/* ============================================================================
   LIVE AUTO-DJ  —  a collapsible bottom drawer that shapes the mix in real time
   ("more seagulls · less tones · add rain"). Detailed to the pixel: a grip
   handle that grows on hover, a spring-open panel, and a submit that burns
   like a small sun.
   ============================================================================ */
/* Collapsed: a small, quiet MICRO-PATH nested in the transport panel — not a
   slab over it. Tapping floats a compact drawer up from the bottom edge. */
.sj-dj {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

/* Live-state readout, integrated into the bar just above the auto-DJ handle.
   Empty (no live data) → collapses, so nothing shows on an offline journey. */
.sj-bar-readout {
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(237, 230, 214, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 48vw;
    margin: 0 14px 0 0;
    pointer-events: none;
}
.sj-bar-readout:empty { display: none; }
.sj-dj-handle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 12px;
    border-radius: 999px;
    font-family: 'Cinzel', serif;
    font-size: 8.5px; letter-spacing: 0.24em; text-transform: uppercase;
    color: rgba(245,230,196,0.5);
    transition: color 0.3s ease, background 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}
.sj-dj-grip { display: none; }                 /* no grip bar in the micro path */
.sj-dj-handle-label span { color: #f5d977; margin-right: 3px; font-size: 10px; }
.sj-dj-handle:hover { color: #fff8e0; background: rgba(245,217,119,0.06); }
.sj-dj--open .sj-dj-handle { color: rgba(245,217,119,0.9); background: rgba(245,217,119,0.08); }

/* Open: a compact floating card that rises from the bottom edge. Content-sized,
   never full-bleed. */
.sj-dj-panel {
    position: fixed;
    left: 50%;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    transform: translateX(-50%) translateY(14px);
    /* Portaled to <body> on open (escapes the playback view's stacking trap),
       so it must sit above #soundscape-playback (z:10000). */
    z-index: 2147483000;
    width: min(380px, calc(100vw - 24px));
    padding: 15px 16px 13px;
    opacity: 0; pointer-events: none;
    text-align: center;
    /* Near-opaque so it reads as a solid card even over the bright visualizer. */
    background-color: rgba(9, 11, 19, 0.985);
    background-image: linear-gradient(180deg, rgba(30,26,52,0.35), transparent 55%);
    border: 0.5px solid rgba(212,175,55,0.3);
    border-radius: 18px;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.05) inset,
        0 18px 60px rgba(0,0,0,0.7),
        0 0 34px rgba(120,90,220,0.12);
    backdrop-filter: blur(20px) saturate(1.1);
    -webkit-backdrop-filter: blur(20px) saturate(1.1);
    transition: opacity 0.32s ease, transform 0.42s cubic-bezier(0.2,0.85,0.25,1);
}
.sj-dj-panel.open { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }

.sj-dj-lead {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 0.98rem;
    color: rgba(237,230,214,0.6);
    margin-bottom: 11px;
    letter-spacing: 0.01em;
}
.sj-dj-chips {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
    margin-bottom: 11px;
}
.sj-dj-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 0.5px solid rgba(160,180,220,0.22);
    background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
    color: rgba(230,236,246,0.8);
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.96rem;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset;
    transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
}
.sj-dj-chip span { font-family: 'Space Mono', monospace; font-size: 10px; opacity: 0.65; }
.sj-dj-chip:hover {
    border-color: rgba(245,217,119,0.5); color: #fff8e0; transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(245,217,119,0.12), 0 1px 0 rgba(255,255,255,0.06) inset;
}
.sj-dj-chip--loading { opacity: 0.5; pointer-events: none; }
.sj-dj-chip--loading span { animation: sj-live-pulse-loading 1s ease-in-out infinite; }
.sj-dj-chip--on {
    border-color: rgba(70,214,196,0.45);
    background: linear-gradient(180deg, rgba(70,214,196,0.14), rgba(70,214,196,0.05));
    color: #b8f0e6;
}
.sj-dj-chip--on .sj-dj-chip-x { color: rgba(184,240,230,0.85); font-size: 10px; }
.sj-dj-chip--open {
    border-color: rgba(245,217,119,0.5);
    background: linear-gradient(180deg, rgba(245,217,119,0.14), rgba(245,217,119,0.04));
    color: #f5e6c4;
}
.sj-dj-chip--open span { color: #f5d977; }
.sj-dj-chip--open:hover { border-color: rgba(245,217,119,0.75); color: #fff8e0; }
.sj-dj-chip--on:hover { border-color: rgba(255,150,150,0.55); color: #ffd6d6; background: rgba(255,120,120,0.09); box-shadow: 0 4px 14px rgba(255,90,90,0.12); }

.sj-dj-form {
    display: flex; align-items: center; gap: 8px;
    max-width: 360px; margin: 0 auto;
}
.sj-dj-input {
    flex: 1;
    padding: 10px 16px;
    border-radius: 999px;
    border: 0.5px solid rgba(212,175,55,0.28);
    background: rgba(4,6,12,0.55);
    color: #f2ecdd;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    text-align: center;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.sj-dj-input::placeholder { color: rgba(200,206,220,0.4); font-style: italic; }
.sj-dj-input:focus {
    border-color: rgba(245,217,119,0.6);
    background: rgba(6,8,16,0.62);
    box-shadow: 0 0 0 0.5px rgba(245,217,119,0.24), 0 0 26px rgba(245,217,119,0.12);
}

/* ── The submit — a small burning sun ── */
.sj-dj-go {
    position: relative;
    flex: 0 0 auto;
    width: 40px; height: 40px; border-radius: 50%;
    border: none;
    color: #3a1500; font-size: 15px; font-weight: 700; line-height: 1; cursor: pointer;
    background: radial-gradient(circle at 42% 34%,
        #fff7e6 0%, #ffe391 18%, #ffb547 42%, #ff8322 64%, #ec4a1b 86%, #b52a10 100%);
    box-shadow:
        0 0 0 1px rgba(255,190,90,0.5) inset,
        0 0 10px rgba(255,150,60,0.65),
        0 0 26px rgba(255,110,40,0.5),
        0 0 48px rgba(230,60,20,0.32),
        0 4px 16px rgba(0,0,0,0.45);
    transition: transform 0.18s cubic-bezier(0.2,0.9,0.3,1.35), box-shadow 0.3s ease, filter 0.3s ease;
    isolation: isolate;
}
.sj-dj-go::before {                 /* slow-rotating corona of flame */
    content: ''; position: absolute; inset: -7px; border-radius: 50%; z-index: -1;
    background: conic-gradient(from 0deg,
        rgba(255,140,50,0), rgba(255,175,65,0.5) 12%, rgba(255,90,30,0) 25%,
        rgba(255,160,55,0.45) 50%, rgba(255,80,20,0) 62%,
        rgba(255,175,65,0.48) 82%, rgba(255,120,40,0) 100%);
    filter: blur(3px);
    animation: sj-sun-rays 9s linear infinite;
}
.sj-dj-go::after {                  /* hot inner core, breathing */
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    background: radial-gradient(circle at 44% 36%, rgba(255,255,244,0.92), transparent 44%);
    mix-blend-mode: screen;
    animation: sj-sun-flicker 3.4s ease-in-out infinite;
}
@keyframes sj-sun-rays { to { transform: rotate(360deg); } }
@keyframes sj-sun-flicker { 0%,100% { opacity: 0.85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.07); } }
.sj-dj-go:hover {
    transform: translateY(-1px) scale(1.07);
    filter: brightness(1.08) saturate(1.12);
    box-shadow:
        0 0 0 1px rgba(255,205,115,0.6) inset,
        0 0 16px rgba(255,160,70,0.85),
        0 0 40px rgba(255,110,40,0.7),
        0 0 72px rgba(230,60,20,0.45),
        0 6px 22px rgba(0,0,0,0.5);
}
.sj-dj-go:active { transform: scale(0.92); }

.sj-dj-status {
    min-height: 16px; margin-top: 12px;
    font-family: 'Space Mono', monospace; font-size: 10px;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: rgba(245,217,119,0.72);
    transition: opacity 0.3s ease;
}
@media (max-width: 640px) {
    .sj-dj { margin-top: 10px; }
    .sj-dj-lead { font-size: 0.98rem; }
    .sj-dj--open .sj-dj-panel { max-height: 400px; }
}
@media (prefers-reduced-motion: reduce) {
    .sj-dj-panel { transition: opacity 0.2s ease; }
    .sj-dj-go::before, .sj-dj-go::after { animation: none; }
}


/* ════════════════════════════════════════════════════════════════════════
   THE BOARD (2026-10-23) — replaces the reel. A sticky intent rail + one
   dense vertical board of compact tiles grouped by room. Browse split from
   play. Equally dense on mobile (3-col). See project-soundscapes-board-redesign.
   ════════════════════════════════════════════════════════════════════════ */

/* slim top strip (was the half-screen hero) */
.sj-topstrip{display:flex;align-items:center;gap:16px;padding:12px 22px;min-height:56px;flex-wrap:wrap;}
.sj-topstrip-wm{font-family:'Cinzel',serif;font-size:16px;letter-spacing:.22em;color:#e8c766;text-transform:uppercase;}
.sj-topstrip .sj-hero-pulse{display:inline-flex;align-items:center;gap:7px;font-family:'Space Mono',monospace;font-size:11px;letter-spacing:.06em;color:#9a93a6;background:none;border:0;padding:0;margin:0;text-transform:lowercase;}
.sj-topstrip .sj-hero-pulse-value{color:#cbe9df;}
.sj-topstrip .sj-hero-pulse-state{opacity:.7;}
.sj-topstrip-grow{flex:1 1 auto;}
.sj-topstrip .sj-tune-btn{font-family:'Space Mono',monospace;font-size:11px;letter-spacing:.08em;color:#d9d2c4;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);border-radius:18px;padding:6px 13px;cursor:pointer;text-transform:uppercase;}
.sj-topstrip .sj-tune-btn:hover{border-color:rgba(232,199,102,.5);color:#f1ead9;}
.sj-topstrip-about{color:#8f8aa0;font-size:15px;text-decoration:none;padding:4px;}
.sj-topstrip-about:hover{color:#e8c766;}
.sj-topstrip-intro{padding:2px 22px 10px;margin:0;font-family:'Cormorant Garamond',Georgia,serif;font-style:italic;font-size:16px;color:#9a93a6;}

/* sticky intent rail — the whole choice-space in one glance */
/* sort lens — reorder the whole library (recently played / most played / newest) */
.sj-sortbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 22px 10px;padding:4px 2px;}
.sj-sortbar-label{font-family:'Space Mono',monospace;font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:#6f6a7c;margin-right:4px;}
.sj-sortbtn{font-family:'Space Mono',monospace;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#b9b2c5;
 background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.1);border-radius:20px;padding:6px 14px;cursor:pointer;white-space:nowrap;transition:.18s;}
.sj-sortbtn:hover{color:#f1ead9;border-color:rgba(232,199,102,.42);}
/* higher-end active pill: a lit-glass gold OUTLINE, not a loud solid fill */
.sj-sortbtn.active{color:#f4ecd6;background:linear-gradient(180deg,rgba(232,199,102,.16),rgba(232,199,102,.045));border-color:rgba(232,199,102,.52);font-weight:600;box-shadow:inset 0 0 0 .5px rgba(232,199,102,.22),0 2px 14px rgba(232,199,102,.09);}
.sj-sort-empty{margin:26px 24px 80px;max-width:560px;font-family:'Cormorant Garamond',Georgia,serif;font-size:1.22rem;line-height:1.5;color:#b7b0c2;font-style:italic;}
/* play-count chip on each card */
.sj-plays{color:#e8c766;font-variant-numeric:tabular-nums;letter-spacing:.02em;}
.sj-plays--new{color:#6f6a7c;font-style:italic;}
.sj-meta-sep{opacity:.42;margin:0 2px;}
@media(max-width:640px){.sj-sortbar{margin:0 12px 8px;}.sj-sortbtn{padding:5px 11px;font-size:10px;}}

.sj-rail{position:sticky;top:58px;z-index:14;display:flex;gap:8px;overflow-x:auto;padding:10px 18px;margin:0 22px;
 background:linear-gradient(180deg,rgba(6,8,15,.95),rgba(6,8,15,.78));backdrop-filter:blur(10px);
 border:1px solid rgba(255,255,255,.06);border-radius:16px;scrollbar-width:none;scroll-snap-type:x proximity;}
.sj-rail::-webkit-scrollbar{display:none;}
.sj-railchip{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;font-family:'Space Mono',monospace;font-size:11px;letter-spacing:.09em;
 text-transform:uppercase;color:#9a93a6;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.08);border-radius:20px;padding:6px 13px;cursor:pointer;white-space:nowrap;transition:.18s;}
.sj-railchip:hover{color:#f1ead9;border-color:rgba(232,199,102,.4);}
.sj-railchip.active{color:#f4ecd6;background:linear-gradient(180deg,rgba(232,199,102,.18),rgba(232,199,102,.05));border-color:rgba(232,199,102,.54);box-shadow:inset 0 0 0 .5px rgba(232,199,102,.2);}
.sj-railchip-ct{font-size:10px;opacity:.72;}
.sj-railchip.active .sj-railchip-ct{opacity:1;color:rgba(232,199,102,.95);}
.sj-railchip-dot{width:6px;height:6px;border-radius:50%;background:#7fe3d0;box-shadow:0 0 6px #7fe3d0;animation:sjTileBreath 2.8s ease-in-out infinite;}

/* the board + sections */
.sj-board{padding:6px 22px 120px;}
.sj-section{margin:30px 0 4px;scroll-margin-top:110px;}
/* more air + a faded hairline under each head — an editorial, gallery feel */
.sj-section-head{position:relative;display:flex;align-items:baseline;gap:12px;padding:2px 2px 11px;margin:6px 0 16px;}
.sj-section-head::after{content:"";position:absolute;left:2px;right:2px;bottom:0;height:1px;
 background:linear-gradient(90deg,rgba(236,228,210,.16),rgba(236,228,210,.05) 42%,transparent 86%);}
.sj-section-title{font-family:'Cinzel',serif;font-size:13.5px;letter-spacing:.28em;text-transform:uppercase;color:#ddd1ec;font-weight:500;margin:0;}
.sj-section-sub{font-family:'Cormorant Garamond',serif;font-style:italic;font-size:14.5px;color:#7a7488;flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.sj-section-ct{font-family:'Space Mono',monospace;font-size:11px;letter-spacing:.06em;color:rgba(232,199,102,.62);font-variant-numeric:tabular-nums;}

.sj-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(188px,1fr));gap:12px;}

/* Rich flip-cards in a shelf grid (restores the gorgeous _renderCard cards).
   The base .soundscape-card has no intrinsic height (only the old reel gave it one),
   so a grid needs an explicit min-height or the flip faces collapse. */
/* Smart shelves (recently/most/just-arrived) — a subtle gold accent marks them
   as the personal/fresh shelves above the mood rooms. */
.sj-railchip--smart{border-color:rgba(218,198,158,0.38);}
.sj-section--smart .sj-section-title{color:#e8d9b8;}

.sj-grid.sj-cardgrid{grid-template-columns:repeat(auto-fill,minmax(266px,1fr));gap:18px;}
.sj-cardgrid .soundscape-card{min-height:clamp(432px,52vh,500px);}
@media(max-width:640px){
  .sj-grid.sj-cardgrid{grid-template-columns:1fr;gap:14px;}
  .sj-cardgrid .soundscape-card{min-height:430px;}
}

/* the tile — self-contained, no .soundscape-card base to fight */
.sj-tile{position:relative;display:flex;flex-direction:column;justify-content:flex-end;box-sizing:border-box;
 aspect-ratio:7/5;min-height:0;border-radius:18px;overflow:hidden;cursor:pointer;padding:12px;
 border:1px solid rgba(255,255,255,.06);background:#0c0e16;isolation:isolate;
 box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 1px 2px rgba(0,0,0,.4);
 transition:transform .2s cubic-bezier(.2,.7,.2,1),box-shadow .2s ease,border-color .2s ease;
 font-family:inherit;text-align:left;-webkit-tap-highlight-color:transparent;}
.sj-tile:hover,.sj-tile:focus-visible{transform:translateY(-3px);outline:none;
 border-color:hsla(var(--jh,42),var(--js,50%),72%,.4);
 box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 18px 38px rgba(0,0,0,.55),0 0 24px hsla(var(--jh,42),var(--js,50%),55%,.18);}
.sj-tile:focus-visible{box-shadow:0 0 0 2px #e8c766,0 18px 38px rgba(0,0,0,.55);}
.sj-tile:active{transform:translateY(-1px) scale(.988);transition-duration:.08s;}
.sj-tile-grad{position:absolute;inset:0;z-index:0;background:linear-gradient(150deg,var(--g1,#20243a),var(--g2,#141726) 55%,var(--g3,#0c0e16));filter:saturate(.82) brightness(.9);transition:filter .25s ease;}
.sj-tile:hover .sj-tile-grad,.sj-tile:focus-visible .sj-tile-grad{filter:saturate(1) brightness(1.04);}
.sj-tile-scrim{position:absolute;inset:0;z-index:1;background:linear-gradient(0deg,rgba(6,8,15,.82),rgba(6,8,15,.12) 55%,rgba(6,8,15,.28));}
/* Live breath — a radial bloom in the tile's own hue, amplitude + speed scaled
   by the REAL reading (--sj-live-energy / --sj-live-breath set in JS). Behind the
   text (z-index 1), screen-blended, paused when the tab is hidden. */
.sj-tile--live[data-live-active]::after{content:'';position:absolute;inset:0;z-index:1;pointer-events:none;border-radius:inherit;mix-blend-mode:screen;
 background:radial-gradient(130% 95% at 50% 118%,hsla(var(--jh,170),var(--js,60%),var(--jl,62%),calc(.14 + var(--sj-live-energy,.4) * .5)),transparent 68%);
 animation:sjLiveBreath var(--sj-live-breath,5s) ease-in-out infinite;}
@keyframes sjLiveBreath{0%,100%{opacity:calc(.3 + var(--sj-live-energy,.4) * .25);}50%{opacity:calc(.62 + var(--sj-live-energy,.4) * .38);}}
.sj-doc-hidden .sj-tile--live[data-live-active]::after{animation-play-state:paused;}
.sj-tile-body{position:relative;z-index:2;}
.sj-tile-name{display:block;font-family:'Cinzel',serif;font-size:14.5px;line-height:1.12;letter-spacing:.015em;color:#f3ecdc;
 text-shadow:0 2px 10px rgba(0,0,0,.85);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.sj-tile-meta{display:flex;align-items:center;gap:7px;margin-top:6px;font-family:'Space Mono',monospace;font-size:10.5px;letter-spacing:.05em;color:rgba(241,234,217,.82);text-shadow:0 1px 6px rgba(0,0,0,.9);}
.sj-tile-ico{opacity:.9;font-size:12px;}
.sj-tile-play{position:absolute;right:11px;bottom:11px;z-index:3;width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;
 font-size:10px;color:#0c0e16;background:rgba(241,234,217,.92);opacity:0;transform:scale(.8);transition:.18s;}
.sj-tile:hover .sj-tile-play,.sj-tile:focus-visible .sj-tile-play{opacity:1;transform:scale(1);}
.sj-tile-live.sj-live-badge{position:absolute;top:9px;left:10px;z-index:3;display:inline-flex;align-items:center;gap:5px;
 font-family:'Space Mono',monospace;font-size:9px;letter-spacing:.1em;color:#bff0e4;background:rgba(10,24,22,.6);border:1px solid rgba(127,227,208,.3);border-radius:10px;padding:2px 7px;}
.sj-tile-live .sj-live-dot{width:5px;height:5px;border-radius:50%;background:#7fe3d0;box-shadow:0 0 6px #7fe3d0;animation:sjTileBreath 2.6s ease-in-out infinite;}
@keyframes sjTileBreath{0%,100%{opacity:.45;transform:scale(.8);}50%{opacity:1;transform:scale(1.15);}}

/* mobile — same board, denser 3-col (Jason's pick). Equally rich. */
@media(max-width:680px){
 .sj-topstrip{padding:10px 14px;gap:10px;}
 .sj-topstrip-intro{padding:0 14px 8px;font-size:14px;}
 .sj-rail{padding:9px 12px;top:54px;margin:0 12px;border-radius:14px;}
 .sj-board{padding:4px 12px 120px;}
 .sj-section-sub{display:none;}
 .sj-grid{grid-template-columns:repeat(3,1fr);gap:9px;}
 .sj-tile{aspect-ratio:1/1;padding:9px;border-radius:14px;}
 .sj-tile-name{font-size:11.5px;}
 .sj-tile-meta{font-size:9px;gap:4px;}
 .sj-tile-play{display:none;}
}
@media(prefers-reduced-motion:reduce){
 .sj-railchip-dot,.sj-tile-live .sj-live-dot{animation:none;}
 .sj-tile{transition:none;}
 /* keep a static mid-intensity bloom on live tiles, no breathing */
 .sj-tile--live[data-live-active]::after{animation:none;opacity:calc(.4 + var(--sj-live-energy,.4) * .3);}
}

/* ════════════════════════════════════════════════════════════════════════
   ELEVATION LAYER (20261115-elevate) — build UP from the floor's rich flip
   cards. ADDITIVE ONLY: every glass layer kept; material raised to museum
   grade (lit base, film grain, depth shadow stack, refined aurora, a live
   instrument band replacing the gold ring). Edge-to-edge carousel rails.
   ════════════════════════════════════════════════════════════════════════ */

/* ── Card substrate: lit near-black so the hue reads as emitted light, a
   per-hue radial bloom, and a real 3-layer depth shadow. ── */
.soundscape-card .jc-face{
  background:
    radial-gradient(120% 90% at 18% 0%, hsla(var(--jh,210),var(--js,55%),26%,0.55) 0%, transparent 52%),
    linear-gradient(168deg, color-mix(in srgb, var(--gradient-1,#1a1d30) 72%, #06070c) 0%,
                            color-mix(in srgb, var(--gradient-2,#20233c) 60%, #06070c) 56%,
                            #06070c 100%) !important;
  border:1px solid rgba(236,228,210,0.085) !important;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.5),
    0 10px 28px rgba(0,0,0,0.42),
    0 42px 80px -34px rgba(0,0,0,0.62),
    0 0 0 0 hsla(var(--jh,210),var(--js,60%),55%,0) !important;
  transition:transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s ease, border-color .45s ease;
}
/* film grain — kills gradient banding, reads as premium matte material */
.soundscape-card .jc-face::after{
  content:""; position:absolute; inset:0; z-index:6; pointer-events:none; border-radius:inherit;
  opacity:.05; mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* reward the cursor: lift, lengthen shadow, bloom the hue */
.soundscape-card:hover{ transform:translateY(-4px); z-index:5; }
.soundscape-card:hover .jc-face{
  border-color:rgba(236,228,210,0.18) !important;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.5),
    0 16px 40px rgba(0,0,0,0.5),
    0 56px 96px -34px rgba(0,0,0,0.66),
    0 0 34px hsla(var(--jh,210),var(--js,60%),56%,0.18) !important;
}

/* ── Refined aurora-curtain — kept (NOT deleted), turned into soft light:
   blurred, screen-blended, slow, confined to the mid/lower field. ── */
body.sj-glass .soundscape-card .aurora-curtain{
  inset:0 !important; opacity:.5 !important; filter:blur(12px) saturate(1.1) !important;
  mix-blend-mode:screen; -webkit-mask-image:linear-gradient(180deg,transparent 0%,#000 34%,#000 88%,transparent 100%);
          mask-image:linear-gradient(180deg,transparent 0%,#000 34%,#000 88%,transparent 100%);
}
body.sj-glass .soundscape-card .aurora-curtain path{ animation-duration:24s !important; }
body.sj-glass .soundscape-card .aurora-curtain path.band-2{ animation-duration:30s !important; }
body.sj-glass .soundscape-card .glass-specular{ opacity:.5; }

/* ── THE LIVE INSTRUMENT — the card's signature, now FULL-BLEED: it fills the
   whole plate (as the floor's aurora-curtain did), per-type and sharper, so no
   dead void can open below a capped band. Luminous strokes in the card hue,
   driven by --sj-live-energy. Content floats over it on a scrim + vignette. ── */
.sj-inst-band{
  position:absolute; inset:0; z-index:2;
  overflow:hidden; pointer-events:none; border-radius:inherit;
  /* present across the whole card, brightest in the upper field, softened (not
     killed) where the name block + meta sit so type stays crisp */
  -webkit-mask-image:linear-gradient(180deg,#000 0%,#000 46%,rgba(0,0,0,0.60) 74%,rgba(0,0,0,0.40) 100%);
          mask-image:linear-gradient(180deg,#000 0%,#000 46%,rgba(0,0,0,0.60) 74%,rgba(0,0,0,0.40) 100%);
  opacity:.92; filter:drop-shadow(0 0 10px hsla(var(--jh,210),var(--js,60%),60%,0.28));
  transition:opacity .45s ease, filter .45s ease;
}
.soundscape-card:hover .sj-inst-band{ opacity:1; filter:drop-shadow(0 0 16px hsla(var(--jh,210),var(--js,62%),62%,0.4)); }
.sj-inst-band .tv{ position:absolute; inset:0; width:100%; height:100%; display:block; }
/* hue accent hairline at the very top edge */
.jc-front::before{
  content:""; position:absolute; top:0; left:12%; right:12%; height:2px; z-index:7; border-radius:2px;
  background:linear-gradient(90deg, transparent, hsla(var(--jh,210),var(--js,62%),62%,0.9), transparent);
}
/* content flows from the top as a caption over the living plate; the name block
   still bottom-weights (margin-top:auto). A readability scrim rides the whole
   column so text stays crisp over the full-bleed instrument — no dead gap. */
.jc-front .soundscape-card-content{ padding-top:22px !important; }
.jc-front .soundscape-card-content::before{
  content:""; position:absolute; inset:0; z-index:-1; pointer-events:none; border-radius:inherit;
  background:
    radial-gradient(120% 80% at 50% 118%, rgba(5,6,11,0.82), transparent 70%),
    linear-gradient(180deg, rgba(5,6,11,0.34) 0%, transparent 24%, transparent 52%, rgba(5,6,11,0.46) 78%, rgba(5,6,11,0.72) 100%);
}
.jc-front .soundscape-name{ font-size:1.34rem; letter-spacing:0.012em; }
.jc-front .sj-type-chip{ letter-spacing:0.16em; }

/* taller portrait plate */
/* body.sj-glass prefix REQUIRED — `body.sj-glass .soundscape-card{min-height:260px}`
   out-specifies a bare `.sj-railrow > .soundscape-card`, so match its specificity. */
body.sj-glass .sj-railrow > .soundscape-card,
.sj-railrow > .soundscape-card{ min-height:clamp(148px,21vh,186px) !important; height:clamp(148px,21vh,186px); overflow:hidden; }

/* instrument-band motion (shared, slow, gated) */
.sj-inst-band .tv-aurora path{animation:tvSway 9s ease-in-out infinite;}
.sj-inst-band .tv-aurora path:nth-child(2){animation-duration:12s;animation-delay:-3s;}
.sj-inst-band .tv-aurora path:nth-child(3){animation-duration:8s;animation-delay:-1s;}
@keyframes tvSway{0%,100%{transform:translateX(0)}50%{transform:translateX(4px)}}
.sj-inst-band .tv-wave path,.sj-inst-band .tv-sine path{animation:tvDrift 7s ease-in-out infinite;animation-delay:var(--d,0s);}
@keyframes tvDrift{0%,100%{transform:translateX(0)}50%{transform:translateX(-9px)}}
.sj-inst-band .tv-solar,.sj-inst-band .tv-moon{animation:tvGlow 6.5s ease-in-out infinite;transform-box:fill-box;transform-origin:center;}
@keyframes tvGlow{0%,100%{opacity:.74}50%{opacity:1}}
.sj-inst-band .tv-rain .tv-drop{animation:tvRain 1.2s linear infinite;animation-delay:var(--d,0s);}
@keyframes tvRain{0%{transform:translateY(-8px);opacity:0}25%{opacity:.6}100%{transform:translateY(42px);opacity:0}}
.sj-inst-band .tv-stars .tv-star{animation:tvTwinkle 3.4s ease-in-out infinite;animation-delay:var(--d,0s);}
@keyframes tvTwinkle{0%,100%{opacity:.28}50%{opacity:1}}
.sj-inst-band .tv-rings .tv-ring{animation:tvRings 5s ease-in-out infinite;animation-delay:var(--d,0s);transform-box:fill-box;transform-origin:center;}
@keyframes tvRings{0%,100%{transform:scale(.92);opacity:.3}50%{transform:scale(1.08);opacity:.6}}
.sj-doc-hidden .sj-inst-band *{animation-play-state:paused!important;}
@media(prefers-reduced-motion:reduce){.sj-inst-band *{animation:none!important;}}

/* ── LIVE-ENERGY REACTIVITY — the scene reads the card's real feed magnitude.
   --sj-live-energy (0..1, set by _populateLiveBadges from the live value) drives
   brightness, saturation, glow radius and pulse SPEED. A geomagnetic storm or a
   big swell makes the picture visibly brighter, hotter and faster; a quiet feed
   stays dim and slow. It's a CSS var, so the scene re-reacts the instant the
   feed updates — no re-render. Overrides the static filter set above. ── */
.soundscape-card{ --e: var(--sj-live-energy, 0.3); }
body.sj-glass .sj-inst-band,
.sj-inst-band{
  filter:
    saturate(calc(0.8 + var(--e) * 1.05))
    brightness(calc(0.82 + var(--e) * 0.6))
    drop-shadow(0 0 calc(5px + var(--e) * 18px) hsla(var(--jh,210),var(--js,62%),62%,calc(0.18 + var(--e) * 0.5)));
  animation: sjEnergyPulse calc(11s - var(--e) * 7s) ease-in-out infinite;
  transition: filter .6s ease;
}
@keyframes sjEnergyPulse{ 0%,100%{ opacity:calc(0.8 + var(--e) * 0.12); } 50%{ opacity:1; } }
.soundscape-card:hover .sj-inst-band{
  filter:
    saturate(calc(0.92 + var(--e) * 1.1))
    brightness(calc(0.92 + var(--e) * 0.66))
    drop-shadow(0 0 calc(9px + var(--e) * 24px) hsla(var(--jh,210),var(--js,64%),64%,calc(0.28 + var(--e) * 0.55)));
}
.sj-doc-hidden .sj-inst-band{ animation-play-state:paused; }
@media(prefers-reduced-motion:reduce){ .sj-inst-band{ animation:none; } }

/* ── Edge-to-edge carousel rails ── */
.sj-railwrap{ position:relative; }
.sj-railrow{
  display:flex !important; flex-wrap:nowrap; align-items:stretch; gap:14px;
  overflow-x:auto; overflow-y:visible; scroll-snap-type:x proximity; scroll-padding-left:44px;
  width:100vw; max-width:100vw; margin-left:calc(50% - 50vw); margin-right:calc(50% - 50vw);
  padding:14px 48px 24px 44px;
  -webkit-overflow-scrolling:touch; overscroll-behavior-x:contain; scrollbar-width:none; cursor:grab;
  /* soft dissolve at both screen edges — gallery, not a scroll box */
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 3.2%,#000 96.5%,transparent 100%);
          mask-image:linear-gradient(90deg,transparent 0,#000 3.2%,#000 96.5%,transparent 100%);
}
.sj-railrow::-webkit-scrollbar{ display:none; }
.sj-railrow.sj-dragging{ cursor:grabbing; scroll-snap-type:none; }
.sj-railrow.sj-dragging *{ cursor:grabbing; }
/* SHOW THE ARRAY — SMALL image-forward cards. The card is mostly its
   illustrated scene with the live badge up top and the name over the base;
   the verbose copy (desc, subtitle, type line, meta) and the button row are
   hidden by default so the frame is short and roughly square — a gallery wall,
   not 3 tall posters. Play + details reveal on hover; tap still flips. ~1/4
   the old footprint so a dozen read at once. */
.sj-railrow > .soundscape-card{ flex:0 0 clamp(132px,11vw,172px); width:clamp(132px,11vw,172px); scroll-snap-align:start; }
.sj-railrow > .soundscape-card .jc-front .soundscape-card-content{
  padding:9px 11px 11px !important; padding-top:9px !important; justify-content:space-between;
}
/* collapse the stacked copy that forces height */
.sj-railrow > .soundscape-card .sj-func-desc,
.sj-railrow > .soundscape-card .soundscape-subtitle,
.sj-railrow > .soundscape-card .sj-type-line,
.sj-railrow > .soundscape-card .soundscape-meta,
.sj-railrow > .soundscape-card .sj-live-src{ display:none !important; }
/* tiny live chip, name over the base */
.sj-railrow > .soundscape-card .sj-type-chip{ font-size:9px; letter-spacing:.1em; padding:2px 7px; }
.sj-railrow > .soundscape-card .sj-live-badge{ padding:2px 7px; font-size:9px; }
/* !important + body.sj-glass prefix REQUIRED to beat the hero rule
   `body.sj-glass .soundscape-card--hero .soundscape-name{font-size:22px!important}`
   which otherwise oversizes Aurora's name and shatters it on the small card. */
body.sj-glass .sj-railrow > .soundscape-card.soundscape-card--hero .soundscape-name,
body.sj-glass .sj-railrow > .soundscape-card .jc-front .soundscape-name,
.sj-railrow > .soundscape-card .jc-front .soundscape-name{
  font-size:.86rem !important; line-height:1.12 !important; margin:0 0 2px; letter-spacing:.01em !important;
  overflow-wrap:break-word; max-width:100%;   /* wrap at spaces; break a word only if it truly can't fit */
}
/* the live badge can wrap wide on a 132px card — keep it from clipping the chip */
.sj-railrow > .soundscape-card .sj-card-top{ flex-wrap:wrap; gap:4px; row-gap:3px; }
.sj-railrow > .soundscape-card .sj-live-badge{ max-width:100%; }
/* actions hidden by default, revealed on hover without growing the box */
.sj-railrow > .soundscape-card .sj-card-actions{
  margin-top:6px; gap:6px; opacity:0; max-height:0; overflow:hidden; transition:opacity .25s ease, max-height .25s ease;
}
.sj-railrow > .soundscape-card:hover .sj-card-actions,
.sj-railrow > .soundscape-card:focus-within .sj-card-actions{ opacity:1; max-height:44px; }
.sj-railrow > .soundscape-card .soundscape-start-btn{ padding:5px 12px; font-size:11px; }
/* The flip BACK (full details) shares the grid cell and forces the card tall.
   A 170px card has no room for it — drop it in compact so the card collapses
   to the short front; tapping the card / Play still plays, details live in the
   playback view. Clip the frame to the set height. */
.sj-railrow > .soundscape-card{ overflow:hidden; }
.sj-railrow > .soundscape-card .soundscape-card-inner{ height:100%; }
.sj-railrow > .soundscape-card .jc-back{ display:none !important; }
.sj-railrow > .soundscape-card .jc-flip-btn{ display:none !important; }

/* ═══ HIGHER-END PASS — make the small cards read like framed gallery pieces:
   a matted inner frame, fine hairline + top bevel, refined serif with a
   legibility shadow, restrained chip, and an elegant hover lift+glow. Material
   only — nothing removed. ═══ */
body.sj-glass .sj-railrow > .soundscape-card .jc-face{
  border-radius:15px !important;
  border:1px solid rgba(236,228,210,0.11) !important;
  box-shadow:
    0 1px 1px rgba(0,0,0,.55),
    0 10px 24px -8px rgba(0,0,0,.6),
    0 30px 46px -28px rgba(0,0,0,.6),
    inset 0 1px 0 rgba(255,255,255,.07) !important;
}
/* matted inner frame over the scene — the "museum mat" that reads as premium */
.sj-railrow > .soundscape-card .jc-front{
  box-shadow: inset 0 0 0 1px rgba(236,228,210,.07), inset 0 0 26px rgba(4,5,10,.5);
}
/* refined serif name, warm ivory, legible over any scene */
.sj-railrow > .soundscape-card .jc-front .soundscape-name{
  color:#f3ecda; font-weight:600; text-shadow:0 1px 10px rgba(3,4,9,.72), 0 0 1px rgba(0,0,0,.5);
}
/* a hair-thin gold rule under the name — a couture detail, not a border */
.sj-railrow > .soundscape-card .jc-front .soundscape-name::after{
  content:""; display:block; width:26px; height:1px; margin-top:5px;
  background:linear-gradient(90deg, hsla(42,70%,62%,.85), transparent);
}
/* restrained eyebrow chip */
.sj-railrow > .soundscape-card .sj-type-chip{
  color:rgba(236,228,210,.52) !important; background:rgba(255,255,255,.035) !important;
  border:1px solid rgba(236,228,210,.1) !important; border-radius:20px; text-transform:uppercase;
}
/* elegant hover: a measured lift + scale + hue bloom, cursor rewarded */
.sj-railrow > .soundscape-card{ transition:transform .4s cubic-bezier(.2,.8,.2,1); }
.sj-railrow > .soundscape-card:hover{ transform:translateY(-6px) scale(1.02); z-index:7; }
body.sj-glass .sj-railrow > .soundscape-card:hover .jc-face{
  border-color:rgba(236,228,210,.22) !important;
  box-shadow:
    0 2px 3px rgba(0,0,0,.55),
    0 18px 36px -10px rgba(0,0,0,.62),
    0 40px 64px -30px rgba(0,0,0,.66),
    0 0 26px hsla(var(--jh,210),var(--js,60%),58%,.2),
    inset 0 1px 0 rgba(255,255,255,.1) !important;
}

.sj-rail-arrow{
  position:absolute; top:calc(50% + 8px); transform:translateY(-50%); z-index:8;
  width:40px; height:40px; border-radius:50%; cursor:pointer;
  background:rgba(10,12,20,0.72); border:1px solid rgba(236,228,210,0.16); color:#efe9dc;
  font-size:20px; line-height:1; display:grid; place-items:center;
  backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
  opacity:0; transition:opacity .3s ease, background .3s ease; box-shadow:0 6px 20px rgba(0,0,0,0.4);
}
.sj-railwrap:hover .sj-rail-arrow{ opacity:.95; }
.sj-rail-arrow:hover{ background:rgba(20,24,38,0.92); }
.sj-rail-arrow--prev{ left:10px; }
.sj-rail-arrow--next{ right:10px; }
.sj-railwrap[data-atstart="1"] .sj-rail-arrow--prev{ opacity:0 !important; pointer-events:none; }
.sj-railwrap[data-atend="1"] .sj-rail-arrow--next{ opacity:0 !important; pointer-events:none; }
.sj-section-head{ padding-left:4px; }

@media(max-width:640px){
  .sj-railrow{ padding:8px 18px 18px 16px; scroll-padding-left:16px; cursor:default; gap:14px; }
  .sj-railrow > .soundscape-card{ flex:0 0 84vw; width:84vw; min-height:clamp(392px,62vh,452px); }
  .sj-rail-arrow{ display:none !important; }
}
