/* 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', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', 'Noto Sans JP', 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);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.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: 5px 10px;
  padding: 6px 0 4px;
}

.brand-logo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  border-radius: 10px;
  flex: 0 0 auto;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.15s ease;
}
.brand-ear-logo {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(56, 189, 248, 0.22));
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), filter 0.18s ease;
}
@media (hover: hover) and (pointer: fine) {
  .brand-logo-btn:hover .brand-ear-logo {
    transform: scale(1.07);
    filter: drop-shadow(0 3px 12px rgba(168, 85, 247, 0.36));
  }
}
.brand-logo-btn:active .brand-ear-logo {
  transform: scale(0.96);
}
.brand-logo-btn:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.mobile-ready-dot {
  display: none;
}

.header-motto {
  margin: 0;
  padding: 0 8px;
  min-width: 0;
  max-width: 100%;
  text-align: center;
  font-family: var(--font-sans);
  font-size: clamp(0.84rem, 1.05vw, 0.98rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: #e2e8f0;
  background: linear-gradient(90deg, #e2e8f0 0%, #fde68a 50%, #e0f2fe 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 6px rgba(15, 23, 42, 0.45));
  text-wrap: balance;
}

.mobile-header-motto {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  flex: 0 1 auto;
  max-width: 100%;
}

@media (min-width: 640px) {
  .header-top {
    display: grid;
    grid-template-columns: minmax(112px, 1fr) minmax(0, auto) minmax(112px, 1fr);
    align-items: center;
    gap: 5px 12px;
  }
  .header-top > .brand-logo-btn {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }
  .header-top > .header-motto {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
  }
  .header-top > .header-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }
}

@media (min-width: 820px) {
  .header-motto {
    white-space: nowrap;
  }
}

@media (min-width: 640px) and (max-width: 819px) {
  .header-top {
    grid-template-columns: minmax(108px, 1fr) minmax(0, auto) minmax(108px, 1fr);
    gap: 4px 8px;
  }
  .header-motto {
    font-size: 0.78rem;
    padding: 0 4px;
  }
}

@media (min-width: 1024px) {
  .header-top {
    position: relative;
  }
  .header-actions > #index-status-pill,
  .header-secondary-items > #index-status-pill {
    position: absolute;
    top: 28px;
    right: 0;
    transform: translateY(-50%);
    z-index: 2;
    max-width: calc(50% - 170px);
    overflow: hidden;
  }
  #index-status-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.header-secondary-items {
  display: contents;
}

.header-secondary-items > #btn-open-story {
  order: 1;
}

.header-secondary-items > #btn-open-guide {
  order: 2;
}

.header-actions > #index-status-pill,
.header-secondary-items > #index-status-pill {
  order: 3;
}

.header-actions > #btn-open-scanner {
  order: 4;
}

.header-actions > #btn-open-crate {
  order: 5;
}

.header-actions > #btn-open-mixtape {
  order: 5;
}

.header-secondary-items > #btn-open-user-sync {
  order: 6;
}

.header-secondary-items > #btn-theme-toggle {
  order: 7;
}

.header-secondary-items > #lang-picker-wrap,
.header-secondary-items > #btn-lang-toggle {
  order: 8;
}

.header-secondary-items > #btn-open-legal {
  order: 9;
}

.header-secondary-items > #btn-header-owner-lock {
  order: 10;
}

/* 9-Language Selector Dropdown */
.lang-picker-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang-picker-btn {
  white-space: nowrap;
}

.lang-caret {
  font-size: 0.72rem;
  opacity: 0.78;
  transition: transform 0.15s ease;
}

.lang-picker-btn[aria-expanded="true"] .lang-caret {
  transform: rotate(180deg);
}

.lang-picker-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 198px;
  max-height: calc(100dvh - 80px);
  overflow-y: auto;
  padding: 6px;
  border-radius: 14px;
  background: rgba(15, 22, 36, 0.98);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-strong);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 3px;
  z-index: 95;
}

.lang-picker-menu.hidden {
  display: none;
}

.lang-picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.lang-picker-item:hover {
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.24);
}

.lang-picker-item.active {
  background: var(--amber-soft);
  border-color: rgba(251, 191, 36, 0.48);
  color: #fef3c7;
}

.lang-item-code {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  opacity: 0.72;
}

.lang-flag-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
}

.lang-flag-svg {
  display: block;
  width: 20px;
  height: 14px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.24), 0 1px 2px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.guide-mock-chip .lang-flag-svg {
  width: 17px;
  height: 12px;
  border-radius: 2px;
}

.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;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), filter 0.24s ease;
}

.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;
}

.discog-agent-info-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.discog-agent-info-btn {
  position: relative;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(6, 182, 212, 0.45);
  background: rgba(6, 182, 212, 0.14);
  color: #67e8f9;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
}

.discog-agent-info-btn::after {
  content: "";
  position: absolute;
  inset: -10px;
}

.discog-agent-info-svg {
  width: 15px;
  height: 15px;
  display: block;
  pointer-events: none;
}

.discog-agent-info-btn:hover,
.discog-agent-info-btn:focus-visible,
.discog-agent-info-wrap.is-open .discog-agent-info-btn {
  background: rgba(6, 182, 212, 0.28);
  border-color: rgba(103, 232, 249, 0.85);
  color: #ecfeff;
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
  outline: none;
}

.discog-agent-info-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(400px, calc(100vw - 28px));
  z-index: 88;
  padding: 13px 15px;
  border-radius: 14px;
  background: #0b111e;
  border: 1px solid rgba(6, 182, 212, 0.56);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.82), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s ease;
}

.discog-agent-info-popover::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.discog-agent-info-popover::after {
  content: "";
  position: absolute;
  top: -6px;
  right: 7px;
  width: 10px;
  height: 10px;
  background: #0b111e;
  border-top: 1px solid rgba(6, 182, 212, 0.56);
  border-left: 1px solid rgba(6, 182, 212, 0.56);
  transform: rotate(45deg);
  pointer-events: none;
}

.discog-agent-info-wrap.is-open .discog-agent-info-popover,
.discog-agent-info-wrap:focus-within .discog-agent-info-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

@media (hover: hover) {
  .discog-agent-info-wrap:hover .discog-agent-info-popover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }
}

.discog-agent-info-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #67e8f9;
  line-height: 1.3;
}

.discog-agent-info-head-icon {
  flex-shrink: 0;
  font-size: 0.95rem;
}

.discog-agent-info-lead {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.42;
  color: var(--text);
}

.discog-agent-info-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.discog-agent-info-steps li {
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--text-muted);
  padding: 7px 9px;
  border-radius: 9px;
  background: rgba(19, 28, 46, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.discog-agent-info-steps li strong {
  color: #fde68a;
  font-weight: 700;
}

.discog-agent-info-foot {
  margin: 0;
  padding-top: 2px;
  font-size: 0.73rem;
  line-height: 1.38;
  color: var(--text-dim);
}

.index-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.69rem;
  line-height: 1.15;
  white-space: nowrap;
  color: var(--text-muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  animation: pulseDot 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
.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;
}
.header-actions .pill-btn {
  padding: 3px 8px;
  font-size: 0.70rem;
  gap: 4px;
  line-height: 1.15;
  white-space: nowrap;
}
.header-actions .lang-flag-svg {
  width: 17px;
  height: 12px;
}
.pill-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

@media (min-width: 1240px) {
  .header-top > .header-actions {
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 4px;
  }
  .header-actions .pill-btn {
    flex: 0 0 auto;
    padding: 3px 7.5px;
    font-size: 0.695rem;
    gap: 3.5px;
  }
  .header-actions > #btn-open-user-sync.is-signed-in #ui-sync-btn,
  .header-secondary-items > #btn-open-user-sync.is-signed-in #ui-sync-btn {
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (min-width: 1240px) and (max-width: 1359px) {
  .header-top > .header-actions {
    gap: 3px;
  }
  .header-actions .pill-btn {
    padding: 3px 5.5px;
    font-size: 0.645rem;
    gap: 2.5px;
  }
  .header-actions .admin-online-chip {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.66rem;
  }
  .header-actions .crate-count-pill {
    padding: 1px 5px;
    font-size: 0.65rem;
  }
}

/* Primary Nav Tabs & Live Discography Agent Bar */
@keyframes earshotNavBarAurora {
  0%, 100% {
    transform: translateX(2%);
    opacity: 0.46;
  }
  50% {
    transform: translateX(114%);
    opacity: 0.80;
  }
}

@keyframes earshotNavRailGlide {
  0%, 100% {
    transform: translateX(190%);
    opacity: 0.52;
  }
  50% {
    transform: translateX(2%);
    opacity: 0.96;
  }
}

@keyframes earshotNavTabSheen {
  0% {
    transform: translateX(0%);
    opacity: 0;
  }
  12% {
    opacity: 0.95;
  }
  28% {
    transform: translateX(115%);
    opacity: 0;
  }
  100% {
    transform: translateX(115%);
    opacity: 0;
  }
}

@keyframes earshotNavTabAccentPulse {
  0%, 100% {
    opacity: 0.24;
    transform: scaleX(0.56);
  }
  14% {
    opacity: 0.88;
    transform: scaleX(0.96);
  }
  30% {
    opacity: 0.24;
    transform: scaleX(0.56);
  }
}

@keyframes earshotNavActiveSheen {
  0% {
    transform: translateX(0%);
    opacity: 0;
  }
  18% {
    opacity: 0.95;
  }
  36% {
    transform: translateX(106%);
    opacity: 0;
  }
  100% {
    transform: translateX(106%);
    opacity: 0;
  }
}

@keyframes earshotNavActiveRail {
  0%, 100% {
    opacity: 0.78;
    transform: scaleX(0.92);
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes earshotNavIconBreath {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-0.5px) scale(1.08);
  }
}

.header-bottom-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px 8px;
  margin: 0 0 5px;
}

.nav-tabs {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 3px;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(16, 24, 46, 0.94) 0%, rgba(11, 17, 34, 0.96) 100%) padding-box,
    linear-gradient(
      115deg,
      rgba(34, 211, 238, 0.62) 0%,
      rgba(56, 189, 248, 0.56) 24%,
      rgba(99, 102, 241, 0.60) 52%,
      rgba(168, 85, 247, 0.62) 78%,
      rgba(217, 70, 239, 0.58) 100%
    ) border-box;
  border: 1px solid transparent;
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 6px 20px -8px rgba(99, 102, 241, 0.36),
    0 2px 12px -4px rgba(56, 189, 248, 0.18);
}

.nav-tabs::before {
  content: "";
  position: absolute;
  inset-block: 0;
  left: 0;
  width: 46%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    ellipse closest-side at center,
    rgba(56, 189, 248, 0.24) 0%,
    rgba(99, 102, 241, 0.20) 45%,
    rgba(168, 85, 247, 0.14) 74%,
    transparent 100%
  );
  will-change: transform, opacity;
  animation: earshotNavBarAurora 14s ease-in-out infinite;
}

.nav-tabs::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 34%;
  height: 2px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #22d3ee 24%,
    #6366f1 52%,
    #a855f7 76%,
    #e879f9 88%,
    transparent 100%
  );
  will-change: transform, opacity;
  animation: earshotNavRailGlide 16s ease-in-out infinite;
}

.discog-agent-wrap {
  position: relative;
  flex: 1 1 395px;
  max-width: 560px;
  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 {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  padding: 4px 7px;
  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: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.discog-agent-head-row {
  width: 100%;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: nowrap;
}

.discog-agent-input-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
}

.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 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 2px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #67e8f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discog-agent-input {
  flex: 1 1 250px;
  min-width: 0;
  min-height: 44px;
  padding: 6px 9px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: var(--bg-input);
  color: var(--text);
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.discog-agent-input::placeholder {
  color: #f85149;
  opacity: 1;
  font-size: 0.69rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: normal;
}

.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: 6px 11px;
  border-radius: 9px;
  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.75rem;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  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;
}

.discog-agent-candidates-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(500px, 92vw);
  max-height: min(440px, 68dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 75;
  padding: 12px;
  border-radius: 14px;
  background: rgba(13, 20, 34, 0.985);
  border: 1px solid rgba(6, 182, 212, 0.52);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.72);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.discog-agent-candidates-panel.is-prompt-mode {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.76), 0 0 0 2px rgba(245, 158, 11, 0.16);
}

.discog-cand-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.discog-cand-head-title {
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  color: #e0f2fe;
}

.discog-agent-candidates-panel.is-prompt-mode .discog-cand-head-title {
  color: #fef3c7;
}

.discog-cand-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.discog-cand-item {
  width: 100%;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(22, 32, 52, 0.82);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.1s ease;
}

.discog-cand-item:hover,
.discog-cand-item:focus-visible,
.discog-cand-item.is-active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(245, 158, 11, 0.14));
  border-color: rgba(34, 211, 238, 0.65);
  outline: none;
}

.discog-cand-item:active {
  transform: scale(0.99);
}

.discog-cand-flag-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.24);
  font-size: 0.75rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  max-width: 148px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discog-cand-flag-pill .country-flag-svg {
  flex-shrink: 0;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.discog-cand-flag-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.discog-cand-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.discog-cand-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.discog-cand-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

.discog-cand-meta-chip {
  font-size: 0.69rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-muted);
  white-space: nowrap;
}

.discog-cand-meta-chip.is-in-archive {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.42);
  color: #6ee7b7;
}

.discog-cand-sub {
  font-size: 0.74rem;
  line-height: 1.3;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.discog-cand-cta {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fde68a;
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
}

.discog-cand-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 4px 2px;
}

.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-group {
  display: inline-flex;
  align-items: stretch;
  flex: 0 0 auto;
}
.discog-queue-pill {
  flex: 0 0 auto;
  min-height: 24px;
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 7px;
  border: 1px solid rgba(6, 182, 212, 0.42);
  background: rgba(6, 182, 212, 0.14);
  color: #67e8f9;
  font-size: 0.70rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.discog-queue-pill.has-clear {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.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-queue-pill-clear {
  flex: 0 0 auto;
  min-height: 24px;
  min-width: 24px;
  padding: 0 6px;
  border-radius: 0 7px 7px 0;
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-left: none;
  background: rgba(16, 185, 129, 0.1);
  color: #6ee7b7;
  font-size: 0.70rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.discog-queue-pill-clear:hover {
  background: rgba(244, 63, 94, 0.22);
  border-color: rgba(244, 63, 94, 0.55);
  color: #fecdd3;
}

.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 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}
.discog-queue-clear-btn {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(30, 41, 59, 0.6);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.discog-queue-clear-btn:hover {
  background: rgba(244, 63, 94, 0.18);
  border-color: rgba(244, 63, 94, 0.5);
  color: #fecdd3;
}
.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-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.discog-queue-dismiss-btn {
  flex: 0 0 auto;
  min-width: 36px;
  min-height: 36px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(30, 41, 59, 0.55);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.discog-queue-dismiss-btn:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.55);
  color: #fecdd3;
}
.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 {
  position: relative;
  z-index: 1;
  overflow: hidden;
  isolation: isolate;
  flex: 0 0 auto;
  min-height: 44px;
  min-width: 44px;
  padding: 6px 9px;
  border-radius: 9px;
  border: 1px solid rgba(129, 140, 248, 0.24);
  background: linear-gradient(180deg, rgba(24, 34, 62, 0.72) 0%, rgba(15, 22, 42, 0.76) 100%);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.24s ease, color 0.22s ease, border-color 0.24s ease, box-shadow 0.24s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-tab > span {
  position: relative;
  z-index: 1;
}
.nav-tab::before {
  content: "";
  position: absolute;
  inset-block: 0;
  left: 0;
  width: 46%;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(34, 211, 238, 0.20) 26%,
    rgba(99, 102, 241, 0.28) 50%,
    rgba(168, 85, 247, 0.24) 74%,
    rgba(232, 121, 249, 0.14) 88%,
    transparent 100%
  );
  transform: translateX(0%);
  opacity: 0;
  will-change: transform, opacity;
  animation: earshotNavTabSheen 12s ease-in-out infinite;
}
.nav-tab::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    90deg,
    rgba(34, 211, 238, 0.92),
    rgba(99, 102, 241, 0.95),
    rgba(168, 85, 247, 0.92),
    rgba(232, 121, 249, 0.90)
  );
  transform-origin: center;
  transform: scaleX(0.56);
  opacity: 0.24;
  will-change: transform, opacity;
  animation: earshotNavTabAccentPulse 12s ease-in-out infinite;
}
.nav-tab:not(.active):nth-child(1)::before,
.nav-tab:not(.active):nth-child(1)::after { animation-delay: 0s; }
.nav-tab:not(.active):nth-child(2)::before,
.nav-tab:not(.active):nth-child(2)::after { animation-delay: 0.65s; }
.nav-tab:not(.active):nth-child(3)::before,
.nav-tab:not(.active):nth-child(3)::after { animation-delay: 1.3s; }
.nav-tab:not(.active):nth-child(4)::before,
.nav-tab:not(.active):nth-child(4)::after { animation-delay: 1.95s; }
.nav-tab:not(.active):nth-child(5)::before,
.nav-tab:not(.active):nth-child(5)::after { animation-delay: 2.6s; }
.nav-tab:not(.active):nth-child(6)::before,
.nav-tab:not(.active):nth-child(6)::after { animation-delay: 3.25s; }
@media (min-width: 1025px) and (pointer: fine) {
  .nav-tab {
    min-height: 34px;
    padding: 4px 8px;
    font-size: 0.76rem;
    gap: 4px;
  }
  .discog-agent-input {
    min-height: 32px;
    padding: 4px 8px;
    font-size: 0.80rem;
  }
  .discog-agent-btn {
    min-height: 32px;
    padding: 4px 9px;
    font-size: 0.73rem;
  }
}
@media (hover: hover) and (pointer: fine) {
  .nav-tab:not(.active):hover {
    color: #ffffff;
    transform: translateY(-1px);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(99, 102, 241, 0.26), rgba(168, 85, 247, 0.22));
    border-color: rgba(96, 165, 250, 0.62);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      0 4px 14px -4px rgba(56, 189, 248, 0.32);
  }
  .nav-tab:not(.active):hover::after {
    opacity: 1;
    transform: scaleX(1);
    animation-play-state: paused;
  }
  .nav-tab:not(.active):hover .nav-tab-icon {
    transform: scale(1.12);
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.55));
  }
  .nav-tab.active:hover {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.28),
      0 4px 18px -3px rgba(139, 92, 246, 0.55),
      0 0 16px -4px rgba(56, 189, 248, 0.45);
  }
}
.nav-tab:active {
  transform: scale(0.97);
}
.nav-tab:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: -2px;
}
.nav-tab.active {
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.34), rgba(99, 102, 241, 0.38), rgba(168, 85, 247, 0.36), rgba(217, 70, 239, 0.30)) padding-box,
    linear-gradient(115deg, rgba(56, 189, 248, 0.92), rgba(129, 140, 248, 0.88), rgba(232, 121, 249, 0.90)) border-box;
  border: 1px solid transparent;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 3px 14px -3px rgba(99, 102, 241, 0.50),
    0 0 12px -4px rgba(56, 189, 248, 0.36);
  font-weight: 700;
}
.nav-tab.active::before {
  width: 48%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.16) 28%,
    rgba(56, 189, 248, 0.26) 50%,
    rgba(232, 121, 249, 0.22) 74%,
    transparent 100%
  );
  animation: earshotNavActiveSheen 9.5s ease-in-out 0s infinite;
}
.nav-tab.active::after {
  left: 10%;
  right: 10%;
  height: 2.5px;
  background: linear-gradient(90deg, #22d3ee 0%, #818cf8 48%, #c084fc 78%, #e879f9 100%);
  animation: earshotNavActiveRail 6.5s ease-in-out 0s infinite;
}
.nav-tab.active .nav-tab-icon {
  filter: drop-shadow(0 0 7px rgba(56, 189, 248, 0.45));
  animation: earshotNavIconBreath 7.5s ease-in-out infinite;
}

main.container {
  padding-top: 10px;
}

/* 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 16% -25%, rgba(56, 189, 248, 0.09), transparent 60%),
    radial-gradient(ellipse 68% 105% at 86% -20%, rgba(168, 85, 247, 0.09), transparent 58%),
    var(--bg-elevated);
  border: 1px solid rgba(99, 102, 241, 0.28);
  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: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(99, 102, 241, 0.18), rgba(168, 85, 247, 0.16));
  border: 1px solid rgba(129, 140, 248, 0.44);
  color: #bae6fd;
  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-kbd-hint {
    display: none;
  }
}

.search-box-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

@keyframes earshotSearchGlowA {
  0%, 100% {
    opacity: 0.20;
    transform: scale(0.996);
  }
  50% {
    opacity: 0.58;
    transform: scale(1.004);
  }
}

@keyframes earshotSearchGlowB {
  0%, 100% {
    opacity: 0.14;
    transform: scale(0.997);
  }
  50% {
    opacity: 0.50;
    transform: scale(1.003);
  }
}

.search-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  border-radius: 13px;
  isolation: isolate;
}

.search-input-wrap::before,
.search-input-wrap::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 15px;
  pointer-events: none;
  z-index: 0;
  will-change: opacity, transform;
}

.search-input-wrap::before {
  background: linear-gradient(
    110deg,
    rgba(34, 211, 238, 0.76) 0%,
    rgba(56, 189, 248, 0.68) 26%,
    rgba(99, 102, 241, 0.70) 58%,
    rgba(168, 85, 247, 0.76) 100%
  );
  filter: blur(13px);
  opacity: 0.36;
  animation: earshotSearchGlowA 8.5s ease-in-out infinite;
}

.search-input-wrap::after {
  background: linear-gradient(
    110deg,
    rgba(168, 85, 247, 0.70) 0%,
    rgba(129, 140, 248, 0.65) 45%,
    rgba(56, 189, 248, 0.68) 78%,
    rgba(34, 211, 238, 0.74) 100%
  );
  filter: blur(12px);
  opacity: 0.26;
  animation: earshotSearchGlowB 8.5s ease-in-out -4.25s infinite;
}

.search-icon {
  position: absolute;
  left: 9px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(99, 102, 241, 0.16));
  border: 1px solid rgba(56, 189, 248, 0.44);
  color: #38bdf8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 12px -3px rgba(56, 189, 248, 0.30);
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 2;
  transition: background 0.24s ease, border-color 0.24s ease, color 0.24s ease, box-shadow 0.24s ease;
}

.search-input-wrap:focus-within .search-icon {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.26), rgba(139, 92, 246, 0.22));
  border-color: rgba(125, 211, 252, 0.72);
  color: #7dd3fc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 0 14px -2px rgba(56, 189, 248, 0.42);
}

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 {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 54px;
  padding: 11px 118px 11px 55px;
  border-radius: 13px;
  border: 1.5px solid transparent;
  background:
    linear-gradient(180deg, #162137 0%, #0e1628 100%) padding-box,
    linear-gradient(
      110deg,
      rgba(56, 189, 248, 0.72) 0%,
      rgba(99, 102, 241, 0.68) 48%,
      rgba(168, 85, 247, 0.72) 100%
    ) border-box;
  color: #ffffff;
  font-size: 1.03rem;
  font-weight: 500;
  outline: none;
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.14),
    0 6px 20px -6px rgba(8, 12, 24, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
  transition: box-shadow 0.22s ease, background 0.22s 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 {
  background:
    linear-gradient(180deg, #192640 0%, #101a2e 100%) padding-box,
    linear-gradient(
      110deg,
      rgba(56, 189, 248, 0.90) 0%,
      rgba(99, 102, 241, 0.86) 48%,
      rgba(168, 85, 247, 0.90) 100%
    ) border-box;
  box-shadow:
    0 0 0 2px rgba(99, 102, 241, 0.18),
    0 8px 24px -6px rgba(56, 189, 248, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.search-input:focus {
  background:
    linear-gradient(180deg, #1c2a46 0%, #121d33 100%) padding-box,
    linear-gradient(110deg, #38bdf8 0%, #6366f1 50%, #a855f7 100%) border-box;
  box-shadow:
    0 0 0 3px rgba(99, 102, 241, 0.26),
    0 10px 28px -6px rgba(139, 92, 246, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

input.search-input:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(56, 189, 248, 0.34),
    0 10px 28px -6px rgba(139, 92, 246, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.search-cta-btn {
  position: absolute;
  right: 5px;
  min-height: 44px;
  min-width: 44px;
  padding: 6px 14px;
  border-radius: 10px;
  border: 1px solid rgba(167, 139, 250, 0.52);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.28) 0%, rgba(99, 102, 241, 0.30) 50%, rgba(168, 85, 247, 0.30) 100%);
  color: #eef2ff;
  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.16), 0 2px 10px rgba(99, 102, 241, 0.24);
  cursor: pointer;
  touch-action: manipulation;
  z-index: 2;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.search-cta-btn:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.36) 0%, rgba(99, 102, 241, 0.42) 50%, rgba(168, 85, 247, 0.44) 100%);
  border-color: rgba(196, 181, 253, 0.85);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 14px rgba(139, 92, 246, 0.34);
}

button.search-cta-btn:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

.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);
}

/* Highlighted Charts Time Machine Quick Jumps */
.quick-chips.charts-quick-jumps {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.14) 0%,
    rgba(15, 23, 42, 0.92) 48%,
    rgba(6, 182, 212, 0.13) 100%
  );
  border: 1px solid rgba(245, 158, 11, 0.44);
  box-shadow:
    0 8px 24px -10px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(253, 224, 71, 0.18);
  gap: 8px;
  align-items: center;
}

.charts-quick-jumps .chip-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.45);
  padding: 6px 11px;
  border-radius: 999px;
  margin-right: 4px;
  line-height: 1.2;
  white-space: nowrap;
}
.charts-quick-jumps .chip-label::before {
  content: "⚡";
  font-size: 0.84rem;
  line-height: 1;
}

.quick-chip.charts-quick-chip {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 15px;
  gap: 7px;
  color: #f8fafc;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-width: 1.5px;
  border-style: solid;
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease,
    color 0.16s ease;
}

.quick-chip.charts-quick-chip.tone-national {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.24) 0%, rgba(30, 41, 59, 0.96) 100%);
  border-color: rgba(251, 191, 36, 0.62);
  color: #fef9c3;
}

.quick-chip.charts-quick-chip.tone-billboard {
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.22) 0%, rgba(23, 37, 64, 0.96) 100%);
  border-color: rgba(56, 189, 248, 0.58);
  color: #e0f2fe;
}

.quick-chip.charts-quick-chip.tone-eurovision {
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.26) 0%, rgba(34, 28, 66, 0.96) 100%);
  border-color: rgba(196, 181, 253, 0.62);
  color: #f3e8ff;
}

.charts-quick-flags {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.charts-quick-flag {
  display: inline-block;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.26);
  vertical-align: middle;
  flex-shrink: 0;
}

.charts-quick-icon {
  font-size: 0.95rem;
  line-height: 1;
  flex-shrink: 0;
}

@media (hover: hover) and (pointer: fine) {
  .quick-chip.charts-quick-chip:hover {
    transform: translateY(-1px);
    color: #ffffff;
  }
  .quick-chip.charts-quick-chip.tone-national:hover {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.36) 0%, rgba(38, 49, 68, 0.98) 100%);
    border-color: #fde047;
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.28);
  }
  .quick-chip.charts-quick-chip.tone-billboard:hover {
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.34) 0%, rgba(28, 46, 78, 0.98) 100%);
    border-color: #67e8f9;
    box-shadow: 0 6px 16px rgba(6, 182, 212, 0.26);
  }
  .quick-chip.charts-quick-chip.tone-eurovision:hover {
    background: linear-gradient(180deg, rgba(167, 139, 250, 0.38) 0%, rgba(44, 36, 86, 0.98) 100%);
    border-color: #ddd6fe;
    box-shadow: 0 6px 16px rgba(167, 139, 250, 0.28);
  }
}

.quick-chip.charts-quick-chip:active {
  transform: scale(0.98);
}

.quick-chip.charts-quick-chip:focus-visible {
  outline: 2px solid #fde047;
  outline-offset: 2px;
}

.quick-chip.charts-quick-chip.is-active,
.quick-chip.charts-quick-chip.is-active:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-color: #fef08a;
  color: #090d16;
  box-shadow:
    0 0 0 2px rgba(251, 191, 36, 0.34),
    0 6px 18px rgba(245, 158, 11, 0.4);
}

.quick-chip.charts-quick-chip.is-active .charts-quick-flag {
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.28);
}

.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-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-width: 0;
}

.track-weekly-rank-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}
.track-weekly-rank-prev {
  font-weight: 700;
  opacity: 0.92;
}
.track-weekly-rank-pill.is-no1 {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.45);
}
.track-weekly-rank-pill.is-no2 {
  background: rgba(203, 213, 225, 0.16);
  color: #e2e8f0;
  border-color: rgba(203, 213, 225, 0.42);
}
.track-weekly-rank-pill.is-no3 {
  background: rgba(217, 119, 6, 0.16);
  color: #fdba74;
  border-color: rgba(234, 88, 12, 0.42);
}
.track-weekly-rank-pill.is-muted {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.3);
}
.track-weekly-rank-pill.is-new {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.42);
}
.track-weekly-rank-pill.is-up {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.38);
}
.track-weekly-rank-pill.is-down {
  background: rgba(244, 63, 94, 0.14);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.36);
}
.track-weekly-rank-pill.is-same {
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.35);
}

.track-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
  min-width: 0;
  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;
}
#discog-groups-wrap > .discog-section-heading:first-child {
  margin-top: 2px;
}

.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;
}
.btn-soundiiz {
  position: relative;
  min-height: 44px;
  background: rgba(29, 185, 84, 0.16);
  border-color: rgba(29, 185, 84, 0.55);
  color: #4ade80;
  font-weight: 600;
}
.btn-soundiiz:hover {
  background: rgba(29, 185, 84, 0.28);
  border-color: rgba(29, 185, 84, 0.8);
}
.btn-soundiiz:disabled {
  opacity: 0.65;
  cursor: wait;
}
.btn-soundiiz-json {
  position: relative;
  min-height: 44px;
}
@media (hover: hover) and (pointer: fine) {
  [data-soundiiz-tip]::after {
    content: attr(data-soundiiz-tip);
    position: absolute;
    top: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    z-index: 80;
    pointer-events: none;
    white-space: pre-line;
    width: max-content;
    max-width: min(320px, 84vw);
    text-align: center;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.96);
    color: #f8fafc;
    border: 1px solid rgba(29, 185, 84, 0.55);
    box-shadow: 0 8px 22px rgba(2, 6, 23, 0.45);
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.35;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
  }
  [data-soundiiz-tip]:hover::after,
  [data-soundiiz-tip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
}
.soundiiz-status-banner {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(29, 185, 84, 0.45);
  background: rgba(29, 185, 84, 0.1);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
  word-break: break-word;
}
.soundiiz-status-banner[hidden] {
  display: none;
}
.soundiiz-status-banner.is-error {
  border-color: rgba(244, 63, 94, 0.5);
  background: rgba(244, 63, 94, 0.1);
}
.soundiiz-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.soundiiz-status-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  text-decoration: none;
}

