/* Earshot for nerds — Dark Archival Musicology Design System */

:root {
  color-scheme: dark;
  --bg: #080c14;
  --bg-elevated: #0f1624;
  --bg-card: #131c2e;
  --bg-card-hover: #182338;
  --bg-input: #0b111d;
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.3);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.14);
  --cyan: #06b6d4;
  --cyan-soft: rgba(6, 182, 212, 0.14);
  --rose: #f43f5e;
  --rose-soft: rgba(244, 63, 94, 0.14);
  --violet: #a78bfa;
  --violet-soft: rgba(167, 139, 250, 0.14);
  --gold-accent: #fde047;
  --radius: 14px;
  --radius-sm: 10px;
  --font-sans: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 15% -10%, rgba(245, 158, 11, 0.11), transparent 60%),
    radial-gradient(ellipse 70% 45% at 85% -10%, rgba(6, 182, 212, 0.09), transparent 55%);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  padding-bottom: 92px;
}

a {
  color: var(--cyan);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

button, input, select {
  font-family: inherit;
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

.mono {
  font-family: var(--font-mono);
}

.container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(11, 17, 29, 0.96) 0%, rgba(8, 12, 20, 0.94) 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  padding-top: env(safe-area-inset-top);
}

.header-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0 10px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  flex: 1 1 380px;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  border-radius: 12px;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.brand-wrap:active {
  transform: scale(0.99);
}
@media (hover: hover) and (pointer: fine) {
  .brand-wrap:hover {
    opacity: 0.92;
  }
  .brand-wrap:hover .brand-logo {
    transform: scale(1.04);
  }
}
.brand-wrap:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
  background: #080c14;
  border: 1px solid rgba(129, 140, 248, 0.36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 2px 6px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.brand-title {
  margin: 0;
  font-size: clamp(1.1rem, 2.1vw, 1.38rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mobile-ready-dot {
  display: none;
}

.nerd-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  transform: translateY(-1.5px);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(217, 119, 6, 0.1));
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.brand-sub {
  margin: 3px 0 0;
  font-size: 0.79rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 0 1 auto;
  max-width: 100%;
}

@media (min-width: 640px) {
  .header-actions {
    margin-left: auto;
    justify-content: flex-end;
  }
}

.header-secondary-items {
  display: contents;
}

.header-actions > #index-status-pill,
.header-secondary-items > #index-status-pill {
  order: 1;
}

.header-actions > #btn-open-scanner {
  order: 2;
}

.header-actions > #btn-open-crate {
  order: 3;
}

.header-secondary-items > #btn-open-guide {
  order: 4;
}

.header-secondary-items > #btn-theme-toggle {
  order: 5;
}

.header-secondary-items > #btn-lang-toggle {
  order: 6;
}

.header-secondary-items > #btn-open-legal {
  order: 7;
}

.pill-btn.mobile-topbar-icon-btn,
.mobile-topbar-icon-btn,
.pill-btn.mobile-only-scanner-item,
.mobile-only-scanner-item,
.mobile-more-head,
.discog-agent-close.mobile-only-close,
.mobile-only-close,
.nav-label-short {
  display: none;
}

.nav-tab-icon {
  line-height: 1;
  flex-shrink: 0;
}

.mobile-agent-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 2px var(--bg-card);
  pointer-events: none;
}

.mobile-agent-dot.hidden {
  display: none;
}

.discog-agent-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.index-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  animation: pulseDot 1.4s ease-in-out infinite;
}
.status-dot.ready {
  background: var(--emerald);
  animation: none;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

.pill-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.pill-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

/* Primary Nav Tabs & Live Discography Agent Bar */
.header-bottom-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  margin: 2px 0 12px;
}

.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  gap: 6px;
  overflow-x: visible;
  padding: 5px;
  margin: 0;
  background: rgba(15, 22, 36, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.discog-agent-wrap {
  position: relative;
  flex: 1 1 440px;
  max-width: 580px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.discog-agent-card {
  position: relative;
  flex: 1 1 100%;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.discog-agent-helper {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.discog-agent-bar {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 8px 10px;
  background: linear-gradient(135deg, rgba(15, 22, 36, 0.92), rgba(19, 28, 46, 0.88));
  border: 1px solid rgba(6, 182, 212, 0.32);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.discog-agent-head-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.discog-agent-input-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

.discog-agent-bar:focus-within {
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.16);
}

.discog-agent-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #67e8f9;
  white-space: nowrap;
}

.discog-agent-input {
  flex: 1 1 220px;
  min-width: 180px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: var(--bg-input);
  color: var(--text);
  font-size: 0.86rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.discog-agent-input::-webkit-search-cancel-button,
.discog-agent-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.discog-agent-input:focus {
  border-color: var(--cyan);
}

.discog-agent-btn {
  flex: 0 0 auto;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.55);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(6, 182, 212, 0.18));
  color: #fef3c7;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.discog-agent-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.36), rgba(6, 182, 212, 0.28));
  border-color: rgba(251, 191, 36, 0.85);
}

.discog-agent-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.discog-agent-live-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(460px, 92vw);
  z-index: 70;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 22, 36, 0.98);
  border: 1px solid rgba(6, 182, 212, 0.45);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.discog-agent-live-panel.is-success {
  border-color: rgba(16, 185, 129, 0.55);
}

.discog-agent-live-panel.is-error {
  border-color: rgba(244, 63, 94, 0.55);
}

.discog-agent-live-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--text);
}

.discog-agent-live-head strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discog-agent-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(6, 182, 212, 0.25);
  border-top-color: var(--cyan);
  animation: agentSpin 0.75s linear infinite;
  flex-shrink: 0;
}

.discog-agent-live-panel.is-success .discog-agent-spinner,
.discog-agent-live-panel.is-error .discog-agent-spinner {
  animation: none;
  border: none;
  width: auto;
  height: auto;
}

@keyframes agentSpin {
  to { transform: rotate(360deg); }
}

.discog-agent-close {
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.discog-agent-close:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.discog-agent-progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.discog-agent-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  transition: width 0.25s ease;
}

.discog-agent-live-panel.is-success .discog-agent-progress-fill {
  background: var(--emerald);
}

.discog-agent-live-panel.is-error .discog-agent-progress-fill {
  background: var(--rose);
}

.discog-agent-live-step {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.discog-agent-live-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  word-break: break-word;
}

.agent-cta-pill {
  border-color: rgba(6, 182, 212, 0.45);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.14), rgba(245, 158, 11, 0.12));
  color: #67e8f9;
}
.agent-cta-pill:hover {
  border-color: rgba(245, 158, 11, 0.65);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.24), rgba(245, 158, 11, 0.2));
  color: #fef3c7;
}

.discog-queue-pill {
  flex: 0 0 auto;
  min-height: 44px;
  min-width: 44px;
  padding: 6px 11px;
  border-radius: 10px;
  border: 1px solid rgba(6, 182, 212, 0.42);
  background: rgba(6, 182, 212, 0.14);
  color: #67e8f9;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.discog-queue-pill:hover {
  background: rgba(6, 182, 212, 0.24);
  border-color: rgba(6, 182, 212, 0.7);
  color: #ecfeff;
}
.discog-queue-pill.is-done {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
}
.discog-queue-pill.is-step1 {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.16);
  color: #fde68a;
}

.discog-agent-queue-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  max-height: 220px;
  overflow-y: auto;
}
.discog-agent-queue-head {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}
.discog-queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(8, 12, 20, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
}
.discog-queue-item-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.discog-queue-item-artist {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.discog-queue-item-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.discog-queue-stage-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}
.discog-queue-stage-badge.is-step1 {
  background: rgba(245, 158, 11, 0.16);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.42);
}
.discog-queue-stage-badge.is-step2 {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.42);
}
.discog-queue-open-btn {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(30, 41, 59, 0.65);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.discog-queue-open-btn:hover {
  border-color: var(--cyan);
  color: #67e8f9;
}

.nav-tab {
  flex: 0 0 auto;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  background: rgba(19, 28, 46, 0.45);
  color: #cbd5e1;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.nav-tab:hover {
  color: #f8fafc;
  background: rgba(30, 41, 59, 0.75);
  border-color: rgba(148, 163, 184, 0.24);
}
.nav-tab.active {
  color: #fef3c7;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.26), rgba(217, 119, 6, 0.16));
  border: 1px solid rgba(251, 191, 36, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 2px 6px rgba(0, 0, 0, 0.35);
  font-weight: 700;
}

main.container {
  padding-top: 16px;
}

/* Search Panel */
.search-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 18px;
}

.search-panel--hero {
  background:
    radial-gradient(ellipse 85% 110% at 18% -25%, rgba(245, 158, 11, 0.08), transparent 60%),
    radial-gradient(ellipse 65% 100% at 85% -20%, rgba(6, 182, 212, 0.06), transparent 55%),
    var(--bg-elevated);
  border: 1px solid rgba(251, 191, 36, 0.24);
  box-shadow:
    0 10px 28px -12px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.search-hero-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  flex-wrap: wrap;
}

.search-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  min-width: 0;
  cursor: pointer;
}

.search-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.42);
  color: #fcd34d;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.search-hero-title {
  color: #e2e8f0;
  font-size: 0.88rem;
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}

.search-hero-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.scanner-topbar-btn {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(6, 182, 212, 0.16));
  border-color: rgba(52, 211, 153, 0.55);
  color: #a7f3d0;
  font-weight: 700;
}
.scanner-topbar-btn:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.34), rgba(6, 182, 212, 0.24));
  border-color: rgba(110, 231, 183, 0.85);
  color: #ffffff;
}

.scanner-hero-btn {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.14));
  border-color: rgba(52, 211, 153, 0.52);
  color: #a7f3d0;
  font-size: 0.76rem;
  font-weight: 700;
}
.scanner-hero-btn:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.32), rgba(6, 182, 212, 0.22));
  border-color: rgba(110, 231, 183, 0.82);
  color: #ffffff;
}

.guide-topbar-btn,
.guide-hero-btn,
.guide-footer-btn {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(245, 158, 11, 0.14));
  border-color: rgba(167, 139, 250, 0.55);
  color: #ede9fe;
  font-weight: 700;
  min-height: 44px;
  min-width: 44px;
  max-width: 100%;
  white-space: normal;
  line-height: 1.25;
  text-align: center;
}

.guide-hero-btn {
  font-size: 0.78rem;
}

.guide-topbar-btn:hover,
.guide-hero-btn:hover,
.guide-footer-btn:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.34), rgba(245, 158, 11, 0.24));
  border-color: rgba(196, 181, 253, 0.85);
  color: #ffffff;
}

.guide-topbar-btn.is-active,
.guide-hero-btn.is-active,
.guide-footer-btn.is-active {
  border-color: rgba(251, 191, 36, 0.88);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.26), rgba(139, 92, 246, 0.24));
  color: #fef3c7;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.24);
}

.search-kbd-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.search-kbd-hint kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 22, 36, 0.75);
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.45);
}

@media (max-width: 767px), (pointer: coarse) {
  .search-hero-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.scanner-topbar-btn {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(6, 182, 212, 0.16));
  border-color: rgba(52, 211, 153, 0.55);
  color: #a7f3d0;
  font-weight: 700;
}
.scanner-topbar-btn:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.34), rgba(6, 182, 212, 0.24));
  border-color: rgba(110, 231, 183, 0.85);
  color: #ffffff;
}

.scanner-hero-btn {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.14));
  border-color: rgba(52, 211, 153, 0.52);
  color: #a7f3d0;
  font-size: 0.76rem;
  font-weight: 700;
}
.scanner-hero-btn:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.32), rgba(6, 182, 212, 0.22));
  border-color: rgba(110, 231, 183, 0.82);
  color: #ffffff;
}

.search-kbd-hint {
    display: none;
  }
}

.search-box-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 9px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.38);
  color: #fbbf24;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 2;
}

input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
}

#omni-search-input::-webkit-search-cancel-button,
#omni-search-input::-webkit-search-decoration,
#artist-dir-search::-webkit-search-cancel-button,
#artist-dir-search::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.search-input {
  width: 100%;
  min-height: 54px;
  padding: 11px 118px 11px 55px;
  border-radius: 13px;
  border: 1.5px solid rgba(251, 191, 36, 0.55);
  background: linear-gradient(180deg, #18243a 0%, #10192b 100%);
  color: #ffffff;
  font-size: 1.03rem;
  font-weight: 500;
  outline: none;
  box-shadow:
    0 0 0 2px rgba(245, 158, 11, 0.09),
    0 6px 18px -6px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.search-input.has-query {
  padding-right: 54px;
}

#artist-dir-search.search-input {
  padding-right: 16px;
}

.search-input::placeholder {
  color: #cbd5e1;
  opacity: 1;
  font-weight: 400;
}

.search-input:hover {
  border-color: rgba(251, 191, 36, 0.78);
  box-shadow:
    0 0 0 3px rgba(245, 158, 11, 0.14),
    0 8px 22px -6px rgba(245, 158, 11, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.search-input:focus {
  border-color: #fbbf24;
  background: linear-gradient(180deg, #1d2b45 0%, #131e33 100%);
  box-shadow:
    0 0 0 4px rgba(245, 158, 11, 0.22),
    0 10px 26px -6px rgba(245, 158, 11, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.search-cta-btn {
  position: absolute;
  right: 5px;
  min-height: 44px;
  min-width: 44px;
  padding: 6px 14px;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.55);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(217, 119, 6, 0.18));
  color: #fef3c7;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 2px 8px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  touch-action: manipulation;
  z-index: 2;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.search-cta-btn:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.38), rgba(217, 119, 6, 0.26));
  border-color: rgba(251, 191, 36, 0.82);
  color: #ffffff;
}

.search-cta-btn:active {
  transform: scale(0.98);
}

.clear-btn {
  position: absolute;
  right: 5px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 8px;
  border: none;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  font-size: 1rem;
  display: grid;
  place-items: center;
  z-index: 2;
}
.clear-btn:hover {
  background: rgba(148, 163, 184, 0.25);
  color: var(--text);
}

@media (max-width: 480px) {
  .search-input {
    min-height: 54px;
    padding: 10px 100px 10px 52px;
    font-size: 16px;
  }
  .search-input.has-query {
    padding-right: 52px;
  }
  #artist-dir-search.search-input {
    padding-right: 14px;
  }
  .search-icon {
    left: 8px;
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }
  .search-cta-btn {
    right: 5px;
    padding: 6px 11px;
    font-size: 0.8rem;
    min-height: 44px;
    min-width: 44px;
  }
  .clear-btn {
    right: 5px;
  }
}

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
  align-items: center;
}

.chip-label {
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-right: 2px;
}

.quick-chip {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.quick-chip:hover {
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.45);
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.filter-field label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.filter-select, .filter-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 0.85rem;
}
.filter-select:focus, .filter-input:focus {
  outline: none;
  border-color: var(--cyan);
}

.tracks-week-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(6, 182, 212, 0.06);
  border: 1px solid rgba(6, 182, 212, 0.25);
  min-width: 0;
  max-width: 100%;
}
.tracks-week-date-field {
  flex: 0 0 232px;
  min-width: 215px;
}
.tracks-week-date-field label {
  white-space: nowrap;
}
.tracks-date-input {
  color-scheme: dark;
  width: 100%;
  min-height: 40px;
  cursor: pointer;
}
.tracks-week-select-field {
  flex: 1 1 280px;
  min-width: 0;
}
.tracks-week-nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  max-width: 100%;
}
.tracks-week-nav-actions .btn-sm {
  white-space: nowrap;
}
.badge-tracks-new {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.badge-tracks-up {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
}
.badge-tracks-down {
  background: rgba(244, 63, 94, 0.14);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

/* Results Section */
.results-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.results-count {
  font-size: 0.88rem;
  color: var(--text-muted);
}
.results-count strong {
  color: var(--text);
  font-family: var(--font-mono);
}

.artist-matches-strip {
  margin-bottom: 20px;
}

.section-heading {
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.artist-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
}

.artist-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .artist-card:hover {
    transform: translateY(-2px);
    background: var(--bg-card-hover);
    border-color: rgba(6, 182, 212, 0.45);
  }
  .artist-card.is-discog-complete-verified:hover {
    border-color: rgba(52, 211, 153, 0.88);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.16) 0%, var(--bg-card-hover) 52%);
  }
}

.artist-card.is-discog-complete-verified {
  border: 1.5px solid rgba(16, 185, 129, 0.62);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.11) 0%, var(--bg-card) 48%);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.16), 0 10px 24px -12px rgba(16, 185, 129, 0.35);
}

.artist-card.is-discog-complete-verifying {
  border-color: rgba(245, 158, 11, 0.55);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.09) 0%, var(--bg-card) 48%);
}

.artist-card.is-discog-catalog {
  border-color: rgba(6, 182, 212, 0.28);
}

.artist-discog-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.015em;
  min-width: 0;
  max-width: 100%;
}

.artist-discog-status-main {
  min-width: 0;
  overflow-wrap: anywhere;
}

.artist-discog-status-meta {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  white-space: nowrap;
  max-width: 100%;
}

.artist-discog-status-bar.is-complete-verified {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.24), rgba(6, 182, 212, 0.14));
  border: 1px solid rgba(16, 185, 129, 0.52);
  color: #6ee7b7;
}

.artist-discog-status-bar.is-complete-verified .artist-discog-status-meta {
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #a7f3d0;
}

.artist-discog-status-bar.is-complete-verifying {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fcd34d;
}

.artist-discog-status-bar.is-partial-catalog {
  background: rgba(6, 182, 212, 0.10);
  border: 1px solid rgba(6, 182, 212, 0.28);
  color: #67e8f9;
  font-weight: 700;
}

.artist-discog-status-bar.is-partial-catalog .artist-discog-status-meta {
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #a5f3fc;
}

.artist-discog-status-bar.is-archived-tracks {
  background: rgba(148, 163, 184, 0.07);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--text-muted);
  font-weight: 600;
}

