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

[hidden] {
  display: none !important;
}

/* ── CSS Variables ───────────────────────────────────────────────────────────── */
:root {
  --bg: #f6f5f0;
  --bg-2: #eeece5;
  --surface: #ffffff;
  --surface-2: #f0efe8;
  --border: #dddbd2;
  --text: #18181a;
  --text-2: #6b6860;
  --text-3: #b0aea5;
  --accent: #b45309;
  --accent-fg: #ffffff;
  --accent-subtle: #fef3c7;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 6px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12), 0 12px 40px rgba(0, 0, 0, 0.08);
}

[data-theme='dark'] {
  --bg: #1c1c1e;
  --bg-2: #242426;
  --surface: #2c2c2e;
  --surface-2: #363638;
  --border: #3a3a3c;
  --text: #f0f0ed;
  --text-2: #8a8880;
  --text-3: #4a4845;
  --accent: #d97706;
  --accent-fg: #ffffff;
  --accent-subtle: #1c1200;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.5), 0 6px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.6), 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ── Base ────────────────────────────────────────────────────────────────────── */
html {
  color-scheme: light;
}

[data-theme='dark'] {
  color-scheme: dark;
}

body {
  font-family:
    'DM Sans',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Hebrew font overrides ───────────────────────────────────────────────────── */
:lang(he) body,
:lang(he) input,
:lang(he) select,
:lang(he) button {
  font-family:
    'Rubik',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}

:lang(he) .desc-title {
  font-family: 'Secular One', sans-serif;
  font-weight: 400;
  letter-spacing: 0;
}

/* Site header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: var(--bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.host-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
  transition: border-color 0.15s;
}

.host-avatar:hover {
  border-color: var(--accent);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.brand-title {
  font-family: 'Secular One', sans-serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0;
  line-height: 1.2;
}

.brand-meta {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.brand-host {
  font-size: 0.7rem;
  color: var(--text-2);
  font-weight: 400;
  line-height: 1.2;
}

.brand-sep {
  font-size: 0.65rem;
  color: var(--text-3);
}

.brand-schedule {
  font-size: 0.7rem;
  color: var(--text-2);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.brand-station {
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.15s;
}

.brand-station:hover {
  opacity: 0.75;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.lang-btn {
  min-width: 40px;
  height: 32px;
  padding: 0 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
  letter-spacing: 0.03em;
}

.lang-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* ── Toolbar ─────────────────────────────────────────────────────────────────── */
.toolbar {
  position: sticky;
  top: 60px;
  z-index: 90;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1.5rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.search-wrap {
  flex: 0 1 320px;
  min-width: 160px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-3);
  pointer-events: none;
  flex-shrink: 0;
}

.search-input {
  width: 100%;
  height: 38px;
  padding-left: 2.3rem;
  padding-right: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 300;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  margin: 0;
  padding: 4px 0;
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  display: none;
}

.search-suggestions.open {
  display: block;
}

.search-suggestions li {
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.1s;
}

.search-suggestions li:hover,
.search-suggestions li[aria-selected='true'] {
  background: var(--accent-subtle);
  color: var(--accent);
}

.search-suggestions li mark {
  background: none;
  color: var(--accent);
  font-weight: 700;
}

.search-kbd {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  pointer-events: none;
  line-height: 1.6;
  transition: opacity 0.15s;
}

.search-input:focus ~ .search-kbd,
.search-wrap:has(.search-suggestions.open) .search-kbd {
  opacity: 0;
}

[dir='rtl'] .search-kbd {
  right: auto;
  left: 0.5rem;
}

.search-input::placeholder {
  color: var(--text-3);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

/* RTL: flip search icon and input padding */
[dir='rtl'] .search-icon {
  left: auto;
  right: 0.7rem;
}

[dir='rtl'] .search-input {
  padding-left: 0.75rem;
  padding-right: 2.1rem;
}

.filter-select {
  height: 38px;
  min-width: 0;
  padding: 0 1.8rem 0 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%238a8880' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
}

[dir='rtl'] .filter-select {
  background-position: left 0.6rem center;
  padding-right: 0.75rem;
  padding-left: 1.8rem;
}

/* Custom triggers don't use the background-image arrow — reset RTL padding */
[dir='rtl'] .decade-trigger,
[dir='rtl'] .artist-trigger,
[dir='rtl'] .sort-trigger {
  padding-left: 0.75rem;
}

.filter-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

/* ── Artist custom picker ─────────────────────────────────────────────────── */
.artist-picker {
  position: relative;
}

.artist-trigger {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  background-image: none;
  padding-right: 0.75rem;
  max-width: 160px;
}

.artist-trigger span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artist-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 300;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  margin: 0;
  padding: 4px;
  list-style: none;
  min-width: 160px;
  max-height: 280px;
  overflow-y: auto;
  display: none;
}

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

.artist-dropdown li {
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.1s;
}

.artist-dropdown li:hover,
.artist-dropdown li:focus,
.artist-dropdown li[aria-selected='true'] {
  background: var(--surface-2);
  outline: none;
}

/* ── Sort custom picker ───────────────────────────────────────────────────── */
.sort-picker {
  position: relative;
}

.sort-trigger {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  background-image: none;
  padding-right: 0.75rem;
}

.sort-trigger span {
  flex: 1;
}

.sort-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 300;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  margin: 0;
  padding: 4px;
  list-style: none;
  min-width: 150px;
  display: none;
}

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

.sort-dropdown li {
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text);
  white-space: nowrap;
  transition: background 0.1s;
}

