/* DMB Oracle — SiriusXM Archive · styles v2.3 (v=65 — adds live video panel) */

/* ─── Variables ───────────────────────────────────────────────────────────── */
:root {
  --bg: #0A0A0F;
  --bg2: #0D0F16;
  --panel: #12141C;
  --panel-hi: #1A1D28;
  --border: rgba(0,181,226,0.1);
  --border-hi: rgba(0,181,226,0.35);
  --blue: #00B5E2;
  --blue-dim: rgba(0,181,226,0.15);
  --blue-glow: rgba(0,181,226,0.25);
  --white: #F0F4FF;
  --text: #D8E0F0;
  --text-dim: #A0B4CC;
  --text-muted: #8899BB;
  --red: #FF3B5C;
  --red-dim: rgba(255,59,92,0.15);
  --amber: #FFB020;
  --amber-dim: rgba(255,176,32,0.15);
  --green: #00E676;
  --green-dim: rgba(0,230,118,0.12);
  --gold: #00B5E2;
  --gold-faint: rgba(0,181,226,0.08);
  --gold-mid: rgba(0,181,226,0.25);
  --r: 10px;
  --r-sm: 6px;
  --sidebar-w: 210px;
  --player-h: 64px;
  --nav-h: 54px;
}

/* ─── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* overflow-x:hidden on both html+body prevents the iOS Safari bug where
   body-level overflow turns body into a scroll container, misplacing fixed
   elements (tabnav, player-bar) relative to body scroll instead of viewport */
html { height: 100%; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100%;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0,60,100,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(60,0,100,0.1) 0%, transparent 50%);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

/* ─── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,181,226,0.2); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,181,226,0.4); }

/* ─── Utilities ───────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.empty { font-size: 13px; color: var(--text-muted); padding: 20px 0; text-align: center; }
.spinning { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.7; } }
@keyframes ping { 75%, 100% { transform: scale(2.2); opacity: 0; } }

/* ─── Topnav (mobile-only) ────────────────────────────────────────────────── */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: #0A0C12;
  border-bottom: 1px solid var(--border);
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  z-index: 50;
}
.topnav-brand { display: flex; align-items: center; gap: 8px; }
.brand-glyph { font-size: 18px; color: var(--blue); }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 14px; font-weight: 900; letter-spacing: 0.08em; color: var(--white); text-transform: uppercase; }
.brand-sub { font-size: 9px; letter-spacing: 0.15em; color: var(--blue); text-transform: uppercase; }
.topnav-status { display: flex; align-items: center; gap: 6px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); }
.live-label { font-size: 11px; color: var(--text-muted); }
.topnav-end { display: flex; align-items: center; }
.icon-btn { background: none; border: 1px solid var(--border); color: var(--text-dim); width: 32px; height: 32px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 16px; transition: all 0.15s; }
.icon-btn:hover { border-color: var(--border-hi); color: var(--text); }

/* ─── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: #0A0C12;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 40;
}
.sidebar-brand {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.sidebar-logo-img {
  width: 100%;
  max-width: 160px;
  height: auto;
  object-fit: contain;
  display: block;
}
.sidebar-sxm-img {
  height: 16px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.55;
}
.sidenav { flex: 1; overflow-y: auto; padding: 8px 0; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 10px 16px; color: var(--text-dim); font-size: 13px; font-weight: 500; border-left: 3px solid transparent; text-decoration: none; transition: all 0.15s; cursor: pointer; }
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.nav-link.active { color: var(--blue); border-left-color: var(--blue); background: var(--blue-dim); font-weight: 600; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-label { flex: 1; }
.nav-badge { margin-left: auto; background: var(--blue-dim); color: var(--blue); font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px; }
.nav-badge.gold { background: var(--amber-dim); color: var(--amber); }
.live-nav-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red); margin-left: 6px; animation: ping 1.2s ease infinite; vertical-align: middle; }
.sidebar-footer { padding: 12px 16px; border-top: 1px solid var(--border); font-size: 10px; color: var(--text-muted); letter-spacing: 0.1em; flex-shrink: 0; }
.sf-row { display: flex; justify-content: space-between; align-items: center; padding: 3px 0; }
.sf-label { color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.sf-value { color: var(--text-dim); font-size: 10px; }

/* ─── Main ────────────────────────────────────────────────────────────────── */
.main {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  bottom: var(--player-h);
  overflow-y: auto;
  z-index: 1;
}

/* ─── View chrome ─────────────────────────────────────────────────────────── */
.view-header { padding: 28px 28px 0; margin-bottom: 24px; }
.view-title { font-size: 26px; font-weight: 800; color: var(--white); letter-spacing: -0.02em; }
.view-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ─── Panels ──────────────────────────────────────────────────────────────── */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); transition: border-color 0.2s, box-shadow 0.2s; }
.panel:hover { border-color: var(--border-hi); box-shadow: 0 0 20px var(--blue-glow); }
.panel-hd { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; border-bottom: 1px solid var(--border); }
.panel-title { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.panel-sub { font-size: 11px; color: var(--text-muted); }
.panel-more { font-size: 11px; color: var(--blue); letter-spacing: 0.05em; }
.panel-more:hover { text-decoration: underline; }
.panel-bd { padding: 16px 18px; }

/* ─── Stats ───────────────────────────────────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 0 28px; margin-bottom: 20px; }
.stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 16px; display: flex; align-items: center; gap: 14px; transition: all 0.2s; }
.stat-card:hover { border-color: var(--border-hi); box-shadow: 0 0 16px var(--blue-glow); }
.stat-icon { font-size: 22px; opacity: 0.8; }
.stat-body { display: flex; flex-direction: column; }
.stat-val { font-size: 28px; font-weight: 900; color: var(--blue); letter-spacing: -0.02em; line-height: 1; }
.stat-lbl { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.12em; margin-top: 3px; }

/* ─── Countdown ───────────────────────────────────────────────────────────── */
.countdown-card { margin: 0 28px 20px; background: linear-gradient(135deg, #0D1520 0%, #0A0F1A 100%); border: 1px solid var(--border-hi); border-radius: var(--r); padding: 24px 28px; position: relative; overflow: hidden; }
.countdown-card::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 0% 50%, rgba(0,181,226,0.08) 0%, transparent 60%); pointer-events: none; }
.cd-eyebrow, .cd-label { font-size: 10px; font-weight: 700; letter-spacing: 0.25em; text-transform: uppercase; color: var(--blue); margin-bottom: 8px; }
.cd-show-name, .cd-show { font-size: 20px; font-weight: 800; color: var(--white); margin-bottom: 4px; }
.cd-show-meta, .cd-meta { font-size: 12px; color: var(--text-dim); margin-bottom: 16px; }
.cd-units, .countdown-row { display: flex; align-items: flex-end; gap: 4px; }
.cd-unit { text-align: center; min-width: 52px; }
.cd-num { display: block; font-size: 42px; font-weight: 900; color: var(--white); font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; line-height: 1; }
.cd-sep { font-size: 32px; font-weight: 900; color: var(--blue); line-height: 1; padding-bottom: 6px; opacity: 0.6; }
.cd-lbl { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-muted); margin-top: 4px; }

/* ─── Live-now card state ─────────────────────────────────────────────────── */
.countdown-card.is-live-now { border-color: var(--red); }
.countdown-card.is-live-now::after { background: radial-gradient(ellipse at 0% 50%, rgba(255,59,92,0.1) 0%, transparent 60%); }
.cd-eyebrow-live { color: var(--red) !important; animation: liveNowPulse 1.4s ease-in-out infinite; }
.cd-elapsed { font-size: 44px; font-weight: 900; font-variant-numeric: tabular-nums; font-family: 'SF Mono','Fira Code','Consolas',monospace; color: var(--red); line-height: 1; margin: 4px 0 16px; letter-spacing: 0.04em; }
.btn-live-toggle { margin-top: 16px; font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 7px 18px; border-radius: 5px; border: 1px solid rgba(255,59,92,0.4); background: var(--red-dim); color: var(--red); cursor: pointer; transition: background 0.15s; }
.btn-live-toggle:hover { background: rgba(255,59,92,0.25); }
@keyframes liveNowPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ─── Broadcast breakdown ─────────────────────────────────────────────────── */
/* ─── Countdown firedancer ────────────────────────────────────────────────── */
.countdown-firedancer {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  height: 130px;
  width: auto;
  opacity: 0.22;
  pointer-events: none;
  z-index: 1;
}

