/* ═══════════════════════════════════════
   DESIGN TOKENS
════════════════════════════════════════ */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3rem);

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

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

  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);

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

  --content-max: 680px;
}

/* Light mode */
:root, [data-theme="light"] {
  --color-bg: #f8f8f6;
  --color-surface: #ffffff;
  --color-surface-2: #f3f3f0;
  --color-border: #e2e2de;
  --color-divider: #eaeae6;
  --color-text: #1a1a18;
  --color-text-muted: #6b6b68;
  --color-text-faint: #b0b0ac;
  --color-text-inverse: #ffffff;
  --color-primary: #1a6b4a;
  --color-primary-hover: #145a3d;
  --color-primary-light: #e8f5ee;
  --color-accent: #2d8c5e;
  --color-selected-bg: #e6f4ed;
  --color-selected-border: #2d8c5e;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
}

/* Dark mode */
[data-theme="dark"] {
  --color-bg: #141412;
  --color-surface: #1c1c1a;
  --color-surface-2: #242422;
  --color-border: #2e2e2c;
  --color-divider: #282826;
  --color-text: #e8e8e4;
  --color-text-muted: #8a8a86;
  --color-text-faint: #555552;
  --color-text-inverse: #141412;
  --color-primary: #4daf82;
  --color-primary-hover: #3d9a6e;
  --color-primary-light: #1a2e24;
  --color-accent: #4daf82;
  --color-selected-bg: #1e2f26;
  --color-selected-border: #4daf82;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #141412;
    --color-surface: #1c1c1a;
    --color-surface-2: #242422;
    --color-border: #2e2e2c;
    --color-divider: #282826;
    --color-text: #e8e8e4;
    --color-text-muted: #8a8a86;
    --color-text-faint: #555552;
    --color-text-inverse: #141412;
    --color-primary: #4daf82;
    --color-primary-hover: #3d9a6e;
    --color-primary-light: #1a2e24;
    --color-accent: #4daf82;
    --color-selected-bg: #1e2f26;
    --color-selected-border: #4daf82;
  }
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  /* Disable iOS Safari rubber-band overscroll bounce on the document. */
  overscroll-behavior-y: none;
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  overscroll-behavior-y: none;
}

button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
input, select { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
a, button, input, [role="button"] {
  transition: color var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition), opacity var(--transition);
}
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ═══════════════════════════════════════
   SCREENS
════════════════════════════════════════ */
.screen {
  display: none;
  min-height: 100dvh;
}
.screen.active {
  display: block;
}
#screen-swirl {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
}
#screen-swirl canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.swirl-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: white;
  text-shadow: 0 0 30px rgba(255,255,255,0.8);
  letter-spacing: -0.02em;
  animation: swirl-pulse 0.9s ease-in-out infinite alternate;
  z-index: 2;
  pointer-events: none;
}
@keyframes swirl-pulse {
  from { opacity: 0.7; transform: scale(0.97); }
  to   { opacity: 1;   transform: scale(1.03); }
}

/* ═══════════════════════════════════════
   HEADER
════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-divider);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.header-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-lockup {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.logo-mark {
  width: 36px;
  height: 36px;
  color: var(--color-primary);
  flex-shrink: 0;
}
.logo-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.1;
}
.logo-name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
}
.logo-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

/* ═══════════════════════════════════════
   MAIN LAYOUT
════════════════════════════════════════ */
.main-content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-8) var(--space-6) var(--space-16);
}

/* ═══════════════════════════════════════
   HERO
════════════════════════════════════════ */
.hero {
  margin-bottom: var(--space-8);
  padding-top: var(--space-6);
}
.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}
.hero-sub {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 48ch;
}
.hero-sub strong {
  color: var(--color-primary);
  font-weight: 700;
}

