:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 8rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);

  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;

  --font-display: 'Cabinet Grotesk', 'Satoshi', sans-serif;
  --font-body: 'Satoshi', 'Helvetica Neue', sans-serif;

  --header-h: 4.25rem;
  --player-h: 4.75rem;
}

:root,
[data-theme='light'] {
  --color-bg: #f3eee6;
  --color-surface: #faf6ef;
  --color-surface-2: #fffdf8;
  --color-surface-offset: #ebe4d8;
  --color-divider: #ddd4c6;
  --color-border: oklch(0.28 0.03 60 / 0.14);
  --color-text: #1c1712;
  --color-text-muted: #6d6458;
  --color-text-faint: #9a9184;
  --color-text-inverse: #f7f1e8;
  --color-primary: #a34b1a;
  --color-primary-hover: #833910;
  --color-primary-active: #64280b;
  --color-error: #a12c7b;
  --color-success: #3d6b22;
  --shadow-sm: 0 1px 2px oklch(0.28 0.03 60 / 0.08);
  --shadow-md: 0 6px 20px oklch(0.28 0.03 60 / 0.1);
  --shadow-lg: 0 16px 40px oklch(0.28 0.03 60 / 0.14);
}

[data-theme='dark'] {
  --color-bg: #070b14;
  --color-surface: #0d1422;
  --color-surface-2: #121a2b;
  --color-surface-offset: #162033;
  --color-divider: #1e2a40;
  --color-border: oklch(0.75 0.06 250 / 0.18);
  --color-text: #e8eef8;
  --color-text-muted: #9aa8c0;
  --color-text-faint: #6f7f99;
  --color-text-inverse: #070b14;
  --color-primary: #3db4ff;
  --color-primary-hover: #6cc7ff;
  --color-primary-active: #1a8fd9;
  --color-error: #d163a7;
  --color-success: #6daa45;
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
  --shadow-md: 0 8px 28px oklch(0.45 0.12 250 / 0.25);
  --shadow-lg: 0 18px 48px oklch(0 0 0 / 0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #100e0c;
    --color-surface: #181512;
    --color-surface-2: #1f1b17;
    --color-surface-offset: #241f1a;
    --color-divider: #2c2722;
    --color-border: oklch(0.9 0.02 80 / 0.12);
    --color-text: #ede6da;
    --color-text-muted: #9a9184;
    --color-text-faint: #6e675c;
    --color-text-inverse: #161310;
    --color-primary: #e09458;
    --color-primary-hover: #f0ab72;
    --color-primary-active: #c56a2d;
    --color-error: #d163a7;
    --color-success: #6daa45;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.28);
    --shadow-md: 0 8px 24px oklch(0 0 0 / 0.4);
    --shadow-lg: 0 18px 48px oklch(0 0 0 / 0.5);
  }
}

body.has-player {
  padding-bottom: calc(var(--player-h) + var(--space-6));
}

.cart-actions {
  display: grid;
  gap: var(--space-3);
}

.cart-actions .btn {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.cart-note {
  margin-top: var(--space-3);
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-3);
}

/* `body > *:not(.palm-backdrop)` (position: relative) used to beat .skip-link's absolute
   positioning, so the hidden link still took ~26px of flow space above the header. */
body > a.skip-link {
  position: absolute;
}

.wrap {
  width: min(100% - var(--space-8), var(--content-wide));
  margin-inline: auto;
}

.wrap-narrow {
  width: min(100% - var(--space-8), var(--content-default));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-h);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
  min-height: 44px;
}

.logo-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: var(--text-sm);
  text-transform: uppercase;
}

.nav {
  display: none;
  align-items: center;
  gap: var(--space-6);
}

.nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--color-text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  border-radius: var(--radius-md);
}

.icon-btn:hover {
  background: var(--color-surface-offset);
}

.icon-btn:active {
  transform: scale(0.97);
}

.icon-btn:focus {
  outline: none;
}

.icon-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.cart-btn {
  position: relative;
}

.cart-count {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--text-xs);
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.cart-count.is-on {
  display: inline-flex;
}

.nav-toggle {
  display: inline-flex;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
}

.mobile-nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 3;
  width: 100%;
  border-bottom: 1px solid var(--color-border);
  /* Solid, opaque panel (dark navy in the default theme). */
  background-color: #0d1422;
  background-color: var(--color-surface);
  padding: var(--space-2) var(--space-4) var(--space-4);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: var(--space-2) var(--space-2);
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--text-lg);
  font-weight: 500;
  border-bottom: 1px solid var(--color-border);
  -webkit-tap-highlight-color: rgba(61, 180, 255, 0.2);
  touch-action: manipulation;
}

.mobile-nav a:last-child {
  border-bottom: 0;
}

.mobile-nav a[aria-current='page'] {
  color: var(--color-primary);
}

