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

:root {
  --bg: #0a0c10;
  --surface: #13151c;
  --surface2: #1a1d28;
  --surface3: #222638;
  --border: rgba(255,255,255,0.06);
  --border-emphasis: rgba(255,255,255,0.12);
  --accent: #C9A85C;
  --accent-hover: #D6B86A;
  --accent-dim: rgba(201,168,92,0.13);
  --accent-glow: rgba(201,168,92,0.30);
  --accent2: #E8A84A;
  --accent2-dim: rgba(232,168,74,0.11);
  --text: #E0E2ED;
  --text-secondary: #9da3c2;
  --text-dim: #6b7194;
  --text-muted: #454b6b;
  --error: #FF5A5A;
  --panel-w: 300px;
  --details-w: 380px;
  --radius: 6px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-primary: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  /* Immersive layout */
  --island-bg: rgba(10, 12, 16, 0.75);
  --island-blur: 16px;
  --island-radius: 12px;
  --drawer-bg: rgba(10, 12, 16, 0.88);
  --drawer-blur: 24px;
  --spring-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
  --chrome-dim-opacity: 0.3;
  --chrome-dim-duration: 200ms;
  --chrome-restore-duration: 400ms;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-primary);
  font-size: 13px;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100dvh;
  overflow: hidden;
  margin: 0;
}

/* ===== FOCUS STATES ===== */
*:focus { outline: none; }
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== FLOATING CONTROL ISLANDS ===== */
.island {
  position: fixed;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--island-bg);
  backdrop-filter: blur(var(--island-blur));
  -webkit-backdrop-filter: blur(var(--island-blur));
  border-radius: var(--island-radius);
  transition: opacity var(--chrome-restore-duration) ease;
  opacity: 0;
}
.island.visible { opacity: 1; }
.island-tl { top: 20px; left: 20px; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 8px 4px 4px 8px; }
.island-tr { top: 16px; right: 16px; gap: 14px; }
.island-wordmark {
  font-family: 'Molle', cursive; font-size: 40pt; font-style: italic; font-weight: 400;
  color: #C9A85C; letter-spacing: 0.01em; line-height: 1;
  user-select: none; opacity: 0.90;
  cursor: pointer; transition: opacity 0.15s ease;
}
.island-wordmark:hover { opacity: 1; }
.wm-short { display: none; }
.island-sep {
  width: 1px; height: 16px; background: var(--border-emphasis);
}
.mode-toggle {
  display: flex; gap: 1px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 6px; padding: 2px;
}
.mode-btn {
  background: transparent; border: none; border-radius: 4px;
  padding: 4px 10px; font-family: var(--font-mono); font-size: 10px;
  font-weight: 600; letter-spacing: 0.5px; color: var(--text-muted);
  cursor: pointer; transition: all .12s; white-space: nowrap; user-select: none;
}
.mode-btn:hover { color: var(--text-dim); }
.mode-btn.active { color: var(--accent); background: var(--accent-dim); }
.island-btn {
  background: transparent; border: 1px solid transparent; color: var(--text-muted);
  padding: 5px 10px; border-radius: 5px; cursor: pointer;
  font-family: var(--font-primary); font-size: 11px; font-weight: 500;
  letter-spacing: 0.3px; transition: all .12s; white-space: nowrap; user-select: none;
}
.island-btn:hover { color: var(--text-dim); background: rgba(255,255,255,0.04); }
.island-btn.active { color: var(--accent); background: var(--accent-dim); }
.details-btn {
  color: var(--accent); border-color: rgba(201,168,92,0.45);
  background: rgba(201,168,92,0.08);
  font-weight: 600; letter-spacing: 0.5px;
}
.details-btn:hover {
  color: #fff; border-color: var(--accent);
  background: rgba(201,168,92,0.18) !important;
}
.details-btn.active {
  color: #fff; background: rgba(201,168,92,0.20) !important;
  border-color: var(--accent);
}
.island-btn.accent {
  background: linear-gradient(135deg, var(--accent-dim), var(--accent2-dim));
  border-color: transparent; color: var(--accent);
}
.island-btn.accent:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(201,168,92,.22), rgba(232,168,74,.15)); color: #fff;
}
.island-btn:disabled { opacity: 0.35; cursor: default; }
.track-count {
  font-family: var(--font-mono); font-size: 10px; color: var(--text-muted);
  letter-spacing: 0.3px;
}

