/* === EDITORIAL BRUTALIST === */
:root {
  --bg: #141414;
  --bg-raised: #1c1c1c;
  --bg-hover: #242424;
  --surface: #1e1e1e;
  --border: #2a2a2a;
  --border-light: #333;
  --text: #f0ece4;
  --text-secondary: #a09a8e;
  --text-muted: #5c5750;
  --accent: #e8764b;
  --accent-hover: #f0916a;
  --cyan: #5bb8d4;
  --green: #6abf69;
  --red: #d45b5b;
  --amber: #d4a85b;
  --font: 'Space Grotesk', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', monospace;
}

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

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

::selection { background: var(--accent); color: var(--bg); }

/* === Backgrounds === */
#bg-stars {
  position: fixed;
  inset: 0;
  z-index: -3;
  background: url('//unpkg.com/three-globe/example/img/night-sky.png') center/cover no-repeat;
  transition: opacity 0.6s ease;
}

#bg-art {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}

#bg-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,20,20,0.55) 0%, rgba(20,20,20,0.75) 100%);
}

/* === Nav === */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 56px;
  background: rgba(20, 20, 20, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-left { display: flex; align-items: center; gap: 32px; }
.nav-right { display: flex; align-items: center; gap: 8px; }

.logo {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon { flex-shrink: 0; }

.logo-accent { color: var(--accent); }

.nav-link {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover, .nav-link.active { color: var(--text); }

.search-form {
  display: flex;
  align-items: center;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.search-form:focus-within { border-color: var(--accent); }

#search-input {
  background: transparent;
  border: none;
  color: var(--text);
  padding: 8px 14px;
  font-family: var(--font);
  font-size: 13px;
  width: 200px;
  outline: none;
}

#search-input::placeholder { color: var(--text-muted); }

.search-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 14px;
  cursor: pointer;
  font-size: 16px;
  transition: color 0.2s;
}

.search-btn:hover { color: var(--accent); }

/* === Main === */
#app {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 32px;
  position: relative;
  z-index: 1;
}

/* === Footer === */
.site-footer {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.5px;
}

/* === Section Headers === */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* === Entity Links === */
.entity-link { color: var(--text-secondary); transition: color 0.2s; }
.entity-link:hover { color: var(--accent); }

/* === External Links === */
.ext-link {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 3px;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.15s;
  text-transform: uppercase;
}

.ext-link:hover { opacity: 0.8; }
.ext-link-bc { background: rgba(91, 184, 212, 0.15); color: var(--cyan); }
.ext-link-bc:hover { color: var(--cyan); background: rgba(91, 184, 212, 0.25); }
.ext-link-dc { background: rgba(240, 236, 228, 0.1); color: var(--text-secondary); }
.ext-link-dc:hover { color: var(--text); background: rgba(240, 236, 228, 0.15); }
.ext-links { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }

/* === Source Badges === */
.source-badge {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
  white-space: nowrap;
}

.source-badge.acoustid { background: rgba(106, 191, 105, 0.12); color: var(--green); }
.source-badge.shazam { background: rgba(91, 184, 212, 0.12); color: var(--cyan); }
.source-badge.acrcloud { background: rgba(232, 118, 75, 0.12); color: var(--accent); }
.source-badge.audd { background: rgba(212, 168, 91, 0.12); color: var(--amber); }
.source-badge.cache { background: rgba(240, 236, 228, 0.08); color: var(--text-secondary); }
.source-badge.user { background: rgba(232, 118, 75, 0.12); color: var(--accent); }

.label-badge {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 3px;
  background: rgba(240, 236, 228, 0.08);
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.label-badge:hover { background: rgba(240, 236, 228, 0.15); color: var(--text); }

/* === Cover Art === */
.cover-art, .cover-art-sm, .cover-art-lg {
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface);
  border-radius: 4px;
}

.cover-art { width: 40px; height: 40px; }
.cover-art-sm { width: 36px; height: 36px; }
.cover-art-lg { width: 64px; height: 64px; }

.cover-art-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 16px;
}

.cover-art-placeholder.cover-art-sm { font-size: 12px; }

/* === Station Logos === */
.station-logo {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 4px;
}

/* === Status Dots === */
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 4px;
}

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 6px rgba(106, 191, 105, 0.4);
  animation: pulse-soft 2.5s ease infinite;
}

.status-dot.offline { background: var(--red); opacity: 0.4; }

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.station-count { font-size: 12px; color: var(--text-muted); margin-left: 8px; font-weight: 400; }

/* === Genre Pills === */
.genre-pill {
  background: rgba(240, 236, 228, 0.06);
  color: var(--text-secondary);
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 3px;
  font-weight: 500;
}

/* === Filter Bar === */
.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-group { position: relative; }

.filter-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.filter-select {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
  font-family: var(--font);
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  min-width: 140px;
  max-width: 280px;
  transition: border-color 0.2s;
}

.filter-select:hover { border-color: var(--accent); }
.filter-value { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-arrow { color: var(--text-muted); font-size: 10px; flex-shrink: 0; }

.filter-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 0;
  min-width: 200px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.filter-dropdown.open { display: block; }

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}

.filter-option:hover { background: var(--bg-hover); color: var(--text); }
.filter-option input[type="checkbox"] { accent-color: var(--accent); cursor: pointer; }