/* The generic `body > *:not(.palm-backdrop)` rule (below) gives every body child z-index 1, which
   used to leave the header (and its dropdown) *under* <main>: the menu showed see-through over the
   hero and taps went to the page. Keep the header above the page but below the player bar (60). */
body > header.site-header {
  position: relative;
  z-index: 55;
}

.header-inner {
  position: relative;
  z-index: 2;
}

/* Full-screen scrim behind the open panel: catches outside taps, dims the page. */
.nav-scrim {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  background: rgba(4, 7, 13, 0.6);
  -webkit-tap-highlight-color: transparent;
}

@supports ((-webkit-backdrop-filter: blur(4px)) or (backdrop-filter: blur(4px))) {
  .nav-scrim {
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }
}

html.nav-open .nav-scrim {
  display: block;
}

html.nav-open,
html.nav-open body {
  overflow: hidden;
}

@media (min-width: 768px) {
  .mobile-nav.is-open,
  html.nav-open .nav-scrim {
    display: none;
  }
}

/* Pages */
.page {
  display: none;
}

.page.is-active {
  display: block;
}

#page-about,
#page-contact {
  padding-top: calc(var(--header-h) + var(--space-4));
}

/* Hero */
.hero {
  display: grid;
  gap: var(--space-8);
  padding-block: clamp(var(--space-10), 8vw, var(--space-20));
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: end;
    gap: var(--space-12);
    min-height: 72vh;
  }
}

.eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-bottom: var(--space-4);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  letter-spacing: -0.03em;
  max-width: 12ch;
  margin-bottom: var(--space-6);
}

.hero-copy {
  color: var(--color-text-muted);
  max-width: 38ch;
  margin-bottom: var(--space-8);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.hero-figure {
  position: relative;
  /* grid item: never let the carousel's slide row widen the single mobile column during load */
  min-width: 0;
}

.hero-figure img {
  width: 100%;
  height: min(62vh, 560px);
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: var(--color-surface-offset);
}

.palm-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.palm-bg {
  position: absolute;
  bottom: -6%;
  width: min(280px, 32vw);
  height: auto;
  opacity: 0.22;
  color: #0a1628;
}

[data-theme='dark'] .palm-bg {
  color: #5ec8ff;
  opacity: 0.18;
  filter: drop-shadow(0 0 24px rgba(62, 180, 255, 0.35));
}

.palm-bg-1 { left: -4%; transform: rotate(-8deg); }
.palm-bg-2 { right: -5%; transform: rotate(7deg); }
.palm-bg-3 { left: 38%; bottom: -18%; width: min(220px, 26vw); opacity: 0.12; transform: rotate(2deg); }

[data-theme='dark'] .palm-bg-3 { opacity: 0.1; }

body > *:not(.palm-backdrop) {
  position: relative;
  z-index: 1;
}

/* The hero palms (.hero-frame, inset -10%) and other decorative art bleed past the
   viewport edge. Clip horizontal overflow at <main> so the page never gets wider than
   the screen (no sideways scroll, no mobile zoom-out). The sticky header lives outside
   <main>, so the scroll container created by the iOS 15 `hidden` fallback can't affect it. */
main {
  overflow-x: hidden;
}
@supports (overflow: clip) {
  main {
    overflow-x: clip;
  }
}

.hero-frame {
  pointer-events: none;
  position: absolute;
  top: -8%;
  right: -10%;
  bottom: -2%;
  left: -10%;
  z-index: 2;
  overflow: visible;
}

.palm {
  position: absolute;
  bottom: 0;
  width: clamp(110px, 28%, 200px);
  height: auto;
  color: #061018;
  opacity: 0.92;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.45));
}

[data-theme='dark'] .palm {
  color: #04101c;
  opacity: 0.95;
  filter: drop-shadow(0 0 20px rgba(62, 180, 255, 0.35));
}

[data-theme='light'] .palm {
  color: #1a2433;
  opacity: 0.55;
}

.palm-left {
  left: -6%;
  transform: rotate(-8deg);
}

.palm-right {
  right: -6%;
  transform: rotate(8deg);
}

html[data-theme='dark'] body {
  background-color: var(--color-bg);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -15%, rgba(40, 110, 200, 0.28), transparent 62%),
    radial-gradient(ellipse 45% 35% at 92% 85%, rgba(220, 120, 40, 0.12), transparent 55%);
  background-attachment: fixed;
}




.hero-slides {
  position: relative;
  width: 100%;
  height: min(62vh, 560px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-offset);
}