/* ─── Dashboard grid ──────────────────────────────────────────────────────── */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 0 28px; margin-bottom: 16px; }
.dash-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.dash-setlist { margin: 0 28px; }
.dash-setlist-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 24px; }

/* Bar chart */
.bar-row { display: grid; grid-template-columns: 140px 1fr 36px; align-items: center; gap: 10px; padding: 5px 0; }
.bar-name { font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--blue), rgba(0,181,226,0.5)); border-radius: 3px; transition: width 0.8s ease; }
.bar-count { font-size: 11px; color: var(--text-muted); text-align: right; }

/* Mini shows */
.mini-show { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); cursor: pointer; transition: all 0.15s; }
.mini-show:last-child { border-bottom: none; }
.mini-show:hover { background: rgba(0,181,226,0.04); margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
.mini-tile { width: 38px; text-align: center; flex-shrink: 0; }
.mini-info { flex: 1; min-width: 0; }
.mini-venue { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ─── Date tiles ──────────────────────────────────────────────────────────── */
.t-mon { font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--blue); }
.t-day { font-size: 20px; font-weight: 900; color: var(--white); line-height: 1; }
.t-yr { font-size: 9px; color: var(--text-muted); }
.show-tile, .sched-tile { width: 46px; text-align: center; flex-shrink: 0; }
.show-tile .t-day { font-size: 22px; }

/* ─── Show cards ──────────────────────────────────────────────────────────── */
.shows-list { padding: 0 28px 28px; }
.show-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); margin-bottom: 10px; overflow: hidden; transition: all 0.2s; }
.show-card.expanded { border-color: var(--border-hi); box-shadow: 0 0 20px var(--blue-glow); }
.show-card-hd { display: flex; align-items: center; gap: 14px; padding: 14px 16px; cursor: pointer; }
.show-card-hd:hover { background: rgba(255,255,255,0.02); }
.show-info { flex: 1; min-width: 0; }
.show-info h3 { font-size: 14px; font-weight: 700; color: var(--white); margin: 0 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.show-loc { font-size: 12px; color: var(--text-dim); }
.show-tags { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.show-card-end { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.show-chevron { color: var(--text-muted); font-size: 16px; transition: transform 0.2s; display: block; }
.show-card.expanded .show-chevron { transform: rotate(180deg); }
.show-songs-wrap { display: none; padding: 0 16px 16px; }
.show-card.expanded .show-songs-wrap { display: block; }
.show-expanded-inner { display: flex; gap: 20px; align-items: flex-start; }
.show-poster-wrap { flex-shrink: 0; }
.show-poster {
  width: 140px;
  border-radius: var(--r-sm);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  display: block;
}
.dash-poster-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--r-sm);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  flex-shrink: 0;
}
.show-songs-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.show-songs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 20px; }
.show-songs-msg { font-size: 12px; color: var(--text-muted); padding: 12px 0; text-align: center; }

/* ─── Setlist songs ───────────────────────────────────────────────────────── */
.ssong { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.ssong:last-child { border-bottom: none; }
.ssong-pos { font-size: 10px; color: var(--text-muted); width: 18px; text-align: right; flex-shrink: 0; padding-top: 2px; }
.ssong-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ssong-title { font-size: 12px; color: var(--text); }
.ssong-notes { font-size: 10px; color: var(--text-muted); font-style: italic; }
.ssong-personnel { font-size: 10px; color: var(--blue); }
.ssong-title-line { display: flex; align-items: baseline; gap: 6px; }
.ssong-dur { font-size: 10px; color: var(--text-muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.show-total-dur { font-size: 11px; color: var(--text-muted); text-align: right; padding: 8px 0 2px; border-top: 1px solid rgba(255,255,255,0.06); margin-top: 4px; font-variant-numeric: tabular-nums; }

/* ─── Badges ──────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; letter-spacing: 0.06em; text-transform: uppercase; }
.badge-v { background: var(--green-dim); color: var(--green); }
.badge-s { background: var(--amber-dim); color: var(--amber); }
.badge-cat { background: var(--blue-dim); color: var(--blue); }

/* ─── Filters ─────────────────────────────────────────────────────────────── */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; padding: 0 28px; }
.filter-input { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text); font-size: 13px; padding: 10px 14px; outline: none; transition: border-color 0.2s; width: 100%; }
.filter-input:focus { border-color: var(--blue); }
.filter-select { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text); font-size: 13px; padding: 10px 14px; outline: none; transition: border-color 0.2s; cursor: pointer; }
.filter-select:focus { border-color: var(--blue); }

