/* =====================================================================
   ג'ורדן — תסמוך על הרגשות שלך, זו הדרך
   Design tokens pulled from the album artwork: oxblood velvet, cream
   satin, cracked-CD silver, warm ink handwriting.
   ===================================================================== */

:root {
  --bg: #0a0605;
  --maroon-deep: #2a0a0d;
  --maroon: #4a1116;
  --maroon-light: #6e1c22;
  --ink: #e9ddc8;
  --ink-dim: #b7a98f;
  --cream: #efe6d6;
  --gold: #c9a24a;

  --font-serif: 'Frank Ruhl Libre', 'Times New Roman', serif;
  /* Legible-first "handwritten" voice: an italic literary serif carries the
     handmade feeling through slant/spacing/motion rather than script glyphs.
     --font-script is kept loaded for short, already-legible accent moments,
     and is the easiest slot to swap for real handwriting PNG/SVG assets later. */
  --font-hand: 'Frank Ruhl Libre', 'Times New Roman', serif;
  --font-script: 'Noto Rashi Hebrew', var(--font-hand);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast: 0.5s;
  --dur-med: 1.1s;
  --dur-slow: 1.6s;

  --section-pad: clamp(3.5rem, 11vw, 7rem);
  /* Total height of the dark band that blends the hero into whatever
     comes right after it — see .hero-seam. */
  --hero-seam-height: 260px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; min-width: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
/* Desktop only: every size in the site is rem-based, so nudging the root
   size (~6%) enlarges all text together, proportionally. Mobile untouched. */
@media (min-width: 900px) {
  html { font-size: 106.25%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}
/* `clip` on body instead of `hidden`: with both html and body set to
   hidden, body silently becomes its own scroll container (overflow-y
   turns to auto), which is a known source of sideways-drag on iOS. */
body { overflow-x: clip; }

body {
  position: relative;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.intro-active {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }

::selection { background: var(--maroon-light); color: var(--cream); }

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

/* ---------------------------------------------------------------- */
/* Page background — one continuous fabric canvas behind the entire    */
/* document, completely independent of section/content height. Each    */
/* layer is sized purely from viewport WIDTH (intrinsic aspect ratio    */
/* via width:100%/height:auto), never from vh or from any container's   */
/* content height — so opening/closing a track can never make it        */
/* zoom, jump or re-crop. Layers overlap generously and cross-dissolve  */
/* via long mask fades, so there is never a hard edge between them.     */
/* Anchored to start right below the hero (not body top), so none of    */
/* it is wasted behind the hero's own opaque photo.                     */
/* ---------------------------------------------------------------- */
.section,
.site-footer {
  position: relative;
  /* Transparent on purpose — the page-bg canvas behind the whole
     document shows through here; body's own --bg is the fallback for
     anywhere the fabric layers don't reach. */
  background: transparent;
}

/* No z-index here on purpose: left at auto and placed first in the      */
/* body, it paints below every later (z-index:auto) sibling purely by    */
/* DOM order — the same mechanism the page already relies on elsewhere — */
/* without creating its own stacking context.                            */
.page-bg {
  position: absolute;
  top: 100vh;
  top: 100svh;
  top: var(--hero-h, 100svh);
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
}
.page-bg-layer {
  position: absolute;
  left: 0;
  width: 100%;
  display: block;
}
.page-bg-layer img {
  display: block;
  width: 100%;
  height: auto;
}
.page-bg-layer-1 {
  top: 0;
  /* Slightly toned down — at full strength the fabric's own pattern was
     competing with the tracklist text sitting on top of it (worse on
     mobile, where the crop is busier). */
  opacity: 0.88;
  /* Slower fade-IN than the others on purpose — it's the one dissolving
     against the hero's own fade-out just above it, so the combined ramp
     needs to be gentle, not just this layer's own edge. */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 38%, black 68%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, black 38%, black 68%, transparent 100%);
}
@media (max-width: 899px) {
  .page-bg-layer-1 { opacity: 0.76; }
}
.page-bg-layer-2 {
  top: calc(177.7vw - 420px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 24%, black 65%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, black 24%, black 65%, transparent 100%);
}
.page-bg-layer-2 img { transform: scaleX(-1); }
/* The emotional descent: kept faint throughout (not just at its own
   edges) rather than fully opaque in the middle, so this whole stretch
   (around "מה אתה מרגיש" through the personal Instagram section) reads
   as intentionally near-black with only a whisper of fabric — not like
   the artwork simply ran out. */
.page-bg-layer-3 {
  top: calc(355.4vw - 840px);
  opacity: 0.16;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 75%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 75%, transparent 100%);
}
/* The fabric slowly returning toward the social/community area — same
   artwork, same technique, just held to a lower strength than the top
   of the page so it reads as a return rather than a repeat. Anchored
   from the BOTTOM of the page (not cascaded down from the hero like
   1/2/3) on purpose: the feelings/connection stretch between them is
   long text content whose real height varies by device/content, so a
   top-down offset guessed from one test would land in the wrong place
   on another. Anchoring to the bottom means it always reaches the
   actual end of the page regardless of how tall that stretch turns out
   to be. */
.page-bg-layer-4 {
  bottom: -60px;
  opacity: 0.4;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 55%, black 92%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, black 55%, black 92%, transparent 100%);
}
.page-bg-layer-4 img { transform: scaleX(-1); }
@media (min-width: 900px) {
  .page-bg-layer-2 { top: calc(56.28vw - 420px); }
  .page-bg-layer-3 { top: calc(112.56vw - 840px); }
}

/* ---------------------------------------------------------------- */
/* Extra fine scratch/grain overlay, unifying the photographed          */
/* textures above with a bit more consistent wear. Scrolls with the     */
/* page for the same reason as .page-bg above; pointer-events: none     */
/* so it can never block a tap.                                         */
/* ---------------------------------------------------------------- */
.scratch-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: screen;
  background: url("../assets/textures/scratches.webp") top center / 100% auto repeat-y;
}

.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  animation: grain-shift 8s steps(8) infinite;
}
/* Shifts the tile, not the element, so the overlay's box never extends
   past the viewport edge (a translated fixed layer did, by ~2%). */