/* 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;
}
button.stat-box.is-clickable-stat {
  appearance: none;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  min-height: 44px;
  transition: border-color 0.16s, transform 0.14s, background 0.16s;
}
button.stat-box.is-clickable-stat:hover {
  border-color: var(--amber);
  transform: translateY(-1px);
  background: rgba(245, 158, 11, 0.09);
}
html[data-theme="light"] button.stat-box.is-clickable-stat:hover {
  background: rgba(217, 119, 6, 0.08);
  border-color: rgba(217, 119, 6, 0.55);
}
.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);
}

.legal-sources-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.legal-sources-list li {
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--bg-soft, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
  font-size: 0.855rem;
  line-height: 1.52;
  color: var(--text-muted);
  overflow-wrap: break-word;
}

.legal-sources-list li strong {
  color: var(--text);
}

.legal-sources-cat {
  display: block;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  font-size: 0.875rem;
}

@media (max-width: 600px) {
  .legal-sources-list li {
    padding: 8px 10px;
    font-size: 0.83rem;
  }
}

.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;
}

.btn-embed-player,
[data-embed-tip] {
  position: relative;
}
[data-embed-tip]:hover,
[data-embed-tip]:focus-visible {
  z-index: 90;
}
[data-embed-tip]::after {
  content: attr(data-embed-tip);
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(calc(-50% + var(--embed-tip-shift, 0px))) translateY(4px);
  width: max-content;
  max-width: min(310px, calc(100vw - 40px));
  white-space: normal;
  text-align: center;
  padding: 8px 12px;
  border-radius: 10px;
  background: #0b111e;
  color: #f8fafc;
  border: 1px solid rgba(6, 182, 212, 0.55);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.68), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.38;
  letter-spacing: 0.01em;
  text-wrap: balance;
  z-index: 95;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.16s ease, transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.16s ease;
}
[data-embed-tip]::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  width: 9px;
  height: 9px;
  background: #0b111e;
  border-right: 1px solid rgba(6, 182, 212, 0.55);
  border-bottom: 1px solid rgba(6, 182, 212, 0.55);
  transform: translateX(-50%) translateY(4px) rotate(45deg);
  z-index: 96;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.16s ease, transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.16s ease;
}
[data-embed-tip].is-embed-tip-below::after {
  bottom: auto;
  top: calc(100% + 9px);
  transform: translateX(calc(-50% + var(--embed-tip-shift, 0px))) translateY(-4px);
}
[data-embed-tip].is-embed-tip-below::before {
  bottom: auto;
  top: calc(100% + 4px);
  border-right: 0;
  border-bottom: 0;
  border-top: 1px solid rgba(6, 182, 212, 0.55);
  border-left: 1px solid rgba(6, 182, 212, 0.55);
  transform: translateX(-50%) translateY(-4px) rotate(45deg);
}
[data-embed-tip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(calc(-50% + var(--embed-tip-shift, 0px))) translateY(0);
}
[data-embed-tip]:focus-visible::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) rotate(45deg);
}
@media (hover: hover) and (pointer: fine) {
  [data-embed-tip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(calc(-50% + var(--embed-tip-shift, 0px))) translateY(0);
  }
  [data-embed-tip]:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) rotate(45deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-embed-tip]::before,
  [data-embed-tip]::after {
    transition: none;
  }
}

.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 {
  overflow-anchor: none;
  margin-top: 38px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.55;
  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 (min-width: 1280px) and (max-width: 1365px) {
  .discog-agent-input::placeholder {
    font-size: 0.615rem;
    letter-spacing: -0.02em;
  }
}

@media (min-width: 640px) and (max-width: 1279px) {
  .discog-agent-input::placeholder {
    font-size: 0.76rem;
    letter-spacing: -0.005em;
  }
}

@media (min-width: 640px) and (max-width: 899px) {
  .header-actions > #btn-open-scanner {
    order: 1;
  }
  .header-actions > #btn-open-crate {
    order: 2;
  }
  .header-actions > #btn-open-mixtape {
    order: 2;
  }
  .header-secondary-items > #btn-open-user-sync {
    order: 3;
  }
  .header-secondary-items > #btn-open-story {
    order: 4;
  }
  .header-secondary-items > #btn-open-guide {
    order: 5;
  }
  .header-actions > #index-status-pill,
  .header-secondary-items > #index-status-pill {
    order: 6;
  }
}

@media (min-width: 640px) and (max-width: 1024px) {
  .nav-tabs {
    width: fit-content;
    max-width: 100%;
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 4px;
    padding: 4px;
  }
  .nav-tab {
    min-height: 44px;
    min-width: 44px;
    padding: 6px 8px;
    font-size: 0.76rem;
  }
}

@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,
  .discog-agent-candidates-panel {
    position: static;
    width: 100%;
    margin-top: 8px;
  }
}

@media (max-width: 479px) {
  .discog-cand-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 8px;
  }
  .discog-cand-flag-pill {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    max-width: 100%;
  }
  .discog-cand-cta {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
  .discog-cand-body {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }
}

/* 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-ear-logo {
    height: 32px;
  }
  .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-motto {
    display: none;
  }
  .mobile-header-motto {
    display: block;
    margin: 0 0 8px;
    padding: 2px 6px 0;
    text-align: center;
    font-family: var(--font-sans);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.015em;
    line-height: 1.25;
    color: #e2e8f0;
    background: linear-gradient(90deg, #e2e8f0 0%, #fde68a 50%, #e0f2fe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-wrap: balance;
  }
  .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-actions > #btn-open-mixtape,
  .header-secondary-items > #btn-open-user-sync,
  .header-secondary-items > #index-status-pill,
  .header-secondary-items > #btn-open-story,
  .header-secondary-items > #btn-open-guide,
  .header-secondary-items > #btn-theme-toggle,
  .header-secondary-items > #lang-picker-wrap,
  .header-secondary-items > #btn-lang-toggle,
  .header-secondary-items > #btn-open-legal,
  .header-secondary-items > #btn-header-owner-lock {
    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;
  }
  #btn-open-mixtape {
    min-width: 44px;
    min-height: 44px;
    height: 44px;
    padding: 0 9px;
    border-radius: 12px;
    font-size: 0.9rem;
    gap: 4px;
  }
  #ui-mixtape-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));
    max-height: calc(100dvh - 88px - env(safe-area-inset-top));
    overflow-y: auto;
    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);
  }
  .header-secondary-items.is-mobile-open .lang-picker-wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .header-secondary-items.is-mobile-open .lang-picker-menu {
    position: static;
    width: 100%;
    min-width: 0;
    margin-top: 6px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
    box-shadow: none;
    background: rgba(8, 12, 20, 0.65);
  }
  .header-secondary-items.is-mobile-open .lang-picker-menu.hidden {
    display: none;
  }
  .header-secondary-items.is-mobile-open .lang-picker-item {
    min-height: 44px;
    padding: 8px 10px;
  }
  .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(6, 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(129, 140, 248, 0.36);
    background: rgba(10, 15, 28, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
      0 -6px 24px rgba(0, 0, 0, 0.45),
      0 -1px 16px -4px rgba(99, 102, 241, 0.30);
  }
  .nav-tabs::before,
  .nav-tabs::after {
    position: absolute;
  }
  .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: #cbd5e1;
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-align: center;
  }
  .nav-tab:not(.active)::before {
    background: radial-gradient(
      ellipse closest-side at center,
      rgba(56, 189, 248, 0.26) 0%,
      rgba(99, 102, 241, 0.28) 45%,
      rgba(168, 85, 247, 0.18) 74%,
      transparent 100%
    );
  }
  .nav-tab::after {
    left: 18%;
    right: 18%;
    bottom: 2px;
  }
  .nav-tab-icon {
    font-size: 1.05rem;
    line-height: 1.1;
  }
  .nav-tab.active {
    background:
      linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(99, 102, 241, 0.32), rgba(168, 85, 247, 0.30)) padding-box,
      linear-gradient(115deg, rgba(56, 189, 248, 0.85), rgba(129, 140, 248, 0.82), rgba(232, 121, 249, 0.82)) border-box;
    border-color: transparent;
    color: #ffffff;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.20),
      0 0 14px -4px rgba(139, 92, 246, 0.55);
  }
  .nav-tab.active::after {
    left: 14%;
    right: 14%;
    bottom: 2px;
  }
  .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: wrap;
  }
  .discog-agent-badge {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 2px;
    font-size: 0.98rem;
    line-height: 1.25;
    white-space: normal;
  }
  .discog-agent-input-row {
    flex-wrap: wrap;
    gap: 6px;
  }
  .discog-agent-input {
    flex: 1 1 280px;
    min-width: 0;
    padding: 8px 10px;
    font-size: 16px;
  }
  .discog-agent-input::placeholder {
    font-size: 0.70rem;
    letter-spacing: -0.015em;
  }
  .discog-agent-btn {
    flex: 1 0 auto;
    padding: 8px 12px;
    justify-content: center;
  }
  .discog-queue-pill {
    flex: 0 0 auto;
    min-height: 44px;
    min-width: 44px;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 0.74rem;
  }
  .discog-queue-pill-clear {
    min-width: 44px;
    min-height: 44px;
    border-radius: 0 10px 10px 0;
  }
  .discog-queue-dismiss-btn,
  .discog-queue-open-btn {
    min-height: 44px;
    min-width: 44px;
  }
  .discog-queue-clear-btn {
    min-height: 36px;
    padding: 5px 11px;
  }
  .discog-agent-info-wrap {
    position: static;
  }
  .discog-agent-info-btn {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }
  .discog-agent-info-btn::after {
    display: none;
  }
  .discog-agent-info-svg {
    width: 18px;
    height: 18px;
  }
  .discog-agent-info-popover {
    display: none;
    position: static;
    width: 100%;
    max-width: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: none;
  }
  .discog-agent-info-popover::before,
  .discog-agent-info-popover::after {
    display: none;
  }
  .discog-agent-wrap.is-mobile-open.has-info-open {
    overflow: visible;
  }
  .discog-agent-info-wrap.is-open .discog-agent-info-popover {
    display: flex;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    width: auto;
    max-height: calc(100dvh - 210px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow-y: auto;
    z-index: 92;
  }
  .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.charts-quick-jumps {
    padding: 10px 12px;
    scroll-padding-inline: 12px;
  }
  .quick-chips::-webkit-scrollbar {
    display: none;
  }
  .quick-chip,
  .chip-label {
    flex-shrink: 0;
  }
  .quick-chip.charts-quick-chip {
    min-height: 44px;
    padding: 8px 13px;
    font-size: 0.79rem;
  }
  .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;
  }
  #btn-open-mixtape {
    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-badge {
    font-size: 0.92rem;
  }
  .discog-agent-btn {
    flex: 1 1 100%;
  }
  .discog-agent-input::placeholder {
    font-size: 0.63rem;
    letter-spacing: -0.02em;
  }
  .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-card.is-unverified {
  border-color: rgba(245, 158, 11, 0.30);
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.08), rgba(15, 22, 36, 0.92));
}
.vinyl-flip-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.vinyl-verify-badge {
  font-size: 0.70rem;
  padding: 2px 7px;
  line-height: 1.3;
}
.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);
}
.vinyl-side-pane.is-unverified-side {
  border-style: dashed;
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.04);
}

/* 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 & Single Crate Action Buttons */
.discog-album-xray-btn,
.discog-single-crate-btn {
  min-height: 44px;
  min-width: 44px;
  touch-action: manipulation;
  white-space: nowrap;
}

/* Min Skivback (Record Crate) Cover Thumbnails */
.crate-entry-main {
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
}
.crate-entry-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.cover-thumb.crate-entry-cover {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  flex-shrink: 0;
  touch-action: manipulation;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.cover-thumb.crate-entry-cover .cover-placeholder {
  font-size: 1.35rem;
}
.cover-thumb.crate-entry-cover[data-cover-lightbox]:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
@media (hover: hover) and (pointer: fine) {
  .cover-thumb.crate-entry-cover[data-cover-lightbox]:hover {
    transform: scale(1.04);
    border-color: var(--border-strong);
  }
}
.cover-thumb.crate-entry-cover.cover-thumb-dual {
  width: 116px;
  height: 56px;
  gap: 4px;
}
.cover-thumb.crate-entry-cover.cover-thumb-dual .cover-kind-tag {
  font-size: 0.48rem;
  left: 2px;
  right: 2px;
  bottom: 2px;
  padding: 1px 2px;
}
@media (max-width: 639px) {
  .crate-entry-main {
    align-items: flex-start;
    gap: 10px;
  }
  .crate-entry-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .crate-entry-meta .album-entry-date {
    min-width: 0;
    padding-top: 0;
  }
  .cover-thumb.crate-entry-cover {
    width: 52px;
    height: 52px;
  }
  .cover-thumb.crate-entry-cover.cover-thumb-dual {
    width: 108px;
    height: 52px;
    gap: 4px;
  }
}
@media (max-width: 349px) {
  .cover-thumb.crate-entry-cover {
    width: 46px;
    height: 46px;
  }
  .cover-thumb.crate-entry-cover.cover-thumb-dual {
    width: 96px;
    height: 46px;
    gap: 4px;
  }
}

@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-grid.is-single-card {
  grid-template-columns: minmax(0, 1fr);
}

#artist-person-facts-slot:empty,
#artist-intl-enrichment-slot:empty,
#artist-stories-primary-slot:empty,
#artist-stories-podcasts-slot:empty,
#artist-stories-videos-slot:empty,
#artist-venues-slot:empty,
#artist-rabbit-holes-slot:empty,
#dossier-intl-enrichment-slot:empty,
#dossier-stories-primary-slot:empty,
#dossier-stories-podcasts-slot:empty,
#dossier-stories-videos-slot:empty,
#dossier-rabbit-holes-slot:empty,
#dossier-hero-nerd-placeholder:empty,
#album-dossier-embed-slot:empty,
#album-dossier-secondary-tags:empty,
#album-stories-primary-slot:empty,
#album-stories-podcasts-slot:empty,
#album-stories-videos-slot:empty,
#album-rabbit-holes-slot:empty {
  display: none;
}

.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"] .brand-ear-logo {
    filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.52)) drop-shadow(0 0 1px rgba(15, 23, 42, 0.4));
  }
  html[data-theme="light"] .nav-tabs {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(241, 245, 255, 0.92) 100%) padding-box,
      linear-gradient(
        115deg,
        rgba(14, 165, 233, 0.68) 0%,
        rgba(99, 102, 241, 0.64) 50%,
        rgba(168, 85, 247, 0.68) 80%,
        rgba(217, 70, 239, 0.62) 100%
      ) border-box;
    border-color: transparent;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.92),
      0 6px 18px -8px rgba(79, 70, 229, 0.26);
  }
  html[data-theme="light"] .nav-tab {
    background: rgba(255, 255, 255, 0.84);
    border-color: rgba(99, 102, 241, 0.18);
    color: #334155;
  }
  html[data-theme="light"] .nav-tab.active {
    color: #1e1b4b;
    background:
      linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(99, 102, 241, 0.18), rgba(168, 85, 247, 0.15), rgba(217, 70, 239, 0.12)) padding-box,
      linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 247, 255, 0.94)) padding-box,
      linear-gradient(115deg, rgba(14, 165, 233, 0.88), rgba(79, 70, 229, 0.86), rgba(147, 51, 234, 0.88)) border-box;
    border-color: transparent;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.92),
      0 3px 12px -3px rgba(79, 70, 229, 0.28);
  }
}

@media (min-width: 640px) and (hover: hover) and (pointer: fine) {
  html[data-theme="light"] .nav-tab:not(.active):hover {
    color: #1e1b4b;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(99, 102, 241, 0.16), rgba(168, 85, 247, 0.14));
    border-color: rgba(99, 102, 241, 0.48);
    box-shadow: 0 4px 12px -4px rgba(79, 70, 229, 0.22);
  }
}

html[data-theme="light"] .nav-tabs::before {
  background: radial-gradient(
    ellipse closest-side at center,
    rgba(14, 165, 233, 0.18) 0%,
    rgba(99, 102, 241, 0.16) 45%,
    rgba(168, 85, 247, 0.12) 74%,
    transparent 100%
  );
}

html[data-theme="light"] .nav-tabs::after {
  background: linear-gradient(
    90deg,
    transparent 0%,
    #0284c7 24%,
    #4f46e5 52%,
    #9333ea 76%,
    #c026d3 88%,
    transparent 100%
  );
}

html[data-theme="light"] .nav-tab::before {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(14, 165, 233, 0.15) 26%,
    rgba(99, 102, 241, 0.22) 50%,
    rgba(168, 85, 247, 0.17) 74%,
    rgba(217, 70, 239, 0.11) 88%,
    transparent 100%
  );
}

html[data-theme="light"] .nav-tab::after {
  background: linear-gradient(
    90deg,
    rgba(14, 165, 233, 0.85),
    rgba(79, 70, 229, 0.90),
    rgba(147, 51, 234, 0.85),
    rgba(192, 38, 211, 0.82)
  );
}

html[data-theme="light"] .nav-tab:focus-visible {
  outline-color: #4f46e5;
}

html[data-theme="light"] .nav-tab.active::before {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.50) 28%,
    rgba(56, 189, 248, 0.22) 50%,
    rgba(168, 85, 247, 0.17) 74%,
    transparent 100%
  );
}

html[data-theme="light"] .nav-tab.active::after {
  background: linear-gradient(90deg, #0284c7 0%, #4f46e5 50%, #9333ea 80%, #c026d3 100%);
}

html[data-theme="light"] .nav-tab.active .nav-tab-icon {
  filter: drop-shadow(0 0 5px rgba(79, 70, 229, 0.28));
}

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;
}

html[data-theme="light"] .header-motto,
html[data-theme="light"] .mobile-header-motto {
  color: #1e293b;
  background: linear-gradient(90deg, #1e293b 0%, #92400e 50%, #0f172a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: 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: rgba(99, 102, 241, 0.34);
    box-shadow:
      0 -4px 20px rgba(15, 23, 42, 0.08),
      0 -1px 14px -4px rgba(99, 102, 241, 0.20);
  }
  html[data-theme="light"] .nav-tab {
    background: transparent;
    border-color: transparent;
    color: #475569;
  }
  html[data-theme="light"] .nav-tab:not(.active)::before {
    background: radial-gradient(
      ellipse closest-side at center,
      rgba(14, 165, 233, 0.18) 0%,
      rgba(99, 102, 241, 0.22) 45%,
      rgba(168, 85, 247, 0.15) 74%,
      transparent 100%
    );
  }
  html[data-theme="light"] .nav-tab.active {
    color: #1e1b4b;
    background:
      linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(99, 102, 241, 0.18), rgba(168, 85, 247, 0.15)) padding-box,
      linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 247, 255, 0.94)) padding-box,
      linear-gradient(115deg, rgba(14, 165, 233, 0.85), rgba(79, 70, 229, 0.85), rgba(147, 51, 234, 0.85)) border-box;
    border-color: transparent;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.92),
      0 2px 10px -3px rgba(99, 102, 241, 0.28);
  }
}

/* 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-info-btn {
  color: #0e7490;
  border-color: rgba(14, 116, 144, 0.4);
  background: rgba(6, 182, 212, 0.12);
}

html[data-theme="light"] .discog-agent-info-btn:hover,
html[data-theme="light"] .discog-agent-info-btn:focus-visible,
html[data-theme="light"] .discog-agent-info-wrap.is-open .discog-agent-info-btn {
  color: #155e75;
  background: rgba(6, 182, 212, 0.24);
  border-color: rgba(14, 116, 144, 0.72);
}

html[data-theme="light"] .discog-agent-info-popover {
  background: #ffffff;
  border-color: rgba(14, 116, 144, 0.45);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

html[data-theme="light"] .discog-agent-info-popover::after {
  background: #ffffff;
  border-top-color: rgba(14, 116, 144, 0.45);
  border-left-color: rgba(14, 116, 144, 0.45);
}

html[data-theme="light"] .discog-agent-info-head {
  color: #0e7490;
}

html[data-theme="light"] .discog-agent-info-steps li {
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.28);
}

html[data-theme="light"] .discog-agent-info-steps li strong {
  color: #92400e;
}

html[data-theme="light"] .discog-agent-input {
  border-color: var(--border-strong);
}

html[data-theme="light"] .discog-agent-input::placeholder {
  color: #dc2626;
  opacity: 1;
}

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,
html[data-theme="light"] .discog-agent-candidates-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"] .discog-cand-head-title {
  color: #0f172a;
}

html[data-theme="light"] .discog-agent-candidates-panel.is-prompt-mode .discog-cand-head-title {
  color: #92400e;
}

html[data-theme="light"] .discog-cand-item {
  background: rgba(241, 245, 249, 0.92);
  border-color: rgba(15, 23, 42, 0.14);
}

html[data-theme="light"] .discog-cand-item:hover,
html[data-theme="light"] .discog-cand-item:focus-visible,
html[data-theme="light"] .discog-cand-item.is-active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.14), rgba(245, 158, 11, 0.12));
  border-color: rgba(14, 116, 144, 0.55);
}

html[data-theme="light"] .discog-cand-flag-pill {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.18);
  color: #0f172a;
}

html[data-theme="light"] .discog-cand-cta {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(180, 83, 9, 0.42);
  color: #92400e;
}

html[data-theme="light"] .discog-cand-meta-chip.is-in-archive {
  color: #065f46;
}

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);
}

html[data-theme="light"] .discog-queue-pill-clear {
  color: #047857;
  border-color: rgba(4, 120, 87, 0.4);
  background: rgba(16, 185, 129, 0.08);
}

html[data-theme="light"] .discog-queue-pill-clear:hover,
html[data-theme="light"] .discog-queue-dismiss-btn:hover,
html[data-theme="light"] .discog-queue-clear-btn:hover {
  background: rgba(225, 29, 72, 0.12);
  border-color: rgba(225, 29, 72, 0.45);
  color: #be123c;
}

html[data-theme="light"] .discog-queue-dismiss-btn,
html[data-theme="light"] .discog-queue-clear-btn {
  background: #ffffff;
  border-color: var(--border-strong);
  color: var(--text-muted);
}

/* 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"] .quick-chips.charts-quick-jumps {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14) 0%, #ffffff 50%, rgba(6, 182, 212, 0.12) 100%);
  border-color: rgba(217, 119, 6, 0.45);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .charts-quick-jumps .chip-label {
  color: #92400e;
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(217, 119, 6, 0.42);
}

html[data-theme="light"] .quick-chip.charts-quick-chip {
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.07);
}

html[data-theme="light"] .quick-chip.charts-quick-chip.tone-national {
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  border-color: rgba(217, 119, 6, 0.58);
  color: #78350f;
}

html[data-theme="light"] .quick-chip.charts-quick-chip.tone-billboard {
  background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
  border-color: rgba(2, 132, 199, 0.52);
  color: #0c4a6e;
}

html[data-theme="light"] .quick-chip.charts-quick-chip.tone-eurovision {
  background: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 100%);
  border-color: rgba(124, 58, 237, 0.52);
  color: #4c1d95;
}

@media (hover: hover) and (pointer: fine) {
  html[data-theme="light"] .quick-chip.charts-quick-chip.tone-national:hover {
    background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
    border-color: #d97706;
    color: #78350f;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
  }
  html[data-theme="light"] .quick-chip.charts-quick-chip.tone-billboard:hover {
    background: linear-gradient(180deg, #e0f2fe 0%, #bae6fd 100%);
    border-color: #0284c7;
    color: #0c4a6e;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.18);
  }
  html[data-theme="light"] .quick-chip.charts-quick-chip.tone-eurovision:hover {
    background: linear-gradient(180deg, #ede9fe 0%, #ddd6fe 100%);
    border-color: #7c3aed;
    color: #4c1d95;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.18);
  }
}

html[data-theme="light"] .quick-chip.charts-quick-chip.is-active,
html[data-theme="light"] .quick-chip.charts-quick-chip.is-active:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  border-color: #92400e;
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.28), 0 4px 14px rgba(180, 83, 9, 0.3);
}

html[data-theme="light"] .charts-quick-flag {
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.2);
}

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"] .btn-soundiiz {
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(22, 163, 74, 0.45);
  color: #15803d;
}
html[data-theme="light"] .btn-soundiiz:hover {
  background: rgba(22, 163, 74, 0.22);
  border-color: rgba(22, 163, 74, 0.72);
}
html[data-theme="light"] .soundiiz-status-banner {
  border-color: rgba(22, 163, 74, 0.42);
  background: rgba(22, 163, 74, 0.08);
}
html[data-theme="light"] .soundiiz-status-banner.is-error {
  border-color: rgba(225, 29, 72, 0.45);
  background: rgba(225, 29, 72, 0.08);
}
html[data-theme="light"] [data-soundiiz-tip]::after {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(22, 163, 74, 0.55);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
}

html[data-theme="light"] .badge-tracks-up,
html[data-theme="light"] .track-weekly-rank-pill.is-up {
  color: #15803d;
}

html[data-theme="light"] .track-weekly-rank-pill.is-new {
  color: #047857;
}

html[data-theme="light"] .track-weekly-rank-pill.is-same {
  color: #0e7490;
}

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,
html[data-theme="light"] .track-weekly-rank-pill.is-no1 {
  color: #854d0e;
  background: rgba(234, 179, 8, 0.16);
  border-color: rgba(202, 138, 4, 0.4);
}

html[data-theme="light"] .track-weekly-rank-pill.is-no2 {
  color: #334155;
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(100, 116, 139, 0.4);
}

html[data-theme="light"] .track-weekly-rank-pill.is-no3 {
  color: #9a3412;
  background: rgba(234, 88, 12, 0.14);
  border-color: rgba(194, 65, 12, 0.38);
}

html[data-theme="light"] .track-weekly-rank-pill.is-muted {
  color: #475569;
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.35);
}

html[data-theme="light"] .badge-mello,
html[data-theme="light"] .badge-alb-live,
html[data-theme="light"] .badge-tracks-down,
html[data-theme="light"] .track-weekly-rank-pill.is-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"] .legal-sources-list li {
  background: rgba(15, 23, 42, 0.025);
  border-color: rgba(15, 23, 42, 0.12);
  color: #334155;
}

html[data-theme="light"] .legal-sources-list li strong,
html[data-theme="light"] .legal-sources-cat {
  color: #0f172a;
}

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"] [data-embed-tip]::after {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(2, 132, 199, 0.5);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}
html[data-theme="light"] [data-embed-tip]::before {
  background: #ffffff;
  border-right-color: rgba(2, 132, 199, 0.5);
  border-bottom-color: rgba(2, 132, 199, 0.5);
}
html[data-theme="light"] [data-embed-tip].is-embed-tip-below::before {
  border-top-color: rgba(2, 132, 199, 0.5);
  border-left-color: rgba(2, 132, 199, 0.5);
}
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-flip-card.is-unverified {
  background: linear-gradient(135deg, rgba(148, 163, 184, 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"] .vinyl-side-pane.is-unverified-side {
  background: rgba(245, 158, 11, 0.06);
}

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 16% -25%, rgba(14, 165, 233, 0.08), transparent 60%),
    radial-gradient(ellipse 68% 105% at 86% -20%, rgba(139, 92, 246, 0.08), transparent 58%),
    var(--bg-elevated);
  border-color: rgba(99, 102, 241, 0.28);
  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: linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(99, 102, 241, 0.14), rgba(168, 85, 247, 0.13));
  border-color: rgba(99, 102, 241, 0.36);
  color: #3730a3;
  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);
}

@keyframes earshotSearchGlowLightA {
  0%, 100% {
    opacity: 0.16;
    transform: scale(0.996);
  }
  50% {
    opacity: 0.38;
    transform: scale(1.004);
  }
}

@keyframes earshotSearchGlowLightB {
  0%, 100% {
    opacity: 0.12;
    transform: scale(0.997);
  }
  50% {
    opacity: 0.32;
    transform: scale(1.003);
  }
}

html[data-theme="light"] .search-input-wrap::before {
  background: linear-gradient(
    110deg,
    rgba(14, 165, 233, 0.48) 0%,
    rgba(56, 189, 248, 0.44) 28%,
    rgba(99, 102, 241, 0.46) 60%,
    rgba(168, 85, 247, 0.48) 100%
  );
  filter: blur(12px);
  opacity: 0.24;
  animation: earshotSearchGlowLightA 8.5s ease-in-out infinite;
}

html[data-theme="light"] .search-input-wrap::after {
  background: linear-gradient(
    110deg,
    rgba(168, 85, 247, 0.44) 0%,
    rgba(129, 140, 248, 0.42) 45%,
    rgba(56, 189, 248, 0.44) 78%,
    rgba(14, 165, 233, 0.46) 100%
  );
  filter: blur(11px);
  opacity: 0.18;
  animation: earshotSearchGlowLightB 8.5s ease-in-out -4.25s infinite;
}

html[data-theme="light"] .search-icon {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(99, 102, 241, 0.14));
  border-color: rgba(14, 165, 233, 0.38);
  color: #0369a1;
  box-shadow: none;
}

html[data-theme="light"] .search-input-wrap:focus-within .search-icon {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(124, 58, 237, 0.18));
  border-color: rgba(2, 132, 199, 0.62);
  color: #0284c7;
  box-shadow: 0 0 10px -2px rgba(14, 165, 233, 0.28);
}

html[data-theme="light"] .search-input {
  border: 1.5px solid transparent;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8faff 100%) padding-box,
    linear-gradient(
      110deg,
      rgba(14, 165, 233, 0.62) 0%,
      rgba(99, 102, 241, 0.58) 50%,
      rgba(168, 85, 247, 0.62) 100%
    ) border-box;
  color: #0f172a;
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 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 {
  background:
    linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%) padding-box,
    linear-gradient(
      110deg,
      rgba(14, 165, 233, 0.85) 0%,
      rgba(99, 102, 241, 0.82) 50%,
      rgba(168, 85, 247, 0.85) 100%
    ) border-box;
  box-shadow:
    0 0 0 2px rgba(99, 102, 241, 0.16),
    0 6px 18px -4px rgba(79, 70, 229, 0.16);
}

html[data-theme="light"] .search-input:focus {
  background:
    linear-gradient(180deg, #ffffff 0%, #f8faff 100%) padding-box,
    linear-gradient(110deg, #0ea5e9 0%, #6366f1 50%, #9333ea 100%) border-box;
  box-shadow:
    0 0 0 3px rgba(99, 102, 241, 0.22),
    0 8px 22px -4px rgba(124, 58, 237, 0.20);
}

html[data-theme="light"] input.search-input:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(79, 70, 229, 0.28),
    0 8px 22px -4px rgba(14, 165, 233, 0.22);
}

html[data-theme="light"] .search-cta-btn {
  border-color: rgba(99, 102, 241, 0.44);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16) 0%, rgba(99, 102, 241, 0.18) 50%, rgba(168, 85, 247, 0.18) 100%);
  color: #312e81;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .search-cta-btn:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.24) 0%, rgba(99, 102, 241, 0.28) 50%, rgba(168, 85, 247, 0.28) 100%);
  border-color: rgba(79, 70, 229, 0.72);
  color: #1e1b4b;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.18);
}

html[data-theme="light"] button.search-cta-btn:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .nav-tabs::before,
  .nav-tabs::after,
  .nav-tab::before,
  .nav-tab::after,
  .nav-tab.active .nav-tab-icon,
  html[data-theme="light"] .nav-tabs::before,
  html[data-theme="light"] .nav-tabs::after,
  html[data-theme="light"] .nav-tab::before,
  html[data-theme="light"] .nav-tab::after {
    animation: none !important;
  }
  .nav-tabs::before {
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.55;
  }
  .nav-tabs::after {
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.78;
  }
  .nav-tab::before,
  .nav-tab.active::before {
    opacity: 0;
    transform: none;
  }
  .nav-tab::after {
    opacity: 0.42;
    transform: scaleX(0.76);
  }
  .nav-tab.active::after {
    opacity: 0.95;
    transform: scaleX(1);
  }
  .nav-tab.active .nav-tab-icon {
    transform: none;
  }
  .search-input-wrap::before {
    animation: none !important;
    opacity: 0.32;
    transform: none;
  }
  .search-input-wrap::after {
    animation: none !important;
    opacity: 0.18;
    transform: none;
  }
  html[data-theme="light"] .search-input-wrap::before {
    animation: none !important;
    opacity: 0.22;
    transform: none;
  }
  html[data-theme="light"] .search-input-wrap::after {
    animation: none !important;
    opacity: 0.14;
    transform: none;
  }
}

/* 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)
   ============================================================================ */

.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-btn-group .btn[data-admin-metric="returningVisitors"].is-active {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.65);
  color: #fbbf24;
}

.nerd-admin-chart-wrap {
  width: 100%;
  overflow: hidden;
}
.nerd-admin-chart-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}
.nerd-chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nerd-chart-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.45);
}
.nerd-chart-swatch.is-cyan {
  background: #06b6d4;
}
.nerd-chart-swatch.is-amber {
  background: #f59e0b;
}
.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-chart-dot.is-returning {
  fill: #fbbf24;
}

.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-bar-fill.is-rose { background: linear-gradient(90deg, #f43f5e, #fb7185); }

.nerd-admin-kpi-card.is-rose { border-color: rgba(244, 63, 94, 0.35); }
.nerd-admin-contrast-divider {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(244, 63, 94, 0.34);
}
.nerd-admin-spotify-kpis {
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
}
.badge.is-spotify-err {
  background: rgba(244, 63, 94, 0.16);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.42);
}
.badge.is-spotify-warn {
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.42);
}

.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;
  }
}