.artist-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.artist-name {
  margin: 0;
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--text);
}

.artist-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 12px;
}

@media (max-width: 480px) {
  .track-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.track-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
  max-width: 100%;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.track-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.track-card-main {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.cover-thumb {
  width: 78px;
  height: 78px;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid var(--border);
  overflow: hidden;
  display: grid;
  place-items: center;
  position: relative;
}
.cover-thumb.cover-thumb-dual {
  width: 138px;
  height: 70px;
  display: flex;
  gap: 6px;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}
.cover-dual-item {
  flex: 1 1 0;
  height: 100%;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #1e293b, #0f172a);
  overflow: hidden;
  position: relative;
}
.cover-dual-item.is-single {
  border-color: rgba(245, 158, 11, 0.45);
}
.cover-dual-item.is-album {
  border-color: rgba(16, 185, 129, 0.45);
}
.cover-kind-tag {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 3px;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
  padding: 1px 3px;
  border-radius: 4px;
  background: rgba(8, 12, 20, 0.86);
  color: var(--text);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  pointer-events: none;
  line-height: 1.25;
}
.cover-dual-item.is-single .cover-kind-tag {
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.cover-dual-item.is-album .cover-kind-tag {
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
@media (max-width: 480px) {
  .cover-thumb {
    width: 68px;
    height: 68px;
  }
  .cover-thumb.cover-thumb-dual {
    width: 116px;
    height: 60px;
    gap: 4px;
  }
  .cover-kind-tag {
    font-size: 0.5rem;
    left: 2px;
    right: 2px;
    bottom: 2px;
  }
}
.cover-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cover-thumb[data-cover-lightbox],
.cover-dual-item[data-cover-lightbox],
#mini-cover {
  cursor: pointer;
}
.cover-placeholder {
  font-size: 1.6rem;
  opacity: 0.55;
}

.track-info {
  min-width: 0;
  flex: 1;
}

.track-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
  cursor: pointer;
}
.track-title:hover {
  color: var(--amber);
}

.track-artist-btn {
  background: none;
  border: none;
  padding: 4px 0;
  margin: 0;
  min-height: 44px;
  min-width: 44px;
  max-width: 100%;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  color: var(--cyan);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  word-break: break-word;
}
.track-artist-btn:hover {
  text-decoration: underline;
}

.track-album {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  line-height: 1.35;
  word-break: break-word;
}
.track-single-sub {
  color: #fbbf24;
  font-weight: 500;
}

.badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
}
.badge-date {
  font-family: var(--font-mono);
  background: var(--amber-soft);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.badge-ver-high {
  background: var(--emerald-soft);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.badge-ver-mid {
  background: var(--cyan-soft);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.badge-ver-low {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.badge-chart {
  background: var(--cyan-soft);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.badge-gold {
  background: rgba(250, 204, 21, 0.15);
  color: #fde047;
  border: 1px solid rgba(250, 204, 21, 0.35);
}
.badge-mello {
  background: var(--rose-soft);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.35);
}
.badge-special {
  background: var(--violet-soft);
  color: #c4b5fd;
  border: 1px solid rgba(167, 139, 250, 0.35);
}
.badge-tier-complete {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
}
.badge-tier-catalog {
  background: rgba(6, 182, 212, 0.14);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.35);
}
.badge-tier-archived {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.quick-chip.tier-pill.active {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.55);
}
.discog-section-heading {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 14px 0 8px;
}

.track-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
  padding-top: 9px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}
.track-card-actions .btn-sm {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
  font-size: 0.78rem;
}

.card-provider-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.card-provider-link:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.07);
  text-decoration: none;
}

.btn {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}
.btn:active {
  transform: scale(0.98);
}
.btn-sm {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
  font-size: 0.78rem;
}
.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #f59e0b;
  color: #080c14;
  font-weight: 700;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}
.btn-discog-complete {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #34d399;
  color: #041f17;
  font-weight: 800;
  box-shadow: 0 4px 14px -4px rgba(16, 185, 129, 0.45);
}
.btn-discog-complete:hover {
  background: linear-gradient(135deg, #34d399, #10b981);
  border-color: #6ee7b7;
}
.btn-discog-catalog {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.42);
  color: #67e8f9;
  font-weight: 700;
}
.btn-discog-catalog:hover {
  background: rgba(6, 182, 212, 0.25);
  border-color: rgba(6, 182, 212, 0.65);
}
.btn-discog-archived {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.24);
  color: #cbd5e1;
  font-weight: 600;
}
.btn-discog-archived:hover {
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.4);
  color: var(--text);
}
.btn-play {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}
.btn-play:hover {
  background: rgba(16, 185, 129, 0.24);
}
.btn-play.playing {
  background: #10b981;
  color: #06281e;
}

/* Artist Discography View */
.artist-hero {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  min-width: 0;
  max-width: 100%;
}

.artist-hero-top {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
}

.artist-hero-photo-card {
  flex-shrink: 0;
  width: 148px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.artist-hero-photo {
  width: 148px;
  height: 148px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: radial-gradient(circle at 30% 25%, rgba(34, 211, 238, 0.18), rgba(15, 23, 42, 0.95) 70%);
  box-shadow: 0 10px 26px -10px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  user-select: none;
  -webkit-user-select: none;
}

.artist-hero-photo.is-clickable {
  cursor: pointer;
}

.artist-hero-photo.is-clickable:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.artist-hero-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  transition: transform 0.22s ease;
}

@media (hover: hover) and (pointer: fine) {
  .artist-hero-photo.is-clickable:hover .artist-hero-photo-img {
    transform: scale(1.04);
  }
  .artist-hero-photo.is-clickable:hover .cover-zoom-hint {
    transform: scale(1.08);
    background: rgba(6, 182, 212, 0.9);
    border-color: rgba(255, 255, 255, 0.45);
  }
}

.artist-hero-photo-icon {
  font-size: 1.5rem;
  line-height: 1;
  opacity: 0.9;
}

.artist-hero-photo-monogram {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #67e8f9;
  line-height: 1.1;
}

.artist-hero-photo-caption {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.artist-hero-photo-source {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.artist-hero-photo-source a {
  color: var(--text-muted);
  text-decoration: none;
}

.artist-hero-photo-source a:hover {
  color: #67e8f9;
  text-decoration: underline;
}

.artist-hero-main {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
}

.artist-hero-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.artist-hero-head > div {
  min-width: 0;
  max-width: 100%;
}

.artist-hero-title {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 800;
}

.artist-concise-bio {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 820px;
}

.artist-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 13px;
}
.stat-box-label {
  font-size: 0.69rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}
.stat-box-val {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 2px;
}

.sub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.sub-tab {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.83rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.sub-tab.active {
  background: var(--cyan-soft);
  border-color: var(--cyan);
  color: #67e8f9;
}

.discography-group {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}

.discography-group-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.discography-group-header.is-collapsible-header {
  cursor: pointer;
  min-height: 58px;
  user-select: none;
  -webkit-user-select: none;
  border-bottom: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.discography-group.is-collapsible.is-expanded .discography-group-header.is-collapsible-header {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.045);
}

@media (hover: hover) and (pointer: fine) {
  .discography-group-header.is-collapsible-header:hover {
    background: rgba(255, 255, 255, 0.06);
  }
}

.discography-group-header.is-collapsible-header:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: -2px;
}

.discog-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 240px;
}

.discog-group-cover {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  flex-shrink: 0;
}

.discog-header-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.discog-header-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
}

.discog-group-date {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
  flex-shrink: 0;
}

.discog-header-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.discog-header-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  max-width: 100%;
}

.discog-track-count-badge {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.discog-expand-pill {
  min-height: 36px;
  padding: 5px 11px;
  border-radius: 9px;
  border: 1px solid rgba(6, 182, 212, 0.38);
  background: var(--cyan-soft);
  color: #67e8f9;
  font-size: 0.77rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.discography-group.is-expanded .discog-expand-pill {
  border-color: rgba(245, 158, 11, 0.45);
  background: var(--amber-soft);
  color: #fbbf24;
}

.discography-group-body {
  min-width: 0;
}

.discography-group-title {
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  word-break: break-word;
}

.discography-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}
.discography-row:last-child {
  border-bottom: none;
}
.discography-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.discography-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  flex: 1;
}

.discography-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--amber);
  min-width: 86px;
  flex-shrink: 0;
}

.discography-cover-thumb {
  width: 64px;
  height: 64px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .discography-cover-thumb:hover {
    transform: scale(1.03);
    border-color: var(--border-strong);
  }
}
.discography-cover-thumb.cover-thumb-dual {
  width: 124px;
  height: 60px;
  gap: 5px;
}
.discography-cover-thumb.cover-thumb-dual .cover-kind-tag {
  font-size: 0.52rem;
  left: 2px;
  right: 2px;
  bottom: 2px;
  padding: 1px 2px;
}

.discography-row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 599px) {
  .discography-row {
    padding: 11px 12px;
    gap: 8px;
  }
  .discography-row-left {
    flex-wrap: wrap;
    min-width: 0;
    width: 100%;
    gap: 5px 10px;
    align-items: flex-start;
  }
  .discography-date {
    flex: 1 0 100%;
    min-width: 0;
    font-size: 0.75rem;
  }
  .discography-cover-thumb {
    width: 58px;
    height: 58px;
  }
  .discography-cover-thumb.cover-thumb-dual {
    width: 112px;
    height: 56px;
    gap: 4px;
  }
  .discography-cover-thumb.cover-thumb-dual .cover-kind-tag {
    font-size: 0.48rem;
  }
  .discography-row-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Track Dossier Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(4, 7, 13, 0.82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
.modal-backdrop[hidden] {
  display: none;
}

.modal-panel {
  width: 100%;
  max-width: 980px;
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(8, 12, 20, 0.9);
  border-bottom: 1px solid var(--border);
}

.modal-close {
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.modal-close:hover {
  background: var(--rose-soft);
  border-color: var(--rose);
}

.modal-body {
  padding: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dossier-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
}

.dossier-covers-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  flex-shrink: 0;
  max-width: 100%;
}

.dossier-cover-card {
  width: 180px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.dossier-covers-wrap.is-dual .dossier-cover-card {
  width: 148px;
}

.dossier-cover {
  width: 180px;
  height: 180px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid var(--border-strong);
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
}

.dossier-covers-wrap.is-dual .dossier-cover {
  width: 148px;
  height: 148px;
}

.dossier-cover-card.is-single-cover .dossier-cover {
  border-color: rgba(245, 158, 11, 0.45);
}

.dossier-cover-card.is-album-cover .dossier-cover {
  border-color: rgba(16, 185, 129, 0.45);
}

.dossier-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.dossier-cover-card.is-clickable {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  border-radius: 14px;
}

.dossier-cover-card.is-clickable:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
}

.cover-zoom-hint {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(8, 12, 20, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--text);
  font-size: 0.76rem;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
  .dossier-cover-card.is-clickable:hover .dossier-cover img {
    transform: scale(1.04);
  }
  .dossier-cover-card.is-clickable:hover .cover-zoom-hint {
    transform: scale(1.08);
    background: rgba(245, 158, 11, 0.9);
    border-color: rgba(255, 255, 255, 0.45);
  }
}

.dossier-cover-caption {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.cover-cap-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  width: fit-content;
}

.cover-cap-title {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

@media (max-width: 560px) {
  .dossier-cover {
    width: 130px;
    height: 130px;
  }
  .dossier-covers-wrap:not(.is-dual) .dossier-cover-card {
    width: 130px;
  }
  .dossier-covers-wrap.is-dual {
    width: 100%;
    gap: 10px;
  }
  .dossier-covers-wrap.is-dual .dossier-cover-card {
    flex: 1 1 0;
    min-width: 0;
    max-width: 156px;
  }
  .dossier-covers-wrap.is-dual .dossier-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

.dossier-hero-info {
  flex: 1;
  min-width: 240px;
}

.dossier-title {
  margin: 0;
  font-size: clamp(1.3rem, 2.8vw, 1.85rem);
  font-weight: 800;
  line-height: 1.2;
}

.dossier-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px;
}

.dossier-box h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.dossier-album-meta {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.dossier-album-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.dossier-album-link {
  background: none;
  border: none;
  padding: 0;
  min-height: 44px;
  min-width: 44px;
  max-width: 100%;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  color: var(--text);
  font-size: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(6, 182, 212, 0.45);
  text-underline-offset: 3px;
  cursor: pointer;
}
.dossier-album-link:hover {
  color: var(--cyan);
  text-decoration-color: var(--cyan);
}

.dossier-jump-pill {
  min-height: 44px;
  min-width: 44px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: var(--amber-soft);
  color: #fbbf24;
  font-size: 0.74rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.dossier-jump-pill:hover {
  background: rgba(245, 158, 11, 0.24);
}

.album-appearances-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.album-entry-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(15, 22, 36, 0.45);
}
.album-entry-row:last-child {
  border-bottom: none;
}
.album-entry-row:hover {
  background: rgba(255, 255, 255, 0.03);
}
.album-entry-row.is-original-album {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.11), rgba(245, 158, 11, 0.05));
  border-left: 3px solid var(--emerald);
}
.album-entry-row.is-original-single {
  background: rgba(245, 158, 11, 0.06);
  border-left: 3px solid var(--amber);
}

.album-entry-main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1 1 220px;
}

.album-entry-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--amber);
  min-width: 82px;
  padding-top: 2px;
  flex-shrink: 0;
}

.album-entry-info {
  min-width: 0;
  flex: 1;
}

.album-entry-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.album-entry-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  word-break: break-word;
}

.album-entry-sub {
  margin-top: 3px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.album-entry-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.album-src-chip {
  font-size: 0.71rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.11);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text-muted);
  white-space: nowrap;
}
a.album-src-chip {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  color: var(--cyan);
  border-color: rgba(6, 182, 212, 0.3);
  background: var(--cyan-soft);
}
a.album-src-chip:hover {
  background: rgba(6, 182, 212, 0.24);
  text-decoration: none;
}

.badge-alb-orig {
  background: var(--emerald-soft);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.badge-alb-single {
  background: var(--amber-soft);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.badge-alb-comp {
  background: var(--cyan-soft);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.badge-alb-deluxe {
  background: var(--violet-soft);
  color: #c4b5fd;
  border: 1px solid rgba(167, 139, 250, 0.35);
}
.badge-alb-live {
  background: var(--rose-soft);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.35);
}
.badge-alb-artist {
  background: var(--cyan-soft);
  color: #67e8f9;
  border: 1px solid rgba(34, 211, 238, 0.45);
}

.source-table-wrap {
  overflow-x: auto;
}

.source-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.source-table th, .source-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.source-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.audio-safe-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.09), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.embed-frame-wrap {
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}
.embed-frame-wrap iframe {
  width: 100%;
  border: 0;
  display: block;
}
.embed-frame-wrap iframe.yt-embed-iframe {
  width: 100%;
  min-width: 200px;
  min-height: 220px;
  aspect-ratio: 16 / 9;
  max-height: 340px;
  background: #000;
}
.yt-embed-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.92);
  border-top: 1px solid var(--border);
}
.yt-embed-footer a {
  color: var(--cyan);
  font-weight: 600;
  text-decoration: none;
}
.yt-embed-footer a:hover {
  text-decoration: underline;
}

/* Song Lyrics Buttons & Expandable Panels */
.btn-lyrics {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(129, 140, 248, 0.45);
  color: #c7d2fe;
}
.btn-lyrics:hover {
  background: rgba(99, 102, 241, 0.28);
  border-color: rgba(165, 180, 252, 0.75);
  color: #ffffff;
}
.btn-lyrics.is-active {
  background: rgba(99, 102, 241, 0.32);
  border-color: #818cf8;
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.35);
}

.btn-lyrics-icon {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 10px;
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(129, 140, 248, 0.38);
  color: #c7d2fe;
}
.btn-lyrics-icon:hover {
  background: rgba(99, 102, 241, 0.28);
  border-color: rgba(165, 180, 252, 0.75);
  color: #ffffff;
}
.btn-lyrics-icon.is-active {
  background: rgba(99, 102, 241, 0.34);
  border-color: #818cf8;
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.35);
}

.dossier-lyrics-panel {
  margin-top: 4px;
  border-radius: 12px;
  border: 1px solid rgba(129, 140, 248, 0.38);
  background: rgba(8, 12, 20, 0.92);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}
.dossier-lyrics-panel.hidden,
.inline-track-lyrics-wrap.hidden {
  display: none !important;
}

.dossier-lyrics-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}
.dossier-lyrics-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #c7d2fe;
  min-width: 0;
  word-break: break-word;
}
.dossier-lyrics-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.dossier-lyrics-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.38);
  white-space: nowrap;
}
.dossier-lyrics-badge.is-loading {
  background: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
  border-color: rgba(129, 140, 248, 0.45);
}
.dossier-lyrics-badge.is-fallback {
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.4);
}

.dossier-lyrics-body {
  max-height: 340px;
  overflow-y: auto;
  white-space: pre-line;
  font-size: 0.88rem;
  line-height: 1.68;
  color: #e2e8f0;
  padding-right: 6px;
  user-select: text;
  -webkit-user-select: text;
  word-break: break-word;
}

.dossier-lyrics-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.inline-track-lyrics-wrap {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  margin-top: 6px;
}

/* Sticky Mini Player */
.mini-player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  background: rgba(11, 17, 29, 0.96);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(16, 185, 129, 0.35);
  padding: 10px max(16px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}
.mini-player[hidden] {
  display: none;
}

.mini-player-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mini-track-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
  flex: 1;
}

.mini-cover {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-card);
  flex-shrink: 0;
}

.mini-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1.4;
  min-width: 220px;
}

.progress-range {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  accent-color: var(--emerald);
  cursor: pointer;
}

.apple-attr-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  max-width: 100%;
  white-space: normal;
  line-height: 1.3;
  word-break: break-word;
}
.apple-attr-link:hover {
  background: rgba(255, 255, 255, 0.16);
  text-decoration: none;
}