.sort-dropdown li:hover,
.sort-dropdown li:focus,
.sort-dropdown li[aria-selected='true'] {
  background: var(--surface-2);
  outline: none;
}

/* ── Decade custom picker ─────────────────────────────────────────────────── */
.decade-picker {
  position: relative;
}

.decade-trigger {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  background-image: none;
  padding-right: 0.75rem;
}

.decade-trigger span {
  flex: 1;
}

.decade-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 300;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  margin: 0;
  padding: 4px;
  list-style: none;
  min-width: 130px;
  display: none;
}

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

.decade-dropdown li {
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text);
  transition: background 0.1s;
}

.decade-dropdown li:hover,
.decade-dropdown li:focus,
.decade-dropdown li[aria-selected='true'] {
  background: var(--surface-2);
  outline: none;
}

.decade-badge-opt {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.refresh-btn {
  height: 38px;
  padding: 0 1rem;
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition:
    border-color 0.15s,
    color 0.15s,
    background 0.15s;
  flex-shrink: 0;
}

.refresh-btn::before {
  content: '↻';
  font-size: 0.95rem;
  line-height: 1;
}

#surprise-btn::before {
  content: none;
}

.refresh-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
}

.refresh-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Results bar ─────────────────────────────────────────────────────────────── */
.results-bar {
  padding: 0.4rem 1.5rem;
  font-size: 0.75rem;
  color: var(--text-2);
}

/* ── New this week toast ─────────────────────────────────────────────────────── */
.new-toast {
  position: fixed;
  bottom: 5.5rem;
  right: 1.25rem;
  z-index: 400;
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: toast-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.new-toast.hiding {
  animation: toast-out 0.3s ease-in both;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
}

.new-toast-cover {
  width: 80px;
  height: 80px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-2);
  align-self: stretch;
}

.new-toast-body {
  flex: 1;
  padding: 0.6rem 0.75rem 0.6rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.new-toast-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.1rem;
}

.new-toast-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: badge-pulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}

.new-toast-artist {
  font-size: 0.7rem;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.new-toast-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Playfair Display', Georgia, serif;
}

.new-toast-jump {
  margin-top: 0.4rem;
  align-self: flex-start;
  background: var(--accent);
  color: var(--accent-fg);
  border: none;
  border-radius: 5px;
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: opacity 0.15s;
}

.new-toast-jump:hover {
  opacity: 0.85;
}

.new-toast-close {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 0.7rem;
  line-height: 1;
  padding: 0.15rem;
  transition: color 0.15s;
}

.new-toast-close:hover {
  color: var(--text);
}

/* ── Albums grid ─────────────────────────────────────────────────────────────── */
#albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  max-width: 1600px;
  margin: 0 auto;
}

/* ── Album card ──────────────────────────────────────────────────────────────── */
.album-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
  cursor: default;
  display: flex;
  flex-direction: column;
}

.album-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

@keyframes card-highlight {
  0% {
    box-shadow:
      0 0 0 0px var(--accent),
      0 0 0 0px color-mix(in srgb, var(--accent) 30%, transparent);
    transform: scale(1);
  }
  8% {
    box-shadow:
      0 0 0 4px var(--accent),
      0 0 22px 8px color-mix(in srgb, var(--accent) 35%, transparent);
    transform: scale(1.025);
  }
  20% {
    box-shadow:
      0 0 0 4px var(--accent),
      0 0 22px 8px color-mix(in srgb, var(--accent) 35%, transparent);
    transform: scale(1.025);
  }
  75% {
    box-shadow:
      0 0 0 4px var(--accent),
      0 0 18px 6px color-mix(in srgb, var(--accent) 25%, transparent);
    transform: scale(1);
  }
  100% {
    box-shadow: none;
    transform: scale(1);
  }
}