/* Admin Panel: Traffic Sources & Referrers */
.nerd-admin-traffic-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.nerd-admin-traffic-toggle {
  min-height: 44px;
  min-width: 44px;
  white-space: nowrap;
}
.nerd-admin-traffic-toggle.is-active {
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(244, 63, 94, 0.52);
  color: #fda4af;
}
.nerd-admin-src-cell-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.nerd-admin-src-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: var(--text);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nerd-admin-src-pill.is-compact {
  padding: 2px 8px;
  font-size: 0.72rem;
}
.nerd-admin-src-pill.is-social {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(139, 92, 246, 0.42);
  color: #ddd6fe;
}
.nerd-admin-src-pill.is-search {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.42);
  color: #6ee7b7;
}
.nerd-admin-src-pill.is-ai {
  background: rgba(6, 182, 212, 0.18);
  border-color: rgba(6, 182, 212, 0.44);
  color: #67e8f9;
}
.nerd-admin-src-pill.is-earshot {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.44);
  color: #fcd34d;
}
.nerd-admin-src-pill.is-referral {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.38);
  color: #bae6fd;
}
.nerd-admin-src-pill.is-direct {
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.32);
  color: var(--text-muted);
}
.nerd-admin-src-pill.is-internal {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(244, 63, 94, 0.38);
  color: #fda4af;
}
.nerd-admin-host-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}
.nerd-admin-host-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--text-muted);
}
.nerd-admin-traffic-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 10px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text);
}
.nerd-admin-traffic-swatch {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}
.nerd-admin-traffic-swatch.is-social,
.nerd-admin-traffic-seg.is-social {
  background: linear-gradient(180deg, #a78bfa, #7c3aed);
}
.nerd-admin-traffic-swatch.is-search-ai,
.nerd-admin-traffic-seg.is-search-ai {
  background: linear-gradient(180deg, #34d399, #059669);
}
.nerd-admin-traffic-swatch.is-earshot,
.nerd-admin-traffic-seg.is-earshot {
  background: linear-gradient(180deg, #fbbf24, #d97706);
}
.nerd-admin-traffic-swatch.is-direct,
.nerd-admin-traffic-seg.is-direct {
  background: linear-gradient(180deg, #38bdf8, #0284c7);
}
.nerd-admin-traffic-swatch.is-internal,
.nerd-admin-traffic-seg.is-internal {
  background: linear-gradient(180deg, #fb7185, #e11d48);
}
.nerd-admin-traffic-swatch.is-unattributed,
.nerd-admin-traffic-seg.is-unattributed {
  background: rgba(148, 163, 184, 0.45);
}
.nerd-admin-traffic-daily-grid {
  display: grid;
  gap: 6px;
  height: 176px;
  align-items: end;
  padding-top: 8px;
  overflow-x: auto;
}
.nerd-admin-traffic-stack-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  gap: 4px;
  min-width: 24px;
}
.nerd-admin-traffic-stack-bar {
  width: 100%;
  flex: 1;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 6px;
  display: flex;
  flex-direction: column-reverse;
  overflow: hidden;
}
.nerd-admin-traffic-seg {
  width: 100%;
  min-height: 2px;
}
@media (max-width: 639px) {
  .nerd-admin-traffic-filters {
    flex-direction: column;
    align-items: stretch;
  }
  .nerd-admin-traffic-toggle {
    width: 100%;
  }
}
html[data-theme="light"] .nerd-admin-traffic-toggle.is-active {
  background: rgba(225, 29, 72, 0.12);
  border-color: rgba(225, 29, 72, 0.45);
  color: #be123c;
}
html[data-theme="light"] .nerd-admin-src-pill.is-social {
  background: rgba(124, 58, 237, 0.12);
  color: #5b21b6;
}
html[data-theme="light"] .nerd-admin-src-pill.is-search {
  background: rgba(5, 150, 105, 0.12);
  color: #065f46;
}
html[data-theme="light"] .nerd-admin-src-pill.is-ai {
  background: rgba(8, 145, 178, 0.12);
  color: #0e7490;
}
html[data-theme="light"] .nerd-admin-src-pill.is-earshot {
  background: rgba(217, 119, 6, 0.14);
  color: #92400e;
}
html[data-theme="light"] .nerd-admin-src-pill.is-referral {
  background: rgba(2, 132, 199, 0.12);
  color: #0369a1;
}
html[data-theme="light"] .nerd-admin-src-pill.is-direct {
  background: rgba(15, 23, 42, 0.07);
  color: #334155;
}
html[data-theme="light"] .nerd-admin-src-pill.is-internal {
  background: rgba(225, 29, 72, 0.12);
  color: #be123c;
}
html[data-theme="light"] .nerd-admin-host-chip {
  background: #f1f5f9;
  color: #334155;
}
html[data-theme="light"] .nerd-admin-traffic-stack-bar {
  background: rgba(15, 23, 42, 0.08);
}


/* Admin Version History / Changelog Panel */
.nerd-changelog-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.nerd-changelog-search-input {
  flex: 1 1 240px;
  min-width: 0;
  min-height: 44px;
  font-size: 16px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft, rgba(15, 23, 42, 0.55));
  color: var(--text);
}
.nerd-changelog-search-input:focus {
  outline: none;
  border-color: rgba(6, 182, 212, 0.6);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.16);
}
.nerd-changelog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nerd-changelog-filters .btn,
#admin-changelog-clear-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 14px;
}
.nerd-changelog-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.nerd-changelog-card {
  position: relative;
  min-width: 0;
  overflow-wrap: anywhere;
  border-left: 3px solid rgba(99, 102, 241, 0.45);
}
.nerd-changelog-card.is-major {
  border-left-color: rgba(16, 185, 129, 0.75);
}
.nerd-changelog-card.is-latest {
  border-color: rgba(16, 185, 129, 0.45);
  border-left-width: 4px;
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.08);
}
.nerd-changelog-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.nerd-changelog-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.nerd-changelog-ver-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  font-family: var(--font-mono, monospace);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.nerd-changelog-ver-pill.is-emerald { background: rgba(16, 185, 129, 0.18); color: #34d399; border-color: rgba(16, 185, 129, 0.4); }
.nerd-changelog-ver-pill.is-indigo  { background: rgba(99, 102, 241, 0.18); color: #a5b4fc; border-color: rgba(99, 102, 241, 0.4); }
.nerd-changelog-ver-pill.is-cyan    { background: rgba(6, 182, 212, 0.18);  color: #67e8f9; border-color: rgba(6, 182, 212, 0.4); }
.nerd-changelog-ver-pill.is-violet  { background: rgba(139, 92, 246, 0.18); color: #c4b5fd; border-color: rgba(139, 92, 246, 0.4); }
.nerd-changelog-ver-pill.is-amber   { background: rgba(245, 158, 11, 0.18); color: #fcd34d; border-color: rgba(245, 158, 11, 0.4); }
.nerd-changelog-ver-pill.is-rose    { background: rgba(244, 63, 94, 0.18);  color: #fda4af; border-color: rgba(244, 63, 94, 0.4); }
.nerd-changelog-kind-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nerd-changelog-kind-pill.is-major {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.nerd-changelog-kind-pill.is-minor {
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.nerd-changelog-latest-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
}
.nerd-changelog-date {
  font-size: 0.76rem;
  color: var(--text-muted);
}
.nerd-changelog-title {
  margin: 0 0 6px;
  font-size: clamp(0.98rem, 1.6vw, 1.12rem);
  line-height: 1.35;
  color: var(--text);
}
.nerd-changelog-summary {
  margin: 0 0 12px;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-muted);
}
.nerd-changelog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.nerd-changelog-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid var(--border);
  color: var(--text);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.nerd-changelog-changes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nerd-changelog-change-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid var(--border);
  min-width: 0;
}
.nerd-changelog-change-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.nerd-changelog-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.nerd-changelog-type-badge.is-emerald { background: rgba(16, 185, 129, 0.18); color: #34d399; }
.nerd-changelog-type-badge.is-amber   { background: rgba(245, 158, 11, 0.18); color: #fbbf24; }
.nerd-changelog-type-badge.is-cyan    { background: rgba(6, 182, 212, 0.18);  color: #22d3ee; }
.nerd-changelog-type-badge.is-violet  { background: rgba(139, 92, 246, 0.18); color: #c4b5fd; }
.nerd-changelog-type-badge.is-indigo  { background: rgba(99, 102, 241, 0.18); color: #a5b4fc; }
.nerd-changelog-type-badge.is-rose    { background: rgba(244, 63, 94, 0.18);  color: #fb7185; }
.nerd-changelog-change-title {
  font-size: 0.84rem;
  color: var(--text);
  line-height: 1.35;
}
.nerd-changelog-change-desc {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.nerd-changelog-empty {
  text-align: center;
  padding: 28px 16px;
}
html[data-theme="light"] .nerd-changelog-search-input {
  background: #f8fafc;
  color: #0f172a;
}
html[data-theme="light"] .nerd-changelog-change-item {
  background: rgba(241, 245, 249, 0.85);
}
html[data-theme="light"] .nerd-changelog-ver-pill.is-emerald,
html[data-theme="light"] .nerd-changelog-kind-pill.is-major,
html[data-theme="light"] .nerd-changelog-type-badge.is-emerald { color: #047857; }
html[data-theme="light"] .nerd-changelog-ver-pill.is-indigo,
html[data-theme="light"] .nerd-changelog-type-badge.is-indigo  { color: #4338ca; }
html[data-theme="light"] .nerd-changelog-ver-pill.is-cyan,
html[data-theme="light"] .nerd-changelog-type-badge.is-cyan    { color: #0e7490; }
html[data-theme="light"] .nerd-changelog-ver-pill.is-violet,
html[data-theme="light"] .nerd-changelog-type-badge.is-violet  { color: #6d28d9; }
html[data-theme="light"] .nerd-changelog-ver-pill.is-amber,
html[data-theme="light"] .nerd-changelog-latest-pill,
html[data-theme="light"] .nerd-changelog-type-badge.is-amber   { color: #b45309; }
html[data-theme="light"] .nerd-changelog-ver-pill.is-rose,
html[data-theme="light"] .nerd-changelog-type-badge.is-rose    { color: #be123c; }

/* Admin Panel: Development Backlog (Utveckling) */
.nerd-admin-dev-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  background: #f59e0b;
  color: #080c14;
  margin-left: 4px;
}
.nerd-admin-dev-badge.hidden {
  display: none;
}

.nerd-dev-toast {
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid rgba(6, 182, 212, 0.45);
  background: rgba(6, 182, 212, 0.14);
  color: #cffafe;
}
.nerd-dev-toast.is-success {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.16);
  color: #d1fae5;
}
.nerd-dev-toast.is-warning {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.16);
  color: #fef3c7;
}
.nerd-dev-toast.is-error {
  border-color: rgba(244, 63, 94, 0.5);
  background: rgba(244, 63, 94, 0.16);
  color: #ffe4e6;
}

.nerd-dev-card-divider {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.nerd-dev-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.nerd-dev-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--border);
}
.nerd-dev-tag-pill.is-indigo {
  background: rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
  border-color: rgba(99, 102, 241, 0.4);
}
.nerd-dev-tag-pill.is-amber {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.4);
}
.nerd-dev-tag-pill.is-emerald {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.4);
}

.nerd-dev-author-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--bg-input);
  border: 1px solid rgba(245, 158, 11, 0.35);
  max-width: 100%;
  min-width: 0;
}
.nerd-dev-author-img,
.nerd-dev-author-initials {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.65);
  flex-shrink: 0;
}
.nerd-dev-author-img {
  object-fit: cover;
}
.nerd-dev-author-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
  font-size: 0.78rem;
  font-weight: 800;
}
.nerd-dev-author-meta {
  min-width: 0;
  line-height: 1.25;
}
.nerd-dev-author-role {
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fbbf24;
}
.nerd-dev-author-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
}
.nerd-dev-author-email {
  font-size: 0.68rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.nerd-dev-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.nerd-dev-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
.nerd-dev-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.nerd-dev-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.nerd-dev-req {
  color: #fb7185;
}

.nerd-dev-input,
.nerd-dev-select,
.nerd-dev-textarea,
#admin-panel-dev input,
#admin-panel-dev select,
#admin-panel-dev textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  font-size: 16px;
  font-family: inherit;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text);
  box-sizing: border-box;
}
.nerd-dev-textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.45;
}
#admin-panel-dev input[type="file"].nerd-dev-file-input-hidden,
.nerd-dev-file-input-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.nerd-dev-images-field {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.nerd-dev-images-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.nerd-dev-images-count {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
}
.nerd-dev-images-count.has-files {
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.16);
}
.nerd-dev-dropzone {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1.5px dashed rgba(129, 140, 248, 0.45);
  background: rgba(15, 23, 42, 0.42);
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.nerd-dev-dropzone:hover,
.nerd-dev-dropzone:focus-visible {
  outline: none;
  border-color: rgba(129, 140, 248, 0.85);
  background: rgba(49, 46, 129, 0.24);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}
.nerd-dev-dropzone.is-dragover {
  border-color: #34d399;
  background: rgba(6, 78, 59, 0.32);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25);
}
.nerd-dev-upload-btn {
  min-height: 44px;
  min-width: 44px;
  touch-action: manipulation;
  flex-shrink: 0;
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(129, 140, 248, 0.5);
  color: #e0e7ff;
  font-weight: 700;
}
.nerd-dev-dropzone-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
  min-width: 0;
  flex: 1 1 180px;
}

.nerd-dev-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 8px;
}
.nerd-dev-images-grid.hidden {
  display: none;
}
.nerd-dev-thumb-item {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  overflow: hidden;
  min-width: 0;
}
.nerd-dev-thumb-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: rgba(8, 12, 20, 0.7);
  cursor: zoom-in;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  touch-action: manipulation;
}
.nerd-dev-thumb-open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.18s ease;
}
.nerd-dev-thumb-open:hover img {
  transform: scale(1.03);
}
.nerd-dev-thumb-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  min-width: 0;
}
.nerd-dev-thumb-name {
  font-size: 0.71rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nerd-dev-thumb-dims {
  font-size: 0.66rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nerd-dev-thumb-remove {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 4px;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-end;
  cursor: pointer;
  touch-action: manipulation;
}
.nerd-dev-thumb-remove-pill {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(15, 23, 42, 0.86);
  color: #fecaca;
  font-size: 0.78rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.nerd-dev-thumb-remove:hover .nerd-dev-thumb-remove-pill {
  background: #e11d48;
  color: #ffffff;
  border-color: #fb7185;
}
.nerd-dev-input:focus,
.nerd-dev-select:focus,
.nerd-dev-textarea:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.75);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.nerd-dev-prio-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.nerd-dev-prio-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  min-width: 44px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  min-width: 0;
}
.nerd-dev-prio-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}
.nerd-dev-prio-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.nerd-dev-prio-title {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
}
.nerd-dev-prio-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nerd-dev-prio-btn.is-critical .nerd-dev-prio-title { color: #fda4af; }
.nerd-dev-prio-btn.is-high .nerd-dev-prio-title     { color: #fca5a5; }
.nerd-dev-prio-btn.is-medium .nerd-dev-prio-title   { color: #a5b4fc; }
.nerd-dev-prio-btn.is-low .nerd-dev-prio-title      { color: #6ee7b7; }

.nerd-dev-prio-btn.is-critical.is-active {
  border-color: rgba(244, 63, 94, 0.85);
  background: rgba(136, 19, 55, 0.45);
  box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.28);
}
.nerd-dev-prio-btn.is-high.is-active {
  border-color: rgba(239, 68, 68, 0.85);
  background: rgba(127, 29, 29, 0.48);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.28);
}
.nerd-dev-prio-btn.is-medium.is-active {
  border-color: rgba(99, 102, 241, 0.85);
  background: rgba(49, 46, 129, 0.45);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.28);
}
.nerd-dev-prio-btn.is-low.is-active {
  border-color: rgba(16, 185, 129, 0.85);
  background: rgba(6, 78, 59, 0.45);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.28);
}