.hero-slider .hero-slide {
  position: absolute;
  inset: 0;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slider .hero-slide:first-child {
  object-position: center 30%;
}

.hero-slider .hero-slide.is-active {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slider .hero-slide { transition: none; }
}

.hero-caption {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ---------- Hero photo carousel (scroll-snap + small JS layer in app.js) ----------
   Same frame as the old single image: full width, min(62vh, 560px) tall, rounded, cover.
   The track is the only horizontal scroller and it clips its own slides, so the page never
   gets wider than the screen. */
.hero-carousel {
  position: relative;
}

.hc-stage {
  position: relative;
}

.hc-track {
  display: flex;
  width: 100%;
  height: min(62vh, 560px);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-radius: var(--radius-lg);
  background: var(--color-surface-offset);
  /* own stacking context: keeps the rounded corners clipping while scrolling on iOS Safari */
  isolation: isolate;
  transform: translateZ(0);
  outline-offset: 3px;
}

.hc-track::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.hc-track.is-dragging {
  scroll-snap-type: none;
  scroll-behavior: auto;
  cursor: grabbing;
}

.hc-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.hc-slide picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-figure .hc-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  background: var(--color-surface-offset);
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* Cap photo (slide 1): anchor to the top so the cap text and face never get cropped
   (desktop crops height, mobile crops the sides; the subject is centred horizontally). */
.hero-figure .hc-slide img.hc-img-top {
  object-position: center top;
}

/* Palms now hang off the image stage (not the whole figure): keep them where they were,
   bleeding past the image bottom by about the old caption height. */
.hc-stage > .hero-frame {
  top: -8%;
  right: -10%;
  bottom: calc(-2% - 2rem);
  left: -10%;
}

.hc-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-1, 0.25rem);
  margin-top: var(--space-2);
  position: relative;
  z-index: 3;
}

.hc-dot {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  -webkit-tap-highlight-color: transparent;
}

.hc-dot::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-text-faint);
  opacity: 0.55;
  transition: background var(--transition-interactive), opacity var(--transition-interactive), transform var(--transition-interactive);
}

.hc-dot:hover::before {
  opacity: 0.9;
}

.hc-dot.is-active::before {
  background: var(--color-primary);
  opacity: 1;
  transform: scale(1.15);
}

.hc-dots + .hero-caption,
.hero-carousel + .hero-caption {
  margin-top: var(--space-1, 0.25rem);
}

/* Prev/next arrows: desktop (fine pointer + hover) only, shown on hover/focus. */
.hc-arrow {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .hc-track {
    cursor: grab;
  }
  .hc-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    border-radius: var(--radius-full);
    color: #fff;
    background: rgba(7, 11, 20, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity var(--transition-interactive), background var(--transition-interactive);
  }
  .hc-prev { left: var(--space-3); }
  .hc-next { right: var(--space-3); }
  .hc-stage:hover .hc-arrow,
  .hc-arrow:focus-visible {
    opacity: 1;
  }
  .hc-arrow:hover {
    background: rgba(7, 11, 20, 0.7);
  }
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 550;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
}

.btn-primary:active {
  background: var(--color-primary-active);
  transform: translateY(1px);
}

.btn-ghost {
  border-color: var(--color-border);
  color: var(--color-text);
  background: transparent;
}

.btn-ghost:hover {
  background: var(--color-surface-offset);
}

.btn-small {
  min-height: 40px;
  padding: 0 var(--space-4);
}

/* Featured */
.featured {
  padding-block: clamp(var(--space-8), 5vw, var(--space-16));
}

.featured-card {
  display: grid;
  gap: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .featured-card {
    grid-template-columns: 220px 1fr;
    padding: var(--space-5);
    gap: var(--space-8);
    align-items: center;
  }
}

.featured-cover {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: calc(var(--radius-xl) - var(--space-4));
  background: var(--color-surface-offset);
}

.kicker {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.featured h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.meta {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.featured-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.wave {
  margin-top: var(--space-5);
  width: 100%;
  height: 48px;
  border-radius: var(--radius-sm);
}

/* Catalog */
.catalog {
  padding-block: clamp(var(--space-10), 6vw, var(--space-20));
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
}

.section-head p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.chip {
  min-height: 40px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  background: transparent;
}

.chip:hover {
  color: var(--color-text);
  border-color: oklch(from var(--color-text) l c h / 0.28);
}

.chip[aria-pressed='true'] {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

.track-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-border);
}

.track {
  display: grid;
  grid-template-columns: 44px 56px minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

@media (min-width: 720px) {
  .track {
    grid-template-columns: 44px 64px minmax(0, 1.4fr) 90px 90px 80px auto;
  }
}

.track.is-playing {
  background: oklch(from var(--color-primary) l c h / 0.06);
}

.track-cover {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--color-surface-offset);
}

@media (min-width: 720px) {
  .track-cover {
    width: 64px;
    height: 64px;
  }
}

.track-title {
  font-weight: 600;
  font-size: var(--text-sm);
}

.track-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.stems-btn {
  margin-top: var(--space-2);
}

.track-meta,
.track .price {
  display: none;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 720px) {
  .track-meta,
  .track .price {
    display: block;
  }
}

.price {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: var(--text-sm);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--space-12) 0;
  color: var(--color-text-muted);
}