/* ─── Songs view ──────────────────────────────────────────────────────────── */
.songs-list { padding: 0 28px 28px; }
.song-row { display: grid; grid-template-columns: 28px 1fr 120px 40px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); transition: background 0.12s; }
.song-row:hover { background: var(--panel-hi); }
.song-rank { font-size: 11px; color: var(--text-muted); text-align: right; }
.song-title { font-size: 13px; color: var(--text); font-weight: 500; }
.song-bar-wrap { height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; }
.song-bar-inner { height: 100%; background: linear-gradient(90deg, var(--blue), rgba(0,181,226,0.4)); border-radius: 2px; }
.song-count { font-size: 12px; color: var(--blue); font-weight: 700; text-align: right; }
/* Song performance search */
.song-perf-group { margin-bottom: 24px; }
.song-perf-header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.song-perf-title { font-size: 15px; font-weight: 700; color: var(--text); }
.song-perf-count { font-size: 11px; color: var(--blue); font-weight: 600; }
.song-perf-list { border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.song-perf-header-row { display: grid; grid-template-columns: 140px 110px 1fr 42px 32px; align-items: center; gap: 10px; padding: 6px 12px; border-bottom: 1px solid var(--border); }
.song-perf-header-row .song-perf-date,
.song-perf-header-row .song-perf-loc,
.song-perf-header-row .song-perf-venue,
.song-perf-header-row .song-perf-dur,
.song-perf-header-row .song-perf-play { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.song-perf-row { display: grid; grid-template-columns: 140px 110px 1fr 42px 32px; align-items: center; gap: 10px; padding: 6px 12px; border-bottom: 1px solid var(--border); transition: background .12s; }
.song-perf-row:last-child { border-bottom: none; }
.song-perf-row:hover { background: var(--panel-hi); }
.song-perf-date { font-size: 12px; color: var(--accent); font-weight: 600; white-space: nowrap; }
.song-perf-loc  { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-perf-venue { font-size: 12px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-perf-dur  { font-size: 11px; color: var(--text-muted); text-align: right; white-space: nowrap; }
.song-perf-play { display: flex; justify-content: flex-end; min-width: 32px; }
.song-play-full { font-size: 10px; opacity: .7; padding: 3px 7px; min-width: 52px; }
@media (max-width: 768px) {
  .song-perf-col-template { grid-template-columns: 80px 1fr 36px; }
  .song-perf-loc { display: none; }
  .song-perf-dur { display: none; }
}

/* ─── Venues ──────────────────────────────────────────────────────────────── */
/* ─── Venue Map ──────────────────────────────────────────────────────────── */
#venueMapWrap { background: var(--bg); border-radius: var(--r); }
#venueMap { width: 100%; display: block; }
#venueMap .state { fill: var(--panel); stroke: var(--border); stroke-width: 0.5px; }
#venueMap .state-border { fill: none; stroke: var(--border); stroke-width: 1px; }
#venueMap .venue-pin { cursor: pointer; transition: r 0.15s; }
#venueMap .venue-pin:hover { filter: brightness(1.3); }
#venueMap .pin-count { fill: var(--bg); font-size: 9px; font-weight: 800; pointer-events: none; text-anchor: middle; dominant-baseline: central; }
.venue-zoom-btns { position: absolute; bottom: 16px; right: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.venue-zoom-btn { width: 42px; height: 42px; border-radius: var(--r); border: 2px solid var(--blue); background: var(--panel); color: var(--blue); font-size: 22px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; line-height: 1; box-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.venue-zoom-btn:hover, .venue-zoom-btn:active { background: var(--blue); color: var(--bg); }
.venue-panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r) var(--r) 0 0; padding: 16px 20px 20px; max-height: 45vh; overflow-y: auto; }
.venue-panel.hidden { display: none; }
.venue-panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.venue-panel-title { font-size: 14px; font-weight: 700; color: var(--white); }
.venue-panel-loc { font-size: 11px; color: var(--text-dim); }
.venue-panel-close { background: none; border: 1px solid var(--border); color: var(--text-dim); width: 28px; height: 28px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; }
.venue-panel-close:hover { border-color: var(--border-hi); color: var(--text); }
.venue-panel-count { font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }
.venue-show-link { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); margin-bottom: 6px; cursor: pointer; transition: all 0.15s; text-decoration: none; }
.venue-show-link:hover { border-color: var(--border-hi); background: var(--panel-hi); }
.venue-show-date { font-size: 13px; font-weight: 600; color: var(--white); }
.venue-show-venue { font-size: 10px; color: var(--text-muted); }
.venue-show-arrow { color: var(--text-muted); font-size: 12px; }

/* ─── Schedule ────────────────────────────────────────────────────────────── */
.schedule-list { padding: 0 28px 28px; }
.sched-card { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 16px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; margin-bottom: 10px; transition: all 0.2s; }
.sched-card:hover { border-color: var(--border-hi); box-shadow: 0 0 16px var(--blue-glow); }
.sched-info h3 { font-size: 14px; font-weight: 700; color: var(--white); margin-bottom: 4px; }
.sched-info p { font-size: 12px; color: var(--text-dim); margin-bottom: 2px; }
.sched-cd { text-align: center; }
.sched-days-num { font-size: 28px; font-weight: 900; color: var(--blue); line-height: 1; text-align: center; }
.sched-days-num.today { color: var(--green); }
.sched-days-num.past { color: var(--text-muted); font-size: 14px; }
.sched-days-lbl { font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); text-align: center; }

/* ─── Intelligence / Heat map ─────────────────────────────────────────────── */
.subtab-bar { display: flex; border-bottom: 1px solid var(--border); padding: 0 28px; margin-bottom: 20px; }
.subtab { background: none; border: none; border-bottom: 2px solid transparent; color: var(--text-dim); font-size: 13px; font-weight: 600; padding: 10px 16px 10px 0; margin-right: 16px; cursor: pointer; transition: all 0.15s; margin-bottom: -1px; }
.subtab:hover { color: var(--text); }
.subtab.active { color: var(--blue); border-bottom-color: var(--blue); }
.subtab-panel { padding: 0 28px 28px; }
.heatmap-unique-stat {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  padding: 12px 28px 8px;
  margin: 0 -28px;    /* counteract .subtab-panel padding so bg spans full width */
  display: flex; align-items: baseline; gap: 6px;
  border-bottom: 1px solid var(--border);
}
.heatmap-loading { color: var(--text-muted); font-size: 13px; padding: 20px 0; text-align: center; }
.heatmap-wrap { overflow-x: auto; }
.heatmap-table { border-collapse: collapse; font-size: 11px; white-space: nowrap; }
.heatmap-table th, .heatmap-table td { border: 1px solid var(--border); text-align: center; vertical-align: middle; }
.hm-sticky { position: sticky; z-index: 2; background: var(--panel); }
.hm-col-title { left: 0; min-width: 170px; text-align: left; padding: 6px 10px; color: var(--text); }
.hm-col-plays { left: 170px; width: 46px; color: var(--blue); font-weight: 700; }
.hm-col-days { left: 216px; width: 46px; color: var(--text-muted); }
.hm-head { background: var(--panel-hi) !important; color: var(--text-dim); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; padding: 8px 6px; }
.hm-show-col { min-width: 52px; padding: 4px; }
.hm-date { font-size: 10px; font-weight: 700; color: var(--blue); }
.hm-venue-abbr { font-size: 9px; color: var(--text-muted); }
.hm-cell { width: 36px; height: 28px; background: transparent; }
.hm-cell.hm-hit { background: var(--blue); opacity: 0.75; }
.hm-consec { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red); margin-left: 5px; vertical-align: middle; }

/* ─── Export ──────────────────────────────────────────────────────────────── */
.export-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; padding: 0 28px 28px; }
.export-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); padding: 24px; transition: all 0.2s; }
.export-card:hover { border-color: var(--border-hi); }
.export-icon { font-size: 28px; color: var(--blue); margin-bottom: 12px; }
.export-title { font-size: 15px; font-weight: 700; color: var(--white); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.export-scope-badge { font-size: 9px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; background: rgba(0,181,226,0.15); color: var(--blue); border: 1px solid rgba(0,181,226,0.3); border-radius: 4px; padding: 2px 6px; }
.export-desc { font-size: 12px; color: var(--text-dim); margin-bottom: 16px; line-height: 1.6; }

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary { display: inline-flex; align-items: center; justify-content: center; background: var(--blue); border: none; color: #000; border-radius: var(--r-sm); padding: 10px 22px; cursor: pointer; font-size: 13px; font-weight: 800; font-family: inherit; transition: all 0.15s; letter-spacing: 0.05em; text-decoration: none; }
.btn-primary:hover { background: #22C7F5; }
.btn-ghost { background: none; border: 1px solid var(--border); color: var(--text-dim); border-radius: var(--r-sm); padding: 9px 18px; cursor: pointer; font-size: 13px; font-weight: 600; font-family: inherit; transition: all 0.15s; }
.btn-ghost:hover { border-color: var(--border-hi); color: var(--text); }
.btn-add { background: var(--blue-dim); border: 1px solid rgba(0,181,226,0.35); color: var(--blue); border-radius: var(--r-sm); padding: 9px 16px; cursor: pointer; font-weight: 700; font-size: 13px; white-space: nowrap; transition: all 0.15s; font-family: inherit; }
.btn-add:hover { background: var(--blue-glow); border-color: var(--blue); }

/* ─── Setlist view ────────────────────────────────────────────────────────── */
.setlist-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; padding: 0 28px 28px; }
.setlist-col-main { min-width: 0; }
.setlist-col-side { display: flex; flex-direction: column; gap: 14px; }
.alert-guide-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text-dim); }
.alert-guide-row:last-child { border-bottom: none; }

