/* ============================================================================
   FavSongs — one design system.

   The whole site is black paper, off-white ink and a single vermilion accent
   pulled from the shelf mark: white serif letters, red roses, cobalt leaves.
   Red is for doing things (actions, counts, the one italic word in a headline).
   Cobalt appears only inside the mark itself. Nothing else is coloured — no
   green, no amber, no teal, no second theme.

   Type: Onest for interface and body, Playfair Display for display lines and
   numbers, DM Mono for kickers, counts and link metadata. All self-hosted
   (see fonts.css).
   ========================================================================== */

/* ----------------------------------------------------------------- tokens */
:root {
  color-scheme: dark;

  /* Editorial darkroom palette */
  --bg: #050505;
  --bg-raise: #0a0a0c;
  --panel: rgba(14, 14, 16, 0.7);
  --panel-solid: #0d0d0f;
  --panel-2: rgba(20, 20, 23, 0.8);
  --panel-3: rgba(28, 28, 32, 0.9);

  --ink: #f7f6f3;
  --ink-dim: #c7c5bf;
  /* Both grays clear WCAG AA for small text on --bg and the panels (4.5:1+),
     and stay a visible step apart so the hierarchy still reads. */
  --muted: #9a968e;
  --faint: #7e7a71;
  --ink-faint: var(--faint);

  /* Pure Vermilion & Red Lacquer (restrained, single accent) */
  --red: #eb2410;
  --red-deep: #a81708;
  --red-soft: #f24b38;
  --blue: #3257ff;

  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.14);
  --line-glass: rgba(255, 255, 255, 0.1);

  /* Machined Double-Bezel & Specular Highlights */
  --glass-bg: rgba(12, 12, 14, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shine: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100%);
  --glass-blur: blur(24px) saturate(160%);

  --rail: clamp(1.2rem, 4.5vw, 4.2rem);
  --maxw: 1140px;
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;

  --sans: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.28, 1.4, 0.45, 1);
  --ease-fluid: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.75);
  --shadow-hover: 0 35px 90px rgba(0, 0, 0, 0.85);
  --shadow-glass: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.09);

  /* One stacking order for the whole site — no bare z-index literals. */
  --z-top: 40;
  --z-backdrop: 60;
  --z-sheet: 70;
  --z-vignette: 95;
  --z-grain: 96;
  --z-toast: 110;
  --z-skip: 120;
  --z-veil: 200;
}

/* ------------------------------------------------------------------- base */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15.5px;
  line-height: 1.62;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  min-height: 100vh;
  min-height: 100dvh;
  /* No persistent transform on <body>: a transformed ancestor becomes the
     containing block for position: fixed, which pinned overlays (toasts,
     the username veil) to the document box instead of the viewport once a
     page grew taller than the screen. pageEnter keeps its transform only
     while it actually runs. */
  animation: pageEnter 0.55s var(--ease-fluid);
}
body.is-locked { overflow: hidden; }

@keyframes pageEnter {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

body.is-leaving {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
  pointer-events: none;
}

/* Subtle high-end physical noise / film grain texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-grain);
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Rich tactile deep vignette */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-vignette);
  background: radial-gradient(140% 110% at 50% -10%, transparent 45%, rgba(0, 0, 0, 0.75) 100%);
}

img, svg, video { max-width: 100%; display: block; }
/* The `hidden` attribute means hidden, everywhere. Component rules below set
   display: grid/flex, which would otherwise win over the browser default and
   leave an empty player shell showing through an empty state. */
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; font-size: max(16px, 1em); }
::selection { background: var(--red); color: #fff; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; letter-spacing: -0.01em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -140%);
  background: var(--red); color: #fff; padding: 0.5rem 1rem;
  border-radius: 0 0 var(--r-sm) var(--r-sm); z-index: var(--z-skip); font-size: 0.85rem;
}
.skip-link:focus { transform: translate(-50%, 0); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--rail); }
.muted { color: var(--muted); }
.hair { border-top: 1px solid var(--line); }

/* ------------------------------------------------------------- typography */
.kicker {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--mono); font-size: 0.66rem; font-weight: 400;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
}
.kicker::before { content: ""; width: 22px; height: 1px; background: var(--red); }
.kicker.is-plain::before { display: none; }

.display {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(2.3rem, 6vw, 4.5rem);
  line-height: 1.03; letter-spacing: -0.022em;
}
.display em { font-style: italic; color: var(--red); }
.display-sm { font-family: var(--display); font-weight: 600; font-size: clamp(1.7rem, 4.2vw, 2.9rem); line-height: 1.06; letter-spacing: -0.018em; }
.lede { color: var(--ink-dim); font-size: clamp(1rem, 1.6vw, 1.12rem); max-width: 56ch; }
.mini { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.68rem 1.3rem; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); color: var(--ink);
  font-size: 0.92rem; font-weight: 500; line-height: 1; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 0.25s var(--ease-fluid), background 0.25s var(--ease-fluid), color 0.25s var(--ease-fluid), transform 0.2s var(--ease-spring), box-shadow 0.25s var(--ease-fluid);
  white-space: nowrap;
  position: relative;
  will-change: transform;
}
.btn:hover { border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.06); transform: translateY(-1.5px); }
.btn:active { transform: translateY(0.5px) scale(0.985); transition-duration: 0.08s; }
.btn-primary {
  background: var(--red); border-color: rgba(255, 255, 255, 0.2); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 12px 30px rgba(235, 36, 16, 0.28);
}
.btn-primary:hover {
  background: var(--red-soft); border-color: rgba(255, 255, 255, 0.35); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 16px 36px rgba(235, 36, 16, 0.38);
  transform: translateY(-2px);
}
.btn-primary:active { box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.2), 0 6px 16px rgba(235, 36, 16, 0.25); transform: translateY(0.5px) scale(0.985); }
.btn-sm { padding: 0.48rem 0.95rem; font-size: 0.84rem; }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--ink-dim); }
.btn-ghost:hover { border-color: var(--line-2); background: rgba(255, 255, 255, 0.03); color: var(--ink); transform: translateY(-1px); }
/* A button mid-action (making a link) reads as busy, not as broken. */
.btn:disabled { opacity: 0.55; cursor: progress; transform: none; }
.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }
.fav-hint { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }

/* ---------------------------------------------------------------- header */
.top {
  position: sticky; top: 0; z-index: var(--z-top);
  background: rgba(3, 3, 3, 0.72);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}