.filter-clear, .filter-reset {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 11px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-clear { display: block; width: calc(100% - 12px); margin: 6px 6px 2px; }
.filter-clear:hover, .filter-reset:hover { border-color: var(--red); color: var(--red); }
.filter-reset { align-self: flex-end; }

/* === Globe === */
.station-globe-floating {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  height: 360px;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.5s ease, filter 0.5s ease;
}

#station-globe { width: 100%; height: 100%; cursor: grab; }
#station-globe canvas { pointer-events: auto; }
#station-globe:active { cursor: grabbing; }
.globe-spacer { height: 320px; pointer-events: none; }

/* Globe zoom buttons */
.globe-zoom-btns {
  position: absolute; bottom: 12px; right: 12px;
  display: flex; flex-direction: column; gap: 4px; z-index: 10;
}
.globe-zoom-btn {
  width: 32px; height: 32px; border-radius: 6px;
  background: rgba(20, 20, 20, 0.8); border: 1px solid var(--border);
  color: var(--text); font-size: 18px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.globe-zoom-btn:hover { background: rgba(232, 118, 75, 0.3); border-color: var(--accent); }

/* Globe tooltip */
.globe-tooltip {
  background: var(--bg-raised) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: 8px !important;
  color: var(--text) !important;
  padding: 12px 16px !important;
  font-family: var(--font) !important;
  font-size: 12px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
  pointer-events: none;
  max-width: 260px;
  line-height: 1.5;
}

.globe-tooltip .tooltip-name { font-size: 13px; font-weight: 600; color: var(--text); }
.globe-tooltip .tooltip-location { color: var(--text-secondary); font-size: 11px; margin-top: 3px; }
.globe-tooltip .tooltip-genres { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.globe-tooltip .tooltip-np { color: var(--green); font-size: 11px; margin-top: 8px; font-weight: 500; }

/* === Dashboard === */
.dashboard { display: flex; flex-direction: column; gap: 40px; }

/* === Ticker === */
.ticker-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.ticker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-raised);
  border-radius: 6px;
  font-size: 13px;
  transition: background 0.15s;
}

.ticker-item:hover { background: var(--bg-hover); }

.ticker-station {
  background: var(--accent);
  color: var(--bg);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

.ticker-track { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticker-artist { color: var(--text-secondary); }
.ticker-time { color: var(--text-muted); font-size: 11px; font-family: var(--mono); white-space: nowrap; flex-shrink: 0; }
.ticker-bandcamp { color: var(--cyan); font-size: 11px; flex-shrink: 0; }

/* === Station Cards === */
.stations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.station-card {
  background: var(--bg-raised);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.station-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.station-card.station-playing {
  border-color: var(--accent);
  background: rgba(232, 118, 75, 0.04);
}

.station-card.station-offline { opacity: 0.35; cursor: default; }
.station-card.station-offline:hover { opacity: 0.45; background: var(--bg-raised); border-color: transparent; transform: none; }

.station-name { font-size: 15px; font-weight: 600; color: var(--text); }
.station-location { font-size: 12px; color: var(--text-muted); }
.station-now-playing { font-size: 13px; line-height: 1.4; }
.station-np-title { font-weight: 500; color: var(--text); }
.station-np-artist { color: var(--text-secondary); }
.station-np-empty { color: var(--text-muted); font-size: 12px; }
.station-genres { display: flex; flex-wrap: wrap; gap: 6px; }

/* === Featured Station === */
.featured-station {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--bg-raised);
  border-radius: 10px;
  overflow: hidden;
  height: 420px;
  border: 1px solid var(--border);
}

.featured-station > * { min-height: 0; }

.featured-left {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.featured-video { width: 100%; flex: 1; background: #000; position: relative; }
.featured-video iframe { width: 100%; height: 100%; border: none; }
.featured-video .hls-video { width: 100%; height: 100%; object-fit: cover; background: #000; }
/* Listener bubbles */
.featured-listeners { min-height: 28px; padding: 6px 12px; }
.listener-bubbles { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.listener-bubble {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 600;
  cursor: pointer; position: relative;
  border: 2px solid var(--bg); transition: transform 0.1s;
}
.listener-bubble:hover { transform: scale(1.15); z-index: 2; }
.listener-you { position: absolute; bottom: -10px; font-size: 7px; color: var(--text-muted); white-space: nowrap; }
.listener-count { font-size: 11px; color: var(--text-muted); margin-left: 8px; }

/* Small listener bubbles on station cards */
.station-card-listeners { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 6px; }
.listener-bubble-sm {
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 9px; font-weight: 600;
  cursor: default; border: 1.5px solid var(--bg);
}

/* Listener hover card */
.listener-card {
  position: fixed; z-index: 200;
  transform: translate(-50%, -100%);
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  min-width: 160px; text-align: center;
}
.listener-card-name { font-weight: 600; font-size: 13px; }
.listener-card-name a { color: var(--text); text-decoration: none; }
.listener-card-name a:hover { text-decoration: underline; }
.listener-card-user { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.listener-card-btn {
  margin-top: 8px; background: var(--accent); color: #fff; border: none;
  padding: 5px 14px; border-radius: 4px; font-size: 11px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.listener-card-btn:hover { opacity: 0.88; }

/* Notification badge */
/* Digger now listening bar */
.digger-now-listening {
  display: flex; align-items: center; gap: 12px;
  background: var(--card-bg); border: 1px solid var(--border); border-left: 3px solid var(--green);
  border-radius: 8px; padding: 12px 16px; margin-top: 16px; cursor: pointer;
  transition: background 0.15s;
}
.digger-now-listening:hover { background: var(--bg-hover); }
.digger-nl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); flex-shrink: 0; animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.digger-nl-info { flex: 1; min-width: 0; }
.digger-nl-station { font-size: 12px; font-weight: 600; color: var(--text); }
.digger-nl-track { font-size: 12px; color: var(--text-secondary); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.digger-nl-play { background: var(--accent); color: #fff; border: none; padding: 6px 14px; border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; flex-shrink: 0; }
.digger-nl-play:hover { opacity: 0.88; }

.notif-badge {
  display: none; align-items: center; justify-content: center;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px;
  cursor: pointer; margin-right: -4px;
}

.castr-unmute-hint { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.7); color: var(--text-muted); font-size: 11px; padding: 4px 12px; border-radius: 4px; pointer-events: none; opacity: 0.8; }

.featured-no-video {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.featured-no-video .featured-bg-art {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(8px) brightness(0.3) saturate(1.2);
  z-index: 0;
}

.featured-no-video > *:not(.featured-bg-art) { position: relative; z-index: 1; }

.featured-icon { font-size: 40px; margin-bottom: 16px; opacity: 0.4; }
.featured-station-name { font-size: 20px; font-weight: 700; color: var(--text); }
.featured-station-location { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.show-name { color: var(--accent); font-weight: 500; font-style: italic; }

.featured-info {
  padding: 14px 20px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.featured-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.featured-info-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* === Play Button (inline in info bar) === */
.play-btn-inline {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(232, 118, 75, 0.3);
}

.play-btn-inline:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(232, 118, 75, 0.4);
  background: var(--accent-hover);
}

.play-btn-inline.playing {
  background: var(--accent);
  animation: pulse-playing 2s ease infinite;
}

@keyframes pulse-playing {
  0%, 100% { box-shadow: 0 2px 8px rgba(232, 118, 75, 0.3); }
  50% { box-shadow: 0 2px 20px rgba(232, 118, 75, 0.5); }
}

.play-btn-icon {
  font-size: 14px;
  line-height: 1;
  margin-left: 2px;
}

.play-btn-inline.playing .play-btn-icon {
  margin-left: 0;
  font-size: 11px;
  letter-spacing: 2px;
}

/* === Audio Bar (playing indicator) === */
.audio-bar {
  height: 3px;
  background: var(--border);
  overflow: hidden;
  margin-top: 8px;
}

.audio-bar-inner {
  height: 100%;
  width: 30%;
  background: var(--accent);
  animation: audio-bar-move 1.5s ease-in-out infinite;
}

@keyframes audio-bar-move {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(250%); }
  100% { transform: translateX(-100%); }
}

.featured-np { display: flex; align-items: center; gap: 10px; margin-top: 8px; }

.featured-np-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: pulse-soft 2.5s ease infinite;
}

.featured-np-track { font-size: 13px; font-weight: 500; color: var(--text); }
.featured-np-artist { color: var(--text-secondary); font-weight: 400; }
.featured-np-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.featured-right {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  min-height: 0;
  overflow: hidden;
}

.featured-right-header {
  padding: 14px 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.featured-history {
  flex: 1;
  overflow-y: scroll;
  list-style: none;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
}

.featured-history::-webkit-scrollbar { width: 5px; }
.featured-history::-webkit-scrollbar-track { background: transparent; }
.featured-history::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

.featured-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  cursor: pointer;
  gap: 10px;
  transition: background 0.15s;
}

.featured-history-item:hover { background: var(--bg-hover); }
.featured-history-title { font-weight: 500; color: var(--text); }
.featured-history-artist { color: var(--text-secondary); font-size: 12px; }
.featured-history-time { color: var(--text-muted); font-size: 11px; font-family: var(--mono); flex-shrink: 0; margin-left: 10px; }
.featured-history-empty { padding: 40px 20px; color: var(--text-muted); font-size: 12px; text-align: center; }

/* User identification form */
.user-identify-form {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.user-identify-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-weight: 600;
}

.user-identify-form form {
  display: flex;
  gap: 6px;
}

.user-identify-input {
  flex: 1;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  padding: 6px 10px;
  font-family: var(--font);
  font-size: 12px;
  outline: none;
  min-width: 0;
}

.user-identify-input:focus { border-color: var(--accent); }

.user-identify-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.user-identify-btn:hover { opacity: 0.88; }

.user-identify-status {
  font-size: 11px;
  margin-top: 6px;
  color: var(--text-muted);
}

.user-identify-status.success { color: var(--green); }
.user-identify-status.error { color: var(--red); }

.user-id-badge {
  font-size: 10px;
  color: var(--accent);
  background: rgba(232, 118, 75, 0.1);
  padding: 2px 6px;
  border-radius: 3px;
  text-decoration: none;
  white-space: nowrap;
}

.user-id-badge:hover { background: rgba(232, 118, 75, 0.2); color: var(--accent-hover); }

/* Missed detection items in track history */
.missed-item { cursor: default; }
.missed-item:hover { background: var(--bg-raised); }

.missed-icon {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px dashed var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.missed-form {
  display: flex;
  gap: 4px;
  align-items: center;
}

.missed-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  padding: 4px 8px;
  font-family: var(--font);
  font-size: 11px;
  outline: none;
  width: 90px;
}

.missed-input:focus { border-color: var(--accent); }

.missed-submit {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.missed-submit:hover { opacity: 0.85; }
.missed-error { font-size: 11px; color: var(--red); margin-top: 4px; }

.missed-preview {
  padding: 8px 0 4px;
}

.missed-preview-label {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}

.missed-preview-actions {
  display: flex;
  gap: 8px;
}

.missed-confirm {
  background: var(--green);
  border: none;
  color: var(--bg);
  padding: 6px 14px;
  border-radius: 4px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.missed-confirm:hover { opacity: 0.88; }

.missed-reject {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 4px;
  font-family: var(--font);
  font-size: 11px;
  cursor: pointer;
}

.missed-reject:hover { border-color: var(--red); color: var(--red); }

.missed-source-result {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  margin: 8px 0;
}

.missed-source-tag {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.missed-mb-info { padding: 8px 0; }

/* Candidate voting */
.candidates-container { margin-top: 8px; }

.candidate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 4px;
  gap: 10px;
}

.candidate-info { flex: 1; min-width: 0; }
.candidate-track { font-size: 12px; font-weight: 500; color: var(--text); }
.candidate-by { font-size: 10px; color: var(--text-muted); margin-left: 8px; }

.spotify-mini {
  font-size: 10px;
  color: #1db954;
  cursor: pointer;
  margin-left: 8px;
}
.spotify-mini:hover { text-decoration: underline; }

.candidate-votes {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.vote-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vote-up-btn:hover { border-color: var(--green); color: var(--green); }
.vote-down-btn:hover { border-color: var(--red); color: var(--red); }
.vote-up { font-size: 11px; color: var(--green); font-weight: 600; min-width: 14px; text-align: center; }
.vote-down { font-size: 11px; color: var(--red); font-weight: 600; min-width: 14px; text-align: center; }

.vote-pending {
  padding: 10px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 8px;
}
.vote-pending-title { font-size: 13px; font-weight: 500; }
.vote-counts { display: flex; gap: 12px; margin-top: 6px; }
.vote-pending-msg { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

.verify-badge {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

.verify-badge.verified { background: rgba(106, 191, 105, 0.15); color: var(--green); }
.verify-badge.unverified { background: rgba(212, 168, 91, 0.15); color: var(--amber); }

.source-badge.user-verified { background: rgba(106, 191, 105, 0.12); color: var(--green); }
.source-badge.user-unverified { background: rgba(212, 168, 91, 0.12); color: var(--amber); }

/* === Featured Tabs === */
.featured-tabs { display: flex; gap: 4px; flex-wrap: wrap; }

.featured-tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: 20px;
  font-family: var(--font);
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  font-weight: 500;
}

.featured-tab:hover { border-color: var(--accent); color: var(--accent); }
.featured-tab.active { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.featured-tab.tab-offline { opacity: 0.3; cursor: not-allowed; }
.featured-tab.tab-offline:hover { border-color: var(--border); color: var(--text-secondary); }

/* === Charts === */
.charts-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; }

.chart-table { width: 100%; border-collapse: collapse; }
.chart-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); padding: 10px 14px; border-bottom: 1px solid var(--border); font-weight: 600; }
.chart-table td { padding: 12px 14px; font-size: 13px; border-bottom: 1px solid var(--border); }
.chart-table tr { transition: background 0.1s; }
.chart-table tr:hover td { background: var(--bg-raised); }
.chart-rank { color: var(--text-muted); font-family: var(--mono); width: 40px; }
.chart-plays { color: var(--accent); font-family: var(--mono); text-align: right; font-weight: 500; }
.chart-stations { color: var(--text-muted); font-size: 12px; }

/* === Genre Bars === */
.genre-bars { display: flex; flex-direction: column; gap: 8px; }
.genre-bar-row { display: flex; align-items: center; gap: 10px; }
.genre-bar-label { font-size: 12px; color: var(--text-secondary); width: 110px; text-align: right; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.genre-bar-track { flex: 1; height: 6px; background: var(--surface); border-radius: 3px; overflow: hidden; }
.genre-bar-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.4s ease; }
.genre-bar-count { font-size: 11px; color: var(--text-muted); font-family: var(--mono); width: 28px; flex-shrink: 0; }

/* === Time Range Buttons === */
.time-range { display: flex; gap: 4px; }

.time-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 5px 14px;
  border-radius: 20px;
  font-family: var(--font);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
}

.time-btn:hover { border-color: var(--accent); color: var(--accent); }
.time-btn.active { background: var(--accent); border-color: var(--accent); color: var(--bg); }

/* === Detail Pages === */
.detail-header { margin-bottom: 28px; }
.detail-title { font-size: 28px; font-weight: 700; color: var(--text); letter-spacing: -0.5px; margin-bottom: 4px; }
.detail-subtitle { font-size: 16px; color: var(--text-secondary); }
.detail-meta { display: flex; gap: 20px; margin-top: 14px; flex-wrap: wrap; }
.detail-meta-item { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.detail-meta-item span, .detail-meta-item a { color: var(--text-secondary); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 28px; }

/* === Buttons === */
.bandcamp-btn, .discogs-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  transition: opacity 0.15s, transform 0.1s;
  letter-spacing: 0.3px;
}

.bandcamp-btn:hover, .discogs-btn:hover { color: #fff; opacity: 0.88; transform: translateY(-1px); }
.bandcamp-btn { background: var(--cyan); }
.discogs-btn { background: #444; }
.spotify-connect-btn { display: inline-block; background: #1DB954; color: #fff; font-size: 13px; font-weight: 600; padding: 10px 20px; border-radius: 24px; text-decoration: none; transition: opacity 0.15s; }
.spotify-connect-btn:hover { opacity: 0.88; }

/* === Track Hero === */
.track-hero { display: flex; gap: 32px; align-items: flex-start; }

.track-hero-art {
  width: 220px;
  height: 220px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
}

.track-hero-art img { width: 100%; height: 100%; object-fit: cover; }
.track-hero-art-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 64px; color: var(--text-muted); }
.track-hero-info { flex: 1; min-width: 0; }
.track-hero-buttons { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* === Track Source Cards === */
.track-sources { display: flex; flex-direction: column; gap: 12px; }

.track-source-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}

.track-source-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }

.track-source-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.track-source-name { font-size: 14px; font-weight: 600; color: var(--text); }
.track-source-art { width: 100%; max-width: 180px; border-radius: 6px; margin-bottom: 12px; }
.track-source-meta { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.track-source-link { display: block; font-size: 11px; color: var(--accent); margin-top: 8px; word-break: break-all; }

/* === Stats === */
.stats-row { display: flex; gap: 16px; margin-top: 16px; }

.stat-box {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 22px;
  text-align: center;
}

.stat-value { font-size: 24px; font-weight: 700; color: var(--accent); letter-spacing: -0.5px; }
.stat-label { font-size: 10px; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }

/* === History Table === */
.history-table { width: 100%; border-collapse: collapse; }
.history-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); padding: 8px 0; border-bottom: 1px solid var(--border); font-weight: 600; }
.history-table td { padding: 10px 0; font-size: 13px; border-bottom: 1px solid var(--border); color: var(--text-secondary); }

/* === Search === */
.search-results { display: flex; flex-direction: column; gap: 2px; }

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-raised);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.search-result-item:hover { background: var(--bg-hover); }
.search-result-info { min-width: 0; }
.search-result-title { font-weight: 500; font-size: 14px; }
.search-result-artist { color: var(--text-secondary); font-size: 12px; }
.search-result-plays { color: var(--text-muted); font-size: 11px; font-family: var(--mono); flex-shrink: 0; }

/* === Entity Pages === */
.entity-hero { display: flex; gap: 32px; align-items: flex-start; }

.entity-hero-img {
  width: 180px;
  height: 180px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.3);
}

.entity-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.entity-hero-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 56px; color: var(--text-muted); }
.entity-hero-info { flex: 1; min-width: 0; }
.entity-type { font-size: 10px; text-transform: uppercase; letter-spacing: 2px; color: var(--accent); font-weight: 600; margin-bottom: 6px; }

.entity-bio {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-height: 120px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
}

.entity-links { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.entity-tracks { display: flex; flex-direction: column; gap: 2px; }

.entity-track-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-raised);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.entity-track-item:hover { background: var(--bg-hover); }
.entity-track-info { flex: 1; min-width: 0; }
.entity-track-title { font-weight: 500; font-size: 13px; }
.entity-track-sub { font-size: 11px; color: var(--text-secondary); }

/* === Dig Game === */
.dig-page { max-width: 700px; margin: 0 auto; }
.dig-header { margin-bottom: 24px; }

.dig-arena { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 32px; min-height: 300px; display: flex; align-items: center; justify-content: center; }

.dig-start-screen, .dig-empty { text-align: center; }
.dig-start-icon { font-size: 48px; margin-bottom: 16px; }
.dig-start-btn { background: var(--accent); color: #fff; border: none; padding: 12px 32px; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; transition: opacity 0.15s; }
.dig-start-btn:hover { opacity: 0.88; }

.dig-challenge { width: 100%; }
.dig-top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.dig-stats-mini { display: flex; align-items: center; gap: 12px; }
.dig-rank-badge { background: rgba(232, 118, 75, 0.15); color: var(--accent); padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.dig-xp-display { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.dig-streak-display { font-size: 13px; color: var(--accent); }
.dig-timer { font-size: 24px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }

.dig-player { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.dig-play-btn { background: var(--accent); color: #fff; border: none; padding: 10px 18px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; min-width: 120px; }
.dig-waveform { flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.dig-progress { height: 100%; background: var(--accent); border-radius: 3px; width: 0; transition: width 0.2s; }

.dig-hints { display: flex; gap: 8px; margin-bottom: 12px; }
.dig-hint-btn { background: transparent; border: 1px solid var(--border); color: var(--text-muted); padding: 6px 14px; border-radius: 6px; font-size: 11px; cursor: pointer; font-family: inherit; transition: all 0.15s; }
.dig-hint-btn:hover { border-color: var(--accent); color: var(--accent); }
.dig-hint-display { margin-bottom: 16px; }
.dig-hint-item { font-size: 12px; color: var(--text-secondary); padding: 6px 0; border-bottom: 1px solid var(--border); }

.dig-answer { display: flex; flex-direction: column; gap: 10px; }
.dig-input { background: var(--bg); border: 1px solid var(--border); color: var(--text); padding: 12px 16px; border-radius: 8px; font-size: 14px; font-family: inherit; }
.dig-input:focus { border-color: var(--accent); outline: none; }
.dig-answer-actions { display: flex; gap: 10px; }
.dig-submit-btn { flex: 1; background: var(--accent); color: #fff; border: none; padding: 12px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; }
.dig-submit-btn:hover { opacity: 0.88; }
.dig-skip-btn { background: transparent; border: 1px solid var(--border); color: var(--text-muted); padding: 12px 20px; border-radius: 8px; font-size: 13px; cursor: pointer; font-family: inherit; }
.dig-skip-btn:hover { border-color: var(--red); color: var(--red); }

.dig-loading { text-align: center; color: var(--text-muted); font-size: 14px; }

.dig-result { text-align: center; width: 100%; }
.dig-result-icon { font-size: 48px; margin-bottom: 8px; }
.dig-result-correct .dig-result-icon { color: var(--green); }
.dig-result-track { color: var(--text-secondary); font-size: 14px; margin: 8px 0 20px; }
.dig-points-big { font-size: 36px; font-weight: 700; color: var(--accent); }
.dig-points-breakdown { display: flex; gap: 12px; justify-content: center; margin-top: 8px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }
.dig-first-badge { color: var(--accent); font-weight: 600; }
.dig-result-stats { display: flex; gap: 16px; justify-content: center; align-items: center; margin-top: 16px; font-size: 13px; color: var(--text-secondary); }
.dig-next-rank { margin-top: 12px; font-size: 12px; color: var(--text-muted); }

.dig-leaderboard { display: flex; flex-direction: column; gap: 2px; }
.dig-lb-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--card-bg); border-radius: 6px; }
.dig-lb-rank { font-size: 14px; font-weight: 700; color: var(--accent); min-width: 24px; }
.dig-lb-name { font-weight: 500; flex: 1; }
.dig-lb-name a { color: var(--text); text-decoration: none; }
.dig-lb-name a:hover { text-decoration: underline; }
.dig-lb-badge { font-size: 10px; background: rgba(232, 118, 75, 0.12); color: var(--accent); padding: 2px 8px; border-radius: 3px; }
.dig-lb-xp { font-size: 13px; font-weight: 600; color: var(--accent); min-width: 80px; text-align: right; }
.dig-lb-stat { font-size: 11px; color: var(--text-muted); }

/* XP bar for profiles */
.xp-bar-wrap { margin-top: 8px; }
.xp-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.xp-bar-fill { height: 100%; background: var(--accent); border-radius: 3px; }
.xp-bar-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-top: 4px; }

@media (max-width: 768px) {
  .dig-arena { padding: 20px; }
  .dig-hints { flex-wrap: wrap; }
  .dig-top-bar { flex-direction: column; gap: 8px; align-items: flex-start; }
}

/* Album track styles */
.album-track-pos { font-size: 12px; color: var(--text-muted); font-weight: 500; min-width: 24px; text-align: right; flex-shrink: 0; }
.album-track-metadata { opacity: 0.5; }
.album-track-metadata:hover { background: transparent; }
.album-mono { filter: grayscale(1); }
.album-mono .entity-track-title { color: var(--text-muted); }
.album-mono .entity-track-sub { color: var(--text-muted); }
.album-metadata-badge { font-size: 9px; color: var(--text-muted); border: 1px solid var(--border); padding: 2px 6px; border-radius: 3px; flex-shrink: 0; white-space: nowrap; }

/* === Animations === */
@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-8px); max-height: 0; }
  20% { max-height: 80px; }
  to { opacity: 1; transform: translateY(0); max-height: 80px; }
}

@keyframes cardFlash {
  0% { border-color: var(--accent); box-shadow: 0 0 16px rgba(232, 118, 75, 0.15); }
  100% { border-color: transparent; box-shadow: none; }
}

@keyframes npSwap {
  0% { opacity: 0; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}

.ticker-item.new-item { animation: slideInDown 0.35s ease-out; overflow: hidden; border-left: 3px solid var(--accent); }
.featured-history-item.new-item { animation: slideInDown 0.35s ease-out; overflow: hidden; border-left: 3px solid var(--accent); }
.station-card.updated { animation: cardFlash 1.5s ease-out; }
.station-card.updated .station-now-playing { animation: npSwap 0.3s ease-out; }
.featured-np.updated { animation: npSwap 0.3s ease-out; }

/* === Loading / Empty === */
.loading { text-align: center; padding: 60px; color: var(--text-muted); font-size: 13px; }
.empty-state { text-align: center; padding: 60px; color: var(--text-muted); font-size: 13px; }

/* === Back Link === */
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; transition: color 0.15s; }
.back-link:hover { color: var(--text); }

/* === Now Playing Card === */
.now-playing-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
}

.now-playing-label { font-size: 10px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted); margin-bottom: 12px; font-weight: 600; }
.now-playing-title { font-size: 22px; font-weight: 600; color: var(--text); }
.now-playing-artist { font-size: 15px; color: var(--text-secondary); margin-top: 4px; }

/* === Now Playing Bar === */
.now-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 114px;
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 200;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.3s ease, height 0.35s ease, padding 0.35s ease;
}

.now-bar.visible { transform: translateY(0); }

.now-bar.visible:hover:not(.collapse-lock) {
  height: 40vh;
  padding: 24px 48px;
  overflow-y: auto;
}

.now-bar.expanded {
  height: 85vh;
  padding: 32px 48px;
  overflow-y: auto;
}

.now-bar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  transition: gap 0.35s ease;
}

.now-bar.visible:hover:not(.collapse-lock) .now-bar-inner, .now-bar.expanded .now-bar-inner { gap: 28px; }

.now-bar-art {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
  background: var(--surface);
  transition: all 0.35s ease;
}

.now-bar.visible:hover:not(.collapse-lock) .now-bar-art {
  width: 140px;
  height: 140px;
  border-radius: 8px;
  font-size: 48px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.now-bar.expanded .now-bar-art {
  width: 280px;
  height: 280px;
  border-radius: 8px;
  font-size: 64px;
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.4);
}

.now-bar-art img { width: 100%; height: 100%; object-fit: cover; }

.now-bar-text { flex: 1; min-width: 0; overflow: hidden; display: flex; flex-direction: column; gap: 2px; transition: gap 0.35s ease; }
.now-bar.visible:hover:not(.collapse-lock) .now-bar-text, .now-bar.expanded .now-bar-text { gap: 8px; }

.now-bar-station { font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; transition: all 0.35s ease; }
.now-bar.visible:hover:not(.collapse-lock) .now-bar-station, .now-bar.expanded .now-bar-station { font-size: 12px; color: var(--text-secondary); }

.now-bar-track { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: all 0.35s ease; }
.now-bar.visible:hover:not(.collapse-lock) .now-bar-track, .now-bar.expanded .now-bar-track { font-size: 26px; font-weight: 700; white-space: normal; overflow: visible; line-height: 1.2; letter-spacing: -0.5px; }

.now-bar-track span { color: var(--text-secondary); font-weight: 400; }
.now-bar.visible:hover:not(.collapse-lock) .now-bar-track span, .now-bar.expanded .now-bar-track span { display: block; font-size: 18px; margin-top: 4px; }

.now-bar-meta {
  display: none;
  font-size: 12px;
  color: var(--text-muted);
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}

.now-bar.expanded .now-bar-meta {
  display: flex;
}

.now-bar-source { flex-shrink: 0; transition: transform 0.35s ease; }
.now-bar.visible:hover:not(.collapse-lock) .now-bar-source, .now-bar.expanded .now-bar-source { transform: scale(1.2); }

.now-bar-controls { display: flex; align-items: center; gap: 12px; flex-shrink: 0; margin-left: 20px; transition: margin-left 0.35s ease; }
.now-bar.visible:hover:not(.collapse-lock) .now-bar-controls, .now-bar.expanded .now-bar-controls { margin-left: 28px; }

.now-bar-play {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.35s ease;
}

.now-bar.visible:hover:not(.collapse-lock) .now-bar-play, .now-bar.expanded .now-bar-play { width: 64px; height: 64px; font-size: 20px; border-width: 3px; }
.now-bar-play:hover { background: var(--accent); color: var(--bg); }
.now-bar-play.playing { background: var(--accent); color: var(--bg); }

.now-bar-slide-out { animation: slideOutLeft 0.3s ease forwards; }
.now-bar-slide-in { animation: slideInRight 0.3s ease forwards; }

@keyframes slideOutLeft {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-50px); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

body.now-bar-active { padding-bottom: calc(114px + env(safe-area-inset-bottom, 0px)); }
body.now-bar-active .site-footer { margin-bottom: calc(114px + env(safe-area-inset-bottom, 0px)); }

/* iOS safe areas */
.top-nav { padding-top: env(safe-area-inset-top, 0px); }
.now-bar { padding-bottom: env(safe-area-inset-bottom, 0px); }

/* === Nav Auth === */
#nav-auth { display: flex; align-items: center; gap: 16px; margin-left: 16px; }

.nav-user { font-weight: 600; color: var(--text) !important; }

.nav-logout-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 4px;
  font-family: var(--font);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}
.nav-logout-btn:hover { border-color: var(--red); color: var(--red); }

/* === Auth Pages === */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 60px;
}

.auth-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 28px;
  letter-spacing: -0.5px;
}

.auth-form { display: flex; flex-direction: column; gap: 6px; }

.auth-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 10px;
}

