/* ═══════════════════════════════════════════════════
   WAX — styles.css
   Vinyl-themed voice recorder
   ═══════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ─────────────────────────────────── */
:root {
  --bg:           #F5F0E8;
  --surface:      #EDE6D8;
  --surface-2:    #E3DAC9;
  --text:         #2C1810;
  --text-muted:   #7A6555;
  --text-soft:    #A89585;
  --accent:       #C4713B;
  --accent-light: #E8A06A;
  --accent-dim:   rgba(196,113,59,0.15);
  --vinyl:        #1A1A1A;
  --vinyl-groove: #2A2A2A;
  --danger:       #C44B3B;
  --border:       #D4C8B4;
  --white:        #FFFBF5;
  --radius:       14px;
  --radius-sm:    8px;

  --label-burgundy: #8B2020;
  --label-forest:   #2D5A3D;
  --label-mustard:  #C49B20;
  --label-navy:     #1E3A5F;
  --label-rust:     #A0522D;
  --label-plum:     #6B3A6B;

  --font-serif:   'Libre Baskerville', Georgia, serif;
  --font-sans:    'Inter', -apple-system, sans-serif;

  --safe-top:     env(safe-area-inset-top, 0px);
  --safe-bottom:  env(safe-area-inset-bottom, 0px);
  --safe-left:    env(safe-area-inset-left, 0px);
  --safe-right:   env(safe-area-inset-right, 0px);

  /* 3D Enhancement Properties */
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --specular-angle: 0deg;
  --audio-glow: 0;
  --audio-warmth: 0;

  /* Spring easing functions */
  --spring-pop:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --spring-soft: cubic-bezier(0.25, 1.1, 0.5, 1);
  --spring-snap: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ── BRANDED SELECTION ─────────────────────────────── */
::selection {
  background: rgba(196,113,59,0.2);
  color: var(--text);
}

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

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

/* ── PAPER GRAIN TEXTURE (Real Linen) ────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('textures/linen-1.png');
  background-size: 400px 400px;
  opacity: 0.06;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: multiply;
  animation: linenDrift 120s linear infinite;
}
@keyframes linenDrift {
  from { background-position: 0 0; }
  to   { background-position: 400px 400px; }
}

input, button, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ── SCREEN SYSTEM ─────────────────────────────────── */
.screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.38s cubic-bezier(.4,0,.2,1), transform 0.38s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  will-change: transform, opacity;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
  z-index: 10;
}

/* Forward = diving in — screen scales down + slight push down */
.screen.screen-enter-forward {
  transform: perspective(1000px) scale(0.92) translateZ(-40px);
  opacity: 0;
}

/* Back = pulling out — screen scales up + slight push toward */
.screen.screen-enter-back {
  transform: perspective(1000px) scale(1.04) translateZ(20px);
  opacity: 0;
}

.screen.active.screen-enter-forward,
.screen.active.screen-enter-back {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Exit animations — applied to outgoing screen by JS */
.screen.screen-exit-forward {
  transform: perspective(1000px) scale(1.04) translateZ(20px);
  opacity: 0;
  pointer-events: none;
  z-index: 9;
}
.screen.screen-exit-back {
  transform: perspective(1000px) scale(0.92) translateZ(-40px);
  opacity: 0;
  pointer-events: none;
  z-index: 9;
}

/* ── HEADER ────────────────────────────────────────── */
.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  min-height: 56px;
  flex-shrink: 0;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text);
  position: relative;
  display: inline-block;
}
.logo::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  opacity: 0.5;
  border-radius: 1px;
}

.header-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text);
}

.header-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
  color: var(--text);
}
.header-btn:active { background: var(--accent-dim); }

.header-btn-text {
  width: auto;
  padding: 0 12px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  border-radius: var(--radius-sm);
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s;
}
.icon-btn:active { background: var(--accent-dim); color: var(--accent); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── VIEW TOGGLE ──────────────────────────────────── */
.view-toggle {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2px;
  gap: 1px;
}
.view-toggle-btn {
  width: 34px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-muted);
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.view-toggle-btn.active {
  background: var(--bg);
  color: var(--accent);
  box-shadow: 0 1px 3px rgba(44,24,16,0.08);
}
.view-toggle-btn:active {
  transform: scale(0.92);
}

/* ── SEARCH BAR ────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 20px 12px;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: inset 0 2px 4px rgba(44,24,16,0.06);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: inset 0 2px 4px rgba(44,24,16,0.06), 0 0 0 3px rgba(196,113,59,0.1);
}

.search-icon { color: var(--text-soft); flex-shrink: 0; transition: color 0.3s; }
.search-bar:focus-within .search-icon { color: var(--accent); }

.search-input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  color: var(--text);
  font-size: 0.9rem;
}
.search-input::placeholder { color: var(--text-soft); }

/* ── TAG FILTERS ───────────────────────────────────── */
.tag-filters {
  display: flex;
  gap: 8px;
  padding: 0 20px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tag-filters::-webkit-scrollbar { display: none; }

.tag-filter-btn {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  box-shadow: 0 1px 3px rgba(44,24,16,0.06);
  transition: all 0.25s cubic-bezier(.4,0,.2,1);
}
.tag-filter-btn:active {
  transform: scale(0.95);
}
.tag-filter-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-color: var(--accent);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(196,113,59,0.25);
  transform: scale(1.04);
}

/* ── FAVORITES FILTER PILL ────────────────────────── */
.tag-filter-btn.filter-fav {
  background: linear-gradient(135deg, rgba(196,155,32,0.12), rgba(196,155,32,0.06));
  border-color: rgba(196,155,32,0.3);
  color: var(--accent);
}
.tag-filter-btn.filter-fav.active {
  background: linear-gradient(135deg, #C49B20, #E8D060);
  border-color: #C49B20;
  color: #2C1810;
  box-shadow: 0 2px 8px rgba(196,155,32,0.3);
}

/* ── SORT PILLS ───────────────────────────────────── */
.sort-pills {
  display: flex;
  gap: 6px;
  padding: 0 20px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.sort-pills::-webkit-scrollbar { display: none; }

.sort-pill {
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-soft);
  transition: all 0.25s cubic-bezier(.4,0,.2,1);
  letter-spacing: 0.02em;
}
.sort-pill:active {
  transform: scale(0.95);
}
.sort-pill.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* ── COLLECTION EMPTY STATE ────────────────────────── */
.collection-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 20px 100px;
  animation: emptyFadeIn 0.6s ease-out;
}
@keyframes emptyFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.empty-vinyl-icon {
  opacity: 0.85;
  filter: drop-shadow(0 4px 16px rgba(26,26,26,0.2)) drop-shadow(0 0 30px rgba(196,113,59,0.08));
  animation: emptyFloat 4s ease-in-out infinite;
}
@keyframes emptyFloat {
  0%   { transform: translateY(0) rotateX(0deg) rotateY(0deg); }
  25%  { transform: translateY(-4px) rotateX(2deg) rotateY(-3deg); }
  50%  { transform: translateY(-8px) rotateX(0deg) rotateY(0deg); }
  75%  { transform: translateY(-4px) rotateX(-2deg) rotateY(3deg); }
  100% { transform: translateY(0) rotateX(0deg) rotateY(0deg); }
}
.empty-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text);
  margin-top: 4px;
}
.empty-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 240px;
  line-height: 1.5;
}
.empty-vol {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--text-soft);
  opacity: 0.5;
  margin-top: 4px;
}

/* ── SLEEVE CAROUSEL ───────────────────────────────── */
.sleeve-carousel {
  flex: 1;
  overflow: visible;
  position: relative;
  padding: 10px 0 20px;
  perspective: 800px;
}

.sleeve-track {
  display: flex;
  gap: 20px;
  padding: 0 calc((100vw - 260px) / 2);
  transition: transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: transform;
}

.sleeve-card {
  flex: 0 0 260px;
  min-height: 340px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 50%, rgba(0,0,0,0.03) 100%),
    var(--surface);
  border: 1px solid var(--border);
  overflow: visible;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.4s ease;
  position: relative;
  box-shadow:
    0 2px 8px rgba(44,24,16,0.06),
    0 8px 24px rgba(44,24,16,0.04);
}
/* Cardboard texture overlay (real texture) */
.sleeve-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background-image: url('textures/cardboard-1.png');
  background-size: cover;
  background-position: center;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: multiply;
}
/* Inner edge highlight */
.sleeve-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), inset 0 -1px 0 rgba(0,0,0,0.04);
  pointer-events: none;
  z-index: 1;
}
.sleeve-card:active {
  transform: scale(0.97);
}
@media (hover: hover) {
  .sleeve-card:hover {
    transform: translateY(-6px) rotateX(2deg);
    box-shadow:
      0 12px 32px rgba(44,24,16,0.12),
      0 4px 12px rgba(44,24,16,0.06);
  }
}

/* Vinyl peeking out the top */
.sleeve-vinyl-peek {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 90px;
  margin-top: -20px;
  position: relative;
  z-index: 1;
}
.sleeve-mini-vinyl {
  width: 100px;
  height: 100px;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,0.25)) drop-shadow(0 1px 3px rgba(0,0,0,0.1));
  transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.sleeve-card:hover .sleeve-mini-vinyl {
  transform: translateY(-8px) rotate(-5deg);
}

.sleeve-body {
  flex: 1;
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 3px solid var(--sleeve-color, var(--accent));
  position: relative;
  z-index: 2;
}

.sleeve-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.sleeve-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.sleeve-dot { opacity: 0.4; }

.sleeve-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.sleeve-tag {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 500;
}

.collection-count {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 0.78rem;
  font-style: italic;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  padding: 8px 0 100px;
}

