.streams-card .panel-head {
  margin-bottom: 6px;
  padding-bottom: 10px;
  gap: 8px;
  flex-shrink: 0;
}

.streams-card .chart-wrap {
  flex: 1 1 0;
  min-height: 0;
  height: auto;
  width: 100%;
  overflow: visible;
}

.streams-card .chart-wrap svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.streams-card .chart-range {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  background: var(--surface);
}

.playlist-checker {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: var(--bento-pad);
  min-height: 0;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.playlist-checker:hover {
  border-color: var(--border);
}

.playlist-checker:active {
  transform: scale(0.98);
}

/* Pre-existing functional "greyed-out" state hue (#c94a55) */
.playlist-checker.has-new-greyed {
  border-color: color-mix(in srgb, #c94a55 30%, var(--border-soft));
}

.playlist-checker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}

.playlist-checker-head h2 {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: var(--fw-semi);
  letter-spacing: -0.02em;
  color: var(--text);
  text-transform: none;
}

.playlist-manage-btn {
  appearance: none;
  border: 1px solid var(--border-soft);
  background: var(--bg-elev);
  color: var(--text-muted);
  font: inherit;
  font-size: 11px;
  font-weight: var(--fw-semi);
  padding: 7px 11px;
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

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

.playlist-manage-btn:active {
  transform: scale(0.98);
}

.playlist-recap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.playlist-recap-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--bg-elev);
  min-width: 0;
}

.playlist-recap-value {
  font-size: 18px;
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-tight);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

/* Pre-existing functional recap status hues (tracked / greyed / new) —
   semantic state colors, intentionally kept. */
.playlist-recap-value.is-tracked { color: #7eb8a0; }
.playlist-recap-value.is-greyed { color: #b0a48a; }
.playlist-recap-value.is-new { color: #c94a55; }

html[data-theme="light"] .playlist-recap-value.is-tracked { color: #3d8f6e; }
html[data-theme="light"] .playlist-recap-value.is-greyed { color: #8a7a5c; }
html[data-theme="light"] .playlist-recap-value.is-new { color: #b03d48; }

.playlist-recap-label {
  font-size: 10px;
  font-weight: var(--fw-semi);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.playlist-checker .error-inline {
  margin-top: 0;
}

/* .playlist-track-btn base/hover/active/disabled styles live in buttons.css;
   keep only the local spinner positioning and the tracked-state override. */
.playlist-track-btn .spinner {
  position: absolute;
}

.playlist-track-btn.loading .spinner {
  display: inline-block;
}

.playlist-track-btn.is-tracked {
  color: var(--text-muted);
  background: transparent;
  border-color: var(--border-soft);
}

/* ── Count badge (number pill; falls back to a dot when empty) ── */
.notif-badge {
  position: absolute;
  top: 3px;
  right: 2px;
  min-width: 13px;
  height: 12px;
  padding: 0 4px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--danger);
  border: 1.5px solid var(--bg);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  animation: notifBadgeIn 220ms var(--ease-out) both;
}

.notif-badge:empty {
  top: 5px;
  right: 5px;
  min-width: 0;
  width: 6px;
  height: 6px;
  padding: 0;
}

@keyframes notifBadgeIn {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.notif-badge.hidden {
  display: none;
}

/* ── Popup ── */
.icon-pop.notif-pop {
  width: 300px;
  padding: 0;
  max-height: min(56vh, 340px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notif-pop-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-elev);
}

.notif-pop-head .pop-title {
  margin: 0;
  font-size: 10px;
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-faint);
}

.notif-mark-all {
  appearance: none;
  margin: 0;
  padding: 3px 8px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-faint);
  font: inherit;
  font-size: 10px;
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition:
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

.notif-mark-all:hover {
  color: var(--text);
  border-color: var(--border);
}

.notif-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: auto;
  min-height: 0;
  padding: 8px;
  overscroll-behavior: contain;
}

.notif-item {
  position: relative;
  padding: 8px 10px 8px 13px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

.notif-item:hover {
  background: var(--bg-elev);
  border-color: var(--border);
}

.notif-item.is-unread {
  background: var(--bg-elev);
}

.notif-item.is-unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2.5px;
  border-radius: 999px;
  background: var(--danger);
}

.notif-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notif-title {
  margin: 0;
  font-size: 12px;
  font-weight: var(--fw-semi);
  color: var(--text);
  line-height: 1.3;
}

.notif-tag {
  display: inline-block;
  vertical-align: 1px;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #d4a574;
  background: color-mix(in srgb, #d4a574 12%, transparent);
  border: 1px solid color-mix(in srgb, #d4a574 35%, transparent);
}

.notif-text {
  margin: 0;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-time {
  margin: 0;
  font-size: 10px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.notif-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  display: grid;
  place-items: center;
  transition:
    opacity var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
}

.notif-item:hover .notif-delete,
.notif-item:focus-within .notif-delete {
  opacity: 1;
}

@media (hover: none) {
  .notif-delete {
    opacity: 1;
  }
}

.notif-delete:hover {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}

/* Access request actions */
.notif-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.notif-actions button {
  appearance: none;
  font: inherit;
  font-size: 10px;
  font-weight: var(--fw-medium);
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 3px 9px;
  cursor: pointer;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.notif-actions button:hover {
  background: var(--surface-2);
  border-color: var(--focus);
  color: var(--text);
}

.notif-empty {
  margin: 0;
  padding: 16px 12px 18px;
  font-size: 11px;
  color: var(--text-faint);
  text-align: center;
}

.notif-list:empty {
  display: none;
}

.notif-empty.hidden {
  display: none;
}