.auth-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.auth-input:focus { border-color: var(--accent); }

.auth-submit {
  margin-top: 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.auth-submit:hover { background: var(--accent-hover); }

.auth-error { color: var(--red); font-size: 12px; min-height: 18px; margin-top: 6px; }

.auth-footer { margin-top: 20px; font-size: 12px; color: var(--text-muted); text-align: center; }

.auth-location-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 8px;
}
.auth-location-btn:hover { border-color: var(--accent); color: var(--accent); }

/* City search dropdown */
.city-search-wrap { position: relative; }
.city-results { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; margin-top: 4px; z-index: 50; max-height: 200px; overflow-y: auto; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }
.city-results:empty { display: none; }
.city-result { padding: 10px 14px; font-size: 13px; color: var(--text-secondary); cursor: pointer; transition: background 0.1s; }
.city-result:hover { background: var(--bg-hover); color: var(--text); }
.city-no-results { color: var(--text-muted); cursor: default; }

.auth-location-status { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* === Wishlist Button === */
.wishlist-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  flex-shrink: 0;
  transition: color 0.15s, transform 0.15s;
  line-height: 1;
}
.wishlist-btn:hover { color: var(--red); transform: scale(1.15); }
.wishlist-btn.wishlisted { color: var(--red); }

.wishlist-btn-lg {
  font-size: 20px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wishlist-btn-lg:hover { border-color: var(--red); }

/* === Spotify Embed === */
.spotify-embed {
  margin-top: 12px;
  border-radius: 8px;
  overflow: hidden;
}
.spotify-embed iframe { border-radius: 8px; display: block; }

.spotify-expand-btn {
  background: rgba(30, 215, 96, 0.12);
  border: none;
  color: #1db954;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  cursor: pointer;
  flex-shrink: 0;
  letter-spacing: 0.3px;
  transition: background 0.15s;
}
.spotify-expand-btn:hover { background: rgba(30, 215, 96, 0.22); }

/* === Toast === */
.toast {
  position: fixed;
  bottom: 140px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--accent);
  color: #fff;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  z-index: 300;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* === Library === */
.library-list { display: flex; flex-direction: column; gap: 2px; }

.library-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-raised);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.library-item:hover { background: var(--bg-hover); }