.album-card.highlight {
  animation: card-highlight 4s ease-out forwards;
  z-index: 1;
  position: relative;
}

/* ── Cover ───────────────────────────────────────────────────────────────────── */
.cover-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface-2);
  cursor: zoom-in;
}

.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--surface-2);
  transition: transform 0.3s ease;
}

.album-card:hover .cover-img {
  transform: scale(1.04);
}

/* Expand button overlay */
.cover-expand {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  border: none;
  cursor: zoom-in;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  padding: 0;
}

.cover-expand svg {
  opacity: 0;
  color: #fff;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
  transition:
    opacity 0.2s,
    transform 0.2s;
  transform: scale(0.85);
}

.cover-wrap:hover .cover-expand {
  background: rgba(0, 0, 0, 0.35);
}

.cover-wrap:hover .cover-expand svg {
  opacity: 1;
  transform: scale(1);
}

/* ── Lightbox ─────────────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lightbox-frame {
  position: relative;
  z-index: 1;
  max-width: min(90vw, 680px);
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  display: block;
  transition: transform 0.25s ease;
}

.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition:
    background 0.15s,
    transform 0.1s;
  z-index: 2;
}

.lightbox-close:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.08);
}

.decade-badge {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.4;
  font-family: 'DM Sans', sans-serif;
}

[dir='rtl'] .decade-badge {
  right: auto;
  left: 0.5rem;
}

@keyframes badge-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(180, 83, 9, 0.7);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 7px rgba(180, 83, 9, 0);
  }
}

@keyframes badge-shine {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

.new-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.4;
  font-family: 'DM Sans', sans-serif;
  color: var(--accent-fg);
  text-transform: uppercase;
  background: linear-gradient(
    100deg,
    var(--accent) 0%,
    var(--accent) 40%,
    #f97316 50%,
    var(--accent) 60%,
    var(--accent) 100%
  );
  background-size: 200% auto;
  animation:
    badge-pulse 1.6s ease-in-out infinite,
    badge-shine 2.4s linear infinite;
}

[dir='rtl'] .new-badge {
  left: auto;
  right: 0.5rem;
}

/* ── Card body ───────────────────────────────────────────────────────────────── */
.card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.track-artist {
  font-size: 0.75rem;
  color: var(--text-2);
  margin: 0;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Player ──────────────────────────────────────────────────────────────────── */
.player {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s,
    transform 0.1s;
}

.play-btn:hover {
  background: color-mix(in srgb, var(--accent) 85%, white);
  filter: brightness(1.1);
}

.play-btn:active {
  transform: scale(0.93);
}

.play-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.player-track {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.progress-wrap {
  position: relative;
  height: 16px;
  display: flex;
  align-items: center;
}

.player-range {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent) var(--progress, 0%),
    var(--border) var(--progress, 0%),
    var(--border) 100%
  );
}

.player-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: transform 0.1s;
}

.player-range::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

.player-range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
}

.player-times {
  display: flex;
  gap: 0.25rem;
  font-size: 0.7rem;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  font-family: 'DM Sans', sans-serif;
}

.time-current {
  color: var(--text);
}

.time-sep {
  color: var(--text-3);
}

/* ── Card footer ─────────────────────────────────────────────────────────────── */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.card-meta span {
  font-size: 0.7rem;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

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

.action-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-subtle);
}

/* brief "copied" feedback */
.action-btn.copied {
  color: #16a34a;
  border-color: #16a34a;
  background: rgba(22, 163, 74, 0.1);
}

.share-btn {
  position: relative;
}

.share-btn.copied svg {
  display: none;
}

.share-btn.copied::after {
  content: '✓';
  font-size: 11px;
  font-weight: 700;
  color: #16a34a;
  line-height: 1;
}

.share-btn[title]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 0.65rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}

.share-btn.copied::before {
  content: 'Copied!';
  opacity: 1;
}

.download-link {
  text-decoration: none;
}

/* ── Bio modal ───────────────────────────────────────────────────────────────── */
.bio-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.bio-modal.open {
  opacity: 1;
  pointer-events: all;
}

.bio-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.bio-panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  width: 420px;
  max-width: calc(100vw - 2rem);
  padding: 2.25rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
  transform: translateY(12px) scale(0.97);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bio-modal.open .bio-panel {
  transform: translateY(0) scale(1);
}