/* On This Day Bar */
.otd-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px;
  margin-bottom: 16px;
}
.otd-controls > .filter-field {
  min-width: 112px;
}
.otd-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

/* Footer */
.site-footer {
  margin-top: 38px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.empty-state {
  background: var(--bg-elevated);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  color: var(--text-muted);
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.hidden {
  display: none !important;
}

/* Cross-Browser & Touch Device Input Font Size (prevents iOS Safari auto-zoom) */
@media (max-width: 1024px), (pointer: coarse) {
  .search-input,
  .filter-select,
  .filter-input,
  .discog-agent-input,
  .nerd-guide-search-input {
    font-size: 16px;
  }
}

/* Dual Dossier Covers on Medium Viewports (561px - 820px) */
@media (min-width: 561px) and (max-width: 820px) {
  .dossier-covers-wrap.is-dual .dossier-cover-card {
    width: 134px;
  }
  .dossier-covers-wrap.is-dual .dossier-cover {
    width: 134px;
    height: 134px;
  }
}

/* Tablet Portrait (600px - 899px) */
@media (min-width: 600px) and (max-width: 899px) {
  .track-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .artist-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .filters-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #tab-artists .filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cover-thumb.cover-thumb-dual {
    width: 116px;
    height: 58px;
    gap: 4px;
  }
}

/* Tablet & Narrow Desktop Header Wrapping (<= 1279px) */
@media (max-width: 1279px) {
  .discog-agent-wrap {
    flex: 1 1 100%;
    max-width: 100%;
    align-items: stretch;
  }
}

@media (max-width: 899px) {
  .discog-agent-live-panel {
    position: static;
    width: 100%;
    margin-top: 8px;
  }
}

/* Tablet Landscape (900px - 1199px) */
@media (min-width: 900px) and (max-width: 1199px) {
  .track-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .artist-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
  .filters-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Compact Native Music-App Topbar + Bottom Nav on Mobile (<= 639px) */
@media (max-width: 639px) {
  body {
    padding-bottom: calc(74px + env(safe-area-inset-bottom));
  }
  body.has-mini-player {
    padding-bottom: calc(174px + env(safe-area-inset-bottom));
  }
  .site-header {
    position: static;
    top: auto;
    z-index: auto;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 0;
    box-shadow: none;
    padding-top: 0;
  }
  .site-header > .container {
    padding-left: 0;
    padding-right: 0;
  }
  .header-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 46;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: calc(54px + env(safe-area-inset-top));
    padding: calc(5px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 5px max(12px, env(safe-area-inset-left));
    background: rgba(11, 17, 29, 0.95);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.34);
    transform: translateY(0);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.24s ease;
    will-change: transform;
  }
  .site-header.is-header-hidden .header-top {
    transform: translateY(-105%);
    box-shadow: none;
    pointer-events: none;
  }
  .brand-wrap {
    flex: 1 1 auto;
    min-width: 0;
    gap: 8px;
  }
  .brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }
  .brand-title {
    font-size: clamp(0.9rem, 4.1vw, 1.05rem);
    flex-wrap: nowrap;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
  }
  #ui-brand-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .brand-wrap .nerd-tag,
  .brand-sub {
    display: none;
  }
  .mobile-ready-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--amber);
    animation: pulseDot 1.4s ease-in-out infinite;
  }
  .mobile-ready-dot.ready {
    background: var(--emerald);
    animation: none;
  }
  .header-actions {
    flex: 0 0 auto;
    width: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 5px;
  }
  .header-actions > #btn-open-scanner,
  .header-actions > #btn-open-crate,
  .header-secondary-items > #index-status-pill,
  .header-secondary-items > #btn-open-guide,
  .header-secondary-items > #btn-theme-toggle,
  .header-secondary-items > #btn-lang-toggle,
  .header-secondary-items > #btn-open-legal {
    order: 0;
  }
  #btn-open-scanner {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 12px;
    font-size: 1.05rem;
    line-height: 1;
  }
  #ui-scanner-btn {
    display: none;
  }
  #btn-open-crate {
    min-width: 44px;
    min-height: 44px;
    height: 44px;
    padding: 0 9px;
    border-radius: 12px;
    font-size: 0.9rem;
    gap: 4px;
  }
  #ui-crate-btn {
    display: none;
  }
  .header-secondary-items.is-mobile-open .pill-btn.mobile-only-scanner-item {
    display: inline-flex;
    border-color: rgba(52, 211, 153, 0.48);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(6, 182, 212, 0.12));
    color: #a7f3d0;
  }
  .pill-btn.mobile-topbar-icon-btn,
  .mobile-topbar-icon-btn {
    display: inline-flex;
    position: relative;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 12px;
    font-size: 1.05rem;
    line-height: 1;
  }
  .pill-btn.mobile-topbar-icon-btn[aria-expanded="true"],
  .mobile-topbar-icon-btn[aria-expanded="true"] {
    background: var(--amber-soft);
    border-color: rgba(251, 191, 36, 0.55);
    color: #fef3c7;
  }
  .header-secondary-items {
    display: none;
  }
  .header-secondary-items.is-mobile-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    position: fixed;
    top: calc(60px + env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    z-index: 52;
    padding: 12px;
    border-radius: 16px;
    background: rgba(15, 22, 36, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
  }
  .mobile-more-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 2px;
  }
  .discog-agent-close.mobile-only-close,
  .mobile-only-close {
    display: grid;
    min-width: 44px;
    min-height: 44px;
  }
  .header-secondary-items.is-mobile-open .index-pill {
    width: 100%;
    white-space: normal;
    line-height: 1.35;
    padding: 8px 12px;
  }
  .header-secondary-items.is-mobile-open .pill-btn {
    width: 100%;
    min-height: 44px;
    justify-content: flex-start;
    padding: 10px 14px;
    font-size: 0.84rem;
    border-radius: 12px;
  }
  .header-bottom-bar {
    margin: 0;
    padding: 0;
    height: 0;
    gap: 0;
  }
  .nav-tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    width: 100%;
    max-width: 100%;
    padding: 4px max(6px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    margin: 0;
    border-radius: 0;
    border: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(10, 15, 26, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.45);
  }
  .nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 44px;
    min-height: 50px;
    padding: 4px 2px;
    gap: 2px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-align: center;
  }
  .nav-tab-icon {
    font-size: 1.05rem;
    line-height: 1.1;
  }
  .nav-tab.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(217, 119, 6, 0.12));
    border-color: rgba(251, 191, 36, 0.45);
    color: #fef3c7;
  }
  .nav-label-full {
    display: none;
  }
  .nav-label-short {
    display: block;
    max-width: 100%;
    line-height: 1.28;
    padding-bottom: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .discog-agent-wrap {
    display: none;
  }
  .discog-agent-wrap.is-mobile-open,
  .discog-agent-wrap.has-live-panel {
    display: flex;
    position: fixed;
    top: calc(60px + env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    z-index: 51;
    max-width: none;
    width: auto;
    max-height: calc(100dvh - 134px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow-y: auto;
  }
  .site-header.is-header-hidden .discog-agent-wrap.has-live-panel:not(.is-mobile-open) {
    top: calc(10px + env(safe-area-inset-top));
  }
  .discog-agent-wrap.has-live-panel:not(.is-mobile-open) .discog-agent-bar {
    display: none;
  }
  .discog-agent-wrap.is-mobile-open .discog-agent-bar {
    padding: 10px;
    gap: 8px;
    background: rgba(15, 22, 36, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-color: rgba(6, 182, 212, 0.48);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
  }
  .discog-agent-head-row {
    gap: 6px;
    flex-wrap: nowrap;
  }
  .discog-agent-badge {
    padding: 0 2px;
  }
  .discog-agent-input-row {
    flex-wrap: wrap;
    gap: 6px;
  }
  .discog-agent-input {
    flex: 1 1 200px;
    min-width: 0;
    font-size: 16px;
  }
  .discog-agent-btn {
    flex: 1 0 auto;
    padding: 8px 12px;
    justify-content: center;
  }
  .discog-queue-pill {
    flex: 0 0 auto;
    padding: 6px 10px;
  }
  .discog-agent-wrap .discog-agent-live-panel {
    position: static;
    width: 100%;
    margin-top: 8px;
    z-index: auto;
  }
  .discog-agent-wrap.has-live-panel:not(.is-mobile-open) .discog-agent-live-panel {
    margin-top: 0;
  }
  main.container {
    padding-top: calc(64px + env(safe-area-inset-top));
  }
  .mini-player {
    bottom: calc(58px + env(safe-area-inset-bottom));
    z-index: 49;
    padding: 8px max(10px, env(safe-area-inset-right));
  }
  .mini-player-inner {
    gap: 6px;
  }
  .mini-track-meta {
    min-width: 0;
    flex: 1 1 100%;
    gap: 8px;
  }
  .mini-cover {
    width: 36px;
    height: 36px;
  }
  .mini-controls {
    min-width: 0;
    flex: 1 1 100%;
    gap: 6px;
  }
  #mini-spectrum-canvas,
  #mini-viz-toggle {
    display: none;
  }
  .mini-player .apple-attr-link {
    font-size: 0.72rem;
    padding: 6px 10px;
  }
}

/* Mobile Portrait (320px - 599px) */
@media (max-width: 599px) {
  .quick-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .quick-chips::-webkit-scrollbar {
    display: none;
  }
  .quick-chip,
  .chip-label {
    flex-shrink: 0;
  }
  .filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  #tab-search .filters-grid > .filter-field:last-child {
    grid-column: 1 / -1;
  }
  .track-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .artist-cards-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .track-card-actions,
  .discography-row-actions {
    max-width: 100%;
    gap: 6px;
  }
  .modal-backdrop {
    padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
  }
  .modal-panel {
    max-height: calc(100vh - 14px);
    max-height: calc(100dvh - 14px);
    border-radius: 16px;
  }
  .modal-body {
    padding: 14px;
    gap: 14px;
  }
  .dossier-hero-info {
    min-width: 0;
    width: 100%;
  }
  .otd-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .otd-controls > .filter-field {
    min-width: 0;
    width: 100%;
  }
  .otd-controls > .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
  .otd-controls .filter-select {
    padding-left: 10px;
    padding-right: 28px;
  }
  .tracks-week-bar {
    padding: 10px;
    gap: 8px;
  }
  .tracks-week-date-field {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }
  .tracks-week-date-field label {
    white-space: normal;
  }
  .tracks-date-input {
    min-height: 44px;
    font-size: 16px;
  }
  .tracks-week-select-field {
    flex: 1 1 100%;
  }
  .tracks-week-nav-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .tracks-week-nav-actions .btn-sm {
    width: 100%;
    padding: 8px 6px;
    font-size: 0.74rem;
    white-space: normal;
  }
  #discog-inline-filter {
    min-width: 0 !important;
    width: 100%;
  }
  .discography-group-header.is-collapsible-header {
    padding: 10px 12px;
    gap: 8px;
  }
  .discog-header-left {
    flex: 1 1 100%;
    gap: 10px;
  }
  .discog-group-cover {
    width: 46px;
    height: 46px;
  }
  .discog-header-right {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .artist-hero {
    padding: 14px;
  }
  .artist-hero-top {
    flex-direction: column;
    gap: 12px;
  }
  .artist-hero-photo-card {
    width: 112px;
  }
  .artist-hero-photo {
    width: 112px;
    height: 112px;
  }
  .artist-hero-main {
    width: 100%;
  }
}

@media (max-width: 389px) {
  .header-top {
    padding-left: max(8px, env(safe-area-inset-left));
    padding-right: max(8px, env(safe-area-inset-right));
    gap: 6px;
  }
  .brand-logo {
    width: 30px;
    height: 30px;
  }
  .header-actions {
    gap: 4px;
  }
  #btn-open-crate {
    padding: 0 6px;
  }
}
@media (max-width: 379px) {
  .scanner-album-btn-label {
    display: none;
  }
}

/* Extra-Small Mobile (<= 349px, e.g. 320px width) */
@media (max-width: 349px) {
  .brand-logo {
    width: 32px;
    height: 32px;
  }
  .discog-agent-btn {
    flex: 1 1 100%;
  }
  .nav-tabs {
    padding: 4px;
    gap: 2px;
  }
  .nav-tab {
    min-width: 44px;
    min-height: 48px;
    padding: 3px 1px;
    font-size: 0.6rem;
    gap: 2px;
  }
  .nav-tab-icon {
    font-size: 0.98rem;
  }
  .filters-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  #tab-search .filters-grid > .filter-field:last-child {
    grid-column: auto;
  }
  .cover-thumb {
    width: 58px;
    height: 58px;
  }
  .cover-thumb.cover-thumb-dual {
    width: 104px;
    height: 54px;
    gap: 3px;
  }
  .discography-cover-thumb {
    width: 52px;
    height: 52px;
  }
  .discography-cover-thumb.cover-thumb-dual {
    width: 100px;
    height: 50px;
    gap: 3px;
  }
  .discog-group-cover {
    width: 40px;
    height: 40px;
  }
  .discog-expand-pill {
    padding: 4px 9px;
    font-size: 0.73rem;
  }
}

/* Mobile Landscape (short vertical viewport) */
@media (max-height: 520px) and (orientation: landscape) {
  .site-header {
    position: relative;
  }
  .modal-topbar {
    padding: 8px 14px;
  }
}

/* Official Track Number Pill (Per Album / Singel) */
.discog-track-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 7px;
  min-width: 34px;
  padding: 3px 6px;
  text-align: center;
  flex-shrink: 0;
}
.discog-track-num.is-aside-pill {
  color: #34d399;
  background: var(--emerald-soft);
  border-color: rgba(16, 185, 129, 0.4);
}
.discog-track-num.is-bside-pill {
  color: #fbbf24;
  background: var(--amber-soft);
  border-color: rgba(245, 158, 11, 0.4);
}

/* World Country Chart Peaks Grid (Låt-Röntgen) */
.world-chart-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.world-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
}
.world-chart-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 22, 36, 0.65);
  border: 1px solid var(--border);
  min-width: 0;
}
.world-chart-card.is-no1 {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.16), rgba(245, 158, 11, 0.08));
  border-color: rgba(250, 204, 21, 0.55);
}
.world-chart-card.is-top3 {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(6, 182, 212, 0.08));
  border-color: rgba(16, 185, 129, 0.45);
}
.world-chart-card.is-top10 {
  background: rgba(6, 182, 212, 0.09);
  border-color: rgba(6, 182, 212, 0.35);
}
.world-chart-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.world-chart-country {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.world-chart-peak {
  font-family: var(--font-mono);
  font-size: 0.94rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 7px;
  background: rgba(148, 163, 184, 0.16);
  color: var(--text);
  flex-shrink: 0;
}
.world-chart-card.is-no1 .world-chart-peak {
  background: rgba(250, 204, 21, 0.25);
  color: #fde047;
  border: 1px solid rgba(250, 204, 21, 0.55);
}
.world-chart-card.is-top3 .world-chart-peak {
  background: rgba(16, 185, 129, 0.22);
  color: #34d399;
}
.world-chart-card.is-top10 .world-chart-peak {
  background: rgba(6, 182, 212, 0.22);
  color: #67e8f9;
}
.world-chart-name {
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.world-chart-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 0.71rem;
  color: var(--text-dim);
}
.crate-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
}

.mini-spectrum-canvas {
  width: 144px;
  height: 32px;
  border-radius: 7px;
  background: rgba(8, 12, 20, 0.85);
  border: 1px solid rgba(16, 185, 129, 0.28);
  flex-shrink: 0;
  display: block;
}
@media (max-width: 720px) {
  .mini-spectrum-canvas {
    width: 92px;
    height: 28px;
  }
}

/* World Heatmap Summary Bar */
.world-heatmap-wrap {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(8, 12, 20, 0.6);
  border: 1px solid var(--border);
}
.world-heatmap-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.12);
  gap: 2px;
  margin-top: 6px;
}
.world-heatmap-seg.is-no1 { background: #facc15; }
.world-heatmap-seg.is-top3 { background: #10b981; }
.world-heatmap-seg.is-top10 { background: #06b6d4; }
.world-heatmap-seg.is-other { background: #64748b; }
.world-heatmap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 0.73rem;
  color: var(--text-muted);
}

/* Flip the Record (7"/12" Vinyl A/B Side Switcher) */
.vinyl-flip-card {
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(15, 22, 36, 0.92));
  padding: 14px;
  transition: transform 0.35s ease, border-color 0.2s ease;
}
.vinyl-flip-card.is-flipped {
  border-color: rgba(6, 182, 212, 0.45);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.09), rgba(15, 22, 36, 0.92));
}
.vinyl-flip-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.vinyl-disc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, #f59e0b 0%, #f59e0b 24%, #0f172a 26%, #1e293b 65%, #080c14 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.68rem;
  font-weight: 800;
  color: #080c14;
  flex-shrink: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.vinyl-flip-card.is-flipped .vinyl-disc-icon {
  transform: rotateY(180deg) rotate(45deg);
}
.vinyl-sides-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 10px;
}
.vinyl-side-pane {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(8, 12, 20, 0.55);
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.vinyl-side-pane.is-active-side {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.07);
}