.library-item-info { flex: 1; min-width: 0; }
.library-item-title { font-weight: 500; font-size: 13px; }
.library-item-artist { font-size: 12px; color: var(--text-secondary); }

.library-remove-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 4px 8px;
  flex-shrink: 0;
  transition: color 0.15s;
}
.library-remove-btn:hover { color: var(--red); }

/* === Neighborhood === */
.neighborhood-feed { display: flex; flex-direction: column; gap: 2px; }

.neighborhood-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-raised);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.neighborhood-item:hover { background: var(--bg-hover); }

.neighborhood-item-info { flex: 1; min-width: 0; }
.neighborhood-item-title { font-weight: 500; font-size: 13px; }
.neighborhood-item-artist { font-size: 12px; color: var(--text-secondary); }
.neighborhood-item-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* === Profile === */
.profile-page { max-width: 640px; }
.profile-header { margin-bottom: 8px; }

.invite-list { display: flex; flex-direction: column; gap: 6px; }

.invite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-raised);
  border-radius: 6px;
}

.invite-code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  letter-spacing: 0.5px;
}

.invite-used { font-size: 11px; color: var(--text-muted); }

.invite-copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: 4px;
  font-family: var(--font);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}
.invite-copy-btn:hover { border-color: var(--accent); color: var(--accent); }

