/* =============================================================================
   Dodek Gravity Field — CSS Foundation
   Mobile-first PWA. Monospace/teal/dark. Instrument panel aesthetic.
   ============================================================================= */

/* ---------------------------------------------------------------------------
   CSS Custom Properties
   --------------------------------------------------------------------------- */
:root {
  --bg: #0c0c14;
  --surface: #111119;
  --surface-2: #16161f;
  --surface-3: #1a1a24;
  --border: #1e1e2a;
  --border-light: #2a2a38;
  --text: #d4d4d4;
  --text-dim: #9a9ab4;   /* Raised from #8a8aa0 for WCAG AA */
  --text-muted: #5a5a7a;
  --accent: #4ecdc4;
  --accent-dim: rgba(78, 205, 196, 0.12);
  --heat: #ff6b6b;
  --heat-dim: rgba(255, 107, 107, 0.12);
  --warn: #ffd93d;
  --warn-dim: rgba(255, 217, 61, 0.12);
  --font: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

/* ---------------------------------------------------------------------------
   Base Reset + Body
   --------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  width: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------------------------------------------------------------------------
   Canvas — the gravity field itself
   Critical: touch-action: none prevents browser zoom/scroll hijacking.
   --------------------------------------------------------------------------- */
#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  touch-action: none;
}

/* ---------------------------------------------------------------------------
   Overlay Layer — DOM elements rendered above canvas
   --------------------------------------------------------------------------- */
#overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

#overlay > * {
  pointer-events: auto;
}

/* ---------------------------------------------------------------------------
   Hidden Utility
   --------------------------------------------------------------------------- */
.hidden {
  opacity: 0;
  pointer-events: none !important;
  transition: opacity 0.3s;
}

/* ---------------------------------------------------------------------------
   Splash — Conviction score (first visit only, z-index covers everything)
   --------------------------------------------------------------------------- */
.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.splash-brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.splash-logo {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 3px;
}

.splash-ring {
  display: block;
  margin: 0 auto 12px;
}

.splash-type-label {
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 16px;
}

.splash-type-name {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  margin: 4px 0;
}

.splash-type-desc {
  font-size: 0.85rem;
  color: #9a9ab0;
  max-width: 260px;
  text-align: center;
  margin: 4px 0 16px;
}

.splash-ctas {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 280px;
}

.splash-cta {
  flex: 1;
  padding: 10px;
  border-radius: 4px;
  font-family: var(--font);
  font-size: 9px;
  letter-spacing: 1px;
  font-weight: 700;
  border: none;
  cursor: pointer;
}

.splash-cta.primary {
  background: var(--accent);
  color: var(--bg);
}

.splash-cta.secondary {
  background: transparent;
  border: 1px solid rgba(78, 205, 196, 0.3);
  color: var(--accent);
}

.splash-clusters {
  margin-top: 12px;
  width: 100%;
  max-width: 280px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.splash-chip {
  display: inline-block;
  font-size: 7px;
  padding: 2px 6px;
  border-radius: 3px;
  margin: 2px;
  font-family: var(--font);
  letter-spacing: 0.5px;
}

/* ---------------------------------------------------------------------------
   Gesture Hint
   --------------------------------------------------------------------------- */
.gesture-hint {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 2px;
  z-index: 20;
}

/* ---------------------------------------------------------------------------
   Constellation Header (Zoom 1 — galaxy view)
   --------------------------------------------------------------------------- */
.constellation-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 16px env(safe-area-inset-top, 0px);
  z-index: 15;
}

.const-logo {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 3px;
}

.const-subtitle {
  font-size: 7px;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  margin-top: 2px;
}

/* ---------------------------------------------------------------------------
   Neighborhood Header (Zoom 2 — cluster view)
   --------------------------------------------------------------------------- */
.neighborhood-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 16px env(safe-area-inset-top, 0px);
  z-index: 15;
  pointer-events: none;
}

.back-btn {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(78, 205, 196, 0.1);
  border: 1px solid rgba(78, 205, 196, 0.3);
  color: var(--accent);
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: 1.5px;
  padding: 6px 12px;
  cursor: pointer;
  pointer-events: auto;
  border-radius: 2px;
}

.back-btn:hover {
  background: rgba(78, 205, 196, 0.2);
  border-color: var(--accent);
}