.empty-state h3 {
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.empty-state p {
  margin-bottom: var(--space-6);
}

/* Licenses */
.licenses {
  padding-block: clamp(var(--space-10), 6vw, var(--space-20));
}

.license-layout {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 900px) {
  .license-layout {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
  }
}

.license-copy h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.license-copy p {
  color: var(--color-text-muted);
}

.license-rows {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-border);
}

.license-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--color-border);
}

.license-row h3 {
  font-size: var(--text-base);
  font-weight: 600;
}

.license-row p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.license-row .price {
  font-size: var(--text-lg);
  font-family: var(--font-display);
}

.license-row.is-exclusive {
  background: var(--color-surface);
  margin-inline: calc(var(--space-4) * -1);
  padding-inline: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-top: var(--space-4);
}

/* About */
.about-hero {
  padding-block: clamp(var(--space-8), 5vw, var(--space-16));
}

.about-grid {
  display: grid;
  gap: var(--space-10);
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    align-items: start;
  }
}

.about-grid h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-6);
  max-width: 12ch;
}

.prose p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.about-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: var(--color-surface-offset);
}

.facts {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}

@media (min-width: 700px) {
  .facts {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.facts h2 {
  font-size: var(--text-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.facts p {
  color: var(--color-text);
  max-width: 28ch;
}

/* Contact */
.contact {
  padding-block: clamp(var(--space-8), 5vw, var(--space-16));
}

.contact-grid {
  display: grid;
  gap: var(--space-12);
}

@media (min-width: 860px) {
  .contact-grid {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  }
}

.contact h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
}

.contact-lead {
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.contact-list a {
  color: var(--color-primary);
  text-decoration: none;
}

.contact-list a:hover {
  text-decoration: underline;
}

.contact-label {
  display: block;
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

form {
  display: grid;
  gap: var(--space-4);
}

label {
  display: grid;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
}

input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.field-error {
  color: var(--color-error);
  font-size: var(--text-xs);
  min-height: 1em;
}

.form-status {
  font-size: var(--text-sm);
  color: var(--color-success);
  min-height: 1.4em;
}



.feedback {
  padding: var(--space-16) 0 var(--space-10);
}

.feedback h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: var(--space-2) 0 var(--space-6);
}

.feedback-card {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  max-width: 42rem;
}

.feedback-stars {
  color: #f0c14b;
  font-size: 1.25rem;
  letter-spacing: 0.12em;
  line-height: 1;
}

.feedback-card blockquote {
  margin: 0;
}

.feedback-card blockquote p {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.4;
  color: var(--color-text);
}

.feedback-by {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.feedback-player {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  flex-wrap: wrap;
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-divider);
}

.feedback-cover {
  width: 5.5rem;
  height: 5.5rem;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.feedback-player-meta {
  display: grid;
  gap: var(--space-2);
  flex: 1;
  min-width: 14rem;
}

.feedback-track {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
}

.feedback-meta {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}


.feedback-audio {
  width: min(100%, 22rem);
  height: 2.25rem;
}

/* Hide Chrome/Edge download affordance if still exposed */
.feedback-audio::-webkit-media-controls-enclosure {
  overflow: hidden;
}
.feedback-audio::-webkit-media-controls-download-button {
  display: none !important;
}


.feedback-player-meta .btn {
  justify-self: start;
}

.list-signup {
  padding-bottom: var(--space-16);
}

.list-signup form {
  gap: var(--space-3);
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.list-prompt {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.list-row {
  display: grid;
  gap: var(--space-3);
}

@media (min-width: 720px) {
  .list-row {
    grid-template-columns: minmax(12rem, 1.1fr) minmax(0, 1fr) auto;
    align-items: center;
  }
}

.hp {
  position: absolute;
  left: -10000px;
  height: 0;
  overflow: hidden;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-10) 0 var(--space-8);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-6);
}

.footer-inner a {
  color: var(--color-text);
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--color-primary);
}

/* Persistent bottom player (Spotify-style).
   body > aside.player beats the generic `body > *:not(.palm-backdrop)` position rule. */
body > aside.player {
  --pl-bg: #04070d;
  --pl-text: #f2f6fc;
  --pl-muted: #93a1b8;
  --pl-track: rgba(255, 255, 255, 0.22);
  --pl-accent: #3db4ff;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: var(--pl-bg);
  color: var(--pl-text);
  border-top: 1px solid rgba(61, 180, 255, 0.16);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.45);
  transform: translateY(110%);
  transition: transform 300ms var(--ease-out);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.player.is-on {
  transform: translateY(0);
}

/* Netlify injects a fixed "Powered by Netlify" badge iframe (#nl-badge-frame, bottom-right,
   z-index 2147483645, inline bottom:0) on the live domain. Keep it visible, but lift it
   above the bottom player so it never sits over (and eats clicks on) the bar's controls. */
body.has-player > #nl-badge-frame {
  bottom: calc(var(--player-h) + 8px) !important;
  max-height: calc(100vh - var(--player-h) - 8px) !important;
}
@supports (height: 100dvh) {
  body.has-player > #nl-badge-frame {
    max-height: calc(100dvh - var(--player-h) - 8px) !important;
  }
}

.player-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr) minmax(0, 1fr);
  grid-template-areas:
    'now controls volume'
    'now progress volume';
  column-gap: var(--space-4);
  row-gap: 2px;
  align-items: center;
  max-width: 1600px;
  margin-inline: auto;
  padding: 10px var(--space-4);
  min-height: 76px;
}