.top-inner {
  display: flex; align-items: center; gap: clamp(0.7rem, 2vw, 1.8rem);
  max-width: var(--maxw); margin: 0 auto; padding: 0.6rem var(--rail);
}
.brand {
  font-family: var(--display); font-weight: 700; font-size: 1.35rem;
  letter-spacing: -0.03em; white-space: nowrap; line-height: 1;
  transition: transform 0.25s var(--ease-spring);
}
.brand:hover { transform: scale(1.015); }
.brand em { font-style: normal; color: var(--red); }
.nav { display: none; align-items: center; gap: clamp(0.7rem, 2vw, 1.8rem); }
@media (min-width: 900px) { .nav { display: flex; margin-left: auto; } }
.nav a {
  font-size: 0.9rem; font-weight: 450; color: var(--ink-dim); padding: 0.35rem 0;
  border-bottom: 1px solid transparent; letter-spacing: -0.01em;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.nav a:hover { color: var(--ink); border-color: var(--line-2); }
.nav a[aria-current="page"] { color: var(--ink); border-color: var(--red); }
.top-spot { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
@media (min-width: 900px) { .top-spot { margin-left: 0; } }
.icon-btn {
  width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.03);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.22s var(--ease-spring), background 0.2s var(--ease);
}
.icon-btn:hover { border-color: var(--line-2); color: var(--ink); background: rgba(255, 255, 255, 0.08); transform: scale(1.06); }
.icon-btn:active { transform: scale(0.94); }

/* Ambient background audio toggle */
.ambient-btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.38rem 0.72rem; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03);
  color: var(--ink-dim); font-size: 0.76rem; font-family: var(--mono);
  letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: all 0.25s var(--ease-spring);
}
.ambient-btn:hover {
  border-color: rgba(255, 255, 255, 0.3); color: var(--ink);
  background: rgba(255, 255, 255, 0.06); transform: translateY(-1px);
}
.ambient-btn.is-active {
  border-color: rgba(235, 36, 16, 0.4); color: var(--ink);
  background: rgba(235, 36, 16, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 18px rgba(235, 36, 16, 0.16);
}
.ambient-bars {
  display: inline-flex; align-items: flex-end; gap: 2px; height: 11px;
}
.ambient-bars span {
  width: 2px; border-radius: 1px; background: var(--muted); height: 3px;
  transition: background 0.2s var(--ease);
}
.ambient-btn.is-active .ambient-bars span {
  background: var(--red);
  animation: ambientEq 0.9s ease-in-out infinite alternate;
}
.ambient-btn.is-active .ambient-bars span:nth-child(1) { height: 4px; animation-duration: 0.65s; }
.ambient-btn.is-active .ambient-bars span:nth-child(2) { height: 11px; animation-duration: 0.85s; }
.ambient-btn.is-active .ambient-bars span:nth-child(3) { height: 7px; animation-duration: 0.75s; }
@keyframes ambientEq {
  0% { transform: scaleY(0.3); transform-origin: bottom; }
  100% { transform: scaleY(1); transform-origin: bottom; }
}
.top-cta { display: none; }
@media (min-width: 620px) { .top-cta { display: inline-flex; } }
/* Narrow screens: the sound toggle keeps its bars and drops the word, and the
   header buttons tighten up, so the menu button is never pushed off the edge. */
@media (max-width: 619px) {
  .top-spot .ambient-btn { padding: 0.38rem 0.62rem; }
  .top-spot .ambient-btn .ambient-label { display: none; }
  .top-spot .btn { padding: 0.35rem 0.65rem; font-size: 0.8rem; }
}

/* mobile sheet — Frosted glass with spring slide */
#mobileNav {
  position: fixed; inset: 0 0 0 auto; width: min(84vw, 360px); z-index: var(--z-sheet);
  background: rgba(8, 8, 10, 0.88);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  backdrop-filter: blur(28px) saturate(190%);
  border-left: 1px solid var(--glass-border);
  box-shadow: -15px 0 50px rgba(0, 0, 0, 0.7);
  transform: translateX(101%);
  transition: transform 0.4s var(--ease-spring);
  display: flex; flex-direction: column; padding: 1.1rem var(--rail) 2rem; gap: 0.2rem;
}
#mobileNav.is-open { transform: translateX(0); }
#mobileNav a {
  font-family: var(--display); font-size: 1.6rem; padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  transition: transform 0.25s var(--ease-spring), color 0.2s var(--ease), padding-left 0.25s var(--ease);
}
#mobileNav a:hover { color: var(--red); padding-left: 0.5rem; transform: translateX(3px); }
#mobileNav .sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
#mobileBackdrop {
  position: fixed; inset: 0; z-index: var(--z-backdrop);
  background: rgba(0, 0, 0, 0.65);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s var(--ease-fluid);
}
#mobileNav.is-open + #mobileBackdrop { opacity: 1; pointer-events: auto; }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; padding: clamp(1.5rem, 3.4vw, 2.8rem) var(--rail) clamp(1.2rem, 2.6vw, 2rem); overflow: clip; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 100%; pointer-events: none;
  background: radial-gradient(ellipse 65% 55% at 50% 25%, rgba(235, 36, 16, 0.08), rgba(0, 0, 0, 0) 75%);
}
.hero-grid {
  position: relative; display: grid; gap: clamp(1.6rem, 4vw, 3.2rem);
  max-width: var(--maxw); margin: 0 auto; align-items: center;
}
@media (min-width: 980px) {
  /* Both columns start at the top: the promise reads first, the shelf beside it,
     and nothing floats in the middle of the empty half. */
  .hero-grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); align-items: start; }
}
/* The hero is one screen: a short headline that reads in two or three lines,
   one paragraph, two buttons — and nothing below them. */
.hero-copy { max-width: 60ch; }
.hero h1 { margin: 0.6rem 0 0.9rem; }
.hero .display { font-size: clamp(2rem, 4.2vw, 3.4rem); max-width: 20ch; }
.hero .lede { max-width: 42ch; }
.hero .actions { margin-top: 1.4rem; }

/* Under the hero: the reassurance and the import strip, out of the first screen. */
.hero-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem;
  flex-wrap: wrap; max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--rail) clamp(1.4rem, 3vw, 2.2rem);
}
.hero-note { margin: 0; font-size: 0.9rem; color: var(--muted); }
.hero-foot .platforms { margin-top: 0; }

.platforms { display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap; margin-top: 2rem; }
.platforms img { width: 20px; height: 20px; opacity: 0.62; transition: opacity 0.25s var(--ease); }
.platforms img:hover { opacity: 1; }
.platforms span { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); }

/* the shelf mark: the loop, cropped to its ink and seamlessly blended into the canvas */
.mark {
  margin: 0 auto 1.4rem; position: relative;
  max-width: min(720px, 84vw); aspect-ratio: 1470 / 500; overflow: visible;
  -webkit-mask-image: radial-gradient(ellipse 82% 76% at 50% 50%, #000 40%, rgba(0,0,0,0.85) 60%, transparent 100%);
  mask-image: radial-gradient(ellipse 82% 76% at 50% 50%, #000 40%, rgba(0,0,0,0.85) 60%, transparent 100%);
}
.mark video {
  width: 100%; height: 100%; object-fit: cover; object-position: center 40%; display: block;
  /* Deep black crush and screened ink */
  filter: contrast(1.6) brightness(0.96) saturate(1.04);
  mix-blend-mode: screen;
}
.mark::after {
  content: ""; position: absolute; inset: -4%; pointer-events: none;
  background: radial-gradient(ellipse 80% 70% at 50% 50%, transparent 45%, var(--bg) 92%);
}

/* share preview: the real playlist components, dressed for the hero */
.preview {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(180deg, #0c0c0c, #050505);
  padding: clamp(0.8rem, 2vw, 1.2rem); box-shadow: var(--shadow);
}
.preview .preview-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.8rem; }
.preview .preview-note { font-family: var(--mono); font-size: 0.63rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); }

/* ------------------------------------------------------------- sections */
.sec {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.4rem) var(--rail);
}
.sec-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; padding-bottom: 1rem; margin-bottom: clamp(1.1rem, 3vw, 1.8rem);
  border-bottom: 1px solid var(--line);
}
.sec-head h2 { font-family: var(--display); font-weight: 600; font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1.05; margin-top: 0.5rem; }
.sec-head p { color: var(--muted); margin: 0.2rem 0 0; max-width: 46ch; }
.sec-body { display: grid; gap: clamp(1rem, 3vw, 2rem); }