/* ── RECORD CRATE VIEW ────────────────────────────── */
.crate-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 16px 20px;
  position: relative;
}
.crate-body {
  position: relative;
  height: 280px;
  border-radius: 8px 8px 4px 4px;
  /* Real wood crate texture */
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(139,90,43,0.08) 100%),
    url('textures/crate-wood-1.png') center / cover;
  border: 2px solid rgba(139,90,43,0.15);
  border-top: none;
  box-shadow:
    inset 0 -4px 12px rgba(139,90,43,0.08),
    inset 2px 0 6px rgba(139,90,43,0.05),
    inset -2px 0 6px rgba(139,90,43,0.05),
    0 4px 12px rgba(44,24,16,0.08);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  perspective: 500px;
  transform-style: preserve-3d;
}
.crate-body::-webkit-scrollbar { display: none; }
/* Wood grain overlay (real texture) */
.crate-body::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('textures/crate-wood-2.png') center / cover;
  opacity: 0.06;
  mix-blend-mode: multiply;
  border-radius: 8px 8px 4px 4px;
  pointer-events: none;
}

.crate-spines {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding: 8px 12px;
  height: 100%;
  min-width: min-content;
}

.crate-spine {
  flex: 0 0 30px;
  height: 240px;
  border-radius: 3px 3px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 10px 2px 6px;
  cursor: pointer;
  position: relative;
  /* 3D fan-out: edges angle away from center */
  transform: rotateY(calc(var(--spine-offset, 0) * -6deg));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease;
  box-shadow: 1px 0 2px rgba(0,0,0,0.06), -1px 0 1px rgba(0,0,0,0.03);
  overflow: hidden;
}
/* Spine label strip on left edge */
.crate-spine::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--spine-color);
  border-radius: 3px 0 0 0;
}
/* Cardboard texture (real) */
.crate-spine::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('textures/cardboard-2.png');
  background-size: cover;
  opacity: 0.07;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.crate-spine-title {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-serif);
  font-size: 0.65rem;
  font-style: italic;
  color: var(--text);
  letter-spacing: 0.02em;
  line-height: 1.1;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-height: 180px;
}

.crate-spine-dur {
  writing-mode: vertical-rl;
  font-family: var(--font-sans);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

/* Pulled-up spine — spring wobble */
.crate-spine.spine-pulled {
  animation: spinePullWobble 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  z-index: 5;
}
@keyframes spinePullWobble {
  0%   { transform: translateY(0) rotateX(0deg) rotateY(calc(var(--spine-offset, 0) * -6deg)); box-shadow: 1px 0 2px rgba(0,0,0,0.06); }
  30%  { transform: translateY(-110px) rotateX(-3deg) rotateY(0deg); box-shadow: 0 10px 28px rgba(44,24,16,0.2); }
  50%  { transform: translateY(-95px) rotateX(1deg) rotateY(0deg); box-shadow: 0 6px 20px rgba(44,24,16,0.15); }
  70%  { transform: translateY(-102px) rotateX(-0.5deg) rotateY(0deg); box-shadow: 0 8px 24px rgba(44,24,16,0.18); }
  100% { transform: translateY(-100px) rotateX(0deg) rotateY(0deg); box-shadow: 0 8px 24px rgba(44,24,16,0.15); }
}
.crate-spine:active:not(.spine-pulled) {
  transform: scale(0.96);
}

/* ── SPINE FAVORITES ────────────────────────────────── */
.crate-spine.spine-favorite {
  border-left: 3px solid #C49B20;
  background: linear-gradient(180deg, rgba(196,155,32,0.12) 0%, rgba(196,155,32,0.04) 50%, rgba(196,155,32,0.08) 100%), var(--surface) !important;
  position: relative;
  overflow: hidden;
}
.crate-spine.spine-favorite::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; right: 0; bottom: 0;
  width: 200%;
  background: linear-gradient(90deg, transparent 0%, rgba(232,208,96,0.15) 25%, rgba(255,248,220,0.25) 50%, rgba(232,208,96,0.15) 75%, transparent 100%);
  animation: goldShimmer 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes goldShimmer {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(50%); }
}
.crate-spine.spine-favorite .crate-spine-title {
  color: #8B7520;
  font-weight: 600;
}
.spine-fav-star {
  flex-shrink: 0;
  margin-right: 3px;
  vertical-align: middle;
  filter: drop-shadow(0 0 2px rgba(196,155,32,0.5));
}
.spine-search-snippet {
  display: block;
  font-size: 0.65rem;
  font-style: italic;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin-top: 2px;
  line-height: 1.3;
}
.spine-search-snippet mark {
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 2px;
  padding: 0 2px;
}

/* Preview card floating above crate */
.crate-preview {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(44,24,16,0.15);
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 10;
}
.crate-preview.visible {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  pointer-events: auto;
}
/* Arrow pointing down to spine */
.crate-preview::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 14px;
  height: 14px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.crate-preview-vinyl {
  width: 80px;
  height: 80px;
  margin: 0 auto 12px;
}
.crate-preview-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  margin-bottom: 4px;
}
.crate-preview-meta {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 12px;
}
.crate-preview-play {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: white;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.crate-preview-play:active {
  transform: scale(0.96);
}

/* ── WALL SHELF VIEW ──────────────────────────────── */
.shelf-view {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 100px;
}
.shelf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.shelf-item {
  aspect-ratio: 0.85;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 50%, rgba(0,0,0,0.03) 100%),
    var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 6px 8px;
  cursor: pointer;
  position: relative;
  overflow: visible;
  box-shadow: 0 2px 6px rgba(44,24,16,0.05);
  /* Spring snap-back when touch/mouse leaves */
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.3s ease,
              box-shadow 0.3s ease;
  will-change: transform;
}
.shelf-item:active {
  transform: scale(0.96);
}
/* Shelf item pull animation */
.shelf-item.shelf-pulling {
  animation: shelfPull 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes shelfPull {
  0%   { transform: scale(1) translateY(0) rotate(0deg); opacity: 1; }
  60%  { transform: scale(1.04) translateY(-16px) rotate(-1.5deg); opacity: 0.9; }
  100% { transform: scale(0.95) translateY(-24px) rotate(-2deg); opacity: 0; }
}

.shelf-item-vinyl {
  width: 52px;
  height: 52px;
  margin-top: -6px;
  flex-shrink: 0;
}
.shelf-item-title {
  font-family: var(--font-serif);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.25;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.shelf-item-meta {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 3px;
}
/* Color accent bar at bottom */
.shelf-item-accent {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* ── SHELF FAVORITES & SEARCH ────────────────────── */
.shelf-item.shelf-favorite {
  background: linear-gradient(135deg, rgba(196,155,32,0.08) 0%, var(--surface) 40%, rgba(196,155,32,0.06) 100%);
  box-shadow: 0 2px 12px rgba(196,155,32,0.12), 0 1px 4px rgba(44,24,16,0.06);
}
.shelf-item.shelf-favorite .shelf-item-vinyl {
  box-shadow: 0 0 0 2.5px #C49B20, 0 0 12px rgba(196,155,32,0.35);
  border-radius: 50%;
}
.shelf-item.shelf-favorite .shelf-item-accent {
  background: linear-gradient(90deg, #C49B20, #E8D060) !important;
  height: 3px;
}
.shelf-fav-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, rgba(196,155,32,0.25), rgba(232,208,96,0.15));
  border: 1px solid rgba(196,155,32,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 3px rgba(196,155,32,0.4));
}
.shelf-search-snippet {
  display: block;
  font-size: 0.62rem;
  font-style: italic;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  padding: 0 4px;
  line-height: 1.3;
}
.shelf-search-snippet mark {
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 2px;
  padding: 0 2px;
}

/* Wooden shelf dividers between rows */
.shelf-divider {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 2px;
  background:
    linear-gradient(90deg,
      rgba(139,90,43,0.08) 0%, rgba(139,90,43,0.04) 30%,
      rgba(139,90,43,0.07) 50%, rgba(139,90,43,0.03) 70%,
      rgba(139,90,43,0.08) 100%);
  box-shadow: 0 2px 4px rgba(139,90,43,0.06);
  margin: 4px 0;
}

/* ── FAB RECORD BUTTON ─────────────────────────────── */
.fab-record {
  position: fixed;
  bottom: calc(32px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 16px rgba(196,113,59,0.35),
    0 2px 6px rgba(196,113,59,0.2),
    inset 0 1px 1px rgba(255,255,255,0.15);
  z-index: 20;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: fabBreathe 3s ease-in-out infinite;
}
@keyframes fabBreathe {
  0%, 100% {
    box-shadow:
      0 4px 16px rgba(196,113,59,0.35),
      0 2px 6px rgba(196,113,59,0.2),
      inset 0 1px 1px rgba(255,255,255,0.15);
  }
  50% {
    box-shadow:
      0 6px 24px rgba(196,113,59,0.5),
      0 3px 10px rgba(196,113,59,0.3),
      inset 0 1px 1px rgba(255,255,255,0.15);
  }
}
.fab-record:active {
  transform: translateX(-50%) scale(0.92);
}
/* Ripple ring on tap */
.fab-record::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  pointer-events: none;
}
.fab-record:active::after {
  animation: fabRipple 0.5s ease-out;
}
@keyframes fabRipple {
  0%   { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}
.fab-inner {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--white);
}

/* ── VINYL RECORD ──────────────────────────────────── */
.vinyl-container {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto;
  perspective: 600px;
  transform-style: preserve-3d;
  border-radius: 50%;
}

/* Turntable plinth (sits behind vinyl) */
.vinyl-container::before {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 16px;
  background: url('textures/plinth-1.png') center / cover;
  opacity: 0.35;
  z-index: -1;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  filter: brightness(0.7) contrast(1.1);
}

/* 3D tilt — only active when vinyl is spinning */
.vinyl-container.tilt-active {
  transform: rotateX(var(--tilt-y)) rotateY(var(--tilt-x));
  transition: transform 0.05s linear;
}

.vinyl-record {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  filter: drop-shadow(0 6px 24px rgba(26,26,26,0.3)) drop-shadow(0 2px 6px rgba(26,26,26,0.15));
}

/* Real vinyl surface texture overlay */
.vinyl-container::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: url('textures/vinyl-surface.png') center / cover;
  mix-blend-mode: overlay;
  opacity: 0.12;
  pointer-events: none;
  z-index: 2;
  animation: vinylSpin 1.8s linear infinite paused;
}
.vinyl-container.tilt-active::after,
.vinyl-record.spinning ~ .nothing { }
/* Spin the texture when vinyl is spinning */
.vinyl-container:has(.spinning)::after {
  animation-play-state: running;
}
.vinyl-container:has(.spinning-slow)::after {
  animation: vinylSpin 4s linear infinite;
}

/* Audio-reactive glow — warm halo around vinyl */
.vinyl-container.audio-active {
  box-shadow: 0 0 var(--glow-size, 8px) var(--glow-spread, 2px) var(--glow-color, rgba(196,113,59,0));
  transition: box-shadow 0.15s ease-out;
}

.vinyl-record.spinning {
  animation: vinylSpin 1.8s linear infinite;
}
.vinyl-record.spinning-slow {
  animation: vinylSpin 4s linear infinite;
}

@keyframes vinylSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Specular counter-rotation: light stays fixed while vinyl spins ── */
@keyframes specularHold {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

.vinyl-record.spinning .vinyl-specular {
  animation: specularHold 1.8s linear infinite;
  transform-origin: 150px 150px;
}

.vinyl-record.spinning-slow .vinyl-specular {
  animation: specularHold 4s linear infinite;
  transform-origin: 150px 150px;
}

.vinyl-record.recording .vinyl-specular {
  animation: specularHold 1.8s linear infinite;
  transform-origin: 150px 150px;
}

/* Label pulse during recording */
.vinyl-record.recording #recordLabel {
  animation: labelPulse 2s ease-in-out infinite;
}
@keyframes labelPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.8; }
}