/* === Responsive === */
/* === Krates === */
.krate-create-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 8px 18px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.krate-create-btn:hover { opacity: 0.85; }

.krate-form {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.krate-form-actions { display: flex; gap: 8px; }

.krate-save-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 8px 18px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.krate-cancel-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
}

.krate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.krate-card {
  background: var(--bg-raised);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.krate-card:hover { transform: translateY(-2px); background: var(--bg-hover); }

.krate-card-cover {
  width: 100%;
  aspect-ratio: 1;
  background: var(--surface);
  overflow: hidden;
}

.krate-card-cover img { width: 100%; height: 100%; object-fit: cover; }

.krate-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--text-muted);
}

.krate-card-info { padding: 12px; }
.krate-card-name { font-size: 14px; font-weight: 600; }
.krate-card-name a:hover { text-decoration: underline; }
.krate-card-count { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.krate-add-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.krate-add-btn:hover { border-color: var(--accent); color: var(--accent); }

.krate-add-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
}

.krate-add-modal-inner {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  min-width: 280px;
  max-width: 400px;
}

.krate-add-modal-inner h3 { font-size: 16px; margin-bottom: 16px; }

.krate-add-option {
  display: block;
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 10px 14px;
  margin-bottom: 6px;
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: all 0.1s;
}