/* ═══════════════════════════════════════
   SELECTION TRAY
════════════════════════════════════════ */
.selection-tray {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.tray-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tray-count {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-sm);
  color: var(--color-primary);
}
.tray-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  min-height: 32px;
  align-items: center;
}
.tray-empty {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  font-style: italic;
}
.tray-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-selected-bg);
  border: 1px solid var(--color-selected-border);
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  max-width: 280px;
}
.tray-pill-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}
.tray-pill-song {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tray-pill-artist {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.65;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tray-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tray-pill-remove {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  padding: 0;
}
.tray-pill-remove:hover { opacity: 1; }

/* ═══════════════════════════════════════
   SEARCH
════════════════════════════════════════ */
.search-wrap {
  position: relative;
  margin-bottom: var(--space-4);
}
.search-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-faint);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: var(--space-3) var(--space-10) var(--space-3) var(--space-10);
  font-size: var(--text-base);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-text);
  outline: none;
}
.search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-primary) 15%, transparent);
}
.search-input::placeholder { color: var(--color-text-faint); }
.search-clear {
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-clear:hover { background: var(--color-surface-2); color: var(--color-text); }
.search-total {
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--color-text-faint);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

/* ═══════════════════════════════════════
   SONG LIST
════════════════════════════════════════ */
.song-list-wrap {
  max-height: 55vh;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-8);
  /* Flex row: song-list scrolls, alpha-rail stays fixed height */
  display: flex;
  flex-direction: row;
  align-items: stretch;
  overflow: hidden;
}
/* No scrollbar on the wrap itself — .song-list scrolls */
.song-list {
  flex: 1;
  min-width: 0;
  max-height: 55vh;
  overflow-y: auto;
  scroll-behavior: auto;
  padding-right: 2px;
  position: relative;
}
.song-list::-webkit-scrollbar { width: 6px; }
.song-list::-webkit-scrollbar-track { background: transparent; }
.song-list::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }

/* ── Alpha rail ────────────────────────────────────────────── */
.alpha-rail {
  flex-shrink: 0;
  width: 20px;
  /* Cap to viewport so rail never extends below the fold */
  max-height: calc(100dvh - 80px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  z-index: 10;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  cursor: pointer;
  background: linear-gradient(to left, var(--color-surface) 60%, transparent);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.alpha-rail-letter {
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
  color: var(--color-text-muted);
  transition: transform 0.07s ease, color 0.07s ease, font-weight 0.07s ease;
  display: block;
  text-align: center;
  width: 100%;
  pointer-events: none;
}
/* Teardrop bubble — same shape as editor */
.alpha-rail-bubble {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  width: 40px;
  height: 40px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--color-primary, #7c6af7);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  /* inner text counter-rotates */
}
.alpha-rail-bubble::after {
  content: attr(data-letter);
  display: block;
  transform: rotate(45deg);
}

.artist-group { border-bottom: 1px solid var(--color-divider); }
.artist-group:last-child { border-bottom: none; }

.artist-header {
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-text);
  background: var(--color-surface-2, #f5f5f2);
  border-bottom: 1px solid var(--color-divider);
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  user-select: none;
}
.artist-header:hover { opacity: 0.85; }
.artist-chevron {
  margin-left: auto;
  font-size: 10px;
  opacity: 0.5;
  transition: transform 0.18s ease;
  flex-shrink: 0;
}
.artist-group.is-collapsed .artist-chevron { transform: rotate(-90deg); }
.artist-songs-wrap { overflow: hidden; }
.artist-group.is-collapsed .artist-songs-wrap { display: none; }
[data-theme="dark"] .artist-header { background: var(--color-surface-2); }

.artist-header-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  flex-shrink: 0;
}

.song-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-divider);
  line-height: 1.3;
}
.song-item:last-child { border-bottom: none; }
.song-item:hover { background: var(--color-primary-light); }

.song-item.selected {
  background: var(--color-selected-bg);
  color: var(--color-primary);
}

.song-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.song-item.disabled:hover { background: none; }