/* ── LABEL TEXTURE OVERLAY ─────────────────────────── */
/* Adds vintage paper texture to vinyl labels */
.vinyl-container .label-texture {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  margin-top: -50px;
  margin-left: -50px;
  border-radius: 50%;
  background: url('textures/label-1.png') center / cover;
  mix-blend-mode: overlay;
  opacity: 0.15;
  pointer-events: none;
  z-index: 3;
}

/* ── TONEARM ───────────────────────────────────────── */
.tonearm {
  position: absolute;
  top: 4px;
  right: 10px;
  width: 100px;
  height: 140px;
  pointer-events: none;
  transform-style: preserve-3d;
}
.tonearm-counterweight {
  position: absolute;
  top: -4px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #B0B0B0 0%, #787878 40%, #A0A0A0 60%, #686868 100%);
  box-shadow:
    inset 0 1px 2px rgba(255,255,255,0.3),
    inset 0 -1px 2px rgba(0,0,0,0.2),
    0 2px 4px rgba(0,0,0,0.15);
  z-index: 3;
  transform: translateZ(6px);
}
.tonearm-pivot {
  position: absolute;
  top: 2px;
  right: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C0C0C0, #888);
  border: 1.5px solid rgba(0,0,0,0.15);
  box-shadow:
    inset 0 1px 2px rgba(255,255,255,0.4),
    0 1px 3px rgba(0,0,0,0.15);
  z-index: 2;
  transform: translateZ(4px);
}
.tonearm-arm {
  position: absolute;
  top: 9px;
  right: 5px;
  width: 2.5px;
  height: 100px;
  background: linear-gradient(to right, #888, #BBB 30%, #999 70%, #777);
  border-radius: 2px;
  transform-origin: top center;
  transform: rotate(-30deg) translateZ(3px);
  transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  transform-style: preserve-3d;
}
.tonearm.playing .tonearm-arm {
  transform: rotate(2deg) translateZ(3px);
}
.tonearm-headshell {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) translateZ(2px);
  width: 10px;
  height: 8px;
  background: linear-gradient(135deg, #A0A0A0 0%, #707070 100%);
  border-radius: 1px 1px 3px 3px;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.3),
    0 1px 2px rgba(0,0,0,0.2);
}
.tonearm-stylus {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 1.5px;
  height: 6px;
  background: linear-gradient(to bottom, #888, #444);
  border-radius: 0 0 1px 1px;
}
.tonearm-stylus::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 2.5px;
  height: 2.5px;
  border-radius: 50%;
  background: radial-gradient(circle, #DDD 30%, #888);
  box-shadow: 0 0 3px rgba(196,113,59,0.3);
}

/* ── 3D TILT PARALLAX LAYERS ──────────────────────── */
/* Tonearm floats above vinyl in Z-space, dampened tilt */
.tilt-active ~ .tonearm,
.vinyl-container.tilt-active + .tonearm {
  transform: translateZ(20px)
    rotateX(calc(var(--tilt-y) * 0.3))
    rotateY(calc(var(--tilt-x) * 0.3));
  transform-style: preserve-3d;
}

/* Tonearm component depth layering — enhanced during tilt */
.tilt-active ~ .tonearm .tonearm-counterweight { transform: translateZ(10px); }
.tilt-active ~ .tonearm .tonearm-pivot { transform: translateZ(7px); }
.tilt-active ~ .tonearm .tonearm-headshell { transform: translateX(-50%) translateZ(4px); }

/* Timer and controls: subtle depth offset */
.tilt-active ~ .timer-display {
  transform: translateZ(10px);
}

/* ── REDUCED MOTION: disable all tilt/parallax ────── */
@media (prefers-reduced-motion: reduce) {
  .vinyl-container.tilt-active {
    transform: none !important;
  }
  .tilt-active ~ .tonearm {
    transform: none !important;
  }
  .vinyl-specular {
    animation: none !important;
  }
  .land-hero-vinyl .vinyl-specular {
    animation: none !important;
  }
  .fab-record {
    animation: none !important;
  }
  .scrubber-handle {
    animation: none !important;
  }
  .empty-vinyl-icon {
    animation: none !important;
  }
  .land-hero-vinyl-wrap::before {
    animation: none !important;
  }
  .land-tonearm-arm {
    animation: none !important;
  }
  .crate-spine.spine-favorite::after {
    animation: none !important;
  }
}

/* ── RECORD SCREEN ─────────────────────────────────── */
.record-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
}

.record-timer {
  font-family: var(--font-sans);
  font-size: 2.4rem;
  font-weight: 200;
  color: var(--text);
  text-align: center;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  margin-top: 16px;
}

/* ── OSCILLOSCOPE WAVEFORM ─────────────────────────── */
.oscilloscope {
  width: min(280px, 85vw);
  height: 56px;
  overflow: visible;
  opacity: 0;
  transition: opacity 0.4s ease;
  margin-bottom: auto;
  position: relative;
}
.oscilloscope::before {
  content: '';
  position: absolute;
  inset: 0;
  mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
  pointer-events: none;
}
.oscilloscope.active {
  opacity: 1;
}
.oscilloscope polyline {
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 6px rgba(196,113,59,0.4)) drop-shadow(0 0 12px rgba(196,113,59,0.15));
}

.record-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 0 calc(40px + var(--safe-bottom));
  position: relative;
}

.record-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  position: relative;
}
.record-btn:active { transform: scale(0.93); }

/* Recording pulse ring */
.record-pulse-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  pointer-events: none;
}
.record-btn.is-recording .record-pulse-ring {
  animation: recordPulse 1.8s ease-out infinite;
}
@keyframes recordPulse {
  0%   { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.6); opacity: 0; }
}

.record-btn-inner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  transition: border-radius 0.25s ease, width 0.25s ease, height 0.25s ease;
  position: relative;
  z-index: 1;
}
.record-btn.is-recording .record-btn-inner {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.record-hint {
  font-size: 0.82rem;
  color: var(--text-soft);
  transition: color 0.3s, opacity 0.3s;
}
.record-controls.is-recording .record-hint {
  color: var(--accent);
  animation: hintPulse 2s ease-in-out infinite;
}
@keyframes hintPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* Recording vignette effect */
.record-body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(44,24,16,0.0) 100%);
  pointer-events: none;
  z-index: 0;
  transition: background 0.5s ease;
}
.screen.active #recordVinyl.recording ~ .record-body::after,
body:has(.record-btn.is-recording) .record-body::after {
  background: radial-gradient(ellipse at center, transparent 30%, rgba(44,24,16,0.25) 100%);
  opacity: calc(0.5 + var(--audio-glow) * 0.5);
}

/* ── PLAYBACK SCREEN ───────────────────────────────── */
.playback-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 0 20px;
}

/* Playback vignette — darkens with audio */
.playback-body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(44,24,16,0.2) 100%);
  opacity: var(--audio-glow);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.2s ease-out;
}

.vinyl-playback {
  width: 260px;
  height: 260px;
}

/* Groove glow ring transition */
#grooveGlowRing {
  transition: stroke 0.15s ease, r 0.15s ease;
}

/* Enhanced vinyl shadow during playback */
.vinyl-record.spinning {
  filter: drop-shadow(0 8px 28px rgba(26,26,26,0.35)) drop-shadow(0 2px 8px rgba(26,26,26,0.2));
}

.playback-time {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 320px;
  padding: 0 20px;
}
.time-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 36px;
}

.playback-scrubber {
  flex: 1;
  height: 32px;
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;
}
.scrubber-track {
  position: absolute;
  left: 0; right: 0;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}
.scrubber-fill {
  position: absolute;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 2px;
  width: 0%;
}
.scrubber-handle {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(196,113,59,0.35), 0 0 0 3px rgba(255,251,245,0.9);
  left: 0%;
  transform: translateX(-50%);
  transition: transform 0.1s;
  animation: scrubberGlow 2.5s ease-in-out infinite;
}
@keyframes scrubberGlow {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(196,113,59,0.35), 0 0 0 3px rgba(255,251,245,0.9);
  }
  50% {
    box-shadow: 0 2px 12px rgba(196,113,59,0.55), 0 0 0 3px rgba(255,251,245,0.9), 0 0 16px rgba(196,113,59,0.2);
  }
}
/* Expanded touch target */
.scrubber-handle::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
}
.scrubber-handle:active { transform: translateX(-50%) scale(1.3); }