@keyframes grain-shift {
  0%   { background-position: 0 0; }
  20%  { background-position: -8px 6px; }
  40%  { background-position: 7px -4px; }
  60%  { background-position: -4px -7px; }
  80%  { background-position: 4px 4px; }
  100% { background-position: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .grain-overlay { animation: none; }
}

/* ---------------------------------------------------------------- */
/* Intro                                                              */
/* ---------------------------------------------------------------- */
#intro {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--dur-slow) var(--ease), visibility var(--dur-slow);
}
#intro.hide {
  opacity: 0;
  visibility: hidden;
}
#intro.hide-instant {
  transition: none;
  opacity: 0;
  visibility: hidden;
}

.intro-text {
  position: absolute;
  left: 50%;
  top: 50%;
  font-family: var(--font-hand);
  font-style: italic;
  font-size: clamp(1.5rem, 6vw, 2.75rem);
  color: var(--cream);
  text-align: center;
  padding: 0 1.5rem;
  width: 100%;
  opacity: 0;
  letter-spacing: 0.01em;
  /* Purely decorative reveal text, layered at the same center point as
     the gender buttons — without this, an invisible (opacity: 0) line
     still sits in front of and swallows clicks meant for whatever's
     stacked underneath it. This was the actual cause of the gender
     buttons only registering a tap "at a specific angle". */
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 10px));
  transition: opacity var(--dur-med) var(--ease), transform var(--dur-med) var(--ease);
}
.intro-text.show {
  opacity: 0.92;
  transform: translate(-50%, -50%);
}

.intro-skip {
  position: absolute;
  bottom: max(2rem, env(safe-area-inset-bottom));
  right: 2rem;
  background: none;
  border: none;
  color: var(--ink-dim);
  font-family: var(--font-serif);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  opacity: 0.55;
  cursor: pointer;
  padding: 0.6rem;
  min-height: 2.5rem;
  z-index: 2;
}
.intro-skip:hover { opacity: 0.9; }

.intro-gender {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  gap: 1rem;
  opacity: 0;
  transform: translate(-50%, calc(-50% + 10px));
  transition: opacity var(--dur-med) var(--ease), transform var(--dur-med) var(--ease);
  pointer-events: none;
}
.intro-gender.show {
  opacity: 1;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}
/* No rotation here on purpose — this is a real choice, not decoration,
   so the clickable area must exactly match what's drawn on screen. */
.intro-gender-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.6rem;
  font-family: var(--font-hand);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--cream);
  background: rgba(233,221,200,0.04);
  border: 1px solid rgba(233,221,200,0.3);
  border-radius: 999px 4px 999px 4px;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.intro-gender-btn:hover {
  border-color: var(--gold);
  background: rgba(233,221,200,0.08);
}
@media (max-width: 899px) {
  .intro-gender-btn { padding: 0.85rem 2.1rem; min-width: 8rem; }
}

/* ---------------------------------------------------------------- */
/* Hero                                                                */
/* ---------------------------------------------------------------- */
#hero {
  position: relative;
  /* svh LAST on purpose (it wins where supported) — 100vh assumes the
     mobile browser's address bar is already hidden, so on first load
     (bar still visible) the hero box was taller than what's actually
     on screen, pushing the CTA just below the fold until the user
     scrolled a little. 100svh sizes to the smallest real case instead. */
  min-height: 100vh;
  min-height: 100svh;
  /* Set by main.js on touch devices only: the viewport height at load,
     kept fixed while the browser chrome (Instagram's header, Safari's
     toolbar) collapses and expands — otherwise the hero grows a little
     and its cover-fit photo visibly zooms in mid-scroll. */
  min-height: var(--hero-h, 100svh);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background: var(--maroon-deep);
}

.hero-bg-wrap {
  position: absolute;
  inset: -3%;
  will-change: transform;
}
.hero-bg-wrap picture,
.hero-bg-img {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-bg-img {
  object-fit: cover;
  object-position: center 22%;
  filter: saturate(0.85) brightness(0.55);
}
@media (min-width: 900px) {
  .hero-bg-img { object-position: center 38%; }
}
@media (min-width: 1400px) {
  .hero-bg-img { object-position: center 42%; }
}

/* A holographic sheen confined to the CD's own circular shape — the
   disc catching light, not emitting it. No rays beyond the disc edge.
   A soft radial mask (not a hard clip) fades the sheen out well before
   the disc's edge, so it reads as light on the surface rather than a
   spotlight cutout. Center/radius below are measured from the actual
   photo. Reacts very slightly to pointer position on desktop via
   --holo-x/--holo-y, set in main.js. */
.hero-holo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  mix-blend-mode: screen;
  opacity: 0.26;
  -webkit-mask-image: radial-gradient(circle 38vw at 55% 58%, black 0%, black 45%, transparent 92%);
          mask-image: radial-gradient(circle 38vw at 55% 58%, black 0%, black 45%, transparent 92%);
  transform: translate3d(var(--holo-x, 0px), var(--holo-y, 0px), 0);
}
.hero-holo::before {
  content: "";
  position: absolute;
  inset: -25%;
  background: conic-gradient(from 0deg at 50% 50%,
    rgba(255,150,190,0.6), rgba(255,215,140,0.55), rgba(170,255,195,0.55),
    rgba(150,195,255,0.6), rgba(205,155,255,0.55), rgba(255,150,190,0.6));
  filter: blur(3px);
  animation: hero-holo-spin 90s linear infinite;
}
@media (min-width: 900px) {
  .hero-holo {
    -webkit-mask-image: radial-gradient(circle 16vw at 50% 44%, black 0%, black 45%, transparent 92%);
            mask-image: radial-gradient(circle 16vw at 50% 44%, black 0%, black 45%, transparent 92%);
  }
}
@media (min-width: 1400px) {
  .hero-holo {
    -webkit-mask-image: radial-gradient(circle 16vw at 50% 47%, black 0%, black 45%, transparent 92%);
            mask-image: radial-gradient(circle 16vw at 50% 47%, black 0%, black 45%, transparent 92%);
  }
}
@keyframes hero-holo-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-holo::before { animation: none; }
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 65%, transparent 28%, rgba(6,3,2,0.72) 82%),
    linear-gradient(180deg, rgba(6,3,2,0.55) 0%, rgba(6,3,2,0.12) 32%, rgba(10,6,5,0.88) 100%);
}