/* ===== AUTO-DIM DURING DRAG ===== */
body.dragging .island,
body.dragging .player {
  opacity: var(--chrome-dim-opacity) !important;
  transition: opacity var(--chrome-dim-duration) ease !important;
}
body.dragging .details-panel.open { opacity: 0.5; }

/* ===== FULL-BLEED CANVAS ===== */
.app { position: fixed; inset: 0; z-index: 0; }
.map-section { width: 100%; height: 100%; }
.map-wrapper {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, #12151f 0%, #0e1018 60%, var(--bg) 100%);
}
#mapCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  cursor: crosshair; touch-action: none;
}

/* ===== PLAYLIST PANEL ===== */
.playlist-panel {
  width: 0; flex-shrink: 0; background: var(--surface); border-left: 1px solid var(--border);
  overflow: hidden; transition: width var(--transition); display: flex; flex-direction: column;
}
.playlist-panel.open { width: var(--panel-w); }
.playlist-head {
  padding: 8px 12px 7px; border-bottom: 1px solid var(--border);
  flex-shrink: 0; display: flex; align-items: center; gap: 8px;
}
.playlist-title {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--text-dim); flex: 1;
}
.playlist-track-count { font-size: 10px; color: var(--text-muted); }
.download-btn {
  background: transparent; border: 1px solid var(--border); color: var(--text-dim);
  padding: 5px 10px; border-radius: 6px; cursor: pointer; font-size: 11px; font-weight: 500;
  transition: all .15s; white-space: nowrap; display: flex; align-items: center; gap: 5px;
}
.download-btn:hover:not(:disabled) { border-color: var(--accent2); color: var(--accent2); background: rgba(232,168,74,.08); }
.download-btn:disabled { opacity: 0.35; cursor: default; }
.playlist-scroll { flex: 1; overflow-y: auto; }
.playlist-scroll::-webkit-scrollbar { width: 3px; }
.playlist-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.playlist-empty {
  text-align: center; color: var(--text-muted); font-size: 12px;
  padding: 40px 20px; line-height: 1.8;
}
.playlist-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.playlist-item:hover { background: rgba(255,255,255,.03); }
.playlist-item.is-playing { background: rgba(201,168,92,.07); }
.pi-num {
  font-size: 10px; font-family: var(--font-mono); color: var(--text-muted);
  width: 18px; text-align: right; flex-shrink: 0;
}
.pi-info { flex: 1; min-width: 0; }
.pi-name {
  font-size: 11px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pi-meta {
  font-size: 9px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px;
}
.pi-play {
  background: transparent; border: 1px solid var(--border); color: var(--text-dim);
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: 9px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: all .15s;
}
.pi-play:hover { border-color: var(--accent); color: var(--accent); }
.pi-remove {
  background: transparent; border: none; color: var(--text-muted);
  width: 20px; height: 20px; border-radius: 4px; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: all .15s; line-height: 1;
}
.pi-remove:hover { background: rgba(255,80,80,.15); color: #ff5050; }

/* ===== DETAILS PANEL (floating card below Details button) ===== */
.details-panel {
  position: fixed; top: 62px; right: 8px;
  width: var(--details-w);
  max-height: calc(100dvh - 80px);
  z-index: 30;
  background: var(--drawer-bg);
  backdrop-filter: blur(var(--drawer-blur));
  -webkit-backdrop-filter: blur(var(--drawer-blur));
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
  border-radius: 12px;
  transform: translateY(-6px) scale(0.98);
  opacity: 0; pointer-events: none;
  transition: transform 0.2s var(--spring-ease), opacity 0.18s ease;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.details-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1; pointer-events: auto;
}
.details-head {
  padding: 10px 14px 8px; border-bottom: 1px solid var(--border); flex-shrink: 0;
  background: rgba(19, 21, 28, 0.6);
}
.details-track-name { font-weight: 600; font-size: 13px; margin-bottom: 2px; letter-spacing: -0.2px; }
.details-track-meta { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); letter-spacing: 0.3px; }
.details-scroll { flex: 1; overflow-y: auto; padding: 10px; }
.details-scroll::-webkit-scrollbar { width: 2px; }
.details-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 1px; }
.details-empty { text-align: center; color: var(--text-muted); font-size: 11px; padding: 40px 16px; line-height: 1.7; }