/* ------------------------------------------------------------- page heads */
.page-head {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.2rem) var(--rail) clamp(1.2rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
}
.page-head .display { font-size: clamp(1.9rem, 4.6vw, 3.2rem); max-width: 22ch; }
.page-head .lede { margin: 0.9rem 0 0; }
.page-head .toggles { margin-top: 1.2rem; }

/* ------------------------------------------------------- where next (home) */
.doors { display: grid; border-top: 1px solid var(--line); }
@media (min-width: 680px) and (max-width: 999px) { .doors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .doors { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.door {
  display: flex; flex-direction: column; gap: 0.6rem;
  padding: 1.4rem 0 1.5rem; border-bottom: 1px solid var(--line);
  color: inherit; text-decoration: none;
  transition: transform 0.28s var(--ease-spring), color 0.25s var(--ease);
}
@media (min-width: 680px) {
  .door {
    padding: 1.6rem clamp(1rem, 2vw, 1.8rem) 1.8rem;
    border-left: 1px solid var(--line);
  }
  .door:first-child { border-left: 0; padding-left: 0; }
}
@media (min-width: 680px) and (max-width: 999px) {
  .door:nth-child(2n+1) { border-left: 0; padding-left: 0; }
}
.door .mini { color: var(--red); }
.door b {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.1;
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}
.door p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.92rem; max-width: 34ch; }
.door-go {
  font-family: var(--mono); font-size: 0.85rem; color: var(--muted);
  transition: transform 0.35s var(--ease-spring), color 0.25s var(--ease);
}
.door:hover { transform: translateY(-3px); }
.door:hover b { color: var(--red); }
.door:hover .door-go { color: var(--red); transform: translateX(6px); }
.door:active { transform: translateY(0); }
.door:active b { transform: translateY(1px); }

/* -------------------------------------------------- song card (shelf grid) */
.shelf-grid { display: grid; gap: 0.65rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .shelf-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px) { .shelf-grid { grid-template-columns: 1fr 1fr 1fr; } }

/* The Double-Bezel Song Card: Machined outer perimeter with concentric inner core */
.song-card {
  position: relative; display: flex; align-items: center; gap: 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 14, 17, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 8px 24px rgba(0, 0, 0, 0.45);
  color: inherit; cursor: pointer; text-align: left; width: 100%;
  transition: border-color 0.28s var(--ease-fluid), background 0.28s var(--ease-fluid), transform 0.26s var(--ease-spring), box-shadow 0.28s var(--ease-fluid);
  will-change: transform;
}
.song-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(22, 22, 27, 0.85);
  transform: translateY(-2.5px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 16px 36px rgba(0, 0, 0, 0.65);
}
.song-card:active { transform: translateY(0.5px) scale(0.99); }
.song-card img {
  width: 50px; height: 50px; flex: none;
  border-radius: calc(var(--r) - 5px);
  object-fit: cover; background: var(--panel-3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s var(--ease-spring);
}
.song-card:hover img { transform: scale(1.035); }
.song-card .t { min-width: 0; display: flex; flex-direction: column; gap: 0.12rem; }
.song-card .t b { font-weight: 500; font-size: 0.96rem; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.2s var(--ease); }
.song-card:hover .t b { color: #fff; }
.song-card .t span { font-size: 0.83rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-card.is-pinned {
  border-color: rgba(235, 36, 16, 0.45);
  background: rgba(24, 18, 18, 0.85);
  box-shadow: inset 0 1px 0 rgba(235, 36, 16, 0.3), 0 10px 30px rgba(235, 36, 16, 0.12);
}
.song-card .pin-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--red); margin-bottom: 0.1rem;
}
.song-card .card-actions {
  margin-left: auto; display: flex; align-items: center; gap: 0.25rem; flex: none;
}
.song-card .action-btn {
  width: 28px; height: 28px; border-radius: 999px;
  color: var(--faint); font-size: 0.85rem; line-height: 1; display: grid; place-items: center;
  background: transparent; border: 0; cursor: pointer;
  transition: transform 0.2s var(--ease-spring), color 0.2s var(--ease), background 0.2s var(--ease);
}
.song-card .action-btn:hover { color: var(--ink); background: rgba(255, 255, 255, 0.08); transform: scale(1.1); }
.song-card .action-btn.pin-btn:hover, .song-card .action-btn.is-pinned-btn { color: var(--red); }
.song-card .action-btn.x:hover { color: var(--red); background: rgba(235, 36, 16, 0.14); }

.shelf-empty {
  border: 1px dashed var(--line-2); border-radius: var(--r-lg);
  padding: clamp(1.4rem, 4vw, 2.6rem); text-align: center; color: var(--muted);
}
.shelf-empty b { display: block; font-family: var(--display); font-size: 1.35rem; color: var(--ink); margin-bottom: 0.4rem; }
.shelf-empty .actions { justify-content: center; margin-top: 1.2rem; }
/* A song landing on the shelf: one quiet pop, then it belongs there. */
.song-card.pop { animation: card-in 0.48s var(--ease-spring) both; }
@keyframes card-in {
  0% { opacity: 0; transform: translateY(12px) scale(0.94); }
  60% { transform: translateY(-2px) scale(1.01); }
  100% { opacity: 1; transform: none; }
}
/* A button named inside a sentence keeps the sentence's flow. */
.shelf-empty b.inline {
  display: inline; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; margin: 0; color: var(--ink);
}

/* ----------------------------------------------------------- shelf panel */
.panel {
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  padding: clamp(0.95rem, 2.4vw, 1.5rem);
  box-shadow: var(--shadow-glass);
  position: relative;
  overflow: hidden;
}
.panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  pointer-events: none;
}
.panel + .panel { margin-top: 1rem; }
/* The shelf panel's own head row and tools: title left, filter + sorts right. */
.shelf-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 0.8rem; flex-wrap: wrap;
}
.shelf-head-title { display: flex; align-items: baseline; gap: 0.75rem; }
#shelfTitle { font-size: 1.25rem; }
.shelf-tools { display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.shelf-tools input[type="search"] {
  padding: 0.35rem 0.65rem; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03);
  color: var(--ink); font-size: 0.78rem; width: 130px;
  transition: border-color 0.2s var(--ease);
}
.shelf-tools input[type="search"]:focus { border-color: var(--red); }
.shelf-tools .btn { padding: 0.32rem 0.65rem; font-size: 0.76rem; }
.fields { display: grid; gap: 0.7rem; grid-template-columns: 1fr; }
@media (min-width: 780px) { .fields { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label { font-family: var(--mono); font-size: 0.63rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); }
.field input, .field textarea {
  width: 100%; padding: 0.72rem 0.9rem; border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: rgba(4, 4, 6, 0.6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--ink);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.field input::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--red);
  background: rgba(8, 8, 12, 0.85);
  box-shadow: 0 0 0 3px rgba(255, 28, 5, 0.14);
}
.fav-row { display: flex; gap: 0.7rem; align-items: center; flex-wrap: wrap; margin-top: 0.9rem; }
.fav-row .grow { flex: 1 1 220px; }
/* The import/playlist buttons sit beside a labelled field: pin them to the
 * input's baseline, not the middle of label + input. Scoped to rows that
 * actually contain a field — plain button+hint rows stay centered. */