/* Sample / Cover A/B Chain */
.lineage-ab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 10px;
  margin-top: 8px;
}
.lineage-ab-node {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(8, 12, 20, 0.58);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Artist Career Trajectory Graph & Lineage */
.career-graph-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  min-width: 0;
  max-width: 100%;
}
.career-graph-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.career-graph-title {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.career-graph-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.career-graph-legend {
  font-size: 0.72rem;
  color: var(--text-dim);
}
.career-show-all-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.career-show-all-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  color: var(--text);
}
.career-show-all-btn.is-active {
  background: var(--cyan-soft);
  border-color: rgba(34, 211, 238, 0.55);
  color: #67e8f9;
}
.career-show-all-btn.is-reset-ready {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #fbbf24;
  color: #080c14;
}
.career-show-all-btn.is-reset-ready:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}
.career-graph-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-height: 82px;
  padding: 8px 2px 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.career-bar-btn {
  flex: 1 0 20px;
  min-width: 20px;
  max-width: 40px;
  min-height: 44px;
  padding: 4px 2px 3px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  color: var(--text-dim);
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.career-bar-btn.is-all-btn {
  flex: 0 0 44px;
  min-width: 44px;
  max-width: 48px;
  margin-right: 4px;
}
.career-bar-fill {
  width: 100%;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #22d3ee, #0284c7);
  min-height: 5px;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.career-bar-all-fill {
  background: linear-gradient(180deg, #94a3b8, #475569);
}
.career-bar-btn.is-all-btn.is-active .career-bar-all-fill {
  background: linear-gradient(180deg, #34d399, #059669);
}
.career-bar-btn.has-hit .career-bar-fill {
  background: linear-gradient(180deg, #fbbf24, #d97706);
}
.career-graph-bars.has-active-year .career-bar-btn:not(.is-active):not(.is-all-btn) {
  opacity: 0.42;
}
.career-graph-bars.has-active-year .career-bar-btn:not(.is-active):not(.is-all-btn):hover {
  opacity: 0.85;
}
.career-bar-btn.is-active {
  background: rgba(34, 211, 238, 0.14);
  border-color: rgba(34, 211, 238, 0.55);
  color: #f8fafc;
}
.career-bar-btn.is-active .career-bar-fill {
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.45);
}
.career-bar-btn.has-hit.is-active {
  background: rgba(251, 191, 36, 0.16);
  border-color: rgba(251, 191, 36, 0.7);
  color: #fde68a;
}
.career-bar-btn.has-hit.is-active .career-bar-fill {
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}
.career-bar-btn.is-all-btn.is-active {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(52, 211, 153, 0.55);
  color: #a7f3d0;
}
.career-bar-btn:hover .career-bar-fill {
  transform: scaleY(1.06);
}
.career-bar-yr {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  line-height: 1;
}

.artist-lineage-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(167, 139, 250, 0.06);
  border: 1px solid rgba(167, 139, 250, 0.28);
}
.lineage-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

/* Album Dossier LP Sides */
.album-sides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 12px;
}
.album-side-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(8, 12, 20, 0.52);
  overflow: hidden;
  min-width: 0;
}
.album-side-header {
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--amber);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.album-track-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}
.album-track-line:last-child {
  border-bottom: none;
}

/* Atlas & Producers Directory Grids */
.atlas-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 12px;
  margin-top: 12px;
}
.atlas-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.atlas-card.is-selected {
  border-color: var(--amber);
  background: rgba(245, 158, 11, 0.08);
}

/* Head-to-Head Compare View */
.compare-inputs-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.compare-vs-badge {
  min-height: 44px;
  padding: 0 12px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
}
.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.compare-side-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.compare-metric-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.compare-metric-vals {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
}
.compare-metric-vals .is-winner {
  color: #34d399;
}
@media (max-width: 720px) {
  .compare-inputs-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .compare-vs-badge {
    min-height: 34px;
    width: fit-content;
    justify-self: center;
  }
  .compare-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Discography Group Album-Röntgen Action Button */
.discog-album-xray-btn {
  min-height: 44px;
  min-width: 44px;
}

@media (max-width: 599px) {
  .world-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}
@media (max-width: 349px) {
  .world-chart-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Cover Artwork Lightbox Modal */
.cover-lightbox-backdrop {
  z-index: 80;
  background: rgba(4, 7, 13, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.cover-lightbox-panel {
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.82);
}

.cover-lightbox-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.cover-lightbox-header-meta .cover-cap-badge {
  flex-shrink: 0;
  white-space: nowrap;
}

.cover-lightbox-heading {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cover-lightbox-body {
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.cover-lightbox-switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.cover-lightbox-tab {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.cover-lightbox-tab:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.cover-lightbox-tab.active.is-single {
  background: var(--amber-soft);
  border-color: rgba(245, 158, 11, 0.65);
  color: #fbbf24;
}

.cover-lightbox-tab.active.is-album {
  background: var(--emerald-soft);
  border-color: rgba(16, 185, 129, 0.65);
  color: #34d399;
}

.cover-lightbox-stage {
  width: min(100%, 520px, calc(100dvh - 220px));
  min-width: 180px;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #080c14;
  border: 2px solid var(--border-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.cover-lightbox-stage.is-single {
  border-color: rgba(245, 158, 11, 0.55);
}

.cover-lightbox-stage.is-album {
  border-color: rgba(16, 185, 129, 0.55);
}

.cover-lightbox-stage.is-artist {
  border-color: rgba(34, 211, 238, 0.55);
}

.cover-lightbox-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #080c14;
}

.cover-lightbox-caption {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.cover-lightbox-release-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  word-break: break-word;
}

.cover-lightbox-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  word-break: break-word;
}

/* =====================================================================
   Hero Nerd Placeholder — All Song & Album Musicology in .dossier-hero
   ===================================================================== */
.hero-nerd-section {
  flex: 1 0 100%;
  width: 100%;
  min-width: 0;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-nerd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-nerd-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--text);
}

.hero-nerd-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.32);
  color: #67e8f9;
}

.hero-nerd-status.is-done {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.hero-nerd-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  min-width: 0;
}

.hero-nerd-card {
  background: rgba(9, 14, 24, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.hero-nerd-card.is-song {
  border-color: rgba(245, 158, 11, 0.34);
  background: linear-gradient(165deg, rgba(245, 158, 11, 0.06), rgba(9, 14, 24, 0.82) 42%);
}

.hero-nerd-card.is-album {
  border-color: rgba(16, 185, 129, 0.34);
  background: linear-gradient(165deg, rgba(16, 185, 129, 0.06), rgba(9, 14, 24, 0.82) 42%);
}

.hero-nerd-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.hero-nerd-card-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  min-width: 0;
}

.hero-nerd-card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.hero-nerd-subhead {
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 0 0 6px;
}

.hero-nerd-kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.hero-nerd-kv-item {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  padding: 7px 10px;
  min-width: 0;
}

.hero-nerd-kv-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.hero-nerd-kv-val {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.hero-nerd-fact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.hero-nerd-fact-item {
  font-size: 0.84rem;
  line-height: 1.48;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-left: 3px solid rgba(245, 158, 11, 0.65);
  border-radius: 8px;
  padding: 8px 10px;
  overflow-wrap: anywhere;
}

.hero-nerd-card.is-album .hero-nerd-fact-item {
  border-left-color: rgba(16, 185, 129, 0.68);
}

.hero-nerd-fact-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  color: #fbbf24;
  margin-right: 6px;
}

.hero-nerd-card.is-album .hero-nerd-fact-tag {
  color: #34d399;
}

.hero-nerd-musicians-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.hero-nerd-musician-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  line-height: 1.3;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.32);
  color: #e9d5ff;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.hero-nerd-musician-role {
  color: #c4b5fd;
  font-size: 0.72rem;
}

.hero-nerd-charts-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.hero-nerd-chart-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: var(--text);
}

.hero-nerd-chart-pill.is-no1 {
  background: rgba(250, 204, 21, 0.16);
  border-color: rgba(250, 204, 21, 0.52);
  color: #fde047;
}

.hero-nerd-chart-pill.is-top10 {
  background: rgba(6, 182, 212, 0.14);
  border-color: rgba(6, 182, 212, 0.42);
  color: #67e8f9;
}

.hero-nerd-wiki-excerpt {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 10px;
  padding: 9px 11px;
  overflow-wrap: anywhere;
}

.hero-nerd-sides-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.hero-nerd-side-box {
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 10px;
  padding: 8px;
  min-width: 0;
}

.hero-nerd-side-title {
  font-size: 0.71rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #34d399;
  margin-bottom: 6px;
}

.hero-nerd-album-tracks {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 240px;
  overflow-y: auto;
  min-width: 0;
}

.hero-nerd-track-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.48);
  border: 1px solid transparent;
  font-size: 0.78rem;
  min-width: 0;
}

.hero-nerd-track-row.is-active {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.45);
}

.hero-nerd-track-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  min-width: 20px;
  flex-shrink: 0;
}

.hero-nerd-track-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 600;
}

.hero-nerd-track-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.hero-nerd-track-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 30px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text);
  font-size: 0.72rem;
  cursor: pointer;
  touch-action: manipulation;
}

.hero-nerd-track-btn:hover {
  border-color: var(--emerald);
  color: #34d399;
}

.hero-nerd-card-foot {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 4px;
}

.hero-nerd-action-btn {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.48);
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-nerd-action-btn:hover {
  background: rgba(16, 185, 129, 0.24);
}

@media (max-width: 820px) {
  .hero-nerd-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-nerd-sides-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 599px), (pointer: coarse) {
  .hero-nerd-kv-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-nerd-track-btn {
    min-width: 44px;
    min-height: 44px;
  }
}

/* =====================================================================
   Clickable Placeholders & Universal Placeholder Inspector Modal
   ===================================================================== */
.is-clickable-placeholder {
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.14s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.is-clickable-placeholder:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

button.hero-nerd-musician-chip.is-clickable-placeholder {
  font-family: inherit;
  text-align: left;
  min-height: 36px;
}

.hero-nerd-musician-chip.is-clickable-placeholder:hover {
  background: rgba(139, 92, 246, 0.24);
  border-color: rgba(192, 132, 252, 0.72);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.22);
  transform: translateY(-1px);
}

.hero-nerd-musician-chip.is-clickable-placeholder:active {
  transform: scale(0.98);
}

.hero-nerd-kv-item.is-clickable-placeholder:hover {
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.14);
}

.hero-nerd-inline-entities {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 6px;
}

.hero-nerd-inline-entity-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 6px;
  padding: 2px 7px;
  color: var(--text);
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  touch-action: manipulation;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hero-nerd-inline-entity-btn:hover {
  background: rgba(34, 211, 238, 0.2);
  border-color: rgba(34, 211, 238, 0.65);
  color: #67e8f9;
}

button.hero-nerd-chart-pill.is-clickable-placeholder {
  font-family: inherit;
  min-height: 36px;
}

.hero-nerd-chart-pill.is-clickable-placeholder:hover {
  border-color: rgba(34, 211, 238, 0.65);
  background: rgba(34, 211, 238, 0.16);
  transform: translateY(-1px);
}

.world-chart-card.is-clickable-placeholder {
  font-family: inherit;
  color: inherit;
  text-align: left;
  width: 100%;
}

.world-chart-card.is-clickable-placeholder:hover {
  border-color: rgba(34, 211, 238, 0.65);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(6, 182, 212, 0.16);
}

button.badge.is-clickable-placeholder,
.badge.is-clickable-placeholder {
  font-family: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

button.badge.is-clickable-placeholder:hover,
.badge.is-clickable-placeholder:hover {
  filter: brightness(1.18);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(34, 211, 238, 0.2);
}

.hero-nerd-fact-item.is-clickable-placeholder:hover {
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(15, 23, 42, 0.82);
}

/* Placeholder Inspector Modal (Fakta-Röntgen) */
.placeholder-inspector-backdrop {
  z-index: 75;
  background: rgba(4, 7, 13, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.placeholder-inspector-panel {
  max-width: 880px;
}

.placeholder-inspector-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.inspector-entity-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inspector-entity-tab {
  min-height: 38px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.inspector-entity-tab:hover {
  border-color: var(--cyan);
  color: var(--text);
}

.inspector-entity-tab.is-active {
  background: var(--cyan-soft);
  border-color: var(--cyan);
  color: #67e8f9;
}

.inspector-hero {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(8, 12, 20, 0.96));
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 14px;
  padding: 14px;
}

.inspector-portrait-wrap {
  width: 118px;
  height: 118px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: radial-gradient(circle at 30% 25%, rgba(34, 211, 238, 0.18), rgba(15, 23, 42, 0.95) 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 4px;
}

.inspector-portrait-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.inspector-portrait-fallback-icon {
  font-size: 2rem;
  line-height: 1;
}

.inspector-portrait-fallback-initials {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 800;
  color: #67e8f9;
}

.inspector-hero-main {
  flex: 1 1 240px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inspector-title {
  margin: 0;
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  overflow-wrap: anywhere;
}

.inspector-subtitle {
  font-size: 0.84rem;
  color: var(--amber);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.inspector-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.32);
  color: #67e8f9;
}

.inspector-status-pill.is-done {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.inspector-facts-kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 8px;
}

.inspector-wiki-extract {
  font-size: 0.86rem;
  line-height: 1.56;
  color: #e2e8f0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.inspector-ext-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inspector-works-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 8px;
}

.inspector-works-filter-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 38px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.32);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text);
  font-family: inherit;
  font-size: 0.84rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.inspector-works-filter-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.22);
}

.inspector-works-filter-count {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

button.badge.is-clickable-placeholder.inspector-work-chip {
  min-height: 36px;
  padding: 5px 10px;
  max-width: 100%;
  white-space: normal;
  text-align: left;
  line-height: 1.3;
  flex-wrap: wrap;
}

.inspector-work-title {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.inspector-work-role {
  opacity: 0.82;
  font-weight: 500;
}

.inspector-work-arrow {
  opacity: 0.7;
  font-size: 0.74rem;
  margin-left: 2px;
  transition: transform 0.14s ease, opacity 0.14s ease;
}

button.badge.is-clickable-placeholder.inspector-work-chip:hover .inspector-work-arrow {
  opacity: 1;
  transform: translateX(2px);
}

@media (pointer: coarse) {
  button.badge.is-clickable-placeholder.inspector-work-chip {
    min-height: 44px;
    padding: 7px 11px;
  }
}

@media (max-width: 599px) {
  .inspector-portrait-wrap {
    width: 84px;
    height: 84px;
  }
  .inspector-works-filter-input {
    min-height: 44px;
    font-size: 16px;
  }
}

/* Person Chip Mini-Portrait Avatars & Gallery Strip */
.person-chip-avatar-slot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(139, 92, 246, 0.28));
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.person-chip-initials {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  color: #e2e8f0;
  letter-spacing: -0.02em;
  line-height: 1;
}

.person-chip-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.inspector-photo-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.inspector-gallery-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
  touch-action: manipulation;
  flex-shrink: 0;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.inspector-gallery-thumb:hover,
.inspector-gallery-thumb.is-selected {
  transform: translateY(-1px);
  border-color: var(--cyan);
  box-shadow: 0 4px 12px rgba(34, 211, 238, 0.28);
}

.inspector-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

/* Platform Entity Cards & Matched Credit Chips in Search */
.platform-entity-card {
  border-color: rgba(34, 211, 238, 0.28);
  background: linear-gradient(155deg, rgba(16, 26, 44, 0.94), rgba(10, 16, 28, 0.98));
}

.entity-card-head-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex: 1 1 auto;
}

.platform-entity-card .person-chip-avatar-slot {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  font-size: 0.9rem;
}

.badge-entity-role {
  background: rgba(34, 211, 238, 0.14);
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.3);
}

.badge-entity-artist {
  background: rgba(167, 139, 250, 0.12);
  color: #ddd6fe;
  border: 1px solid rgba(167, 139, 250, 0.26);
}

.track-matched-credits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  max-width: 100%;
}

.track-matched-credit-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  min-height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.34);
  background: rgba(14, 165, 233, 0.14);
  color: #e0f2fe;
  font: inherit;
  font-size: 0.74rem;
  line-height: 1.25;
  cursor: pointer;
  touch-action: manipulation;
  max-width: 100%;
  text-align: left;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.track-matched-credit-btn:hover,
.track-matched-credit-btn:focus-visible {
  background: rgba(34, 211, 238, 0.24);
  border-color: var(--cyan);
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .track-matched-credit-btn {
    min-height: 38px;
    font-size: 0.76rem;
  }
}

/* =====================================================================
   Light Theme Overrides (Opt-in via html[data-theme="light"]; Dark is default)
   ===================================================================== */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #eef2f6;
  --bg-elevated: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #ffffff;
  --border: rgba(15, 23, 42, 0.12);
  --border-strong: rgba(15, 23, 42, 0.24);
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --amber: #b45309;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --emerald: #047857;
  --emerald-soft: rgba(16, 185, 129, 0.13);
  --cyan: #0e7490;
  --cyan-soft: rgba(6, 182, 212, 0.12);
  --rose: #be123c;
  --rose-soft: rgba(244, 63, 94, 0.11);
  --violet: #6d28d9;
  --violet-soft: rgba(124, 58, 237, 0.11);
  --gold-accent: #a16207;
}

html[data-theme="light"] body {
  background-image:
    radial-gradient(ellipse 80% 50% at 15% -10%, rgba(245, 158, 11, 0.10), transparent 60%),
    radial-gradient(ellipse 70% 45% at 85% -10%, rgba(6, 182, 212, 0.08), transparent 55%);
}

html[data-theme="light"] .tracks-date-input {
  color-scheme: light;
}

@media (min-width: 640px) {
  html[data-theme="light"] .site-header {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.93) 100%);
    border-bottom-color: var(--border);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  }
  html[data-theme="light"] .nav-tabs {
    background: rgba(226, 232, 240, 0.72);
    border-color: var(--border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  }
  html[data-theme="light"] .nav-tab {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(15, 23, 42, 0.07);
    color: var(--text-muted);
  }
  html[data-theme="light"] .nav-tab:hover {
    color: var(--text);
    background: #ffffff;
    border-color: var(--border-strong);
  }
  html[data-theme="light"] .nav-tab.active {
    color: #92400e;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(217, 119, 6, 0.14));
    border-color: rgba(217, 119, 6, 0.5);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  }
}

html[data-theme="light"] .brand-title {
  color: var(--text);
}

html[data-theme="light"] .brand-logo {
  border-color: rgba(15, 23, 42, 0.18);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.14);
}

html[data-theme="light"] .nerd-tag {
  background: rgba(245, 158, 11, 0.15);
  color: #92400e;
  border-color: rgba(217, 119, 6, 0.42);
  box-shadow: none;
}