.playback-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 12px 0 calc(40px + var(--safe-bottom));
}

.control-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.control-btn:active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }

.play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(196,113,59,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.play-btn::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: border-color 0.3s;
}
.play-btn.is-playing::before {
  border-color: rgba(196,113,59,0.35);
  animation: playPulseRing 2s ease-in-out infinite;
}
@keyframes playPulseRing {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.5; }
}
.play-btn:active { transform: scale(0.93); }

/* ── DETAIL SCREEN ─────────────────────────────────── */
.detail-body {
  flex: 1;
  padding: 8px 20px 120px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}
.detail-body > * {
  flex-shrink: 0;
}

.detail-vinyl-wrap {
  display: flex;
  justify-content: center;
  padding: 12px 0;
}
.detail-mini-vinyl {
  width: 140px;
  height: 140px;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.2));
  animation: detailVinylSpin 30s linear infinite;
}
@keyframes detailVinylSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}
.field-input {
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196,113,59,0.1);
}

/* Tags */
.tag-input-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 44px;
  align-items: center;
}
.tag-input-wrap:focus-within { border-color: var(--accent); }

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 14px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 500;
}
.tag-remove {
  font-size: 1rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.6;
  padding: 0 2px;
}
.tag-remove:hover { opacity: 1; }

.tag-input {
  flex: 1;
  min-width: 80px;
  border: none;
  background: none;
  outline: none;
  color: var(--text);
  font-size: 0.88rem;
}
.tag-input::placeholder { color: var(--text-soft); }

.detail-info {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
}
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
}
.info-row + .info-row { border-top: 1px solid var(--border); }
.info-label { font-size: 0.85rem; color: var(--text-muted); }
.info-value { font-size: 0.85rem; color: var(--text); font-weight: 500; }

/* Decorative separator */
.detail-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}
.detail-separator::before,
.detail-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}
.detail-separator-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  transition: background 0.2s;
}
.action-btn:active { background: var(--surface-2); }
.action-btn-danger { color: var(--danger); border-color: rgba(196,75,59,0.2); }
.action-btn-danger:active { background: rgba(196,75,59,0.08); }

/* ── SETTINGS ──────────────────────────────────────── */
.settings-body {
  flex: 1;
  padding: 8px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.settings-section {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.settings-heading {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.settings-text {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 4px;
}
.settings-muted { color: var(--text-muted); }

.settings-section .info-row {
  padding: 10px 0;
}
.settings-section .info-row + .info-row {
  border-top: 1px solid var(--border);
}

/* Crackle preference pills */
.settings-pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.settings-pill {
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.25s cubic-bezier(.4,0,.2,1);
}
.settings-pill.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}
.settings-pill:active { transform: scale(0.95); }

/* Manifesto quote */
.settings-manifesto {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: center;
  padding: 20px 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Tips section */
.settings-tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
}
.settings-tip + .settings-tip {
  border-top: 1px solid rgba(212,200,180,0.5);
}
.settings-tip-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  font-size: 0.9rem;
}
.settings-tip-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Credits */
.settings-credits {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-soft);
  letter-spacing: 0.06em;
  padding: 12px 0;
}

/* ── CONFIRM OVERLAY ───────────────────────────────── */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44,24,16,0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.confirm-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.confirm-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px 20px;
  width: 280px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(44,24,16,0.15);
}
.confirm-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin-bottom: 6px;
}
.confirm-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.confirm-actions { display: flex; gap: 10px; }
.confirm-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  transition: background 0.2s;
}
.confirm-cancel {
  background: var(--surface);
  color: var(--text);
}
.confirm-cancel:active { background: var(--surface-2); }
.confirm-delete {
  background: var(--danger);
  color: var(--white);
}
.confirm-delete:active { opacity: 0.85; }

/* ── TOAST ─────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: calc(110px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--vinyl);
  color: var(--white);
  border-radius: 24px;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ── DUST PARTICLES ───────────────────────────────── */
.dust-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  pointer-events: none;
  z-index: 5;
  opacity: 0.6;
}

/* ── DUST OVERLAY (photographic) ─────────────────── */
.dust-overlay {
  position: fixed;
  inset: 0;
  background: url('textures/dust-1.png') center / cover no-repeat;
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  z-index: 9998;
  transition: opacity 0.8s ease;
  animation: dustDrift 90s linear infinite;
}
.screen.active .dust-overlay,
.dust-overlay.visible {
  opacity: 0.08;
}
@keyframes dustDrift {
  0%   { transform: translateY(0) scale(1); }
  50%  { transform: translateY(-3%) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

/* ── LIGHT LEAK OVERLAY ──────────────────────────── */
.light-leak-overlay {
  position: fixed;
  inset: 0;
  background: url('textures/lightleak-1.png') center / cover no-repeat;
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  z-index: 9997;
  transition: opacity 1.2s ease;
  animation: leakPulse 25s ease-in-out infinite, leakDrift 40s linear infinite;
}
.screen.active .light-leak-overlay,
.light-leak-overlay.visible {
  opacity: 0.05;
}
@keyframes leakPulse {
  0%, 100% { opacity: 0.03; }
  40%      { opacity: 0.07; }
  70%      { opacity: 0.04; }
}
@keyframes leakDrift {
  0%   { transform: translateX(0) rotate(0deg); }
  25%  { transform: translateX(2%) rotate(0.5deg); }
  50%  { transform: translateX(-1%) rotate(-0.3deg); }
  75%  { transform: translateX(1.5%) rotate(0.2deg); }
  100% { transform: translateX(0) rotate(0deg); }
}

/* ── MULTI-STAGE NEEDLE DROP ─────────────────────── */
.tonearm.needle-lifting .tonearm-arm {
  transform: rotate(-35deg) translateZ(3px) !important;
  transition: transform 0.3s ease-out !important;
}
.tonearm.needle-swinging .tonearm-arm {
  transform: rotate(-2deg) translateZ(3px) !important;
  transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) !important;
}
.tonearm.needle-dropping .tonearm-arm {
  transform: rotate(2deg) translateZ(3px) !important;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ── CRATE DIG PARALLAX ──────────────────────────── */
.sleeve-card {
  transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1),
              box-shadow 0.4s ease,
              opacity 0.4s ease,
              filter 0.4s ease;
  transform-style: preserve-3d;
}
.sleeve-carousel {
  overflow: visible;
  mask-image: linear-gradient(to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%);
  -webkit-mask-image: linear-gradient(to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%);
}
/* Bottom fade — transition into FAB zone */
.sleeve-carousel::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
  z-index: 5;
}

/* ── RECORD-TO-SLEEVE TRANSITION ────────────────── */
/* ── CINEMATIC SAVE TRANSITION ─────────────────────── */
.cinematic-transition {
  position: fixed;
  inset: 0;
  background: rgba(245,240,232,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.cinematic-transition.active {
  opacity: 1;
  pointer-events: auto;
}
.cinematic-transition.phase-fadeout {
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Warm radial glow */
.cinematic-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196,113,59,0.15) 0%, rgba(196,113,59,0.04) 50%, transparent 70%);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.6s ease, transform 0.8s ease;
  pointer-events: none;
}
.cinematic-transition.phase-1 .cinematic-glow {
  opacity: 1;
  transform: scale(1);
  animation: glowPulse 1.5s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 1; }
}