.fav-row:has(.field) > .btn { align-self: flex-end; }
.share-note, .fav-hint, #importHint, #shareHint { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; color: var(--muted); }
.cand-row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-top: 0.6rem; }
.cand-row:empty { display: none; }
.cand {
  padding: 0.45rem 0.85rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink-dim);
  font-size: 0.82rem; font-weight: 500;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), background 0.25s var(--ease);
}
.cand:hover { border-color: var(--red); color: var(--ink); background: var(--panel-3); }
#importHint, #shareHint { display: block; margin-top: 0.6rem; }

.share-row { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-top: 1rem; }
.share-box { margin-top: 0.9rem; padding: 0.8rem; border: 1px solid var(--line); border-radius: var(--r); background: #000; }
.share-box .share-btns { display: flex; gap: 0.6rem; align-items: center; }
.share-box input {
  width: 100%; font-family: var(--mono); font-size: 0.78rem; padding: 0.6rem 0.7rem;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: #060606; color: var(--ink-dim);
}
.toggles { display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: center; margin-top: 0.8rem; }
.toggles label { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; color: var(--ink-dim); cursor: pointer; }
.toggles input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--red); }
.toggles .name-edit { gap: 0.5rem; }
.toggles .name-edit input {
  width: 12rem; max-width: 60vw; padding: 0.4rem 0.6rem; border-radius: 9px;
  border: 1px solid var(--line-2); background: #000; color: var(--ink); font: inherit;
}
.toggles .name-edit input:focus { outline: none; border-color: var(--red); }

/* ------------------------------------------------------- playlist / rows */
.playlist-wrap { margin-top: 1.2rem; }
#playlistRows { margin-top: 0.8rem; }
.playlist { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--panel); box-shadow: var(--shadow); }
.prow {
  display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 0.8rem; align-items: center; padding: 0.62rem 0.8rem;
  border-top: 1px solid var(--line); color: inherit;
  transition: background 0.22s var(--ease-fluid), padding 0.22s var(--ease-fluid), border-color 0.22s var(--ease-fluid);
  animation: rowIn 0.52s var(--ease-spring) both;
  animation-delay: calc(var(--row-i, 0) * 0.05s);
  position: relative;
}
.prow:hover { background: var(--panel-2); }
.prow:hover .chev { transform: translateX(3px); color: var(--ink); }
.prow:hover .thumb img { transform: scale(1.06); }
.prow .n { font-family: var(--mono); font-size: 0.68rem; color: var(--faint); min-width: 1.2rem; }
.prow .thumb { overflow: hidden; border-radius: 8px; }
.prow .thumb img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; background: var(--panel-3); transition: transform 0.25s var(--ease-spring); }
.prow b { display: block; font-weight: 500; font-size: 0.96rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.2s var(--ease); }
.prow:hover b { color: #fff; }
.prow span { font-size: 0.84rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .chev { color: var(--faint); font-size: 1.1rem; transition: transform 0.25s var(--ease-spring), color 0.2s var(--ease); }
.svc-dot { width: 20px; height: 20px; opacity: 0.75; }
@keyframes rowIn {
  0% { opacity: 0; transform: translateY(12px) scale(0.98); }
  100% { opacity: 1; transform: none; }
}

.featured {
  position: relative; display: grid; gap: clamp(0.9rem, 3vw, 1.8rem);
  grid-template-columns: 1fr; align-items: center;
  padding: clamp(1rem, 2.6vw, 1.6rem);
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--r-lg);
  background: linear-gradient(150deg, var(--ft, rgba(255, 255, 255, 0.04)), #09090b 65%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 20px 50px rgba(0, 0, 0, 0.7);
  transition: border-color 0.3s var(--ease-fluid), transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-fluid);
  will-change: transform;
}
.featured:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2.5px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 28px 70px rgba(0, 0, 0, 0.85);
}
.featured:hover .go { color: var(--ink); transform: translateX(4px); }
.featured:hover img { transform: scale(1.025); }
@media (min-width: 620px) { .featured { grid-template-columns: auto minmax(0, 1fr); } }
.featured img {
  width: clamp(104px, 22vw, 168px); height: clamp(104px, 22vw, 168px);
  border-radius: calc(var(--r-lg) - 6px); object-fit: cover; background: var(--panel-3);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-fluid);
}
.featured-big img { width: clamp(132px, 30vw, 236px); height: clamp(132px, 30vw, 236px); }
.featured-meta { min-width: 0; }
.featured-meta .mini { margin-bottom: 0.5rem; }
.featured h3 { font-family: var(--display); font-weight: 600; font-size: clamp(1.4rem, 3.4vw, 2.1rem); line-height: 1.08; transition: color 0.2s var(--ease); }
.featured-meta p { color: var(--muted); margin: 0.4rem 0 0; }
.go { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim); display: inline-flex; gap: 0.5rem; align-items: center; margin-top: 0.9rem; transition: transform 0.25s var(--ease-spring), color 0.25s var(--ease); }
.mini-play {
  width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line-2);
  display: inline-grid; place-items: center; color: var(--ink); background: rgba(0, 0, 0, 0.5);
  margin-top: 0.9rem; margin-left: 0.6rem;
  transition: transform 0.25s var(--ease-spring), background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.mini-play:hover { transform: scale(1.08); border-color: var(--ink); }
.mini-play:active { transform: scale(0.95); }
.mini-play.on { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 0 20px rgba(255, 20, 0, 0.4); }
.mini-play.unavail { opacity: 0.4; }
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 14px; }
.eq i { width: 3px; background: var(--red); border-radius: 2px; animation: eq 0.85s ease-in-out infinite alternate; }
.eq i:nth-child(1) { height: 6px; animation-duration: 0.6s; }
.eq i:nth-child(2) { height: 14px; animation-duration: 0.8s; }
.eq i:nth-child(3) { height: 9px; animation-duration: 0.7s; }
.eq i:nth-child(4) { height: 13px; animation-duration: 0.95s; }
@keyframes eq { 0% { transform: scaleY(0.25); transform-origin: bottom; } 100% { transform: scaleY(1); transform-origin: bottom; } }
.pulse { width: 6px; height: 6px; border-radius: 999px; background: var(--red); display: inline-block; animation: pulse 2s var(--ease) infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.8); } }

/* ------------------------------------------------------- shared viewer */
body.viewer > header.top { display: none; }
.viewer .sec { padding-top: clamp(1.6rem, 4vw, 2.6rem); }
/* The recipient action rows: shared-bar on the shelf page, viewer actions on
   the short-link page. Both are plain button rows; the [hidden] guard stays
   because a display rule otherwise overrides the hidden attribute. */