.track-back-btn {
  position: fixed;
  left: 16px;
  top: 16px;
  transform: none;
  z-index: 25;
}

.hood-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
}

.hood-stats {
  font-size: 7px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* ---------------------------------------------------------------------------
   Minicard Bar (Neighborhood level — bottom tray)
   --------------------------------------------------------------------------- */
.minicard {
  position: fixed;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: rgba(17, 17, 25, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 20;
}

.minicard-art {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  flex-shrink: 0;
}

.minicard-title {
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.5px;
}

.minicard-sub {
  font-size: 7px;
  color: var(--text-muted);
}

.minicard-arrow {
  font-size: 12px;
  color: var(--accent);
  margin-left: auto;
}

/* ---------------------------------------------------------------------------
   Track Card (Zoom 3 — individual track)
   --------------------------------------------------------------------------- */
.track-card {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 12px 12px;
}

.track-card-inner {
  background: rgba(17, 17, 25, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tc-art {
  height: 100px;
  position: relative;
  flex-shrink: 0;
}

.tc-art-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

.tc-track {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.5px;
}

.tc-artist {
  font-size: 10px;
  color: var(--text-dim);
}

.tc-body {
  padding: 10px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tc-meta {
  display: flex;
  gap: 6px;
}

.tc-meta-item {
  flex: 1;
  background: rgba(12, 12, 20, 0.6);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px;
  text-align: center;
}

.tc-meta-val {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
}

.tc-meta-label {
  font-size: 6px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tc-tag {
  font-size: 7px;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(78, 205, 196, 0.15);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.tc-trans {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  flex: 1;
  overflow-y: auto;
}

.tc-trans-title {
  font-size: 7px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.tc-pair {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(30, 30, 42, 0.5);
  cursor: pointer;
}

.tc-pair:active {
  background: rgba(78, 205, 196, 0.04);
}

.tc-pair-score {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  flex-shrink: 0;
  background: rgba(78, 205, 196, 0.1);
  color: var(--accent);
  border: 1px solid rgba(78, 205, 196, 0.2);
}

.tc-pair-info {
  flex: 1;
}

.tc-pair-name {
  font-size: 10px;
  color: var(--text);
  font-weight: 500;
}

.tc-pair-detail {
  font-size: 7px;
  color: var(--text-muted);
}

.tc-pair-type {
  font-size: 6px;
  padding: 2px 5px;
  border-radius: 3px;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tc-cta {
  margin-top: auto;
  padding: 10px;
  background: var(--accent);
  border-radius: 6px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--bg);
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  width: 100%;
}

/* ---------------------------------------------------------------------------
   Transition View (Zoom 4 — track-to-track transition detail)
   --------------------------------------------------------------------------- */
.transition-view {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 12px 12px;
}

.trans-pair {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.trans-card {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.trans-art {
  height: 50px;
  position: relative;
}

.trans-art.from {
  background: linear-gradient(135deg, #1a1a2e, #533483);
}

.trans-art.to {
  background: linear-gradient(135deg, #0d1117, #1e3a5f);
}

.trans-dir {
  position: absolute;
  top: 4px;
  left: 6px;
  font-size: 6px;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.trans-name {
  padding: 5px 8px 2px;
  font-size: 10px;
  color: #fff;
  font-weight: 500;
}

.trans-artist {
  padding: 0 8px 6px;
  font-size: 7px;
  color: var(--text-muted);
}

.trans-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 8px auto;
  box-shadow: 0 0 16px rgba(78, 205, 196, 0.1);
}

.trans-ring-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.trans-ring-label {
  font-size: 6px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.trans-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.trans-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--surface);
  border-radius: 4px;
}

.trans-key {
  font-size: 8px;
  color: var(--text-muted);
}

.trans-val {
  font-size: 8px;
  color: var(--text);
  font-weight: 500;
}

.trans-ont {
  padding: 8px 10px;
  background: var(--surface);
  border-radius: 4px;
}

.trans-ont-label {
  font-size: 6px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.trans-ont-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
  font-size: 7px;
}

.trans-ont-dim {
  color: var(--text-muted);
  width: 40px;
}

.trans-ont-val {
  padding: 2px 5px;
  border-radius: 3px;
}

.trans-ont-val.from {
  background: var(--accent-dim);
  color: var(--accent);
}

.trans-ont-val.shift {
  background: var(--warn-dim);
  color: var(--warn);
}

.trans-ont-match {
  color: var(--accent);
  font-weight: 700;
}

.trans-ont-diff {
  color: var(--warn);
}

/* TRANSISTOR slider */
.trans-slider {
  background: var(--surface);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: auto;
}

.trans-slider-label {
  font-size: 7px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 6px;
}

.trans-slider-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  position: relative;
}

.trans-slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--warn));
}

.trans-slider-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ---------------------------------------------------------------------------
   Highlight Animation (SEE GAPS cluster pulse)
   --------------------------------------------------------------------------- */
@keyframes cluster-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(78, 205, 196, 0); }
  50%       { box-shadow: 0 0 0 8px rgba(78, 205, 196, 0.2); }
}

.cluster-highlight {
  animation: cluster-pulse 2s ease-in-out 3;
}

/* ---------------------------------------------------------------------------
   Demo Banner (visible in demo mode — dodek-user-processed absent)
   --------------------------------------------------------------------------- */
.demo-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: rgba(78, 205, 196, 0.08);
  border-bottom: 1px solid rgba(78, 205, 196, 0.2);
  font-size: 0.75rem;
}
.demo-banner.hidden { display: none; }
.demo-banner-text { color: #9a9ab0; }
.demo-banner-cta {
  color: #4ecdc4;
  font-weight: 600;
  font-size: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  letter-spacing: 0.04em;
  font-family: var(--font);
}

/* ---------------------------------------------------------------------------
   Onboarding Sheet
   --------------------------------------------------------------------------- */
.onboarding-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: #12121c;
  border-radius: 16px 16px 0 0;
  border-top: 1px solid #1e1e2a;
  padding: 12px 16px 32px;
  transform: translateY(0);
  transition: transform 0.25s ease;
}
.onboarding-sheet.hidden {
  display: none;
}
.sheet-handle {
  width: 36px;
  height: 4px;
  background: #2a2a3a;
  border-radius: 2px;
  margin: 0 auto 16px;
}
.sheet-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}
.sheet-paths {
  display: flex;
  gap: 12px;
}
.sheet-path {
  flex: 1;
  border: 1px solid #1e1e2a;
  border-radius: 8px;
  padding: 16px;
}
.upload-path { border-color: rgba(255, 217, 61, 0.3); }
.connect-path.disabled { opacity: 0.4; }
.path-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #4ecdc4;
  margin-bottom: 4px;
}
.upload-path .path-label { color: #ffd93d; }
.path-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #d4d4d4;
  margin-bottom: 4px;
}
.path-desc {
  font-size: 0.72rem;
  color: #9a9ab0;
  margin-bottom: 12px;
  line-height: 1.4;
}
.path-file-btn {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #ffd93d;
  border: 1px solid rgba(255, 217, 61, 0.4);
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
  font-family: var(--font);
}
#library-upload { display: none; }
.sheet-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: #9a9ab0;
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  font-family: var(--font);
}
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(0, 0, 0, 0.5);
}
.sheet-backdrop.hidden { display: none; }
.sheet-status {
  margin-top: 12px;
  font-size: 0.75rem;
  color: #4ecdc4;
}