/* Vinyl disc */
.cinematic-vinyl {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  filter: drop-shadow(0 8px 24px rgba(26,26,26,0.35));
  z-index: 3;
  will-change: transform, opacity;
  /* Phase 1 start state */
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cinematic-transition.phase-1 .cinematic-vinyl {
  opacity: 1;
  transform: scale(1);
  animation: cinematicSpin 2s linear infinite;
}
@keyframes cinematicSpin {
  from { transform: scale(1) rotate(0deg); }
  to   { transform: scale(1) rotate(360deg); }
}
/* Vinyl enters sleeve */
.cinematic-transition.phase-2-close .cinematic-vinyl {
  animation: none;
  transform: scale(0.75) translateY(40px);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.4s ease 0.2s;
}

/* Sleeve envelope */
.cinematic-sleeve {
  position: absolute;
  width: 220px;
  height: 260px;
  perspective: 800px;
  z-index: 2;
  will-change: transform, opacity;
  /* Start hidden below */
  opacity: 0;
  transform: translateY(80px) scale(0.9);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.cinematic-sleeve-front {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(44,24,16,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
/* Cardboard texture on sleeve */
.cinematic-sleeve-front::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 128 128' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  background-size: 128px 128px;
  opacity: 0.04;
  pointer-events: none;
  mix-blend-mode: multiply;
}
.cinematic-sleeve-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
  max-width: 180px;
}
.cinematic-sleeve-subtitle {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Sleeve flap (top) */
.cinematic-sleeve-flap {
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 50px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  transform-origin: top center;
  transform: rotateX(0deg);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 4;
  box-shadow: 0 2px 8px rgba(44,24,16,0.06);
  opacity: 0;
}

/* Phase 2: Sleeve enters */
.cinematic-transition.phase-2 .cinematic-sleeve {
  opacity: 1;
  transform: translateY(0) scale(1);
}
/* Phase 2-close: Flap folds down */
.cinematic-transition.phase-2-close .cinematic-sleeve-flap {
  opacity: 1;
  transform: rotateX(-170deg);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

/* Phase 3: Sleeve flies to crate */
.cinematic-transition.phase-3 .cinematic-sleeve {
  transform: scale(0.25) translateY(260px);
  opacity: 0.8;
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease 0.7s;
}
/* Phase 3-land: Bounce on arrival */
.cinematic-transition.phase-3-land .cinematic-sleeve {
  transform: scale(0.2) translateY(280px);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* SAVED stamp */
.cinematic-stamp {
  position: absolute;
  font-family: var(--font-serif);
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: var(--text-soft);
  z-index: 5;
  opacity: 0;
  transform: scale(0.5) translateY(8px);
  pointer-events: none;
}
.cinematic-transition.phase-2-stamp .cinematic-stamp {
  animation: stampBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes stampBounce {
  0%   { transform: scale(0.5) translateY(8px); opacity: 0; }
  60%  { transform: scale(1.15) translateY(-2px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
/* Hide stamp during fly phase */
.cinematic-transition.phase-3 .cinematic-stamp {
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Dust particles */
.cinematic-dust {
  position: absolute;
  bottom: 80px;
  left: 50%;
  width: 0;
  height: 0;
  z-index: 6;
  pointer-events: none;
}
.dust-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
}
@keyframes dustBurst {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.8; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

/* Mini crate target icon */
.cinematic-crate-target {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1;
}
.cinematic-transition.phase-3 .cinematic-crate-target {
  opacity: 0.5;
  transform: translateX(-50%) scale(1);
}
.cinematic-transition.phase-3-land .cinematic-crate-target {
  opacity: 1;
  transform: translateX(-50%) scale(1.15);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── BOOKMARK DROP BUTTON (RECORD SCREEN) ────────── */
.bookmark-drop-btn {
  position: absolute;
  right: 32px;
  top: 34px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(44,24,16,0.08);
}
.bookmark-drop-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}
.bookmark-drop-btn:active {
  transform: scale(0.88);
  background: var(--accent-dim);
}
.bookmark-drop-btn.just-dropped {
  animation: bookmarkPop 0.4s ease;
}
@keyframes bookmarkPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* ── BOOKMARK MARKERS (PLAYBACK SCRUBBER) ────────── */
.bookmark-markers {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 24px;
  pointer-events: none;
  z-index: 1;
}
.bookmark-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid var(--white);
  transform: translate(-50%, -50%);
  top: 50%;
  pointer-events: auto;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(196,113,59,0.35);
  transition: transform 0.15s;
  z-index: 2;
}
.bookmark-dot:active {
  transform: translate(-50%, -50%) scale(1.5);
}
.bookmark-dot::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
}

/* ── PLAYBACK EFFECTS ROW ────────────────────────── */
.playback-effects {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 4px 20px 0;
}
.effect-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.25s cubic-bezier(.4,0,.2,1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.effect-toggle:active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
  transform: scale(0.95);
}
.effect-toggle.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(196,113,59,0.3);
  box-shadow: 0 1px 6px rgba(196,113,59,0.15);
}
.scratch-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-soft);
  letter-spacing: 0.03em;
  padding: 5px 12px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  opacity: 0.8;
}

/* ── LIVE TRANSCRIPT INDICATOR (RECORD SCREEN) ──── */
.transcript-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 280px;
  margin: 4px auto 0;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  overflow: hidden;
}
.transcript-indicator.active {
  opacity: 1;
  transform: translateY(0);
}
.transcript-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: transcriptPulse 1.5s ease-in-out infinite;
}
@keyframes transcriptPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50%      { opacity: 1; transform: scale(1.2); }
}
.transcript-live-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-style: italic;
  letter-spacing: 0.01em;
}

/* ── AI BADGE (DETAIL SCREEN) ───────────────────── */
.ai-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: linear-gradient(135deg, rgba(196,113,59,0.1), rgba(232,160,106,0.08));
  border: 1px solid rgba(196,113,59,0.2);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
  width: fit-content;
  margin: 0 auto;
}
.ai-badge svg {
  color: var(--accent);
}

/* ── FAVORITE TOGGLE (DETAIL SCREEN) ──────────── */
.fav-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: rgba(196,155,32,0.06);
  border: 1.5px solid rgba(196,155,32,0.2);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  width: fit-content;
  margin: 10px auto 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}
.fav-toggle .fav-star-filled { display: none; }
.fav-toggle .fav-star-outline { display: block; color: var(--text-soft); }
.fav-toggle.is-favorite {
  background: linear-gradient(135deg, rgba(196,155,32,0.18), rgba(232,208,96,0.12));
  border-color: #C49B20;
  color: #9B7A18;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(196,155,32,0.2), inset 0 1px 0 rgba(255,248,220,0.3);
  transform: scale(1.05);
}
.fav-toggle.is-favorite .fav-star-filled { display: block; color: #C49B20; filter: drop-shadow(0 0 3px rgba(196,155,32,0.5)); }
.fav-toggle.is-favorite .fav-star-outline { display: none; }
.fav-toggle:active {
  transform: scale(0.93);
}

/* ── TRANSCRIPT BOX (DETAIL SCREEN) ─────────────── */
.transcript-box {
  background: rgba(255,251,245,0.6);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 16px 16px 16px 18px;
  max-height: 200px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.transcript-content {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.75;
  letter-spacing: 0.01em;
}
.transcript-empty {
  font-size: 0.82rem;
  color: var(--text-soft);
  font-style: italic;
  text-align: center;
  padding: 8px 0;
  line-height: 1.5;
}

/* ── AI SUMMARY (DETAIL SCREEN) ──────────────────── */
.summary-box {
  background: rgba(255,251,245,0.6);
  border: 1px solid var(--border);
  border-left: 3px solid #C49B20;
  border-radius: var(--radius-sm);
  padding: 16px 16px 16px 18px;
}
.summary-text {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 10px;
}
.summary-points {
  list-style: none;
  padding: 0;
  margin: 0;
}
.summary-points li {
  position: relative;
  padding-left: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 4px;
}
.summary-points li::before {
  content: '◈';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.7rem;
}
.summary-empty {
  font-size: 0.82rem;
  color: var(--text-soft);
  font-style: italic;
  text-align: center;
  padding: 8px 0;
}
.summary-regen {
  display: block;
  margin: 8px auto 0;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 12px;
  transition: background 0.2s;
}
.summary-regen:hover {
  background: var(--accent-dim);
}

/* ── CHAPTERS (DETAIL SCREEN) ────────────────────── */
.chapters-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chapter-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255,251,245,0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.chapter-item:active {
  transform: scale(0.98);
  background: var(--accent-dim);
}
.chapter-time {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  min-width: 36px;
}
.chapter-title {
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 500;
}
.chapters-empty {
  font-size: 0.82rem;
  color: var(--text-soft);
  font-style: italic;
  text-align: center;
  padding: 8px 0;
}

/* ── CHAPTER MARKERS (SCRUBBER) ──────────────────── */
.chapter-markers {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}
.chapter-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: var(--accent);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 1px 4px rgba(196,113,59,0.3);
  pointer-events: all;
  cursor: pointer;
  z-index: 3;
  transition: transform 0.2s;
}
.chapter-marker:hover,
.chapter-marker:active {
  transform: translate(-50%, -50%) rotate(45deg) scale(1.3);
}
.chapter-marker-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) rotate(-45deg);
  white-space: nowrap;
  background: var(--text);
  color: var(--white);
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.chapter-marker:hover .chapter-marker-tooltip,
.chapter-marker:active .chapter-marker-tooltip {
  opacity: 1;
}

/* ── IMPORT BUTTON ────────────────────────────────── */
.import-btn {
  opacity: 0.7;
  transition: opacity 0.2s;
}
.import-btn:hover,
.import-btn:active {
  opacity: 1;
}

/* ── RECORDING TEMPLATES ─────────────────────────── */
.template-picker {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  padding: 24px 20px 32px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 50;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
}
.template-picker.visible {
  transform: translateY(0);
}
.template-picker-title {
  font-family: 'Libre Baskerville', serif;
  font-size: 16px;
  color: var(--text);
  text-align: center;
  margin: 0 0 16px;
}
.template-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.template-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  color: var(--text);
  font-family: 'Inter', sans-serif;
}
.template-option:hover,
.template-option:active {
  border-color: var(--accent);
  background: rgba(196,113,59,0.06);
}
.template-option-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Libre Baskerville', serif;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.template-option-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.template-option-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.template-option-desc {
  font-size: 11px;
  color: var(--text-muted);
}
.template-option-dur {
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
  flex-shrink: 0;
}
.template-skip {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s;
}
.template-skip:hover,
.template-skip:active {
  color: var(--text);
}
.template-indicator {
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 0;
  margin-top: -4px;
}

/* ── SIDE B ──────────────────────────────────────── */
.side-b-btn {
  border: 1px dashed rgba(255,255,255,0.15) !important;
  background: transparent !important;
  color: var(--accent) !important;
  gap: 6px;
}
.side-b-btn:hover,
.side-b-btn:active {
  border-color: var(--accent) !important;
  background: rgba(196,113,59,0.08) !important;
}
.side-link-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 10px;
  border-left: 3px solid var(--accent);
  cursor: pointer;
  transition: background 0.2s;
}
.side-link-card:hover,
.side-link-card:active {
  background: rgba(255,255,255,0.06);
}
.side-link-label {
  font-family: 'Libre Baskerville', serif;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}