/* A dedicated, independent seam between the hero and the section right
   after it — separate from the hero itself and from the long page-bg
   cascade below, so neither has to change to fix this. It's a simple
   dark burgundy band painted across the boundary: it fades in from
   nothing over the hero's last stretch, peaks right at the boundary,
   then fades out again over the fabric's first stretch, so the eye
   never finds the exact line where the hero photo ends and the fabric
   begins — they both just quietly emerge from/into the same darkness.
   Placed in the DOM right after #hero and before <main> (both z-index:
   auto) so it naturally paints above the hero and below the section's
   own real content, no z-index needed. */
.hero-seam {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100vh - var(--hero-seam-height) / 2);
  top: calc(100svh - var(--hero-seam-height) / 2);
  top: calc(var(--hero-h, 100svh) - var(--hero-seam-height) / 2);
  height: var(--hero-seam-height);
  pointer-events: none;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(9,4,4,0.9) 32%,
    rgba(9,4,4,0.9) 68%,
    transparent 100%);
}
@media (min-width: 900px) {
  .hero-seam { --hero-seam-height: 320px; }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem clamp(3.5rem, 9vw, 5.5rem);
  max-width: 42rem;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1.4s var(--ease) 0.2s, transform 1.4s var(--ease) 0.2s;
}
@media (max-width: 899px) {
  /* A little extra lift on top of the 100svh fix above, so the CTA
     sits comfortably on screen on first load, not right at the edge. */
  .hero-content { padding-bottom: clamp(4.5rem, 12vw, 6rem); }
}
body.hero-revealed .hero-content {
  opacity: 1;
  transform: translateY(0);
}

.hero-artist {
  font-family: var(--font-script);
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  color: var(--cream);
  margin: 0 0 0.75rem;
}

.hero-title {
  font-family: var(--font-hand);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 5.6vw, 2.6rem);
  line-height: 1.35;
  color: var(--ink);
  margin: 0 0 1.25rem;
  text-shadow: 0 2px 24px rgba(0,0,0,0.6);
}

.hero-date {
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  color: var(--ink-dim);
  margin: 0 0 2rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  font-family: var(--font-hand);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--cream);
  text-decoration: none;
  padding: 0.7rem 1.8rem;
  border: 1px solid rgba(233,221,200,0.35);
  border-radius: 999px 4px 999px 4px;
  background: rgba(233,221,200,0.03);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  transform: rotate(-0.8deg);
}
.hero-cta:hover {
  border-color: var(--gold);
  background: rgba(233,221,200,0.08);
  transform: rotate(0deg) translateY(-2px);
}
.icon-headphones { color: var(--gold); flex-shrink: 0; }

/* ---------------------------------------------------------------- */
/* Sections — shared. All transparent: the bg-canvas shows through.    */
/* ---------------------------------------------------------------- */
.section {
  position: relative;
  padding: var(--section-pad) 1.5rem;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.section.in-view {
  opacity: 1;
  transform: translateY(0);
}
@media (max-width: 899px) {
  /* Mobile only — the hero-to-listen handoff felt like a bigger black
     gap than intended, both from the seam itself (--hero-seam-height
     above) and from this section's own full top padding on top of it. */
  #listen { padding-top: clamp(1.5rem, 7vw, 2.75rem); }
}
.section-minor {
  /* Was flush (0) against the section before it, which read as glued
     together rather than two distinct beats — a little air on both
     sides now, without the full --section-pad of a regular section. */
  padding-top: clamp(2rem, 7vw, 4rem);
  padding-bottom: clamp(3rem, 9vw, 5rem);
}

.section-inner {
  max-width: 40rem;
  margin: 0 auto;
}

.handwritten-heading {
  font-family: var(--font-hand);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 5.2vw, 2.3rem);
  line-height: 1.4;
  color: var(--cream);
  text-align: center;
  margin: 0 0 2.5rem;
}
.handwritten-heading-small {
  font-size: clamp(1.1rem, 3.6vw, 1.5rem);
  margin-bottom: 1.75rem;
  color: var(--ink-dim);
}
.heading-asset {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
#hero-title .heading-asset {
  width: min(88vw, 26rem);
}
@media (min-width: 900px) {
  #hero-title .heading-asset { width: min(60vw, 32rem); }
}

.icon-heart {
  color: var(--gold);
  flex-shrink: 0;
}

/* ---------------------------------------------------------------- */
/* Listen                                                              */
/* ---------------------------------------------------------------- */
.listen-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

/* ---------------------------------------------------------------- */
/* Platform buttons — the one shared visual language for every         */
/* Spotify/Apple Music/YouTube link on the site (main album, per-track, */
/* emotion reveal), at two sizes.                                       */
/* ---------------------------------------------------------------- */
.platform-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.platform-buttons-lg { justify-content: center; }
.platform-buttons-sm { gap: 0.75rem; margin-top: 0.5rem; }

.platform-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-decoration: none;
  cursor: pointer;
  color: var(--ink);
  background: rgba(233,221,200,0.04);
  border: 1px solid rgba(233,221,200,0.18);
  border-radius: 999px 4px 999px 4px;
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  transform: rotate(var(--tilt, 0deg));
}
.platform-btn:nth-child(1) { --tilt: -1.2deg; }
.platform-btn:nth-child(2) { --tilt: 0.8deg; }
.platform-btn:nth-child(3) { --tilt: -0.5deg; }
.platform-btn:hover,
.platform-btn:focus-visible {
  transform: rotate(0deg) translateY(-2px);
  border-color: var(--gold);
  background: rgba(233,221,200,0.08);
}

.platform-btn-lg {
  padding: 0.9rem 1.6rem;
  min-height: 3rem;
  font-size: 1rem;
}
.platform-btn-sm {
  padding: 0.5rem 1rem;
  min-height: 2.5rem;
  font-size: 0.82rem;
}

.platform-btn-mark {
  font-size: 1.1rem;
  color: var(--gold);
}
.platform-btn-sm .platform-btn-mark { font-size: 0.95rem; }

.track-listen-label,
.feeling-result-line + .platform-buttons-sm {
  margin-top: 0.5rem;
}
.track-listen-label {
  font-size: 0.75rem;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
  padding: 0 0.25rem;
  margin: 0.25rem 0 0;
}