.krate-add-option:hover { border-color: var(--accent); background: var(--bg-hover); }

/* Krate detail */
.krate-hero {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.krate-hero-cover {
  width: 200px;
  height: 200px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
  position: relative;
}

.krate-hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.krate-hero-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 64px; color: var(--text-muted); }

.krate-cover-upload {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s;
}

.krate-cover-upload:hover { background: var(--accent); }
.krate-hero-info { flex: 1; min-width: 0; }

.krate-delete-btn {
  background: transparent;
  border: 1px solid var(--red);
  color: var(--red);
  padding: 6px 14px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 11px;
  cursor: pointer;
  margin-top: 12px;
}

.krate-delete-btn:hover { background: var(--red); color: var(--bg); }

.krate-hero-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

.krate-play-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 10px 22px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.krate-play-btn:hover { opacity: 0.85; }

.krate-spotify-btn {
  background: #1db954;
  color: #fff;
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
}

.krate-spotify-btn:hover { color: #fff; opacity: 0.85; }

.krate-track-num {
  font-size: 12px;
  color: var(--text-muted);
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  font-family: var(--mono);
}

.krate-track-play {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
  transition: all 0.15s;
}

.krate-track-play:hover { border-color: var(--accent); color: var(--accent); }
.library-item.krate-active { background: var(--bg-hover); border-left: 3px solid var(--accent); }

.krate-player {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 16px;
}

.krate-player-inner { padding: 0; }
.krate-player-inner iframe { border-radius: 0; display: block; }

.krate-player-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
}