/* ===== SECTION CARDS ===== */
.section-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 6px; overflow: hidden; }
.section-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; cursor: pointer; user-select: none; transition: background .1s; }
.section-head:hover { background: rgba(255,255,255,.02); }
.section-title {
  font-family: var(--font-primary); font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--text-dim);
  display: flex; align-items: center; gap: 8px;
}
.section-title::before {
  content: ''; display: inline-block; width: 3px; height: 10px;
  border-radius: 1px; background: var(--pip-color, var(--accent)); flex-shrink: 0;
}
.section-chevron { font-size: 10px; color: var(--text-muted); transition: transform .2s; }
.section-chevron.open { transform: rotate(90deg); }
.section-body { padding: 0 12px; max-height: 0; overflow: hidden; transition: max-height 0.3s cubic-bezier(0.4,0,0.2,1), padding 0.3s cubic-bezier(0.4,0,0.2,1); }
.section-body.open { max-height: 800px; padding: 0 12px 8px; }

/* ===== FEATURE ROWS ===== */
.feat-row {
  display: flex; align-items: center; gap: 8px; padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,.025); position: relative;
}
.feat-row:last-child { border-bottom: none; }
.feat-label { font-family: var(--font-primary); font-size: 11px; font-weight: 500; color: var(--text-dim); flex-shrink: 0; width: 120px; cursor: help; letter-spacing: 0.1px; }
.feat-bar { flex: 1; height: 2px; background: rgba(255,255,255,.04); border-radius: 1px; overflow: hidden; }
.feat-bar-fill { height: 100%; border-radius: 1px; background: var(--accent); transition: width .5s cubic-bezier(0.4,0,0.2,1); }
.feat-value { font-family: var(--font-mono); font-size: 10px; font-weight: 500; color: var(--text); text-align: right; white-space: nowrap; flex-shrink: 0; min-width: 52px; letter-spacing: -0.3px; }
.tip {
  position: absolute; bottom: calc(100% + 6px); left: 0;
  background: var(--bg); border: 1px solid var(--border-emphasis);
  border-radius: 5px; padding: 5px 8px; font-size: 10px; color: var(--text-dim);
  line-height: 1.5; max-width: 260px; z-index: 200; pointer-events: none;
  opacity: 0; transition: opacity .18s; white-space: normal;
  box-shadow: 0 6px 20px rgba(0,0,0,.6);
}
.feat-row:hover .tip { opacity: 1; }

/* ===== EMOTION BARS ===== */
.emo-bars { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.emo-bar-row { display: flex; align-items: center; gap: 7px; }
.emo-name { font-family: var(--font-primary); font-size: 10px; font-weight: 500; color: var(--text-dim); width: 100px; flex-shrink: 0; }
.emo-track { flex: 1; height: 3px; background: rgba(255,255,255,.04); border-radius: 2px; overflow: hidden; }
.emo-fill { height: 100%; border-radius: 2px; transition: width .5s cubic-bezier(0.4,0,0.2,1); }
.emo-val { font-family: var(--font-mono); font-size: 10px; font-weight: 400; color: var(--text-muted); width: 34px; text-align: right; flex-shrink: 0; }
.sub-label { font-family: var(--font-primary); font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text-muted); margin: 8px 0 4px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.03); }