@media (max-width: 639px) {
  html[data-theme="light"] .site-header {
    background: none;
    border-bottom: 0;
    box-shadow: none;
  }
  html[data-theme="light"] .header-top {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: var(--border);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  }
  html[data-theme="light"] .pill-btn.mobile-topbar-icon-btn[aria-expanded="true"],
  html[data-theme="light"] .mobile-topbar-icon-btn[aria-expanded="true"] {
    color: #92400e;
    border-color: rgba(217, 119, 6, 0.5);
  }
  html[data-theme="light"] .header-secondary-items.is-mobile-open,
  html[data-theme="light"] .discog-agent-wrap.is-mobile-open .discog-agent-bar {
    background: rgba(255, 255, 255, 0.98);
    border-color: var(--border-strong);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  }
  html[data-theme="light"] .nav-tabs {
    background: rgba(255, 255, 255, 0.96);
    border-top-color: var(--border);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
  }
  html[data-theme="light"] .nav-tab {
    background: transparent;
    color: var(--text-muted);
  }
  html[data-theme="light"] .nav-tab.active {
    color: #92400e;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(217, 119, 6, 0.12));
    border-color: rgba(217, 119, 6, 0.48);
  }
}

/* Discography Agent & Queue */
html[data-theme="light"] .discog-agent-bar {
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
  border-color: rgba(14, 116, 144, 0.34);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .discog-agent-badge {
  color: #0e7490;
}

html[data-theme="light"] .discog-agent-input {
  border-color: var(--border-strong);
}

html[data-theme="light"] .discog-agent-btn {
  border-color: rgba(217, 119, 6, 0.5);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(6, 182, 212, 0.15));
  color: #92400e;
}

html[data-theme="light"] .discog-agent-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.32), rgba(6, 182, 212, 0.24));
  border-color: rgba(180, 83, 9, 0.7);
}

html[data-theme="light"] .discog-agent-live-panel {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(14, 116, 144, 0.45);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

html[data-theme="light"] .agent-cta-pill {
  color: #0e7490;
  border-color: rgba(14, 116, 144, 0.4);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.14), rgba(245, 158, 11, 0.12));
}

html[data-theme="light"] .agent-cta-pill:hover {
  color: #92400e;
}

html[data-theme="light"] .discog-queue-pill {
  color: #0e7490;
  border-color: rgba(14, 116, 144, 0.4);
  background: rgba(6, 182, 212, 0.12);
}

html[data-theme="light"] .discog-queue-pill:hover {
  color: #083344;
  background: rgba(6, 182, 212, 0.2);
}

html[data-theme="light"] .discog-queue-pill.is-done {
  color: #047857;
  border-color: rgba(4, 120, 87, 0.4);
  background: rgba(16, 185, 129, 0.13);
}

html[data-theme="light"] .discog-queue-pill.is-step1 {
  color: #92400e;
  border-color: rgba(180, 83, 9, 0.45);
  background: rgba(245, 158, 11, 0.16);
}

html[data-theme="light"] .discog-queue-item {
  background: #f8fafc;
  border-color: var(--border);
}

html[data-theme="light"] .discog-queue-stage-badge.is-step1 {
  background: rgba(245, 158, 11, 0.16);
  color: #92400e;
  border-color: rgba(180, 83, 9, 0.4);
}

html[data-theme="light"] .discog-queue-stage-badge.is-step2 {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
  border-color: rgba(4, 120, 87, 0.4);
}

html[data-theme="light"] .discog-queue-open-btn {
  background: #ffffff;
  border-color: var(--border-strong);
  color: var(--text);
}

html[data-theme="light"] .discog-queue-open-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* Cards, Covers, Badges & Buttons */
html[data-theme="light"] .search-panel,
html[data-theme="light"] .otd-controls,
html[data-theme="light"] .track-card,
html[data-theme="light"] .artist-card,
html[data-theme="light"] .artist-hero,
html[data-theme="light"] .discography-group,
html[data-theme="light"] .compare-side-card,
html[data-theme="light"] .atlas-card {
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .cover-thumb,
html[data-theme="light"] .cover-dual-item,
html[data-theme="light"] .dossier-cover {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

html[data-theme="light"] .cover-thumb.cover-thumb-dual {
  background: transparent;
}

html[data-theme="light"] .cover-kind-tag,
html[data-theme="light"] .cover-zoom-hint {
  background: rgba(15, 23, 42, 0.84);
  color: #f8fafc;
}

html[data-theme="light"] .cover-dual-item.is-single .cover-kind-tag {
  color: #fbbf24;
}

html[data-theme="light"] .cover-dual-item.is-album .cover-kind-tag {
  color: #34d399;
}

html[data-theme="light"] .track-single-sub,
html[data-theme="light"] .badge-date,
html[data-theme="light"] .badge-alb-single,
html[data-theme="light"] .quick-chip.tier-pill.active,
html[data-theme="light"] .crate-count-pill,
html[data-theme="light"] .dossier-jump-pill,
html[data-theme="light"] .cover-lightbox-tab.active.is-single,
html[data-theme="light"] .discography-group.is-expanded .discog-expand-pill,
html[data-theme="light"] .discog-track-num.is-bside-pill {
  color: #b45309;
}

html[data-theme="light"] .badge-ver-high,
html[data-theme="light"] .badge-tier-complete,
html[data-theme="light"] .badge-alb-orig,
html[data-theme="light"] .badge-tracks-new,
html[data-theme="light"] .btn-play,
html[data-theme="light"] .cover-lightbox-tab.active.is-album,
html[data-theme="light"] .discog-track-num.is-aside-pill,
html[data-theme="light"] .compare-metric-vals .is-winner,
html[data-theme="light"] .hero-nerd-action-btn {
  color: #047857;
}

html[data-theme="light"] .btn-play.playing {
  background: #059669;
  border-color: #047857;
  color: #ffffff;
}

html[data-theme="light"] .badge-tracks-up {
  color: #15803d;
}

html[data-theme="light"] .badge-ver-mid,
html[data-theme="light"] .badge-chart,
html[data-theme="light"] .badge-tier-catalog,
html[data-theme="light"] .badge-alb-comp,
html[data-theme="light"] .badge-alb-artist,
html[data-theme="light"] .sub-tab.active,
html[data-theme="light"] .discog-expand-pill,
html[data-theme="light"] .discog-track-num,
html[data-theme="light"] .career-show-all-btn.is-active {
  color: #0e7490;
}

html[data-theme="light"] .badge-gold {
  color: #854d0e;
  background: rgba(234, 179, 8, 0.16);
  border-color: rgba(202, 138, 4, 0.4);
}

html[data-theme="light"] .badge-mello,
html[data-theme="light"] .badge-alb-live,
html[data-theme="light"] .badge-tracks-down {
  color: #be123c;
}

html[data-theme="light"] .badge-special,
html[data-theme="light"] .badge-alb-deluxe {
  color: #6d28d9;
}

html[data-theme="light"] .btn-primary {
  color: #ffffff;
}

html[data-theme="light"] .artist-card.is-discog-complete-verified {
  border-color: rgba(5, 150, 105, 0.62);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.12) 0%, #ffffff 48%);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.16), 0 8px 20px -10px rgba(5, 150, 105, 0.28);
}

@media (hover: hover) and (pointer: fine) {
  html[data-theme="light"] .artist-card.is-discog-complete-verified:hover {
    border-color: rgba(4, 120, 87, 0.85);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.18) 0%, #f8fafc 52%);
  }
}

html[data-theme="light"] .artist-card.is-discog-complete-verifying {
  border-color: rgba(217, 119, 6, 0.55);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.1) 0%, #ffffff 48%);
}

html[data-theme="light"] .artist-discog-status-bar.is-complete-verified {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.12));
  border-color: rgba(5, 150, 105, 0.48);
  color: #065f46;
}

html[data-theme="light"] .artist-discog-status-bar.is-complete-verified .artist-discog-status-meta {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(4, 120, 87, 0.42);
  color: #064e3b;
}

html[data-theme="light"] .artist-discog-status-bar.is-complete-verifying {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(180, 83, 9, 0.42);
  color: #92400e;
}

html[data-theme="light"] .artist-discog-status-bar.is-partial-catalog {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(14, 116, 144, 0.34);
  color: #0e7490;
}

html[data-theme="light"] .artist-discog-status-bar.is-partial-catalog .artist-discog-status-meta {
  background: rgba(6, 182, 212, 0.16);
  border-color: rgba(14, 116, 144, 0.36);
  color: #155e75;
}

html[data-theme="light"] .artist-discog-status-bar.is-archived-tracks {
  background: rgba(15, 23, 42, 0.045);
  border-color: rgba(15, 23, 42, 0.14);
  color: #475569;
}

html[data-theme="light"] .btn-discog-complete {
  background: linear-gradient(135deg, #059669, #047857);
  border-color: #047857;
  color: #ffffff;
  box-shadow: 0 4px 12px -4px rgba(5, 150, 105, 0.4);
}

html[data-theme="light"] .btn-discog-complete:hover {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #059669;
}

html[data-theme="light"] .btn-discog-catalog {
  background: rgba(14, 116, 144, 0.1);
  border-color: rgba(14, 116, 144, 0.38);
  color: #0e7490;
}

html[data-theme="light"] .btn-discog-catalog:hover {
  background: rgba(14, 116, 144, 0.18);
  border-color: rgba(14, 116, 144, 0.58);
}

html[data-theme="light"] .btn-discog-archived {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.18);
  color: #334155;
}

html[data-theme="light"] .btn-discog-archived:hover {
  background: rgba(15, 23, 42, 0.1);
  border-color: rgba(15, 23, 42, 0.3);
  color: #0f172a;
}

html[data-theme="light"] .card-provider-link {
  background: rgba(15, 23, 42, 0.03);
  border-color: var(--border);
}

html[data-theme="light"] .card-provider-link:hover {
  background: rgba(15, 23, 42, 0.07);
}

html[data-theme="light"] .track-card-actions {
  border-top-color: var(--border);
}

html[data-theme="light"] .clear-btn {
  background: rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .clear-btn:hover {
  background: rgba(15, 23, 42, 0.13);
}

/* Artist Hero, Discography & Career Graph */
html[data-theme="light"] .artist-hero-photo,
html[data-theme="light"] .inspector-portrait-wrap {
  background: radial-gradient(circle at 30% 25%, rgba(6, 182, 212, 0.16), #e2e8f0 75%);
  border-color: rgba(14, 116, 144, 0.35);
  box-shadow: 0 8px 20px -10px rgba(15, 23, 42, 0.25);
}

html[data-theme="light"] .artist-hero-photo-monogram,
html[data-theme="light"] .inspector-portrait-fallback-initials,
html[data-theme="light"] .artist-hero-photo-source a:hover {
  color: #0e7490;
}

html[data-theme="light"] .discography-group-header {
  background: rgba(15, 23, 42, 0.025);
}

html[data-theme="light"] .discography-group.is-collapsible.is-expanded .discography-group-header.is-collapsible-header {
  background: rgba(15, 23, 42, 0.04);
}

@media (hover: hover) and (pointer: fine) {
  html[data-theme="light"] .discography-group-header.is-collapsible-header:hover {
    background: rgba(15, 23, 42, 0.055);
  }
}

html[data-theme="light"] .discography-row {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .discography-row:hover {
  background: rgba(15, 23, 42, 0.025);
}

html[data-theme="light"] .career-bar-btn.is-active {
  color: #0f172a;
}

html[data-theme="light"] .career-bar-btn.has-hit.is-active {
  color: #92400e;
}

html[data-theme="light"] .career-bar-btn.is-all-btn.is-active {
  color: #065f46;
}

html[data-theme="light"] .career-show-all-btn.is-reset-ready {
  color: #ffffff;
}

/* Modals, Lyrics, Mini-Player, Hero Nerd & Fakta-Röntgen */
html[data-theme="light"] .modal-backdrop,
html[data-theme="light"] .cover-lightbox-backdrop,
html[data-theme="light"] .placeholder-inspector-backdrop {
  background: rgba(15, 23, 42, 0.52);
}

html[data-theme="light"] .modal-panel,
html[data-theme="light"] .cover-lightbox-panel {
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
}

html[data-theme="light"] .modal-topbar {
  background: #ffffff;
  border-bottom-color: var(--border);
}

html[data-theme="light"] .album-entry-row {
  background: #ffffff;
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .album-entry-row:hover {
  background: #f8fafc;
}

html[data-theme="light"] .album-entry-row.is-original-album {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.12), rgba(245, 158, 11, 0.06));
}

html[data-theme="light"] .album-entry-row.is-original-single {
  background: rgba(245, 158, 11, 0.08);
}

html[data-theme="light"] .album-src-chip {
  background: rgba(15, 23, 42, 0.05);
  border-color: var(--border);
}

html[data-theme="light"] .btn-lyrics,
html[data-theme="light"] .btn-lyrics-icon {
  color: #4338ca;
  background: rgba(99, 102, 241, 0.10);
  border-color: rgba(99, 102, 241, 0.35);
}

html[data-theme="light"] .btn-lyrics:hover,
html[data-theme="light"] .btn-lyrics.is-active,
html[data-theme="light"] .btn-lyrics-icon:hover,
html[data-theme="light"] .btn-lyrics-icon.is-active {
  color: #312e81;
  background: rgba(99, 102, 241, 0.20);
  border-color: #6366f1;
}

html[data-theme="light"] .dossier-lyrics-panel {
  background: #ffffff;
  border-color: rgba(99, 102, 241, 0.32);
}

html[data-theme="light"] .dossier-lyrics-title {
  color: #4338ca;
}

html[data-theme="light"] .dossier-lyrics-badge {
  color: #047857;
  background: rgba(16, 185, 129, 0.13);
  border-color: rgba(4, 120, 87, 0.35);
}

html[data-theme="light"] .dossier-lyrics-badge.is-loading {
  color: #4338ca;
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(99, 102, 241, 0.38);
}

html[data-theme="light"] .dossier-lyrics-badge.is-fallback {
  color: #b45309;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(180, 83, 9, 0.38);
}

html[data-theme="light"] .dossier-lyrics-body {
  color: var(--text);
}

html[data-theme="light"] .mini-player {
  background: rgba(255, 255, 255, 0.96);
  border-top-color: rgba(4, 120, 87, 0.32);
  box-shadow: 0 -8px 26px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .apple-attr-link {
  background: rgba(15, 23, 42, 0.05);
  border-color: var(--border);
}

html[data-theme="light"] .apple-attr-link:hover {
  background: rgba(15, 23, 42, 0.10);
}

html[data-theme="light"] .mini-spectrum-canvas {
  background: #f1f5f9;
  border-color: rgba(4, 120, 87, 0.25);
}

html[data-theme="light"] .embed-frame-wrap {
  background: #f1f5f9;
}
html[data-theme="light"] .yt-embed-footer {
  background: #f8fafc;
  color: #334155;
}
html[data-theme="light"] .yt-embed-footer a {
  color: #0369a1;
}

html[data-theme="light"] .world-chart-card {
  background: #ffffff;
}

html[data-theme="light"] .world-chart-card.is-no1 {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.20), rgba(245, 158, 11, 0.10));
}

html[data-theme="light"] .world-chart-card.is-no1 .world-chart-peak {
  color: #854d0e;
  background: rgba(234, 179, 8, 0.24);
  border-color: rgba(202, 138, 4, 0.5);
}

html[data-theme="light"] .world-chart-card.is-top3 .world-chart-peak {
  color: #047857;
  background: rgba(16, 185, 129, 0.18);
}

html[data-theme="light"] .world-chart-card.is-top10 .world-chart-peak {
  color: #0e7490;
  background: rgba(6, 182, 212, 0.18);
}

html[data-theme="light"] .world-heatmap-wrap {
  background: #ffffff;
}

html[data-theme="light"] .vinyl-flip-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.10), #ffffff);
}

html[data-theme="light"] .vinyl-flip-card.is-flipped {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.10), #ffffff);
}

html[data-theme="light"] .vinyl-side-pane {
  background: #f8fafc;
}

html[data-theme="light"] .vinyl-side-pane.is-active-side {
  background: rgba(245, 158, 11, 0.10);
}

html[data-theme="light"] .lineage-ab-node {
  background: #f8fafc;
}

html[data-theme="light"] .album-side-box {
  background: #f8fafc;
}