.player-now {
  grid-area: now;
  display: flex;
  gap: var(--space-3);
  align-items: center;
  min-width: 0;
}

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

.player-cover {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  background: #111a2a;
}

.player-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--pl-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-sub {
  font-size: 0.75rem;
  color: var(--pl-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-controls {
  grid-area: controls;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
}

.pl-btn {
  position: relative;
  width: 36px;
  height: 36px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--pl-muted);
  cursor: pointer;
  transition: color var(--transition-interactive), transform var(--transition-interactive);
}

.pl-btn:hover {
  color: var(--pl-text);
}

.pl-btn:active {
  transform: scale(0.94);
}

.pl-btn:focus-visible,
.pl-play:focus-visible,
.pl-slider:focus-visible {
  outline: 2px solid var(--pl-accent);
  outline-offset: 2px;
}

.pl-shuffle[aria-pressed='true'],
.pl-repeat:not([data-repeat='off']),
.pl-mute[aria-pressed='true'] {
  color: var(--pl-accent);
}

/* Small dot under active toggle, like Spotify */
.pl-shuffle[aria-pressed='true']::after,
.pl-repeat:not([data-repeat='off'])::after {
  content: '';
  position: absolute;
  bottom: 1px;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--pl-accent);
}

.pl-badge {
  display: none;
  position: absolute;
  top: 3px;
  right: 2px;
  min-width: 13px;
  height: 13px;
  padding: 0 2px;
  border-radius: 7px;
  background: var(--pl-accent);
  color: #04070d;
  font-size: 9px;
  font-weight: 800;
  line-height: 13px;
  text-align: center;
}

.pl-repeat[data-repeat='one'] .pl-badge {
  display: block;
}

.pl-play {
  width: 40px;
  height: 40px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-full);
  background: #ffffff;
  color: #000000;
  cursor: pointer;
  transition: transform var(--transition-interactive), background var(--transition-interactive);
}

.pl-play:hover {
  transform: scale(1.06);
}

.pl-play:active {
  transform: scale(0.96);
}

.pl-play .i-pause,
.pl-play.is-playing .i-play {
  display: none;
}

.pl-play.is-playing .i-pause {
  display: block;
}

.pl-play .i-play {
  margin-left: 2px;
}

.player-progress {
  grid-area: progress;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  max-width: 680px;
  justify-self: center;
}

.player .time {
  flex: none;
  min-width: 2.6em;
  font-size: 0.6875rem;
  color: var(--pl-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#time-current {
  text-align: right;
}

/* Custom slider (seek + volume): pointer events, works with mouse and touch */
.pl-slider {
  --p: 0;
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  border-radius: 4px;
}

.pl-track {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--pl-track);
  overflow: hidden;
}

.pl-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--p) * 100%);
  background: var(--pl-text);
  border-radius: 2px;
}

.pl-thumb {
  position: absolute;
  top: 50%;
  left: calc(var(--p) * 100%);
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 120ms ease;
  pointer-events: none;
}

.pl-slider:hover .pl-fill,
.pl-slider.is-dragging .pl-fill,
.pl-slider:focus-visible .pl-fill {
  background: var(--pl-accent);
}

.pl-slider:hover .pl-thumb,
.pl-slider.is-dragging .pl-thumb,
.pl-slider:focus-visible .pl-thumb {
  opacity: 1;
}

/* Touch devices have no hover: always show the scrub dot */
@media (hover: none) {
  .pl-thumb {
    opacity: 1;
  }
  .pl-fill {
    background: var(--pl-accent);
  }
}

.player-volume {
  grid-area: volume;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  min-width: 0;
}

.pl-volume {
  flex: 0 1 110px;
}

/* Speaker icon states */
.pl-mute .v-off,
.pl-mute[data-level='off'] .v-low,
.pl-mute[data-level='off'] .v-high,
.pl-mute[data-level='low'] .v-high {
  display: none;
}