.song-bubble {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), background var(--transition);
}
.song-item.selected .song-bubble {
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.song-bubble-check {
  opacity: 0;
  transition: opacity var(--transition);
}
.song-item.selected .song-bubble-check { opacity: 1; }

.song-item-title {
  font-size: var(--text-sm);
  font-weight: 500;
  flex: 1;
}

.no-results {
  padding: var(--space-10) var(--space-6);
  text-align: center;
  color: var(--color-text-muted);
  font-style: italic;
  font-size: var(--text-sm);
}

/* ═══════════════════════════════════════
   FORM SECTION
════════════════════════════════════════ */
.form-section {
  border-top: 1px solid var(--color-divider);
  padding-top: var(--space-8);
}
.form-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
  color: var(--color-text);
}
.form-group {
  margin-bottom: var(--space-5);
}
.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}
.optional {
  font-weight: 400;
  color: var(--color-text-faint);
}
.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  outline: none;
}
.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-primary) 15%, transparent);
}
.form-input::placeholder { color: var(--color-text-faint); }

/* Email opt-in */
.email-optin-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
}
.optin-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.optin-header svg { color: var(--color-primary); }
.optin-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  max-width: 50ch;
}
.optin-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.optin-input {
  margin-bottom: 0;
}
.optin-check-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  user-select: none;
}
.optin-check {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
  cursor: pointer;
}
.optin-check-label { font-weight: 500; }

/* CAPTCHA */
.captcha-wrap {
  margin-bottom: var(--space-6);
}
.captcha-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  user-select: none;
  justify-content: space-between;
  position: relative;
}
.captcha-checkbox {
  position: absolute;
  opacity: 0;
  width: 24px;
  height: 24px;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}
.captcha-box {
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--transition), background var(--transition);
}
.captcha-checkbox:checked ~ .captcha-box {
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.captcha-check-icon {
  color: white;
  opacity: 0;
  transition: opacity var(--transition);
}
.captcha-checkbox:checked ~ .captcha-box .captcha-check-icon { opacity: 1; }
.captcha-text {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-left: var(--space-1);
}
.captcha-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.captcha-logo-text {
  font-size: 10px;
  line-height: 1.2;
  color: var(--color-text-faint);
}
.captcha-note {
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: #c0392b;
  font-weight: 500;
}

/* Submit button */
.submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 800;
  border-radius: var(--radius-full);
  letter-spacing: -0.01em;
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-3);
  min-height: 52px;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}
.submit-btn-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  flex: 1;
}
.submit-btn-text {
  line-height: 1.2;
}
.submit-btn-sub {
  font-size: 0.72em;
  font-weight: 500;
  opacity: 0.85;
  letter-spacing: 0.01em;
  line-height: 1.2;
  font-style: italic;
}
.submit-btn-sub:empty {
  display: none;
}
.submit-btn-icon {
  flex-shrink: 0;
}
.submit-btn:not(:disabled):hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}
.submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.submit-note {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ═══════════════════════════════════════
   SUCCESS SCREEN
════════════════════════════════════════ */
#screen-success {
  background: var(--color-bg);
}
.success-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-12) var(--space-6) var(--space-16);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.success-icon-wrap {
  margin-bottom: var(--space-6);
}
.success-icon {
  width: 72px;
  height: 72px;
  color: var(--color-primary);
  animation: success-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes success-pop {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.success-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}
.success-sub {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 44ch;
  margin-bottom: var(--space-6);
}
.success-songs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  margin-bottom: var(--space-8);
}
.success-song-pill {
  background: var(--color-selected-bg);
  border: 1px solid var(--color-selected-border);
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
}

/* Tip divider */
.tip-divider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 600;
}
.tip-divider::before, .tip-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-divider);
}