.nerd-dev-form-bottom {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1.25fr);
  gap: 12px;
  align-items: stretch;
}
.nerd-dev-form-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.nerd-dev-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.nerd-dev-submit-btn {
  flex: 1 1 160px;
  min-height: 46px;
  min-width: 44px;
  justify-content: center;
  background: linear-gradient(135deg, #4f46e5, #9333ea) !important;
  border-color: rgba(129, 140, 248, 0.65) !important;
  color: #ffffff !important;
  font-weight: 800;
}
.nerd-dev-cancel-btn {
  min-height: 46px;
  min-width: 44px;
}

.nerd-dev-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.nerd-dev-ai-btn {
  min-height: 44px;
  min-width: 44px;
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
  font-weight: 700;
}
.nerd-dev-refresh-btn {
  min-height: 44px;
  min-width: 44px;
}

.nerd-dev-filters-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.nerd-dev-status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nerd-dev-status-pill {
  min-height: 44px;
  min-width: 44px;
  padding: 6px 12px;
  font-weight: 700;
}
.nerd-dev-status-pill.is-active {
  background: #d97706 !important;
  border-color: #f59e0b !important;
  color: #ffffff !important;
}
.nerd-dev-controls-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.nerd-dev-empty {
  text-align: center;
  padding: 28px 14px;
  border-radius: 14px;
  background: rgba(8, 12, 20, 0.45);
  border: 1px dashed var(--border-strong);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.nerd-dev-empty.hidden {
  display: none;
}
.nerd-dev-empty-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.nerd-dev-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nerd-dev-list.hidden {
  display: none;
}

.nerd-dev-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  padding: 14px 16px 14px 18px;
  min-width: 0;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.nerd-dev-card.is-critical { border-color: rgba(244, 63, 94, 0.48); }
.nerd-dev-card.is-high     { border-color: rgba(239, 68, 68, 0.44); }
.nerd-dev-card.is-completed { border-color: rgba(16, 185, 129, 0.38); }
.nerd-dev-card.is-deferred  { border-color: rgba(249, 115, 22, 0.4); }
.nerd-dev-card.is-selected {
  border-color: rgba(52, 211, 153, 0.85) !important;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.32), 0 10px 26px rgba(6, 78, 59, 0.25);
}

.nerd-dev-stripe {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: #6366f1;
}
.nerd-dev-stripe.is-critical  { background: #e11d48; }
.nerd-dev-stripe.is-high      { background: #ef4444; }
.nerd-dev-stripe.is-medium    { background: #6366f1; }
.nerd-dev-stripe.is-low       { background: #10b981; }
.nerd-dev-stripe.is-completed { background: #10b981; }
.nerd-dev-stripe.is-deferred  { background: #f97316; }

.nerd-dev-card-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.nerd-dev-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.nerd-dev-card-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.dev-card-select-indicator {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 9px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.dev-card-select-indicator.is-selected {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(52, 211, 153, 0.75);
  color: #a7f3d0;
  font-weight: 800;
}
.nerd-dev-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 9px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.12);
  color: var(--text);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.nerd-dev-badge.is-prio-critical { background: rgba(136, 19, 55, 0.75); color: #ffe4e6; border-color: rgba(244, 63, 94, 0.7); }
.nerd-dev-badge.is-prio-high     { background: rgba(127, 29, 29, 0.7);  color: #fecaca; border-color: rgba(239, 68, 68, 0.65); }
.nerd-dev-badge.is-prio-medium   { background: rgba(49, 46, 129, 0.7);  color: #e0e7ff; border-color: rgba(99, 102, 241, 0.55); }
.nerd-dev-badge.is-prio-low      { background: rgba(6, 78, 59, 0.65);   color: #d1fae5; border-color: rgba(16, 185, 129, 0.5); }
.nerd-dev-badge.is-status-planned     { background: rgba(8, 51, 68, 0.7);   color: #a5f3fc; border-color: rgba(6, 182, 212, 0.5); }
.nerd-dev-badge.is-status-in_progress { background: rgba(120, 53, 15, 0.7); color: #fde68a; border-color: rgba(245, 158, 11, 0.5); }
.nerd-dev-badge.is-status-completed   { background: rgba(6, 78, 59, 0.75); color: #a7f3d0; border-color: rgba(16, 185, 129, 0.55); }
.nerd-dev-badge.is-status-deferred    { background: rgba(124, 45, 18, 0.7); color: #fed7aa; border-color: rgba(249, 115, 22, 0.5); }
.nerd-dev-badge.is-target             { background: rgba(49, 46, 129, 0.65); color: #c7d2fe; border-color: rgba(99, 102, 241, 0.45); }
.nerd-dev-badge.is-released           { background: rgba(6, 78, 59, 0.65);   color: #6ee7b7; border-color: rgba(16, 185, 129, 0.45); }
.nerd-dev-badge.is-images             { background: rgba(30, 58, 138, 0.55); color: #bae6fd; border-color: rgba(56, 189, 248, 0.45); }

.nerd-dev-card-selects {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nerd-dev-card-selects .nerd-dev-select {
  width: auto;
  min-width: 145px;
  flex: 1 1 145px;
}

.nerd-dev-card-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.dev-card-check-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  border: 2px solid var(--border-strong);
  background: var(--bg-input);
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  touch-action: manipulation;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.dev-card-check-btn:hover {
  border-color: #34d399;
  color: rgba(52, 211, 153, 0.55);
}
.dev-card-check-btn.is-checked {
  background: #10b981;
  border-color: #34d399;
  color: #022c22;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.nerd-dev-card-body {
  flex: 1 1 auto;
  min-width: 0;
}
.nerd-dev-card-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.nerd-dev-card-title-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.dev-card-title {
  margin: 0;
  font-size: clamp(0.98rem, 1.7vw, 1.1rem);
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
  user-select: text;
  -webkit-user-select: text;
  overflow-wrap: anywhere;
}
.dev-card-title.is-completed {
  text-decoration: line-through;
  color: var(--text-muted);
}
.nerd-dev-done-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.nerd-dev-desc-box {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
}
.dev-card-description {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.52;
  color: var(--text);
  white-space: pre-line;
  overflow-wrap: anywhere;
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
}
.dev-card-description.is-completed {
  color: var(--text-muted);
}

.nerd-dev-completed-banner {
  margin-top: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(6, 78, 59, 0.35);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
  font-size: 0.78rem;
  user-select: text;
}
.nerd-dev-resolution-note {
  margin-top: 4px;
  font-size: 0.74rem;
  opacity: 0.92;
}

.nerd-dev-card-footer {
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.nerd-dev-card-author {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  min-width: 0;
  max-width: 100%;
  user-select: text;
}
.nerd-dev-card-avatar,
.nerd-dev-card-initials {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  flex-shrink: 0;
}
.nerd-dev-card-avatar { object-fit: cover; }
.nerd-dev-card-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
  font-size: 0.72rem;
  font-weight: 800;
}
.nerd-dev-card-initials.hidden,
.nerd-dev-card-avatar.hidden {
  display: none;
}
.nerd-dev-card-author-info {
  font-size: 0.75rem;
  line-height: 1.3;
  min-width: 0;
  overflow-wrap: anywhere;
}
.nerd-dev-author-highlight {
  color: #fcd34d;
}

.nerd-dev-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.nerd-dev-card-actions .btn,
.dev-card-copy-desc-btn {
  min-height: 44px;
  min-width: 44px;
  touch-action: manipulation;
}
.dev-card-complete-btn {
  background: rgba(6, 78, 59, 0.55);
  border-color: rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
  font-weight: 800;
}
.dev-card-complete-btn.is-completed {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(52, 211, 153, 0.7);
  color: #d1fae5;
}
.dev-card-vote-btn.is-voted {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.55);
  color: #fde68a;
}
.nerd-dev-vote-count {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(8, 12, 20, 0.7);
  color: #fcd34d;
  font-size: 0.68rem;
  font-weight: 800;
}
.dev-card-copy-ai-btn {
  background: rgba(49, 46, 129, 0.55);
  border-color: rgba(99, 102, 241, 0.45);
  color: #c7d2fe;
}
.dev-card-delete-btn:hover {
  border-color: rgba(244, 63, 94, 0.6);
  color: #fda4af;
}

.dev-card-comments-panel {
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dev-card-comments-panel.hidden {
  display: none;
}
.nerd-dev-comments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nerd-dev-comment-item {
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  user-select: text;
}
.nerd-dev-comment-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
.nerd-dev-comment-body {
  margin: 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
  color: var(--text);
}
.dev-card-comment-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nerd-dev-comment-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.dev-card-comment-input {
  flex: 1 1 200px;
}
.dev-card-comment-attach-btn {
  position: relative;
  min-height: 44px;
  min-width: 44px;
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
}
.nerd-dev-comment-attach-badge {
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.35);
  color: #e0e7ff;
  font-size: 0.68rem;
  font-weight: 800;
}
.nerd-dev-comment-attach-badge.hidden {
  display: none;
}
.nerd-dev-comment-staged {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.nerd-dev-comment-staged.hidden {
  display: none;
}
.nerd-dev-comment-staged-item {
  position: relative;
  width: 78px;
  height: 58px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
}
.nerd-dev-comment-staged-open {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  display: block;
}
.nerd-dev-comment-staged-open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nerd-dev-comment-submit {
  min-height: 44px;
  min-width: 44px;
  background: #d97706;
  border-color: #f59e0b;
  color: #ffffff;
  font-weight: 700;
  touch-action: manipulation;
}

.nerd-dev-card-gallery {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(144px, 1fr));
  gap: 10px;
}
.dev-card-image-btn {
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  overflow: hidden;
  cursor: zoom-in;
  text-align: left;
  min-width: 0;
  min-height: 44px;
  touch-action: manipulation;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.dev-card-image-btn:hover,
.dev-card-image-btn:focus-visible {
  outline: none;
  border-color: rgba(56, 189, 248, 0.78);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.4);
  transform: translateY(-1px);
}
.dev-card-image-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: rgba(8, 12, 20, 0.7);
  overflow: hidden;
  display: block;
}
.dev-card-image-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dev-card-image-zoom {
  position: absolute;
  right: 6px;
  bottom: 6px;
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 7px;
  background: rgba(8, 12, 20, 0.78);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.dev-card-image-cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  min-width: 0;
}
.dev-card-image-name {
  font-size: 0.71rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.dev-card-image-dims {
  font-size: 0.66rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.nerd-dev-comment-gallery {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.dev-comment-image-btn {
  width: 84px;
  height: 62px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: rgba(8, 12, 20, 0.7);
  overflow: hidden;
  cursor: zoom-in;
  touch-action: manipulation;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.dev-comment-image-btn:hover {
  border-color: rgba(56, 189, 248, 0.8);
  transform: scale(1.03);
}
.dev-comment-image-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Dev Image Lightbox Modal */
.nerd-dev-lightbox-backdrop {
  z-index: 80;
}
.nerd-dev-lightbox-backdrop[hidden] {
  display: none !important;
}
.nerd-dev-lightbox-panel {
  width: 100%;
  max-width: 1080px;
  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 72px rgba(0, 0, 0, 0.72);
}
.nerd-dev-lightbox-topbar {
  flex-wrap: wrap;
  gap: 10px;
}
.nerd-dev-lightbox-head-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 220px;
}
.nerd-dev-lightbox-title-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nerd-dev-lightbox-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nerd-dev-lightbox-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nerd-dev-lightbox-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.nerd-dev-lightbox-action-btn {
  min-height: 44px;
  min-width: 44px;
  touch-action: manipulation;
}
.nerd-dev-lightbox-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  min-height: 0;
  flex: 1 1 auto;
}
.nerd-dev-lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  max-height: calc(100dvh - 210px);
  background: rgba(8, 12, 20, 0.82);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  overflow: hidden;
}
.nerd-dev-lightbox-img {
  max-width: 100%;
  max-height: calc(100dvh - 235px);
  object-fit: contain;
  border-radius: 8px;
  display: block;
}
.nerd-dev-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  font-size: 1.5rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  z-index: 2;
}
.nerd-dev-lightbox-nav.is-prev { left: 10px; }
.nerd-dev-lightbox-nav.is-next { right: 10px; }
.nerd-dev-lightbox-nav.hidden { display: none; }
.nerd-dev-lightbox-nav:hover {
  background: rgba(99, 102, 241, 0.88);
  border-color: #a5b4fc;
}
.nerd-dev-lightbox-thumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px;
}
.nerd-dev-lightbox-thumbs.hidden {
  display: none;
}
.nerd-dev-lightbox-thumb {
  width: 66px;
  height: 48px;
  min-width: 66px;
  min-height: 44px;
  padding: 0;
  border-radius: 8px;
  border: 2px solid transparent;
  overflow: hidden;
  background: rgba(8, 12, 20, 0.7);
  cursor: pointer;
  opacity: 0.65;
  touch-action: manipulation;
}
.nerd-dev-lightbox-thumb.is-active,
.nerd-dev-lightbox-thumb:hover {
  opacity: 1;
  border-color: #38bdf8;
}
.nerd-dev-lightbox-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nerd-dev-completed-section {
  border-color: rgba(16, 185, 129, 0.38);
}
.nerd-dev-completed-heading {
  color: #6ee7b7;
}

@media (max-width: 1024px) {
  .nerd-dev-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nerd-dev-field-title {
    grid-column: 1 / -1;
  }
  .nerd-dev-prio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nerd-dev-form-bottom {
    grid-template-columns: 1fr;
  }
  .nerd-dev-controls-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .nerd-dev-form-grid,
  .nerd-dev-prio-grid,
  .nerd-dev-controls-grid {
    grid-template-columns: 1fr;
  }
  .nerd-dev-card {
    padding: 12px 12px 12px 15px;
  }
  .nerd-dev-card-selects {
    width: 100%;
  }
  .nerd-dev-images-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nerd-dev-card-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nerd-dev-comment-submit {
    flex: 1 1 100%;
  }
  .nerd-dev-lightbox-body {
    padding: 10px;
  }
  .nerd-dev-lightbox-stage {
    max-height: calc(100dvh - 240px);
  }
  .nerd-dev-lightbox-img {
    max-height: calc(100dvh - 260px);
  }
}

html[data-theme="light"] .nerd-dev-toast {
  background: #ecfeff;
  color: #155e75;
}
html[data-theme="light"] .nerd-dev-toast.is-success {
  background: #ecfdf5;
  color: #065f46;
}
html[data-theme="light"] .nerd-dev-toast.is-warning {
  background: #fffbeb;
  color: #92400e;
}
html[data-theme="light"] .nerd-dev-toast.is-error {
  background: #fff1f2;
  color: #9f1239;
}
html[data-theme="light"] .nerd-dev-tag-pill.is-indigo { color: #3730a3; background: rgba(99, 102, 241, 0.14); }
html[data-theme="light"] .nerd-dev-tag-pill.is-amber  { color: #92400e; background: rgba(245, 158, 11, 0.16); }
html[data-theme="light"] .nerd-dev-tag-pill.is-emerald,
html[data-theme="light"] .nerd-dev-completed-heading { color: #047857; }
html[data-theme="light"] .nerd-dev-author-role,
html[data-theme="light"] .nerd-dev-author-highlight { color: #b45309; }
html[data-theme="light"] .nerd-dev-author-initials,
html[data-theme="light"] .nerd-dev-card-initials { color: #92400e; background: rgba(245, 158, 11, 0.2); }
html[data-theme="light"] .nerd-dev-input,
html[data-theme="light"] .nerd-dev-select,
html[data-theme="light"] .nerd-dev-textarea,
html[data-theme="light"] #admin-panel-dev input,
html[data-theme="light"] #admin-panel-dev select,
html[data-theme="light"] #admin-panel-dev textarea {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.22);
}
html[data-theme="light"] .nerd-dev-prio-btn {
  background: #f8fafc;
}
html[data-theme="light"] .nerd-dev-prio-btn.is-critical .nerd-dev-prio-title { color: #be123c; }
html[data-theme="light"] .nerd-dev-prio-btn.is-high .nerd-dev-prio-title     { color: #b91c1c; }
html[data-theme="light"] .nerd-dev-prio-btn.is-medium .nerd-dev-prio-title   { color: #4338ca; }
html[data-theme="light"] .nerd-dev-prio-btn.is-low .nerd-dev-prio-title      { color: #047857; }
html[data-theme="light"] .nerd-dev-prio-btn.is-critical.is-active { background: rgba(254, 205, 211, 0.45); }
html[data-theme="light"] .nerd-dev-prio-btn.is-high.is-active     { background: rgba(254, 202, 202, 0.45); }
html[data-theme="light"] .nerd-dev-prio-btn.is-medium.is-active   { background: rgba(224, 231, 255, 0.55); }
html[data-theme="light"] .nerd-dev-prio-btn.is-low.is-active      { background: rgba(209, 250, 229, 0.55); }
html[data-theme="light"] .nerd-dev-ai-btn {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}
html[data-theme="light"] .nerd-dev-empty {
  background: #f8fafc;
}
html[data-theme="light"] .nerd-dev-card {
  background: #ffffff;
}
html[data-theme="light"] .nerd-dev-desc-box,
html[data-theme="light"] .nerd-dev-card-author,
html[data-theme="light"] .nerd-dev-comment-item,
html[data-theme="light"] .nerd-dev-author-badge,
html[data-theme="light"] .dev-card-select-indicator {
  background: #f8fafc;
  color: #334155;
}
html[data-theme="light"] .dev-card-select-indicator.is-selected {
  background: rgba(16, 185, 129, 0.18);
  color: #065f46;
}
html[data-theme="light"] .nerd-dev-badge.is-prio-critical { background: #ffe4e6; color: #9f1239; border-color: #fda4af; }
html[data-theme="light"] .nerd-dev-badge.is-prio-high     { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
html[data-theme="light"] .nerd-dev-badge.is-prio-medium   { background: #e0e7ff; color: #3730a3; border-color: #a5b4fc; }
html[data-theme="light"] .nerd-dev-badge.is-prio-low      { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
html[data-theme="light"] .nerd-dev-badge.is-status-planned     { background: #cffafe; color: #155e75; }
html[data-theme="light"] .nerd-dev-badge.is-status-in_progress { background: #fef3c7; color: #92400e; }
html[data-theme="light"] .nerd-dev-badge.is-status-completed   { background: #d1fae5; color: #065f46; }
html[data-theme="light"] .nerd-dev-badge.is-status-deferred    { background: #ffedd5; color: #9a3412; }
html[data-theme="light"] .nerd-dev-badge.is-target             { background: #e0e7ff; color: #3730a3; }
html[data-theme="light"] .nerd-dev-badge.is-released           { background: #d1fae5; color: #065f46; }
html[data-theme="light"] .nerd-dev-done-pill {
  background: #d1fae5;
  color: #065f46;
}
html[data-theme="light"] .nerd-dev-completed-banner {
  background: #ecfdf5;
  color: #065f46;
}
html[data-theme="light"] .dev-card-complete-btn {
  background: #ecfdf5;
  color: #047857;
}
html[data-theme="light"] .dev-card-complete-btn.is-completed {
  background: #d1fae5;
  color: #065f46;
}
html[data-theme="light"] .dev-card-vote-btn.is-voted {
  background: #fef3c7;
  color: #92400e;
}
html[data-theme="light"] .nerd-dev-vote-count {
  background: #0f172a;
  color: #fde68a;
}
html[data-theme="light"] .dev-card-copy-ai-btn {
  background: #e0e7ff;
  color: #3730a3;
}
html[data-theme="light"] .nerd-dev-images-count {
  background: #f1f5f9;
  color: #475569;
}
html[data-theme="light"] .nerd-dev-images-count.has-files {
  background: #e0e7ff;
  color: #3730a3;
  border-color: #a5b4fc;
}
html[data-theme="light"] .nerd-dev-dropzone {
  background: #f8fafc;
  border-color: rgba(79, 70, 229, 0.35);
}
html[data-theme="light"] .nerd-dev-dropzone:hover,
html[data-theme="light"] .nerd-dev-dropzone:focus-visible {
  background: #eef2ff;
  border-color: rgba(79, 70, 229, 0.72);
}
html[data-theme="light"] .nerd-dev-dropzone.is-dragover {
  background: #ecfdf5;
  border-color: #10b981;
}
html[data-theme="light"] .nerd-dev-upload-btn {
  background: #e0e7ff;
  border-color: #a5b4fc;
  color: #312e81;
}
html[data-theme="light"] .nerd-dev-thumb-item,
html[data-theme="light"] .dev-card-image-btn,
html[data-theme="light"] .nerd-dev-comment-staged-item,
html[data-theme="light"] .dev-comment-image-btn {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.16);
}
html[data-theme="light"] .nerd-dev-thumb-open,
html[data-theme="light"] .dev-card-image-frame {
  background: #f1f5f9;
}
html[data-theme="light"] .nerd-dev-badge.is-images {
  background: #e0f2fe;
  color: #075985;
  border-color: #7dd3fc;
}
html[data-theme="light"] .nerd-dev-comment-attach-badge {
  background: #4f46e5;
  color: #ffffff;
}
html[data-theme="light"] .nerd-dev-lightbox-backdrop {
  background: rgba(15, 23, 42, 0.56);
}
html[data-theme="light"] .nerd-dev-lightbox-panel {
  background: #ffffff;
}
html[data-theme="light"] .nerd-dev-lightbox-stage {
  background: #f1f5f9;
}

/* 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"] .nerd-admin-btn-group .btn[data-admin-metric="returningVisitors"].is-active {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(217, 119, 6, 0.55);
  color: #92400e;
}
html[data-theme="light"] .nerd-chart-swatch {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}
html[data-theme="light"] .nerd-chart-dot.is-returning {
  fill: #d97706;
}
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-tile {
  filter: brightness(0.68) invert(1) contrast(2.15) hue-rotate(200deg) saturate(0.32) brightness(0.84);
}
html[data-theme="light"] .nerd-geo-leaflet-host .leaflet-tile,
.nerd-geo-leaflet-host.is-light-tiles .leaflet-tile {
  filter: none;
}
.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: #f85149;
  font-size: 0.72rem;
}

.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-mock-info-dot {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(6, 182, 212, 0.48);
  background: rgba(6, 182, 212, 0.16);
  color: #67e8f9;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

html[data-theme="light"] .guide-mock-info-dot {
  color: #0e7490;
  border-color: rgba(14, 116, 144, 0.42);
}

.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: #dc2626;
}
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;
}

#artist-profile-view:focus,
#artist-profile-view:focus-visible {
  outline: none;
}

/* Keep topbar scanner pill visible in header across views */

/* Subtle scroll elevation on desktop/tablet — keep sticky header height invariant
   so Scroll Anchoring never oscillates or locks scrolling */
@media (min-width: 640px) {
  .site-header {
    overflow-anchor: none;
    transition: box-shadow 0.18s ease, border-bottom-color 0.18s ease;
  }
  .site-header.is-scrolled {
    border-bottom-color: rgba(148, 163, 184, 0.28);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.48);
  }
  html[data-theme="light"] .site-header.is-scrolled {
    border-bottom-color: rgba(15, 23, 42, 0.16);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  }
}

/* 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;
}

/* Spotify Public Web Contrast Cards (Non-Voting) */
.spotify-hero-pill {
  cursor: pointer;
  border: 1px solid rgba(30, 215, 96, 0.32);
  background: rgba(30, 215, 96, 0.12);
  color: #86efac;
  transition: transform 0.14s ease, border-color 0.14s ease;
  touch-action: manipulation;
  max-width: 100%;
  white-space: normal;
  text-align: left;
}
.spotify-hero-pill:hover {
  transform: translateY(-1px);
}
.spotify-hero-pill.is-error {
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(244, 63, 94, 0.45);
  color: #fda4af;
}
.spotify-hero-pill.is-warn {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fde68a;
}
.spotify-hero-pill.is-ok {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.42);
  color: #6ee7b7;
}

.spotify-contrast-box {
  border-color: rgba(30, 215, 96, 0.28);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(15, 23, 42, 0.48));
}
.spotify-contrast-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 10px;
}
.spotify-contrast-head h3 {
  margin: 0;
  font-size: 0.96rem;
}
.spotify-contrast-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.spotify-contrast-prov {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
}
.spotify-contrast-verdict {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.12);
  color: var(--text);
}
.spotify-contrast-verdict.is-error {
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(244, 63, 94, 0.45);
  color: #fda4af;
}
.spotify-contrast-verdict.is-warn {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fde68a;
}
.spotify-contrast-verdict.is-ok {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.42);
  color: #6ee7b7;
}
.spotify-contrast-verdict.is-no-match {
  background: rgba(255, 20, 20, 0.12);
  border-color: rgba(255, 38, 38, 0.72);
  color: #ff2626;
  text-shadow: 0 0 10px rgba(255, 24, 24, 0.35);
}
.spotify-contrast-sub {
  font-size: 0.81rem;
  color: var(--text-muted);
  margin: 0 0 8px;
  line-height: 1.48;
}
.spotify-contrast-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.spotify-contrast-col {
  min-width: 0;
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.55);
}
.spotify-contrast-col.is-earshot {
  border-color: rgba(16, 185, 129, 0.34);
  background: rgba(16, 185, 129, 0.08);
}
.spotify-contrast-col.is-spotify {
  border-color: rgba(244, 63, 94, 0.32);
  background: rgba(244, 63, 94, 0.06);
}
.spotify-contrast-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.spotify-contrast-val {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.42;
  word-break: break-word;
}
.spotify-contrast-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  font-size: 0.77rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.spotify-contrast-foot a {
  color: #4ade80;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(74, 222, 128, 0.32);
  background: rgba(34, 197, 94, 0.1);
}
.spotify-contrast-foot a:hover {
  background: rgba(34, 197, 94, 0.18);
}

html[data-theme="light"] .badge.is-spotify-err,
html[data-theme="light"] .spotify-hero-pill.is-error,
html[data-theme="light"] .spotify-contrast-verdict.is-error {
  background: rgba(225, 29, 72, 0.11);
  border-color: rgba(225, 29, 72, 0.38);
  color: #9f1239;
}
html[data-theme="light"] .badge.is-spotify-warn,
html[data-theme="light"] .spotify-hero-pill.is-warn,
html[data-theme="light"] .spotify-contrast-verdict.is-warn {
  background: rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.42);
  color: #92400e;
}
html[data-theme="light"] .spotify-hero-pill.is-ok,
html[data-theme="light"] .spotify-contrast-verdict.is-ok {
  background: rgba(5, 150, 105, 0.12);
  border-color: rgba(5, 150, 105, 0.4);
  color: #065f46;
}
html[data-theme="light"] .spotify-contrast-verdict.is-neutral {
  color: #334155;
  background: rgba(100, 116, 139, 0.12);
}
html[data-theme="light"] .spotify-contrast-verdict.is-no-match {
  background: rgba(220, 0, 0, 0.10);
  border-color: rgba(204, 0, 0, 0.55);
  color: #cc0000;
  text-shadow: none;
}
html[data-theme="light"] .spotify-contrast-box {
  border-color: rgba(5, 150, 105, 0.32);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(248, 250, 252, 0.92));
}
html[data-theme="light"] .spotify-contrast-col {
  background: #ffffff;
}
html[data-theme="light"] .spotify-contrast-col.is-earshot {
  border-color: rgba(5, 150, 105, 0.34);
  background: rgba(16, 185, 129, 0.08);
}
html[data-theme="light"] .spotify-contrast-col.is-spotify {
  border-color: rgba(225, 29, 72, 0.3);
  background: rgba(244, 63, 94, 0.05);
}
html[data-theme="light"] .spotify-contrast-sub,
html[data-theme="light"] .spotify-contrast-foot,
html[data-theme="light"] .spotify-contrast-lbl {
  color: #475569;
}
html[data-theme="light"] .spotify-contrast-foot a {
  color: #15803d;
  border-color: rgba(21, 128, 61, 0.35);
  background: rgba(34, 197, 94, 0.1);
}

html[data-theme="light"] .lang-picker-menu {
  background: rgba(255, 255, 255, 0.98);
  border-color: var(--border-strong);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}
html[data-theme="light"] .lang-picker-item {
  color: var(--text);
}
html[data-theme="light"] .lang-flag-svg {
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.24), 0 1px 2px rgba(15, 23, 42, 0.14);
}
html[data-theme="light"] .lang-picker-item:hover {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.12);
}
html[data-theme="light"] .lang-picker-item.active {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(217, 119, 6, 0.45);
  color: #92400e;
}
@media (max-width: 639px) {
  html[data-theme="light"] .header-secondary-items.is-mobile-open .lang-picker-menu {
    background: rgba(241, 245, 249, 0.96);
    border-color: var(--border);
  }
}

@media (max-width: 639px) {
  .spotify-contrast-grid {
    grid-template-columns: 1fr;
  }
  .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;
  }
}

/* =========================================================================
   Interactive Artist & Person Family Tree (.artist-tree-host)
   ========================================================================= */

.artist-tree-cta-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.artist-tree-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.45);
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.16), rgba(34, 211, 238, 0.12));
  color: var(--text, #f8fafc);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.artist-tree-cta-btn:hover {
  transform: translateY(-1px);
  border-color: var(--cyan, #22d3ee);
  box-shadow: 0 6px 20px rgba(34, 211, 238, 0.16);
}

.artist-tree-cta-btn.inline-compact {
  min-height: 44px;
  width: 100%;
  justify-content: center;
}

.tree-entity-hero {
  background: var(--bg-card, #111827);
  border: 1px solid var(--border, rgba(148, 163, 184, 0.18));
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tree-entity-hero-main h2 {
  margin: 4px 0 2px;
  font-size: 1.45rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tree-entity-hero-sub {
  font-size: 0.88rem;
  color: var(--muted, #94a3b8);
}

.artist-tree-host {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  padding: 14px;
  max-width: 100%;
  box-sizing: border-box;
}

.artist-tree-host.is-fullscreen {
  position: fixed;
  inset: 12px;
  z-index: 9500;
  background: var(--bg, #070b14);
  overflow: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.85);
}

.at-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.at-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.at-bc-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--violet, #a78bfa);
}

.at-bc-sep {
  color: var(--muted, #64748b);
  font-size: 0.9rem;
}

.at-bc-btn {
  min-height: 36px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.65);
  color: var(--text, #e2e8f0);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.at-bc-btn.is-current {
  border-color: var(--cyan, #22d3ee);
  background: rgba(34, 211, 238, 0.14);
  color: var(--cyan, #22d3ee);
}

.at-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.at-live-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.7);
  color: var(--muted, #94a3b8);
}

.at-live-pill.is-ready {
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--emerald, #10b981);
}

.at-live-pill.is-loading,
.at-live-pill.is-partial {
  border-color: rgba(34, 211, 238, 0.4);
  color: var(--cyan, #22d3ee);
}

.at-zoom-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  padding: 2px;
}

.at-zoom-btn {
  min-width: 36px;
  min-height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text, #f8fafc);
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.at-zoom-btn:hover {
  background: rgba(148, 163, 184, 0.16);
}

.at-zoom-val {
  font-size: 0.76rem;
  font-weight: 700;
  min-width: 40px;
  text-align: center;
  color: var(--muted, #94a3b8);
}

.at-controls-subrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.at-era-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.at-era-pill {
  min-height: 36px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(30, 41, 59, 0.5);
  color: var(--text, #e2e8f0);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.at-era-pill.active {
  border-color: var(--violet, #a78bfa);
  background: rgba(167, 139, 250, 0.2);
  color: #f5f3ff;
}

.at-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 0.76rem;
  color: var(--muted, #94a3b8);
}

.at-leg-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.at-leg-item i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.at-leg-item i.at-leg-line {
  width: 16px;
  height: 2px;
  border-radius: 2px;
}

.at-leg-item i.at-leg-line.is-dashed {
  height: 0;
  background: transparent;
  border-top: 2px dashed var(--amber, #f59e0b);
}

.at-leg-item i.at-leg-line.is-dotted {
  height: 0;
  background: transparent;
  border-top: 2px dotted var(--emerald, #10b981);
}

.at-mobile-switcher {
  display: none;
  gap: 6px;
  background: rgba(15, 23, 42, 0.85);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.at-mob-tab {
  flex: 1 1 50%;
  min-height: 44px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted, #94a3b8);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  touch-action: manipulation;
}

.at-mob-tab.active {
  background: rgba(34, 211, 238, 0.16);
  color: var(--cyan, #22d3ee);
  border: 1px solid rgba(34, 211, 238, 0.4);
}

.at-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.at-canvas-wrap {
  min-width: 0;
  background: rgba(8, 13, 25, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  overflow: hidden;
}

.at-canvas-scroll {
  overflow-x: auto;
  overflow-y: visible;
  padding: 20px 22px;
}

.artist-tree-host.is-fullscreen .at-canvas-scroll {
  max-height: calc(100vh - 220px);
  overflow: auto;
}

.at-stage {
  position: relative;
  min-width: 890px;
}

.at-svg-edges {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

.at-wire-path {
  stroke-width: 2;
  opacity: 0.72;
  transition: opacity 0.18s ease, stroke-width 0.18s ease;
}

.at-wire-path.is-dashed {
  stroke-dasharray: 6 3;
}

.at-wire-path.is-dotted {
  stroke-dasharray: 2 3;
}

.at-wire-path.is-precursor-wire {
  stroke-dasharray: 2 4;
  opacity: 0.82;
}

.at-wire-path.is-session {
  stroke-dasharray: 3 4;
  opacity: 0.78;
}

.at-wire-path.is-memorial {
  stroke-dasharray: 6 3;
  opacity: 0.86;
}

.at-wire-path.is-highlighted {
  stroke-width: 2.8;
  opacity: 0.98;
}

.at-wire-path.is-secondary {
  opacity: 0.16;
}

.at-wire-path.is-dimmed {
  opacity: 0.08;
}

.at-wire-label-group {
  transition: opacity 0.18s ease;
}

.at-wire-label-group rect {
  fill: rgba(11, 18, 34, 0.94);
  stroke-width: 1.1;
}

.at-wire-label-group text {
  fill: #f1f5f9;
  font-size: 9.8px;
  font-weight: 700;
  font-family: inherit;
}

.at-columns {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(220px, 255px) minmax(255px, 300px) minmax(265px, 315px);
  justify-content: space-between;
  column-gap: clamp(115px, 10vw, 170px);
  align-items: center;
}

.at-col {
  min-width: 0;
}

.at-col-heading {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  color: var(--muted, #94a3b8);
  margin: 0 0 10px;
}

.at-col-heading-root {
  width: fit-content;
  max-width: 66%;
  margin: 40px 0 8px;
}

.at-col-stack,
.at-col-precursors {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.at-node-card {
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 13px;
  border: 1.5px solid rgba(148, 163, 184, 0.22);
  background: rgba(17, 24, 39, 0.95);
  color: var(--text, #f8fafc);
  cursor: pointer;
  touch-action: manipulation;
  min-height: 44px;
  box-sizing: border-box;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.2s ease;
}

.at-node-card:hover {
  transform: translateY(-2px);
  border-color: var(--cyan, #22d3ee);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.55);
}

.at-node-card.is-band {
  border-left: 3.5px solid var(--cyan, #22d3ee);
}

.at-node-card.is-person {
  border-left: 3.5px solid var(--amber, #f59e0b);
}

.at-node-card.is-project {
  border-left: 3.5px solid var(--violet, #a78bfa);
}

.at-node-card.is-session-card {
  border-left: 3.5px solid var(--violet, #a78bfa);
  border-color: rgba(167, 139, 250, 0.36);
}

.at-node-card.is-solo {
  border-left: 3.5px solid #f472b6;
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.08), rgba(17, 24, 39, 0.96));
}

.at-node-card.is-precursor {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.85);
}

.at-node-card.is-deceased {
  border-left: 3.5px solid #e2e8f0;
  border-color: rgba(251, 191, 36, 0.45);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
}

.at-node-card.is-root {
  border-color: var(--cyan, #22d3ee);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.2), 0 10px 26px rgba(34, 211, 238, 0.12);
}

.at-node-card.is-selected {
  border-color: var(--gold-accent, #fbbf24);
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.28);
}

.at-node-card.is-dimmed {
  opacity: 0.24;
}

.at-partner-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 3px;
  padding-top: 6px;
  border-top: 1px dashed rgba(148, 163, 184, 0.18);
}

.at-partner-chip {
  font-size: 0.69rem;
  font-weight: 700;
  padding: 3px 8px;
  min-height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.36);
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  cursor: pointer;
  touch-action: manipulation;
}

.at-partner-chip:hover {
  background: rgba(16, 185, 129, 0.24);
  border-color: var(--emerald, #10b981);
}

.at-chip-solo {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(244, 114, 182, 0.16);
  border: 1px solid rgba(244, 114, 182, 0.42);
  color: #f9a8d4;
}

.at-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  padding-top: 7px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.at-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.71rem;
  font-weight: 700;
  line-height: 1.15;
  padding: 5px 9px;
  min-height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(30, 41, 59, 0.92);
  color: #e2e8f0;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.at-card-cta:hover {
  transform: translateY(-1px);
  border-color: var(--cyan, #22d3ee);
  color: #ffffff;
}

.at-card-cta.is-profile {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.42);
  color: #6ee7b7;
}

.at-card-cta.is-solo {
  background: rgba(244, 114, 182, 0.18);
  border-color: rgba(244, 114, 182, 0.48);
  color: #fbcfe8;
}

.at-card-cta.is-alias {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.42);
  color: #fde68a;
}

.at-card-cta.is-tree {
  background: rgba(34, 211, 238, 0.13);
  border-color: rgba(34, 211, 238, 0.36);
  color: #a5f3fc;
}

.at-card-cta.is-xray {
  background: rgba(167, 139, 250, 0.15);
  border-color: rgba(167, 139, 250, 0.4);
  color: #ddd6fe;
}

.at-detail-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.at-detail-avatar-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 11px;
  flex-shrink: 0;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(51, 65, 85, 0.75);
  border: 1.5px solid rgba(34, 211, 238, 0.4);
  color: #f8fafc;
  font-weight: 800;
  font-size: 0.86rem;
  cursor: pointer;
  touch-action: manipulation;
}

.at-detail-avatar-btn:hover {
  border-color: var(--gold-accent, #fbbf24);
  transform: scale(1.03);
}

.at-node-top {
  display: flex;
  align-items: center;
  gap: 9px;
}

.at-node-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex-shrink: 0;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(51, 65, 85, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-weight: 800;
  font-size: 0.78rem;
}

.at-node-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.at-node-title-wrap {
  min-width: 0;
  flex: 1;
}

.at-node-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.at-node-name {
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.2;
}

.at-node-alias {
  font-size: 0.7rem;
  color: var(--muted, #94a3b8);
  margin-top: 2px;
}

.at-root-star {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(34, 211, 238, 0.2);
  color: var(--cyan, #22d3ee);
}

.at-rip-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(203, 213, 225, 0.16);
  color: #f1f5f9;
  border: 1px solid rgba(203, 213, 225, 0.35);
}

.at-node-role {
  font-size: 0.76rem;
  color: var(--muted, #cbd5e1);
  line-height: 1.3;
}

.at-node-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.at-chip-kind,
.at-chip-years,
.at-chip-catalog,
.at-chip-person,
.at-chip-external,
.at-chip-session {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}

.at-chip-kind {
  background: rgba(148, 163, 184, 0.14);
  color: var(--muted, #cbd5e1);
}

.at-chip-years {
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan, #22d3ee);
}

.at-chip-catalog {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald, #10b981);
}

.at-chip-person {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber, #f59e0b);
}

.at-chip-external {
  background: rgba(167, 139, 250, 0.14);
  color: var(--violet, #a78bfa);
}

.at-chip-session {
  background: rgba(167, 139, 250, 0.22);
  color: #ddd6fe;
  border: 1px solid rgba(167, 139, 250, 0.45);
}

.at-detail-panel {
  position: static;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(300px, 1fr);
  gap: 20px;
  align-items: start;
}

.at-detail-primary,
.at-detail-secondary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.at-detail-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted, #94a3b8);
}

.at-detail-title {
  margin: 6px 0 2px;
  font-size: 1.22rem;
}

.at-detail-sub {
  font-size: 0.82rem;
  color: var(--cyan, #22d3ee);
  font-weight: 600;
}

.at-memorial-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(203, 213, 225, 0.35);
  background: rgba(30, 41, 59, 0.85);
  font-size: 0.82rem;
}

.at-memorial-cross {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(203, 213, 225, 0.18);
  font-weight: 800;
  font-size: 1rem;
}

.at-life-line {
  font-size: 0.82rem;
  color: var(--amber, #f59e0b);
  font-weight: 600;
}

.at-detail-bio {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.48;
  color: var(--text, #e2e8f0);
}

.at-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.at-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(30, 41, 59, 0.78);
  color: var(--text, #f8fafc);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  flex: 1 1 auto;
}

.at-action-btn.primary {
  border-color: var(--cyan, #22d3ee);
  background: rgba(34, 211, 238, 0.16);
}

.at-action-btn.emerald {
  border-color: var(--emerald, #10b981);
  background: rgba(16, 185, 129, 0.16);
}

.at-action-btn.amber {
  border-color: var(--amber, #f59e0b);
  background: rgba(245, 158, 11, 0.16);
}

.at-detail-section-title {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
  color: var(--muted, #94a3b8);
  margin-bottom: 8px;
}

.at-conn-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 7px;
}

.at-conn-chip {
  width: 100%;
  min-height: 44px;
  text-align: left;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(30, 41, 59, 0.55);
  color: var(--text, #f8fafc);
  font-size: 0.8rem;
  cursor: pointer;
  touch-action: manipulation;
}

.at-conn-chip:hover {
  border-color: var(--cyan, #22d3ee);
}

.at-conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.at-conn-name {
  font-weight: 700;
}

.at-conn-period {
  font-size: 0.72rem;
  color: var(--cyan, #22d3ee);
  font-weight: 700;
}

.at-conn-role {
  font-size: 0.72rem;
  color: var(--muted, #94a3b8);
  margin-left: auto;
}

.at-empty-notice {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  font-size: 0.84rem;
  color: var(--muted, #94a3b8);
}

.at-mobile-list-view {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.at-mobile-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.at-mob-subbranch {
  margin: -2px 0 8px 14px;
  padding-left: 12px;
  border-left: 2px solid rgba(34, 211, 238, 0.38);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.at-mob-subitem {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.at-mob-wire-tag {
  display: inline-block;
  width: fit-content;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--amber, #f59e0b);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  padding: 1px 8px;
}

.artist-tree-host :focus-visible {
  outline: 2px solid var(--cyan, #22d3ee);
  outline-offset: 2px;
}

@media (max-width: 1120px) {
  .at-stage {
    min-width: 820px;
  }
  .at-columns {
    grid-template-columns: 196px 226px 236px;
    column-gap: 80px;
  }
}

@media (max-width: 960px) {
  .at-stage {
    min-width: 726px;
  }
  .at-columns {
    grid-template-columns: 176px 206px 214px;
    column-gap: 64px;
  }
  .at-canvas-scroll {
    padding: 16px 14px;
  }
}

@media (max-width: 920px) {
  .at-detail-panel {
    grid-template-columns: 1fr;
  }
  .at-conn-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .artist-tree-host {
    padding: 10px;
  }
  .at-mobile-switcher {
    display: flex;
  }
  .at-stage {
    min-width: 760px;
  }
  .at-columns {
    grid-template-columns: 185px 212px 220px;
    column-gap: 70px;
    align-items: start;
  }
  .at-workspace-grid.mode-list .at-canvas-wrap {
    display: none;
  }
  .at-workspace-grid.mode-list .at-mobile-list-view {
    display: flex;
  }
  .at-workspace-grid.mode-map .at-mobile-list-view {
    display: none;
  }
  .at-workspace-grid.mode-map .at-canvas-wrap {
    display: block;
  }
  .at-canvas-scroll {
    max-height: 540px;
    padding: 14px;
  }
}

/* Light theme overrides for Artist Tree */
html[data-theme="light"] .artist-tree-host {
  background: rgba(248, 250, 252, 0.96);
  border-color: rgba(15, 23, 42, 0.14);
}
html[data-theme="light"] .at-canvas-wrap,
html[data-theme="light"] .at-detail-panel,
html[data-theme="light"] .at-mobile-switcher {
  background: rgba(241, 245, 249, 0.94);
  border-color: rgba(15, 23, 42, 0.14);
}
html[data-theme="light"] .at-node-card,
html[data-theme="light"] .at-conn-chip,
html[data-theme="light"] .at-action-btn,
html[data-theme="light"] .at-bc-btn,
html[data-theme="light"] .at-era-pill {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.16);
}
html[data-theme="light"] .at-node-card.is-deceased {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}
html[data-theme="light"] .at-partner-chip {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.35);
}
html[data-theme="light"] .at-node-card.is-solo {
  background: linear-gradient(135deg, #fdf2f8, #ffffff);
  border-left-color: #db2777;
}
html[data-theme="light"] .at-chip-solo {
  background: rgba(219, 39, 119, 0.12);
  color: #9d174d;
  border-color: rgba(219, 39, 119, 0.35);
}
html[data-theme="light"] .at-card-cta {
  background: #f1f5f9;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.2);
}
html[data-theme="light"] .at-card-cta.is-profile {
  background: rgba(16, 185, 129, 0.14);
  color: #065f46;
  border-color: rgba(16, 185, 129, 0.42);
}
html[data-theme="light"] .at-card-cta.is-solo {
  background: rgba(219, 39, 119, 0.12);
  color: #9d174d;
  border-color: rgba(219, 39, 119, 0.38);
}
html[data-theme="light"] .at-card-cta.is-alias {
  background: rgba(217, 119, 6, 0.12);
  color: #92400e;
  border-color: rgba(217, 119, 6, 0.38);
}
html[data-theme="light"] .at-card-cta.is-tree {
  background: rgba(8, 145, 178, 0.12);
  color: #155e75;
  border-color: rgba(8, 145, 178, 0.36);
}
html[data-theme="light"] .at-card-cta.is-xray {
  background: rgba(109, 40, 217, 0.12);
  color: #5b21b6;
  border-color: rgba(109, 40, 217, 0.35);
}
@media (max-width: 960px) {
  .at-card-cta {
    min-height: 36px;
    padding: 7px 11px;
    font-size: 0.76rem;
  }
}
html[data-theme="light"] .at-node-role,
html[data-theme="light"] .at-detail-bio,
html[data-theme="light"] .at-memorial-banner {
  color: #334155;
}
html[data-theme="light"] .at-memorial-banner {
  background: #e2e8f0;
}
html[data-theme="light"] .at-era-pill.active {
  color: #4c1d95;
  background: rgba(139, 92, 246, 0.16);
}
html[data-theme="light"] .at-wire-label-group rect {
  fill: #ffffff;
}
html[data-theme="light"] .at-wire-label-group text {
  fill: #0f172a;
}

@media (prefers-reduced-motion: reduce) {
  .at-node-card,
  .at-wire-path,
  .artist-tree-cta-btn,
  .bt-album-card,
  .bt-chip,
  .bt-member-bar,
  .bt-hiatus-col {
    transition: none;
  }
}

/* =========================================================
   Interactive Band Timeline (Desktop Swimlanes + Mobile)
   ========================================================= */
.band-timeline-cta-btn {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(59, 130, 246, 0.14));
  border-color: rgba(34, 211, 238, 0.5);
  color: #a5f3fc;
}
@media (hover: hover) and (pointer: fine) {
  .band-timeline-cta-btn:hover {
    border-color: rgba(34, 211, 238, 0.8);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.3), rgba(59, 130, 246, 0.22));
  }
}

.bt-shell {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 42px -18px rgba(0, 0, 0, 0.65);
  max-width: 100%;
}

.bt-head-bar {
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(19, 28, 46, 0.96), rgba(15, 22, 36, 0.96));
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.bt-main-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.bt-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 7px;
}

.bt-sum-chip {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.bt-sum-chip strong {
  color: var(--text);
  font-family: var(--font-mono);
}
.bt-sum-chip.is-rose {
  background: var(--rose-soft);
  border-color: rgba(244, 63, 94, 0.45);
  color: #fecdd3;
}
.bt-sum-chip.is-rose strong {
  color: #fda4af;
}

.bt-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.bt-live-syncing {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--cyan);
}

.bt-source-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #a7f3d0;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.bt-toolbar {
  padding: 10px 16px;
  background: rgba(19, 28, 46, 0.82);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.bt-layers {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.bt-layer-lbl {
  font-size: 0.69rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-right: 4px;
}

.bt-chip {
  min-height: 34px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.bt-chip.on-cyan { background: var(--cyan-soft); border-color: rgba(6, 182, 212, 0.55); color: #67e8f9; }
.bt-chip.on-amber { background: var(--amber-soft); border-color: rgba(245, 158, 11, 0.55); color: #fcd34d; }
.bt-chip.on-rose { background: var(--rose-soft); border-color: rgba(244, 63, 94, 0.55); color: #fda4af; }
.bt-chip.on-violet { background: var(--violet-soft); border-color: rgba(167, 139, 250, 0.55); color: #ddd6fe; }
.bt-chip.on-emerald { background: var(--emerald-soft); border-color: rgba(16, 185, 129, 0.55); color: #6ee7b7; }

.bt-zoom-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.bt-scale-switch,
.bt-zoom-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 3px;
  border-radius: 9px;
}

.bt-sc-btn,
.bt-zoom-pill {
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
}
.bt-sc-btn.active {
  background: var(--cyan-soft);
  border-color: rgba(6, 182, 212, 0.5);
  color: #67e8f9;
}
.bt-zoom-pill.active {
  background: var(--amber-soft);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

/* Horizontal Scroll Container + Sticky Left Rail */
.bt-canvas-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.bt-canvas-wrap {
  display: grid;
  grid-template-columns: 196px 1fr;
  position: relative;
}

.bt-rail {
  position: sticky;
  left: 0;
  z-index: 6;
  background: rgba(11, 17, 29, 0.96);
  backdrop-filter: blur(8px);
  border-right: 1px solid var(--border-strong);
}

.bt-rail-cell {
  padding: 0 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.11);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bt-rail-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text);
}

.bt-rail-sub {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.bt-rail-members-list {
  display: flex;
  flex-direction: column;
}

.bt-rail-member-btn {
  height: 26px;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: left;
}
.bt-rail-member-btn.is-selected {
  background: rgba(167, 139, 250, 0.16);
  border-color: rgba(167, 139, 250, 0.45);
}

.bt-rm-name {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
}

.bt-role-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 6px;
  flex-shrink: 0;
}

.bt-role-tag {
  font-family: var(--font-mono);
  font-size: 0.59rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

.bt-plot {
  position: relative;
  background: var(--bg-elevated);
  overflow: hidden;
  min-width: 720px;
}

.bt-grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.bt-grid-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(148, 163, 184, 0.08);
}
.bt-grid-line.is-major {
  background: rgba(148, 163, 184, 0.2);
}

/* Full-Height Hiatus / Gap Columns */
.bt-hiatus-col {
  position: absolute;
  top: 34px;
  bottom: 0;
  z-index: 2;
  padding: 0;
  background: repeating-linear-gradient(
    -45deg,
    rgba(244, 63, 94, 0.09),
    rgba(244, 63, 94, 0.09) 7px,
    rgba(15, 22, 36, 0.28) 7px,
    rgba(15, 22, 36, 0.28) 14px
  );
  border: none;
  border-left: 1.5px dashed rgba(244, 63, 94, 0.55);
  border-right: 1.5px dashed rgba(244, 63, 94, 0.55);
  transition: background 0.15s ease;
}
.bt-hiatus-col.is-gap {
  background: repeating-linear-gradient(
    -45deg,
    rgba(245, 158, 11, 0.07),
    rgba(245, 158, 11, 0.07) 7px,
    rgba(15, 22, 36, 0.22) 7px,
    rgba(15, 22, 36, 0.22) 14px
  );
  border-left-color: rgba(245, 158, 11, 0.45);
  border-right-color: rgba(245, 158, 11, 0.45);
}
.bt-hiatus-col.is-selected {
  background: repeating-linear-gradient(
    -45deg,
    rgba(244, 63, 94, 0.18),
    rgba(244, 63, 94, 0.18) 7px,
    rgba(245, 158, 11, 0.06) 7px,
    rgba(245, 158, 11, 0.06) 14px
  );
  border-left: 2px solid #fb7185;
  border-right: 2px solid #fb7185;
  box-shadow: inset 0 0 24px rgba(244, 63, 94, 0.18);
}

.bt-compressed-break {
  position: absolute;
  top: 34px;
  bottom: 0;
  z-index: 2;
  background: repeating-linear-gradient(
    -45deg,
    rgba(244, 63, 94, 0.11),
    rgba(244, 63, 94, 0.11) 8px,
    rgba(15, 22, 36, 0.34) 8px,
    rgba(15, 22, 36, 0.34) 16px
  );
  border-left: 2px dashed rgba(244, 63, 94, 0.62);
  border-right: 2px dashed rgba(244, 63, 94, 0.62);
}
.bt-compressed-break.is-gap {
  background: repeating-linear-gradient(
    -45deg,
    rgba(245, 158, 11, 0.09),
    rgba(245, 158, 11, 0.09) 8px,
    rgba(15, 22, 36, 0.28) 8px,
    rgba(15, 22, 36, 0.28) 16px
  );
  border-left-color: rgba(245, 158, 11, 0.52);
  border-right-color: rgba(245, 158, 11, 0.52);
}
.bt-compressed-break.is-selected {
  border-left-style: solid;
  border-right-style: solid;
  border-color: #fb7185;
}
.bt-compressed-break.is-gap.is-selected {
  border-color: #fbbf24;
}
.bt-compressed-hit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  z-index: 1;
  cursor: pointer;
}
.bt-compressed-break-overlay {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}
.bt-break-pill {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  cursor: pointer;
  background: rgba(15, 22, 36, 0.96);
  border: 1.5px solid #fb7185;
  border-radius: 12px;
  padding: 9px 12px;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.65);
  max-width: 100%;
}
.bt-break-pill.is-gap {
  border-color: rgba(245, 158, 11, 0.72);
}
.bt-break-pill.is-selected {
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.28), 0 10px 24px rgba(0, 0, 0, 0.68);
}
.bt-break-pill.is-gap.is-selected {
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.28), 0 10px 24px rgba(0, 0, 0, 0.68);
}
.bt-break-pill strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #fff;
}
.bt-break-pill small {
  display: block;
  font-size: 0.68rem;
  color: #fda4af;
  margin-top: 4px;
  line-height: 1.35;
}
.bt-break-pill.is-gap small {
  color: #fde68a;
}
.bt-break-expand-btn {
  margin-top: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 700;
  background: rgba(244, 63, 94, 0.22);
  border: 1px solid rgba(244, 63, 94, 0.5);
  color: #fecdd3;
}
.bt-break-pill.is-gap .bt-break-expand-btn {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fef3c7;
}

/* Lanes */
.bt-lane {
  position: relative;
  border-bottom: 1px solid rgba(148, 163, 184, 0.11);
  z-index: 3;
  pointer-events: none;
}
.bt-lane-axis {
  height: 34px;
  background: rgba(11, 17, 29, 0.92);
  pointer-events: auto;
}
.bt-axis-tick {
  position: absolute;
  top: 8px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}
.bt-axis-tick.is-decade { color: var(--text); }
.bt-axis-tick.is-break { color: #fb7185; }

.bt-lane-eras { height: 50px; }
.bt-era-bar {
  position: absolute;
  top: 9px;
  height: 32px;
  border-radius: 8px;
  display: block;
  text-align: center;
  line-height: 30px;
  padding: 0;
  font-size: 0.71rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 1;
  pointer-events: auto;
}
.bt-era-label {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bt-era-bar.tone-cyan { background-color: #0e1726; background-image: linear-gradient(90deg, rgba(6,182,212,0.22), rgba(59,130,246,0.2)); border: 1px solid rgba(6,182,212,0.5); color: #a5f3fc; }
.bt-era-bar.tone-amber { background-color: #0e1726; background-image: linear-gradient(90deg, rgba(245,158,11,0.25), rgba(6,182,212,0.18)); border: 1px solid rgba(251,191,36,0.55); color: #fde68a; }
.bt-era-bar.tone-emerald { background-color: #0e1726; background-image: linear-gradient(90deg, rgba(16,185,129,0.22), rgba(6,182,212,0.18)); border: 1px solid rgba(16,185,129,0.5); color: #a7f3d0; }
.bt-era-bar.tone-violet { background-color: #0e1726; background-image: linear-gradient(90deg, rgba(167,139,250,0.22), rgba(6,182,212,0.2)); border: 1px solid rgba(167,139,250,0.5); color: #ddd6fe; }
.bt-era-bar.tone-rose { background-color: #0e1726; background-image: linear-gradient(90deg, rgba(244,63,94,0.22), rgba(245,158,11,0.16)); border: 1px solid rgba(244,63,94,0.5); color: #fecdd3; }
.bt-era-bar.is-hiatus {
  z-index: 2;
  padding: 0 6px;
  background-color: #0e1726;
  background-image: linear-gradient(rgba(244, 63, 94, 0.24), rgba(244, 63, 94, 0.24));
  border: 1.5px dashed #fb7185;
  color: #fecdd3;
}
.bt-era-bar.is-gap {
  z-index: 2;
  padding: 0 6px;
  background-color: #0e1726;
  background-image: linear-gradient(rgba(245, 158, 11, 0.18), rgba(245, 158, 11, 0.18));
  border: 1px dashed rgba(245, 158, 11, 0.62);
  color: #fde68a;
}
.bt-era-bar.is-selected {
  border-style: solid;
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.25);
}

/* Studio Albums Lane */
.bt-album-baseline {
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: 10px;
  height: 2px;
  background: rgba(56, 189, 248, 0.24);
  pointer-events: none;
}
.bt-album-stem {
  position: absolute;
  bottom: 11px;
  width: 1.5px;
  background: rgba(56, 189, 248, 0.45);
  transform: translateX(-50%);
  pointer-events: none;
}
.bt-album-stem.is-selected {
  background: #22d3ee;
  width: 2px;
}
.bt-album-dot {
  position: absolute;
  bottom: 7px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22d3ee;
  border: 1.5px solid #080c14;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
}
.bt-album-dot.is-hit { background: #fbbf24; }
.bt-album-dot.is-selected {
  width: 10px;
  height: 10px;
  bottom: 6px;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.45);
}
.bt-album-card {
  position: absolute;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid rgba(56, 189, 248, 0.42);
  border-radius: 8px;
  padding: 3px 6px 3px 3px;
  width: 106px;
  height: 34px;
  text-align: left;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  z-index: 4;
  pointer-events: auto;
  transition: transform 0.14s ease, border-color 0.14s ease, opacity 0.14s ease;
}
.bt-album-card.is-hit {
  border-color: rgba(245, 158, 11, 0.72);
  background: linear-gradient(135deg, #1b2236, #241e18);
}
.bt-album-card.is-selected {
  border: 2px solid #22d3ee;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.28), 0 8px 20px rgba(6, 182, 212, 0.45);
  z-index: 6;
}
.bt-album-card.is-dimmed {
  opacity: 0.35;
}
@media (hover: hover) and (pointer: fine) {
  .bt-album-card:hover {
    transform: translateX(-50%) translateY(-2px);
    border-color: #38bdf8;
    z-index: 7;
  }
}
.bt-album-art {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 800;
  color: #fff;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.bt-album-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bt-album-txt {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.bt-album-name {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}
.bt-album-yr {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: #67e8f9;
  line-height: 1.15;
}
.bt-album-card.is-hit .bt-album-yr { color: #fbbf24; }

/* Milestones & Singles Lane */
.bt-ms-pill {
  position: absolute;
  transform: translateX(-50%);
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}
.bt-ms-pill.align-left { transform: translateX(-2%); }
.bt-ms-pill.align-right { transform: translateX(-98%); }
.bt-ms-pill.ms-single { background-color: #0e1726; background-image: linear-gradient(rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.2)); border: 1px solid rgba(245, 158, 11, 0.55); color: #fde68a; }
.bt-ms-pill.ms-event { background-color: #0e1726; background-image: linear-gradient(rgba(167, 139, 250, 0.2), rgba(167, 139, 250, 0.2)); border: 1px solid rgba(167, 139, 250, 0.55); color: #e9d5ff; }
.bt-ms-pill.ms-split { background-color: #0e1726; background-image: linear-gradient(rgba(244, 63, 94, 0.2), rgba(244, 63, 94, 0.2)); border: 1px solid rgba(244, 63, 94, 0.55); color: #fecdd3; }
.bt-ms-pill.is-selected {
  box-shadow: 0 0 0 2.5px #22d3ee;
}

/* Members Gantt Lane */
.bt-lane-members { padding: 7px 0; }
.bt-member-row {
  position: relative;
  height: 26px;
  display: flex;
  align-items: center;
  pointer-events: none;
}
.bt-member-bar {
  position: absolute;
  height: 18px;
  border-radius: 5px;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  padding: 0 7px;
  font-size: 0.64rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  transition: filter 0.12s ease, transform 0.12s ease;
}
.bt-member-bar.is-selected {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}
.bt-m-vox { background: linear-gradient(90deg, #38bdf8, #0284c7); color: #f8fafc; }
.bt-m-bass { background: linear-gradient(90deg, #fb7185, #e11d48); color: #ffffff; }
.bt-m-drum { background: linear-gradient(90deg, #34d399, #059669); color: #052e16; }
.bt-m-synth { background: linear-gradient(90deg, #c084fc, #7c3aed); color: #ffffff; }
.bt-m-gtr { background: linear-gradient(90deg, #fbbf24, #d97706); color: #1f1302; }
.bt-m-other { background: linear-gradient(90deg, #cbd5e1, #64748b); color: #0f172a; }
.bt-member-gap {
  position: absolute;
  height: 2px;
  top: 12px;
  border-top: 2px dotted rgba(192, 132, 252, 0.72);
}

/* Labels Lane */
.bt-lane-labels { height: 40px; }
.bt-label-seg {
  position: absolute;
  top: 8px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: auto;
}

/* Inspector Drawer */
.bt-inspector {
  background: linear-gradient(180deg, #121b2e 0%, #0d1423 100%);
  border-top: 1px solid rgba(56, 189, 248, 0.35);
  padding: 15px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}
.bt-inspector.is-pause { border-top-color: rgba(244, 63, 94, 0.42); }
.bt-insp-main { flex: 1.4 1 360px; min-width: 0; }
.bt-insp-album-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.bt-insp-cover {
  width: 74px;
  height: 74px;
  border-radius: 10px;
  flex-shrink: 0;
  border: 2px solid rgba(34, 211, 238, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 800;
  color: #f8fafc;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.3);
}
.bt-insp-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bt-insp-cover span { font-size: 0.9rem; }
.bt-insp-cover small { font-size: 0.68rem; color: #e2e8f0; }

.bt-insp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.bt-insp-badge.is-pause { background: var(--rose-soft); border: 1px solid rgba(244, 63, 94, 0.5); color: #fda4af; }
.bt-insp-badge.is-gap { background: var(--amber-soft); border: 1px solid rgba(245, 158, 11, 0.5); color: #fcd34d; }
.bt-insp-badge.is-album { background: var(--cyan-soft); border: 1px solid rgba(6, 182, 212, 0.5); color: #67e8f9; }
.bt-insp-badge.is-member { background: var(--violet-soft); border: 1px solid rgba(167, 139, 250, 0.5); color: #ddd6fe; }
.bt-insp-badge.is-milestone { background: var(--amber-soft); border: 1px solid rgba(245, 158, 11, 0.5); color: #fde68a; }

.bt-insp-title {
  margin: 0 0 5px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
}
.bt-insp-desc {
  margin: 0;
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.5;
  max-width: 740px;
}
.bt-insp-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 9px;
  font-size: 0.76rem;
  color: var(--text-muted);
}
.bt-meta-jump-btn {
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.74rem;
}
.bt-insp-sidebox {
  flex: 1 1 280px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 14px;
}
.bt-insp-side-title {
  font-size: 0.69rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--violet);
  margin-bottom: 8px;
}
.bt-insp-side-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.bt-sp-chip {
  min-height: 36px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  background: var(--bg-card);
  border: 1px solid rgba(167, 139, 250, 0.35);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.bt-insp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.bt-btn-play {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.55);
  color: #6ee7b7;
}

.bt-footer {
  padding: 10px 18px;
  background: rgba(8, 12, 20, 0.85);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.bt-legend-items { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.bt-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.bt-lg-swatch { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

/* Mobile Vertical Chronicle */
.bt-shell.is-mobile {
  padding: 12px;
}
.bt-m-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.bt-scrubber-card {
  padding: 10px 11px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
}
.bt-scrubber-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 6px;
}
.bt-scrubber-track {
  position: relative;
  height: 24px;
  border-radius: 7px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  overflow: hidden;
}
.bt-scr-seg {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-radius: 4px;
  padding: 0;
}
.bt-scr-seg.is-act { background: rgba(6, 182, 212, 0.35); border: 1px solid rgba(6, 182, 212, 0.55); }
.bt-scr-seg.is-pause {
  background: repeating-linear-gradient(-45deg, rgba(244,63,94,0.35), rgba(244,63,94,0.35) 3px, rgba(15,22,36,0.45) 3px, rgba(15,22,36,0.45) 6px);
  border: 1px dashed #fb7185;
}
.bt-scr-dot {
  position: absolute;
  top: 7px;
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 999px;
  background: #fbbf24;
  border: 1.5px solid #080c14;
  transform: translateX(-50%);
}
.bt-scrubber-years {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  margin-top: 4px;
}
.bt-m-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.bt-m-chip {
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.bt-m-chip.active {
  background: var(--cyan-soft);
  border-color: rgba(6, 182, 212, 0.55);
  color: #67e8f9;
}

.bt-chronicle {
  position: relative;
  padding: 4px 0 4px 32px;
}
.bt-spine-line {
  position: absolute;
  left: 12px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, #06b6d4 0%, #fb7185 40%, #10b981 60%, #a78bfa 100%);
  opacity: 0.55;
}
.bt-c-item {
  position: relative;
  margin-bottom: 10px;
}
.bt-c-dot {
  position: absolute;
  left: -26px;
  top: 14px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2.5px solid var(--bg);
  z-index: 2;
}
.bt-c-dot.dot-cyan { background: #22d3ee; }
.bt-c-dot.dot-amber { background: #fbbf24; }
.bt-c-dot.dot-rose { background: #fb7185; }
.bt-c-dot.dot-violet { background: #a78bfa; }
.bt-c-dot.dot-emerald { background: #34d399; }

.bt-c-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}
.bt-c-card.is-hiatus {
  background: repeating-linear-gradient(
    -45deg,
    rgba(244, 63, 94, 0.11),
    rgba(244, 63, 94, 0.11) 7px,
    rgba(19, 28, 46, 0.92) 7px,
    rgba(19, 28, 46, 0.92) 14px
  );
  border: 1.5px dashed rgba(251, 113, 133, 0.7);
}
.bt-c-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.bt-c-yr { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; color: #67e8f9; }
.bt-c-yr.is-rose { color: #fda4af; }
.bt-c-tag {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}
.bt-c-tag.tag-alb { background: var(--amber-soft); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.45); }
.bt-c-tag.tag-alb-cyan { background: var(--cyan-soft); color: #67e8f9; border: 1px solid rgba(6, 182, 212, 0.45); }
.bt-c-tag.tag-pause { background: var(--rose-soft); color: #fecdd3; border: 1px solid rgba(244, 63, 94, 0.5); }
.bt-c-tag.tag-ms { background: var(--violet-soft); color: #ddd6fe; border: 1px solid rgba(167, 139, 250, 0.45); }
.bt-c-tag.tag-mem { background: var(--emerald-soft); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.45); }

.bt-c-album-trigger {
  width: 100%;
  min-height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.bt-c-album-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}
.bt-c-cover {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.bt-c-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bt-c-title { font-size: 0.86rem; font-weight: 800; color: var(--text); }
.bt-c-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.bt-c-chev { color: var(--text-dim); font-size: 1.15rem; font-weight: 700; }

.bt-m-subpills,
.bt-m-album-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.bt-m-pill {
  min-height: 44px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
}
.bt-m-pill.add { border-color: rgba(16, 185, 129, 0.5); color: #6ee7b7; }
.bt-m-pill.rem { border-color: rgba(244, 63, 94, 0.5); color: #fda4af; }
.bt-m-pill.sp { border-color: rgba(167, 139, 250, 0.45); color: #ddd6fe; }

/* Light Theme Overrides for Band Timeline */
html[data-theme="light"] .bt-shell,
html[data-theme="light"] .bt-plot {
  background: #f8fafc;
}
html[data-theme="light"] .bt-head-bar,
html[data-theme="light"] .bt-toolbar,
html[data-theme="light"] .bt-rail,
html[data-theme="light"] .bt-lane-axis,
html[data-theme="light"] .bt-footer {
  background: #eef2f6;
  color: #0f172a;
}
html[data-theme="light"] .bt-inspector {
  background: #ffffff;
}
html[data-theme="light"] .bt-insp-title { color: #0f172a; }
html[data-theme="light"] .bt-insp-desc { color: #334155; }
html[data-theme="light"] .bt-insp-sidebox {
  background: #f1f5f9;
}
html[data-theme="light"] .bt-sp-chip,
html[data-theme="light"] .bt-album-card,
html[data-theme="light"] .bt-label-seg,
html[data-theme="light"] .bt-meta-jump-btn,
html[data-theme="light"] .bt-c-card {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.16);
}
html[data-theme="light"] .bt-album-card.is-hit {
  background: #fffbeb;
  border-color: #d97706;
}
html[data-theme="light"] .bt-album-yr { color: #0369a1; }
html[data-theme="light"] .bt-album-card.is-hit .bt-album-yr { color: #b45309; }
html[data-theme="light"] .bt-chip { background: #ffffff; color: #334155; }
html[data-theme="light"] .bt-chip.on-cyan { background: rgba(6, 182, 212, 0.14); color: #0e7490; }
html[data-theme="light"] .bt-chip.on-amber { background: rgba(245, 158, 11, 0.14); color: #b45309; }
html[data-theme="light"] .bt-chip.on-rose { background: rgba(244, 63, 94, 0.14); color: #be123c; }
html[data-theme="light"] .bt-chip.on-violet { background: rgba(139, 92, 246, 0.14); color: #6d28d9; }
html[data-theme="light"] .bt-chip.on-emerald { background: rgba(16, 185, 129, 0.14); color: #047857; }
html[data-theme="light"] .bt-era-bar.tone-cyan { background-color: #ffffff; background-image: linear-gradient(90deg, rgba(6,182,212,0.16), rgba(59,130,246,0.14)); color: #0e7490; }
html[data-theme="light"] .bt-era-bar.tone-amber { background-color: #ffffff; background-image: linear-gradient(90deg, rgba(245,158,11,0.18), rgba(6,182,212,0.12)); color: #92400e; }
html[data-theme="light"] .bt-era-bar.tone-emerald { background-color: #ffffff; background-image: linear-gradient(90deg, rgba(16,185,129,0.16), rgba(6,182,212,0.12)); color: #065f46; }
html[data-theme="light"] .bt-era-bar.tone-violet { background-color: #ffffff; background-image: linear-gradient(90deg, rgba(167,139,250,0.16), rgba(6,182,212,0.14)); color: #5b21b6; }
html[data-theme="light"] .bt-era-bar.tone-rose { background-color: #ffffff; background-image: linear-gradient(90deg, rgba(244,63,94,0.16), rgba(245,158,11,0.12)); color: #9f1239; }
html[data-theme="light"] .bt-era-bar.is-hiatus { background-color: #ffffff; background-image: linear-gradient(rgba(244, 63, 94, 0.16), rgba(244, 63, 94, 0.16)); color: #9f1239; }
html[data-theme="light"] .bt-era-bar.is-gap { background-color: #ffffff; background-image: linear-gradient(rgba(245, 158, 11, 0.16), rgba(245, 158, 11, 0.16)); color: #92400e; }
html[data-theme="light"] .bt-ms-pill.ms-single { background-color: #ffffff; background-image: linear-gradient(rgba(245, 158, 11, 0.18), rgba(245, 158, 11, 0.18)); color: #92400e; }
html[data-theme="light"] .bt-ms-pill.ms-event { background-color: #ffffff; background-image: linear-gradient(rgba(139, 92, 246, 0.16), rgba(139, 92, 246, 0.16)); color: #5b21b6; }
html[data-theme="light"] .bt-ms-pill.ms-split { background-color: #ffffff; background-image: linear-gradient(rgba(244, 63, 94, 0.16), rgba(244, 63, 94, 0.16)); color: #9f1239; }
html[data-theme="light"] .bt-hiatus-col {
  background: repeating-linear-gradient(
    -45deg,
    rgba(244, 63, 94, 0.09),
    rgba(244, 63, 94, 0.09) 7px,
    rgba(241, 245, 249, 0.55) 7px,
    rgba(241, 245, 249, 0.55) 14px
  );
}
html[data-theme="light"] .bt-hiatus-col.is-gap {
  background: repeating-linear-gradient(
    -45deg,
    rgba(245, 158, 11, 0.09),
    rgba(245, 158, 11, 0.09) 7px,
    rgba(241, 245, 249, 0.55) 7px,
    rgba(241, 245, 249, 0.55) 14px
  );
}
html[data-theme="light"] .bt-compressed-break {
  background: repeating-linear-gradient(
    -45deg,
    rgba(244, 63, 94, 0.11),
    rgba(244, 63, 94, 0.11) 8px,
    rgba(241, 245, 249, 0.55) 8px,
    rgba(241, 245, 249, 0.55) 16px
  );
}
html[data-theme="light"] .bt-compressed-break.is-gap {
  background: repeating-linear-gradient(
    -45deg,
    rgba(245, 158, 11, 0.11),
    rgba(245, 158, 11, 0.11) 8px,
    rgba(241, 245, 249, 0.55) 8px,
    rgba(241, 245, 249, 0.55) 16px
  );
  border-left-color: rgba(217, 119, 6, 0.55);
  border-right-color: rgba(217, 119, 6, 0.55);
}
html[data-theme="light"] .bt-break-pill {
  background: #ffffff;
  color: #0f172a;
}
html[data-theme="light"] .bt-break-pill strong { color: #be123c; }
html[data-theme="light"] .bt-break-pill small { color: #475569; }
html[data-theme="light"] .bt-break-pill.is-gap { border-color: #d97706; }
html[data-theme="light"] .bt-break-pill.is-gap strong { color: #b45309; }
html[data-theme="light"] .bt-break-pill.is-gap .bt-break-expand-btn {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(217, 119, 6, 0.5);
  color: #92400e;
}
html[data-theme="light"] .bt-c-card.is-hiatus {
  background: repeating-linear-gradient(
    -45deg,
    rgba(244, 63, 94, 0.08),
    rgba(244, 63, 94, 0.08) 7px,
    rgba(255, 255, 255, 0.95) 7px,
    rgba(255, 255, 255, 0.95) 14px
  );
}
html[data-theme="light"] .bt-source-badge { color: #047857; }
html[data-theme="light"] .band-timeline-cta-btn { color: #0e7490; }
html[data-theme="light"] .bt-insp-badge.is-pause { color: #be123c; }
html[data-theme="light"] .bt-insp-badge.is-album { color: #0e7490; }
html[data-theme="light"] .bt-insp-badge.is-member { color: #6d28d9; }
html[data-theme="light"] .bt-sum-chip.is-rose,
html[data-theme="light"] .bt-sum-chip.is-rose strong { color: #be123c; }

/* Crawlable SEO Footer Directory & Noscript Banner */
.noscript-seo-banner {
  margin: 0 0 18px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: var(--bg-card);
  color: var(--text);
  line-height: 1.55;
}
.noscript-seo-banner h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}
.noscript-seo-banner p {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.noscript-seo-banner a {
  color: var(--cyan);
  text-decoration: underline;
  margin-right: 6px;
}

.seo-footer-directory {
  flex: 1 0 100%;
  width: 100%;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.seo-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
}
.seo-footer-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
}
.seo-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  min-width: 0;
}
.seo-footer-links a {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 7px;
  border: 1px solid transparent;
  transition: color 0.14s ease, border-color 0.14s ease, background 0.14s ease;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.seo-footer-links a:hover,
.seo-footer-links a:focus-visible {
  color: var(--cyan);
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.08);
  outline: none;
}
html[data-theme="light"] .seo-footer-links a {
  color: #475569;
}
html[data-theme="light"] .seo-footer-links a:hover,
html[data-theme="light"] .seo-footer-links a:focus-visible {
  color: #0369a1;
  border-color: rgba(3, 105, 161, 0.28);
  background: rgba(3, 105, 161, 0.07);
}
@media (max-width: 1024px), (pointer: coarse) {
  .seo-footer-links a {
    min-height: 44px;
    min-width: 44px;
    padding: 8px 11px;
    font-size: 0.82rem;
    border-color: var(--border);
  }
}

/* =========================================================================
   Hall of Fame & All-Time Billboard Placements (1940–2026)
   ========================================================================= */

.hof-hero-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  max-width: 100%;
}

.hof-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fde68a;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.12));
  border: 1px solid rgba(245, 158, 11, 0.48);
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.hof-hero-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(251, 191, 36, 0.8);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(217, 119, 6, 0.18));
}

.hof-dossier-box {
  border-color: rgba(245, 158, 11, 0.44);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.06) 0%, rgba(15, 23, 42, 0.65) 100%);
}

.hof-header-row,
.bb-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.hof-multi-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  margin-bottom: 10px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #fef3c7;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(234, 179, 8, 0.1));
  border: 1px solid rgba(251, 191, 36, 0.48);
}

.hof-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hof-induction-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(245, 158, 11, 0.24);
  min-width: 0;
}

.hof-induction-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1 1 240px;
}

.hof-year-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 5px 8px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 800;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.44);
  flex-shrink: 0;
}

.hof-induction-info {
  min-width: 0;
  flex: 1 1 auto;
}

.hof-hall-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  overflow-wrap: anywhere;
}

.hof-induction-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.hof-members-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.billboard-dossier-box {
  border-color: rgba(56, 189, 248, 0.42);
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.06) 0%, rgba(15, 23, 42, 0.65) 100%);
}

.bb-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 135px), 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.bb-kpi-card {
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.22);
  min-width: 0;
}

.bb-kpi-card.is-gold {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.09);
}

.bb-kpi-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.bb-kpi-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  margin-top: 2px;
}

.bb-kpi-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.bb-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.bb-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.55);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.bb-filter-btn:hover {
  color: var(--text);
  border-color: rgba(56, 189, 248, 0.45);
}

.bb-filter-btn.is-active {
  color: #0f172a;
  background: #38bdf8;
  border-color: #38bdf8;
  font-weight: 700;
}

.bb-rows-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 4px;
}

.bb-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.18);
  min-width: 0;
}

.bb-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 220px;
}

.bb-peak-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 4px 7px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.86rem;
  line-height: 1.15;
  flex-shrink: 0;
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.12);
}

.bb-peak-badge.is-no1 {
  color: #451a03;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  border-color: rgba(251, 191, 36, 0.9);
  box-shadow: 0 2px 8px -2px rgba(245, 158, 11, 0.55);
}

.bb-peak-badge.is-top10 {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.45);
}

.bb-peak-badge.is-top40 {
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.14);
  border-color: rgba(34, 211, 238, 0.38);
}

.bb-peak-sub {
  font-size: 0.63rem;
  font-weight: 700;
  opacity: 0.9;
}

.bb-row-info {
  min-width: 0;
  flex: 1 1 auto;
}

.bb-row-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.bb-row-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  overflow-wrap: anywhere;
}

.bb-row-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.bb-chart-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 0.69rem;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.34);
  color: #7dd3fc;
}

.bb-chart-tag.is-album {
  background: rgba(167, 139, 250, 0.15);
  border-color: rgba(167, 139, 250, 0.36);
  color: #ddd6fe;
}

.bb-role-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 0.69rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.13);
  border: 1px solid rgba(16, 185, 129, 0.32);
  color: #6ee7b7;
}

.bb-role-tag.is-band {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.36);
  color: #fcd34d;
}

.bb-row-meta-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.at-detail-hof-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 8px;
}

/* Light theme overrides for Hall of Fame & Billboard */
html[data-theme="light"] .hof-hero-pill {
  color: #92400e;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(251, 191, 36, 0.12));
  border-color: rgba(217, 119, 6, 0.45);
}

html[data-theme="light"] .hof-dossier-box {
  background: linear-gradient(180deg, rgba(254, 243, 199, 0.45) 0%, #ffffff 100%);
  border-color: rgba(217, 119, 6, 0.42);
}

html[data-theme="light"] .hof-multi-banner {
  color: #78350f;
  background: rgba(254, 243, 199, 0.85);
  border-color: rgba(217, 119, 6, 0.45);
}

html[data-theme="light"] .hof-induction-row {
  background: #ffffff;
  border-color: rgba(217, 119, 6, 0.25);
}

html[data-theme="light"] .hof-year-badge {
  color: #92400e;
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(217, 119, 6, 0.42);
}

html[data-theme="light"] .billboard-dossier-box {
  background: linear-gradient(180deg, rgba(224, 242, 254, 0.45) 0%, #ffffff 100%);
  border-color: rgba(2, 132, 199, 0.36);
}

html[data-theme="light"] .bb-kpi-card,
html[data-theme="light"] .bb-row {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.35);
}

html[data-theme="light"] .bb-kpi-card.is-gold {
  background: rgba(254, 243, 199, 0.65);
  border-color: rgba(217, 119, 6, 0.42);
}

html[data-theme="light"] .bb-filter-btn {
  background: #f8fafc;
  color: #334155;
  border-color: rgba(148, 163, 184, 0.45);
}

html[data-theme="light"] .bb-filter-btn.is-active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

html[data-theme="light"] .bb-peak-badge.is-top10 {
  color: #92400e;
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(217, 119, 6, 0.42);
}

html[data-theme="light"] .bb-peak-badge.is-top40 {
  color: #0e7490;
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(8, 145, 178, 0.36);
}

html[data-theme="light"] .bb-chart-tag {
  color: #0369a1;
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(2, 132, 199, 0.32);
}

html[data-theme="light"] .bb-chart-tag.is-album {
  color: #6d28d9;
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(109, 40, 217, 0.32);
}

html[data-theme="light"] .bb-role-tag {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(5, 150, 105, 0.32);
}

html[data-theme="light"] .bb-role-tag.is-band {
  color: #92400e;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(217, 119, 6, 0.38);
}

@media (max-width: 768px), (pointer: coarse) {
  .bb-filter-btn,
  .hof-hero-pill {
    min-height: 44px;
    padding: 8px 12px;
  }
}

@media (max-width: 640px) {
  .bb-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bb-row-meta-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* --- v4.7 Engagement, Discovery & Collector Suite --- */
.graduated-discog-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
  border-radius: 14px;
  border: 1px solid rgba(16, 185, 129, 0.45);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(34, 211, 238, 0.08));
}

.connect-nav-hint {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(56, 189, 248, 0.34);
  background: rgba(15, 23, 42, 0.45);
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.explorer-trail-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.55);
}

.explorer-trail-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.explorer-trail-chip {
  min-height: 36px;
  padding: 5px 10px;
  font-size: 0.78rem;
}

.home-discovery-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.discovery-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.85), rgba(30, 41, 59, 0.65));
}

.discovery-card.is-riddle {
  border-color: rgba(245, 158, 11, 0.36);
}

.discovery-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--cyan);
}

.discovery-card.is-riddle .discovery-card-head {
  color: var(--amber);
}

.discovery-card-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.discovery-card-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.discovery-riddle-choices {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.riddle-choice-btn {
  text-align: left;
  justify-content: flex-start;
  min-height: 40px;
  width: 100%;
}

.riddle-choice-btn.is-correct {
  border-color: rgba(16, 185, 129, 0.8);
  background: rgba(16, 185, 129, 0.18);
  color: #a7f3d0;
}

.riddle-choice-btn.is-wrong {
  border-color: rgba(244, 63, 94, 0.75);
  background: rgba(244, 63, 94, 0.16);
  color: #fecdd3;
}

.atlas-map-shell {
  margin-bottom: 16px;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(9, 14, 26, 0.85);
  padding: 12px;
}

.atlas-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.atlas-map-views,
.atlas-map-zoom-controls,
.atlas-era-slider-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.atlas-map-views .btn,
.atlas-map-zoom-controls .btn {
  min-height: 40px;
  min-width: 40px;
}

.atlas-era-bar {
  padding-top: 4px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.atlas-map-stats-pill {
  font-size: 0.76rem;
  color: var(--cyan);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
}

.atlas-leaflet-pin.is-dim {
  background: radial-gradient(circle, #64748b 55%, #334155 100%);
  border-color: #cbd5e1;
  color: #f8fafc;
  box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.2), 0 2px 6px rgba(0, 0, 0, 0.4);
  opacity: 0.72;
}

.atlas-leaflet-pin.is-era-peak {
  background: radial-gradient(circle, rgba(34, 211, 238, 0.98) 55%, rgba(8, 47, 73, 0.95) 100%);
}

.atlas-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
}

.atlas-filter-bar .filter-input {
  flex: 1 1 240px;
  min-height: 42px;
}

.atlas-region-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.atlas-region-chips .btn {
  min-height: 40px;
}

.venue-leaflet-pin {
  border-width: 2px;
}

.atlas-era-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.atlas-svg-stage {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.atlas-svg-canvas {
  display: block;
  width: 100%;
  height: auto;
}

.atlas-svg-ocean {
  fill: #07101f;
}

.atlas-svg-grid line {
  stroke: rgba(148, 163, 184, 0.1);
  stroke-width: 1;
}

.atlas-svg-land path {
  fill: rgba(30, 41, 59, 0.85);
  stroke: rgba(56, 189, 248, 0.28);
  stroke-width: 1.3;
}

.atlas-svg-arc {
  fill: none;
  stroke: rgba(245, 158, 11, 0.35);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.atlas-pin-node {
  cursor: pointer;
}

.atlas-pin-dot {
  fill: #38bdf8;
  stroke: #090d16;
  stroke-width: 2;
  transition: r 0.15s ease, fill 0.15s ease;
}

.atlas-pin-node.is-selected .atlas-pin-dot {
  fill: #f59e0b;
}

.atlas-pin-node.is-dim .atlas-pin-dot {
  fill: #475569;
}

.atlas-pin-lbl {
  font-size: 11px;
  font-weight: 700;
  fill: #e2e8f0;
  paint-order: stroke;
  stroke: #070b14;
  stroke-width: 3px;
}

.atlas-active-city-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(15, 23, 42, 0.9);
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 0.82rem;
}

.connect-path-chain {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.connect-step-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.32);
  background: rgba(15, 23, 42, 0.78);
}

.connect-edge-connector {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  margin-left: 16px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.32);
  align-self: flex-start;
}

.birthday-kpis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.crate-qr-share-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(15, 23, 42, 0.65);
  margin-top: 10px;
}

.crate-storage-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.34);
  background: rgba(245, 158, 11, 0.08);
  color: var(--text-soft, #cbd5e1);
  font-size: 0.8rem;
  line-height: 1.45;
}

.crate-storage-notice-icon {
  flex: 0 0 auto;
  line-height: 1.35;
}

.crate-dna-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.crate-dna-bar-track {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.crate-dna-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22d3ee, #a78bfa);
}

.rabbit-holes-box {
  border-color: rgba(167, 139, 250, 0.35);
}

.tip-error-inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
}

html[data-theme="light"] .connect-nav-hint {
  background: rgba(240, 249, 255, 0.85);
  border-color: rgba(2, 132, 199, 0.35);
  color: #334155;
}

html[data-theme="light"] .explorer-trail-bar,
html[data-theme="light"] .discovery-card,
html[data-theme="light"] .connect-step-card,
html[data-theme="light"] .crate-qr-share-box {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.38);
}

html[data-theme="light"] .crate-storage-notice {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(217, 119, 6, 0.38);
  color: #334155;
}

html[data-theme="light"] .atlas-map-shell {
  background: #f8fafc;
  border-color: rgba(2, 132, 199, 0.32);
}

html[data-theme="light"] .atlas-svg-ocean {
  fill: #e0f2fe;
}

html[data-theme="light"] .atlas-svg-land path {
  fill: #cbd5e1;
  stroke: #64748b;
}

html[data-theme="light"] .atlas-pin-lbl {
  fill: #0f172a;
  stroke: #ffffff;
}

html[data-theme="light"] .atlas-active-city-strip {
  background: #ffffff;
  color: #0f172a;
}

html[data-theme="light"] .riddle-choice-btn.is-correct {
  color: #065f46;
}

html[data-theme="light"] .riddle-choice-btn.is-wrong {
  color: #9f1239;
}

@media (max-width: 900px) {
  .home-discovery-strip {
    grid-template-columns: 1fr;
  }
  .birthday-kpis-grid {
    grid-template-columns: 1fr;
  }
}

.crate-share-url-input {
  font-size: 0.78rem;
}

.explorer-trail-next-btn {
  margin-left: auto;
}

.charts-active-spotlight {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  margin-bottom: 14px;
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: linear-gradient(155deg, rgba(245, 158, 11, 0.12), rgba(15, 23, 42, 0.86));
}

.charts-spotlight-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.charts-spotlight-actions,
.atlas-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.atlas-card-actions {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

html[data-theme="light"] .charts-active-spotlight {
  background: linear-gradient(155deg, rgba(245, 158, 11, 0.1), #ffffff);
  border-color: rgba(217, 119, 6, 0.35);
}

@media (max-width: 1024px), (pointer: coarse) {
  .explorer-trail-chip,
  .explorer-trail-bar .btn-sm,
  .explorer-trail-next-btn,
  .discovery-card .btn-sm,
  .riddle-choice-btn,
  .connect-step-card .btn-sm,
  .atlas-toolbar .btn-sm,
  .crate-qr-share-box .btn-sm,
  .rabbit-holes-box .btn-sm,
  .tip-error-inline-form .btn-sm,
  .charts-active-spotlight .btn-sm,
  .atlas-card .btn-sm,
  .charts-active-spotlight .is-clickable-placeholder,
  .atlas-card .is-clickable-placeholder {
    min-height: 44px;
    min-width: 44px;
  }
  .charts-active-spotlight .is-clickable-placeholder,
  .atlas-card .is-clickable-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .crate-share-url-input,
  .tip-error-inline-form input,
  .tip-error-inline-form select {
    font-size: 16px;
  }
}

/* =========================================================================
   v4.8 Person Facts, Relationships, Band Members & 3-Tier Celebrity Links
   ========================================================================= */

.person-facts-card {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: linear-gradient(155deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72));
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 100%;
  box-sizing: border-box;
}
.person-facts-card.is-band-members {
  border-color: rgba(167, 139, 250, 0.34);
}
html[data-theme="light"] .person-facts-card {
  background: linear-gradient(155deg, rgba(248, 250, 252, 0.96), #ffffff);
  border-color: rgba(8, 145, 178, 0.28);
}
html[data-theme="light"] .person-facts-card.is-band-members {
  border-color: rgba(124, 58, 237, 0.28);
}

.person-facts-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.person-facts-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.person-quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.person-quick-pill {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.55);
  min-width: 120px;
  max-width: 100%;
}
html[data-theme="light"] .person-quick-pill {
  background: rgba(241, 245, 249, 0.9);
  border-color: rgba(148, 163, 184, 0.35);
}
.person-quick-pill-lbl {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.person-quick-pill-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  overflow-wrap: anywhere;
}

.person-height-bar-wrap {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.person-height-bar {
  width: 100%;
  max-width: 170px;
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  overflow: hidden;
}
.person-height-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan, #22d3ee), var(--emerald, #10b981));
}
.person-height-bench {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
}

.person-milestones-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.person-milestone-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.08);
  font-size: 0.78rem;
  max-width: 100%;
}
html[data-theme="light"] .person-milestone-pill {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(217, 119, 6, 0.35);
}

.person-rel-groups {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.person-rel-group-title {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.person-rel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.person-rel-chip {
  appearance: none;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.3;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.65);
  max-width: 100%;
  text-align: left;
  transition: transform 0.14s ease, border-color 0.16s ease, background 0.16s ease;
}
button.person-rel-chip {
  cursor: pointer;
}
button.person-rel-chip.is-archive {
  border-color: rgba(16, 185, 129, 0.48);
  background: rgba(16, 185, 129, 0.1);
}
button.person-rel-chip.is-archive:hover {
  border-color: rgba(16, 185, 129, 0.85);
  background: rgba(16, 185, 129, 0.18);
  transform: translateY(-1px);
}
button.person-rel-chip.is-celebrity {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.09);
}
button.person-rel-chip.is-celebrity:hover {
  border-color: rgba(245, 158, 11, 0.85);
  background: rgba(245, 158, 11, 0.17);
  transform: translateY(-1px);
}
.person-rel-chip.is-private {
  border-style: dashed;
  opacity: 0.82;
  cursor: default;
}
html[data-theme="light"] .person-rel-chip {
  background: rgba(248, 250, 252, 0.95);
  border-color: rgba(148, 163, 184, 0.4);
}
html[data-theme="light"] button.person-rel-chip.is-archive {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(5, 150, 105, 0.45);
}
html[data-theme="light"] button.person-rel-chip.is-celebrity {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(217, 119, 6, 0.45);
}

.person-rel-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}
html[data-theme="light"] .person-rel-tag {
  background: rgba(15, 23, 42, 0.06);
}
.person-rel-years {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.band-members-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  gap: 8px;
}
.band-member-card {
  appearance: none;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid rgba(167, 139, 250, 0.34);
  background: rgba(15, 23, 42, 0.65);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  min-height: 52px;
  max-width: 100%;
  transition: transform 0.14s ease, border-color 0.16s ease, background 0.16s ease;
}
.band-member-card:hover {
  border-color: rgba(34, 211, 238, 0.72);
  background: rgba(34, 211, 238, 0.08);
  transform: translateY(-1px);
}
html[data-theme="light"] .band-member-card {
  background: #ffffff;
  border-color: rgba(124, 58, 237, 0.25);
}
.band-member-meta {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.band-member-name {
  font-weight: 700;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}
.band-member-sub {
  font-size: 0.73rem;
  color: var(--text-muted);
}
.band-family-callout {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(148, 163, 184, 0.25);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.at-detail-person-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.person-bio-works {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.28);
  min-width: 0;
}
.person-bio-works.is-wrapped {
  padding-top: 0;
  border-top: none;
}
.person-bio-block {
  min-width: 0;
}
.person-bio-heading {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.person-bio-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.84rem;
  line-height: 1.48;
  color: var(--text);
  overflow-wrap: anywhere;
}
.person-works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 12px;
  min-width: 0;
}
.person-works-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.person-work-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 9px;
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.52);
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 0.82rem;
  line-height: 1.38;
  min-width: 0;
}
.person-work-year {
  flex: 0 0 auto;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--cyan);
}
.person-work-title {
  min-width: 0;
  color: var(--text);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.person-work-meta {
  font-weight: 400;
  color: var(--text-muted);
}
.person-bio-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 2px;
}
html[data-theme="light"] .person-work-row {
  background: rgba(248, 250, 252, 0.94);
  border-color: rgba(148, 163, 184, 0.34);
}
html[data-theme="light"] .person-work-year {
  color: #0369a1;
}

@media (max-width: 768px), (pointer: coarse) {
  button.person-rel-chip,
  .band-member-card,
  .person-facts-header .btn-sm,
  .person-bio-sources .pill-btn {
    min-height: 44px;
  }
  .person-facts-card {
    padding: 12px;
  }
}

@media (max-width: 600px) {
  .person-works-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .person-work-row {
    padding: 6px 8px;
    gap: 6px;
  }
}

/* --- Universal Social Media, Mail & SMS Share Modal & Buttons --- */
.btn-share-icon {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(6, 182, 212, 0.10);
  color: var(--text);
  font-weight: 700;
}
@media (hover: hover) and (pointer: fine) {
  .btn-share-icon:hover {
    background: rgba(6, 182, 212, 0.22);
    border-color: rgba(34, 211, 238, 0.65);
  }
}

#social-share-modal {
  z-index: 95;
}

.social-share-modal-panel {
  max-width: 640px;
}

.social-share-live-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(9, 14, 26, 0.96));
  border: 1px solid rgba(56, 189, 248, 0.32);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
  margin-bottom: 12px;
}

.social-share-cover-box {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, #164e63, #3b0764);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

.social-share-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.social-share-cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.35rem;
  color: #f8fafc;
  letter-spacing: 0.04em;
}

.social-share-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.social-share-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 2px;
}

.social-share-age-pill {
  font-weight: 800;
  font-size: 0.78rem;
  border-color: rgba(251, 191, 36, 0.65);
  background: rgba(245, 158, 11, 0.2);
  color: #fef08a;
}

.social-share-primary-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.25;
  color: #f8fafc;
  word-break: break-word;
}

.social-share-secondary-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #67e8f9;
  word-break: break-word;
}

.social-share-tertiary {
  font-size: 0.8rem;
  color: #cbd5e1;
  word-break: break-word;
}

.social-share-highlights {
  font-size: 0.76rem;
  color: #fde68a;
  word-break: break-word;
}

.social-share-backlink-tag {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 700;
  color: #22d3ee;
  margin-top: 2px;
}

.social-share-card-preview-details {
  margin-bottom: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 8px 12px;
  font-size: 0.82rem;
}

.social-share-card-preview-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.social-share-rendered-stage {
  margin-top: 10px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: #070b14;
}

.social-share-rendered-img {
  width: 100%;
  height: auto;
  display: block;
}

.social-share-toast {
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.52);
  color: var(--text);
}

.social-share-native-cta {
  width: 100%;
  min-height: 48px;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.social-share-channels-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.social-channel-btn {
  min-height: 66px;
  min-width: 44px;
  padding: 8px 6px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.12s ease, border-color 0.14s ease, background 0.14s ease;
}

.social-channel-btn:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .social-channel-btn:hover {
    border-color: var(--cyan);
    background: var(--bg-card-hover);
  }
}

.social-channel-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.98rem;
  color: #ffffff;
  background: #1e293b;
}

.social-channel-btn.is-facebook .social-channel-icon { background: #1877f2; font-family: Georgia, serif; font-size: 1.15rem; }
.social-channel-btn.is-messenger .social-channel-icon { background: linear-gradient(135deg, #0084ff, #a033ff); }
.social-channel-btn.is-whatsapp .social-channel-icon { background: #25d366; }
.social-channel-btn.is-instagram .social-channel-icon { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.social-channel-btn.is-x .social-channel-icon { background: #0f172a; border: 1px solid rgba(148, 163, 184, 0.4); }
.social-channel-btn.is-bluesky .social-channel-icon { background: #0285ff; }
.social-channel-btn.is-linkedin .social-channel-icon { background: #0a66c2; font-size: 0.88rem; }
.social-channel-btn.is-reddit .social-channel-icon { background: #ff4500; }
.social-channel-btn.is-snapchat .social-channel-icon { background: #fffc00; color: #0f172a; }
.social-channel-btn.is-email .social-channel-icon { background: #0284c7; }
.social-channel-btn.is-sms .social-channel-icon { background: #0d9488; }
.social-channel-btn.is-more .social-channel-icon { background: #475569; }

.social-channel-label {
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-share-utility-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.social-share-utility-row .btn {
  flex: 1 1 180px;
  min-height: 44px;
  justify-content: center;
}

.social-share-url-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.social-share-url-input {
  flex: 1 1 220px;
  min-width: 0;
  font-size: 0.78rem;
}

.social-share-url-row .btn {
  min-height: 44px;
}

@media (max-width: 520px) {
  .social-share-live-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .social-share-cover-box {
    width: 82px;
    height: 82px;
  }
  .social-share-channels-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* --- Global Music Industry Role Filter Strip --- */
.industry-role-pills-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(56, 189, 248, 0.22);
}
[data-theme="light"] .industry-role-pills-bar {
  background: rgba(241, 245, 249, 0.9);
  border-color: rgba(2, 132, 199, 0.22);
}
.industry-role-pill {
  min-height: 44px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.14s ease, opacity 0.14s ease, border-color 0.14s ease, background 0.14s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.industry-role-pill:active {
  transform: scale(0.98);
}
.industry-role-pill.is-active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.24), rgba(59, 130, 246, 0.24));
  border-color: var(--cyan);
  color: var(--cyan);
}
.entity-org-badge {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--amber);
}

/* === All-Time Billboard & Language-Filtered National Chart Cards === */
.chart-archive-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}
.chart-archive-card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.chart-rank-pill {
  flex: 0 0 auto;
  min-width: 44px;
  height: 36px;
  padding: 0 8px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.92rem;
  font-family: var(--font-mono, monospace);
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: var(--text-primary);
}
.chart-rank-pill.is-no1 {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.26), rgba(245, 158, 11, 0.18));
  border-color: rgba(250, 204, 21, 0.65);
  color: #fde047;
}
.chart-rank-pill.is-top10 {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
}
.chart-archive-card-titles {
  flex: 1 1 auto;
  min-width: 0;
}
.chart-archive-year {
  flex: 0 0 auto;
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.chart-archive-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}


/* ==========================================================================
   WORLD VENUES & CLASSIC CLUBS (🏟️ Arenor & Klubbar)
   ========================================================================== */
.venues-hero-panel {
  margin-bottom: 18px;
}
.venues-hero-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}
.venues-title {
  margin: 0 0 6px 0;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  line-height: 1.2;
}
.venues-subtitle {
  margin: 0;
  color: var(--text-muted, #94a3b8);
  font-size: 0.92rem;
  max-width: 760px;
  line-height: 1.45;
}
.venues-stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.venue-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
  font-size: 0.8rem;
  color: var(--text, #e2e8f0);
}
.venues-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.venues-search-input {
  flex: 1 1 280px;
  min-height: 44px;
}
.venues-filters-grid {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.venues-map-card {
  margin-top: 16px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.venues-map-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.venues-map-title {
  font-weight: 700;
  font-size: 0.9rem;
}
.venues-map-regions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.venues-world-svg {
  width: 100%;
  height: auto;
  max-height: 360px;
  display: block;
  border-radius: 10px;
}
.venue-map-pin {
  cursor: pointer;
  transition: transform 0.15s ease, fill-opacity 0.15s ease;
  transform-box: fill-box;
  transform-origin: center;
}
.venue-map-pin:hover,
.venue-map-pin:focus {
  transform: scale(1.65);
  fill-opacity: 1;
  outline: none;
}
.venues-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
}
.venues-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.venues-map-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.venues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}
.venue-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card-bg, rgba(15, 23, 42, 0.78));
  border: 1px solid var(--border, rgba(148, 163, 184, 0.2));
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.venue-card:hover,
.venue-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.35);
  outline: none;
}
.venue-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  overflow: hidden;
}
.venue-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.venue-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  background: radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.22), rgba(15, 23, 42, 0.92));
}
.venue-type-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.82);
  color: #f8fafc;
  border: 1px solid var(--vt-color, #38bdf8);
  backdrop-filter: blur(6px);
}
.venue-type-pill.inline {
  position: static;
}
.venue-status-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.venue-detail-badges .venue-status-badge {
  position: static;
}
.venue-status-badge.is-historic {
  background: rgba(244, 63, 94, 0.85);
  color: #fff;
}
.venue-status-badge.is-active {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
}
.venue-card-body {
  padding: 13px 14px 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.venue-card-name {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
}
.venue-card-loc {
  font-size: 0.84rem;
  color: var(--text-muted, #94a3b8);
}
.venue-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  margin-top: 2px;
  color: var(--text, #e2e8f0);
}
.venue-card-artists {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.venue-artist-chip {
  font-size: 0.73rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

/* Detail View */
.venue-detail-topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.venue-detail-ext-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.venue-detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 22px;
  align-items: start;
  margin-bottom: 18px;
}
.venue-card-photo-count {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.84);
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.4);
  backdrop-filter: blur(6px);
  z-index: 2;
}
.venue-card-person-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
  padding: 7px 12px;
  font-size: 0.76rem;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
  background: rgba(245, 158, 11, 0.14);
  border-top: 1px solid rgba(251, 191, 36, 0.45);
  border-bottom: 1px solid rgba(251, 191, 36, 0.3);
  color: #fef3c7;
}
.venue-card-person-role {
  font-weight: 700;
  color: #fde68a;
  white-space: nowrap;
}
.venue-card-person-text {
  font-weight: 500;
}
.venue-detail-photo-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.venue-gallery-stage {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.65);
}
.venue-detail-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  touch-action: pan-y pinch-zoom;
}
.venue-detail-placeholder {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
}
.venue-gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(15, 23, 42, 0.78);
  color: #f8fafc;
  font-size: 1.25rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  backdrop-filter: blur(6px);
  z-index: 2;
}
.venue-gallery-nav-btn.prev { left: 8px; }
.venue-gallery-nav-btn.next { right: 8px; }
.venue-gallery-zoom-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(15, 23, 42, 0.78);
  color: #f8fafc;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  backdrop-filter: blur(6px);
  z-index: 2;
}
.venue-gallery-counter {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.84);
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.35);
  z-index: 2;
}
.venue-gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 1px 4px;
  scrollbar-width: thin;
}
.venue-gallery-thumb-btn {
  position: relative;
  flex: 0 0 auto;
  width: 68px;
  height: 48px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.6);
  cursor: pointer;
  touch-action: manipulation;
}
.venue-gallery-thumb-btn.is-active {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35);
}
.venue-gallery-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.venue-gallery-thumb-person-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 0.62rem;
  background: rgba(15, 23, 42, 0.88);
  color: #fde68a;
}
.venue-photo-meta-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.venue-person-connection-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #fef3c7;
  font-size: 0.84rem;
  line-height: 1.4;
}
.venue-person-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.28);
  border: 1px solid rgba(251, 191, 36, 0.65);
  color: #fde68a;
  white-space: nowrap;
}
.venue-photo-caption {
  font-size: 0.82rem;
  color: var(--text-primary, #e2e8f0);
  line-height: 1.35;
}
.venue-photo-credit {
  font-size: 0.74rem;
  color: var(--text-muted, #94a3b8);
}
.venue-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(2, 6, 23, 0.94);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  min-height: 100dvh;
  box-sizing: border-box;
}
.venue-lightbox-dialog {
  position: relative;
  width: 100%;
  max-width: 1040px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.venue-lightbox-media {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.venue-lightbox-img {
  max-width: 100%;
  max-height: calc(100dvh - 210px);
  object-fit: contain;
  border-radius: 10px;
}
.venue-lightbox-close {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 1.2rem;
  cursor: pointer;
  touch-action: manipulation;
  z-index: 10001;
}
.venue-lightbox-caption-bar {
  width: 100%;
  max-width: 860px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  color: #f8fafc;
}
.venue-lightbox-caption-bar .venue-photo-caption {
  color: #f8fafc;
}
.venue-lightbox-caption-bar .venue-person-connection-box {
  color: #fef3c7;
}
.venue-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.venue-detail-title {
  margin: 0 0 4px 0;
  font-size: clamp(1.35rem, 2.8vw, 1.95rem);
}
.venue-detail-loc {
  font-size: 1rem;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 6px;
}
.venue-detail-aka {
  font-size: 0.85rem;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 12px;
}
.venue-facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.venue-fact-box {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.18);
}
.venue-fact-label {
  font-size: 0.75rem;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 3px;
}
.venue-fact-val {
  font-size: 1.12rem;
  font-weight: 800;
}
.venue-fact-val-sm {
  font-size: 0.92rem;
  font-weight: 600;
}
.venue-fact-sub {
  font-size: 0.75rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 2px;
}
.venue-record-banner {
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.38);
  margin: 12px 0;
  font-size: 0.9rem;
}
.venue-record-note {
  font-size: 0.82rem;
  color: var(--text-muted, #cbd5e1);
  margin-top: 4px;
}
.venue-history-box h3,
.venue-albums-box h3 {
  font-size: 0.96rem;
  margin: 14px 0 6px 0;
}
.venue-history-box p {
  margin: 0;
  line-height: 1.55;
  font-size: 0.93rem;
}
.venue-albums-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.venue-album-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(168, 85, 247, 0.14);
  border: 1px solid rgba(168, 85, 247, 0.35);
}
.venue-shows-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.venue-shows-header h3 {
  margin: 0;
}
.venue-shows-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.venue-live-msg {
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  margin-bottom: 10px;
  font-size: 0.86rem;
}
.venue-shows-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.venue-shows-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.venue-shows-table th,
.venue-shows-table td {
  padding: 10px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  vertical-align: top;
}
.venue-shows-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted, #94a3b8);
}
.venue-show-date {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}
.venue-show-att {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.venue-show-note {
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 2px;
}
.venue-artist-link-btn {
  background: none;
  border: none;
  padding: 4px 0;
  color: #38bdf8;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  text-align: left;
  min-height: 36px;
}
.venue-artist-link-btn:hover {
  text-decoration: underline;
}

/* Artist profile cross-link strip */
.artist-venues-strip {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.07);
  border: 1px solid rgba(56, 189, 248, 0.24);
}
.artist-venues-heading {
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.artist-venues-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.artist-venue-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 6px 11px;
  min-height: 44px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.26);
  color: var(--text, #e2e8f0);
  cursor: pointer;
  font-size: 0.82rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.artist-venue-chip:hover {
  border-color: #38bdf8;
  transform: translateY(-1px);
}
.artist-venue-chip-meta {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
}

/* Light theme refinements for Venues */
[data-theme="light"] .venues-map-card {
  background: rgba(15, 23, 42, 0.06);
}
[data-theme="light"] .venue-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
}
[data-theme="light"] .venue-artist-link-btn {
  color: #0284c7;
}
[data-theme="light"] .artist-venue-chip {
  background: #ffffff;
  color: #0f172a;
}
[data-theme="light"] .venue-card-person-bar {
  background: rgba(245, 158, 11, 0.14);
  border-top-color: rgba(217, 119, 6, 0.45);
  border-bottom-color: rgba(217, 119, 6, 0.28);
  color: #78350f;
}
[data-theme="light"] .venue-card-person-role {
  color: #92400e;
}
[data-theme="light"] .venue-gallery-stage {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.16);
}
[data-theme="light"] .venue-gallery-thumb-btn {
  border-color: rgba(15, 23, 42, 0.18);
  background: #f1f5f9;
}
[data-theme="light"] .venue-gallery-thumb-btn.is-active {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.28);
}
[data-theme="light"] .venue-photo-caption {
  color: #1e293b;
}
[data-theme="light"] .venue-person-connection-box {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(217, 119, 6, 0.45);
  color: #78350f;
}
[data-theme="light"] .venue-person-role-pill {
  background: rgba(245, 158, 11, 0.24);
  border-color: rgba(180, 83, 9, 0.55);
  color: #92400e;
}
[data-theme="light"] .venue-lightbox-caption-bar {
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
}
[data-theme="light"] .venue-lightbox-caption-bar .venue-photo-caption {
  color: #f8fafc;
}
[data-theme="light"] .venue-lightbox-caption-bar .venue-person-connection-box {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(251, 191, 36, 0.55);
  color: #fef3c7;
}
[data-theme="light"] .venue-lightbox-caption-bar .venue-person-role-pill {
  background: rgba(245, 158, 11, 0.3);
  border-color: rgba(251, 191, 36, 0.65);
  color: #fde68a;
}

@media (max-width: 820px) {
  .venue-detail-hero {
    grid-template-columns: 1fr;
  }
  .venues-grid {
    grid-template-columns: 1fr;
  }
  .venue-gallery-thumb-btn {
    width: 60px;
    height: 44px;
  }
  .venue-lightbox-img {
    max-height: calc(100dvh - 230px);
  }
}

/* Editorial Origin Story Button & Section (#tab-story) */
.story-topbar-btn,
.story-footer-btn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(236, 72, 153, 0.14));
  border-color: rgba(251, 191, 36, 0.5);
  color: #fef3c7;
  font-weight: 700;
  min-height: 44px;
  min-width: 44px;
  max-width: 100%;
  white-space: normal;
  line-height: 1.25;
  text-align: center;
}

.story-topbar-btn:hover,
.story-footer-btn:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(236, 72, 153, 0.22));
  border-color: rgba(251, 191, 36, 0.85);
  color: #ffffff;
}

.story-topbar-btn.is-active,
.story-footer-btn.is-active {
  border-color: rgba(251, 191, 36, 0.92);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.32), rgba(236, 72, 153, 0.24));
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.28);
}

.nerd-story-shell {
  max-width: 820px;
  margin: 0 auto 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.nerd-story-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.nerd-story-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nerd-story-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.42);
  color: #fcd34d;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
}

.nerd-story-article {
  background: linear-gradient(165deg, rgba(20, 27, 45, 0.94), rgba(11, 16, 28, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  padding: clamp(24px, 4.5vw, 48px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
}

.nerd-story-header {
  margin-bottom: 26px;
}

.nerd-story-eyebrow {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #f59e0b;
  margin-bottom: 10px;
}

.nerd-story-title {
  margin: 0;
  font-size: clamp(1.65rem, 3.6vw, 2.4rem);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.nerd-story-divider {
  margin-top: 22px;
  height: 3px;
  width: 88px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #ec4899, #8b5cf6);
}

.nerd-story-body {
  font-size: clamp(0.98rem, 1.3vw, 1.06rem);
  line-height: 1.78;
  color: #e2e8f0;
}

.nerd-story-body p {
  margin: 0 0 18px;
}

.nerd-story-lead p:first-child {
  font-size: clamp(1.03rem, 1.45vw, 1.12rem);
  color: #f1f5f9;
}

.nerd-story-mixtape-link {
  color: #fcd34d;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(251, 191, 36, 0.55);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  border-radius: 5px;
  padding: 0 2px;
  cursor: pointer;
  touch-action: manipulation;
  transition: color 0.16s ease, background-color 0.16s ease, text-decoration-color 0.16s ease;
}

.nerd-story-title .nerd-story-mixtape-link {
  color: #fcd34d;
  font-weight: inherit;
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
  padding: 0 3px;
}

@media (hover: hover) {
  .nerd-story-mixtape-link:hover {
    color: #fef3c7;
    background-color: rgba(245, 158, 11, 0.16);
    text-decoration-color: #fcd34d;
  }
}

.nerd-story-mixtape-link:focus-visible {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
  background-color: rgba(245, 158, 11, 0.16);
}

.nerd-story-mixtape-link:active {
  background-color: rgba(245, 158, 11, 0.24);
}

@media (pointer: coarse) {
  .nerd-story-mixtape-link {
    padding: 2px 3px;
    margin: -2px -1px;
  }
}

.nerd-story-section {
  margin-top: 32px;
}

.nerd-story-section h2 {
  margin: 0 0 14px;
  font-size: clamp(1.22rem, 2.2vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  color: #fcd34d;
  line-height: 1.3;
}

.nerd-story-quote {
  margin: 26px 0;
  padding: 18px 22px;
  border-left: 4px solid #f59e0b;
  border-radius: 0 14px 14px 0;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(139, 92, 246, 0.08));
}

.nerd-story-quote p {
  margin: 0;
  font-size: clamp(1.06rem, 1.6vw, 1.18rem);
  font-weight: 700;
  line-height: 1.55;
  color: #fef3c7;
}

.nerd-story-signature-wrap {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.nerd-story-signature {
  margin: 0;
  font-size: 1.08rem;
  color: #cbd5e1;
}

.nerd-story-cta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.nerd-story-cta-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #e2e8f0;
}

.nerd-story-cta-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

html[data-theme="light"] .story-topbar-btn,
html[data-theme="light"] .story-footer-btn {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.13), rgba(219, 39, 119, 0.09));
  border-color: rgba(180, 83, 9, 0.42);
  color: #92400e;
}

html[data-theme="light"] .story-topbar-btn:hover,
html[data-theme="light"] .story-footer-btn:hover {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.22), rgba(219, 39, 119, 0.15));
  border-color: rgba(180, 83, 9, 0.72);
  color: #78350f;
}

html[data-theme="light"] .story-topbar-btn.is-active,
html[data-theme="light"] .story-footer-btn.is-active {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.25), rgba(219, 39, 119, 0.16));
  border-color: rgba(180, 83, 9, 0.8);
  color: #78350f;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.22);
}

html[data-theme="light"] .nerd-story-badge {
  background: rgba(217, 119, 6, 0.12);
  border-color: rgba(180, 83, 9, 0.35);
  color: #92400e;
}

html[data-theme="light"] .nerd-story-article {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .nerd-story-eyebrow {
  color: #b45309;
}

html[data-theme="light"] .nerd-story-title {
  color: #0f172a;
}

html[data-theme="light"] .nerd-story-body,
html[data-theme="light"] .nerd-story-lead p:first-child {
  color: #1e293b;
}

html[data-theme="light"] .nerd-story-mixtape-link,
html[data-theme="light"] .nerd-story-title .nerd-story-mixtape-link {
  color: #b45309;
  text-decoration-color: rgba(180, 83, 9, 0.52);
}

@media (hover: hover) {
  html[data-theme="light"] .nerd-story-mixtape-link:hover,
  html[data-theme="light"] .nerd-story-title .nerd-story-mixtape-link:hover {
    color: #78350f;
    background-color: rgba(217, 119, 6, 0.14);
    text-decoration-color: #92400e;
  }
}

html[data-theme="light"] .nerd-story-mixtape-link:focus-visible {
  outline-color: #b45309;
  background-color: rgba(217, 119, 6, 0.14);
}

html[data-theme="light"] .nerd-story-mixtape-link:active {
  background-color: rgba(217, 119, 6, 0.22);
}

html[data-theme="light"] .nerd-story-section h2 {
  color: #92400e;
}

html[data-theme="light"] .nerd-story-quote {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(139, 92, 246, 0.06));
  border-left-color: #d97706;
}

html[data-theme="light"] .nerd-story-quote p {
  color: #78350f;
}

html[data-theme="light"] .nerd-story-signature-wrap {
  border-top-color: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .nerd-story-signature {
  color: #334155;
}

html[data-theme="light"] .nerd-story-cta-bar {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .nerd-story-cta-title {
  color: #0f172a;
}

/* === Personkort, Fakta-Röntgen Usability, Sources & Universal Share Enhancements === */
#social-share-modal {
  z-index: 96;
}

.inspector-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.inspector-jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  margin: 10px 0 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

html[data-theme="light"] .inspector-jump-nav {
  background: rgba(241, 245, 249, 0.92);
  border-color: rgba(14, 116, 144, 0.25);
}

.inspector-jump-pill {
  min-height: 36px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.12s ease;
}

.inspector-jump-pill:hover {
  border-color: var(--cyan);
  background: var(--bg-card-hover);
}

.inspector-track-context-banner {
  padding: 10px 14px;
  margin: 10px 0 8px;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.34);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.81rem;
}

.inspector-track-context-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.inspector-track-context-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.person-inline-source-link,
.person-rel-src-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 22px;
  padding: 1px 5px;
  border-radius: 6px;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--cyan);
  text-decoration: none;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.28);
  vertical-align: middle;
}

.person-inline-source-link:hover,
.person-rel-src-link:hover {
  background: rgba(34, 211, 238, 0.2);
  border-color: var(--cyan);
}

.person-rel-chip-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
}

.person-rel-group-sub {
  font-weight: 500;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.person-kv-note {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.35;
}

.bb-methodology-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.bb-billing-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 6px 0 10px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid var(--border);
  font-size: 0.76rem;
  color: var(--text-muted);
}

html[data-theme="light"] .bb-billing-legend {
  background: rgba(241, 245, 249, 0.85);
}

.credits-methodology-note {
  margin: 0 0 10px;
  font-size: 0.79rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.entry-cocreators-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 0.74rem;
}

.entry-cocreators-lbl {
  color: var(--text-muted);
  font-weight: 600;
}

.social-share-group-head {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin: 10px 0 6px;
}

.social-share-text-alt-details {
  margin-top: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 8px 10px;
  font-size: 0.79rem;
}

.social-share-text-alt-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.social-share-text-alt-box {
  margin-top: 8px;
}

.social-share-text-alt-area {
  width: 100%;
  resize: vertical;
  font-size: 0.78rem;
  line-height: 1.4;
}

/* Unmistakable visible keyboard focus across Personkort, Share & Jump Controls */
#placeholder-inspector-modal button:focus-visible,
#placeholder-inspector-modal a:focus-visible,
#placeholder-inspector-modal input:focus-visible,
#placeholder-inspector-modal summary:focus-visible,
#social-share-modal button:focus-visible,
#social-share-modal a:focus-visible,
#social-share-modal input:focus-visible,
#social-share-modal textarea:focus-visible,
#social-share-modal summary:focus-visible {
  outline: 2.5px solid var(--cyan);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.24);
}

@media (max-width: 768px) {
  .inspector-jump-pill,
  .inspector-hero-actions .btn,
  .person-rel-src-link {
    min-height: 44px;
  }
  .person-rel-src-link {
    min-width: 36px;
    padding: 4px 8px;
  }
}

.pill-btn.is-official-website-pill,
.at-action-btn.is-official-website-pill,
.btn.is-official-website-pill {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(34, 211, 238, 0.14));
  border-color: rgba(16, 185, 129, 0.45);
  color: #a7f3d0;
  font-weight: 700;
  text-decoration: none;
  touch-action: manipulation;
}
.pill-btn.is-official-website-pill:hover,
.at-action-btn.is-official-website-pill:hover,
.btn.is-official-website-pill:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(34, 211, 238, 0.24));
  border-color: rgba(52, 211, 153, 0.8);
  color: #ecfdf5;
}
@media (max-width: 768px) {
  .pill-btn.is-official-website-pill,
  .at-action-btn.is-official-website-pill,
  .btn.is-official-website-pill {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}


/* Venue Data Sources & External Concert Archives Attribution */
.venue-sources-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.22);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.venue-sources-row,
.venue-sources-ext-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.venue-sources-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  margin-right: 4px;
}
.venue-source-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--text, #e2e8f0);
  text-decoration: none;
  white-space: nowrap;
}
.venue-source-badge.is-link:hover {
  background: rgba(56, 189, 248, 0.24);
}
.venue-ext-source-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  min-height: 32px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(168, 85, 247, 0.14);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: var(--text, #f1f5f9);
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.venue-ext-source-link:hover {
  background: rgba(168, 85, 247, 0.28);
  transform: translateY(-1px);
}
[data-theme="light"] .venue-sources-box {
  background: rgba(15, 23, 42, 0.04);
}
[data-theme="light"] .venue-source-badge,
[data-theme="light"] .venue-ext-source-link {
  color: #0f172a;
}

.venue-card-excerpt {
  margin: 4px 0 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-muted, #94a3b8);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================================
   "TYST NOT" — Subtle Contextual Discovery Note (Anti-Clippy Architecture)
   ============================================================================ */
.nerd-discovery-note-host {
  position: fixed;
  z-index: 62;
  width: 46px;
  height: 46px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 6px, 0);
  transition: opacity 0.24s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 0s linear 0.26s;
}

.nerd-discovery-note-host.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
  transition: opacity 0.24s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 0s linear 0s;
}

.nerd-discovery-note-host.is-mobile-dock {
  right: calc(14px + env(safe-area-inset-right, 0px));
  bottom: calc(var(--note-mobile-bottom, 76px) + env(safe-area-inset-bottom, 0px));
}

.nerd-discovery-note-btn {
  position: relative;
  width: 46px;
  height: 46px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.34);
  background: radial-gradient(circle at 32% 28%, rgba(34, 211, 238, 0.22), rgba(15, 23, 42, 0.88) 70%);
  box-shadow: 0 8px 22px rgba(2, 6, 23, 0.55), 0 0 18px rgba(56, 189, 248, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  animation: nerdNoteGentleBob 3.4s ease-in-out infinite;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.nerd-discovery-note-btn:hover,
.nerd-discovery-note-btn:focus-visible,
.nerd-discovery-note-btn[aria-expanded="true"] {
  border-color: rgba(167, 139, 250, 0.78);
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.65), 0 0 24px rgba(56, 189, 248, 0.36);
  transform: translate3d(0, -2px, 0) scale(1.06);
  outline: none;
}

.nerd-discovery-note-btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.nerd-discovery-note-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(34, 211, 238, 0.25));
}

@keyframes nerdNoteGentleBob {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -4px, 0); }
}

.nerd-discovery-note-popover {
  position: absolute;
  width: 296px;
  max-width: calc(100vw - 24px);
  padding: 13px 14px 12px;
  border-radius: 14px;
  background: rgba(11, 17, 29, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(56, 189, 248, 0.38);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.72), 0 0 24px rgba(34, 211, 238, 0.14);
  color: var(--text, #f1f5f9);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 6px, 0) scale(0.96);
  transition: opacity 0.18s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.2s;
  z-index: 2;
}

.nerd-discovery-note-popover.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
  transition: opacity 0.18s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0s;
}

.nerd-discovery-note-popover.pos-below {
  top: calc(100% + 10px);
}
.nerd-discovery-note-popover.pos-above {
  bottom: calc(100% + 10px);
}
.nerd-discovery-note-popover.align-left {
  left: 0;
}
.nerd-discovery-note-popover.align-right {
  right: 0;
}

.nerd-discovery-note-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.nerd-discovery-note-eyebrow {
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #38bdf8;
}

.nerd-discovery-note-close {
  min-width: 32px;
  min-height: 32px;
  padding: 2px 7px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-muted, #94a3b8);
  font-size: 0.78rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.nerd-discovery-note-close:hover {
  color: #f8fafc;
  border-color: rgba(248, 250, 252, 0.35);
}

.nerd-discovery-note-title {
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--text, #f1f5f9);
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.nerd-discovery-note-body {
  margin: 0 0 11px 0;
  font-size: 0.81rem;
  line-height: 1.45;
  color: #cbd5e1;
}

.nerd-discovery-note-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.nerd-discovery-note-cta {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid rgba(34, 211, 238, 0.52);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.24), rgba(139, 92, 246, 0.22));
  color: #ecfeff;
  font-size: 0.79rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.nerd-discovery-note-cta:hover {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.36), rgba(139, 92, 246, 0.34));
  border-color: rgba(103, 232, 249, 0.85);
  transform: translate3d(0, -1px, 0);
}

.nerd-discovery-note-mute {
  min-height: 32px;
  padding: 4px 6px;
  border: none;
  background: transparent;
  color: var(--text-muted, #94a3b8);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  touch-action: manipulation;
}
.nerd-discovery-note-mute:hover {
  color: var(--text, #f1f5f9);
}

.nerd-discovery-target-hint {
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.82), 0 0 18px rgba(56, 189, 248, 0.28) !important;
  transition: box-shadow 0.2s ease;
}

[data-theme="light"] .nerd-discovery-note-btn {
  background: radial-gradient(circle at 32% 28%, rgba(56, 189, 248, 0.16), rgba(255, 255, 255, 0.96) 72%);
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16), 0 0 16px rgba(56, 189, 248, 0.18);
}
[data-theme="light"] .nerd-discovery-note-popover {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
  color: #0f172a;
}
[data-theme="light"] .nerd-discovery-note-eyebrow {
  color: #0284c7;
}
[data-theme="light"] .nerd-discovery-note-title {
  color: #0f172a;
}
[data-theme="light"] .nerd-discovery-note-body {
  color: #334155;
}
[data-theme="light"] .nerd-discovery-note-close {
  color: #475569;
  border-color: rgba(100, 116, 139, 0.28);
  background: rgba(15, 23, 42, 0.04);
}
[data-theme="light"] .nerd-discovery-note-close:hover {
  color: #0f172a;
}
[data-theme="light"] .nerd-discovery-note-cta {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(124, 58, 237, 0.14));
  border-color: rgba(14, 165, 233, 0.5);
  color: #0c4a6e;
}
[data-theme="light"] .nerd-discovery-note-mute {
  color: #475569;
}
[data-theme="light"] .nerd-discovery-note-mute:hover {
  color: #0f172a;
}

@media (max-width: 639px) {
  .nerd-discovery-note-popover {
    width: min(308px, calc(100vw - 28px));
  }
  .nerd-discovery-note-close,
  .nerd-discovery-note-cta,
  .nerd-discovery-note-mute {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nerd-discovery-note-host,
  .nerd-discovery-note-btn,
  .nerd-discovery-note-popover {
    animation: none !important;
    transition: opacity 0.1s linear !important;
  }
}

/* === Record Label Catalog Inspector (v5.0) === */
.label-scope-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.label-scope-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: rgba(15, 23, 42, 0.55);
  color: var(--text, #e2e8f0);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.label-scope-btn:hover {
  border-color: rgba(56, 189, 248, 0.65);
  background: rgba(34, 211, 238, 0.14);
}
.label-scope-btn.is-active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.26), rgba(59, 130, 246, 0.24));
  border-color: rgba(34, 211, 238, 0.85);
  color: #ffffff;
}
.label-imprint-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 6px;
}
.label-imprint-pill-wrap {
  display: inline-flex;
  align-items: stretch;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.5);
  max-width: 100%;
}
.label-imprint-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--text, #e2e8f0);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  text-align: left;
  min-width: 0;
}
.label-imprint-pill-wrap .label-imprint-pill {
  border-radius: 0;
}
.label-imprint-pill:not(.label-imprint-pill-wrap > .label-imprint-pill) {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.5);
}
.label-imprint-pill:hover {
  background: rgba(56, 189, 248, 0.16);
}
.label-imprint-pill.is-active {
  background: rgba(34, 211, 238, 0.24);
  color: #ffffff;
  border-color: rgba(34, 211, 238, 0.75);
}
.label-imprint-jump-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 44px;
  padding: 0 9px;
  border: none;
  border-left: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: var(--cyan, #22d3ee);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.label-imprint-jump-btn:hover {
  background: rgba(34, 211, 238, 0.22);
  color: #ffffff;
}
.label-catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 10px;
}
.label-catalog-search-input {
  flex: 1 1 220px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text, #f8fafc);
  font-size: 0.88rem;
}
.label-catalog-select {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text, #f8fafc);
  font-size: 0.84rem;
  cursor: pointer;
}
.label-roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 8px;
  margin-top: 6px;
}
.label-roster-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  min-height: 44px;
  min-width: 0;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.5);
  color: var(--text, #f1f5f9);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.label-roster-card:hover {
  border-color: rgba(34, 211, 238, 0.65);
  background: rgba(34, 211, 238, 0.12);
  transform: translateY(-1px);
}
.label-roster-name {
  font-weight: 700;
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.label-roster-meta {
  font-size: 0.74rem;
  color: var(--text-muted, #94a3b8);
}
.label-source-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}
.label-pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}
.label-pagination-bar .btn {
  min-height: 44px;
  touch-action: manipulation;
}
.label-pagination-info {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
}

[data-theme="light"] .label-scope-btn,
[data-theme="light"] .label-imprint-pill-wrap,
[data-theme="light"] .label-imprint-pill:not(.label-imprint-pill-wrap > .label-imprint-pill),
[data-theme="light"] .label-roster-card {
  background: rgba(248, 250, 252, 0.94);
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.16);
}
[data-theme="light"] .label-imprint-pill {
  color: #0f172a;
}
[data-theme="light"] .label-scope-btn.is-active,
[data-theme="light"] .label-imprint-pill.is-active {
  background: rgba(14, 165, 233, 0.16);
  color: #0369a1;
  border-color: rgba(14, 165, 233, 0.65);
}
[data-theme="light"] .label-imprint-jump-btn {
  background: rgba(15, 23, 42, 0.04);
  color: #0284c7;
  border-left-color: rgba(15, 23, 42, 0.12);
}
[data-theme="light"] .label-catalog-search-input,
[data-theme="light"] .label-catalog-select {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.22);
}
[data-theme="light"] .label-source-badge {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.35);
}

@media (max-width: 640px) {
  .label-scope-btn {
    width: 100%;
    justify-content: center;
  }
  .label-catalog-search-input,
  .label-catalog-select {
    font-size: 16px;
    width: 100%;
  }
  .label-roster-grid {
    grid-template-columns: 1fr;
  }
  .label-pagination-bar {
    justify-content: center;
  }
}

/* ── International Sources & Deep Songfacts Enrichment Panel ── */
.intl-enrichment-panel {
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(15, 23, 42, 0.92) 55%, rgba(16, 185, 129, 0.08));
  border: 1px solid rgba(56, 189, 248, 0.28);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.intl-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.intl-panel-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #e0f2fe;
  letter-spacing: -0.01em;
}
.intl-source-count {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
}
.intl-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 8px;
}
.intl-stat-pill {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.intl-stat-k {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
}
.intl-stat-v {
  font-size: 0.92rem;
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
}
.intl-sf-box {
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 11px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.intl-sf-box.intl-sf-compact {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 0.84rem;
}
.intl-sf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.86rem;
  color: #a7f3d0;
}
.intl-sf-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}
.intl-sf-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #cbd5e1;
}
.intl-theme-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.intl-theme-chip {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(192, 132, 252, 0.32);
  color: #e9d5ff;
}
.intl-sf-link {
  font-size: 0.78rem;
  font-weight: 700;
  color: #38bdf8;
  text-decoration: none;
  align-self: flex-start;
}
.intl-sf-link:hover {
  text-decoration: underline;
}
.intl-id-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.intl-id-badge {
  font-size: 0.7rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
}

.badge-deceased-hero,
.badge-deceased-card {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: rgba(244, 63, 94, 0.16);
  border: 1px solid rgba(251, 113, 133, 0.42);
  color: #fda4af;
}
.badge-deceased-hero[hidden],
.badge-deceased-card[hidden],
.nerds-update-banner[hidden] {
  display: none !important;
}
.badge-deceased-hero {
  font-size: 0.76rem;
  padding: 4px 10px;
  border-radius: 999px;
}
.badge-deceased-card {
  font-size: 0.71rem;
  padding: 2px 8px;
  border-radius: 999px;
}
html[data-theme="light"] .badge-deceased-hero,
html[data-theme="light"] .badge-deceased-card {
  background: rgba(225, 29, 72, 0.1);
  border-color: rgba(190, 18, 60, 0.35);
  color: #9f1239;
}

.nerds-update-banner {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom, 16px));
  transform: translateX(-50%);
  z-index: 950;
  max-width: min(94vw, 560px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(12px);
  color: #f8fafc;
}
.nerds-update-banner-text {
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
}
.nerds-update-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nerds-update-reload-btn,
.nerds-update-close-btn {
  min-height: 44px;
  min-width: 44px;
  touch-action: manipulation;
}
html[data-theme="light"] .nerds-update-banner {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(2, 132, 199, 0.42);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  color: #0f172a;
}

/* =========================================================================
   Similar Artists Discovery Section (v5.6)
   ========================================================================= */

.similar-artists-section {
  position: relative;
  border-radius: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background:
    radial-gradient(ellipse 65% 85% at 100% 0%, rgba(167, 139, 250, 0.12), transparent 62%),
    radial-gradient(ellipse 65% 85% at 0% 100%, rgba(6, 182, 212, 0.10), transparent 60%),
    linear-gradient(160deg, rgba(19, 28, 46, 0.96), rgba(11, 17, 29, 0.98));
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.34);
  overflow: hidden;
  max-width: 100%;
}

.similar-artists-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 18px;
  margin-bottom: 14px;
}

.similar-artists-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.similar-artists-sub {
  margin: 4px 0 0;
  font-size: 0.81rem;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 72ch;
}

.similar-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.sim-filter-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.78);
  color: #cbd5e1;
  font-size: 0.77rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
  white-space: nowrap;
}