/* ===== FLOATING PLAYER PILL ===== */
.player {
  position: fixed; bottom: 20px; left: 16px; z-index: 20;
  transform: translateY(20px);
  opacity: 0; pointer-events: none;
  max-width: 580px; width: auto; height: 48px;
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(var(--island-blur));
  -webkit-backdrop-filter: blur(var(--island-blur));
  border: 1px solid var(--border);
  border-radius: 24px;
  display: flex; align-items: center; padding: 0 16px; gap: 12px;
  transition: opacity 0.4s ease, transform 0.4s var(--spring-ease);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  overflow: hidden;
}
.player.visible {
  opacity: 1; pointer-events: auto;
  transform: translateY(0);
}
/* Progress line across the top edge of the pill */
.player-progress-top {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: rgba(255,255,255,0.04); cursor: pointer;
  border-radius: 24px 24px 0 0;
  transition: height 0.15s ease;
}
.player-progress-top:hover { height: 5px; }
.player-progress-top-fill {
  height: 100%; width: 0%; border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  transition: width .1s linear;
}
.play-btn {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent);
  border: none; color: #fff; font-size: 11px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 2px 8px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.15);
}
.play-btn:hover { background: var(--accent-hover); transform: scale(1.04); box-shadow: 0 3px 12px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.15); }
.play-btn:active { transform: scale(0.97); }
.play-btn:disabled { background: var(--surface2); box-shadow: none; cursor: default; transform: none; }
.player-info {
  flex: 0 1 auto; min-width: 0; max-width: 220px;
}
.player-title { font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.1px; }
.player-meta { font-size: 9px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.player-progress { display: none; /* hidden -- progress shown via top-edge bar */ }
.progress-track { flex: 1; height: 3px; background: rgba(255,255,255,.06); border-radius: 2px; cursor: pointer; position: relative; transition: height 0.15s ease; overflow: visible; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-hover)); border-radius: 2px; width: 0%; pointer-events: none; transition: width .1s linear; position: relative; }
.time-display { font-family: var(--font-mono); font-size: 9px; font-weight: 400; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; letter-spacing: -0.3px; margin-left: auto; }
.player-pill-sep { width: 1px; height: 16px; background: var(--border-emphasis); flex-shrink: 0; }
.player-prompt-btn {
  color: var(--accent); border: 1px solid rgba(201,168,92,0.45);
  background: rgba(201,168,92,0.08);
  padding: 5px 10px; border-radius: 5px; cursor: pointer;
  font-family: var(--font-primary); font-size: 11px; font-weight: 600;
  letter-spacing: 0.5px; white-space: nowrap; flex-shrink: 0;
  transition: all .12s; user-select: none;
}
.player-prompt-btn:hover:not(:disabled) { color: #fff; border-color: var(--accent); background: rgba(201,168,92,0.18); }
.player-prompt-btn:disabled { opacity: 0.3; cursor: default; }

/* ===== SWATCH ===== */
.swatch-row { display: flex; align-items: center; margin: 6px 0 10px; gap: 10px; }
.color-swatch { width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--border); flex-shrink: 0; }
.swatch-info { font-size: 11px; color: var(--text-dim); }

/* (generate button styles are now in .island-btn.accent) */

/* ===== GENERATE OVERLAY ===== */
.gen-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.65); backdrop-filter: blur(8px) saturate(0.8); -webkit-backdrop-filter: blur(8px) saturate(0.8);
  display: none; align-items: center; justify-content: center;
}
.gen-overlay.open { display: flex; }
.gen-panel {
  background: var(--surface); border: 1px solid var(--border-emphasis);
  border-radius: 8px; width: 460px; max-width: 90vw;
  box-shadow: 0 24px 80px rgba(0,0,0,.6), 0 0 1px rgba(255,255,255,0.1);
  overflow: hidden;
  animation: overlaySlideIn 0.25s cubic-bezier(0.4,0,0.2,1);
}
@keyframes overlaySlideIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.gen-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
}
.gen-title { font-weight: 600; font-size: 13px; color: var(--accent); }
.gen-ref { flex: 1; font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gen-close {
  background: transparent; border: none; color: var(--text-muted);
  font-size: 16px; cursor: pointer; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 5px; transition: all .12s;
}
.gen-close:hover { background: rgba(255,255,255,.06); color: var(--text); }
.gen-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.gen-label { font-family: var(--font-primary); font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text-muted); }
.gen-prompt {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); font-family: var(--font-primary); font-size: 12px;
  padding: 8px 10px; resize: vertical; outline: none;
  transition: border-color .15s;
}
.gen-prompt:focus { border-color: var(--accent); }
.gen-options { display: flex; flex-direction: column; gap: 8px; }
.gen-row { display: flex; align-items: center; gap: 10px; }
.gen-slider {
  flex: 1; -webkit-appearance: none; height: 3px;
  background: rgba(255,255,255,.06); border-radius: 2px; outline: none;
}
.gen-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px;
  background: var(--accent); border-radius: 50%; cursor: pointer;
}
.gen-dur-val { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); min-width: 36px; }
.gen-check-label { font-size: 11px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; cursor: pointer; }
.gen-check-label input { accent-color: var(--accent); }
.gen-submit {
  background: var(--accent); border: none; color: #fff;
  padding: 9px 18px; border-radius: var(--radius); font-family: var(--font-primary); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .15s; align-self: stretch;
}
.gen-submit:hover:not(:disabled) { background: var(--accent-hover); }
.gen-submit:disabled { opacity: 0.5; cursor: wait; }
.gen-status {
  font-size: 11px; color: var(--text-muted); text-align: center;
  min-height: 16px;
}
.gen-status.error { color: var(--error); }
.gen-status.success { color: var(--accent2); }