.side-link-name {
  flex: 1;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-link-dur {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
}
.flip-side-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 6px auto 0;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--accent);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}
.flip-side-btn:hover,
.flip-side-btn:active {
  background: rgba(196,113,59,0.1);
  border-color: var(--accent);
}
@keyframes vinylFlip {
  0% { transform: perspective(400px) rotateY(0deg) scale(1); }
  40% { transform: perspective(400px) rotateY(90deg) scale(0.9); }
  60% { transform: perspective(400px) rotateY(90deg) scale(0.9); }
  100% { transform: perspective(400px) rotateY(0deg) scale(1); }
}
.vinyl-flipping {
  animation: vinylFlip 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ── CRATE ASSIGN (Detail Screen) ────────────────── */
.crate-assign {
  display: flex;
  gap: 8px;
  align-items: center;
}
.crate-select {
  flex: 1;
  background: var(--surface);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.crate-select:focus {
  border-color: var(--accent);
  outline: none;
}
.crate-new-btn {
  background: transparent;
  border: 1px dashed rgba(255,255,255,0.15);
  color: var(--accent);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.crate-new-btn:hover,
.crate-new-btn:active {
  border-color: var(--accent);
  background: rgba(196,113,59,0.08);
}

/* ── CRATE FILTER PILLS ─────────────────────────── */
.crate-filter-pill {
  border-color: var(--crate-pill-color, rgba(255,255,255,0.1)) !important;
}
.crate-filter-pill.active {
  background: var(--crate-pill-color, var(--accent)) !important;
  border-color: var(--crate-pill-color, var(--accent)) !important;
  color: #fff !important;
}

/* ── CRATE MANAGEMENT (Settings) ─────────────────── */
.settings-crate-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.settings-crate-item:last-child {
  border-bottom: none;
}
.settings-crate-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.settings-crate-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings-crate-name {
  font-size: 13px;
  color: var(--text);
}
.settings-crate-count {
  font-size: 11px;
  color: var(--text-muted);
}
.settings-crate-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s, color 0.2s;
}
.settings-crate-delete:hover,
.settings-crate-delete:active {
  opacity: 1;
  color: #E05252;
}
.settings-crate-add {
  margin-top: 10px;
  width: 100%;
  text-align: center;
  padding: 10px;
}

/* ── VINYL SCRATCH STATE ─────────────────────────── */
.vinyl-record.scratching {
  animation: none !important;
  cursor: grab;
  filter:
    drop-shadow(0 8px 28px rgba(26,26,26,0.35))
    drop-shadow(0 2px 8px rgba(26,26,26,0.2))
    drop-shadow(0 0 15px rgba(196,113,59,0.12));
  transition: filter 0.2s;
}
.vinyl-playback.scratch-active {
  z-index: 20;
}

/* ── RESPONSIVE (APP) ─────────────────────────────── */
@media (min-width: 420px) {
  .vinyl-container { width: 300px; height: 300px; }
  .vinyl-playback  { width: 280px; height: 280px; }
}

@media (min-width: 600px) {
  .sleeve-card { flex: 0 0 280px; min-height: 360px; }
  .sleeve-track { gap: 24px; }
}


/* ═══════════════════════════════════════════════════════
   TEXTURE MOTION & ANIMATION ENHANCEMENTS
   ═══════════════════════════════════════════════════════ */

/* Cardboard texture breathe — subtle scale pulse on hover */
.sleeve-card:hover::before {
  opacity: 0.12;
  transition: opacity 0.6s ease;
}

/* Crate wood grain subtle parallax on scroll (via will-change hint) */
.crate-body {
  will-change: scroll-position;
}
.crate-body::before {
  animation: woodBreath 60s ease-in-out infinite;
}
@keyframes woodBreath {
  0%, 100% { opacity: 0.06; }
  50%      { opacity: 0.09; }
}

/* Vinyl texture light sweep — rotating highlight over surface */
.vinyl-container::after {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 40%, transparent 60%, rgba(255,255,255,0.02) 100%),
    url('textures/vinyl-surface.png') center / cover;
}

/* Label texture subtle warmth pulse */
.label-texture {
  animation: labelWarmth 8s ease-in-out infinite;
}
@keyframes labelWarmth {
  0%, 100% { opacity: 0.12; }
  50%      { opacity: 0.18; }
}

/* Plinth depth shadow pulse — enhances 3D feel */
.vinyl-container::before {
  animation: plinthGlow 15s ease-in-out infinite;
}
@keyframes plinthGlow {
  0%, 100% { box-shadow: 0 8px 32px rgba(0,0,0,0.2); opacity: 0.35; }
  50%      { box-shadow: 0 12px 40px rgba(0,0,0,0.25); opacity: 0.4; }
}

/* Groove macro texture for detail screen mini-vinyl */
.detail-vinyl-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: url('textures/groove-macro.png') center / cover;
  mix-blend-mode: soft-light;
  opacity: 0.08;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════
   LANDING PAGE — Premium
   ═══════════════════════════════════════════════════════ */

/* ── LANDING SHELL ────────────────────────────────── */
.landing {
  position: fixed;
  inset: 0;
  background: var(--bg);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  z-index: 500;
  transition: opacity 0.6s cubic-bezier(.4,0,.2,1), transform 0.6s cubic-bezier(.4,0,.2,1);
  scroll-behavior: smooth;
}
.landing.exiting {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
}
.landing.hidden { display: none; }

/* ── NAV ──────────────────────────────────────────── */
.land-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  z-index: 200;
  transition: background 0.4s, padding 0.4s, box-shadow 0.4s;
}
/* Scrolled state (added by JS) */
.land-nav.scrolled {
  padding: 12px 24px;
  background: rgba(245,240,232,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(212,200,180,0.4);
}
.land-nav-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: rgba(255,248,245,0.95);
  transition: color 0.4s;
}
.land-nav.scrolled .land-nav-logo { color: var(--text); }

.land-nav-links {
  display: none;
  align-items: center;
  gap: 28px;
}
.land-nav-link {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,248,245,0.55);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.3s;
  position: relative;
}
.land-nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s;
}
.land-nav-link:hover { color: rgba(255,248,245,0.9); }
.land-nav-link:hover::after { transform: scaleX(1); }
.land-nav.scrolled .land-nav-link { color: var(--text-muted); }
.land-nav.scrolled .land-nav-link:hover { color: var(--accent); }

.land-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 28px;
  background: rgba(255,248,245,0.1);
  border: 1px solid rgba(255,248,245,0.2);
  color: rgba(255,248,245,0.9);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: all 0.3s;
}
.land-nav-cta:hover { background: rgba(255,248,245,0.18); }
.land-nav.scrolled .land-nav-cta {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  box-shadow: 0 2px 12px rgba(196,113,59,0.3);
}
.land-nav-cta-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transition: background 0.3s;
}
.land-nav.scrolled .land-nav-cta-dot { background: rgba(255,255,255,0.8); }
.land-nav-cta:active { transform: scale(0.95); }

/* Burger (mobile) */
.land-burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  cursor: pointer;
  z-index: 210;
}
.land-burger span {
  display: block;
  width: 22px; height: 1.5px;
  background: rgba(255,248,245,0.8);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s, background 0.4s;
}
.land-nav.scrolled .land-burger span { background: var(--text); }
.land-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.land-burger.open span:nth-child(2) { opacity: 0; }
.land-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu overlay */
.land-nav-links.mobile-open {
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0;
  background: rgba(26,26,26,0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  justify-content: center;
  align-items: center;
  gap: 32px;
  z-index: 205;
  animation: fadeInMenu 0.3s ease;
}
@keyframes fadeInMenu {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.land-nav-links.mobile-open .land-nav-link {
  font-size: 1.1rem;
  color: rgba(255,248,245,0.7);
}
.land-nav-links.mobile-open .land-nav-cta {
  font-size: 1rem;
  padding: 14px 36px;
}

/* ── HERO (dark cinematic) ────────────────────────── */
.land-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.land-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, #0D0D0D 0%, #1A1612 50%, #0D0D0D 100%);
}
.land-hero-grain {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: url('textures/linen-2.png');
  background-size: 400px 400px;
  mix-blend-mode: overlay;
  pointer-events: none;
  animation: linenDrift 120s linear infinite;
}

.land-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 80px 24px 60px;
  text-align: center;
  width: 100%;
  max-width: 1100px;
}

.land-hero-vinyl-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  will-change: transform;
  perspective: 800px;
  transform-style: preserve-3d;
  /* Tilt the whole wrap so SVG spin animation isn't overridden */
  transform: rotateX(var(--tilt-y)) rotateY(var(--tilt-x));
}
/* Warm radial glow + rotating light rays behind vinyl */
.land-hero-vinyl-wrap::before {
  content: '';
  position: absolute;
  inset: -40%;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(196,113,59,0.12) 0%, transparent 65%),
    conic-gradient(
      from 0deg,
      transparent 0deg, rgba(196,113,59,0.04) 5deg, transparent 10deg,
      transparent 30deg, rgba(196,113,59,0.03) 35deg, transparent 40deg,
      transparent 60deg, rgba(196,113,59,0.04) 65deg, transparent 70deg,
      transparent 90deg, rgba(196,113,59,0.03) 95deg, transparent 100deg,
      transparent 120deg, rgba(196,113,59,0.04) 125deg, transparent 130deg,
      transparent 150deg, rgba(196,113,59,0.03) 155deg, transparent 160deg,
      transparent 180deg, rgba(196,113,59,0.04) 185deg, transparent 190deg,
      transparent 210deg, rgba(196,113,59,0.03) 215deg, transparent 220deg,
      transparent 240deg, rgba(196,113,59,0.04) 245deg, transparent 250deg,
      transparent 270deg, rgba(196,113,59,0.03) 275deg, transparent 280deg,
      transparent 300deg, rgba(196,113,59,0.04) 305deg, transparent 310deg,
      transparent 330deg, rgba(196,113,59,0.03) 335deg, transparent 340deg,
      transparent 360deg
    );
  pointer-events: none;
  animation: lightRaysRotate 60s linear infinite;
}
@keyframes lightRaysRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.land-hero-vinyl {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 20px 60px rgba(0,0,0,0.5)) drop-shadow(0 8px 20px rgba(0,0,0,0.3));
  animation: heroSpin 20s linear infinite;
}
.land-hero-vinyl .vinyl-specular {
  animation: specularHold 20s linear infinite;
  transform-origin: 150px 150px;
}
@keyframes heroSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
/* Real vinyl surface texture on hero record */
.land-hero-vinyl-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: url('textures/vinyl-surface.png') center / cover;
  mix-blend-mode: overlay;
  opacity: 0.15;
  pointer-events: none;
  z-index: 1;
  animation: heroSpin 20s linear infinite;
}