.sim-filter-pill:hover {
  border-color: rgba(56, 189, 248, 0.6);
  color: #f8fafc;
  background: rgba(30, 41, 59, 0.92);
}

.sim-filter-pill.is-active {
  border-color: rgba(34, 211, 238, 0.75);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.24), rgba(139, 92, 246, 0.2));
  color: #f0fdfa;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.22);
}

.sim-filter-pill.is-more-btn {
  border-style: dashed;
  border-color: rgba(245, 158, 11, 0.48);
  color: #fde68a;
  background: rgba(245, 158, 11, 0.08);
}

.sim-filter-pill.is-more-btn:hover {
  border-color: rgba(245, 158, 11, 0.85);
  background: rgba(245, 158, 11, 0.16);
  color: #fef3c7;
}

.similar-artists-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.similar-artist-card {
  width: 100%;
  min-width: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 13px;
  border-radius: 13px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.78);
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.similar-artist-card:hover,
.similar-artist-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.68);
  background: rgba(24, 35, 56, 0.96);
  box-shadow: 0 10px 26px rgba(6, 182, 212, 0.16);
  outline: none;
}

.sim-card-top {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.sim-card-avatar,
.sim-card-avatar-fallback {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sim-card-avatar {
  object-fit: cover;
  border: 1px solid rgba(148, 163, 184, 0.34);
  background: #0f172a;
}

.sim-card-avatar[hidden],
.sim-card-avatar-fallback[hidden] {
  display: none !important;
}

.sim-card-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  color: #e2e8f0;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.28), rgba(167, 139, 250, 0.28));
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.sim-card-id {
  min-width: 0;
  flex: 1;
}

.sim-card-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.sim-card-name {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.25;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sim-match-pill {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #6ee7b7;
}

.sim-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 3px;
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 0;
}

.sim-card-meta .country-flag-svg {
  flex-shrink: 0;
  border-radius: 2px;
}

.sim-card-country {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 110px;
}

.sim-reasons-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.sim-reason-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.71rem;
  font-weight: 600;
  line-height: 1.25;
  padding: 3px 7px;
  border-radius: 7px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sim-reason-pill.tone-cyan {
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: #67e8f9;
}

.sim-reason-pill.tone-amber {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.32);
  color: #fcd34d;
}

.sim-reason-pill.tone-violet {
  background: rgba(167, 139, 250, 0.16);
  border: 1px solid rgba(196, 181, 253, 0.34);
  color: #ddd6fe;
}

.sim-reason-pill.tone-slate {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}

.sim-card-foot {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.73rem;
}

.sim-card-scope {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sim-tier-dot {
  color: #34d399;
  font-weight: 700;
}

.sim-card-open {
  flex-shrink: 0;
  font-weight: 700;
  color: #38bdf8;
}

.similar-source-foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 14px;
  font-size: 0.74rem;
  color: var(--text-dim);
}

html[data-theme="light"] .similar-artists-section {
  background:
    radial-gradient(ellipse 65% 85% at 100% 0%, rgba(124, 58, 237, 0.06), transparent 62%),
    radial-gradient(ellipse 65% 85% at 0% 100%, rgba(2, 132, 199, 0.06), transparent 60%),
    linear-gradient(160deg, #ffffff, #f8fafc);
  border-color: rgba(2, 132, 199, 0.28);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .sim-filter-pill {
  background: #f1f5f9;
  border-color: rgba(100, 116, 139, 0.28);
  color: #334155;
}

html[data-theme="light"] .sim-filter-pill:hover {
  background: #e2e8f0;
  border-color: rgba(2, 132, 199, 0.55);
  color: #0f172a;
}

html[data-theme="light"] .sim-filter-pill.is-active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.14), rgba(109, 40, 217, 0.12));
  border-color: rgba(2, 132, 199, 0.65);
  color: #0369a1;
  box-shadow: 0 0 0 1px rgba(2, 132, 199, 0.15);
}