/* Tip section */
.tip-section {
  width: 100%;
  margin-bottom: var(--space-8);
}
.tip-intro {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
}
.tip-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.tip-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  text-decoration: none;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  text-align: left;
}
a.tip-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.tip-card-logo {
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  line-height: 0;
}
.tip-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tip-card-name {
  font-weight: 700;
  font-size: var(--text-sm);
}
.tip-card-handle {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.tip-card-arrow {
  color: var(--color-text-faint);
  flex-shrink: 0;
}
a.tip-card:hover .tip-card-arrow { color: var(--color-primary); }
.tip-zelle-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-top: 2px;
}
.tip-footer {
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ── Hero title row (title + dice) ─────────── */
.hero-title-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.dice-btn {
  background: none;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.dice-btn:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.dice-btn.spinning .dice-icon {
  animation: dice-spin 0.45s cubic-bezier(0.36,0.07,0.19,0.97);
}
@keyframes dice-spin {
  0%   { transform: rotate(0deg) scale(1); }
  30%  { transform: rotate(140deg) scale(1.2); }
  70%  { transform: rotate(300deg) scale(0.9); }
  100% { transform: rotate(360deg) scale(1); }
}

/* ── Genre filter tabs ──────────────────────── */
.genre-tabs {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.genre-tab {
  background: none;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 5px 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.genre-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.genre-tab.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* ── Facebook Review Section ────────────────── */
.review-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-6) 0 var(--space-4);
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.review-divider::before,
.review-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}
.review-section {
  text-align: center;
  margin-bottom: var(--space-4);
}
.review-intro {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.review-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: #1877F2;
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: background 0.18s, transform 0.15s;
  box-shadow: 0 2px 8px rgba(24,119,242,0.25);
}
.review-btn:hover {
  background: #166fe5;
  transform: translateY(-1px);
}
.review-btn-arrow {
  opacity: 0.75;
}

/* Artist website — small label above, pill bubble with domain below */
.artist-website-row {
  margin-top: var(--space-3);
  text-align: center;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.artist-website-caption {
  font-size: var(--text-xs, 0.75rem);
  color: var(--color-text-muted);
  opacity: 0.8;
  letter-spacing: 0.01em;
}
.artist-website-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
  box-shadow: 0 2px 8px rgba(26,107,74,0.25);
  /* Constrain to card width so it never overflows */
  max-width: min(100%, 22rem);
  box-sizing: border-box;
}
.artist-website-btn:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26,107,74,0.32);
}
.artist-website-btn svg {
  flex-shrink: 0;
  opacity: 0.9;
}
.artist-website-btn .artist-website-domain {
  /* Domain shrinks if needed; clip from middle‑right with ellipsis if it still doesn't fit */
  font-size: var(--text-sm);
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}
/* Progressive font-size shrink for long domains so they fit before ellipsis kicks in */
.artist-website-btn[data-len-l] .artist-website-domain { font-size: 0.8125rem; }
.artist-website-btn[data-len-xl] .artist-website-domain { font-size: 0.75rem; letter-spacing: -0.01em; }

/* Email success note */
.email-success-note {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-primary-light);
  border: 1px solid var(--color-selected-border);
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-6);
  width: 100%;
  justify-content: center;
}

.another-btn {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: var(--space-2);
}
.another-btn:hover { color: var(--color-text); }

/* ═══════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width: 480px) {
  .header-inner { padding: var(--space-3) var(--space-4); }
  .main-content { padding: var(--space-6) var(--space-4) var(--space-12); }
  .success-inner { padding: var(--space-8) var(--space-4) var(--space-12); }
  .tray-pill { max-width: 200px; }
  .tip-card { padding: var(--space-3) var(--space-4); }
  .tip-zelle-note { display: block; }
}

.site-footer-copyright {
  text-align: center;
  padding: var(--space-6) var(--space-4) var(--space-8);
  font-size: 11px;
  color: rgba(0,0,0,0.55);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  cursor: default;
}
[data-theme="dark"] .site-footer-copyright {
  color: rgba(255,255,255,0.6);
}
.site-footer-copyright a {
  color: inherit;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════
   CELEBRATE TAB — 🎂/🎉
════════════════════════════════════════ */
.genre-tab--celebrate {
  background: none;
  border-color: var(--color-border);
  color: var(--color-text-muted);
  font-size: 15px;
  padding: 4px 12px;
}
.genre-tab--celebrate:hover {
  border-color: #e8435a;
  color: #e8435a;
}
.genre-tab--celebrate.active {
  background: linear-gradient(135deg, #e8435a, #f5a623);
  border-color: #e8435a;
  color: #fff;
}

/* Celebrate panel */
.celebrate-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.celebrate-field-group {
  margin-bottom: var(--space-5);
}
.celebrate-field-group:last-of-type {
  margin-bottom: var(--space-3);
}
.celebrate-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  cursor: pointer;
}
/* Celebrate radio circle */
.cel-radio {
  display: inline-flex;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  border: 2px solid #999;
  background: var(--color-surface);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}