/* ---------------------------------------------------------------- */
/* Tracklist                                                          */
/* ---------------------------------------------------------------- */
/* ~10% brighter dim text inside the tracklist (#b7a98f -> #c9ba9d). */
#tracklist { --ink-dim: #c9ba9d; }
.tracklist-subtext {
  text-align: center;
  color: var(--ink-dim);
  font-size: 0.92rem;
  margin: -1.5rem 0 2.5rem;
}

.track-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(233,221,200,0.2);
}

.track {
  border-bottom: 1px solid rgba(233,221,200,0.2);
}

.track-toggle {
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  background: none;
  border: none;
  border-inline-start: 2px solid transparent;
  color: var(--ink);
  text-align: right;
  padding: 1.15rem 0.25rem;
  padding-inline-start: 0.6rem;
  min-height: 3rem;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease), padding var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.track-toggle:hover,
.track-toggle:focus-visible { color: var(--cream); padding-right: 0.5rem; }

/* Extremely subtle "this one is selected" state — a hairline marker,
   a gold number, a slightly brighter title. Never a filled/boxed row. */
.track.open .track-toggle { border-inline-start-color: rgba(201,162,74,0.55); }
.track.open .track-number { color: var(--gold); }
.track.open .track-name { color: var(--cream); }

.track-number {
  font-size: 0.75rem;
  color: var(--ink-dim);
  min-width: 1.6rem;
  transition: color var(--dur-fast) var(--ease);
}

/* Holds the name + tag together as one unit that hugs the number,
   instead of the name alone stretching to fill the row and stranding
   the tag off at the far edge. Leftover space in the row now falls
   after the tag, where it's invisible. */
.track-title {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  min-width: 0;
}

.track-name {
  font-family: var(--font-hand);
  font-style: italic;
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  transition: color var(--dur-fast) var(--ease);
}
/* Static rows only (never touches .track.open, which already has its
   own distinct look via the gold number/border) — a touch brighter and
   a soft dark contact-shadow so the name reads clearly against the
   fabric instead of blending into it. */
.track:not(.open) .track-name {
  color: var(--cream);
  text-shadow: 0 1px 4px rgba(8,3,3,0.5);
}

.track-tag {
  font-size: 0.7rem;
  color: var(--ink-dim);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Instant, no transition on purpose — clicking a track shows its
   content in the very next frame, like an old CD-ROM booklet rather
   than a polished modern accordion. The layout is allowed to jump. */
.track-detail {
  display: none;
}
.track.open .track-detail {
  display: block;
}

/* Repeats the track's own number/title inside the detail panel — only
   shown on desktop, where the panel sits apart from the clicked row in
   a separate column, so it's never ambiguous which track is open. On
   mobile the panel already sits directly under the row that names it. */
.track-detail-head { display: none; }

/* Desktop: the tracklist stays a compact right-hand column; the
   currently open track's content appears in the empty space to its
   left instead of growing the list itself. .track-detail escapes its
   <li>/<ol> ancestors via position:absolute against .tracklist-grid
   (the nearest positioned ancestor) — no DOM changes needed. */
@media (min-width: 900px) {
  .tracklist-grid {
    position: relative;
    display: grid;
    grid-template-columns: 22rem 1fr;
    gap: 3rem;
    align-items: start;
  }
  /* top comes from --detail-top, set in JS to the selected row's own
     offset within .tracklist-grid, so the panel always opens level with
     the row that triggered it — never pinned to the top of the list.
     No max-height/scroll on purpose: if the content is taller than the
     space below it, it's allowed to run down past the grid rather than
     being clamped or shifted back up away from the row. For a track
     low enough in the list (or with the artist editor open, which adds
     real height), that overflow can reach into the section below. */
  .track.open .track-detail {
    position: absolute;
    top: var(--detail-top, 0px);
    left: 0;
    width: calc(100% - 22rem - 3rem);
    z-index: 2;
  }
  /* .section (in-view) sets its own transform, which makes every
     section its own stacking context regardless of any z-index a
     descendant declares — a child z-index can win against its own
     siblings, but it can never escape to paint above a LATER section's
     entire stacking context. So when the open panel above might overflow
     downward into #feelings, #tracklist itself needs the elevated
     z-index — not just its child — to actually paint on top there,
     keeping the note editor's own buttons (like save) reachable instead
     of intercepted by #feelings' content sitting underneath. */
  #tracklist:has(.track.open) {
    z-index: 3;
  }
  /* min-height is set from JS (--grid-min) to the open panel's bottom
     edge, so the grid — and with it the section — always reaches at
     least as low as the panel; the section's own bottom padding is the
     breathing room before the next section. */
  .tracklist-grid { min-height: var(--grid-min, 0px); }
  /* Desktop-only legibility bump; mobile sizes stay as they were. */
  .tracklist-subtext {
    font-size: 1.2rem;
    color: rgba(233,221,200,0.9);
    margin-bottom: 3rem;
  }
  .track-tag {
    font-size: 0.9rem;
    color: rgba(233,221,200,0.86);
  }
  .track-detail-head {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    margin: 0 0.25rem 1.2rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(233,221,200,0.08);
  }
  .track-detail-number {
    font-size: 0.8rem;
    color: var(--gold);
  }
  .track-detail-title {
    font-family: var(--font-hand);
    font-style: italic;
    font-size: clamp(1.3rem, 2vw, 1.7rem);
    color: var(--cream);
  }
}

.track-lyric {
  font-family: var(--font-hand);
  font-style: italic;
  color: var(--ink-dim);
  font-size: 1rem;
  padding: 0 0.25rem 1rem;
  margin: 0;
}

.track-image {
  width: 100%;
  max-width: 16rem;
  border-radius: 2px;
  margin: 0 0.25rem 1rem;
  filter: saturate(0.9);
}

.track-detail .platform-buttons-sm {
  padding: 0 0.25rem 1.1rem;
}
.track-detail .track-listen-label {
  padding: 0 0.25rem;
}

/* Track notes — the per-track story/image/teaser, public once set,
   editable only when signed in as the artist. */
.track-note { padding: 0 0.25rem; }
.track-note:empty { display: none; }

/* No card around the story anymore — the physical photo is the object,
   the text just rests on the fabric beside/below it. */