html[data-theme="light"] .album-side-header {
  background: rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .cover-lightbox-stage,
html[data-theme="light"] .cover-lightbox-img {
  background: #f1f5f9;
}

html[data-theme="light"] .cover-lightbox-stage {
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

html[data-theme="light"] .hero-nerd-status {
  color: #0e7490;
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(14, 116, 144, 0.34);
}

html[data-theme="light"] .hero-nerd-status.is-done {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(4, 120, 87, 0.35);
}

html[data-theme="light"] .hero-nerd-card {
  background: #ffffff;
  border-color: var(--border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .hero-nerd-card.is-song {
  border-color: rgba(217, 119, 6, 0.35);
  background: linear-gradient(165deg, rgba(245, 158, 11, 0.08), #ffffff 42%);
}

html[data-theme="light"] .hero-nerd-card.is-album {
  border-color: rgba(4, 120, 87, 0.35);
  background: linear-gradient(165deg, rgba(16, 185, 129, 0.08), #ffffff 42%);
}

html[data-theme="light"] .hero-nerd-kv-item {
  background: #f8fafc;
  border-color: var(--border);
}

html[data-theme="light"] .hero-nerd-kv-item.is-clickable-placeholder:hover {
  background: #f1f5f9;
  border-color: rgba(14, 116, 144, 0.48);
}

html[data-theme="light"] .hero-nerd-fact-item {
  color: var(--text);
  background: #f8fafc;
  border-color: var(--border);
}

html[data-theme="light"] .hero-nerd-fact-item.is-clickable-placeholder:hover {
  background: #f1f5f9;
  border-color: rgba(14, 116, 144, 0.48);
}

html[data-theme="light"] .hero-nerd-fact-tag {
  color: #b45309;
}

html[data-theme="light"] .hero-nerd-card.is-album .hero-nerd-fact-tag {
  color: #047857;
}

html[data-theme="light"] .hero-nerd-musician-chip {
  color: #4c1d95;
  background: rgba(124, 58, 237, 0.09);
  border-color: rgba(109, 40, 217, 0.28);
}

html[data-theme="light"] .hero-nerd-musician-role {
  color: #6d28d9;
}

html[data-theme="light"] .hero-nerd-chart-pill {
  background: #f8fafc;
  border-color: var(--border);
}

html[data-theme="light"] .hero-nerd-chart-pill.is-no1 {
  color: #854d0e;
  background: rgba(234, 179, 8, 0.18);
  border-color: rgba(202, 138, 4, 0.45);
}

html[data-theme="light"] .hero-nerd-chart-pill.is-top10 {
  color: #0e7490;
  background: rgba(6, 182, 212, 0.13);
  border-color: rgba(14, 116, 144, 0.36);
}

html[data-theme="light"] .hero-nerd-wiki-excerpt,
html[data-theme="light"] .hero-nerd-side-box {
  background: #f8fafc;
  border-color: var(--border);
}

html[data-theme="light"] .hero-nerd-side-title {
  color: #047857;
}

html[data-theme="light"] .hero-nerd-track-row {
  background: #f8fafc;
}

html[data-theme="light"] .hero-nerd-track-btn {
  background: #ffffff;
  border-color: var(--border-strong);
}

html[data-theme="light"] .hero-nerd-track-btn:hover {
  color: #047857;
}

html[data-theme="light"] .hero-nerd-inline-entity-btn:hover {
  color: #0e7490;
}

html[data-theme="light"] .inspector-entity-tab.is-active {
  color: #0e7490;
}

html[data-theme="light"] .inspector-hero {
  background: linear-gradient(145deg, #ffffff, #f1f5f9);
  border-color: rgba(14, 116, 144, 0.3);
}

html[data-theme="light"] .inspector-status-pill {
  color: #0e7490;
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(14, 116, 144, 0.32);
}

html[data-theme="light"] .inspector-status-pill.is-done {
  color: #047857;
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(4, 120, 87, 0.38);
}

html[data-theme="light"] .inspector-wiki-extract {
  color: var(--text);
}

html[data-theme="light"] .inspector-works-filter-input {
  background: #ffffff;
  border-color: rgba(14, 116, 144, 0.35);
  color: var(--text);
}

html[data-theme="light"] button.badge.is-clickable-placeholder.inspector-work-chip:hover {
  background: rgba(14, 165, 233, 0.14);
  border-color: rgba(14, 116, 144, 0.55);
}

html[data-theme="light"] .person-chip-avatar-slot {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.16), rgba(124, 58, 237, 0.18));
  border-color: rgba(15, 23, 42, 0.18);
}

html[data-theme="light"] .person-chip-initials {
  color: #1e293b;
}

html[data-theme="light"] .inspector-gallery-thumb {
  background: #f1f5f9;
  border-color: rgba(14, 116, 144, 0.35);
}

html[data-theme="light"] .platform-entity-card {
  background: linear-gradient(155deg, #ffffff, #f0f9ff);
  border-color: rgba(14, 116, 144, 0.28);
}

html[data-theme="light"] .badge-entity-artist {
  color: #5b21b6;
  background: rgba(124, 58, 237, 0.10);
  border-color: rgba(109, 40, 217, 0.24);
}

html[data-theme="light"] .track-matched-credit-btn {
  color: #0c4a6e;
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 116, 144, 0.32);
}

html[data-theme="light"] .track-matched-credit-btn:hover,
html[data-theme="light"] .track-matched-credit-btn:focus-visible {
  background: rgba(14, 165, 233, 0.20);
  border-color: var(--cyan);
}

html[data-theme="light"] .search-panel--hero {
  background:
    radial-gradient(ellipse 85% 110% at 18% -25%, rgba(245, 158, 11, 0.08), transparent 60%),
    radial-gradient(ellipse 65% 100% at 85% -20%, rgba(6, 182, 212, 0.05), transparent 55%),
    var(--bg-elevated);
  border-color: rgba(217, 119, 6, 0.30);
  box-shadow:
    0 6px 20px -10px rgba(15, 23, 42, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] .search-hero-pill {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(217, 119, 6, 0.42);
  color: #92400e;
  box-shadow: none;
}

html[data-theme="light"] .search-hero-title {
  color: #334155;
}

html[data-theme="light"] .search-kbd-hint kbd {
  background: #ffffff;
  color: #475569;
  border-color: rgba(15, 23, 42, 0.18);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .search-icon {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(217, 119, 6, 0.38);
  color: #b45309;
  box-shadow: none;
}

html[data-theme="light"] .search-input {
  border: 1.5px solid rgba(217, 119, 6, 0.62);
  background: #ffffff;
  color: #0f172a;
  box-shadow:
    0 0 0 2px rgba(245, 158, 11, 0.10),
    0 4px 14px -4px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .search-input::placeholder {
  color: #64748b;
  opacity: 1;
}

html[data-theme="light"] .search-input:hover {
  border-color: #d97706;
  box-shadow:
    0 0 0 3px rgba(245, 158, 11, 0.16),
    0 6px 18px -4px rgba(217, 119, 6, 0.14);
}

html[data-theme="light"] .search-input:focus {
  border-color: #b45309;
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(245, 158, 11, 0.22),
    0 8px 22px -4px rgba(217, 119, 6, 0.18);
}

html[data-theme="light"] .search-cta-btn {
  border-color: rgba(217, 119, 6, 0.52);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(217, 119, 6, 0.14));
  color: #92400e;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .search-cta-btn:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.32), rgba(217, 119, 6, 0.22));
  border-color: #b45309;
  color: #78350f;
}

/* Consolidated Album Dossier (Discography Timeline, Embeds & Responsive Nerd Cards) */
.album-discog-timeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.album-embed-panel {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  padding: 10px;
}

.album-embed-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.album-embed-bar a {
  color: var(--cyan);
  text-decoration: none;
}

.album-embed-bar a:hover {
  text-decoration: underline;
}

html[data-theme="light"] .album-embed-panel {
  background: #f8fafc;
  border-color: var(--border);
}

html[data-theme="light"] .album-embed-bar a {
  color: #0e7490;
}

@media (max-width: 599px), (pointer: coarse) {
  .album-discog-timeline .pill-btn,
  #album-dossier-modal .btn-sm,
  #album-dossier-modal .album-side-box .btn-sm {
    min-height: 44px;
    min-width: 44px;
    padding: 8px 12px;
  }
}

/* =========================================================================
   Record Scanner & Live Viewfinder Modal (v4.1)
   ========================================================================= */
.scanner-viewport {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.96), #020617);
  border: 2px solid rgba(52, 211, 153, 0.42);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}
@media (max-width: 599px) {
  .scanner-viewport {
    max-width: 280px;
  }
}

.scanner-video,
.scanner-snapshot-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scanner-fallback-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 20px;
  background: linear-gradient(145deg, rgba(6, 78, 59, 0.2), rgba(15, 23, 42, 0.92));
}

.scanner-reticle {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  pointer-events: none;
}

.scanner-reticle-box {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  border: 1.5px dashed rgba(110, 231, 183, 0.55);
  overflow: hidden;
}

.scanner-vinyl-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24%;
  height: 24%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px dashed rgba(110, 231, 183, 0.45);
}

@keyframes scannerSweepY {
  0% { transform: translateY(0%); opacity: 0.45; }
  50% { transform: translateY(96%); opacity: 0.95; }
  100% { transform: translateY(0%); opacity: 0.45; }
}

.scanner-scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  will-change: transform;
  animation: scannerSweepY 2.4s ease-in-out infinite;
}
.scanner-scanline::before {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #34d399, #22d3ee, transparent);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.85);
}

.scanner-status-bar {
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.scanner-viewport.is-frozen .scanner-scanline,
.scanner-viewport.is-matched .scanner-scanline {
  opacity: 0 !important;
  animation: none !important;
}

.scanner-viewport.is-matched {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.32), 0 12px 32px rgba(0, 0, 0, 0.55);
}

.scanner-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #e2e8f0;
  font-size: 0.76rem;
  font-weight: 700;
  max-width: 100%;
  text-align: center;
}

.scanner-cam-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 8px;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}
.scanner-cam-toolbar .btn {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
}

.scanner-ocr-readout {
  flex-shrink: 0;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(6, 78, 59, 0.22);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #a7f3d0;
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
  word-break: break-word;
}

html[data-theme="light"] .scanner-status-pill {
  background: #f1f5f9;
  color: #0f172a;
  border-color: rgba(5, 150, 105, 0.45);
}
html[data-theme="light"] .scanner-ocr-readout {
  background: rgba(16, 185, 129, 0.12);
  color: #065f46;
  border-color: rgba(5, 150, 105, 0.4);
}

.scanner-primary-actions {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 10px;
}

.scanner-shutter-btn,
.scanner-upload-btn {
  flex: 1 1 200px;
  min-height: 46px;
  min-width: 44px;
  font-weight: 800;
  font-size: 0.9rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.scanner-shutter-btn {
  background: linear-gradient(135deg, #059669, #0891b2);
  border: 1px solid rgba(110, 231, 183, 0.65);
  color: #ffffff;
}
.scanner-shutter-btn:hover {
  background: linear-gradient(135deg, #10b981, #06b6d4);
}

.scanner-upload-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.scanner-upload-btn:hover {
  border-color: rgba(52, 211, 153, 0.65);
}

.scanner-clue-box {
  flex-shrink: 0;
}

.scanner-clue-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}

.scanner-clue-row .filter-input {
  flex: 1 1 220px;
  min-width: 0;
  min-height: 44px;
  font-size: 16px;
}

.scanner-voice-btn,
.scanner-match-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.scanner-results-body {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 12px;
}

.scanner-result-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.scanner-result-card.is-best {
  border-color: rgba(52, 211, 153, 0.55);
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.22), var(--bg-card));
}

.scanner-result-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.scanner-result-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.scanner-result-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  word-break: break-word;
}

.scanner-result-sub {
  font-size: 0.84rem;
  color: var(--cyan);
  font-weight: 600;
}

.scanner-result-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.scanner-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.scanner-result-actions .btn,
.scanner-result-actions .btn-sm {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
}

.scanner-callout-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.28), rgba(14, 116, 144, 0.18));
  border: 1px solid rgba(52, 211, 153, 0.45);
}

html[data-theme="light"] .scanner-topbar-btn,
html[data-theme="light"] .scanner-hero-btn {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(6, 182, 212, 0.12));
  border-color: rgba(5, 150, 105, 0.45);
  color: #065f46;
}
html[data-theme="light"] .scanner-topbar-btn:hover,
html[data-theme="light"] .scanner-hero-btn:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.26), rgba(6, 182, 212, 0.2));
  color: #064e3b;
}
html[data-theme="light"] .header-secondary-items.is-mobile-open .mobile-only-scanner-item {
  color: #065f46;
  border-color: rgba(5, 150, 105, 0.45);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(6, 182, 212, 0.1));
}
html[data-theme="light"] .scanner-result-card.is-best {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), #ffffff);
  border-color: rgba(5, 150, 105, 0.5);
}
html[data-theme="light"] .scanner-callout-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(6, 182, 212, 0.1));
  border-color: rgba(5, 150, 105, 0.45);
}

/* ============================================================================
   Private Owner Admin Panel & Platform Telemetry (v4.2)
   ============================================================================ */

.hidden {
  display: none !important;
}

.header-secondary-items > #btn-open-admin {
  order: 0;
}

.owner-admin-pill {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(217, 119, 6, 0.12));
  border-color: rgba(245, 158, 11, 0.55);
  color: #fde68a;
  font-weight: 700;
}
.owner-admin-pill:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.34), rgba(217, 119, 6, 0.2));
  color: #fffbeb;
}
.admin-online-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.24);
  color: #6ee7b7;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
}

.owner-mobile-admin-btn {
  border-color: rgba(245, 158, 11, 0.55) !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(217, 119, 6, 0.12)) !important;
  color: #fde68a !important;
}

@media (max-width: 389px) {
  #btn-mobile-admin-quick {
    display: none !important;
  }
}

.footer-owner-lock-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  opacity: 0.45;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.footer-owner-lock-btn:hover,
.footer-owner-lock-btn.is-owner-unlocked {
  opacity: 0.95;
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.35);
}

.owner-auth-error {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--rose-soft);
  border: 1px solid rgba(244, 63, 94, 0.45);
  color: #fda4af;
  font-size: 0.84rem;
  font-weight: 600;
}

.nerd-admin-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.11), rgba(6, 182, 212, 0.08), var(--bg-card));
  border: 1px solid rgba(245, 158, 11, 0.34);
  margin-bottom: 14px;
}

.nerd-admin-owner-badge {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.38);
  color: #fde68a;
  font-size: 0.74rem;
  font-weight: 700;
  max-width: 100%;
  word-break: break-word;
}

.nerd-admin-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.nerd-admin-hero-actions .btn,
.nerd-admin-subtabs .admin-subtab-btn,
#tab-admin .btn {
  min-height: 44px;
  min-width: 44px;
}

.nerd-admin-subtabs {
  margin-bottom: 16px;
}

.nerd-admin-panel-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nerd-admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.nerd-admin-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.nerd-admin-kpi-card.is-emerald { border-color: rgba(16, 185, 129, 0.35); }
.nerd-admin-kpi-card.is-cyan { border-color: rgba(6, 182, 212, 0.35); }
.nerd-admin-kpi-card.is-amber { border-color: rgba(245, 158, 11, 0.35); }
.nerd-admin-kpi-card.is-violet { border-color: rgba(167, 139, 250, 0.35); }

.nerd-admin-kpi-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.nerd-admin-kpi-val {
  font-size: clamp(1.18rem, 2.2vw, 1.55rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.18;
  word-break: break-word;
}
.nerd-admin-kpi-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.nerd-admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  min-width: 0;
}
.nerd-admin-card h3 {
  margin: 0 0 10px;
  font-size: 0.98rem;
  font-weight: 700;
}
.nerd-admin-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.nerd-admin-card-head h3 {
  margin: 0 0 2px;
}
.nerd-admin-card-head p {
  margin: 0;
  font-size: 0.8rem;
}

.nerd-admin-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.nerd-admin-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.nerd-admin-btn-group .btn.is-active {
  background: rgba(6, 182, 212, 0.2);
  border-color: rgba(6, 182, 212, 0.6);
  color: #67e8f9;
}

.nerd-admin-chart-wrap {
  width: 100%;
  overflow: hidden;
}
.nerd-admin-svg {
  width: 100%;
  height: auto;
  display: block;
}
.nerd-chart-grid {
  stroke: rgba(148, 163, 184, 0.14);
  stroke-width: 1;
}
.nerd-chart-axis {
  fill: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
}
.nerd-chart-dot {
  fill: #22d3ee;
  stroke: var(--bg-card);
  stroke-width: 1.5;
}

.nerd-admin-two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
}
.nerd-admin-three-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.nerd-admin-vbar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  height: 150px;
  align-items: end;
  padding-top: 10px;
}
.nerd-admin-vbar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  gap: 4px;
}
.nerd-admin-vbar-val {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  min-height: 14px;
}
.nerd-admin-vbar-track {
  width: 100%;
  flex: 1;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 6px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.nerd-admin-vbar-fill {
  width: 100%;
  background: linear-gradient(180deg, #38bdf8, #6366f1);
  border-radius: 6px 6px 0 0;
  min-height: 2px;
}
.nerd-admin-vbar-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.nerd-admin-hbar-grid {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 3px;
  height: 150px;
  align-items: end;
  padding-top: 14px;
}
.nerd-admin-hbar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  gap: 4px;
}
.nerd-admin-hbar-track {
  width: 100%;
  flex: 1;
  background: rgba(148, 163, 184, 0.1);
  border-radius: 3px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.nerd-admin-hbar-fill {
  width: 100%;
  background: linear-gradient(180deg, #34d399, #059669);
  min-height: 2px;
}
.nerd-admin-hbar-lbl {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--text-dim);
  min-height: 12px;
}

.nerd-admin-sessions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.nerd-admin-session-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid rgba(16, 185, 129, 0.28);
}
.nerd-admin-online-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
  flex-shrink: 0;
}

.nerd-admin-bars-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nerd-admin-bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nerd-admin-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
}
.nerd-admin-bar-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  overflow: hidden;
}
.nerd-admin-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--cyan);
}
.nerd-admin-bar-fill.is-cyan { background: linear-gradient(90deg, #06b6d4, #38bdf8); }
.nerd-admin-bar-fill.is-emerald { background: linear-gradient(90deg, #10b981, #34d399); }
.nerd-admin-bar-fill.is-amber { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.nerd-admin-bar-fill.is-violet { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }

.nerd-admin-tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.nerd-admin-tech-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nerd-admin-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nerd-admin-chip-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.76rem;
}

.nerd-admin-feed-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
}
.nerd-admin-feed-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.nerd-admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.nerd-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  min-width: 560px;
}
.nerd-admin-table th,
.nerd-admin-table td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
}
.nerd-admin-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.nerd-admin-input {
  min-height: 44px;
}

@media (max-width: 639px) {
  .nerd-admin-hero {
    padding: 14px;
  }
  .nerd-admin-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .nerd-admin-kpi-card {
    padding: 11px 12px;
  }
  .nerd-admin-two-col,
  .nerd-admin-three-col {
    grid-template-columns: 1fr;
  }
  .nerd-admin-input {
    font-size: 16px;
    width: 100%;
  }
}

@media (max-width: 340px) {
  .nerd-admin-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* Light theme overrides for Admin Panel */
html[data-theme="light"] .owner-admin-pill,
html[data-theme="light"] .owner-mobile-admin-btn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(217, 119, 6, 0.1)) !important;
  border-color: rgba(217, 119, 6, 0.5) !important;
  color: #92400e !important;
}
html[data-theme="light"] .admin-online-chip {
  background: rgba(5, 150, 105, 0.18);
  color: #065f46;
}
html[data-theme="light"] .nerd-admin-hero {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(6, 182, 212, 0.08), #ffffff);
  border-color: rgba(217, 119, 6, 0.35);
}
html[data-theme="light"] .nerd-admin-owner-badge {
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
  border-color: rgba(217, 119, 6, 0.4);
}
html[data-theme="light"] .nerd-admin-btn-group .btn.is-active {
  background: rgba(8, 145, 178, 0.14);
  border-color: rgba(8, 145, 178, 0.5);
  color: #0e7490;
}
html[data-theme="light"] .owner-auth-error {
  color: #9f1239;
}