.cel-radio::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: transparent;
  transition: background var(--transition);
}
.cel-radio.selected {
  border-color: var(--color-primary);
}
.cel-radio.selected::after {
  background: var(--color-primary);
}
.celebrate-label:hover .cel-radio {
  border-color: var(--color-primary);
}

.celebrate-input-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.celebrate-input {
  width: 100%;
}
.celebrate-textarea {
  width: 100%;
  resize: vertical;
  min-height: 72px;
}
.celebrate-time-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.celebrate-time-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  font-weight: 500;
  flex-shrink: 0;
}
.celebrate-time-input {
  flex: 1;
  max-width: 140px;
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-3);
}
.celebrate-hint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-style: italic;
  text-align: center;
}

/* “Wait for cake/candles” checkbox row — minimalist, sits under the time picker */
.celebrate-wait-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-1);
  cursor: pointer;
  user-select: none;
}
/* Custom-painted checkbox — clearly empty when unchecked (browser default
   accent-color can make it look pre-selected on some platforms). */
.celebrate-wait-check {
  flex-shrink: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1.5px solid var(--color-text);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: border-color var(--transition), background var(--transition);
}
.celebrate-wait-check:hover {
  border-color: var(--color-primary);
}
.celebrate-wait-check:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.celebrate-wait-check:checked::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 4px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.celebrate-wait-check:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.celebrate-wait-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text);
}
.celebrate-wait-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-style: italic;
}

/* “— or —” divider between the two options */
.celebrate-divider {
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-faint);
  letter-spacing: 0.08em;
  margin: var(--space-4) 0;
  position: relative;
}
.celebrate-divider::before,
.celebrate-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--color-border);
}
.celebrate-divider::before { left: 0; }
.celebrate-divider::after  { right: 0; }