html[data-theme="light"] .sim-filter-pill.is-more-btn {
  background: rgba(217, 119, 6, 0.08);
  border-color: rgba(180, 83, 9, 0.42);
  color: #92400e;
}

html[data-theme="light"] .similar-artist-card {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.34);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .similar-artist-card:hover,
html[data-theme="light"] .similar-artist-card:focus-visible {
  background: #f8fafc;
  border-color: rgba(2, 132, 199, 0.72);
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.12);
}

html[data-theme="light"] .sim-card-avatar {
  background: #e2e8f0;
  border-color: rgba(100, 116, 139, 0.32);
}

html[data-theme="light"] .sim-card-avatar-fallback {
  color: #1e293b;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(124, 58, 237, 0.16));
  border-color: rgba(2, 132, 199, 0.32);
}

html[data-theme="light"] .sim-match-pill {
  background: rgba(5, 150, 105, 0.12);
  border-color: rgba(5, 150, 105, 0.38);
  color: #047857;
}

html[data-theme="light"] .sim-reason-pill.tone-cyan {
  background: rgba(2, 132, 199, 0.1);
  border-color: rgba(2, 132, 199, 0.28);
  color: #0369a1;
}

html[data-theme="light"] .sim-reason-pill.tone-amber {
  background: rgba(217, 119, 6, 0.1);
  border-color: rgba(180, 83, 9, 0.28);
  color: #b45309;
}