.bio-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

.bio-close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.bio-photo-wrap {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
  flex-shrink: 0;
}

.bio-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bio-name {
  font-family: 'Secular One', 'Playfair Display', sans-serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text);
  margin: 0;
}

.bio-text {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.65;
  margin: 0;
}

.bio-wiki {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    background 0.15s,
    color 0.15s;
  margin-top: 0.25rem;
}

.bio-wiki:hover {
  background: var(--accent);
  color: var(--accent-fg);
}

/* ── Description modal ───────────────────────────────────────────────────────── */
.desc-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.desc-modal.open {
  opacity: 1;
  pointer-events: all;
}

.desc-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.desc-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 92vw);
  max-height: 80vh;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px);
  transition: transform 0.2s ease;
}

.desc-modal.open .desc-panel {
  transform: translateY(0);
}

.desc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.desc-album-info {
  min-width: 0;
}

.desc-artist {
  font-size: 0.72rem;
  color: var(--text-2);
  font-weight: 500;
  margin: 0 0 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.desc-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

.desc-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    background 0.15s,
    color 0.15s;
}

.desc-close:hover {
  background: var(--border);
  color: var(--text);
}

.desc-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.desc-loading {
  color: var(--text-2);
  font-size: 0.875rem;
  text-align: center;
  padding: 1rem 0;
}

/* Rendered description HTML styles */
.desc-body p {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.5;
}

.desc-body strong {
  font-weight: 600;
  color: var(--text);
}

.desc-body ol,
.desc-body ul {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}

.desc-body li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  line-height: 1.4;
}

.desc-body li:last-child {
  border-bottom: none;
}

.desc-body li::before {
  content: '♪';
  color: var(--accent);
  flex-shrink: 0;
  font-size: 0.75rem;
}

.desc-body a {
  color: var(--accent);
  text-decoration: none;
}

.desc-body a:hover {
  text-decoration: underline;
}

/* ── Related albums strip ────────────────────────────────────────────────────── */
.desc-related {
  border-top: 1px solid var(--border);
  padding: 0.9rem 1.25rem 1rem;
  flex-shrink: 0;
}

.desc-related-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-2);
  margin-bottom: 0.65rem;
}

.desc-related-strip {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.desc-related-strip::-webkit-scrollbar {
  display: none;
}

.related-thumb {
  flex-shrink: 0;
  width: 72px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: center;
}

.related-thumb img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition:
    opacity 0.15s,
    transform 0.15s;
  background: var(--surface-2);
}

.related-thumb:hover img {
  opacity: 0.8;
  transform: scale(1.04);
}

.related-thumb span {
  font-size: 0.65rem;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 72px;
}

.album-card.highlight {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius);
  transition: outline 0.3s;
}

/* ── Now playing bar ─────────────────────────────────────────────────────────── */
.now-playing-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body.has-player {
  padding-bottom: 76px;
}

.np-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0 1.5rem;
  height: 72px;
}

.np-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 1 220px;
  min-width: 0;
}

.np-cover {
  width: 46px;
  height: 46px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-2);
  cursor: pointer;
  transition: opacity 0.15s;
}

.np-cover:hover {
  opacity: 0.8;
}

.np-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.np-artist {
  font-size: 0.7rem;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.np-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-center {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1 1 0;
  min-width: 0;
}

.np-range {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent) var(--progress, 0%),
    var(--border) var(--progress, 0%),
    var(--border) 100%
  );
}

.np-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: transform 0.1s;
}

.np-range::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

.np-range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
}

.np-times {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.np-times .np-sep {
  color: var(--text-3);
}

.np-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.np-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s,
    transform 0.1s;
  flex-shrink: 0;
}

.np-play-btn:hover {
  filter: brightness(1.1);
}
.np-play-btn:active {
  transform: scale(0.93);
}
.np-play-btn.loading {
  pointer-events: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.play-btn.loading,
.np-play-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}
.play-btn.loading svg,
.np-play-btn.loading svg {
  display: none;
}
.play-btn.loading::after,
.np-play-btn.loading::after {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.np-skip-btn {
  height: 30px;
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition:
    color 0.15s,
    transform 0.1s;
  flex-shrink: 0;
  padding: 0 0.3rem;
}

.np-skip-btn:hover {
  color: var(--text);
}

.np-skip-btn:active {
  transform: scale(0.9);
}

.skip-n {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  font-family: inherit;
}

.np-speed-btn {
  height: 26px;
  min-width: 38px;
  border-radius: 4px;
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.02em;
  padding: 0 0.4rem;
  transition:
    color 0.15s,
    border-color 0.15s,
    background 0.15s;
  flex-shrink: 0;
}

.np-speed-btn:hover {
  color: var(--text);
  border-color: var(--text-2);
}

.np-speed-btn.active {
  color: var(--accent);
  border-color: var(--accent);
}

.np-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
  flex-shrink: 0;
}