/* ═══════════════════════════════════════
   ORIGINALS FOLLOW BAR
════════════════════════════════════════ */
.originals-follow {
  display: none;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.follow-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.follow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 6px 14px 6px 10px;
  background: var(--color-surface);
  transition: color 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.follow-link:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.follow-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

/* Originals any-option row */
.originals-any-wrap {
  border-bottom: 2px solid var(--color-divider);
}
.originals-any-btn.song-item {
  font-weight: 700;
  color: var(--color-primary);
  font-style: italic;
}

/* ═══════════════════════════════════════
   ORIGINALS TAB — special styling
════════════════════════════════════════ */
.genre-tab--original {
  background: none;
  border-color: #b8860b;
  color: #b8860b;
}
.genre-tab--original:hover,
.genre-tab--original.active {
  background: linear-gradient(135deg, #b8860b, #daa520, #ffd700);
  border-color: #daa520;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Originals theme — subtle gold accent only, no bg change */
.theme-original .artist-header.vibe-header {
  background: linear-gradient(90deg, rgba(218,165,32,0.15), transparent);
  color: #a0710a;
  font-style: italic;
  letter-spacing: 0.02em;
}
[data-theme="dark"].theme-original .artist-header.vibe-header {
  background: linear-gradient(90deg, rgba(255,215,0,0.12), transparent);
  color: #f0c040;
}
.theme-original .artist-header-dot { background: #daa520; }

/* Sparkle overlay removed */

/* ═══════════════════════════════════════
   CHRISTMAS TAB — red/green theme
════════════════════════════════════════ */
.genre-tab--xmas {
  background: none;
  border-color: var(--color-border);
  color: var(--color-text-muted);
  font-size: 16px;
  padding: 4px 12px;
}
.genre-tab--xmas:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.genre-tab--xmas.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* Christmas light mode: dark red bg, bright green text */
.theme-xmas[data-theme="light"],
.theme-xmas:not([data-theme]) {
  --color-bg: #8B0000;
  --color-surface: #7a0000;
  --color-surface-2: #6e0000;
  --color-border: #a83232;
  --color-divider: #922020;
  --color-text: #e8ffe0;
  --color-text-muted: #b8e8b0;
  --color-text-faint: #88b880;
  --color-primary: #2ecc71;
  --color-primary-hover: #27ae60;
  --color-primary-light: rgba(46,204,113,0.15);
  --color-accent: #2ecc71;
  --color-selected-bg: rgba(46,204,113,0.2);
  --color-selected-border: #2ecc71;
  --color-text-inverse: #fff;
}

/* Christmas dark mode: bright green bg, dark red text */
.theme-xmas[data-theme="dark"] {
  --color-bg: #145a1e;
  --color-surface: #0f4a18;
  --color-surface-2: #0a3a12;
  --color-border: #2a7a36;
  --color-divider: #1e6628;
  --color-text: #ffe8e8;
  --color-text-muted: #ffb8b8;
  --color-text-faint: #d88080;
  --color-primary: #e74c3c;
  --color-primary-hover: #c0392b;
  --color-primary-light: rgba(231,76,60,0.15);
  --color-accent: #e74c3c;
  --color-selected-bg: rgba(231,76,60,0.2);
  --color-selected-border: #e74c3c;
  --color-text-inverse: #fff;
}

/* ── Halloween theme ───────────────────────────────────── */
.theme-halloween[data-theme="light"],
.theme-halloween:not([data-theme]) {
  --color-bg: #1a0a00;
  --color-surface: #2a1200;
  --color-surface-2: #3a1a00;
  --color-border: #6b3a10;
  --color-divider: #5a2e08;
  --color-text: #ffe8c0;
  --color-text-muted: #d4a870;
  --color-text-faint: #a07040;
  --color-primary: #ff6b00;
  --color-primary-hover: #e55e00;
  --color-primary-light: rgba(255,107,0,0.15);
  --color-accent: #ff6b00;
  --color-selected-bg: rgba(255,107,0,0.2);
  --color-selected-border: #ff6b00;
  --color-text-inverse: #fff;
}

.theme-halloween[data-theme="dark"] {
  --color-bg: #0d0520;
  --color-surface: #180838;
  --color-surface-2: #220d4a;
  --color-border: #5a2d8a;
  --color-divider: #3d1d60;
  --color-text: #f0d8ff;
  --color-text-muted: #c090e8;
  --color-text-faint: #8050a8;
  --color-primary: #c040ff;
  --color-primary-hover: #a030e0;
  --color-primary-light: rgba(192,64,255,0.15);
  --color-accent: #c040ff;
  --color-selected-bg: rgba(192,64,255,0.2);
  --color-selected-border: #c040ff;
  --color-text-inverse: #fff;
}

/* Logo inversion — dark mode (any genre) and special dark-bg themes */
[data-theme="dark"] .logo-mark,
.theme-xmas:not([data-theme="dark"]) .logo-mark,
.theme-xmas:not([data-theme]) .logo-mark,
.theme-halloween .logo-mark {
  filter: invert(1);
}

/* Ghost canvas overlay */
.ghost-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  display: none;
}

/* Tip-only button — lives inline in .genre-tabs row */
.tip-only-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1.5px dashed var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.tip-only-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-light);
  border-style: solid;
}

.tip-only-btn.active {
  border-style: solid;
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.tip-only-hint {
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: 500;
  margin: var(--space-1) 0 0;
  text-align: center;
  animation: fadeIn 0.25s ease;
}

/* Snow canvas overlay */
.snow-canvas {
  display: none;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 15;
  width: 100%;
  height: 100%;
}

/* ═══════════════════════════════════════════════
   PIN GATE (Anti-Spam Access Code Screen)
   ═══════════════════════════════════════════════ */
.pin-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 2rem 1.5rem;
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
}

.pin-gate__logo {
  margin-bottom: 1.25rem;
}

.pin-gate__title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.pin-gate__sub {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.5;
  max-width: 320px;
}

.pin-gate__inputs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  justify-content: center;
}