.track-note-display {
  margin: 0.25rem 0 1.1rem;
  padding: 0;
}

/* A physical print resting on the fabric. Image itself is untouched
   apart from a very light aged-print softening. Static — no animation. */
.track-memory-photo {
  --rot: 0deg;
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 20rem;
  margin: 0.4rem 0.3rem 1.3rem;
  transform: rotate(var(--rot));
}
/* Irregular soft contact shadow, offset and unevenly shaped so the
   print reads as slightly lifted off the cloth. */
.track-memory-photo::before {
  content: "";
  position: absolute;
  inset: 8px -3px -9px 5px;
  z-index: -1;
  background: rgba(0,0,0,0.5);
  border-radius: 34% 8% 28% 12% / 10% 26% 12% 30%;
  filter: blur(9px);
}
.track-memory-print {
  position: relative;
  padding: 3px 4px 4px 3px;
  background: #170708;
  border-radius: 1px 2px 1px 3px / 2px 1px 2px 1px;
  box-shadow: 0 0 0 1px rgba(74,17,22,0.6), 1px 1px 2px rgba(0,0,0,0.45);
}
.track-note-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
  filter: saturate(0.88) contrast(0.94) sepia(0.07) brightness(0.96);
}
/* Scratches (the album's own texture) + fine grain + faded edges,
   clipped to the picture area only. */
.track-memory-print::before,
.track-memory-print::after {
  content: "";
  position: absolute;
  inset: 3px 4px 4px 3px;
  pointer-events: none;
}
.track-memory-print::before {
  background: url("../assets/textures/scratches.webp") center / cover;
  mix-blend-mode: screen;
  opacity: 0.22;
}
.track-memory-print::after {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.9'/></svg>");
  mix-blend-mode: overlay;
  opacity: 0.2;
  box-shadow: inset 0 0 16px rgba(30,8,8,0.45);
}

/* A small piece of aged transparent tape, only on some tracks. */
.track-memory-tape {
  position: absolute;
  top: -0.5rem;
  z-index: 2;
  width: 3.4rem;
  height: 1rem;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 5px),
    linear-gradient(rgba(214,196,150,0.26), rgba(196,178,132,0.18));
  clip-path: polygon(0 12%, 3% 0, 6% 14%, 9% 2%, 100% 0, 97% 30%, 100% 55%, 96% 80%, 100% 100%, 8% 100%, 4% 86%, 0 100%, 3% 55%);
}
.track-memory-tape-right { right: 1.6rem; transform: rotate(-4deg); }
.track-memory-tape-left  { left: 1.3rem;  transform: rotate(3deg); }

.track-memory-caption {
  margin: 0.65rem 0.35rem 0;
  font-family: var(--font-script);
  font-size: 1.02rem;
  line-height: 1.4;
  color: rgba(226,212,184,0.82);
  transform: rotate(calc(var(--rot) * -1.5));
  text-shadow: 0 1px 4px rgba(8,3,3,0.6);
}

.track-note-story {
  font-family: var(--font-hand);
  font-style: italic;
  color: var(--ink-dim);
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0 0 0.85rem;
  white-space: pre-wrap;
  text-shadow: 0 1px 6px rgba(8,3,3,0.7);
}
.track-note-story:last-child { margin-bottom: 0; }
.track-note-audio {
  width: 100%;
  max-width: 22rem;
  height: 2.25rem;
  filter: sepia(0.35) saturate(0.6) brightness(0.9);
}

.track-note-edit-wrap { margin: 0.25rem 0 1.1rem; }
.track-note-edit-toggle {
  background: none;
  border: none;
  color: rgba(201,186,157,0.6);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  padding: 0.35rem 0.1rem;
  min-height: 2rem;
}
.track-note-edit-toggle:hover { color: var(--gold); }

.track-note-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.6rem;
  padding: 0.9rem;
  border: 1px dashed rgba(233,221,200,0.2);
  border-radius: 3px;
}
.track-note-story-input {
  width: 100%;
  resize: vertical;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink);
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(233,221,200,0.18);
  border-radius: 3px;
  padding: 0.6rem 0.75rem;
}
.track-note-file-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
/* Real <input type="file"> stays in the DOM and fully functional —
   just visually hidden and triggered via the styled button next to it,
   so the browser's native "Choose File" chrome never shows. */
.track-note-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.track-note-file-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.track-note-file-btn {
  background: none;
  border: 1px solid rgba(233,221,200,0.22);
  color: var(--ink-dim);
  border-radius: 999px;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  padding: 0.4rem 0.9rem;
  min-height: 2.1rem;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.track-note-file-btn:hover { border-color: var(--gold); color: var(--cream); }
.track-note-file-btn.has-file { border-color: rgba(201,162,74,0.5); color: var(--gold); }
.track-note-file-state {
  font-size: 0.72rem;
  color: var(--ink-dim);
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.track-note-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.track-note-status { font-size: 0.75rem; color: var(--ink-dim); }
.track-note-save {
  background: none;
  color: var(--cream);
  border: 1px solid rgba(233,221,200,0.3);
  border-radius: 999px;
  padding: 0.45rem 1.25rem;
  min-height: 2.4rem;
  font-family: var(--font-hand);
  font-style: italic;
  cursor: pointer;
}
.track-note-save:hover { border-color: var(--gold); }
.track-note-save:disabled { opacity: 0.5; cursor: default; }

/* ---------------------------------------------------------------- */
/* Feelings                                                            */
/* ---------------------------------------------------------------- */
.feelings-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
}

.feeling-word {
  background: none;
  border: none;
  font-family: var(--font-hand);
  font-style: italic;
  font-size: clamp(1.15rem, 3.8vw, 1.5rem);
  color: var(--ink-dim);
  cursor: pointer;
  padding: 0.5rem 0.4rem;
  min-height: 2.75rem;
  position: relative;
  transition: color var(--dur-fast) var(--ease);
}
.feeling-word::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--dur-fast) var(--ease);
}
.feeling-word:hover,
.feeling-word:focus-visible { color: var(--cream); }
.feeling-word.active { color: var(--gold); }
.feeling-word.active::after { transform: scaleX(1); }

/* Instant, no transition on purpose — matches the tracklist's "next
   frame" feel rather than a fade. */