#sharedBar { display: grid; gap: 0.7rem; margin-bottom: 1.2rem; }
#sharedBar[hidden] { display: none; }
.share-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
#viewerActions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin-bottom: 0.9rem; }
#viewerActions[hidden] { display: none; }
#viewerStatus { margin: 0 0 1rem; }
.s-error { text-align: center; padding: clamp(2rem, 8vw, 5rem) 0; }
.s-error h1 { font-family: var(--display); font-size: clamp(1.6rem, 4vw, 2.4rem); }
.s-error p { color: var(--muted); }

/* ------------------------------------------------------------ how it works */
.steps { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: #040404; padding: clamp(1.2rem, 3vw, 2rem); }
.step .step-num { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red); }
.step h3 { font-family: var(--display); font-size: 1.3rem; margin: 0.7rem 0 0.5rem; }
.step p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* ------------------------------------------------------------ link shapes */
/* The short address and the self-contained one, side by side. The short one
   carries the accent: it is the shape most shares come out as. */
.shapes { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
@media (min-width: 780px) { .shapes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.shape { background: var(--panel); padding: clamp(1.2rem, 3vw, 1.9rem); display: grid; gap: 0.8rem; align-content: start; }
.shape code {
  display: block; font-family: var(--mono); line-height: 1.5; overflow-wrap: anywhere;
  font-size: clamp(0.72rem, 1.5vw, 0.82rem); color: var(--ink-dim);
  background: #000; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 0.75rem 0.85rem;
  /* two lines' worth, so the paragraph under both addresses starts on the
     same line no matter how the address wraps */
  min-height: 4.1rem;
}
.shape p { margin: 0; color: var(--muted); font-size: 0.95rem; max-width: 46ch; }
.shape.is-short .mini { color: var(--red); }
.shape.is-short code { color: var(--ink); border-color: var(--line-2); }

/* ------------------------------------------------------------- one link */
.link-split { display: grid; gap: clamp(1.4rem, 4vw, 3rem); align-items: center; }
@media (min-width: 940px) { .link-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.signature {
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: #000;
  max-width: 460px; margin: 0 auto;
}
.signature video {
  width: 100%; aspect-ratio: 2 / 1; object-fit: cover; display: block;
  /* the loop's plate is #101010 rather than black: crush it and screen it in */
  filter: contrast(1.5) saturate(1.04);
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(82% 120% at 50% 50%, #000 62%, transparent 100%);
  mask-image: radial-gradient(82% 120% at 50% 50%, #000 62%, transparent 100%);
}
.link-points { display: grid; gap: 0.9rem; margin: 1.4rem 0 0; padding: 0; list-style: none; }
.link-points li { display: flex; gap: 0.8rem; align-items: flex-start; color: var(--ink-dim); }
.link-points li b { color: var(--ink); font-weight: 500; }
.link-points .dot { flex: none; width: 6px; height: 6px; margin-top: 0.55rem; border-radius: 999px; background: var(--red); }

/* ----------------------------------------------------------- discover */
.discover-grid { display: grid; gap: 0.6rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .discover-grid { grid-template-columns: 1fr 1fr; } }

/* --------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--line); margin-top: clamp(2rem, 6vw, 4rem); }
.foot-inner { max-width: var(--maxw); margin: 0 auto; padding: clamp(1.8rem, 4vw, 3rem) var(--rail) 1.4rem; }
.foot-grid { display: grid; gap: 1.6rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 0.8fr)); } }
.foot-grid b { display: block; font-weight: 500; margin-bottom: 0.7rem; }
.foot-grid p { color: var(--muted); margin: 0; font-size: 0.92rem; max-width: 40ch; }
.foot-grid nav { display: flex; flex-direction: column; gap: 0.45rem; }
.foot-grid nav a { color: var(--ink-dim); font-size: 0.92rem; }
.foot-grid nav a:hover { color: var(--ink); }
.foot-copy {
  max-width: var(--maxw); margin: 0 auto; padding: 1.2rem var(--rail) 2rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint);
}
.made-with { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.made-with.made-big { margin-top: 2.4rem; text-align: center; font-size: clamp(1.5rem, 5vw, 2.4rem); letter-spacing: 0; text-transform: none; color: var(--ink-dim); }
.made-with.made-big a { color: var(--ink); text-decoration: none; }
.made-with.made-big em { font-style: italic; color: var(--red); }

/* ------------------------------------------------------------- song page */
.song-stage { position: relative; min-height: calc(100svh - 62px); padding: clamp(1.4rem, 4vw, 3rem) var(--rail) clamp(1.6rem, 4vw, 2.4rem); overflow: clip; }
.lyrics { border: 1px solid var(--line); border-radius: var(--r-lg); background: rgba(6, 6, 6, 0.72); padding: clamp(1rem, 2.4vw, 1.5rem); max-height: 70svh; overflow: auto; }
.lyrics-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.7rem; }
.lyrics-head h2 { font-family: var(--display); font-size: 1.05rem; margin: 0; }
.lyrics-head span { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.lyrics-body { white-space: pre-wrap; color: var(--ink-dim); font-size: 0.94rem; line-height: 1.75; }
.song-page { display: flex; flex-direction: column; }
.song-page .song-stage { flex: 1; }
.album-bg { position: fixed; inset: -8%; z-index: 0; background-size: cover; background-position: center; filter: blur(64px) saturate(1.1); opacity: 0.24; }
.album-veil { position: fixed; inset: 0; z-index: 1; background: radial-gradient(120% 90% at 50% 10%, rgba(0, 0, 0, 0.4), #000 72%); }
.orb { position: fixed; z-index: 0; border-radius: 50%; filter: blur(90px); opacity: 0.22; }
.orb-a { width: 42vw; height: 42vw; left: -12vw; top: 6vh; background: var(--red); }
/* Both glows stay inside the palette: warm red and cold ink, never a second hue. */
.orb-b { width: 36vw; height: 36vw; right: -10vw; bottom: 2vh; background: #6f6a63; opacity: 0.16; }
.song-hero { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; display: grid; gap: clamp(1.4rem, 4vw, 3rem); }
.song-main { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
.song-main > #saveMount, .song-main > .embed-frame { grid-column: 1 / -1; }
@media (min-width: 620px) { .song-main { grid-template-columns: auto minmax(0, 1fr); align-items: center; } }
/* The frame is the tile: it holds the square while a cover resolves, and the
   image only paints once it has actually loaded — no broken-image glyph. */
.song-art-frame {
  width: clamp(132px, 30vw, 208px); height: clamp(132px, 30vw, 208px);
  border-radius: var(--r); background: var(--panel-3); border: 1px solid var(--line);
  box-shadow: var(--shadow); overflow: hidden;
}
.song-art { width: 100%; height: 100%; object-fit: cover; }
.song-art:not([src]) { display: none; }
.actions-center { justify-content: center; margin-top: 1.5rem; }
.song-empty .actions { justify-content: center; }
.song-meta { min-width: 0; }
.song-eyebrow { display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.6rem; }
.song-title { font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 5.6vw, 3.6rem); line-height: 1.04; letter-spacing: -0.02em; }
.song-sub { color: var(--ink-dim); margin: 0.6rem 0 0; }

.player { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.4rem; }
.play-btn {
  width: 56px; height: 56px; flex: none; border-radius: 999px; background: var(--red); color: #fff;
  display: grid; place-items: center; box-shadow: 0 12px 34px rgba(255, 20, 0, 0.28);
}
.play-btn svg { width: 24px; height: 24px; }
.play-btn:hover { background: var(--red-soft); }
.track { flex: 1 1 240px; min-width: 0; }
.track-bar { height: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.track-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--red), var(--red-soft)); }
.track-meta { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.66rem; color: var(--muted); margin-top: 0.45rem; }
.player-loading { width: 22px; height: 22px; border-radius: 999px; border: 2px solid var(--line-2); border-top-color: var(--red); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.embed-frame { margin: 1rem 0 0; max-width: 560px; }
.embed-frame iframe { width: 100%; border: 0; border-radius: 12px; display: block; background: #000; }
.embed-frame figcaption { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.06em; color: var(--muted); margin-top: 0.45rem; }
/* Spotify embed replaces the hero: the big art and the title row stand down
   (the frame carries both), the like button rides in the caption row, and the
   viewport-fill height goes with them — no double hero, no dead space below. */
body.has-spotify-embed .song-art-frame,
body.has-spotify-embed .song-meta { display: none; }
body.has-spotify-embed .song-stage { min-height: 0; }
body.has-spotify-embed .foot { margin-top: clamp(1.2rem, 3vw, 2rem); }
body.has-spotify-embed .embed-frame figcaption { display: flex; align-items: center; gap: 0.8rem; }
body.has-spotify-embed #saveMount.in-embed { margin-left: auto; }

.save-btn {
  position: relative;
  overflow: visible;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.25s var(--ease-spring);
}
.save-btn.is-saved {
  color: var(--ink);
  background: rgba(235, 36, 16, 0.14);
  border-color: rgba(235, 36, 16, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 8px 24px rgba(235, 36, 16, 0.2);
}
/* A confirmed save/like pops the button with crisp, spring kinetic feedback */
.save-btn.pop { animation: save-pop 0.48s var(--ease-spring); }
@keyframes save-pop {
  0% { transform: scale(0.9); }
  45% { transform: scale(1.15); }
  80% { transform: scale(0.98); }
  100% { transform: scale(1); }
}
.save-btn .spark {
  position: absolute; left: 50%; top: 50%; width: 4px; height: 4px;
  margin: -2px 0 0 -2px; border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8), 0 0 12px var(--red);
  pointer-events: none;
  animation: spark-fly 0.65s var(--ease-out) both;
}
@keyframes spark-fly {
  0% { opacity: 1; transform: translate(0, 0) scale(1.2); }
  50% { opacity: 0.8; }
  100% { opacity: 0; transform: translate(var(--dx, 0px), var(--dy, -20px)) scale(0.2); }
}

#svcSection { position: relative; z-index: 2; max-width: var(--maxw); margin: clamp(1.2rem, 3vw, 1.8rem) auto 0; }
.svc-grid-label { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); margin: 0 0 0.8rem; }
.svc-grid { display: grid; gap: 0.6rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .svc-grid { grid-template-columns: 1fr 1fr; } }
.song-empty { position: relative; z-index: 2; max-width: 560px; margin: 14vh auto 0; text-align: center; }
.song-empty h1 { font-family: var(--display); font-size: clamp(1.8rem, 5vw, 2.8rem); margin-bottom: 0.6rem; }
.song-empty p { color: var(--muted); }
.song-foot { position: relative; z-index: 2; max-width: var(--maxw); width: 100%; margin: clamp(1.4rem, 4vw, 2rem) auto 0; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.song-foot nav { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.7rem; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; }
.song-foot nav a { color: var(--ink-dim); }
.song-foot nav a:hover { color: var(--ink); }

/* service tiles — chrome stays neutral, only the logo keeps its brand colour */
.svc {
  display: flex; align-items: center; gap: 0.8rem; padding: 0.75rem 0.9rem;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel);
  color: inherit; font-size: 0.95rem;
  transition: border-color 0.22s var(--ease), background 0.22s var(--ease), transform 0.22s var(--ease);
}
.svc:hover { border-color: var(--line-2); background: var(--panel-2); transform: translateY(-2px); }
.svc .logo-tile {
  width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center;
  background: #000; border: 1px solid var(--line);
}
.svc .logo-tile img { width: 18px; height: 18px; }
.svc .svc-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* One card alone gets room to breathe: bigger tile, type and padding. */
.svc-grid .svc:only-child {
  padding: 1.05rem 1.2rem; gap: 1rem; border-radius: var(--r-lg);
  font-size: 1.08rem;
}
.svc-grid .svc:only-child .logo-tile { width: 48px; height: 48px; border-radius: 13px; }
.svc-grid .svc:only-child .logo-tile img { width: 26px; height: 26px; }
/* The exact track earns its brand green: green tile, green edge, green tag.
   Every other card stays ink-on-black. */
.svc.is-exact {
  border-color: rgba(29, 185, 84, 0.5);
  background: linear-gradient(120deg, rgba(29, 185, 84, 0.12), var(--panel) 55%);
}
.svc.is-exact:hover { border-color: #1db954; background: linear-gradient(120deg, rgba(29, 185, 84, 0.16), var(--panel-2) 60%); }
.svc.is-exact .logo-tile { background: #1db954; border-color: transparent; }
.svc .exact-tag {
  margin-left: auto; flex: none; white-space: nowrap;
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: #1db954;
  border: 1px solid rgba(29, 185, 84, 0.5); border-radius: 999px;
  padding: 0.28rem 0.65rem;
}
.svc.unavail { opacity: 0.45; }
.svc .na-tag {
  margin-left: auto; font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--faint);
}
.verify-note { color: var(--muted); font-size: 0.9rem; margin-top: 0.9rem; }
.player.playing .play-btn { box-shadow: 0 12px 40px rgba(255, 20, 0, 0.45); }

/* --------------------------------------------------------------- kept page */
.kept { display: grid; gap: 0.9rem; }
.kept-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.kept-art { display: flex; flex: none; }
.kept-art img {
  width: 54px; height: 54px; border-radius: 10px; object-fit: cover;
  border: 1px solid var(--line); background: var(--panel-3); margin-left: -16px;
}
.kept-art img:first-child { margin-left: 0; }
.kept-title { flex: 1 1 12rem; min-width: 0; }
.kept-title h3 {
  font-family: var(--display); font-weight: 600; font-size: 1.25rem; margin: 0 0 0.2rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kept-actions { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.kept-toggle {
  justify-self: start; border: 0; background: transparent; padding: 0; cursor: pointer;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.kept-toggle:hover { color: var(--ink); }
/* A kept shelf is editable where it sits: the name in the heading, the note
   under it, and one pair of order controls per row in the list below. */
.kept-note {
  margin: 0.5rem 0 0; padding-left: 0.7rem; border-left: 2px solid var(--line-2);
  font-size: 0.92rem; color: var(--ink-dim); overflow-wrap: anywhere;
}
.kept-edit {
  display: grid; gap: 0.85rem; margin-top: 0.9rem; padding: clamp(0.8rem, 2vw, 1.1rem);
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2);
}
.kept-edit .fields { gap: 0.65rem; }
.kept-songs { margin-top: 0.2rem; grid-template-columns: 1fr; }
.kept-song { display: flex; align-items: center; gap: 0.4rem; }
.kept-song .song-card { flex: 1 1 auto; }
.kept-move { display: flex; align-items: center; gap: 0.2rem; flex: none; }
.kept-move button {
  width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--ink-dim); font-size: 0.95rem; line-height: 1;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.kept-move button:hover:not(:disabled) { border-color: var(--line-2); color: var(--ink); }
.kept-move button:disabled { opacity: 0.3; cursor: default; }
/* A row can be dragged by its body or nudged by its arrows; the grip says so. */
.kept-song[draggable="true"] { cursor: grab; }
.kept-song.dragging { opacity: 0.45; cursor: grabbing; }
.kept-song.drop-before { box-shadow: inset 0 2px 0 var(--red); }
.kept-song.drop-after { box-shadow: inset 0 -2px 0 var(--red); }
.kept-grip { color: var(--faint); font-size: 0.95rem; line-height: 1; user-select: none; padding: 0 0.1rem; }
.kept-pos {
  font-family: var(--mono); font-size: 0.64rem; color: var(--faint);
  min-width: 1.3rem; text-align: right;
}
#keptNote { display: block; margin: 0 0 1rem; }
.kept-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0 0 1.4rem; }
.link-btn {
  border: 0; background: transparent; cursor: pointer; font: inherit; padding: 0 0 0 0.35rem;
  color: var(--ink); text-decoration: underline; text-underline-offset: 3px;
}

/* ------------------------------------------------------------ utilities */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s var(--ease-fluid), transform 0.75s var(--ease-spring);
  will-change: opacity, transform;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease-fluid), transform 0.65s var(--ease-spring);
  transition-delay: calc(var(--stagger-i, 0) * 0.08s);
  will-change: opacity, transform;
}
.reveal-stagger.is-in > * {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .prow { animation: none !important; }
  .eq i, .pulse { animation: none !important; }
  .save-btn.pop { animation: none !important; }
  .save-btn .spark { display: none !important; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* legal + long-form copy */
.prose { max-width: 68ch; margin: 0 auto; padding: clamp(2rem, 6vw, 4rem) var(--rail); }
.prose h1 { font-family: var(--display); font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 0.8rem; }
.prose h2 { font-family: var(--display); font-size: 1.3rem; margin: 2.4rem 0 0.6rem; }
.prose p { color: var(--ink-dim); }
.prose a { color: var(--ink); border-bottom: 1px solid var(--red); padding-bottom: 1px; }
.prose a:hover { color: var(--red); }
.prose .back { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; }

/* ------------------------------------------------- auth + cloud sync */
/* Signed in: the header "Build your shelf" pill goes away — the Shelf nav,
   the avatar pill and the hero's "Open your shelf" already lead there, so the
   extra red button from the screenshot is pure duplication. */
body.is-signed-in .top-cta { display: none !important; }

#authArea { display: inline-flex; align-items: center; gap: 0.5rem; }
#authArea .fav-hint { letter-spacing: 0.1em; }
.auth-pill {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.32rem 0.7rem 0.32rem 0.4rem;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--panel); color: var(--ink);
  font-size: 0.85rem; font-weight: 500; line-height: 1;
  max-width: 11rem;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.auth-pill:hover { border-color: var(--ink); background: var(--panel-2); }
.auth-pill img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: none; }
.auth-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-pill .sync-dot {
  width: 7px; height: 7px; flex: none; border-radius: 999px;
  background: var(--faint);
}
.auth-pill .sync-dot.is-syncing { background: var(--red-soft); animation: pulse 1.2s var(--ease) infinite; }
.auth-pill .sync-dot.is-synced { background: var(--red); }
.uname-veil { position: fixed; inset: 0; z-index: var(--z-veil); display: grid; place-items: center; padding: 1rem; background: rgba(0, 0, 0, 0.62); }
.uname-card { width: min(22rem, 100%); background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 1.2rem; display: grid; gap: 0.65rem; }
.uname-title { font-family: var(--display); font-size: 1.15rem; font-weight: 600; }
.uname-sub { color: var(--muted); font-size: 0.85rem; margin: 0; }
.uname-input { width: 100%; padding: 0.6rem 0.75rem; border-radius: 10px; border: 1px solid var(--line-2); background: #000; color: var(--ink); font: inherit; }
.uname-input:focus { outline: none; border-color: var(--red); }
.uname-err { color: var(--red-soft); font-size: 0.8rem; min-height: 1.1em; margin: 0; }
.uname-pass { font-family: var(--mono); font-size: 1rem; letter-spacing: 0.06em; margin: 0; padding: 0.6rem 0.75rem; border-radius: 10px; border: 1px dashed var(--line-2); background: #000; color: var(--ink); user-select: all; overflow-wrap: anywhere; }
.uname-pass[hidden] { display: none; }
.uname-row { display: flex; gap: 0.5rem; justify-content: flex-end; }
.uname-sep { border-top: 1px solid var(--line); margin-top: 0.2rem; padding-top: 0.7rem; display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; color: var(--muted); font-size: 0.8rem; }
#cloudNote { max-width: 62ch; }

/* -------------------------------------------------------- page transitions */
/* Cross-document View Transitions: the header is its own layer, so it stays
   put between pages while the paper cross-fades with the spring. Browsers
   without support keep the hand-rolled fade in site.js — never both. */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  .top { view-transition-name: site-top; }
  ::view-transition-old(root) { animation: vt-out 0.22s var(--ease) both; }
  ::view-transition-new(root) { animation: vt-in 0.34s var(--ease-fluid) both; }
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* -------------------------------------------------------------- spotlight */
/* The border catches a little light where the pointer is: one delegated
   listener sets --mx/--my, the pseudo-element carries the glow. */
@media (hover: hover) and (pointer: fine) {
  .song-card, .panel, .featured, .door, .svc { position: relative; }
  .song-card::after, .panel::after, .featured::after, .door::after, .svc::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    opacity: 0; transition: opacity 0.3s var(--ease);
    background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.055), transparent 62%);
  }
  .song-card:hover::after, .panel:hover::after, .featured:hover::after,
  .door:hover::after, .svc:hover::after { opacity: 1; }
}

/* ------------------------------------------------------------- skeletons */
/* Shaped placeholders while real content resolves, so a page never sits
   blank and nothing jumps when the data lands. The global reduced-motion
   rule stills the sweep. */
.skel {
  display: block; position: relative; overflow: hidden;
  background: rgba(255, 255, 255, 0.045);
  border-radius: var(--r-sm);
}
.skel::after {
  content: "";
  position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  animation: skel-sweep 1.4s var(--ease) infinite;
}
@keyframes skel-sweep { 100% { transform: translateX(100%); } }
/* For replaced elements (an <img>): a tint under the frame, no pseudo-elements. */
.skel-plain { background: rgba(255, 255, 255, 0.045); }
.skel-square { width: 50px; height: 50px; flex: none; }
.skel-square.big { width: clamp(104px, 22vw, 168px); height: clamp(104px, 22vw, 168px); border-radius: calc(var(--r-lg) - 6px); }
.skel-block { display: grid; gap: 0.5rem; min-width: 0; flex: 1; }
.skel-line { height: 0.72rem; width: 62%; }
.skel-line.wide { width: 86%; }
.skel-line.short { width: 34%; }

/* Discover cards and the shared-viewer shell */
.skel-card {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.62rem 0.8rem;
  border: 1px solid var(--line); border-radius: var(--r);
}
.skel-viewer { display: grid; gap: 0.8rem; margin-top: 1.2rem; }
.skel-featured {
  display: flex; gap: clamp(0.9rem, 3vw, 1.8rem); align-items: center;
  padding: clamp(1rem, 2.6vw, 1.6rem);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(180deg, #0c0c0c, #050505);
}
.skel-list { display: grid; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--panel); }
.skel-row {
  display: grid; grid-template-columns: auto auto minmax(0, 1fr);
  gap: 0.8rem; align-items: center; padding: 0.62rem 0.8rem;
  border-top: 1px solid var(--line);
}
.skel-row .skel-square { width: 42px; height: 42px; border-radius: 8px; }
.skel-list .skel-row:first-child { border-top: 0; }
/* Lyrics placeholder lives inside a pre-wrap block: normal whitespace there,
   or the markup's own indentation would read as lines. */
.skel-lines { display: grid; gap: 0.55rem; white-space: normal; }

/* --------------------------------------------------------------- toasts */
/* Transient feedback that follows the eyes: an action deep in a list answers
   at the bottom of the screen, with Undo in reach, instead of writing into a
   hint line that has scrolled away. */
.toasts {
  position: fixed; left: 50%; bottom: max(1.1rem, env(safe-area-inset-bottom));
  transform: translateX(-50%); z-index: var(--z-toast);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  width: min(92vw, 32rem); pointer-events: none;
}
.toast {
  pointer-events: auto; max-width: 100%;
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.62rem 0.95rem;
  border: 1px solid var(--glass-border); border-radius: var(--r);
  background: rgba(10, 10, 12, 0.92);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-glass);
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; line-height: 1.5;
  color: var(--ink-dim);
  opacity: 0; transform: translateY(10px) scale(0.985);
  transition: opacity 0.28s var(--ease-fluid), transform 0.34s var(--ease-spring);
}
.toast.is-in { opacity: 1; transform: none; }
.toast.is-out { opacity: 0; transform: translateY(8px) scale(0.985); }
.toast-text { min-width: 0; }
.toast-action {
  flex: none; border: 0; background: none; cursor: pointer; padding: 0 0 0 0.1rem;
  font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px;
}
.toast-action:hover { color: var(--red-soft); }

/* ============================================================================
   FOLD, FLIP & ULTRA-NARROW / DUAL-SCREEN ADAPTABILITY
   Support for:
   - Ultra-narrow cover displays (Galaxy Z Fold cover: ~280px - 340px)
   - Square unfolded dual-screen aspect ratios (~1:1, 4:3, 5:4)
   - Samsung Z Flip / Razr tall aspect ratios (~21:9 to 22:9)
   - Notches, punch holes & safe-area-insets (env(safe-area-inset-*))
   ========================================================================== */

/* 1. Safe Area Insets for Edge-to-Edge Displays & Fold Creases */
.top-inner {
  padding-left: max(var(--rail), env(safe-area-inset-left));
  padding-right: max(var(--rail), env(safe-area-inset-right));
}
.hero, .sec, .page-head, .song-stage {
  padding-left: max(var(--rail), env(safe-area-inset-left));
  padding-right: max(var(--rail), env(safe-area-inset-right));
}
.foot-inner {
  padding-left: max(var(--rail), env(safe-area-inset-left));
  padding-right: max(var(--rail), env(safe-area-inset-right));
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}

/* 2. Fold Cover Screens & Compact Mobile (< 340px width, e.g. Z Fold closed at 280px - 320px) */
@media (max-width: 340px) {
  :root {
    --rail: 0.85rem;
  }
  .display { font-size: 1.85rem; letter-spacing: -0.02em; }
  .display-sm { font-size: 1.45rem; }
  .brand { font-size: 1.15rem; }
  .btn { padding: 0.55rem 0.9rem; font-size: 0.82rem; }
  .song-card { padding: 0.45rem 0.6rem; gap: 0.65rem; }
  .song-card img { width: 42px; height: 42px; }
  .song-card .t b { font-size: 0.88rem; }
  .song-card .t span { font-size: 0.78rem; }
  .fav-row { flex-direction: column; align-items: stretch; }
  .fav-row > .btn { align-self: stretch; width: 100%; }
  .fields { grid-template-columns: 1fr; }
  .share-row { flex-direction: column; align-items: stretch; }
  .share-row .btn { width: 100%; }
}

/* 3. Unfolded Square / Tablet Posture (Galaxy Fold unfolded 1:1 to 5:4 aspect ratio) */
@media (min-width: 600px) and (max-aspect-ratio: 4/3) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-copy { max-width: 100%; }
  .preview { max-width: 100%; }
  .shelf-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 4. Tall Flip Phones (e.g. 21:9 / 22:9 aspect ratio, Z Flip unfolded) */
@media (min-aspect-ratio: 1/2) and (max-width: 500px) {
  .hero { min-height: 85svh; display: flex; flex-direction: column; justify-content: center; }
  .hero-grid { margin: auto 0; }
}

/* 5. Dual-screen Spanning & Fold Postures (CSS Spanning Media Queries) */
@media (horizontal-viewport-segments: 2) {
  .hero-grid {
    display: grid;
    grid-template-columns: env(viewport-segment-width 0 0) env(viewport-segment-width 1 0);
    gap: env(viewport-segment-gap-width 0 0);
  }
}

/* Profile badges — premium pills shown beside usernames (Discover cards,
 * @ shelves, admin). Fixed set: beta / dev / founder (see FavBadges). */
.fbadge {
  display: inline-block;
  vertical-align: 0.12em;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.18em 0.55em 0.16em;
  margin-left: 0.45em;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.fbadge-beta {
  color: #7df0ff;
  border-color: rgba(125, 240, 255, 0.45);
  background: linear-gradient(120deg, rgba(125, 240, 255, 0.16), rgba(125, 240, 255, 0.04));
}
.fbadge-dev {
  color: #ff8d7e;
  border-color: rgba(255, 141, 126, 0.45);
  background: linear-gradient(120deg, rgba(226, 60, 40, 0.28), rgba(226, 60, 40, 0.06));
}
.fbadge-founder {
  color: #ffd97a;
  border-color: rgba(255, 217, 122, 0.5);
  background: linear-gradient(120deg, rgba(255, 200, 60, 0.24), rgba(255, 200, 60, 0.05));
}

/* Time capsules — frozen playlists on shelf pages and @ viewers. */
.capsule-row { border-top: 1px solid var(--line); padding: 0.9rem 0; }
.capsule-row:first-child { border-top: 0; }
.capsule-head { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.capsule-head b { font-family: var(--display); font-size: 1.05rem; }
.capsule-acts { display: flex; gap: 0.5rem; margin-top: 0.55rem; flex-wrap: wrap; }
.capsule-tracks { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; gap: 0.45rem; }
.capsule-tracks li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.92rem; }
.capsule-tracks img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex: none; }