/* Tonearm on hero — pure CSS metallic */
.land-hero-tonearm {
  position: absolute;
  top: -10px;
  right: -30px;
  width: 140px;
  height: 220px;
  z-index: 2;
  transform: translateZ(15px);
  transform-style: preserve-3d;
  filter: drop-shadow(0 6px 24px rgba(0,0,0,0.6));
}
.land-tonearm-pivot {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #B0B0B0, #666 50%, #444 100%);
  box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 1px 2px rgba(255,255,255,0.2);
  z-index: 3;
}
.land-tonearm-pivot::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #888, #333);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.15);
}
.land-tonearm-arm {
  position: absolute;
  top: 18px;
  right: 22px;
  transform-origin: top center;
  transform: rotate(28deg);
  animation: heroTonearmSway 8s ease-in-out infinite;
}
@keyframes heroTonearmSway {
  0%, 100% { transform: rotate(28deg); }
  50%      { transform: rotate(30deg); }
}
.land-tonearm-counterweight {
  position: absolute;
  top: -4px; left: -8px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #999, #555 60%, #333);
  box-shadow: 0 2px 4px rgba(0,0,0,0.4), inset 0 1px 2px rgba(255,255,255,0.12);
}
.land-tonearm-tube {
  width: 3px;
  height: 140px;
  background: linear-gradient(to right, #666, #AAA 30%, #CCC 50%, #AAA 70%, #666);
  border-radius: 2px;
  box-shadow: 1px 2px 4px rgba(0,0,0,0.3);
}
.land-tonearm-headshell {
  position: absolute;
  bottom: -18px;
  left: -6px;
  width: 16px;
  height: 22px;
  background: linear-gradient(to right, #777, #BBB 40%, #999 70%, #666);
  border-radius: 2px 2px 1px 1px;
  transform: rotate(-8deg);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.land-tonearm-cartridge {
  position: absolute;
  bottom: -4px;
  left: 3px;
  width: 10px;
  height: 8px;
  background: linear-gradient(to bottom, #444, #222);
  border-radius: 1px;
}
.land-tonearm-stylus {
  position: absolute;
  bottom: -8px;
  left: 7px;
  width: 2px;
  height: 6px;
  background: linear-gradient(to bottom, #999, #CCC);
  border-radius: 0 0 1px 1px;
}

.land-hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 560px;
}
.land-hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
}
.land-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 8vw, 3.6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: rgba(255,248,245,0.95);
}
.land-hero-line {
  display: block;
}
.land-hero-line-accent {
  color: var(--accent);
  font-style: italic;
}
.land-hero-sub {
  font-size: 0.95rem;
  color: rgba(255,248,245,0.45);
  line-height: 1.7;
  max-width: 360px;
}
.land-hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Primary CTA button */
.land-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  border-radius: 36px;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 20px rgba(196,113,59,0.35), 0 2px 8px rgba(196,113,59,0.2);
  transition: transform 0.25s cubic-bezier(.4,0,.2,1), box-shadow 0.25s;
}
.land-hero-btn:hover { box-shadow: 0 8px 32px rgba(196,113,59,0.45), 0 2px 8px rgba(196,113,59,0.2); transform: translateY(-1px); }
.land-hero-btn:active { transform: scale(0.96) translateY(0); }
.land-hero-btn-inner {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
}

/* Ghost link */
.land-hero-ghost {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,248,245,0.4);
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255,248,245,0.15);
  padding-bottom: 2px;
  transition: color 0.3s, border-color 0.3s;
}
.land-hero-ghost:hover { color: rgba(255,248,245,0.7); border-color: rgba(255,248,245,0.35); }

/* Stagger animation */
.land-stagger {
  opacity: 0;
  transform: translateY(20px);
  animation: staggerIn 0.7s cubic-bezier(.4,0,.2,1) forwards;
  animation-delay: calc(0.15s + var(--i, 0) * 0.12s);
}
@keyframes staggerIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll indicator */
.land-scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
}
.land-scroll-line {
  width: 1px; height: 28px;
  background: linear-gradient(to bottom, rgba(255,248,245,0.3), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50%      { opacity: 0.4; transform: scaleY(0.6); }
}
.land-scroll-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,248,245,0.25);
}

/* ── MARQUEE ──────────────────────────────────────── */
.land-marquee {
  background: var(--vinyl);
  padding: 16px 0;
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.land-marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  animation: marqueeScroll 35s linear infinite;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,248,245,0.4);
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.land-marquee-dot {
  display: inline-block;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
  flex-shrink: 0;
}

/* ── SECTION LAYOUT ───────────────────────────────── */
.land-section {
  padding: 80px 24px;
}
.land-section-dark {
  background: var(--vinyl);
  color: rgba(255,248,245,0.9);
}
.land-section-header {
  text-align: center;
  margin-bottom: 48px;
}
.land-section-tag {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.land-section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
}
.land-section-dark .land-section-title {
  color: rgba(255,248,245,0.95);
}

/* ── FEATURES GRID ────────────────────────────────── */
.land-features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
  text-align: left;
}
.land-feature-card {
  position: relative;
  padding: 32px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.4s cubic-bezier(.4,0,.2,1), box-shadow 0.4s;
  overflow: hidden;
}
.land-feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.3s;
}
.land-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(44,24,16,0.08);
}
.land-feature-card:hover::before { opacity: 1; }

.land-feature-num {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.5;
  letter-spacing: 0.08em;
}
.land-feature-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.land-feature-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.land-feature-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── HOW IT WORKS — STEPS ─────────────────────────── */
.land-steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
}
.land-step { padding: 28px 0; }
.land-step-num {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 14px;
  opacity: 0.8;
}
.land-step-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: rgba(255,248,245,0.95);
}
.land-step-desc {
  font-size: 0.85rem;
  color: rgba(255,248,245,0.45);
  line-height: 1.65;
  max-width: 280px;
  margin: 0 auto;
}
.land-step-line {
  width: 1px; height: 36px;
  background: linear-gradient(to bottom, rgba(196,113,59,0.4), transparent);
}

/* ── AI FEATURES ──────────────────────────────────── */
.land-ai-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}
.land-ai-card {
  padding: 40px 28px;
  background: linear-gradient(145deg, rgba(196,113,59,0.05), rgba(232,160,106,0.02));
  border: 1px solid rgba(196,113,59,0.12);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transition: transform 0.4s cubic-bezier(.4,0,.2,1), box-shadow 0.4s, border-color 0.4s;
}
.land-ai-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(196,113,59,0.1);
  border-color: rgba(196,113,59,0.25);
}
.land-ai-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: transform 0.3s;
}
.land-ai-card:hover .land-ai-icon { transform: scale(1.08); }
.land-ai-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.land-ai-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 300px;
}

/* ── PRIVACY ──────────────────────────────────────── */
.land-privacy {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.land-privacy-icon-wrap {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(196,113,59,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.land-privacy-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: rgba(255,248,245,0.95);
}
.land-privacy-desc {
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(255,248,245,0.45);
}
.land-privacy-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}
.land-privacy-badge {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,248,245,0.1);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255,248,245,0.45);
}

/* ── FINAL CTA ────────────────────────────────────── */
.land-cta {
  position: relative;
  padding: 100px 24px;
  text-align: center;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  overflow: hidden;
}
.land-cta-grain {
  position: absolute;
  inset: 0;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}
.land-cta-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  position: relative;
}
.land-cta-btn { margin-top: 4px; position: relative; }
.land-cta-sub {
  font-size: 0.78rem;
  color: var(--text-soft);
  letter-spacing: 0.04em;
  position: relative;
}

/* ── FOOTER ───────────────────────────────────────── */
.land-footer {
  background: var(--vinyl);
}
.land-footer-inner {
  padding: 48px 24px 32px;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.land-footer-logo {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: rgba(255,248,245,0.7);
}
.land-footer-copy {
  font-size: 0.8rem;
  color: rgba(255,248,245,0.3);
  letter-spacing: 0.03em;
}
.land-footer-links {
  display: flex;
  gap: 24px;
  margin-top: 8px;
}
.land-footer-link {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,248,245,0.3);
  transition: color 0.3s;
}
.land-footer-link:hover { color: var(--accent); }
.land-footer-bar {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,248,245,0.06);
  text-align: center;
}
.land-footer-bar-text {
  font-size: 0.68rem;
  color: rgba(255,248,245,0.18);
  letter-spacing: 0.04em;
  font-style: italic;
}

/* ── PRICING SECTION ──────────────────────────────── */
.land-pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
}
@media (min-width: 600px) {
  .land-pricing-grid { grid-template-columns: 1fr 1fr; }
}

.land-price-card {
  position: relative;
  background: var(--surface);
  border-radius: 16px;
  padding: 32px 24px 28px;
  border: 1px solid var(--border);
  transition: transform 0.3s var(--spring-soft);
}
.land-price-card:hover {
  transform: translateY(-2px);
}

.land-price-card-pro {
  background: var(--vinyl);
  border: 2px solid var(--accent);
  box-shadow: 0 8px 32px rgba(196,113,59,0.15);
}
.land-price-card-pro .land-price-tier,
.land-price-card-pro .land-price-amount {
  color: #F0EBE3;
}
.land-price-card-pro .land-price-li {
  color: rgba(240,235,227,0.7);
}

.land-price-popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 14px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #FFFBF5;
  background: linear-gradient(135deg, var(--accent) 0%, #D4894E 100%);
  border-radius: 20px;
  white-space: nowrap;
}