/* ===== LANDING PAGE ===== */
@keyframes landingFadeIn {
  0%   { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes landingLine {
  0%   { width: 0; opacity: 0; }
  100% { width: 40px; opacity: 1; }
}
@keyframes landingRingPulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
}
.landing {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1), transform 0.8s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
}
.landing::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 42%, rgba(201,168,92,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 52% 58%, rgba(232,168,74,0.03) 0%, transparent 50%);
  pointer-events: none;
}
.landing::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px; border-radius: 50%;
  background:
    radial-gradient(circle, transparent 28%, rgba(201,168,92,0.03) 29%, transparent 30%),
    radial-gradient(circle, transparent 43%, rgba(201,168,92,0.025) 44%, transparent 45%),
    radial-gradient(circle, transparent 58%, rgba(201,168,92,0.02) 59%, transparent 60%),
    radial-gradient(circle, transparent 73%, rgba(201,168,92,0.015) 74%, transparent 75%),
    radial-gradient(circle, transparent 88%, rgba(201,168,92,0.01) 89%, transparent 90%);
  animation: landingRingPulse 8s ease-in-out infinite;
  pointer-events: none;
}
.landing.hidden {
  opacity: 0; pointer-events: none; transform: scale(1.04);
}
/* Fade out landing content while keeping the black backdrop (pre-starfield state) */
.landing.to-black .landing-content {
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.landing.to-black::before,
.landing.to-black::after {
  opacity: 0;
  transition: opacity 0.35s ease;
}
.landing-content {
  text-align: center; padding: 0 24px; position: relative; z-index: 1;
}
.landing-title { display: none; }
.landing-wordmark {
  font-family: 'Molle', cursive; font-size: 60pt; font-style: italic; font-weight: 400;
  color: #C9A85C; letter-spacing: 0.02em; line-height: 1;
  display: block; margin: 0 auto; user-select: none;
  animation: landingFadeIn 1s ease-out 0.2s both;
}
.landing-line {
  display: block; width: 40px; height: 2px;
  margin: 24px auto 28px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 1px;
  animation: landingLine 0.8s ease-out 0.9s both;
}
.landing-tagline {
  font-family: var(--font-primary);
  font-size: 15px; font-weight: 400; color: var(--text-dim);
  letter-spacing: 2.5px; text-transform: uppercase;
  margin-bottom: 24px;
  animation: landingFadeIn 1s ease-out 0.6s both;
}
.landing-badges {
  display: flex; align-items: center; justify-content: center; gap: 0;
  margin-bottom: 16px;
  animation: landingFadeIn 0.8s ease-out 0.8s both;
}
.landing-badge {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 12px;
}
.landing-badge-sep { width: 1px; height: 12px; background: var(--border-emphasis); }
.landing-descriptor {
  font-size: 13px; font-weight: 400; color: var(--text-dim);
  max-width: 480px; margin: 0 auto 40px; line-height: 1.6; letter-spacing: 0.2px;
  animation: landingFadeIn 0.8s ease-out 0.9s both;
}
.landing-enter {
  background: transparent; color: var(--text-dim); border: 1px solid var(--border-emphasis);
  padding: 10px 32px; border-radius: var(--radius);
  font-family: var(--font-primary); font-size: 11px; font-weight: 500;
  letter-spacing: 1.8px; text-transform: uppercase;
  cursor: pointer; transition: all 0.25s ease;
  animation: landingFadeIn 0.8s ease-out 1.1s both;
}
.landing-enter:hover {
  color: var(--text); border-color: var(--accent); background: var(--accent-dim);
  box-shadow: 0 0 24px rgba(201,168,92,0.20);
  transform: translateY(-1px);
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 600px) {

  /* Player pill: stretch edge-to-edge with small gutters */
  .player {
    left: 8px;
    right: 8px;
    bottom: 12px;
    max-width: none;
    width: auto;
    padding: 0 12px;
    gap: 10px;
    border-radius: 16px;
  }
  .player-progress-top { border-radius: 16px 16px 0 0; }

  /* Shrink info area so it doesn't crowd out controls */
  .player-info { max-width: 140px; }

  /* Hide the separator and Generate button to save horizontal space */
  .player-pill-sep { display: none; }
  .player-prompt-btn { display: none; }

  /* Condense time display font */
  .time-display { font-size: 8px; letter-spacing: -0.5px; }

  /* Top-right island: tighten gaps, hide track count */
  .island-tr { gap: 8px; right: 10px; }
  .track-count { display: none; }

  /* Header wordmark: show only the "A" initial */
  .wm-full { display: none; }
  .wm-short { display: inline; }

  /* Details panel: full width on small screens */
  .details-panel {
    left: 8px;
    right: 8px;
    width: auto;
    max-height: calc(100dvh - 72px);
    border-radius: 10px;
  }
}