/* ---------------------------------------------------------------------------
   Set Builder Tray
   --------------------------------------------------------------------------- */
.set-builder-tray {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 70;
  background: rgba(12, 12, 20, 0.95);
  border-top: 1px solid #1e1e2a;
  padding: 0 16px;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tray-header {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
}
.tray-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #9a9ab0;
}
.tray-count {
  font-size: 0.65rem;
  color: #9a9ab0;
}
.tray-export-btn {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #4ecdc4;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--font);
}
.tray-export-btn:disabled {
  opacity: 0.3;
  cursor: default;
}
.tray-pairs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 8px;
  overflow-x: auto;
}
.tray-pair-item {
  font-size: 0.7rem;
  color: #d4d4d4;
  white-space: nowrap;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  padding: 3px 8px;
}
.tray-arrow {
  color: #4ecdc4;
}

/* LOCK PAIR button in transition view */
.trans-lock-btn {
  display: block;
  margin: 16px auto 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #4ecdc4;
  background: none;
  border: 1px solid rgba(78, 205, 196, 0.4);
  border-radius: 4px;
  padding: 8px 20px;
  cursor: pointer;
  font-family: var(--font);
}
.trans-lock-btn:hover {
  background: rgba(78, 205, 196, 0.08);
}

/* ---------------------------------------------------------------------------
   Rediscover pill + overlay
   --------------------------------------------------------------------------- */