/* Builder */
.builder-form-panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); padding: 20px 22px 22px; margin-bottom: 20px; }
.builder-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.builder-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.builder-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }
.builder-select { width: 100%; }
.builder-song-entry { display: flex; gap: 8px; align-items: center; }
.builder-song-entry .filter-input { flex: 1; }
.typeahead-dropdown { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #1a1a24; border: 1px solid rgba(0,181,226,0.3); border-radius: var(--r-sm); max-height: 260px; overflow-y: auto; z-index: 999; box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
.ta-item { padding: 8px 12px; font-size: 13px; color: var(--text); cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.04); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ta-item:last-child { border-bottom: none; }
.ta-item:hover, .ta-item.ta-active { background: rgba(0,181,226,0.12); color: var(--blue); }
.builder-list { margin-bottom: 14px; min-height: 40px; }
.builder-empty { font-size: 12px; color: var(--text-muted); padding: 16px 0; text-align: center; font-style: italic; }
.builder-song-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.builder-pos { font-size: 11px; color: var(--text-muted); width: 20px; text-align: right; flex-shrink: 0; padding-top: 3px; }
.builder-song-body { flex: 1; min-width: 0; }
.builder-song-title { font-size: 13px; color: var(--text); font-weight: 600; margin-bottom: 4px; }
.builder-notes-input { background: var(--panel-hi); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text); font-size: 11px; font-family: inherit; padding: 5px 10px; outline: none; width: 100%; margin-top: 4px; transition: border-color 0.2s; }
.builder-notes-input:focus { border-color: var(--blue); }
.builder-del { background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; padding: 0 4px; line-height: 1; transition: color 0.15s; flex-shrink: 0; }
.builder-del:hover { color: var(--red); }
.builder-move-btns { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.builder-move-btn { background: none; border: 1px solid var(--border, rgba(255,255,255,0.15)); color: var(--blue, #00B5E2); border-radius: 4px; cursor: pointer; width: 24px; height: 24px; font-size: 10px; line-height: 1; padding: 0; }
.builder-move-btn:disabled { opacity: 0.3; cursor: default; }
.builder-total { display: flex; align-items: center; gap: 8px; font-size: 12px; min-height: 22px; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.btotal-label { color: var(--text-muted); font-size: 11px; }
.btotal-time { color: var(--text); font-weight: 600; }
.btotal-time-close { color: var(--amber); }
.btotal-time-over  { color: #ff6666; }
.btotal-sep { color: var(--text-muted); }
.btotal-target { color: var(--text-muted); }
.btotal-flag { font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 4px; letter-spacing: 0.06em; }
.btotal-close { background: var(--amber-dim, rgba(255,176,32,0.15)); color: var(--amber); }
.btotal-over  { background: rgba(255,102,102,0.15); color: #ff6666; }
.builder-song-dur { font-size: 10px; color: var(--text-muted); font-weight: 400; margin-left: 6px; font-variant-numeric: tabular-nums; }
.builder-freshness { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.freshness-never { font-size: 10px; color: var(--text-muted); font-style: italic; }
.builder-actions { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
/* Show-page encore break divider — appears before first encore song in setlist grids */
.show-encore-divider { display: flex; align-items: center; gap: 8px; padding: 8px 0 4px; }
.show-encore-line { flex: 1; height: 1px; background: var(--border-hi); }
.show-encore-label { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); white-space: nowrap; padding: 2px 8px; border: 1px solid var(--border-hi); border-radius: 4px; background: var(--blue-dim); }

.builder-break-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; margin: 2px 0; }
.builder-break-divider { flex: 1; display: flex; align-items: center; gap: 8px; }
.builder-break-line { flex: 1; height: 1px; background: var(--border-hi); }
.builder-break-label { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); white-space: nowrap; padding: 2px 8px; border: 1px solid var(--border-hi); border-radius: 4px; background: var(--blue-dim); }
.builder-break-dur { font-size: 10px; color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.btotal-breakdown { font-size: 10px; color: var(--text-muted); }
.builder-status { font-size: 11px; color: var(--blue); min-height: 18px; }
.alert-badge { display: inline-flex; align-items: center; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px; letter-spacing: 0.04em; margin-bottom: 2px; }
.alert-red { background: var(--red-dim); color: var(--red); }
.alert-yellow { background: var(--amber-dim); color: var(--amber); }
.alert-blue { background: var(--blue-dim); color: var(--blue); }
.drafts-section { margin-top: 4px; }
.drafts-heading { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 12px; }
.drafts-list { display: flex; flex-direction: column; gap: 8px; }
.draft-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-sm); transition: all 0.15s; display: flex; align-items: stretch; overflow: hidden; }
.draft-card:hover { border-color: var(--border-hi); }
.draft-card-main { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; cursor: pointer; min-width: 0; }
.draft-load-arrow { flex-shrink: 0; color: var(--text-muted); font-size: 12px; }
.draft-del-btn { flex-shrink: 0; background: none; border: none; border-left: 1px solid var(--border); color: var(--text-muted); font-size: 14px; padding: 0 14px; cursor: pointer; transition: color 0.15s, background 0.15s; }
.draft-del-btn:hover { color: #FF3B5C; background: rgba(255,59,92,0.08); }
.draft-show { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.draft-meta { font-size: 10px; color: var(--text-muted); }

/* ─── Live view ───────────────────────────────────────────────────────────── */
.live-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; padding: 0 28px 28px; }
.live-col-main { min-width: 0; }
.live-col-side { display: flex; flex-direction: column; gap: 14px; }
.live-status-card { background: linear-gradient(135deg, #0D1520, #0A0F1A); border: 1px solid var(--border-hi); border-radius: var(--r); padding: 20px 22px; }
.live-status-indicator { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.live-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--red); position: relative; flex-shrink: 0; }
.live-pulse::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--red); animation: ping 1.2s ease infinite; opacity: 0; }
#liveStatusText { font-size: 13px; font-weight: 700; letter-spacing: 0.05em; color: var(--text-dim); }
.live-status-card.is-live #liveStatusText { color: var(--blue); }
.live-status-card.is-live .live-pulse { background: var(--blue); }
.live-status-card.is-live .live-pulse::after { border-color: var(--blue); }
.live-show-info { font-size: 18px; font-weight: 800; color: var(--white); }
.live-elapsed { font-size: 28px; font-weight: 900; font-variant-numeric: tabular-nums; font-family: 'SF Mono','Fira Code','Consolas',monospace; color: var(--red); margin-top: 6px; letter-spacing: 0.04em; }
.live-setlist-list { display: flex; flex-direction: column; gap: 3px; max-height: 480px; overflow-y: auto; }
.live-song-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); transition: all 0.3s; }
.live-song-row.new-song { background: rgba(0,181,226,0.12); border-left: 3px solid var(--blue); animation: songFlash 0.5s ease; }
@keyframes songFlash { 0% { background: rgba(0,181,226,0.3); } 100% { background: rgba(0,181,226,0.12); } }
.live-song-num { font-size: 11px; color: var(--text-muted); width: 22px; text-align: right; flex-shrink: 0; }
.live-song-title { font-size: 14px; font-weight: 600; color: var(--text); }
.live-song-notes { font-size: 11px; color: var(--text-muted); font-style: italic; }
.log-entries { display: flex; flex-direction: column; gap: 8px; max-height: 200px; overflow-y: auto; }
.log-entry { padding: 8px 10px; background: var(--panel-hi); border-radius: var(--r-sm); }
.log-entry-header { display: flex; gap: 8px; margin-bottom: 3px; }
.log-author { font-size: 10px; font-weight: 700; color: var(--blue); text-transform: uppercase; }
.log-time { font-size: 10px; color: var(--text-muted); }
.log-text { font-size: 12px; color: var(--text-dim); }
.flag-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.flag-row:last-child { border-bottom: none; }
.flag-song { font-size: 12px; font-weight: 600; color: var(--text); }
.flag-count { font-size: 11px; color: var(--amber); }
.flag-consec { font-size: 10px; color: var(--red); margin-left: 4px; }

/* ─── Player bar ──────────────────────────────────────────────────────────── */
.player-bar { position: fixed; bottom: 0; left: 0; right: 0; height: var(--player-h); background: #08090E; border-top: 2px solid rgba(0,181,226,0.2); display: flex; align-items: center; gap: 16px; padding: 0 16px; z-index: 1000; transition: all 0.3s ease; box-shadow: 0 -4px 30px rgba(0,0,0,0.5); }
.player-bar.is-live { border-top-color: var(--blue); box-shadow: 0 -2px 30px rgba(0,181,226,0.35); }
.player-bar.collapsed { height: 32px; }
.player-bar.collapsed .player-center,
.player-bar.collapsed .player-sub,
.player-bar.collapsed .player-status { display: none; }
.player-signal { position: relative; width: 28px; height: 28px; flex-shrink: 0; }
.signal-dot { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 5px; height: 5px; border-radius: 50%; background: var(--blue); }
.signal-arc { position: absolute; left: 50%; transform: translateX(-50%); border-radius: 50%; border: 1.5px solid var(--blue); border-bottom: none; border-left: none; border-right: none; opacity: 0.7; }
.signal-arc-1 { width: 8px; height: 5px; bottom: 10px; }
.signal-arc-2 { width: 14px; height: 8px; bottom: 12px; opacity: 0.5; }
.signal-arc-3 { width: 20px; height: 12px; bottom: 14px; opacity: 0.3; }
.player-bar.is-live .signal-arc { animation: signalPulse 1.5s ease-in-out infinite; }
.player-bar.is-live .signal-arc-2 { animation-delay: 0.15s; }
.player-bar.is-live .signal-arc-3 { animation-delay: 0.3s; }
@keyframes signalPulse { 0%, 100% { opacity: 0.7; } 50% { opacity: 0.2; } }
.player-identity { flex-shrink: 0; }
.player-logo-img { height: 36px; width: auto; object-fit: contain; display: block; }
.player-name { font-size: 12px; font-weight: 800; letter-spacing: 0.15em; color: var(--white); }
.player-sub { font-size: 9px; letter-spacing: 0.12em; color: var(--blue); text-transform: uppercase; }
.player-center { flex: 1; min-width: 0; position: relative; height: 52px; display: flex; align-items: center; }
.player-offair { position: absolute; inset: 0; display: flex; align-items: center; gap: 12px; background: #08090E; pointer-events: none; }

/* ─── Live player controls ──────────────────────────────────────────────────── */
.live-ctrl-btn { background: none; border: 1px solid var(--border); color: var(--text); width: 30px; height: 30px; border-radius: 6px; cursor: pointer; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: border-color 0.15s, color 0.15s; padding: 0; }
.live-ctrl-btn:hover { border-color: var(--blue); color: var(--blue); }
.live-vol-wrap { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.live-vol-slider { width: 64px; accent-color: var(--blue); cursor: pointer; }
.live-show-label { display: flex; align-items: center; min-width: 0; flex-shrink: 1; overflow: hidden; }
.live-show-name { font-size: 11px; font-weight: 800; color: var(--white); letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-show-city { font-size: 11px; font-weight: 400; color: var(--text-muted); white-space: nowrap; }
.live-scrub-outer { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; }
.live-behind-time { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; color: var(--blue); white-space: nowrap; min-width: 38px; text-align: right; }
.live-scrub-input { flex: 1; accent-color: var(--blue); cursor: pointer; min-width: 0; }
.live-go-live-btn { font-size: 9px; font-weight: 800; letter-spacing: 0.1em; color: #ff3333; border: 1px solid #ff3333; background: rgba(255,51,51,0.1); padding: 2px 7px; border-radius: 4px; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.live-go-live-btn:hover { background: rgba(255,51,51,0.2); }
.player-bar.is-live .player-offair { display: none; }
.offair-badge { font-size: 10px; font-weight: 800; letter-spacing: 0.15em; color: var(--text-muted); background: var(--panel); border: 1px solid var(--border); padding: 3px 8px; border-radius: 4px; transition: color 0.3s, border-color 0.3s, background 0.3s; }
.player-bar.stream-on-air .offair-badge { color: #ff3333; border-color: #ff3333; background: rgba(255,51,51,0.12); }
.offair-next { font-size: 11px; color: var(--text-muted); }
.player-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.player-status { display: flex; align-items: center; }
.onair-badge { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; color: #ff3333; animation: livePulse 1.5s ease infinite; white-space: nowrap; flex-shrink: 0; }
.onair-badge-inline { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; color: #ff3333; animation: livePulse 1.5s ease infinite; white-space: nowrap; }
.live-badge { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; color: var(--blue); animation: livePulse 1.5s ease infinite; }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.player-collapse { background: none; border: 1px solid var(--border); color: var(--text-muted); width: 28px; height: 28px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; transition: all 0.2s; padding: 0; }
.player-collapse:hover { border-color: var(--border-hi); color: var(--text); }
.player-bar.collapsed .player-collapse { transform: rotate(180deg); }

/* ─── Mobile tab nav ──────────────────────────────────────────────────────── */
.tabnav { position: fixed; bottom: var(--player-h); left: 0; right: 0; height: 56px; background: #0A0C12; border-top: 1px solid var(--border); display: none; z-index: 200; touch-action: manipulation; }
.tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-muted); font-size: 10px; letter-spacing: 0.06em; text-decoration: none; transition: color 0.15s; -webkit-tap-highlight-color: transparent; }
.tab-item.active { color: var(--blue); }
.tab-icon { font-size: 18px; }
.tab-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; }

/* Shimmer */
.shimmer-list { height: 120px; background: linear-gradient(90deg, var(--panel) 25%, var(--panel-hi) 50%, var(--panel) 75%); background-size: 200% 100%; border-radius: var(--r-sm); animation: shimmer 1.5s ease infinite; }

/* ─── Song play button ────────────────────────────────────────────────────── */
.song-play-btn {
  background: var(--blue-dim);
  border: 1px solid var(--border-hi);
  color: var(--blue);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
  padding: 0;
  margin-left: auto;
}
.song-play-btn:hover { background: var(--blue); color: #000; }

.show-play-btn {
  background: var(--blue-dim);
  border: 1px solid var(--border-hi);
  color: var(--blue);
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  margin-top: 4px;
  white-space: nowrap;
  transition: all 0.15s;
  letter-spacing: 0.02em;
}
.show-play-btn:hover { background: var(--blue); color: #000; }

/* ─── Mini audio player ───────────────────────────────────────────────────── */
.mini-player {
  position: fixed;
  bottom: calc(var(--player-h) + 4px);
  left: var(--sidebar-w);
  right: 0;
  background: #0D1018;
  border-top: 1px solid var(--border-hi);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 999;
  transition: all 0.2s;
}
.mini-player.hidden { display: none; }
.mini-player-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex-shrink: 0;
  max-width: 130px;
}
.mini-player-song {
  font-size: 12px;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-player-show {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-player-controls {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.mini-ctrl-btn {
  background: none;
  border: none;
  color: var(--blue);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  line-height: 1;
  width: 28px;
  text-align: center;
  transition: opacity 0.15s;
}
.mini-ctrl-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.mini-scrub-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.mini-time {
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  min-width: 28px;
}
.mini-scrub {
  flex: 1;
  height: 3px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,0.12);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  min-width: 0;
}
.mini-scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(0,181,226,0.5);
}
.mini-scrub::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue);
  cursor: pointer;
  border: none;
}
.mini-player-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0 2px;
  flex-shrink: 0;
  line-height: 1;
}
.mini-player-close:hover { color: var(--text); }

@media (max-width: 768px) {
  .mini-player {
    left: 0;
    bottom: calc(64px + var(--player-h) + 4px);
    padding: 8px 10px;
    gap: 8px;
  }
  .mini-player-info { max-width: 80px; }
  .mini-time { min-width: 24px; font-size: 9px; }
  .mini-scrub { height: 4px; padding: 8px 0; }
  .mini-scrub::-webkit-slider-thumb { width: 22px; height: 22px; }
}

/* ─── Predictions ─────────────────────────────────────────────────────────── */
.pred-summary-card {
  background: var(--panel);
  border: 1px solid;
  border-radius: var(--r-sm);
  padding: 10px 16px;
  text-align: center;
  min-width: 80px;
  cursor: pointer;
  transition: opacity 0.2s, box-shadow 0.2s;
}
.pred-summary-card:hover { box-shadow: 0 0 0 2px var(--blue); }
.pred-summary-card.pred-active { box-shadow: 0 0 0 2px var(--blue); }
.pred-sum-num { font-size: 28px; font-weight: 900; line-height: 1; }
.pred-sum-lbl { font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted); margin-top: 3px; }
.pred-song-card {
  background: var(--panel);
  border: 1px solid;
  border-radius: var(--r-sm);
  padding: 8px 12px;
  position: relative;
  transition: border-color 0.15s;
}
.pred-song-card:hover { border-color: var(--border-hi) !important; }
.pred-song-title { font-size: 12px; font-weight: 600; color: var(--text); }
.pred-song-meta { font-size: 10px; color: var(--text-muted); margin-top: 3px; }
.pred-add-btn, .pred-added-label, .pred-summary-card {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.pred-add-btn {
  position: absolute; top: 8px; right: 8px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue); color: #000;
  border: none; font-size: 14px; font-weight: 700;
  cursor: pointer; line-height: 1;
  opacity: 0.45; transition: opacity 0.15s;
}
.pred-song-card:hover .pred-add-btn { opacity: 1; }
.pred-added-label {
  display: none;
  position: absolute; top: 6px; right: 6px;
  font-size: 9px; font-weight: 800; letter-spacing: 0.1em;
  color: #00E676; background: rgba(0,230,118,0.15);
  padding: 2px 8px; border-radius: 10px;
  cursor: pointer; line-height: 18px;
  border: 1px solid rgba(0,230,118,0.4);
}
.pred-added-label:hover { background: rgba(0,230,118,0.28); }
.pred-song-added {
  background: rgba(0, 230, 118, 0.08) !important;
  border-color: #00E676 !important;
}
.pred-song-added .pred-add-btn { display: none; }
.pred-song-added .pred-added-label { display: block; }
.pred-counter-card {
  background: rgba(0,230,118,0.1);
  border: 1px solid #00E676;
  border-radius: var(--r-sm);
  padding: 10px 14px;
  cursor: default;
  min-width: 64px;
  text-align: center;
  display: none;
}
.pred-counter-card.visible { display: block; }

/* ─── Login modal ─────────────────────────────────────────────────────────── */
.login-modal {
  position: fixed;
  inset: 0;
  background: rgba(5,7,12,0.97);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-modal.hidden { display: none; }
.login-box {
  background: var(--panel);
  border: 1px solid var(--border-hi);
  border-radius: var(--r);
  padding: 36px 32px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 0 60px rgba(0,181,226,0.15);
}
.login-title { font-size: 20px; font-weight: 900; letter-spacing: 0.06em; color: var(--white); margin-bottom: 4px; }
.login-sub { font-size: 11px; color: var(--blue); letter-spacing: 0.12em; margin-bottom: 24px; text-transform: uppercase; }
.login-form { display: flex; flex-direction: column; }
.login-error { font-size: 12px; color: var(--red); margin-top: 8px; padding: 6px; background: var(--red-dim); border-radius: var(--r-sm); }


/* ─── Compare view ────────────────────────────────────────────────────────── */
.compare-controls {
  padding: 0 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.compare-selects {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 16px;
}
.compare-select-wrap { display: flex; flex-direction: column; gap: 6px; }
.compare-vs {
  font-size: 13px;
  font-weight: 900;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  padding-bottom: 10px;
  text-align: center;
}
.compare-show-select { width: 100%; }
.compare-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 0 28px 28px;
}
.compare-col-head {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.compare-shared-panel {
  padding: 0 28px 28px;
}
.compare-shared-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.compare-shared-chip {
  background: var(--blue-dim);
  border: 1px solid rgba(0,181,226,0.3);
  color: var(--blue);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
}
.compare-unique { color: var(--text-muted); font-size: 12px; font-style: italic; }

/* ─── Nav hint banner ─────────────────────────────────────────────────────── */
.nav-hint {
  position: fixed;
  bottom: 64px;
  left: 0;
  right: 0;
  background: #00B5E2;
  color: #0A0A0F;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  padding: 8px;
  z-index: 1002;
  animation: fadeout 4s forwards;
}
@keyframes fadeout {
  0%   { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; pointer-events: none; }
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .setlist-layout { grid-template-columns: 1fr; }
  .live-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .mini-player { left: 0; bottom: calc(64px + var(--player-h) + 4px); }
  .sidebar { display: none; }
  .topnav { display: flex; }
  .tabnav {
    display: flex;
    height: 64px;
    background: #12141C;
    border-top: 2px solid #00B5E2;
  }
  .tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    position: relative;
  }
  .tab-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: #00B5E2;
    border-radius: 0 0 2px 2px;
  }
  .tab-icon { font-size: 20px; }
  .tab-label {
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: block;
  }
  .main { left: 0; top: var(--nav-h); bottom: calc(var(--player-h) + 64px); }
  .player-bar { bottom: 64px; }
  .stats-row { grid-template-columns: 1fr 1fr; padding: 0 16px; }
  .dash-grid { grid-template-columns: 1fr; padding: 0 16px; }
  .dash-grid-3 { grid-template-columns: 1fr; }
  .venue-panel { border-radius: var(--r) var(--r) 0 0; max-height: 40vh; }
  .show-songs-grid { grid-template-columns: 1fr; }
  .show-expanded-inner { flex-direction: column; align-items: stretch; }
  .show-poster-wrap { width: 100%; }
  .show-poster { width: 100%; max-width: 240px; border-radius: var(--r-sm); }
  .dash-setlist-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { flex-direction: column; padding: 0 16px; }
  .view-header { padding: 20px 16px 0; }
  .shows-list { padding: 0 16px 28px; }
  .songs-list { padding: 0 16px 28px; }
  .schedule-list { padding: 0 16px 28px; }
  .setlist-layout { padding: 0 16px 28px; }
  .live-layout { padding: 0 16px 28px; }
  .dash-setlist { margin: 0 16px; }
  .countdown-card { margin: 0 16px 20px; }
  .subtab-bar { padding: 0 16px; }
  .subtab-panel { padding: 0 16px 28px; }
  .heatmap-unique-stat { margin: 0 -16px; padding: 12px 16px 8px; }
  .export-cards { padding: 0 16px 28px; }
  .cd-num { font-size: 32px; }
  .cd-unit { min-width: 44px; }
}

@media (max-width: 480px) {
  .stats-row { gap: 8px; }
  .bar-row { grid-template-columns: 100px 1fr 30px; }
  .song-row { grid-template-columns: 24px 1fr 36px; }
  .song-bar-wrap { display: none; }
  .dash-setlist-grid { grid-template-columns: 1fr; }
  /* Prevent grid items from forcing the 1fr column wider than viewport */
  .dash-grid > .panel { min-width: 0; overflow: hidden; }
}

/* ─── Mobile Fix Patch v1 ─────────────────────────────────────────────────── */

@media (max-width: 768px) {

  /* FIX 1: Correct player-bar / tabnav stacking
     Player bar sits at very bottom (bottom: 0), tabnav sits above it */
  .player-bar {
    bottom: 0 !important;
  }
  .tabnav {
    bottom: var(--player-h) !important;
    z-index: 200 !important;
  }
  /* Main content clears both */
  .main {
    bottom: calc(var(--player-h) + 64px) !important;
  }
  /* FIX 2: Tab bar discoverability — add a subtle separator line and
     make active item glow more prominently */
  .tabnav {
    border-top: 2px solid var(--blue) !important;
    background: rgba(10, 12, 18, 0.98) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .tab-item {
    padding: 4px 0 6px;
  }
  .tab-item.active .tab-icon {
    color: var(--blue);
    filter: drop-shadow(0 0 6px rgba(0,181,226,0.6));
  }
  .tab-item.active .tab-label {
    color: var(--blue);
    font-weight: 700;
  }
  .tab-icon {
    font-size: 20px;
    line-height: 1;
    transition: transform 0.15s, filter 0.15s;
  }
  .tab-item:active .tab-icon {
    transform: scale(0.88);
  }

  /* FIX 3: Compare — stack vertically on mobile */
  .compare-selects {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .compare-vs {
    text-align: left !important;
    padding: 0 !important;
    font-size: 11px !important;
    color: var(--text-muted) !important;
  }

  /* FIX 4: Heatmap — add horizontal scroll indicator */
  .heatmap-wrap {
    position: relative;
    -webkit-overflow-scrolling: touch;
  }
  .heatmap-wrap::after {
    content: '← scroll →';
    display: block;
    font-size: 10px;
    color: var(--blue);
    opacity: 0.7;
    text-align: center;
    padding: 6px 0 0;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  /* FIX 5: Intelligence subtab-panel — ensure full-width heatmap */
  .subtab-panel {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .subtab-panel .heatmap-wrap {
    padding: 0 16px;
  }
  .heatmap-unique-stat {
    margin: 0;          /* subtab-panel padding is 0 at this breakpoint */
    padding: 12px 16px 8px;
  }
}

/* ─── Admin panel ─────────────────────────────────────────────────────────── */
.admin-section { margin-bottom: 20px; }
.admin-stream-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-field { display: flex; flex-direction: column; gap: 6px; }
.admin-label { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.admin-hint { font-size: 11px; color: var(--text-muted); }
.admin-save-btn { white-space: nowrap; flex-shrink: 0; }
.admin-mono { font-family: monospace; font-size: 11px; letter-spacing: 0.03em; }
.btn-admin-toggle { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; padding: 4px 12px; border-radius: 6px; cursor: pointer; border: 1px solid var(--border); background: var(--panel); color: var(--text); transition: all 0.15s; white-space: nowrap; }
.btn-admin-toggle.on  { border-color: #ff3333; background: rgba(255,51,51,0.12); color: #ff3333; }
.btn-admin-toggle.off { border-color: var(--border); color: var(--text-muted); }
.admin-users-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.admin-users-table th { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.admin-users-table td { font-size: 12px; padding: 8px; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: middle; }
.admin-users-table tr:last-child td { border-bottom: none; }
.admin-audio-toggle { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px; cursor: pointer; border: 1px solid; transition: all 0.15s; }
.admin-audio-toggle.has-audio { border-color: var(--blue); background: rgba(0,181,226,0.1); color: var(--blue); }
.admin-audio-toggle.no-audio  { border-color: var(--border); background: transparent; color: var(--text-muted); }
.admin-video-toggle { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px; cursor: pointer; border: 1px solid; transition: all 0.15s; }
.admin-video-toggle.has-video { border-color: var(--amber); background: rgba(255,176,32,0.12); color: var(--amber); }
.admin-video-toggle.no-video  { border-color: var(--border); background: transparent; color: var(--text-muted); }
.session-dot { font-size: 14px; }

/* ── Internal live VIDEO panel (Mux) ── */
.video-live-panel {
  background: var(--panel); border: 1px solid var(--border-hi); border-radius: var(--r);
  padding: 14px 16px 16px; margin: 0 28px 20px; box-shadow: 0 0 24px var(--blue-glow);
}
.video-live-hd { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.video-live-badge {
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em; color: var(--red);
  text-transform: uppercase; animation: videoLivePulse 2s ease-in-out infinite;
}
@keyframes videoLivePulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }
.video-live-sub { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.video-live-stage {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: #000; border-radius: var(--r-sm); overflow: hidden;
}
.live-video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.video-live-play {
  position: absolute; inset: 0; margin: auto; width: max-content; height: max-content;
  padding: 12px 22px; border-radius: 24px; cursor: pointer;
  background: rgba(0,181,226,0.92); color: #001018; border: none;
  font-size: 14px; font-weight: 800; letter-spacing: 0.02em;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.video-live-play:hover { background: var(--blue); }
@media (max-width: 720px) {
  .video-live-panel { margin: 0 16px 16px; }
}
.session-dot-on   { color: #00E676; }
.session-dot-idle { color: #FFB020; }
.session-dot-off  { color: var(--text-muted); }
.admin-del-btn { font-size: 10px; padding: 2px 8px; border-radius: 4px; cursor: pointer; border: 1px solid var(--border); background: transparent; color: var(--text-muted); transition: all 0.15s; }
.admin-del-btn:hover { border-color: #ff3333; color: #ff3333; }
.admin-add-user { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 8px; }
.admin-add-user-title { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
.admin-add-user-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-add-user-row .filter-input { flex: 1; min-width: 120px; }
.admin-check-label { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted); white-space: nowrap; cursor: pointer; }
.admin-msg { font-size: 11px; margin-top: 8px; padding: 6px 10px; border-radius: 4px; }
.admin-msg.ok  { background: rgba(0,200,100,0.1); color: #00c864; border: 1px solid rgba(0,200,100,0.2); }
.admin-msg.err { background: rgba(255,51,51,0.1);  color: #ff3333; border: 1px solid rgba(255,51,51,0.2); }
.admin-pw-input { width: 120px; font-size: 11px; }
/* ─── Sidebar account / logout (desktop) ─────────────────────────────────── */
.sf-account { border-top: 1px solid var(--border); margin-top: 10px; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sf-account-user { font-size: 11px; color: var(--text-muted); }
.btn-logout { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; padding: 4px 10px; border-radius: 5px; cursor: pointer; border: 1px solid rgba(255,51,51,0.4); background: rgba(255,51,51,0.1); color: #ff6666; transition: all 0.15s; font-family: inherit; white-space: nowrap; }
.btn-logout:hover { background: rgba(255,51,51,0.2); border-color: #ff3333; color: #ff3333; }

.btn-admin-danger { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; padding: 4px 12px; border-radius: 6px; cursor: pointer; border: 1px solid rgba(255,51,51,0.4); background: rgba(255,51,51,0.1); color: #ff6666; transition: all 0.15s; white-space: nowrap; }
.btn-admin-danger:hover { background: rgba(255,51,51,0.2); border-color: #ff3333; color: #ff3333; }
.admin-log-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.admin-log-table th { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-log-table td { padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,0.04); color: var(--text-muted); vertical-align: top; }
.admin-log-table td.log-user { color: var(--text); font-weight: 600; }
.admin-log-table td.log-action { color: var(--blue); font-family: monospace; }
.admin-log-table td.log-action.err { color: #ff6666; }
.admin-log-empty { color: var(--text-muted); font-size: 12px; padding: 16px 0; text-align: center; }

@media (max-width: 768px) {
  .admin-stream-grid { grid-template-columns: 1fr; }
  .admin-add-user-row { flex-direction: column; align-items: stretch; }
}

@media (max-width: 480px) {
  /* Smaller phones — reduce countdown font */
  .cd-num { font-size: 28px !important; }
  .cd-unit { min-width: 38px !important; }
  /* Tighten stat cards */
  .stat-val { font-size: 22px !important; }
  .stat-card { padding: 14px 12px !important; gap: 10px !important; }

  /* Player bar mobile: tighten spacing, hide volume (use device volume) */
  .player-bar { gap: 8px; padding: 0 10px; }
  .live-vol-wrap { display: none; }
  #livePlayerControls { gap: 6px !important; padding: 0 !important; }
  .player-right { gap: 6px; }
  .live-behind-time { min-width: 32px; }
}

/* ── Live Visualizer ───────────────────────────────────────────────────────── */
.viz-mini {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  display: block;
  margin: 0 8px;
}
@media (max-width: 768px) {
  #liveShowLabel {
    flex: 0 1 auto;
    max-width: 45vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .viz-mini {
    flex: 1 1 auto;
    min-width: 90px;
    height: 28px;
    margin: 0 6px;
  }
}

.viz-card {
  background: rgba(0,181,226,0.03);
  border: 1px solid rgba(0,181,226,0.1);
  border-radius: var(--r);
  padding: 10px 12px 8px;
  overflow: hidden;
}
#liveViz { display: block; width: 100%; height: 80px; }

@media (max-width: 768px) {
  .viz-card { padding: 6px 10px 4px; }
  #liveViz { height: 52px; }
}

/* ── Liberation Watch ──────────────────────────────────────────────────────── */
.lib-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 0 28px 20px;
}

/* Archive view — song cards */
.lib-song-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}
.lib-song-card:hover { border-color: var(--border-hi); }

.lib-song-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.lib-song-title { font-size: 16px; font-weight: 700; color: var(--text); }
.lib-dormant-badge {
  font-size: 22px;
  font-weight: 900;
  color: var(--blue);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.lib-song-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.lib-song-meta strong { color: var(--text-dim); }
.lib-song-notes { margin-top: 4px; color: var(--text-dim); font-style: italic; }

.lib-appearances { margin-top: 4px; }
.lib-appearances-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}
.lib-dates { display: flex; flex-wrap: wrap; gap: 6px; }
.lib-date-chip {
  display: inline-flex;
  align-items: center;
  background: var(--blue-dim);
  border: 1px solid rgba(0,181,226,0.3);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--blue);
  white-space: nowrap;
  line-height: 1.4;
}
.lib-chip-city { font-weight: 400; color: var(--text-dim); }
.pred-lib-badge { display: inline-flex; margin-top: 6px; }

/* Liberation loading state */
.lib-loading { display: flex; align-items: center; gap: 10px; padding: 32px 0; justify-content: center; color: var(--text-muted); font-size: 13px; }
.lib-spinner { width: 18px; height: 18px; border: 2px solid rgba(0,181,226,0.25); border-top-color: var(--blue); border-radius: 50%; animation: spin 0.8s linear infinite; flex-shrink: 0; }

/* All dormant view — compact rows */
.lib-all-list { font-size: 13px; }
.lib-row {
  display: grid;
  grid-template-columns: 38px 20px 1fr 60px 72px 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.lib-row:last-child { border-bottom: none; }
.lib-row-archive { color: var(--text); }
.lib-rank { font-size: 11px; color: var(--text-muted); text-align: right; }
.lib-row-dot { font-size: 10px; color: var(--text-muted); text-align: center; }
.lib-row-archive .lib-row-dot { color: var(--blue); }
.lib-row-title { font-weight: 600; color: inherit; }
.lib-row-archive .lib-row-title { color: var(--text); }
.lib-row-days { font-weight: 700; color: var(--blue); text-align: right; white-space: nowrap; }
.lib-row:not(.lib-row-archive) .lib-row-days { color: var(--text-muted); }
.lib-row-since { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.lib-row-notes { font-size: 11px; color: var(--text-muted); font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 768px) {
  .lib-controls { padding: 0 16px 16px; }
  #liberationBody { padding: 0 16px 28px !important; }
  .lib-row {
    grid-template-columns: 30px 16px 1fr 52px;
    gap: 6px;
  }
  .lib-row-since { display: none; }
  .lib-row-notes { display: none; }
}

/* ─── Builder mobile: input + Add + Encore Break wrap on narrow screens ─── */
@media (max-width: 480px) {
  .builder-song-entry { flex-wrap: wrap; }
  .builder-song-entry .filter-input { width: 100%; }
  .builder-song-entry #builderAddBtn,
  .builder-song-entry #builderBreakBtn { flex: 1; }
}

/* ─── Banter ─────────────────────────────────────────────────────────────── */
.show-banter-section {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.show-banter-toggle {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.show-banter-toggle::-webkit-details-marker { display: none; }
.show-banter-toggle::before { content: "▸"; transition: transform .15s; }
details.show-banter-section[open] .show-banter-toggle::before { transform: rotate(90deg); }
.show-banter-count {
  background: rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 10px;
}
.show-banter-list { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.banter-entry {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
}
.banter-entry-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.banter-ts { opacity: .6; font-size: 10px; }
.banter-entry-text { font-size: 13px; line-height: 1.55; color: var(--text); }
.banter-play-btn, .banter-dl-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08); border: 1px solid var(--border);
  border-radius: 4px; color: var(--text); cursor: pointer;
  font-size: 10px; padding: 2px 6px; text-decoration: none;
  transition: background .15s;
}
.banter-play-btn:hover, .banter-dl-btn:hover { background: rgba(255,255,255,.16); }

/* Banter search results */
.banter-search-wrap { padding: 0; }
.banter-result {
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.banter-result:last-child { border-bottom: none; }
.banter-result-meta {
  font-size: 12px;
  margin-bottom: 5px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
}
.banter-result-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}
.banter-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 10px 0 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.banter-section-label:first-child { margin-top: 0; border-top: none; }
.banter-window-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 1px 5px;
  border-radius: 3px;
  vertical-align: middle;
}
.banter-window-pre-show  { background: rgba(100,160,255,.18); color: #7ab4ff; }
.banter-window-gap       { background: rgba(80,200,120,.15);  color: #6dcf8e; }
.banter-window-post-show { background: rgba(255,180,60,.15);  color: #f0a840; }

/* ─── Stats tab ───────────────────────────────────────────────────────────── */
.stats-highlight-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  padding: 0 28px; margin-bottom: 22px;
}
.stats-hi { padding: 16px 18px; }
.stats-hi-lbl {
  font-size: 10px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.12em; margin-bottom: 7px;
}
.stats-hi-val { font-size: 16px; font-weight: 700; color: var(--white); line-height: 1.35; }

.stats-years { padding: 0 28px 48px; display: flex; flex-direction: column; gap: 26px; }
.stats-loading, .stats-empty { color: var(--text-muted); font-size: 13px; padding: 8px 0; }

/* ── Year section — premium, scannable layout ── */
.sy {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r);
  padding: 26px 28px 28px; transition: border-color .2s, box-shadow .2s;
}
.sy:hover { border-color: var(--border-hi); box-shadow: 0 0 24px var(--blue-glow); }

/* Year anchor — the visual anchor of each section */
.sy-anchor {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--border);
}
.sy-year {
  font-size: 60px; font-weight: 900; line-height: 0.85; letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums; color: var(--blue);
  background: linear-gradient(135deg, var(--blue) 0%, var(--white) 92%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.sy-anchor-sub {
  font-size: 11px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.16em; padding-bottom: 6px;
}

/* Headline stat tiles — raised */
.sy-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
.sy-tile {
  background: var(--panel-hi); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 7px; transition: border-color .2s;
}
.sy-tile:hover { border-color: var(--border-hi); }
.sy-tile-val {
  font-size: 34px; font-weight: 900; color: var(--blue); line-height: 1;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.sy-tile-lbl { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.14em; }

/* Story stats — inset wells with color-coded accent */
.sy-stories { display: flex; flex-direction: column; gap: 14px; }
.sy-story {
  padding: 14px 16px 15px; border-radius: var(--r-sm);
  background: var(--bg2); border: 1px solid var(--border); border-left: 3px solid var(--border-hi);
}
.sy-story--len   { border-left-color: var(--amber); background: rgba(255,176,32,0.06); }
.sy-story--top   { border-left-color: var(--blue); }
.sy-story--debut { border-left-color: var(--green); }
.sy-story--bust  { border-left-color: var(--amber); }
.sy-story--rare  { border-left-color: var(--text-muted); }

.sy-story-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.sy-story-lbl { font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; }
.sy-badge {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  background: var(--blue-dim); color: var(--blue); font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
}
.sy-badge.green { background: var(--green-dim); color: var(--green); }
.sy-badge.amber { background: var(--amber-dim); color: var(--amber); }
.sy-hint { font-size: 11px; color: var(--text-muted); margin: -3px 0 9px; }
.sy-note { font-size: 11px; color: var(--amber); opacity: 0.9; margin-top: 9px; }

/* Featured average-length value */
.sy-len { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sy-len-val {
  font-size: 30px; font-weight: 900; color: var(--amber); line-height: 1;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.sy-len-meta { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* Chips (shared) */
.sy-chips { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.stats-chip {
  display: inline-block; padding: 3px 11px; border-radius: 20px;
  background: var(--panel-hi); border: 1px solid var(--border);
  color: var(--text); font-size: 12px; line-height: 1.5; white-space: nowrap;
}
.stats-chip.top   { border-color: var(--border-hi); color: var(--blue); background: var(--blue-dim); }
.stats-chip.debut { border-color: rgba(0,230,118,0.35); color: var(--green); background: var(--green-dim); }
.stats-chip.bust  { border-color: rgba(255,176,32,0.4); color: var(--amber); background: var(--amber-dim); }
.stats-chip.rare  { color: var(--text-dim); }
.stats-more { font-size: 11px; color: var(--text-muted); margin-left: 2px; align-self: center; }

@media (max-width: 720px) {
  .stats-highlight-row { grid-template-columns: 1fr; padding: 0 16px; gap: 10px; }
  .stats-years { padding: 0 16px 44px; gap: 18px; }
  .sy { padding: 20px 18px 22px; }
  .sy-year { font-size: 46px; }
  .sy-tiles { gap: 10px; margin-bottom: 20px; }
  .sy-tile { padding: 14px 14px; }
  .sy-tile-val { font-size: 26px; }
  .sy-len-val { font-size: 26px; }
}