.np-close-btn:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--text-2);
}

/* ── Skeleton loading ────────────────────────────────────────────────────────── */
@keyframes shimmer {
  0% {
    background-position: -600px 0;
  }
  100% {
    background-position: 600px 0;
  }
}

.skeleton-card {
  background: var(--surface);
  border-radius: var(--card-radius, 12px);
  overflow: hidden;
  border: 1px solid var(--border);
}

.sk-cover {
  width: 100%;
  aspect-ratio: 1;
}

.sk-body {
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.sk-cover,
.sk-line {
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
}

.sk-artist {
  height: 11px;
  width: 45%;
}
.sk-title {
  height: 14px;
  width: 75%;
}
.sk-player {
  height: 10px;
  width: 100%;
  margin-top: 0.2rem;
}
.sk-meta {
  height: 9px;
  width: 60%;
  opacity: 0.6;
}

/* ── No results ──────────────────────────────────────────────────────────────── */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem;
  color: var(--text-2);
  font-size: 0.95rem;
}

/* ── Load more ───────────────────────────────────────────────────────────────── */
.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.load-more-btn {
  padding: 0.6rem 2.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    border-color 0.15s,
    color 0.15s,
    background 0.15s;
}

.load-more-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
}

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.8rem;
  color: var(--text-3);
  letter-spacing: 0.03em;
}

/* ── Back to top ─────────────────────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 150;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 0.2s,
    transform 0.2s,
    background 0.15s,
    color 0.15s;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--surface-2);
  color: var(--text);
}

body.has-player .back-to-top {
  bottom: calc(76px + 1rem);
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #albums-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    padding: 1rem;
  }

  .toolbar {
    padding: 0.6rem 1rem;
    gap: 0.4rem;
  }

  .site-header {
    padding: 0 1rem;
  }

  .results-bar {
    padding: 0.4rem 1rem;
  }
}

@media (max-width: 560px) {
  #albums-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  /* Toolbar: single row — search fills space, decade fixed, refresh icon */
  .toolbar {
    flex-wrap: nowrap;
    gap: 0.4rem;
    justify-content: flex-start;
  }

  .search-wrap {
    flex: 1 1 0;
    min-width: 0;
  }

  .search-kbd {
    display: none;
  }

  .decade-picker {
    flex: 0 0 106px;
  }

  .decade-trigger {
    width: 106px;
    overflow: hidden;
  }

  .decade-trigger span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .decade-trigger svg {
    flex-shrink: 0;
  }

  .refresh-btn {
    display: none;
  }

  .artist-picker,
  .sort-picker {
    display: none;
  }

  body.has-player .back-to-top {
    bottom: calc(80px + 1rem);
  }

  .card-body {
    padding: 0.75rem;
  }

  .track-title {
    font-size: 0.85rem;
  }

  .player {
    gap: 0.4rem;
  }

  .play-btn {
    width: 28px;
    height: 28px;
  }

  .player-times {
    font-size: 0.65rem;
  }

  /* Now-playing bar: 2-row layout so progress bar stays visible */
  .np-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 0.5rem 1rem;
    gap: 0.4rem 0.75rem;
    align-content: center;
  }

  .np-left {
    flex: 1 1 0;
    min-width: 0;
  }

  .np-right {
    flex-shrink: 0;
    gap: 0.3rem;
  }

  .np-center {
    flex: 0 0 100%;
    order: 3;
    gap: 0;
  }

  .np-times {
    font-size: 0.65rem;
  }

  .np-cover {
    width: 38px;
    height: 38px;
  }

  body.has-player {
    padding-bottom: 80px;
  }
}

@media (max-width: 380px) {
  #albums-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0 0.5rem 0.5rem;
  }

  .card-body {
    padding: 0.5rem;
    gap: 0.4rem;
  }

  .track-artist {
    font-size: 0.65rem;
  }

  .track-title {
    font-size: 0.75rem;
  }

  .card-meta {
    display: none;
  }

  .meta-broadcast,
  .meta-release {
    display: none;
  }
}