.pl-mute[data-level='off'] .v-off {
  display: inline;
}

/* iOS ignores programmatic volume: hide the slider, keep mute */
.player.no-volume .pl-volume {
  display: none;
}

@media (max-width: 899px) {
  .player-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) auto;
    column-gap: var(--space-3);
  }
  .player-cover {
    width: 48px;
    height: 48px;
  }
  .pl-volume {
    flex: none;
    width: 84px;
  }
  .player-controls {
    gap: var(--space-2);
  }
}

@media (max-width: 599px) {
  .player-inner {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      'now controls controls'
      'progress progress volume';
    row-gap: 4px;
    column-gap: var(--space-2);
    padding: 8px var(--space-3) 6px;
    min-height: 0;
  }
  .player-cover {
    width: 40px;
    height: 40px;
    border-radius: 4px;
  }
  .player-title {
    font-size: 0.875rem;
  }
  .player-sub {
    font-size: 0.6875rem;
  }
  .player-controls {
    gap: 2px;
  }
  .pl-btn {
    width: 34px;
    height: 38px;
  }
  .pl-play {
    width: 40px;
    height: 40px;
    margin-inline: 2px;
  }
  .player-progress {
    max-width: none;
  }
  .pl-volume {
    display: none;
  }
  .player-volume .pl-btn {
    width: 34px;
    height: 30px;
  }
}

/* 320-359px: shuffle stays on the Start here card; hide it in the bar so the title and
   meta line keep readable width next to prev/play/next/repeat. */
@media (max-width: 359px) {
  #player-shuffle {
    display: none;
  }
  .player-inner {
    padding-inline: var(--space-2);
  }
}


/* ---------- Start here card + catalog rows share the bar's controls ---------- */
/* The bar's --pl-* colors are scoped to aside.player; give the card and rows theme-aware ones. */
.featured-card,
.track-list {
  --pl-text: var(--color-text);
  --pl-muted: var(--color-text-muted);
  --pl-track: oklch(from var(--color-text) l c h / 0.2);
  --pl-accent: var(--color-primary);
}

.player.is-playing .player-title {
  color: var(--pl-accent);
}

.play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--radius-full);
  background: #ffffff;
  color: #000000;
  cursor: pointer;
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.25);
  transition: transform var(--transition-interactive), background var(--transition-interactive);
}

.play-btn:hover {
  transform: scale(1.06);
}

.play-btn:active {
  transform: scale(0.96);
}

.play-btn svg {
  width: 18px;
  height: 18px;
}

.play-btn .i-play {
  margin-left: 2px;
}

.play-btn .i-pause,
.play-btn.is-playing .i-play {
  display: none;
}

.play-btn.is-playing .i-pause {
  display: block;
}

.play-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.pl-controls {
  display: flex;
  align-items: center;
}

[data-theme='light'] .pl-controls--card .pl-play,
[data-theme='light'] .track .play-btn {
  background: #1c1712;
  color: #ffffff;
}

/* Start here card */
.wave-seek {
  position: relative;
  margin-top: var(--space-5);
  cursor: pointer;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  border-radius: var(--radius-sm);
}

.wave-seek .wave {
  margin-top: 0;
  pointer-events: none;
}

.wave-seek:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}

.wave-times {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-1);
}