/* Engagement Funnel & Deep Leaderboards (v4.3 Admin Analytics) */
.nerd-admin-funnel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.nerd-admin-funnel-step {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.nerd-admin-funnel-lbl {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nerd-admin-funnel-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}

.nerd-admin-rank-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  min-width: 0;
}
.nerd-admin-rank-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.nerd-admin-rank-num {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--amber);
  min-width: 24px;
  flex-shrink: 0;
}
.nerd-admin-rank-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nerd-admin-rank-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
}
.nerd-admin-mini-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}
.nerd-admin-jump-btn {
  flex-shrink: 0;
  min-height: 44px;
  min-width: 44px;
  padding: 6px 10px;
  font-size: 0.76rem;
}

@media (max-width: 639px) {
  .nerd-admin-funnel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .nerd-admin-rank-head {
    flex-wrap: wrap;
  }
}

@media (max-width: 359px) {
  .nerd-admin-funnel-grid {
    grid-template-columns: 1fr;
  }
}

html[data-theme="light"] .nerd-admin-funnel-step,
html[data-theme="light"] .nerd-admin-rank-item {
  background: #f8fafc;
}
html[data-theme="light"] .nerd-admin-rank-num {
  color: #b45309;
}
html[data-theme="light"] .nerd-admin-mini-badge {
  background: rgba(15, 23, 42, 0.08);
  color: #334155;
}

/* IP Geolocation Interactive Leaflet Map & Geo Telemetry Cards */
.nerd-admin-btn-group .btn {
  min-height: 44px;
  min-width: 44px;
}
.nerd-admin-chip-stat {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.nerd-admin-chip-stat.is-geo-live {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.12);
}
.nerd-geo-map-wrap {
  position: relative;
  isolation: isolate;
  z-index: 1;
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  background: #070d18;
}
.nerd-geo-leaflet-host {
  width: 100%;
  height: 430px;
  background: #070d18;
  transition: height 0.2s ease;
  touch-action: none;
}
.nerd-geo-leaflet-host.is-expanded {
  height: 620px;
}
.nerd-geo-leaflet-host .leaflet-control-attribution {
  background: rgba(8, 12, 20, 0.78);
  color: #94a3b8;
  font-size: 10px;
}
.nerd-geo-leaflet-host .leaflet-control-attribution a {
  color: #38bdf8;
}
.nerd-geo-div-icon {
  background: transparent;
  border: 0;
}
.nerd-geo-marker-pin {
  position: relative;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.96) 55%, rgba(8, 47, 73, 0.95) 100%);
  border: 2px solid #bae6fd;
  box-shadow: 0 0 0 6px rgba(6, 182, 212, 0.24), 0 4px 12px rgba(0, 0, 0, 0.45);
  color: #082f49;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.nerd-geo-marker-pin.is-online {
  background: radial-gradient(circle, #34d399 55%, #059669 100%);
  border-color: #ecfdf5;
  color: #022c22;
  box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.34), 0 4px 14px rgba(16, 185, 129, 0.5);
  animation: nerdGeoPulse 2.2s infinite ease-in-out;
}
.nerd-geo-marker-pin.is-top {
  background: radial-gradient(circle, #fbbf24 55%, #d97706 100%);
  border-color: #fef3c7;
  color: #451a03;
  box-shadow: 0 0 0 7px rgba(245, 158, 11, 0.28), 0 4px 12px rgba(0, 0, 0, 0.45);
}
@keyframes nerdGeoPulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.38), 0 4px 14px rgba(16, 185, 129, 0.5); }
  50% { box-shadow: 0 0 0 12px rgba(16, 185, 129, 0.08), 0 4px 14px rgba(16, 185, 129, 0.5); }
}
.nerd-geo-city-tag {
  display: none;
  position: absolute;
  left: calc(100% + 6px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(8, 12, 20, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.32);
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.nerd-geo-city-tag.show-label {
  display: inline-flex;
  align-items: center;
}
.nerd-geo-city-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.nerd-geo-city-jump-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
}
.nerd-geo-leaflet-host .leaflet-popup-content-wrapper,
.nerd-geo-leaflet-host .leaflet-popup-tip {
  background: #0f172a;
  color: #f1f5f9;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}
.nerd-geo-leaflet-host .leaflet-popup-close-button {
  width: 44px !important;
  height: 44px !important;
  line-height: 44px !important;
  font-size: 20px !important;
  color: #94a3b8 !important;
}
.nerd-geo-popup {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 190px;
  padding-right: 18px;
}
.nerd-geo-popup-title {
  font-weight: 800;
  font-size: 0.92rem;
}
.nerd-geo-popup-meta {
  font-size: 0.8rem;
  color: #cbd5e1;
}
.nerd-geo-popup-online {
  color: #34d399;
  font-weight: 700;
}
.nerd-geo-popup-coords {
  font-size: 0.74rem;
  color: #94a3b8;
}
.nerd-geo-popup-isps {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.76rem;
  color: #cbd5e1;
}
.nerd-geo-popup-zoom-btn {
  margin-top: 4px;
  min-height: 44px;
  min-width: 44px;
  width: 100%;
  justify-content: center;
}
@media (max-width: 639px) {
  .nerd-admin-two-col,
  .nerd-admin-three-col {
    grid-template-columns: minmax(0, 1fr);
  }
  .nerd-geo-leaflet-host {
    height: 330px;
  }
  .nerd-geo-leaflet-host.is-expanded {
    height: 470px;
  }
}
html[data-theme="light"] .nerd-geo-map-wrap,
html[data-theme="light"] .nerd-geo-leaflet-host {
  background: #e0f2fe;
}
html[data-theme="light"] .nerd-geo-leaflet-host .leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.86);
  color: #334155;
}
html[data-theme="light"] .nerd-geo-leaflet-host .leaflet-control-attribution a {
  color: #0369a1;
}
html[data-theme="light"] .nerd-geo-city-tag {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.25);
}
html[data-theme="light"] .nerd-geo-leaflet-host .leaflet-popup-content-wrapper,
html[data-theme="light"] .nerd-geo-leaflet-host .leaflet-popup-tip {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(14, 116, 144, 0.35);
}
html[data-theme="light"] .nerd-geo-popup-meta,
html[data-theme="light"] .nerd-geo-popup-isps {
  color: #334155;
}
html[data-theme="light"] .nerd-geo-popup-online {
  color: #059669;
}
html[data-theme="light"] .nerd-admin-chip-stat.is-geo-live {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(5, 150, 105, 0.45);
  color: #065f46;
}

/* ==========================================================================
   Platform Handbook View ("Så fungerar Earshot for nerds")
   ========================================================================== */
.nerd-guide-wrap {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-bottom: 28px;
  min-width: 0;
}

.nerd-guide-top-bar,
.nerd-guide-bottom-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
}

.nerd-guide-back-btn,
#btn-guide-scroll-top,
#btn-guide-empty-reset {
  min-height: 44px;
  min-width: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
}

.nerd-guide-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 13px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: #ddd6fe;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(6, 182, 212, 0.14));
  border: 1px solid rgba(167, 139, 250, 0.42);
}

.nerd-guide-hero {
  border-radius: 20px;
  padding: clamp(18px, 3vw, 28px);
  background:
    radial-gradient(circle at 100% 0%, rgba(139, 92, 246, 0.18), transparent 52%),
    radial-gradient(circle at 0% 100%, rgba(6, 182, 212, 0.14), transparent 52%),
    var(--bg-elevated);
  border: 1px solid rgba(167, 139, 250, 0.34);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
  min-width: 0;
}

.nerd-guide-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #c4b5fd;
  margin-bottom: 8px;
}

.nerd-guide-title {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.nerd-guide-subtitle {
  margin: 0 0 16px;
  max-width: 78ch;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.nerd-guide-stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.nerd-guide-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(15, 22, 36, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.26);
  color: #e2e8f0;
}
.nerd-guide-stat-chip.is-emerald { border-color: rgba(16, 185, 129, 0.42); color: #a7f3d0; }
.nerd-guide-stat-chip.is-cyan { border-color: rgba(6, 182, 212, 0.42); color: #a5f3fc; }
.nerd-guide-stat-chip.is-amber { border-color: rgba(245, 158, 11, 0.42); color: #fde68a; }
.nerd-guide-stat-chip.is-violet { border-color: rgba(167, 139, 250, 0.42); color: #ddd6fe; }
.nerd-guide-stat-chip.is-rose { border-color: rgba(244, 63, 94, 0.42); color: #fecdd3; }

.nerd-guide-search-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.nerd-guide-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.nerd-guide-search-icon {
  position: absolute;
  left: 14px;
  pointer-events: none;
  font-size: 1rem;
  opacity: 0.82;
}

.nerd-guide-search-input {
  width: 100%;
  min-height: 48px;
  padding: 10px 104px 10px 42px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  background: rgba(8, 12, 20, 0.82);
  color: var(--text);
  font-size: 16px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.nerd-guide-search-input:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.78);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.22);
}

.nerd-guide-clear-btn {
  position: absolute;
  right: 5px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  border-radius: 10px;
}

.nerd-guide-search-status {
  font-size: 0.82rem;
  font-weight: 600;
  color: #c4b5fd;
}

.nerd-guide-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nerd-guide-toc-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 13px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 22, 36, 0.84);
  color: #e2e8f0;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.nerd-guide-toc-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(167, 139, 250, 0.65);
  background: rgba(24, 35, 56, 0.96);
}
.nerd-guide-toc-btn.is-amber { border-left: 3px solid var(--amber); }
.nerd-guide-toc-btn.is-cyan { border-left: 3px solid var(--cyan); }
.nerd-guide-toc-btn.is-emerald { border-left: 3px solid var(--emerald); }
.nerd-guide-toc-btn.is-violet { border-left: 3px solid var(--violet); }
.nerd-guide-toc-btn.is-rose { border-left: 3px solid var(--rose); }

.nerd-guide-chapters-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.nerd-guide-chapter {
  scroll-margin-top: 96px;
  border-radius: 20px;
  padding: clamp(16px, 2.5vw, 26px);
  background: linear-gradient(180deg, rgba(15, 22, 36, 0.92) 0%, rgba(11, 17, 29, 0.9) 100%);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  min-width: 0;
}

.nerd-guide-chapter.is-amber { border-top: 3px solid rgba(245, 158, 11, 0.72); }
.nerd-guide-chapter.is-cyan { border-top: 3px solid rgba(6, 182, 212, 0.72); }
.nerd-guide-chapter.is-emerald { border-top: 3px solid rgba(16, 185, 129, 0.72); }
.nerd-guide-chapter.is-violet { border-top: 3px solid rgba(167, 139, 250, 0.72); }
.nerd-guide-chapter.is-rose { border-top: 3px solid rgba(244, 63, 94, 0.72); }

.nerd-guide-chapter.is-highlighted {
  border-color: rgba(251, 191, 36, 0.82);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22), 0 14px 34px rgba(0, 0, 0, 0.34);
}

.nerd-guide-chapter-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.nerd-guide-chapter-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nerd-guide-chapter-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  background: rgba(167, 139, 250, 0.18);
  border: 1px solid rgba(167, 139, 250, 0.45);
  color: #ddd6fe;
}

.nerd-guide-chapter-title {
  margin: 0;
  font-size: clamp(1.08rem, 2.2vw, 1.38rem);
  font-weight: 800;
  line-height: 1.25;
  color: #f8fafc;
}

.nerd-guide-chapter-sub {
  margin: 6px 0 0;
  font-size: 0.88rem;
  line-height: 1.52;
  color: var(--text-muted);
  max-width: 78ch;
}

.nerd-guide-chapter-pill {
  flex-shrink: 0;
  padding: 5px 11px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(15, 22, 36, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
}

.nerd-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
  min-width: 0;
}

.nerd-guide-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(19, 28, 46, 0.96) 0%, rgba(12, 18, 30, 0.96) 100%);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-top-width: 3px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  min-width: 0;
  overflow-wrap: anywhere;
}

.nerd-guide-card.is-amber { border-top-color: rgba(245, 158, 11, 0.85); }
.nerd-guide-card.is-cyan { border-top-color: rgba(6, 182, 212, 0.85); }
.nerd-guide-card.is-emerald { border-top-color: rgba(16, 185, 129, 0.85); }
.nerd-guide-card.is-violet { border-top-color: rgba(167, 139, 250, 0.85); }
.nerd-guide-card.is-rose { border-top-color: rgba(244, 63, 94, 0.85); }

.nerd-guide-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.guide-card-num {
  flex-shrink: 0;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.34);
}
.guide-card-num.is-amber { color: #fde68a; background: rgba(245, 158, 11, 0.16); border-color: rgba(245, 158, 11, 0.46); }
.guide-card-num.is-cyan { color: #a5f3fc; background: rgba(6, 182, 212, 0.16); border-color: rgba(6, 182, 212, 0.46); }
.guide-card-num.is-emerald { color: #a7f3d0; background: rgba(16, 185, 129, 0.16); border-color: rgba(16, 185, 129, 0.46); }
.guide-card-num.is-violet { color: #ddd6fe; background: rgba(167, 139, 250, 0.16); border-color: rgba(167, 139, 250, 0.46); }
.guide-card-num.is-rose { color: #fecdd3; background: rgba(244, 63, 94, 0.16); border-color: rgba(244, 63, 94, 0.46); }

.nerd-guide-card-title-wrap {
  min-width: 0;
  flex: 1;
}

.nerd-guide-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  color: #f8fafc;
}

.nerd-guide-card-lead {
  margin: 4px 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
  color: #cbd5e1;
}

.nerd-guide-card-body {
  font-size: 0.86rem;
  line-height: 1.56;
  color: var(--text-muted);
}

.nerd-guide-card-body p {
  margin: 0;
}

.nerd-guide-card-body code,
.guide-card-list code,
.guide-flow-strip code,
.guide-scanner-pipeline-col code {
  font-family: var(--font-mono);
  font-size: 0.78em;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #f8fafc;
}

.guide-card-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.guide-card-list strong {
  color: #e2e8f0;
}

.guide-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 2px;
}

.guide-mini-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(15, 22, 36, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.guide-card-actions {
  display: flex;
  padding-top: 4px;
}

.guide-live-btn {
  min-height: 44px;
  min-width: 44px;
  width: 100%;
  justify-content: center;
  padding: 8px 14px;
  font-size: 0.81rem;
  font-weight: 700;
  border-color: rgba(6, 182, 212, 0.45);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.16), rgba(16, 185, 129, 0.12));
  color: #cffafe;
}

.guide-live-btn:hover {
  border-color: rgba(103, 232, 249, 0.82);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.28), rgba(16, 185, 129, 0.2));
  color: #ffffff;
}

/* Visual Annotated Maps & Flow Strips inside #tab-guide */
.guide-annotated-mockup {
  margin-top: 16px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(8, 12, 20, 0.82);
  border: 1px dashed rgba(148, 163, 184, 0.34);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.guide-mockup-caption {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #cbd5e1;
}

.guide-mockup-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(15, 22, 36, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.guide-mockup-left,
.guide-mockup-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}

.guide-callout-item {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}

.guide-callout-item.is-wide {
  flex: 1 1 320px;
}

.guide-callout-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  color: #f8fafc;
  background: rgba(51, 65, 85, 0.85);
}
.guide-callout-badge.is-amber { background: rgba(245, 158, 11, 0.22); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.45); }
.guide-callout-badge.is-cyan { background: rgba(6, 182, 212, 0.22); color: #a5f3fc; border: 1px solid rgba(6, 182, 212, 0.45); }
.guide-callout-badge.is-emerald { background: rgba(16, 185, 129, 0.22); color: #a7f3d0; border: 1px solid rgba(16, 185, 129, 0.45); }
.guide-callout-badge.is-violet { background: rgba(167, 139, 250, 0.22); color: #ddd6fe; border: 1px solid rgba(167, 139, 250, 0.45); }

.guide-mock-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(19, 28, 46, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #e2e8f0;
  max-width: 100%;
}
.guide-mock-chip.is-brand { border-color: rgba(245, 158, 11, 0.48); color: #fef3c7; }
.guide-mock-chip.is-scanner { border-color: rgba(52, 211, 153, 0.48); color: #a7f3d0; }
.guide-mock-chip.is-guide { border-color: rgba(167, 139, 250, 0.52); color: #ede9fe; }

.guide-mock-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.guide-mockup-bottom-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}

.guide-mock-tabs,
.guide-mock-agent {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 22, 36, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.22);
  font-size: 0.74rem;
}

.guide-mock-tabs span {
  padding: 4px 8px;
  border-radius: 8px;
  color: #cbd5e1;
  background: rgba(19, 28, 46, 0.85);
}

.guide-mock-tabs span.is-active {
  background: rgba(245, 158, 11, 0.24);
  color: #fef3c7;
  border: 1px solid rgba(251, 191, 36, 0.48);
  font-weight: 700;
}

.guide-mock-input {
  flex: 1 1 120px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(8, 12, 20, 0.8);
  color: var(--text-muted);
}

.guide-mock-agent-btn {
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(245, 158, 11, 0.48);
  color: #fef3c7;
  font-weight: 700;
}

.guide-flow-strip {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(8, 12, 20, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.22);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.45;
}

.guide-arrow {
  color: var(--amber);
  font-weight: 800;
}

.guide-scanner-diagram {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.guide-scanner-frame-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.guide-scanner-pill-top {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.71rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #a7f3d0;
  text-align: center;
}

.guide-scanner-box-1x1 {
  width: 100%;
  max-width: 210px;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.12), rgba(8, 12, 20, 0.94));
  border: 2px solid rgba(52, 211, 153, 0.58);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 10px;
}

.guide-scanner-reticle {
  width: 72%;
  height: 72%;
  border: 2px dashed rgba(110, 231, 183, 0.6);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.guide-scanner-vinyl-circle {
  font-size: 2.2rem;
}

.guide-scanner-scanbar {
  position: absolute;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #34d399, transparent);
}

.guide-scanner-tag {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #a7f3d0;
}

.guide-scanner-tools-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  font-size: 0.71rem;
  color: #cbd5e1;
}

.guide-scanner-tools-bottom span {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(19, 28, 46, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.26);
}

.guide-scanner-pipeline-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-flow-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 22, 36, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.22);
  font-size: 0.82rem;
  line-height: 1.45;
  color: #cbd5e1;
}

.text-amber {
  color: var(--amber);
}
.text-emerald {
  color: var(--emerald);
}

@media (max-width: 1099px) and (min-width: 640px) {
  .nerd-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .guide-scanner-diagram {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 639px) {
  .nerd-guide-grid {
    grid-template-columns: 1fr;
  }
  .nerd-guide-card {
    padding: 15px;
  }
  .nerd-guide-toc-btn {
    flex: 1 1 100%;
    justify-content: flex-start;
  }
}

/* Light Archival Theme Overrides for Platform Handbook */
html[data-theme="light"] .guide-topbar-btn,
html[data-theme="light"] .guide-hero-btn,
html[data-theme="light"] .guide-footer-btn {
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.14), rgba(217, 119, 6, 0.1));
  border-color: rgba(109, 40, 217, 0.45);
  color: #5b21b6;
}