html[data-theme="light"] .sim-reason-pill.tone-violet {
  background: rgba(109, 40, 217, 0.1);
  border-color: rgba(109, 40, 217, 0.28);
  color: #6d28d9;
}

html[data-theme="light"] .sim-reason-pill.tone-slate {
  background: #f1f5f9;
  border-color: rgba(100, 116, 139, 0.26);
  color: #475569;
}

html[data-theme="light"] .sim-card-foot,
html[data-theme="light"] .similar-source-foot {
  border-top-color: rgba(148, 163, 184, 0.25);
}

html[data-theme="light"] .sim-tier-dot {
  color: #047857;
}

html[data-theme="light"] .sim-card-open {
  color: #0284c7;
}

@media (max-width: 1120px) {
  .similar-artists-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .similar-artists-section {
    padding: 14px;
    border-radius: 14px;
  }
  .sim-filter-pill {
    min-height: 44px;
    padding: 8px 13px;
    font-size: 0.79rem;
  }
  .similar-artist-card {
    min-height: 44px;
  }
}

@media (max-width: 640px) {
  .similar-artists-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
}

/* =========================================================================
   ANALOG MIXTAPE ("BLANDBAND") — 1980s Oak Desk, Cassette Case & J-Card
   ========================================================================= */

.btn-mixtape-export {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.14);
  color: #fde68a;
  font-weight: 700;
  touch-action: manipulation;
}
@media (hover: hover) and (pointer: fine) {
  .btn-mixtape-export:hover {
    background: rgba(245, 158, 11, 0.24);
    border-color: rgba(245, 158, 11, 0.72);
    color: #fef3c7;
  }
}
html[data-theme="light"] .btn-mixtape-export {
  border-color: rgba(180, 83, 9, 0.45);
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
}
@media (hover: hover) and (pointer: fine) {
  html[data-theme="light"] .btn-mixtape-export:hover {
    background: rgba(245, 158, 11, 0.24);
    border-color: rgba(180, 83, 9, 0.72);
    color: #78350f;
  }
}

.mixtape-quick-add-btn,
.track-card-actions .btn-sm.mixtape-quick-add-btn {
  min-width: 74px;
  min-height: 44px;
  padding: 8px 14px;
  gap: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-color: rgba(245, 158, 11, 0.38);
  background: rgba(245, 158, 11, 0.08);
  color: #f8fafc;
  touch-action: manipulation;
}

@media (hover: hover) and (pointer: fine) {
  .mixtape-quick-add-btn:hover,
  .track-card-actions .btn-sm.mixtape-quick-add-btn:hover {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(251, 191, 36, 0.68);
    color: #ffffff;
  }
}

html[data-theme="light"] .mixtape-quick-add-btn,
html[data-theme="light"] .track-card-actions .btn-sm.mixtape-quick-add-btn {
  border-color: rgba(180, 83, 9, 0.36);
  background: rgba(245, 158, 11, 0.10);
  color: #78350f;
}

@media (hover: hover) and (pointer: fine) {
  html[data-theme="light"] .mixtape-quick-add-btn:hover,
  html[data-theme="light"] .track-card-actions .btn-sm.mixtape-quick-add-btn:hover {
    background: rgba(245, 158, 11, 0.20);
    border-color: rgba(180, 83, 9, 0.62);
    color: #451a03;
  }
}

.mixtape-cassette-icon-svg {
  width: 30px;
  height: 20px;
  display: block;
  flex-shrink: 0;
  overflow: visible;
}

.mixtape-cassette-icon-svg.mixtape-cassette-icon-sm {
  width: 24px;
  height: 16px;
}

.mixtape-cassette-icon-svg.mixtape-cassette-icon-topbar {
  width: 22px;
  height: 15px;
}

.mixtape-cassette-icon-svg .mx-ico-shell {
  fill: #2b3547;
  stroke: #e2e8f0;
}

.mixtape-cassette-icon-svg .mx-ico-label {
  fill: #fef9ee;
}

.mixtape-cassette-icon-svg .mx-ico-stripe {
  fill: #f59e0b;
}

.mixtape-cassette-icon-svg .mx-ico-window {
  fill: #0f172a;
}

.mixtape-cassette-icon-svg .mx-ico-tape {
  fill: #b45309;
}

.mixtape-cassette-icon-svg .mx-ico-reel {
  fill: #ffffff;
}

.mixtape-cassette-icon-svg .mx-ico-hole {
  fill: #0f172a;
}

.mixtape-cassette-icon-svg .mx-ico-bridge {
  fill: #475569;
  stroke: #cbd5e1;
}

.mixtape-cassette-icon-svg .mx-ico-pin,
.mixtape-cassette-icon-svg .mx-ico-slot {
  fill: #0f172a;
}

.mixtape-quick-add-btn.is-on-mixtape .mixtape-cassette-icon-svg .mx-ico-shell,
.mixtape-topbar-btn.is-active .mixtape-cassette-icon-svg .mx-ico-shell,
#dossier-mixtape-toggle-btn.is-on-mixtape .mixtape-cassette-icon-svg .mx-ico-shell {
  fill: #3b2f1e;
  stroke: #fde68a;
}

.mixtape-quick-add-btn.is-on-mixtape .mixtape-cassette-icon-svg .mx-ico-stripe,
.mixtape-topbar-btn.is-active .mixtape-cassette-icon-svg .mx-ico-stripe,
#dossier-mixtape-toggle-btn.is-on-mixtape .mixtape-cassette-icon-svg .mx-ico-stripe {
  fill: #fbbf24;
}

html[data-theme="light"] .mixtape-cassette-icon-svg .mx-ico-shell {
  fill: #334155;
  stroke: #0f172a;
}

html[data-theme="light"] .mixtape-quick-add-btn.is-on-mixtape .mixtape-cassette-icon-svg .mx-ico-shell,
html[data-theme="light"] .mixtape-topbar-btn.is-active .mixtape-cassette-icon-svg .mx-ico-shell {
  fill: #451a03;
  stroke: #92400e;
}

.mixtape-quick-add-sign {
  min-width: 18px;
  text-align: center;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 599px) {
  .mixtape-quick-add-btn,
  .track-card-actions .btn-sm.mixtape-quick-add-btn {
    min-width: 68px;
    padding: 8px 12px;
    gap: 6px;
  }
}

.mixtape-topbar-btn.is-active,
.mixtape-quick-add-btn.is-on-mixtape {
  border-color: rgba(245, 158, 11, 0.72) !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(217, 119, 6, 0.14)) !important;
  color: #fde68a !important;
}

html[data-theme="light"] .mixtape-topbar-btn.is-active,
html[data-theme="light"] .mixtape-quick-add-btn.is-on-mixtape {
  border-color: rgba(180, 83, 9, 0.55) !important;
  background: rgba(245, 158, 11, 0.16) !important;
  color: #92400e !important;
}

.mixtape-oak-desk-root {
  position: relative;
  border-radius: 20px;
  padding: 20px 20px calc(26px + env(safe-area-inset-bottom, 0px));
  background-color: #4f311b;
  background-image:
    linear-gradient(180deg, rgba(16, 11, 7, 0.56), rgba(14, 9, 5, 0.68)),
    url("../assets/mixtape/wood-desk.jpg?v=5.8&b=20261129nerds60live3");
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 224, 178, 0.2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 240, 210, 0.15);
  color: #f8f1e5;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
  box-sizing: border-box;
}

.mixtape-top-desk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(18, 13, 9, 0.68);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 232, 198, 0.16);
  margin-bottom: 18px;
}

.mixtape-top-desk-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mixtape-desk-chip {
  font-weight: 800;
  font-size: 0.92rem;
  color: #fcd34d;
  letter-spacing: 0.01em;
}

.mixtape-desk-sub {
  font-size: 0.84rem;
  color: rgba(248, 241, 229, 0.84);
}

.mixtape-mode-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mixtape-mode-pill {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 236, 200, 0.24);
  background: rgba(28, 20, 14, 0.78);
  color: #f5e9d6;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.mixtape-mode-pill:hover {
  border-color: rgba(252, 211, 77, 0.62);
  transform: translateY(-1px);
}

.mixtape-mode-pill.is-active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #fde68a;
  color: #1c1208;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35);
}

.mixtape-toast-pill {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: none;
  width: fit-content;
  margin: 0 auto 12px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(252, 211, 77, 0.55);
  color: #fef3c7;
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.mixtape-toast-pill.is-visible {
  display: block;
}

/* Closed Reception Desk Scene */
.mixtape-scene-closed {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6px 8px 10px;
}

.mixtape-closed-eyebrow {
  margin: 0 0 6px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fde68a;
}

.mixtape-closed-title {
  margin: 0;
  font-family: "Architects Daughter", cursive, sans-serif;
  font-size: clamp(1.5rem, 3.2vw, 2.3rem);
  color: #fffaf0;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.55);
}

.mixtape-closed-quote {
  margin: 8px auto 0;
  max-width: 560px;
  font-family: "Architects Daughter", cursive, sans-serif;
  font-size: 1rem;
  color: #f3e8d2;
}

.mixtape-closed-case-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 14px auto 12px;
  max-width: 100%;
}

.mixtape-case-trigger {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 6px;
  cursor: pointer;
  border-radius: 14px;
  width: min(375px, 84vw);
  filter: drop-shadow(0 26px 38px rgba(0, 0, 0, 0.65));
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), filter 0.24s ease;
  touch-action: manipulation;
}

.mixtape-case-trigger:hover {
  transform: translateY(-4px) rotate(-0.6deg) scale(1.015);
  filter: drop-shadow(0 32px 46px rgba(0, 0, 0, 0.72));
}

.mixtape-case-trigger.is-opening {
  transform: perspective(900px) rotateX(18deg) scale(1.03);
}

.mixtape-closed-case-svg {
  display: block;
  width: 100%;
  height: auto;
}

.mixtape-closed-pen-beside {
  width: 34px;
  transform: rotate(12deg);
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.45));
}

.mixtape-bic-pen-svg {
  display: block;
  width: 100%;
  height: auto;
}

.mixtape-closed-hint {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: #fde68a;
  font-weight: 600;
}

.mixtape-closed-actions,
.mixtape-open-desk-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.mixtape-unbox-cta {
  min-height: 46px;
  padding: 10px 20px;
  font-weight: 800;
}

/* Spinning Tape Hubs synced to Playback */
@keyframes mixtapeReelSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.mixtape-reel-spin {
  animation: mixtapeReelSpin 3.6s linear infinite;
}

/* Open J-Card Deck Scene */
.mixtape-scene-open {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.mixtape-open-top-hardware {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 26px;
  width: 100%;
}

.mixtape-open-empty-case {
  position: relative;
  width: 196px;
  height: 126px;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.36);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.04));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.48);
  transform: rotate(-8deg);
}

.mixtape-acrylic-lid {
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  border-radius: 4px;
}

.mixtape-acrylic-tray {
  position: absolute;
  left: 34px;
  right: 34px;
  top: 26px;
  bottom: 26px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.mixtape-open-cassette-wrap {
  width: min(330px, 86vw);
  transform: rotate(1.4deg);
}

.mixtape-open-cassette-svg {
  display: block;
  width: 100%;
  height: auto;
}

.mixtape-jcard-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  max-width: 780px;
}

.mixtape-jcard-paper {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 680px;
  background-color: #f4ecdc;
  background-image:
    linear-gradient(180deg, rgba(255, 251, 240, 0.72), rgba(240, 230, 210, 0.8)),
    url("../assets/mixtape/paper-jcard.jpg?v=5.8&b=20261129nerds60live3");
  background-size: cover;
  color: #1e2430;
  border-radius: 6px;
  box-shadow:
    0 24px 52px rgba(0, 0, 0, 0.58),
    0 2px 6px rgba(0, 0, 0, 0.32),
    inset 0 0 0 1px rgba(120, 96, 62, 0.28);
  overflow: visible;
}

.mixtape-jcard-spine-band {
  border-radius: 6px 6px 0 0;
  overflow: hidden;
}

.mixtape-jcard-tricolor {
  display: flex;
  align-items: stretch;
  height: 36px;
  font-weight: 800;
  font-size: 0.96rem;
  letter-spacing: 0.04em;
  color: #fff;
}

.mixtape-jcard-tricolor .tri-a {
  flex: 1 1 56%;
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.mixtape-jcard-tricolor .tri-diag {
  width: 24px;
  transform: skewX(-18deg);
  margin: 0 -6px;
  z-index: 2;
}

.mixtape-jcard-tricolor .tri-b {
  flex: 0 0 34%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 16px;
}

.mixtape-jcard-spine-write {
  padding: 12px 18px 10px;
  text-align: center;
  font-family: "Architects Daughter", cursive, sans-serif;
}

.mixtape-jcard-spine-title {
  font-size: clamp(1.22rem, 2.5vw, 1.55rem);
  font-weight: 700;
  line-height: 1.25;
}

.mixtape-jcard-spine-sub {
  font-size: 0.85rem;
  opacity: 0.86;
  margin-top: 2px;
}

.mixtape-jcard-greeting {
  margin: 6px auto 0;
  max-width: 520px;
  font-size: 0.94rem;
  font-style: italic;
  opacity: 0.92;
}

.mixtape-jcard-crease {
  height: 7px;
  background: linear-gradient(180deg, rgba(64, 44, 22, 0.26), rgba(255, 255, 255, 0.5) 55%, rgba(64, 44, 22, 0.14));
  border-top: 1px solid rgba(55, 38, 18, 0.22);
}

.mixtape-jcard-crease-mid {
  margin: 10px 0;
}

.mixtape-jcard-brand-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 18px 6px;
  font-family: "JetBrains Mono", monospace;
}