.featured-actions {
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.pl-controls--card {
  gap: var(--space-2);
  margin-left: calc(var(--space-2) * -1);
}

.pl-controls--card .pl-btn {
  width: 40px;
  height: 40px;
  color: var(--color-text-muted);
}

.pl-controls--card .pl-btn:hover {
  color: var(--color-text);
}

.pl-controls--card .pl-btn.is-on {
  color: var(--color-primary);
}

.pl-controls--card .pl-badge {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.pl-controls--card .pl-play {
  width: 52px;
  height: 52px;
}

.pl-controls--card .pl-play svg {
  width: 22px;
  height: 22px;
}


.featured-card.is-current {
  border-color: oklch(from var(--color-primary) l c h / 0.35);
}

@media (min-width: 768px) {
  .featured-actions .btn-ghost {
    margin-left: auto;
  }
}

/* Catalog rows */
.track {
  padding-inline: var(--space-3);
  transition: background var(--transition-interactive);
}

.track:hover {
  background: oklch(from var(--color-text) l c h / 0.03);
}

.track.is-current {
  background: oklch(from var(--color-primary) l c h / 0.09);
  box-shadow: inset 3px 0 0 var(--color-primary);
}

.track.is-current .track-title {
  color: var(--color-primary);
}

.track .play-btn {
  width: 40px;
  height: 40px;
  justify-self: center;
}

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

.track-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.eq {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.eq i {
  display: block;
  width: 3px;
  height: 100%;
  border-radius: 1px;
  background: var(--color-primary);
  transform-origin: bottom;
  animation: eq-bounce 900ms ease-in-out infinite;
}

.eq i:nth-child(2) {
  animation-delay: -300ms;
}

.eq i:nth-child(3) {
  animation-delay: -600ms;
}

.track.is-playing .eq {
  display: inline-flex;
}

@keyframes eq-bounce {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  .eq i { animation: none; transform: scaleY(0.7); }
}

.row-progress {
  display: none;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2);
  max-width: 460px;
  margin-top: var(--space-1);
}

.track.is-current .row-progress {
  display: grid;
}

.row-progress .time {
  font-size: 11px;
  min-width: 2.4em;
}

.row-seek {
  --pl-track: oklch(from var(--color-text) l c h / 0.2);
  --pl-text: var(--color-text);
  --pl-accent: var(--color-primary);
  height: 16px;
  touch-action: pan-y;
}

.row-seek .pl-fill {
  background: var(--color-primary);
}

@media (max-width: 719px) {
  .track {
    grid-template-columns: 40px 52px minmax(0, 1fr) auto;
    padding-inline: var(--space-2);
  }
  .track-cover {
    width: 52px;
    height: 52px;
  }
}

/* Very narrow phones (iPhone SE 1st gen, 320px): drop the row cover art (the bar and the
   Start here card still show it) so the title, mood/price line and row seek bar get room. */
@media (max-width: 359px) {
  .track {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: var(--space-2);
  }
  .track-cover {
    display: none;
  }
  .track-sub {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .row-progress {
    gap: 6px;
  }
}


/* Dialogs */
dialog {
  width: min(100% - var(--space-8), 420px);
  margin: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background-color: var(--color-surface);
  color: var(--color-text);
  padding: var(--space-6);
  box-shadow: var(--shadow-lg);
  opacity: 1;
}

dialog::backdrop {
  background: rgb(16 14 12 / 0.72);
}

dialog[open] {
  transform: scale(1);
  transition: transform 300ms var(--ease-out);
}

@starting-style {
  dialog[open] {
    transform: scale(0.95);
  }
}

html {
  -webkit-tap-highlight-color: transparent;
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.dialog-head h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
}

.license-options {
  display: grid;
  gap: var(--space-3);
}

.license-option {
  display: block;
  color: inherit;
  text-decoration: none;
  text-align: left;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
}

.license-option:hover {
  border-color: oklch(from var(--color-text) l c h / 0.28);
}

.license-option.is-picked {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.license-option strong {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
}

.license-option p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.cart-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: var(--space-3);
  align-items: center;
}

.cart-item img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.cart-item button {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  min-height: 44px;
  padding-inline: var(--space-2);
}

.cart-item button:hover {
  color: var(--color-error);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  margin-bottom: var(--space-5);
  font-variant-numeric: tabular-nums;
}

.img-fallback {
  background: var(--color-surface-offset);
  display: grid;
  place-items: center;
  color: var(--color-text-faint);
  font-size: var(--text-xs);
}

.fade-in {
  opacity: 1;
}

@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }
}

@keyframes reveal-fade {
  to {
    opacity: 1;
  }
}

/* BeatStars-style file line + free tagged preview row */
.license-option .license-files {
  font-weight: 600;
  color: var(--color-primary, #3b6cff);
  margin: 0.2rem 0 0.1rem;
}
.license-option.is-free {
  cursor: default;
  opacity: 0.85;
  border-style: dashed;
}


/* Featured video (self-hosted MP4, autoplays muted; hover/tap for sound) */
.featured-video { padding-block: var(--space-8, 3rem); }
.featured-video h2 { margin-top: var(--space-2, 0.5rem); }
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-width: 400px;
  margin: var(--space-4, 1rem) auto 0;
  border-radius: var(--radius-md, 12px);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #000;
}
.video-frame video {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
  background: #000;
  cursor: pointer;
}
.video-sound-badge {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  z-index: 2;
  padding: 0.3rem 0.6rem;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font: inherit;
  font-size: 0.75rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
  cursor: pointer;
  opacity: 0.8;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: opacity 0.2s ease;
}
.video-frame:hover .video-sound-badge,
.video-sound-badge:focus-visible { opacity: 1; }
.video-sound-badge:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Paid stems: PayPal Transaction ID lookup on the Unlimited / Exclusive thank-you pages */
.stems-status { margin-top: 1rem; }
.stems-form { margin-top: 1rem; max-width: 34rem; display: grid; gap: var(--space-2); }
.stems-form-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.stems-form-row input { flex: 1 1 14rem; min-width: 0; width: auto; }
.stems-form-row .btn { flex: 0 0 auto; }
.stems-form[hidden], .stems-status[hidden], .hero-actions > [hidden] { display: none !important; }

/* Contact: any-amount "Pay / send money" (PayPal Buy Now, card or PayPal) */
.pay-any-form { display: grid; gap: var(--space-2); max-width: 22rem; }
.pay-any-label { font-size: var(--text-sm); font-weight: 500; }
.pay-any-row { display: flex; gap: var(--space-2); align-items: stretch; }
.pay-any-amount { position: relative; flex: 1 1 auto; min-width: 0; }
.pay-any-amount span { position: absolute; left: var(--space-4); top: 50%; transform: translateY(-50%); color: var(--color-text-muted); pointer-events: none; }
.pay-any-amount input { padding-left: calc(var(--space-4) + 0.9em); }
.pay-any-row .btn { flex: 0 0 auto; }
.pay-any-form .field-error:empty { display: none; }
.pay-any-note { font-size: var(--text-xs); color: var(--color-text-muted); }

/* ---------- Marketplace beat section (market.js; XXL for now): tags, precomputed waveform, license chart ---------- */
.market {
  padding-block: clamp(var(--space-4), 3vw, var(--space-10));
}

.market[hidden] {
  display: none;
}

.mk-beat {
  --pl-text: var(--color-text);
  --pl-muted: var(--color-text-muted);
  --pl-accent: var(--color-primary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.mk-beat + .mk-beat {
  margin-top: var(--space-6);
}

.mk-beat.is-current {
  border-color: oklch(from var(--color-primary) l c h / 0.35);
}

.mk-head {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  grid-template-areas:
    'cover info'
    'player player';
  gap: var(--space-4);
  align-items: center;
}

.mk-cover {
  grid-area: cover;
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--color-surface-offset);
}

.mk-info {
  grid-area: info;
  min-width: 0;
}

.mk-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.mk-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mk-tags li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  max-width: 100%;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  line-height: 1.2;
  color: var(--color-text-muted);
}

.mk-stat-k {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.mk-stat-v {
  font-weight: 600;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.mk-tags .mk-tag {
  color: var(--color-text);
  background: oklch(from var(--color-primary) l c h / 0.1);
  border-color: oklch(from var(--color-primary) l c h / 0.32);
}

.mk-player {
  grid-area: player;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.mk-player .mk-play {
  width: 52px;
  height: 52px;
  margin: 0 0 18px;
}

.mk-player .mk-play svg {
  width: 22px;
  height: 22px;
}

[data-theme='light'] .mk-player .mk-play {
  background: #1c1712;
  color: #ffffff;
}

.mk-play:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.mk-wave-col {
  flex: 1 1 auto;
  min-width: 0;
}

.mk-wave {
  position: relative;
  height: 64px;
  cursor: pointer;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  border-radius: var(--radius-sm);
}

.mk-wave:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}

.mk-canvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.mk-beat .time {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.mk-lic-head {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin: var(--space-6) 0 var(--space-3);
}

.mk-lics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.mk-lic {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
}

.mk-lic.is-exclusive {
  border-color: oklch(from var(--color-primary) l c h / 0.55);
  box-shadow: inset 0 0 0 1px oklch(from var(--color-primary) l c h / 0.2);
}

.mk-lic-name {
  font-size: var(--text-sm);
  font-weight: 600;
}

.mk-lic-price {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.mk-lic-list {
  list-style: none;
  display: grid;
  gap: 6px;
  margin-top: var(--space-1);
  font-size: var(--text-xs);
}

.mk-lic-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.mk-lic-list svg {
  flex: none;
}

.mk-lic-list .is-yes {
  color: var(--color-text);
}

.mk-lic-list .is-yes svg {
  color: var(--color-primary);
}

.mk-lic-list .is-no {
  color: var(--color-text-faint);
}

.mk-lic-sum {
  flex: 1 1 auto;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.mk-lic .mk-buy {
  width: 100%;
  margin-top: var(--space-1);
  padding-inline: var(--space-2);
  white-space: nowrap;
}

.mk-note {
  margin-top: var(--space-3);
}

@media (min-width: 768px) {
  .mk-beat {
    padding: var(--space-5);
  }
  .mk-head {
    grid-template-columns: 180px minmax(0, 1fr);
    grid-template-areas:
      'cover info'
      'cover player';
    column-gap: var(--space-6);
    row-gap: var(--space-4);
    align-items: end;
  }
  .mk-info {
    align-self: end;
  }
  .mk-player {
    align-self: start;
  }
  .mk-lics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .mk-lic {
    padding: var(--space-4);
  }
}

@media (min-width: 1024px) {
  .mk-head {
    grid-template-columns: 220px minmax(0, 1fr);
    column-gap: var(--space-8);
  }
  .mk-wave {
    height: 72px;
  }
}

/* 320-359px: one license per row so prices and buttons keep full width. */
@media (max-width: 359px) {
  .mk-lics {
    grid-template-columns: minmax(0, 1fr);
  }
}