.land-price-tier {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.land-price-amount {
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 20px;
}
.land-price-period {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0;
}
.land-price-card-pro .land-price-period {
  color: rgba(240,235,227,0.4);
}

.land-price-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.land-price-li {
  padding: 5px 0;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.land-price-bullet {
  font-size: 8px;
  color: var(--text-soft);
  flex-shrink: 0;
}
.land-price-bullet-pro {
  color: var(--accent);
}

.land-price-btn {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}
.land-price-btn:hover {
  background: var(--surface-2);
}

.land-price-btn-pro {
  background: linear-gradient(135deg, var(--accent) 0%, #D4894E 100%);
  color: #FFFBF5;
  border: none;
  box-shadow: 0 4px 16px rgba(196,113,59,0.3);
}
.land-price-btn-pro:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(196,113,59,0.4);
  background: linear-gradient(135deg, var(--accent) 0%, #D4894E 100%);
}

/* ── SETTINGS PRO & PRIVACY LINK ─────────────────── */
.settings-pro-status {
  margin-bottom: 10px;
}
.settings-pro-plan {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}
.settings-upgrade-btn {
  display: block;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, #D4894E 100%);
  color: #FFFBF5;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(196,113,59,0.2);
}
.settings-upgrade-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(196,113,59,0.3);
}
.settings-link {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.3px;
}
.settings-link:hover {
  text-decoration: underline;
}

/* ── SCROLL REVEAL ────────────────────────────────── */
.land-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.4,0,.2,1), transform 0.7s cubic-bezier(.4,0,.2,1);
}
.land-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── LANDING RESPONSIVE ───────────────────────────── */
@media (min-width: 600px) {
  .land-burger { display: none; }
  .land-nav-links {
    display: flex !important;
    flex-direction: row !important;
    position: static !important;
    background: none !important;
    backdrop-filter: none !important;
    animation: none !important;
  }
  .land-nav { padding: 20px 40px; }
  .land-nav.scrolled { padding: 14px 40px; }

  .land-hero-inner {
    flex-direction: row;
    text-align: left;
    padding: 120px 40px 80px;
    gap: 64px;
  }
  .land-hero-text { align-items: flex-start; }
  .land-hero-actions { justify-content: flex-start; }
  .land-hero-vinyl-wrap { width: 260px; height: 260px; flex-shrink: 0; }
  .land-scroll-cue { left: 40px; transform: none; }

  .land-features-grid { grid-template-columns: 1fr 1fr; }
  .land-ai-grid { grid-template-columns: 1fr 1fr 1fr; }

  .land-steps {
    flex-direction: row;
    max-width: 800px;
    gap: 0;
  }
  .land-step-line {
    width: 60px; height: 1px;
    background: linear-gradient(to right, rgba(196,113,59,0.4), transparent);
  }

  .land-section { padding: 100px 40px; }
  .land-footer-inner { padding: 56px 40px 36px; }
}

@media (min-width: 900px) {
  .land-features-grid { grid-template-columns: 1fr 1fr 1fr; }
  .land-hero-vinyl-wrap { width: 320px; height: 320px; }
  .land-nav { padding: 24px 56px; }
  .land-nav.scrolled { padding: 14px 56px; }
  .land-section { padding: 120px 56px; }
}

/* ═══════════════════════════════════════════════════════
   PWA — INSTALL BANNER
   ═══════════════════════════════════════════════════════ */
.pwa-install-banner {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  z-index: 9999;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  background: var(--vinyl);
  border-top: 1px solid rgba(196,113,59,0.2);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
  animation: pwaSlideUp 0.4s cubic-bezier(.4,0,.2,1);
}
@keyframes pwaSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.pwa-install-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}
.pwa-install-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
}
.pwa-install-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pwa-install-text strong {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: rgba(255,248,245,0.9);
}
.pwa-install-text span {
  font-size: 0.72rem;
  color: rgba(255,248,245,0.4);
  letter-spacing: 0.02em;
}
.pwa-install-btn {
  padding: 8px 20px;
  border-radius: 20px;
  border: none;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.pwa-install-btn:active { transform: scale(0.95); }
.pwa-install-close {
  background: none;
  border: none;
  color: rgba(255,248,245,0.3);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  transition: color 0.2s;
}
.pwa-install-close:hover { color: rgba(255,248,245,0.6); }

/* ── SW Update Toast ──────────────────────────────── */
.pwa-update-toast {
  position: fixed;
  top: calc(16px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 9999;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--vinyl);
  border: 1px solid rgba(196,113,59,0.2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.4s cubic-bezier(.4,0,.2,1);
}
.pwa-update-toast.visible {
  transform: translateX(-50%) translateY(0);
}
.pwa-update-toast span {
  font-size: 0.8rem;
  color: rgba(255,248,245,0.7);
}
.pwa-update-toast button {
  padding: 6px 14px;
  border-radius: 16px;
  border: none;
  background: var(--accent);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════
   PWA — STANDALONE MODE
   ═══════════════════════════════════════════════════════ */
@media (display-mode: standalone) {
  /* When installed as PWA, hide landing and go straight to app */
  .landing.pwa-standalone { display: none !important; }
  .app-shell.pwa-standalone { display: block !important; }

  /* Extra safe area padding for app header */
  .collection-header,
  .record-header,
  .playback-header {
    padding-top: calc(8px + var(--safe-top));
  }
}

/* ═══════════════════════════════════════════════════════
   WAX PRO — Upgrade Modal + Gating UI
   ═══════════════════════════════════════════════════════ */

/* ── PRO Badge (inline pill) ───────────────────────── */
.pro-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  margin-left: 6px;
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #FFFBF5;
  background: linear-gradient(135deg, var(--accent) 0%, #D4894E 100%);
  border-radius: 3px;
  vertical-align: middle;
  line-height: 16px;
}

/* ── Upgrade Backdrop ──────────────────────────────── */
.upgrade-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 5500;
  background: rgba(20, 12, 6, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.upgrade-backdrop.visible {
  display: block;
  animation: fadeIn 0.2s ease;
}

/* ── Upgrade Modal Card ────────────────────────────── */
.upgrade-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  z-index: 6000;
  width: calc(100% - 40px);
  max-width: 360px;
  max-height: 88vh;
  overflow-y: auto;
  background: #1E1812;
  border-radius: 20px;
  padding: 32px 24px 28px;
  border-top: 3px solid var(--accent);
  box-shadow:
    0 32px 64px rgba(0,0,0,0.5),
    0 0 0 1px rgba(196,113,59,0.12),
    inset 0 1px 0 rgba(255,255,255,0.04);
}
.upgrade-modal.visible {
  display: block;
  animation: upgradeSlideIn 0.35s var(--spring-soft) forwards;
}

@keyframes upgradeSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Close button */
.upgrade-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  color: rgba(255,248,245,0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.upgrade-close:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,248,245,0.8);
}

/* Header */
.upgrade-header {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 4px;
}
.upgrade-logo {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: #F0EBE3;
  letter-spacing: 3px;
}
.upgrade-pro-label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent);
  padding: 2px 8px;
  border: 1.5px solid var(--accent);
  border-radius: 4px;
}

/* Price */
.upgrade-price {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  color: #F0EBE3;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}
.upgrade-period {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  color: rgba(240,235,227,0.5);
  letter-spacing: 0;
}

/* Contextual feature message */
.upgrade-feature-msg {
  text-align: center;
  font-size: 13px;
  color: rgba(240,235,227,0.6);
  margin-bottom: 20px;
  line-height: 1.5;
  min-height: 20px;
}
.upgrade-feature-name {
  color: var(--accent);
  font-weight: 600;
}

/* Feature checklist */
.upgrade-feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.upgrade-feature-list li {
  position: relative;
  padding: 6px 0 6px 22px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: rgba(240,235,227,0.75);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  line-height: 1.5;
}
.upgrade-feature-list li:last-child {
  border-bottom: none;
}
.upgrade-feature-list li::before {
  content: '◈';
  position: absolute;
  left: 0;
  top: 6px;
  color: var(--accent);
  font-size: 11px;
}

/* Buttons */
.upgrade-btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s;
}
.upgrade-btn-trial {
  background: linear-gradient(135deg, var(--accent) 0%, #D4894E 100%);
  color: #FFFBF5;
  margin-bottom: 8px;
  box-shadow: 0 4px 16px rgba(196,113,59,0.35);
}
.upgrade-btn-trial:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(196,113,59,0.45);
}
.upgrade-btn-trial:active {
  transform: translateY(0);
}
.upgrade-btn-subscribe {
  background: rgba(255,255,255,0.06);
  color: rgba(240,235,227,0.8);
  border: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 12px;
}
.upgrade-btn-subscribe:hover {
  background: rgba(255,255,255,0.1);
}

/* Trial subtext */
.upgrade-trial-sub {
  text-align: center;
  font-size: 11px;
  color: rgba(240,235,227,0.35);
  margin-bottom: 16px;
  letter-spacing: 0.3px;
}

/* Restore link */
.upgrade-restore {
  display: block;
  width: 100%;
  text-align: center;
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 12px;
  color: rgba(240,235,227,0.35);
  cursor: pointer;
  padding: 4px;
  letter-spacing: 0.3px;
}
.upgrade-restore:hover {
  color: rgba(240,235,227,0.6);
}

/* ── Trial Banner ──────────────────────────────────── */
.trial-banner {
  position: sticky;
  top: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  background: linear-gradient(135deg, rgba(196,113,59,0.12) 0%, rgba(196,113,59,0.06) 100%);
  border-bottom: 1px solid rgba(196,113,59,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.trial-banner-text {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--accent);
}

/* ── PRO Gate Overlay (blur + unlock CTA) ──────────── */
.pro-blurred {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
}
.pro-gate-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(245,240,232,0.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
  z-index: 2;
}
.pro-gate-overlay:hover {
  background: rgba(245,240,232,0.75);
}
.pro-gate-icon {
  font-size: 20px;
  color: var(--accent);
}
.pro-gate-text {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.5px;
}

/* ── Icon-level PRO badge (corner badge on buttons) ── */
.icon-pro-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  margin-left: 0;
  font-size: 7px;
  padding: 1px 4px;
  line-height: 12px;
  pointer-events: none;
}
.import-btn {
  position: relative;
}

/* ── Template Pro locked state ─────────────────────── */
.template-pro-locked {
  opacity: 0.65;
}
.template-pro-locked .template-option-icon {
  color: var(--text-muted);
}

/* ── Fade In keyframe (shared) ─────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