.pin-digit {
  width: 44px;
  height: 62px;
  border: 2.5px solid #10b981;
  border-radius: 8px;
  background: color-mix(in srgb, #10b981 8%, var(--surface));
  color: var(--text-primary);
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  -moz-appearance: textfield;
  caret-color: #10b981;
}
.pin-digit::-webkit-outer-spin-button,
.pin-digit::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pin-digit:focus {
  border-color: #10b981;
  background: color-mix(in srgb, #10b981 15%, var(--surface));
  box-shadow: 0 0 0 3px rgba(16,185,129,0.25);
}
.pin-digit.pin-digit--error {
  border-color: #ef4444;
  background: color-mix(in srgb, #ef4444 10%, var(--surface));
  animation: pin-shake 0.35s ease;
}
@keyframes pin-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

.pin-gate__error {
  color: #ef4444;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.pin-gate__btn {
  width: 100%;
  max-width: 280px;
  padding: 0.875rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  margin-bottom: 1.5rem;
}
.pin-gate__btn:hover  { opacity: 0.88; }
.pin-gate__btn:active { transform: scale(0.97); }
.pin-gate__btn:disabled { opacity: 0.5; cursor: not-allowed; }

.pin-gate__tip-bypass {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.pin-gate__tip-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Loading overlay ─────────────────────────────────────────── */
#rsa-load-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg, #0d0d14);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}
#rsa-load-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}
.rsa-load-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255,255,255,0.15);
  border-top-color: var(--accent, #7c3aed);
  border-radius: 50%;
  animation: rsa-spin 0.75s linear infinite;
}
@keyframes rsa-spin {
  to { transform: rotate(360deg); }
}



/* ── Alpha toggle row ── */
.alpha-toggle-row {
  display: flex;
  align-items: center;
  padding: 4px 0 2px 2px;
}
.alpha-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px 4px 9px;
  border-radius: 20px;
  border: 1.5px solid rgba(120,120,140,0.25);
  background: transparent;
  color: var(--muted, rgba(180,180,200,0.5));
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.alpha-toggle-btn[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent, #7c3aed) 15%, transparent);
  color: var(--accent, #7c3aed);
  border-color: color-mix(in srgb, var(--accent, #7c3aed) 40%, transparent);
}
.alpha-toggle-btn:hover {
  background: color-mix(in srgb, var(--accent, #7c3aed) 10%, transparent);
}

/* ── Duplicate-request warning modal ─────────────────────── */
#rsa-dupe-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
#rsa-dupe-modal.active { display: flex; }
.rsa-dupe-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg, #14141c);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 1.5rem 1.25rem 1.25rem;
  color: var(--text, #ececf0);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  animation: rsa-dupe-pop 0.2s ease-out;
}
@keyframes rsa-dupe-pop {
  from { transform: scale(0.94); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.rsa-dupe-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.rsa-dupe-title-icon { font-size: 1.2rem; }
.rsa-dupe-body {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-secondary, rgba(220,220,235,0.78));
  margin-bottom: 0.85rem;
}
.rsa-dupe-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.rsa-dupe-list li {
  background: color-mix(in srgb, var(--accent, #7c3aed) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #7c3aed) 35%, transparent);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  color: #fff;
}
.rsa-dupe-list .rsa-dupe-artist {
  display: block;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
  margin-top: 1px;
}
.rsa-dupe-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.rsa-dupe-btn {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.rsa-dupe-btn:active { transform: scale(0.97); }
.rsa-dupe-btn-primary {
  background: var(--accent, #7c3aed);
  color: #fff;
}
.rsa-dupe-btn-primary:hover { opacity: 0.88; }
.rsa-dupe-btn-secondary {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.85);
}
.rsa-dupe-btn-secondary:hover {
  background: rgba(255,255,255,0.05);
}

/* ── Required name field + disclosure (v67) ───────────────── */
.required-mark {
  color: #ef4444;
  font-weight: 700;
  margin-left: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.name-disclosure {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-secondary, rgba(220, 220, 235, 0.65));
  margin: 0 0 0.5rem 0;
  font-style: italic;
}
.name-error {
  font-size: 0.82rem;
  color: #ef4444;
  margin: 0.4rem 0 0 0;
  font-weight: 500;
}
.form-input.input-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.18);
}
.optin-optional {
  font-size: 0.78em;
  font-weight: 400;
  opacity: 0.7;
  margin-left: 4px;
}