.feeling-result {
  text-align: center;
  margin-top: 3rem;
  min-height: 3rem;
  display: none;
}
.feeling-result.show {
  display: block;
}

.feeling-result-line {
  font-family: var(--font-hand);
  font-style: italic;
  font-size: clamp(1.15rem, 3.6vw, 1.4rem);
  color: var(--cream);
  margin: 0 0 1.25rem;
}

.feeling-result .platform-buttons-sm { justify-content: center; }

/* ---------------------------------------------------------------- */
/* Connection / contact                                                */
/* ---------------------------------------------------------------- */
#connection { text-align: center; }

.contact-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.25rem;
  text-decoration: none;
  color: var(--cream);
  font-family: var(--font-hand);
  font-style: italic;
  font-size: 1.15rem;
  padding: 0.9rem 2.25rem;
  border: 1px solid rgba(233,221,200,0.3);
  border-radius: 999px 4px 999px 4px;
  background: rgba(233,221,200,0.03);
  transform: rotate(-1deg);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.contact-cta:hover,
.contact-cta:focus-visible {
  border-color: var(--gold);
  background: rgba(233,221,200,0.06);
  transform: rotate(0deg) translateY(-2px);
}

/* ---------------------------------------------------------------- */
/* Follow                                                              */
/* ---------------------------------------------------------------- */
.follow-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.follow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  text-decoration: none;
  cursor: pointer;
  color: var(--ink-dim);
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  padding: 0.55rem 1.4rem;
  border: 1px solid rgba(233,221,200,0.16);
  border-radius: 999px 4px 999px 4px;
  background: rgba(233,221,200,0.03);
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  transform: rotate(var(--tilt, 0deg));
}
.follow-btn:nth-child(1) { --tilt: -1deg; }
.follow-btn:nth-child(2) { --tilt: 0.7deg; }
.follow-btn:nth-child(3) { --tilt: -0.4deg; }
.follow-btn:hover,
.follow-btn:focus-visible {
  transform: rotate(0deg) translateY(-2px);
  color: var(--cream);
  border-color: var(--gold);
  background: rgba(233,221,200,0.07);
}

/* ---------------------------------------------------------------- */
/* Community                                                           */
/* ---------------------------------------------------------------- */
.community-subtext {
  text-align: center;
  color: var(--ink-dim);
  font-size: 0.9rem;
  margin: -1.5rem 0 2.5rem;
}

.community-placeholder {
  text-align: center;
  color: var(--ink-dim);
  font-size: 0.9rem;
}

.community-empty {
  text-align: center;
  color: var(--ink-dim);
  font-family: var(--font-hand);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.7;
  padding: 1rem 0;
}

.community-error {
  text-align: center;
  color: var(--ink-dim);
  font-size: 0.9rem;
}
.community-retry {
  margin-top: 0.75rem;
  background: none;
  border: 1px solid rgba(233,221,200,0.25);
  color: var(--ink);
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  cursor: pointer;
  min-height: 2.5rem;
}
.community-retry:hover { border-color: var(--gold); }

/* Filter */
.community-filter-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}
.community-filter-label {
  font-size: 0.72rem;
  color: var(--ink-dim);
  letter-spacing: 0.03em;
}
.community-filter {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--ink);
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(233,221,200,0.18);
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
  min-height: 2.25rem;
}