html[data-theme="light"] .guide-topbar-btn:hover,
html[data-theme="light"] .guide-hero-btn:hover,
html[data-theme="light"] .guide-footer-btn:hover {
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.22), rgba(217, 119, 6, 0.16));
  border-color: rgba(91, 33, 182, 0.72);
  color: #3b0764;
}

html[data-theme="light"] .guide-topbar-btn.is-active,
html[data-theme="light"] .guide-hero-btn.is-active,
html[data-theme="light"] .guide-footer-btn.is-active {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.2), rgba(109, 40, 217, 0.16));
  border-color: rgba(180, 83, 9, 0.72);
  color: #92400e;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.2);
}

html[data-theme="light"] .nerd-guide-pill-badge {
  color: #5b21b6;
  background: rgba(109, 40, 217, 0.11);
  border-color: rgba(109, 40, 217, 0.34);
}

html[data-theme="light"] .nerd-guide-hero {
  background:
    radial-gradient(circle at 100% 0%, rgba(109, 40, 217, 0.08), transparent 52%),
    radial-gradient(circle at 0% 100%, rgba(8, 145, 178, 0.07), transparent 52%),
    #ffffff;
  border-color: rgba(109, 40, 217, 0.28);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

html[data-theme="light"] .nerd-guide-hero-eyebrow,
html[data-theme="light"] .nerd-guide-search-status {
  color: #5b21b6;
}

html[data-theme="light"] .nerd-guide-title,
html[data-theme="light"] .nerd-guide-chapter-title,
html[data-theme="light"] .nerd-guide-card-title {
  color: #0f172a;
}

html[data-theme="light"] .nerd-guide-card-lead {
  color: #334155;
}

html[data-theme="light"] .nerd-guide-card-body,
html[data-theme="light"] .guide-card-list {
  color: #475569;
}

html[data-theme="light"] .guide-card-list strong {
  color: #0f172a;
}

html[data-theme="light"] .nerd-guide-stat-chip {
  background: #f8fafc;
  color: #1e293b;
}
html[data-theme="light"] .nerd-guide-stat-chip.is-emerald { color: #065f46; border-color: rgba(5, 150, 105, 0.4); }
html[data-theme="light"] .nerd-guide-stat-chip.is-cyan { color: #0e7490; border-color: rgba(8, 145, 178, 0.4); }
html[data-theme="light"] .nerd-guide-stat-chip.is-amber { color: #92400e; border-color: rgba(217, 119, 6, 0.4); }
html[data-theme="light"] .nerd-guide-stat-chip.is-violet { color: #5b21b6; border-color: rgba(109, 40, 217, 0.4); }
html[data-theme="light"] .nerd-guide-stat-chip.is-rose { color: #9f1239; border-color: rgba(225, 29, 72, 0.4); }

html[data-theme="light"] .nerd-guide-search-input {
  background: #ffffff;
  color: #0f172a;
  border-color: var(--border-strong);
}

html[data-theme="light"] .nerd-guide-toc-btn {
  background: #f8fafc;
  color: #1e293b;
  border-color: var(--border-strong);
}

html[data-theme="light"] .nerd-guide-toc-btn:hover {
  background: #ffffff;
  border-color: rgba(109, 40, 217, 0.55);
}

html[data-theme="light"] .nerd-guide-chapter {
  background: #ffffff;
  border-color: var(--border);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .nerd-guide-chapter-num {
  background: rgba(109, 40, 217, 0.12);
  border-color: rgba(109, 40, 217, 0.36);
  color: #5b21b6;
}

html[data-theme="light"] .nerd-guide-chapter-pill,
html[data-theme="light"] .guide-mini-tag {
  background: #f1f5f9;
  color: #334155;
  border-color: var(--border);
}

html[data-theme="light"] .nerd-guide-card {
  background: #f8fafc;
  border-color: var(--border-strong);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .guide-card-num {
  background: #e2e8f0;
  color: #0f172a;
}
html[data-theme="light"] .guide-card-num.is-amber { background: rgba(245, 158, 11, 0.16); color: #92400e; }
html[data-theme="light"] .guide-card-num.is-cyan { background: rgba(6, 182, 212, 0.16); color: #0e7490; }
html[data-theme="light"] .guide-card-num.is-emerald { background: rgba(16, 185, 129, 0.16); color: #065f46; }
html[data-theme="light"] .guide-card-num.is-violet { background: rgba(139, 92, 246, 0.16); color: #5b21b6; }
html[data-theme="light"] .guide-card-num.is-rose { background: rgba(244, 63, 94, 0.16); color: #9f1239; }

html[data-theme="light"] .nerd-guide-card-body code,
html[data-theme="light"] .guide-card-list code,
html[data-theme="light"] .guide-flow-strip code,
html[data-theme="light"] .guide-scanner-pipeline-col code {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #cbd5e1;
}

html[data-theme="light"] .guide-live-btn {
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.14), rgba(5, 150, 105, 0.1));
  border-color: rgba(8, 145, 178, 0.45);
  color: #0e7490;
}

html[data-theme="light"] .guide-live-btn:hover {
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.24), rgba(5, 150, 105, 0.18));
  color: #083344;
}

html[data-theme="light"] .guide-annotated-mockup {
  background: #f1f5f9;
  border-color: var(--border-strong);
}

html[data-theme="light"] .guide-mockup-caption,
html[data-theme="light"] .guide-flow-strip,
html[data-theme="light"] .guide-flow-step {
  color: #1e293b;
}

html[data-theme="light"] .guide-mockup-bar,
html[data-theme="light"] .guide-mock-tabs,
html[data-theme="light"] .guide-mock-agent,
html[data-theme="light"] .guide-flow-strip,
html[data-theme="light"] .guide-flow-step {
  background: #ffffff;
  border-color: var(--border);
}

html[data-theme="light"] .guide-mock-chip {
  background: #f8fafc;
  color: #1e293b;
}
html[data-theme="light"] .guide-mock-chip.is-brand { color: #92400e; }
html[data-theme="light"] .guide-mock-chip.is-scanner { color: #065f46; }
html[data-theme="light"] .guide-mock-chip.is-guide { color: #5b21b6; }
html[data-theme="light"] .guide-mock-tag { color: #92400e; }

html[data-theme="light"] .guide-mock-tabs span {
  background: #f1f5f9;
  color: #334155;
}
html[data-theme="light"] .guide-mock-tabs span.is-active {
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
}
html[data-theme="light"] .guide-mock-input {
  background: #f8fafc;
  color: #475569;
}
html[data-theme="light"] .guide-mock-agent-btn {
  color: #92400e;
}

html[data-theme="light"] .guide-callout-badge.is-amber { color: #92400e; }
html[data-theme="light"] .guide-callout-badge.is-cyan { color: #0e7490; }
html[data-theme="light"] .guide-callout-badge.is-emerald { color: #065f46; }
html[data-theme="light"] .guide-callout-badge.is-violet { color: #5b21b6; }

html[data-theme="light"] .guide-scanner-pill-top,
html[data-theme="light"] .guide-scanner-tag {
  color: #065f46;
}
html[data-theme="light"] .guide-scanner-box-1x1 {
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.14), #f8fafc);
}
html[data-theme="light"] .guide-scanner-tools-bottom span {
  background: #ffffff;
  color: #1e293b;
}

/* ============================================================================
   Archival Precision, Navigation Compacting, Collapsible Filters & A11y (v4.4)
   ============================================================================ */

/* Global high-contrast keyboard focus indicator */
:is(button, a, input, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

html[data-theme="light"] :is(button, a, input, select, summary, [tabindex]):focus-visible {
  outline: 2px solid #b45309;
  outline-offset: 2px;
}

/* Keep topbar scanner pill visible in header across views */

/* Compact header when scrolling desktop/tablet */
@media (min-width: 640px) {
  .site-header {
    transition: padding 0.16s ease, box-shadow 0.16s ease;
  }
  .site-header.is-scrolled .header-top {
    padding: 7px 0 6px;
    gap: 10px;
  }
  .site-header.is-scrolled .brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }
  .site-header.is-scrolled .brand-sub,
  .site-header.is-scrolled #ui-brand-tagline {
    display: none;
  }
  .site-header.is-scrolled .header-bottom-bar {
    margin: 0 0 6px;
  }
  .site-header.is-scrolled .nav-tabs {
    padding: 3px;
    gap: 4px;
  }
  .site-header.is-scrolled .nav-tab {
    min-height: 36px;
    padding: 6px 12px;
    font-size: 0.84rem;
  }
}

/* Start Hero 3-Way Entry Strip & Collapsible Advanced Filters */
.start-entry-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.entry-pill {
  min-height: 44px;
  font-weight: 700;
}

.entry-pill--otd {
  border-color: rgba(6, 182, 212, 0.42);
  background: rgba(6, 182, 212, 0.12);
  color: #67e8f9;
}

.entry-pill--otd:hover {
  border-color: rgba(6, 182, 212, 0.72);
  background: rgba(6, 182, 212, 0.22);
}

.search-filters-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.filters-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  font-weight: 700;
}

.filters-active-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--amber);
  color: #080c14;
  font-size: 0.72rem;
  font-weight: 800;
}

.search-filters-panel {
  margin-top: 10px;
}

.search-filters-panel[hidden] {
  display: none !important;
}

.search-filters-panel .filters-grid {
  margin-top: 4px;
}

@media (min-width: 640px) {
  .search-filters-toolbar {
    display: none;
  }
  .search-filters-panel,
  .search-filters-panel[hidden] {
    display: block !important;
  }
  .search-filters-panel .filters-grid {
    margin-top: 12px;
  }
}

/* Primary Match & Evidence-Backed Search Grouping */
.track-grid > .track-card--primary {
  grid-column: 1 / -1;
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.08);
}

.track-rel-groups {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.track-rel-group {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(15, 22, 36, 0.65);
  overflow: hidden;
}

.track-rel-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  list-style: none;
}

.track-rel-summary::-webkit-details-marker {
  display: none;
}

.track-rel-summary:hover {
  background: rgba(255, 255, 255, 0.04);
}

.track-rel-chevron {
  color: var(--amber);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.track-rel-group-grid {
  padding: 0 12px 12px;
}

.missing-artist-agent-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 16px;
  margin-bottom: 14px;
  border-radius: 14px;
  border: 1px solid rgba(6, 182, 212, 0.38);
  background: rgba(6, 182, 212, 0.09);
}

.missing-artist-agent-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 240px;
  font-size: 0.84rem;
}

.missing-artist-agent-copy span {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Source Claims, Conflicts & Methodology Explainers */
.source-claim-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.24);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.source-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.source-meta-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(6, 182, 212, 0.12);
  color: #67e8f9;
  font-size: 0.68rem;
  font-weight: 600;
}

.source-precision-note {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.16);
  color: var(--amber);
  font-family: var(--font-sans, system-ui, sans-serif);
  font-size: 0.69rem;
  font-weight: 700;
}

.source-conflict-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(244, 63, 94, 0.18);
  color: #fda4af;
  font-family: var(--font-sans, system-ui, sans-serif);
  font-size: 0.69rem;
  font-weight: 700;
}

.source-search-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

tr.is-source-conflict {
  background: rgba(244, 63, 94, 0.06);
}

.source-conflict-callout {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(244, 63, 94, 0.42);
  background: rgba(244, 63, 94, 0.08);
  font-size: 0.82rem;
}

.source-conflict-head {
  font-weight: 800;
  color: #fda4af;
  margin-bottom: 4px;
}

.source-conflict-body {
  margin: 0 0 6px;
  color: var(--text-muted);
}

.source-conflict-list {
  margin: 0;
  padding-left: 18px;
}

.methodology-explainer {
  margin: 6px 0 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.08);
  border-left: 3px solid rgba(6, 182, 212, 0.55);
  font-size: 0.8rem;
  line-height: 1.48;
  color: var(--text-muted);
}

.artist-tier-methodology {
  margin-top: 8px;
}

/* Album Dossier Edition Box & Secondary Deep-Dive Divider */
.album-edition-summary-box {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 22, 36, 0.55);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.album-edition-identifiers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.album-edition-scope-note {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.album-tracklist-basis {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text);
}

.album-tracklist-basis.is-verified-edition strong {
  color: var(--emerald);
}

.album-tracklist-basis.is-assembled-archive strong {
  color: var(--amber);
}

.dossier-deep-dive-section {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dossier-section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dossier-section-divider::before,
.dossier-section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.25);
}

/* Charts & Compare Explainers */
.charts-methodology-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin-bottom: 12px;
}

.charts-method-copy {
  flex: 1 1 260px;
  min-width: 0;
}

.charts-producers-cta {
  flex: 0 0 auto;
  border-color: rgba(245, 158, 11, 0.55);
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  font-weight: 700;
}

.compare-coverage-banner {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 22, 36, 0.55);
}

.compare-coverage-banner.is-uneven {
  border-color: rgba(245, 158, 11, 0.48);
  background: rgba(245, 158, 11, 0.08);
}

.compare-coverage-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.84rem;
}

.compare-coverage-copy {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Record Scanner Categorized Sections */
.scanner-section-block {
  margin-bottom: 16px;
}

.scanner-section-heading {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text);
}

.scanner-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scanner-exact-badge {
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(16, 185, 129, 0.55);
  color: #6ee7b7;
  font-weight: 800;
}

.scanner-result-card.is-exact-match {
  border-color: rgba(16, 185, 129, 0.52);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.12);
}

.scanner-scope-line {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 3px 0 6px;
}

.scanner-external-section {
  padding-top: 12px;
  border-top: 1px dashed rgba(148, 163, 184, 0.28);
}

.scanner-external-note {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Light Theme Overrides for v4.4 Components */
html[data-theme="light"] .entry-pill--otd {
  border-color: rgba(14, 116, 144, 0.45);
  background: rgba(6, 182, 212, 0.12);
  color: #0e7490;
}

html[data-theme="light"] .track-rel-group,
html[data-theme="light"] .album-edition-summary-box,
html[data-theme="light"] .compare-coverage-banner {
  background: #f8fafc;
  border-color: var(--border-strong);
}

html[data-theme="light"] .compare-coverage-banner.is-uneven {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(180, 83, 9, 0.45);
}

html[data-theme="light"] .track-rel-summary:hover {
  background: #f1f5f9;
}

html[data-theme="light"] .missing-artist-agent-callout {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(14, 116, 144, 0.4);
}

html[data-theme="light"] .source-meta-pill {
  background: rgba(14, 116, 144, 0.12);
  color: #0e7490;
}

html[data-theme="light"] .source-precision-note {
  background: rgba(245, 158, 11, 0.16);
  color: #92400e;
}

html[data-theme="light"] .source-conflict-tag,
html[data-theme="light"] .source-conflict-head {
  color: #9f1239;
}

html[data-theme="light"] .methodology-explainer {
  background: #f1f5f9;
  color: #334155;
  border-left-color: #0e7490;
}

html[data-theme="light"] .charts-producers-cta {
  color: #92400e;
  border-color: rgba(180, 83, 9, 0.48);
  background: rgba(245, 158, 11, 0.16);
}

html[data-theme="light"] .scanner-exact-badge {
  background: rgba(5, 150, 105, 0.14);
  border-color: rgba(5, 150, 105, 0.45);
  color: #065f46;
}

html[data-theme="light"] .discog-agent-helper,
html[data-theme="light"] .album-edition-scope-note,
html[data-theme="light"] .compare-coverage-copy,
html[data-theme="light"] .scanner-scope-line,
html[data-theme="light"] .scanner-external-note,
html[data-theme="light"] .source-conflict-body {
  color: #334155;
}

@media (max-width: 639px) {
  .search-hero-head {
    gap: 8px;
  }
  .start-entry-strip {
    width: 100%;
  }
  .start-entry-strip .entry-pill {
    flex: 1 1 auto;
    justify-content: center;
  }
  .charts-methodology-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