/* Pill */
.rediscover-pill {
  position: fixed;
  bottom: 64px;
  right: 16px;
  z-index: 75;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(78, 205, 196, 0.12);
  border: 1px solid rgba(78, 205, 196, 0.3);
  border-radius: 20px;
  color: #4ecdc4;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  font-family: var(--font);
}
.pill-icon {
  font-size: 0.65rem;
}

/* Overlay */
.rediscover-overlay {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  background: #12121c;
  border-radius: 16px 16px 0 0;
  border-top: 1px solid #1e1e2a;
  padding: 20px 16px 36px;
  min-height: 200px;
}
.rediscover-overlay.hidden { display: none; }
.rd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.rd-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #4ecdc4;
}
.rd-close {
  background: none;
  border: none;
  color: #9a9ab0;
  font-size: 1rem;
  cursor: pointer;
  padding: 8px 10px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
}
.rd-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.rd-artist {
  font-size: 0.85rem;
  color: #9a9ab0;
  margin-bottom: 8px;
}
.rd-meta {
  font-size: 0.75rem;
  color: #4ecdc4;
  letter-spacing: 0.04em;
}
.rd-chain-controls {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.rd-next-btn, .rd-stop-btn {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font);
}
.rd-next-btn {
  background: rgba(78, 205, 196, 0.12);
  border: 1px solid rgba(78, 205, 196, 0.3);
  color: #4ecdc4;
}
.rd-stop-btn {
  background: none;
  border: 1px solid #1e1e2a;
  color: #aeaec0;
}

/* ---------------------------------------------------------------------------
   Mobile Browse Panel
   --------------------------------------------------------------------------- */
.browse-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 96px; /* above tray + mobile nav */
  z-index: 60;
  background: #0a0a12;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.browse-panel.hidden { display: none; }
.browse-search-row {
  position: sticky;
  top: 0;
  background: #0a0a12;
  padding: 12px 16px;
  z-index: 1;
}
.browse-search {
  width: 100%;
  background: #12121c;
  border: 1px solid #1e1e2a;
  border-radius: 6px;
  color: #d4d4d4;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-family: var(--font);
  box-sizing: border-box;
}
.browse-search::placeholder { color: #5a5a7a; }
.browse-search:focus { outline: 1px solid rgba(78,205,196,0.4); }
.browse-cluster-heading {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #4ecdc4;
  padding: 12px 16px 4px;
  text-transform: uppercase;
}
.browse-track-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 10px 16px;
  border-bottom: 1px solid #0e0e1a;
  text-align: left;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  cursor: pointer;
  font-family: var(--font);
  min-height: 44px;
}
.browse-track-item:active { background: rgba(255,255,255,0.03); }
.browse-track-title {
  font-size: 0.85rem;
  color: #d4d4d4;
  margin-bottom: 2px;
}
.browse-track-artist {
  font-size: 0.75rem;
  color: #9a9ab0;
}
.browse-track-label {
  font-size: 0.65rem;
  color: rgba(78,205,196,0.7);
  letter-spacing: 0.08em;
  margin-top: 2px;
}
.browse-empty {
  padding: 24px 16px;
  font-size: 0.8rem;
  color: #9a9ab0;
  text-align: center;
}

/* ---------------------------------------------------------------------------
   Mobile Bottom Nav
   --------------------------------------------------------------------------- */
.mobile-nav {
  position: fixed;
  bottom: 52px; /* above tray */
  left: 0;
  right: 0;
  z-index: 65;
  display: flex;
  background: #0c0c14;
  border-top: 1px solid #1e1e2a;
}
.mobile-nav.hidden { display: none; }
.nav-tab {
  flex: 1;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #9a9ab0;
  background: none;
  border: none;
  border-top: 2px solid transparent;
  padding: 10px 0;
  cursor: pointer;
  font-family: var(--font);
  min-height: 44px;
}
.nav-tab.active {
  color: #4ecdc4;
  border-top-color: #4ecdc4;
}

/* Only show mobile nav on small screens */
@media (min-width: 768px) {
  .mobile-nav { display: none !important; }
  .browse-panel { display: none !important; }
}

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