/* Post form */
.post-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
  padding: 1.25rem;
  border: 1px solid rgba(233,221,200,0.14);
  border-radius: 4px;
  background: rgba(233,221,200,0.02);
}
.post-form-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.post-name-input,
.post-track-select,
.post-body-input,
.reply-body-input,
.reply-name-input,
.artist-login-form input {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--ink);
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(233,221,200,0.18);
  border-radius: 3px;
  padding: 0.6rem 0.75rem;
  min-height: 2.75rem;
}
.post-name-input { flex: 1; min-width: 8rem; }
.post-track-select { flex: 1; min-width: 8rem; }
.post-track-label {
  font-size: 0.72rem;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
}
.post-body-input,
.reply-body-input {
  width: 100%;
  resize: vertical;
  line-height: 1.6;
}
.post-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.post-form-status,
.reply-status,
.artist-login-status {
  font-size: 0.78rem;
  color: var(--ink-dim);
}
.post-submit,
.reply-form button[type="submit"] {
  background: none;
  color: var(--cream);
  border: 1px solid rgba(233,221,200,0.3);
  border-radius: 999px;
  padding: 0.6rem 1.5rem;
  min-height: 2.75rem;
  font-family: var(--font-hand);
  font-style: italic;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.post-submit:hover,
.reply-form button[type="submit"]:hover {
  border-color: var(--gold);
  background: rgba(233,221,200,0.06);
}
.post-submit:disabled { opacity: 0.5; cursor: default; }

/* Feed / note cards */
.community-feed {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.note-card {
  position: relative;
  padding: 1.1rem 1.25rem;
  border: 1px solid rgba(233,221,200,0.12);
  border-radius: 2px;
  background: rgba(10,6,5,0.35);
}
.note-hidden { opacity: 0.45; }
.note-reply-card {
  background: rgba(10,6,5,0.2);
  border-color: rgba(233,221,200,0.08);
}

.note-meta {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.note-name {
  font-family: var(--font-hand);
  font-style: italic;
  font-size: 1rem;
  color: var(--cream);
}
.note-name-artist { color: var(--gold); }
.artist-badge {
  display: inline-block;
  margin-inline-start: 0.25rem;
  font-size: 0.85rem;
  color: var(--gold);
}
.note-track {
  font-size: 0.7rem;
  color: var(--ink-dim);
  border: 1px solid rgba(233,221,200,0.2);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}
.note-time {
  font-size: 0.72rem;
  color: var(--ink-dim);
  margin-inline-start: auto;
}

.note-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 0.75rem;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.note-actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}
.note-actions button {
  background: none;
  border: none;
  color: var(--ink-dim);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.4rem 0.1rem;
  min-height: 2.25rem;
  transition: color var(--dur-fast) var(--ease);
}
.note-actions button:hover { color: var(--cream); }
.note-like.liked { color: var(--gold); }
.note-mod-delete:hover { color: #c9524a; }

.note-replies-wrap { margin-top: 0.85rem; }

.note-replies-toggle {
  background: none;
  border: none;
  color: var(--ink-dim);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.3rem 0.1rem;
  min-height: 2.25rem;
  transition: color var(--dur-fast) var(--ease);
}
.note-replies-toggle:hover { color: var(--cream); }

.note-replies[hidden] { display: none; }

.note-replies {
  margin-top: 0.75rem;
  padding-inline-start: 1rem;
  border-inline-start: 1px solid rgba(233,221,200,0.12);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.note-replies-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.note-replies-list:empty { display: none; }

/* Depth is capped visually at one indent level — a reply to a reply    */
/* renders flat, not further nested, so threads stay mobile-readable.   */
.note-depth-1 { font-size: 0.97em; }
.note-replies-flat {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.note-replies-more-wrap { text-align: start; }
.note-replies-more {
  background: none;
  border: none;
  color: var(--ink-dim);
  font-size: 0.76rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 0.3rem 0.1rem;
  min-height: 2rem;
}
.note-replies-more:hover { color: var(--gold); }

.reply-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.reply-body-input { flex: 1 1 12rem; min-width: 0; }
.reply-name-input { flex: 0 1 9rem; }

.community-loadmore-wrap { text-align: center; margin-top: 1.5rem; }
.community-loadmore {
  background: none;
  border: 1px solid rgba(233,221,200,0.2);
  color: var(--ink-dim);
  font-family: var(--font-hand);
  font-style: italic;
  font-size: 0.95rem;
  border-radius: 999px;
  padding: 0.55rem 1.75rem;
  min-height: 2.75rem;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.community-loadmore:hover {
  border-color: var(--gold);
  color: var(--cream);
  transform: translateY(2px);
}

/* Artist sign-in — deliberately understated */
.artist-auth {
  text-align: center;
  margin-top: 2rem;
}
.artist-auth-link {
  background: none;
  border: none;
  color: rgba(183,169,143,0.4);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 0.5rem;
}
.artist-auth-link:hover { color: var(--ink-dim); }
.artist-login-form {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.5rem;
}
.artist-login-form input { min-width: 9rem; }
.artist-login-form button {
  background: none;
  border: 1px solid rgba(233,221,200,0.25);
  color: var(--ink);
  border-radius: 3px;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

/* ---------------------------------------------------------------- */
/* Standalone /artist sign-in page                                     */
/* ---------------------------------------------------------------- */
.artist-page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.artist-page-inner { text-align: center; max-width: 24rem; }
.artist-login-form-standalone {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.artist-login-form-standalone input {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--ink);
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(233,221,200,0.18);
  border-radius: 3px;
  padding: 0.7rem 0.9rem;
  min-height: 2.9rem;
}
.artist-login-form-standalone button {
  background: none;
  border: 1px solid rgba(233,221,200,0.3);
  color: var(--cream);
  border-radius: 999px;
  padding: 0.7rem 1.5rem;
  min-height: 2.9rem;
  font-family: var(--font-hand);
  font-style: italic;
  cursor: pointer;
}
.artist-login-form-standalone button:hover { border-color: var(--gold); }
.artist-page-back {
  display: inline-block;
  margin-top: 1.75rem;
  color: var(--ink-dim);
  font-size: 0.8rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(233,221,200,0.2);
}
.artist-page-back:hover { color: var(--gold); border-color: var(--gold); }

/* ---------------------------------------------------------------- */
/* Footer                                                              */
/* ---------------------------------------------------------------- */
.site-footer {
  text-align: center;
  padding: 2.5rem 1.5rem calc(2.5rem + var(--safe-b));
  color: var(--ink-dim);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}
@media (max-width: 899px) {
  /* Keep the legal links clear of the fixed accessibility button. */
  .site-footer { padding-bottom: calc(4.5rem + var(--safe-b)); }
}
.legal-links {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0 0.7rem;
}
.legal-links a {
  color: inherit;
  opacity: 0.72;
  padding: 0.45rem 0.15rem;
  text-decoration: underline;
  text-decoration-color: rgba(183,169,143,0.35);
  text-underline-offset: 3px;
}
.legal-links a:hover,
.legal-links a:focus-visible { opacity: 1; color: var(--cream); }

/* ---------------------------------------------------------------- */
/* Desktop refinements                                                 */
/* ---------------------------------------------------------------- */
@media (min-width: 768px) {
  .section-inner { max-width: 46rem; }
  .hero-content { max-width: 50rem; }
}

@media (min-width: 900px) {
  /* Wider than other sections on purpose — there are two columns to fit. */
  #tracklist .section-inner { max-width: 64rem; }
}

@media (min-width: 1100px) {
  .track-toggle { padding-inline: 0.5rem; }
}

@media (min-width: 1400px) {
  .section-inner { max-width: 52rem; }
  #tracklist .section-inner { max-width: 72rem; }
}

/* ---------------------------------------------------------------- */
/* Mobile touch targets — a few small interactive elements had a real  */
/* min-height below the ~44px comfortable-thumb minimum (or very thin  */
/* horizontal padding on short labels). Larger hit area only; visual   */
/* size/look is effectively unchanged.                                 */
/* ---------------------------------------------------------------- */
@media (max-width: 899px) {
  .feeling-word { padding: 0.65rem 0.6rem; }
  .platform-btn-sm { min-height: 2.75rem; padding: 0.55rem 1rem; }
  .note-actions button { min-height: 2.75rem; padding: 0.6rem 0.3rem; }
  .note-replies-toggle { min-height: 2.75rem; padding: 0.5rem 0.3rem; }
  .note-replies-more { min-height: 2.25rem; padding: 0.5rem 0.3rem; }
  .community-filter { min-height: 2.75rem; }
}

/* ---------------------------------------------------------------- */
/* Handwritten fragments in the side margins (wide screens only).     */
/* Pure decoration: fixed to their section, never over content —      */
/* width is whatever the empty margin beside the column allows.       */
/* ---------------------------------------------------------------- */
.scrawl { display: none; }
@media (min-width: 1200px) {
  .scrawl {
    --inner: 46rem;
    --rot: 0deg;
    display: block;
    position: absolute;
    z-index: 0;
    width: min(20rem, calc((100vw - var(--inner)) / 2 - 2rem));
    opacity: 0.4;
    transform: rotate(var(--rot));
    pointer-events: none;
    user-select: none;
  }
  .scrawl img { display: block; width: 100%; height: auto; }
  .scrawl-r { right: 1.5rem; }
  .scrawl-l { left: 1.5rem; }
  .scrawl-listen    { top: 22%; --rot: -8deg; }
  .scrawl-connection { top: 8%;  --rot: 7deg; }
  .scrawl-follow    { top: 14%; --rot: -6deg; }
  .scrawl-community { top: 4%;  --rot: 6deg; }
}
@media (min-width: 1400px) {
  .scrawl { --inner: 52rem; }
}

/* ---------------------------------------------------------------- */
/* Documentary teaser — another archival print on the fabric. Not a   */
/* card, not a video player: nothing here is interactive.             */
/* ---------------------------------------------------------------- */
.doc-grid { display: flex; flex-direction: column; align-items: center; text-align: center; }
.doc-title {
  margin: 0 0 2rem;
  font-family: var(--font-hand);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.4rem, 5vw, 2rem);
  line-height: 1.5;
  color: var(--cream);
}

.doc-photo { margin: 0.4rem auto 1.8rem; max-width: 30rem; width: calc(100% - 0.6rem); }
.doc-still {
  aspect-ratio: 16 / 9;
  background: #0c0506;
  overflow: hidden;
}
.doc-still .track-note-image { width: 100%; height: 100%; object-fit: cover; }
.doc-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.4rem;
  height: auto;
  transform: translate(-50%, -50%);
  color: rgba(233,221,200,0.4);
  pointer-events: none;
  z-index: 3;
}
.doc-stamp {
  position: absolute;
  right: 0.9rem;
  bottom: 0.8rem;
  z-index: 3;
  padding: 0.18rem 0.5rem;
  border: 1px solid rgba(233,221,200,0.4);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(233,221,200,0.62);
  transform: rotate(-2.5deg);
  pointer-events: none;
}
.doc-small {
  margin: 0 0 0.9rem;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--ink);
}

@media (min-width: 900px) {
  .doc-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    column-gap: 3rem;
    align-items: center;
    text-align: right;
  }
  .doc-title { grid-column: 1; grid-row: 1; margin: 0 0 1.5rem; align-self: end; }
  .doc-small { grid-column: 1; grid-row: 2; }
  .doc-photo { grid-column: 2; grid-row: 1 / span 2; margin: 0.4rem 0.3rem; max-width: none; width: auto; }
}

/* Mobile: the same margin fragments, a touch smaller and fainter,
   tucked into the empty gap at the top of each section so they never
   sit on text. */
@media (max-width: 1199px) {
  .scrawl {
    --rot: 0deg;
    display: block;
    position: absolute;
    z-index: 0;
    width: 40vw;
    opacity: 0.13;
    transform: rotate(var(--rot));
    pointer-events: none;
    user-select: none;
  }
  .scrawl img { display: block; width: 100%; height: auto; }
  .scrawl-r { right: 0.9rem; }
  .scrawl-l { left: 0.9rem; }
  .scrawl-listen     { top: -1.2rem; --rot: -8deg; width: 36vw; }
  .scrawl-connection { top: -1.6rem; --rot: 7deg; }
  .scrawl-follow     { top: -2.9rem; --rot: -6deg; }
  .scrawl-community  { top: -0.8rem; --rot: 6deg; width: 52vw; }
}

/* Touch devices: iOS Safari zooms the whole page in when a form field with
   text smaller than 16px gets focus (and stays zoomed). Keeping every field
   at 16px stops that without disabling pinch-zoom for anyone. */
@media (hover: none) and (pointer: coarse) {
  :is(input, textarea, select):not([type="file"]) {
    font-size: 16px;
  }
}

/* ---------------------------------------------------------------- */
/* English (html[lang="en"][dir="ltr"]) — same design, mirrored.      */
/* Only the few rules that used physical left/right need a flip.     */
/* ---------------------------------------------------------------- */
[dir="ltr"] .track-toggle { text-align: left; }
[dir="ltr"] .track-toggle:hover,
[dir="ltr"] .track-toggle:focus-visible { padding-right: 0.25rem; padding-left: 0.5rem; }
@media (min-width: 900px) {
  [dir="ltr"] .track.open .track-detail { left: auto; right: 0; }
  [dir="ltr"] .doc-grid { text-align: left; }
}
[dir="ltr"] .doc-stamp { right: auto; left: 0.9rem; transform: rotate(2.5deg); }

/* English song names: the Hebrew name stays the main one, its English
   translation sits beside it, smaller and quieter. */
.track-name-en {
  font-size: 0.82rem;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}
/* Keep each Hebrew name on one line; if the row gets tight, the English
   translation (and tag) drop below it instead of breaking the name. */
[lang="en"] .track-title { flex-wrap: wrap; column-gap: 0.6rem; row-gap: 0; }
[lang="en"] .track-title .track-name { white-space: nowrap; }
.track-detail-head .track-name-en { font-size: 0.9rem; }

/* EN / עב switch: a quiet text link, never a button-looking pill. */
.lang-switch {
  background: none;
  border: none;
  color: var(--ink-dim);
  font-family: var(--font-serif);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  opacity: 0.75;
  cursor: pointer;
  padding: 0.6rem 0.5rem;
  min-height: 2.5rem;
  text-decoration: underline;
  text-decoration-color: rgba(183,169,143,0.35);
  text-underline-offset: 3px;
}
.lang-switch:hover,
.lang-switch:focus-visible { opacity: 1; color: var(--cream); }
.lang-switch[hidden] { display: none; }
.lang-switch-top {
  position: absolute;
  top: calc(0.4rem + var(--safe-t));
  left: 0.6rem;
  z-index: 610; /* above the intro overlay, so it can be switched there too */
}
.lang-switch-footer { margin-top: 0.3rem; font-size: 0.7rem; }


/* Quiet way into /world, under the social buttons. */
.world-entry {
  display: table;
  margin: 1.6rem auto 0;
  padding: 0.6rem 0.4rem;
  font-family: var(--font-hand);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--cream);
  text-decoration: underline;
  text-decoration-color: rgba(201,162,74,0.5);
  text-underline-offset: 5px;
}
.world-entry:hover,
.world-entry:focus-visible { color: var(--gold); }