.mixtape-jcard-brand-left {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.mixtape-jcard-brand-spec {
  font-size: 0.68rem;
  color: #475569;
  font-weight: 700;
}

.mixtape-jcard-brand-model {
  font-weight: 800;
  font-size: 0.98rem;
  color: #111827;
}

.mixtape-jcard-inner-frame {
  margin: 4px 14px 12px;
  padding: 10px 14px;
  border: 2px solid #9e2a25;
  border-radius: 6px;
  background: rgba(255, 252, 245, 0.35);
}

.mixtape-jcard-side-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.mixtape-jcard-side-head h4 {
  margin: 0;
  font-size: 0.88rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #1f2937;
}

.mixtape-side-play-chip {
  min-height: 36px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(22, 59, 122, 0.32);
  background: rgba(22, 59, 122, 0.09);
  color: #163b7a;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  touch-action: manipulation;
}

.mixtape-side-play-chip:hover {
  background: rgba(22, 59, 122, 0.18);
}

.mixtape-jcard-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mixtape-jcard-row {
  position: relative;
  display: block;
  min-height: 44px;
  padding: 5px 6px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.22);
  overflow: visible;
  transition: background 0.16s ease;
}

.mixtape-jcard-row:hover,
.mixtape-jcard-row:focus-within {
  z-index: 65;
}

.mixtape-jcard-row.is-flipped {
  z-index: 20;
  border-bottom-color: transparent;
  padding-top: 6px;
  padding-bottom: 8px;
}

.mixtape-jcard-row.is-flipped:hover,
.mixtape-jcard-row.is-flipped:focus-within {
  z-index: 65;
}

.mixtape-jcard-row.has-note {
  cursor: pointer;
}

.mixtape-jcard-row.has-note:not(.is-flipped):focus-within,
.mixtape-jcard-row.has-note:not(.is-flipped).is-note-open {
  z-index: 65;
  background: rgba(245, 158, 11, 0.14);
  border-radius: 4px;
}

@media (hover: hover) {
  .mixtape-jcard-row.has-note:not(.is-flipped):hover {
    z-index: 65;
    background: rgba(245, 158, 11, 0.14);
    border-radius: 4px;
  }
}

.mixtape-jcard-row.is-playing:not(.is-flipped) {
  background: linear-gradient(90deg, rgba(253, 224, 71, 0.44), rgba(254, 240, 138, 0.3));
  border-radius: 4px;
}

.mixtape-row-face-front {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
}

.mixtape-jcard-empty-row {
  padding: 10px 6px;
  font-family: "Architects Daughter", cursive, sans-serif;
  font-size: 0.92rem;
  opacity: 0.75;
  border-bottom: 1px solid rgba(30, 41, 59, 0.16);
}

.mixtape-row-play-btn,
.mixtape-row-xray-btn {
  flex: 0 0 auto;
  width: 38px;
  min-width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(30, 41, 59, 0.22);
  background: rgba(255, 255, 255, 0.78);
  color: #111827;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.mixtape-row-play-btn.is-playing {
  background: #d97706;
  border-color: #92400e;
  color: #fff;
}

.mixtape-row-ink-wrap {
  flex: 1 1 auto;
  min-width: 0;
  font-family: "Architects Daughter", cursive, sans-serif;
}

.mixtape-row-flip-trigger {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  padding: 4px 6px;
  margin: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.mixtape-row-flip-trigger:focus-visible {
  outline: 2px solid #0284c7;
  outline-offset: 1px;
  background: rgba(2, 132, 199, 0.08);
}

@media (hover: hover) {
  .mixtape-row-flip-trigger:hover {
    background: rgba(22, 59, 122, 0.07);
  }
  .mixtape-row-flip-trigger:hover .mixtape-row-flip-cue {
    opacity: 0.92;
    transform: scale(1.08);
  }
}

.mixtape-row-mainline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  font-size: 1rem;
  line-height: 1.3;
}

.mixtape-row-title-run {
  min-width: 0;
  flex: 1 1 auto;
  word-break: break-word;
}

.mixtape-row-num {
  font-weight: 700;
  margin-right: 4px;
}

.mixtape-row-flip-cue {
  flex: 0 0 auto;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0.42;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.mixtape-row-dur {
  margin-left: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  opacity: 0.72;
}

.mixtape-row-note-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(180, 83, 9, 0.38);
  background: rgba(254, 243, 199, 0.88);
  color: #78350f;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.mixtape-row-note-badge:hover,
.mixtape-jcard-row.has-note.is-note-open .mixtape-row-note-badge {
  background: #fde68a;
  border-color: #b45309;
  transform: scale(1.06);
}

.mixtape-row-note-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: min(380px, calc(100% - 12px));
  max-width: calc(100vw - 44px);
  padding: 10px 14px;
  border-radius: 10px;
  background: #fdf8ec;
  border: 1.5px solid #b45309;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45);
  color: #1e2430;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 75;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.mixtape-row-note-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 7px 7px 0 7px;
  border-style: solid;
  border-color: #b45309 transparent transparent transparent;
}

.mixtape-jcard-row.has-note:not(.is-flipped):focus-within .mixtape-row-note-tooltip,
.mixtape-jcard-row.has-note:not(.is-flipped).is-note-open .mixtape-row-note-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mixtape-jcard-row.has-note:not(.is-flipped).is-note-open .mixtape-row-note-tooltip {
  pointer-events: auto;
}

@media (hover: hover) {
  .mixtape-jcard-row.has-note:not(.is-flipped):hover .mixtape-row-note-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
}

.mixtape-row-note-tooltip-head {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #92400e;
  margin-bottom: 4px;
}

.mixtape-row-note-tooltip-body {
  margin: 0;
  font-family: "Architects Daughter", cursive, sans-serif;
  font-size: 0.95rem;
  line-height: 1.38;
  word-break: break-word;
}

.mixtape-row-note-tooltip-foot {
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px dashed rgba(180, 83, 9, 0.34);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  color: #78350f;
}

@keyframes mixtapeRowFlipIn {
  0% {
    opacity: 0.25;
    transform: perspective(900px) rotateX(-86deg);
  }
  100% {
    opacity: 1;
    transform: perspective(900px) rotateX(0deg);
  }
}

@keyframes mixtapeRowFlipBack {
  0% {
    opacity: 0.25;
    transform: perspective(900px) rotateX(86deg);
  }
  100% {
    opacity: 1;
    transform: perspective(900px) rotateX(0deg);
  }
}

.mixtape-row-face-back {
  display: none;
}

.mixtape-jcard-row.is-flipped .mixtape-row-face-front,
.mixtape-jcard-row.is-flipped .mixtape-row-note-tooltip {
  display: none;
}

.mixtape-jcard-row.is-flipped .mixtape-row-face-back {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(145deg, #171b24, #0f131b);
  border: 1px solid rgba(245, 158, 11, 0.44);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  overflow: visible;
  animation: mixtapeRowFlipIn 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.mixtape-jcard-row.is-unflipping .mixtape-row-face-front {
  animation: mixtapeRowFlipBack 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .mixtape-jcard-row.is-flipped .mixtape-row-face-back,
  .mixtape-jcard-row.is-unflipping .mixtape-row-face-front {
    animation: none;
  }
}

.mixtape-row-back-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mixtape-row-back-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 200px;
}

.mixtape-row-back-eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fbbf24;
}

.mixtape-row-back-track {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #f8fafc;
  overflow-wrap: anywhere;
}

.mixtape-row-unflip-btn {
  min-height: 36px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 224, 178, 0.36);
  background: rgba(255, 255, 255, 0.09);
  color: #fde68a;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-size: 0.76rem;
  cursor: pointer;
  touch-action: manipulation;
  flex: 0 0 auto;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.mixtape-row-unflip-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(253, 230, 138, 0.7);
}

.mixtape-row-back-players {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  overflow: visible;
}

.mixtape-row-player-btn {
  min-height: 38px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  touch-action: manipulation;
  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;
}

.mixtape-row-player-btn.is-spotify {
  border-color: rgba(29, 185, 84, 0.52);
}

.mixtape-row-player-btn.is-spotify:hover,
.mixtape-row-player-btn.is-spotify.is-active {
  background: rgba(29, 185, 84, 0.25);
  border-color: #1db954;
  color: #ecfdf5;
}

.mixtape-row-player-btn.is-apple {
  border-color: rgba(250, 36, 60, 0.52);
}

.mixtape-row-player-btn.is-apple:hover,
.mixtape-row-player-btn.is-apple.is-active {
  background: rgba(250, 36, 60, 0.26);
  border-color: #fa243c;
  color: #fff1f2;
}

.mixtape-row-player-btn.is-youtube {
  border-color: rgba(255, 46, 46, 0.52);
}

.mixtape-row-player-btn.is-youtube:hover,
.mixtape-row-player-btn.is-youtube.is-active {
  background: rgba(255, 46, 46, 0.26);
  border-color: #ff4444;
  color: #fef2f2;
}

.mixtape-row-back-login-note {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.74rem;
  line-height: 1.38;
  color: #cbd5e1;
}

@media (hover: hover) and (pointer: fine) and (min-width: 761px) {
  .mixtape-row-back-login-note {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

.mixtape-row-embed-slot {
  border-radius: 10px;
  overflow: hidden;
  background: #090d14;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.mixtape-row-embed-slot.hidden {
  display: none;
}

.mixtape-row-embed-iframe {
  display: block;
  width: 100%;
  border: 0;
}

.mixtape-row-embed-iframe.is-youtube {
  aspect-ratio: 16 / 9;
  max-height: 240px;
  min-height: 180px;
  background: #000;
}

.mixtape-row-embed-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 11px;
  background: #111827;
  color: #cbd5e1;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.76rem;
}

.mixtape-row-embed-footer a {
  color: #38bdf8;
  font-weight: 600;
  text-decoration: none;
}

.mixtape-row-embed-footer a:hover {
  text-decoration: underline;
}

.mixtape-row-embed-msg {
  padding: 12px 14px;
  text-align: center;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #cbd5e1;
}

.mixtape-row-embed-msg a {
  color: #38bdf8;
  font-weight: 600;
}

.mixtape-row-note {
  font-size: 0.82rem;
  font-style: italic;
  opacity: 0.82;
  margin-top: 2px;
}

.mixtape-jcard-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 18px 12px;
  border-radius: 0 0 6px 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: #475569;
  font-weight: 700;
}

.mixtape-desk-pen-dock {
  flex: 0 0 38px;
  width: 38px;
  transform: rotate(7deg);
  filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.45));
}

.mixtape-empty-cta-card {
  max-width: 560px;
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(18, 13, 9, 0.78);
  border: 1px solid rgba(252, 211, 77, 0.35);
  text-align: center;
}

/* Mixtape Studio Builder */
.mixtape-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 16px;
  align-items: start;
}

.mixtape-studio-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.mixtape-studio-card {
  background: rgba(20, 15, 11, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 229, 190, 0.18);
  border-radius: 14px;
  padding: 14px 16px;
  color: #f8f1e5;
  min-width: 0;
}

.mixtape-studio-card h3 {
  margin: 0 0 10px;
  font-size: 0.98rem;
  color: #fde68a;
}

.mixtape-card-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.mixtape-card-title-row h3 {
  margin: 0;
}

.mixtape-saved-row,
.mixtape-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mixtape-saved-row .filter-input,
.mixtape-search-form .filter-input {
  flex: 1 1 200px;
  min-width: 0;
}

.mixtape-search-results-wrap {
  margin-top: 10px;
}

.mixtape-search-hint {
  margin: 4px 0 0;
  font-size: 0.84rem;
  color: rgba(248, 241, 229, 0.74);
}

.mixtape-search-results-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}

.mixtape-search-hit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mixtape-search-hit-info {
  min-width: 0;
  flex: 1 1 180px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.86rem;
}

.mixtape-hit-title {
  line-height: 1.3;
  word-break: break-word;
}

.mixtape-search-hit-info small {
  color: rgba(248, 241, 229, 0.7);
}

.mixtape-search-hit-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mixtape-on-tape-pill,
.mixtape-capacity-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(252, 211, 77, 0.4);
  color: #fde68a;
}

.mixtape-meter-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 5px;
}

.mixtape-meter-bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  margin-bottom: 10px;
}

.mixtape-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  transition: width 0.24s ease;
}

.mixtape-meter-fill.is-b {
  background: linear-gradient(90deg, #38bdf8, #818cf8);
}

.mixtape-studio-tracklist-hint {
  margin: 0 0 10px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(248, 241, 229, 0.74);
}

.mixtape-oak-desk-root .btn-xs {
  min-height: 36px;
  min-width: 36px;
  padding: 5px 10px;
  font-size: 0.78rem;
  border-radius: 8px;
  touch-action: manipulation;
}

.mixtape-oak-desk-root .btn-xs:not(.btn-primary):not(.btn-danger-soft):not(.mixtape-btn-why):not(.mixtape-btn-remove) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 229, 190, 0.24);
  color: #f8f1e5;
}

.mixtape-oak-desk-root .btn-xs:not(.btn-primary):not(.btn-danger-soft):not(.mixtape-btn-why):not(.mixtape-btn-remove):hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(253, 230, 138, 0.55);
}

.mixtape-oak-desk-root .btn-xs:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

.btn-danger-soft,
.mixtape-btn-remove {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(248, 113, 113, 0.55);
  color: #fecaca;
}

.btn-danger-soft:hover:not(:disabled),
.mixtape-btn-remove:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.34);
  border-color: rgba(252, 165, 165, 0.85);
  color: #ffffff;
}

.mixtape-btn-why {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(251, 191, 36, 0.45);
  color: #fde68a;
}

.mixtape-btn-why:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.28);
  border-color: rgba(253, 230, 138, 0.82);
  color: #fffbeb;
}

.mixtape-oak-desk-root .mixtape-btn-full {
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.34);
  color: rgba(226, 232, 240, 0.72);
  cursor: pointer;
}

.mixtape-oak-desk-root .mixtape-btn-full:hover:not(:disabled) {
  background: rgba(148, 163, 184, 0.24);
  border-color: rgba(248, 113, 113, 0.52);
  color: #fecaca;
}

.mixtape-swap-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin: 0 0 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(245, 158, 11, 0.16));
  border: 1px solid rgba(56, 189, 248, 0.65);
  color: #f8fafc;
  font-size: 0.82rem;
  line-height: 1.4;
}

.mixtape-swap-banner-text {
  flex: 1 1 220px;
  min-width: 0;
  font-weight: 600;
}

.mixtape-swap-cancel-btn {
  flex-shrink: 0;
}

.mixtape-studio-side-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 44px;
  transition: outline-color 0.15s ease;
}

.mixtape-studio-side-list.is-drop-target {
  outline: 2px dashed rgba(251, 191, 36, 0.72);
  outline-offset: 4px;
  border-radius: 10px;
}

.mixtape-studio-side-empty {
  padding: 10px;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  font-size: 0.82rem;
  color: rgba(248, 241, 229, 0.74);
  text-align: center;
}

.mixtape-studio-track-item {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.14s ease, border-color 0.22s ease, box-shadow 0.22s ease, opacity 0.14s ease;
}

.mixtape-studio-track-item.is-playing {
  border-color: rgba(252, 211, 77, 0.75);
  background: rgba(245, 158, 11, 0.18);
}

.mixtape-studio-track-item.is-dragging {
  opacity: 0.45;
  border-style: dashed;
  border-color: #fbbf24;
}

.mixtape-studio-track-item.is-drop-before {
  box-shadow: 0 -3px 0 0 #fbbf24;
}

.mixtape-studio-track-item.is-drop-after {
  box-shadow: 0 3px 0 0 #fbbf24;
}

.mixtape-studio-track-item.is-highlight-pulse {
  border-color: #fbbf24;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.35);
}

.mixtape-studio-track-item.is-swap-source {
  border-color: rgba(251, 191, 36, 0.9);
  background: rgba(245, 158, 11, 0.18);
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.28);
}

.mixtape-studio-track-item.is-swap-candidate {
  border-style: dashed;
  border-color: rgba(56, 189, 248, 0.85);
  background: rgba(14, 165, 233, 0.12);
}

.mixtape-studio-track-item.is-drop-swap {
  border-style: dashed;
  border-color: #38bdf8;
  background: rgba(14, 165, 233, 0.22);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.45);
}

.mixtape-oak-desk-root .mixtape-ctrl-btn.is-active {
  background: rgba(245, 158, 11, 0.28);
  border-color: rgba(251, 191, 36, 0.82);
  color: #fffbeb;
}

.mixtape-drag-handle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: -1px;
  color: rgba(253, 230, 138, 0.72);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.mixtape-drag-handle:active {
  cursor: grabbing;
}

.mixtape-studio-track-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.mixtape-studio-track-badge {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(252, 211, 77, 0.2);
  color: #fde68a;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 0.76rem;
}

.mixtape-studio-track-info {
  flex: 1 1 170px;
  min-width: 0;
  font-size: 0.85rem;
}

.mixtape-studio-track-meta {
  display: inline-block;
  margin-left: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  opacity: 0.72;
}

.mixtape-studio-track-btns {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.mixtape-note-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 6px;
}

.mixtape-note-field-icon {
  position: absolute;
  left: 11px;
  font-size: 0.84rem;
  line-height: 1;
  pointer-events: none;
  opacity: 0.82;
}

.mixtape-note-input {
  width: 100%;
  margin-top: 0;
  padding-left: 36px;
  font-size: 0.82rem;
  min-height: 36px;
  box-sizing: border-box;
}

.mixtape-style-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.mixtape-style-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #f8f1e5;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.mixtape-style-chip.is-selected {
  border-color: #fde68a;
  background: rgba(245, 158, 11, 0.22);
}

.mixtape-style-swatch {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.mixtape-style-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: 0.78rem;
}

.mixtape-ink-picker-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.mixtape-ink-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #f8f1e5;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.mixtape-ink-chip.is-selected {
  border-color: #fde68a;
  background: rgba(245, 158, 11, 0.22);
}

.mixtape-ink-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.mixtape-meta-fields {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mixtape-field-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fde68a;
  margin-top: 4px;
}

.mixtape-mini-desk-preview {
  max-width: 340px;
  margin: 0 auto 12px;
}

.mixtape-studio-share-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mixtape-studio-share-actions .btn {
  min-height: 44px;
}

.mixtape-studio-clear-row {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

/* Light Theme Readability inside Studio Inputs */
.mixtape-oak-desk-root .filter-input {
  background: rgba(15, 19, 28, 0.88);
  color: #f8fafc;
  border-color: rgba(255, 232, 198, 0.24);
}

.mixtape-oak-desk-root .filter-input::placeholder {
  color: rgba(226, 232, 240, 0.56);
}

@media (max-width: 900px) {
  .mixtape-studio-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .mixtape-oak-desk-root {
    padding: 12px 10px calc(22px + env(safe-area-inset-bottom, 0px));
    border-radius: 14px;
  }
  .mixtape-closed-pen-beside,
  .mixtape-desk-pen-dock,
  .mixtape-open-empty-case {
    display: none;
  }
  .mixtape-jcard-inner-frame {
    margin: 4px 8px 10px;
    padding: 8px 9px;
  }
  .mixtape-row-play-btn,
  .mixtape-row-xray-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }
  .mixtape-style-picker-grid,
  .mixtape-studio-share-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Mixtape Spotify Export Button & Instant Hover Tooltip */
.mixtape-open-desk-actions,
.mixtape-studio-preview-card,
.mixtape-studio-share-actions {
  overflow: visible;
}

.mixtape-spotify-btn-wrap {
  position: relative;
  display: inline-flex;
  max-width: 100%;
}

.mixtape-studio-share-actions .mixtape-spotify-btn-wrap {
  grid-column: 1 / -1;
  width: 100%;
}

.mixtape-spotify-export-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.mixtape-studio-share-actions .mixtape-spotify-export-btn {
  width: 100%;
}

.mixtape-spotify-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.96);
  color: #f8fafc;
  border: 1px solid rgba(29, 185, 84, 0.72);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  width: max-content;
  max-width: min(290px, 82vw);
  text-align: center;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.52);
  z-index: 40;
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
}

.mixtape-spotify-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: rgba(29, 185, 84, 0.72) transparent transparent transparent;
}

.mixtape-spotify-btn-wrap:hover .mixtape-spotify-tooltip,
.mixtape-spotify-btn-wrap:focus-within .mixtape-spotify-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* =========================================================
   Universal Artist & Person Profile Overview + Tree Virtual CTA
   ========================================================= */
.at-card-cta.is-virtual-profile {
  border-color: rgba(45, 212, 191, 0.55);
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.16), rgba(16, 185, 129, 0.12));
  color: #5eead4;
}
.at-card-cta.is-virtual-profile:hover {
  border-color: rgba(45, 212, 191, 0.88);
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.28), rgba(16, 185, 129, 0.2));
}
html[data-theme="light"] .at-card-cta.is-virtual-profile {
  background: rgba(13, 148, 136, 0.12);
  color: #0f766e;
  border-color: rgba(13, 148, 136, 0.42);
}

.virtual-profile-overview {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.virtual-profile-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.virtual-profile-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.virtual-profile-section-head h3 {
  margin: 0;
  font-size: 1.02rem;
}

.virtual-profile-bridges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.virtual-profile-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.virtual-profile-link-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px 14px;
  border-radius: 13px;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.22));
  background: var(--bg-elevated, rgba(15, 23, 42, 0.84));
  box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.45);
}

.virtual-profile-link-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.virtual-profile-link-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.96rem;
  min-width: 0;
}

.virtual-profile-link-title strong {
  overflow-wrap: anywhere;
}

.virtual-profile-link-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.virtual-profile-link-meta {
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.35;
}

.virtual-profile-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.virtual-profile-link-actions .btn {
  min-height: 36px;
}

.virtual-profile-mb-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}

.virtual-profile-mb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.18));
  background: var(--bg-elevated, rgba(15, 23, 42, 0.72));
  font-size: 0.84rem;
}

.virtual-profile-mb-title {
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}

.virtual-profile-mb-meta {
  font-size: 0.76rem;
  color: var(--text-muted, #94a3b8);
  white-space: nowrap;
  flex-shrink: 0;
}

.virtual-profile-agent-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 13px;
  border: 1px solid rgba(56, 189, 248, 0.34);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(16, 185, 129, 0.08));
}

.virtual-profile-loading-note {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  font-size: 0.83rem;
  color: var(--text-muted, #94a3b8);
}

html[data-theme="light"] .virtual-profile-link-card,
html[data-theme="light"] .virtual-profile-mb-row {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.14);
  box-shadow: 0 4px 14px -8px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .virtual-profile-agent-banner {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(16, 185, 129, 0.06));
  border-color: rgba(2, 132, 199, 0.28);
}

@media (max-width: 760px) {
  .virtual-profile-links-grid,
  .virtual-profile-mb-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .virtual-profile-link-actions .btn {
    min-height: 44px;
  }
}

.mixtape-spotify-status {
  margin-top: 12px;
  max-width: 680px;
  width: 100%;
  box-sizing: border-box;
}

.mixtape-oak-desk-root .soundiiz-status-banner {
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
}

@media (max-width: 760px), (pointer: coarse) {
  .mixtape-oak-desk-root .mixtape-ctrl-btn,
  .mixtape-oak-desk-root .mixtape-btn-remove,
  .mixtape-oak-desk-root .mixtape-btn-why,
  .mixtape-oak-desk-root .mixtape-swap-cancel-btn,
  .mixtape-oak-desk-root .mixtape-search-hit-actions .btn-xs,
  .mixtape-row-note-badge {
    min-height: 44px;
    min-width: 44px;
  }
  .mixtape-row-flip-trigger,
  .mixtape-row-player-btn,
  .mixtape-row-unflip-btn {
    min-height: 44px;
  }
}

@media (max-width: 760px) {
  .mixtape-spotify-tooltip {
    max-width: min(260px, 84vw);
  }
  .mixtape-row-note-tooltip {
    width: min(320px, calc(100% - 8px));
    max-width: calc(100vw - 36px);
  }
}

/* =====================================================================
   Optional User Cloud Sync (Google & Magic Link — 100% Voluntary)
   ===================================================================== */
.user-sync-topbar-btn {
  gap: 6px;
  border-color: rgba(56, 189, 248, 0.36);
  background: rgba(14, 165, 233, 0.08);
  color: #bae6fd;
  font-weight: 600;
}

.user-sync-topbar-btn:hover {
  border-color: rgba(56, 189, 248, 0.72);
  background: rgba(14, 165, 233, 0.16);
  color: #ffffff;
}

.user-sync-topbar-btn.is-signed-in {
  border-color: rgba(16, 185, 129, 0.55);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(6, 182, 212, 0.14));
  color: #a7f3d0;
}

.user-sync-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #042f2e;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
}

.user-sync-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  flex-shrink: 0;
}

.user-sync-status-dot.is-syncing {
  background: var(--amber);
  animation: pulseDot 1.1s ease-in-out infinite;
}

.user-sync-status-dot.is-offline {
  background: var(--rose);
}

.user-sync-modal-panel .modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.user-sync-voluntary-box {
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 182, 212, 0.09));
  border: 1px solid rgba(16, 185, 129, 0.38);
  font-size: 0.84rem;
  line-height: 1.48;
  color: var(--text);
}

.user-sync-voluntary-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.user-sync-voluntary-lead {
  margin: 0 0 8px;
  font-weight: 500;
}

.user-sync-voluntary-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.81rem;
}

.user-sync-auth-providers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-sync-google-btn {
  width: 100%;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.24);
  transition: transform 0.12s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.user-sync-google-btn:hover:not(:disabled) {
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.user-sync-google-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.user-sync-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
}

.user-sync-divider::before,
.user-sync-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.user-sync-magic-card {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-sync-magic-card h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.user-sync-magic-card.is-sent {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.08);
  align-items: flex-start;
}

.user-sync-magic-sent-text {
  font-size: 0.85rem;
  line-height: 1.48;
}

.user-sync-magic-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: nowrap;
}

.user-sync-magic-row input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  font-size: 16px;
}

.user-sync-magic-row button {
  min-height: 44px;
  flex-shrink: 0;
  white-space: nowrap;
}

.user-sync-magic-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.user-sync-inventory-card {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.user-sync-inventory-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.user-sync-inventory-stats {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan);
}

.user-sync-account-card {
  padding: 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(16, 185, 129, 0.42);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-sync-account-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.user-sync-account-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #042f2e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 800;
  flex-shrink: 0;
}

.user-sync-account-meta {
  min-width: 0;
  flex: 1;
}

.user-sync-account-name {
  font-weight: 700;
  font-size: 0.96rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-sync-account-email {
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-sync-account-provider {
  font-size: 0.74rem;
  color: var(--emerald);
  font-weight: 600;
  margin-top: 2px;
}

.user-sync-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.1);
  color: #6ee7b7;
}

.user-sync-status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
}

.user-sync-status-row.is-syncing {
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
}

.user-sync-status-row.is-syncing .user-sync-status-indicator {
  background: var(--amber);
  animation: pulseDot 1s ease-in-out infinite;
}

.user-sync-status-row.is-offline {
  background: rgba(244, 63, 94, 0.12);
  color: #fda4af;
}

.user-sync-status-row.is-offline .user-sync-status-indicator {
  background: var(--rose);
}

.user-sync-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-sync-account-actions .btn {
  min-height: 44px;
}

.user-sync-danger-btn {
  border-color: rgba(244, 63, 94, 0.45);
  color: #fda4af;
}

.user-sync-danger-confirm {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(244, 63, 94, 0.55);
  background: rgba(244, 63, 94, 0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-sync-danger-confirm p {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.45;
}

.user-sync-danger-confirm-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-sync-danger-solid-btn {
  background: #e11d48;
  border-color: #f43f5e;
  color: #ffffff;
  font-weight: 700;
  min-height: 44px;
}

.user-sync-alert {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.83rem;
  line-height: 1.45;
  font-weight: 600;
}

.user-sync-alert.is-success {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.48);
  color: #6ee7b7;
}

.user-sync-alert.is-error {
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(244, 63, 94, 0.5);
  color: #fda4af;
}

.user-sync-inline-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
}

.user-sync-inline-banner-copy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1 1 260px;
  min-width: 0;
  font-size: 0.81rem;
  line-height: 1.42;
}

.user-sync-inline-icon {
  flex-shrink: 0;
}

.user-sync-inline-btn {
  min-height: 44px;
  flex-shrink: 0;
}

.user-sync-inline-banner.is-signed-in {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.11);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #d1fae5;
}

.user-sync-inline-banner.is-mixtape {
  padding: 11px 14px;
  border-radius: 12px;
  margin-bottom: 14px;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(56, 189, 248, 0.42);
  color: #e2e8f0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.user-sync-inline-banner.is-mixtape.is-signed-in {
  border-color: rgba(16, 185, 129, 0.56);
  background: rgba(6, 48, 38, 0.88);
  color: #d1fae5;
}

/* Light Theme Overrides for Optional Cloud Sync */
html[data-theme="light"] .user-sync-topbar-btn {
  background: rgba(14, 116, 144, 0.09);
  border-color: rgba(14, 116, 144, 0.35);
  color: #0e7490;
}

html[data-theme="light"] .user-sync-topbar-btn:hover {
  background: rgba(14, 116, 144, 0.16);
  border-color: rgba(14, 116, 144, 0.65);
  color: #0f172a;
}

html[data-theme="light"] .user-sync-topbar-btn.is-signed-in {
  background: rgba(16, 185, 129, 0.13);
  border-color: rgba(4, 120, 87, 0.42);
  color: #065f46;
}

html[data-theme="light"] .user-sync-voluntary-badge {
  background: rgba(4, 120, 87, 0.14);
  color: #065f46;
}

html[data-theme="light"] .user-sync-magic-card,
html[data-theme="light"] .user-sync-inventory-card,
html[data-theme="light"] .user-sync-account-card {
  background: #f8fafc;
}

html[data-theme="light"] .user-sync-status-row {
  background: rgba(16, 185, 129, 0.12);
  color: #065f46;
}

html[data-theme="light"] .user-sync-status-row.is-syncing {
  color: #92400e;
}

html[data-theme="light"] .user-sync-status-row.is-offline {
  color: #9f1239;
}

html[data-theme="light"] .user-sync-danger-btn {
  color: #be123c;
  border-color: rgba(190, 18, 60, 0.35);
}

html[data-theme="light"] .user-sync-alert.is-success {
  color: #065f46;
  background: rgba(16, 185, 129, 0.12);
}

html[data-theme="light"] .user-sync-alert.is-error {
  color: #9f1239;
  background: rgba(244, 63, 94, 0.1);
}

html[data-theme="light"] .user-sync-inline-banner.is-signed-in:not(.is-mixtape) {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(4, 120, 87, 0.38);
  color: #065f46;
}

@media (max-width: 520px) {
  .user-sync-magic-row {
    flex-direction: column;
  }
  .user-sync-magic-row button {
    width: 100%;
  }
  .user-sync-inline-btn {
    width: 100%;
  }
}

/* ============================================================================
   Artist, Album & Track Stories, Podcasts & Video Interviews (v6.0)
   ============================================================================ */

.artist-stories-box,
.artist-stories-podcasts-box,
.artist-stories-videos-box {
  border-color: rgba(56, 189, 248, 0.34);
  margin-bottom: 14px;
}

.artist-stories-podcasts-box {
  border-color: rgba(167, 139, 250, 0.38);
}

.artist-stories-videos-box {
  border-color: rgba(244, 63, 94, 0.36);
}

.story-section-lead {
  margin: 0 0 12px;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.48;
}

.story-context-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.artist-stories-list {
  display: grid;
  gap: 10px;
}

.artist-story-card {
  padding: 12px 14px;
  border-radius: 11px;
  background: var(--bg-soft, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.artist-story-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.story-type-pill,
.story-scope-pill,
.story-show-pill,
.story-video-pill,
.story-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  max-width: 100%;
}

.story-type-pill {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.36);
  color: #7dd3fc;
}

.story-show-pill {
  background: rgba(167, 139, 250, 0.16);
  border: 1px solid rgba(167, 139, 250, 0.38);
  color: #ddd6fe;
}

.story-video-pill {
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(244, 63, 94, 0.38);
  color: #fda4af;
}

.story-scope-pill.is-track,
.story-scope-pill.is-album {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.36);
  color: #6ee7b7;
}

.story-scope-pill.is-artist {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: var(--text-muted);
}

.story-date-pill,
.story-src-label {
  font-size: 0.73rem;
  color: var(--text-dim);
}

.artist-story-heading {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.38;
}

.artist-story-text {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.artist-story-text.is-quote {
  color: var(--text);
  font-style: italic;
  border-left: 3px solid rgba(56, 189, 248, 0.55);
  padding-left: 10px;
}

.artist-story-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.story-link-btn,
.story-yt-toggle-btn {
  min-height: 36px;
  touch-action: manipulation;
}

.artist-stories-more {
  margin-top: 10px;
}

.artist-stories-more > summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cyan);
  padding: 6px 2px;
  touch-action: manipulation;
}

.story-yt-embed-slot {
  margin-top: 8px;
}

.story-yt-embed-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #020617;
}

.story-yt-embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

html[data-theme="light"] .artist-story-card {
  background: #f8fafc;
}

html[data-theme="light"] .story-type-pill {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(2, 132, 199, 0.34);
  color: #0369a1;
}

html[data-theme="light"] .story-show-pill {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(109, 40, 217, 0.32);
  color: #5b21b6;
}

html[data-theme="light"] .story-video-pill {
  background: rgba(225, 29, 72, 0.11);
  border-color: rgba(190, 18, 60, 0.32);
  color: #9f1239;
}

html[data-theme="light"] .story-scope-pill.is-track,
html[data-theme="light"] .story-scope-pill.is-album {
  background: rgba(5, 150, 105, 0.12);
  border-color: rgba(4, 120, 87, 0.34);
  color: #065f46;
}

html[data-theme="light"] .artist-stories-more > summary {
  color: #0369a1;
}

@media (max-width: 640px), (pointer: coarse) {
  .story-link-btn,
  .story-yt-toggle-btn,
  .artist-stories-more > summary {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}