.krate-player-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 4px;
  font-family: var(--font);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}

.krate-player-btn:hover { border-color: var(--accent); color: var(--accent); }

.krate-player-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.krate-player-track { font-size: 11px; color: var(--text-muted); font-family: var(--mono); }
.krate-player-countdown { font-size: 11px; color: var(--text-secondary); }

.krate-autoplay-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-muted);
  cursor: pointer;
}

.krate-autoplay-toggle input { accent-color: var(--accent); cursor: pointer; }

/* Korner track labels */
.korner-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(232, 118, 75, 0.15);
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  cursor: help;
  flex-shrink: 0;
  white-space: nowrap;
}
.korner-tag-icon { font-size: 8px; }
.korner-tag-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 400;
  padding: 10px 14px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  line-height: 1.6;
}
.korner-tag-tooltip a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 500;
}
.korner-tag:hover .korner-tag-tooltip { display: block; }

/* Korner lifecycle labels */
.korner-label { letter-spacing: 0.3px; }
.korner-label--just-arrived { color: #4ade80; }
.korner-label--fresh-on-the-block { color: #60a5fa; }
.korner-label--back-again { color: #a78bfa; }
.korner-label--gone-with-the-wind { color: #fbbf24; }
.korner-label--no-longer-here { color: #f87171; }
.korner-label--rip { color: #6b7280; }

/* Override tag background per state */
.korner-tag:has(.korner-label--just-arrived) { background: rgba(74, 222, 128, 0.12); }
.korner-tag:has(.korner-label--fresh-on-the-block) { background: rgba(96, 165, 250, 0.12); }
.korner-tag:has(.korner-label--back-again) { background: rgba(167, 139, 250, 0.12); }
.korner-tag:has(.korner-label--gone-with-the-wind) { background: rgba(251, 191, 36, 0.12); }
.korner-tag:has(.korner-label--no-longer-here) { background: rgba(248, 113, 113, 0.12); }
.korner-tag:has(.korner-label--rip) { background: rgba(107, 114, 128, 0.12); }

/* Korner locked (outside perimeter) */
.library-item.korner-locked {
  cursor: default;
  opacity: 0.7;
}
.library-item.korner-locked .cover-art,
.korner-blurred {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}
.library-item.korner-locked .korner-tag {
  background: rgba(232, 118, 75, 0.25);
}

/* Inline track actions (heart + krate) */
.track-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  position: relative;
}

.krate-inline-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.krate-inline-btn:hover { border-color: var(--accent); color: var(--accent); }

.krate-dropdown {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 6px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 0;
  min-width: 180px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 60;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.krate-dropdown-loading, .krate-dropdown-empty {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.krate-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 8px 14px;
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}

.krate-dropdown-item:hover { background: var(--bg-hover); }
.krate-dropdown-item:disabled { color: var(--green); cursor: default; }

/* === Korner map === */
.korner-map-container {
  width: 100%;
  height: 220px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 32px;
  border: 1px solid var(--border);
  position: relative;
}

#korner-map {
  width: 100%;
  height: 100%;
  background: var(--bg);
}

/* Dark map tooltip */
.leaflet-tooltip {
  background: var(--bg-raised) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  color: var(--text) !important;
  font-family: var(--font) !important;
  font-size: 11px !important;
  padding: 4px 10px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

.leaflet-tooltip-top:before { border-top-color: var(--border) !important; }

/* === Korner genre cards === */
.korner-track-card {
  flex-shrink: 0;
  width: 130px;
  cursor: pointer;
  transition: transform 0.15s;
}

.korner-track-card:hover { transform: translateY(-2px); }

.korner-track-art {
  width: 130px;
  height: 130px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 6px;
}

.korner-track-art img { width: 100%; height: 100%; object-fit: cover; }
.korner-track-title { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.korner-track-artist { font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* === Friends / Social === */
.friend-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 6px 16px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.friend-btn:hover { opacity: 0.85; }

.friend-remove-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 11px;
  cursor: pointer;
  margin-left: 6px;
}

.friend-remove-btn:hover { border-color: var(--red); color: var(--red); }

.friend-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 500;
}

.friend-badge.accepted { background: rgba(106, 191, 105, 0.12); color: var(--green); }
.friend-badge.pending { background: rgba(212, 168, 91, 0.12); color: var(--amber); }

.digger-search-wrap { position: relative; }

.digger-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 4px;
  z-index: 50;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.digger-search-results:empty { display: none; }

.digger-search-item {
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.1s;
}

.digger-search-item:hover { background: var(--bg-hover); }

@media (max-width: 768px) {
  .track-hero, .entity-hero { flex-direction: column; gap: 20px; }
  .track-hero-art, .entity-hero-img { width: 160px; height: 160px; }
  .featured-station { grid-template-columns: 1fr; height: auto; max-height: 700px; }
  .featured-right { border-left: none; border-top: 1px solid var(--border); max-height: 250px; }
  .charts-layout { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .stations-grid { grid-template-columns: 1fr; }
  .top-nav { padding: calc(env(safe-area-inset-top, 12px) + 8px) 16px 8px; gap: 12px; flex-wrap: wrap; height: auto; min-height: 56px; }
  .nav-left { gap: 16px; }
  .nav-right { gap: 8px; flex-wrap: wrap; }
  #nav-auth { gap: 8px; margin-left: 8px; }
  #search-input { width: 120px; }
  #app { padding: 16px; }
  .auth-card { padding: 24px; }
  .stats-row { flex-wrap: wrap; }
  .detail-title { font-size: 22px; }

  /* Globe smaller on mobile */
  .station-globe-floating { height: 280px; }
  .globe-spacer { height: 260px; }

  /* Now-bar mobile: expanded = fullscreen, clean vertical layout */
  .now-bar.expanded {
    height: 100vh;
    height: 100dvh;
    padding: 24px;
    flex-direction: column;
    align-items: stretch;
    overflow-y: auto;
  }

  .now-bar.expanded .now-bar-inner {
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 0;
    padding: 0;
  }

  /* Cover art: large, clean, no blur */
  .now-bar.expanded .now-bar-art {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    margin-bottom: 24px;
  }

  .now-bar.expanded .now-bar-art img {
    filter: none;
    transform: none;
  }

  /* Text: left-aligned, stacked below art */
  .now-bar.expanded .now-bar-text {
    width: 100%;
    max-width: 320px;
    gap: 8px;
  }

  .now-bar.expanded .now-bar-station {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 2px;
    white-space: normal;
  }

  .now-bar.expanded .now-bar-track {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    white-space: normal;
  }

  .now-bar.expanded .now-bar-track span {
    display: block;
    font-size: 15px;
    margin-top: 4px;
    font-weight: 400;
    color: var(--text-secondary);
  }

  .now-bar.expanded .now-bar-source {
    margin-top: 12px;
    align-self: flex-start;
    max-width: 320px;
    width: 100%;
  }

  .now-bar.expanded .now-bar-controls {
    margin: 24px 0 0 0;
    justify-content: center;
  }

  .now-bar.expanded .now-bar-play {
    width: 64px;
    height: 64px;
    font-size: 22px;
    border-width: 3px;
  }

  /* Close button */
  .now-bar-close { display: none; }

  .now-bar.expanded .now-bar-close {
    display: flex;
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
  }
}
