/* ── BirdNET Dashboard — Main CSS ─────────────────────────────────────────── */

/* ── Design Tokens (dark theme defaults) ──────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg1: #0c1016;
  --bg2: #141922;
  --bg3: #1d2535;
  --bg4: #27303e;

  /* Text */
  --text1: #e6edf3;
  --text2: #8b949e;
  --text3: #6e7681;

  /* Accent (brand blue from logo) */
  --accent: #4a9eff;
  --accent-light: rgba(74, 158, 255, 0.12);
  --accent-dark: #1f6feb;

  /* Warm orange from logo */
  --orange: #f5922a;
  --orange-light: rgba(245, 146, 42, 0.12);

  /* Separators & shadows */
  --sep: #2e3a48;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);

  /* Status dots */
  --live-dot: #3fb950;
  --night-dot: #8b5cf6;
  --offline-dot: #f85149;

  /* Confidence colors */
  --conf-high: #3fb950;
  --conf-med: #d29922;
  --conf-low: #f85149;

  /* Borders */
  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Layout */
  --header-height: 52px;
  --nav-height: 60px;
  --sidebar-width: 280px;
  --content-max: 1400px;

  /* Transitions */
  --transition: 0.18s ease;
}

/* ── Light Theme ──────────────────────────────────────────────────────────── */
[data-theme="light"] {
  --bg1: #ffffff;
  --bg2: #f6f8fa;
  --bg3: #eaeef2;
  --bg4: #d0d7de;
  --text1: #1f2328;
  --text2: #636c76;
  --text3: #818b98;
  --sep: #d0d7de;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --accent-light: rgba(74, 158, 255, 0.1);
}

/* ── System Theme ─────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: light) {
  [data-theme="system"] {
    --bg1: #ffffff;
    --bg2: #f6f8fa;
    --bg3: #eaeef2;
    --bg4: #d0d7de;
    --text1: #1f2328;
    --text2: #636c76;
    --text3: #818b98;
    --sep: #d0d7de;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --accent-light: rgba(74, 158, 255, 0.1);
  }
}

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

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg1);
  color: var(--text1);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

button {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  background: none;
  border: none;
  color: inherit;
}

img { display: block; max-width: 100%; }

ul, ol { list-style: none; }

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  background: var(--bg3);
  color: var(--text1);
  border: 1px solid var(--sep);
  border-radius: var(--radius-sm);
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

body { overflow-x: hidden; }

/* ── Header ───────────────────────────────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  gap: 12px;
  height: calc(var(--header-height) + env(safe-area-inset-top));
  padding: 0 16px;
  padding-top: env(safe-area-inset-top);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 4%, var(--bg2)) 0%, var(--bg2) 100%);
  box-shadow: inset 0 -1px 0 var(--sep), 0 2px 12px rgba(0,0,0,0.25);
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.header-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 0;
}

.header-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
}

@media (max-width: 600px) {
  .app-header {
    gap: 8px;
    padding: 0 12px;
    padding-top: env(safe-area-inset-top);
    justify-content: space-between;
    height: auto;
  }
  .header-title { font-size: 0.95rem; }
  .header-center { display: none; }
  .header-right { gap: 6px; }
  .weather-widget {
    max-width: none;
    flex-wrap: wrap;
  }
  .weather-temp, .weather-desc {
    white-space: normal;
  }
  .weather-desc { max-width: none; }

  /* List card: wrap body so spectrogram drops to a full-width row below */
  .detection-card.layout-list .card-body {
    flex-wrap: wrap;
  }

  .detection-card.layout-list .card-spectrogram {
    flex-basis: 100%;
    width: 100%;
    height: 32px;
    margin-left: 0;
    margin-right: 0;
    margin-top: 4px;
  }

  /* Let meta-row shrink so names aren't crushed */
  .detection-card.layout-list .card-meta-row {
    flex-shrink: 1;
    min-width: 0;
  }

  .detection-card.layout-list .conf-badge {
    white-space: nowrap;
  }
}

@media (max-width: 520px) {
  .weather-desc,
  .weather-humidity {
    display: none;
  }

  .weather-widget {
    gap: 2px;
  }

  .weather-temp {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text1);
  text-decoration: none;
}

.header-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.header-title {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--text1);
}

/* ── Icon Buttons ─────────────────────────────────────────────────────────── */
.icon-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid transparent;
  color: var(--text2);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  flex-shrink: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.icon-btn:hover, .icon-btn:focus-visible {
  background: var(--bg3);
  color: var(--text1);
  border-color: var(--sep);
}

.icon-btn.active {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Auth button + login modal ───────────────────────────────────────────── */

.auth-btn--active {
  color: var(--accent);
}

.auth-panel {
  max-width: 340px;
  width: calc(100vw - 32px);
}

.auth-body {
  padding: 20px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.auth-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text2);
}

.auth-input {
  background: var(--bg3);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  padding: 8px 10px;
  color: var(--text1);
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.auth-input:focus {
  outline: none;
  border-color: var(--accent);
}

.auth-error {
  font-size: 0.8rem;
  color: var(--conf-low);
  margin: 0 0 12px;
}

.auth-submit-btn {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 9px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.auth-submit-btn:hover { opacity: 0.88; }
.auth-submit-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── Sound Level Bar ──────────────────────────────────────────────────────── */
.sound-level-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.mic-icon {
  width: 13px;
  height: 13px;
  opacity: 0.55;
  flex-shrink: 0;
}

.sound-level-track {
  width: 48px;
  height: 4px;
  background: var(--bg4);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.sound-level-bar {
  height: 100%;
  width: 0%;
  background: var(--live-dot);
  border-radius: 2px;
  transition: width 0.2s ease;
}

/* Mobile: hide sound level bar */
@media (max-width: 767px) {
  .sound-level-wrap { display: none !important; }
}

/* ── Weather Widget ───────────────────────────────────────────────────────── */
.weather-widget {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text2);
  flex-shrink: 0;
}

.weather-icon {
  font-size: 1rem;
  line-height: 1;
}

.weather-temp {
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
}

.weather-desc {
  font-size: 0.75rem;
  color: var(--text3);
  white-space: nowrap;
}

/* ── Live Listen Button ───────────────────────────────────────────────────── */
.listen-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  border: 1px solid var(--sep);
  background: var(--bg2);
  color: var(--text3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  flex-shrink: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.listen-btn:hover { background: var(--accent-light); color: var(--accent); }
.listen-btn.active { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }
.listen-btn svg { width: 13px; height: 13px; pointer-events: none; }

/* ── Status Indicator ─────────────────────────────────────────────────────── */
.status-dot {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  cursor: default;
}

.status-dot .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background var(--transition);
}

.status-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text3);
  white-space: nowrap;
}

.status-live .dot { background: var(--live-dot); box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.2); animation: pulse 2s infinite; }
.status-night .dot { background: var(--night-dot); }
.status-offline .dot { background: var(--offline-dot); }
.status-live .status-label { color: var(--live-dot); }
.status-night .status-label { color: var(--night-dot); }
.status-offline .status-label { color: var(--offline-dot); }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.25); }
  50% { box-shadow: 0 0 0 6px rgba(63, 185, 80, 0); }
}

/* Mobile: hide status label */
@media (max-width: 767px) {
  .status-label { display: none; }
}

/* ── Main Content ─────────────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom));
}

.view-container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 16px;
}

/* ── Bottom Navigation ────────────────────────────────────────────────────── */
.bottom-nav {
  display: flex;
  align-items: stretch;
  background: var(--bg2);
  border-top: 1px solid var(--sep);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 0;
  color: var(--text3);
  text-decoration: none;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 44px;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item span {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav-item.active {
  color: var(--accent);
}

.nav-item.active svg {
  transform: scale(1.15) translateY(-1px);
}

.nav-item:hover {
  color: var(--text1);
}

/* Desktop: move nav to top (wider screens) */
@media (min-width: 768px) {
  .bottom-nav {
    position: static;
    height: auto;
    padding-bottom: 0;
    border-top: none;
    border-bottom: 1px solid var(--sep);
    order: -1; /* above main content */
    background: var(--bg2);
    justify-content: flex-start;
    gap: 0;
  }

  .nav-item {
    flex: 0;
    flex-direction: row;
    padding: 0 16px;
    gap: 6px;
    height: 44px;
    border-bottom: 2px solid transparent;
  }

  .nav-item span { font-size: 0.85rem; }
  .nav-item svg { width: 17px; height: 17px; }

  .nav-item.active {
    border-bottom-color: var(--accent);
    color: var(--accent);
    text-shadow: 0 0 20px rgba(74, 158, 255, 0.4);
  }

  .main-content {
    padding-bottom: 16px;
  }
}

/* ── View Toolbar ─────────────────────────────────────────────────────────── */
.view-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 12px;
  flex-wrap: wrap;
}

.toolbar-spacer { flex: 1; }

.view-mode-btns {
  display: flex;
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  overflow: hidden;
}

.view-mode-btns button {
  padding: 5px 8px;
  border-right: 1px solid var(--sep);
  color: var(--text3);
  background: none;
  transition: background var(--transition), color var(--transition);
}

.view-mode-btns button:last-child { border-right: none; }
.view-mode-btns button.active { background: var(--accent-light); color: var(--accent); }
.view-mode-btns button:hover { background: var(--bg3); color: var(--text1); }
.view-mode-btns button svg { width: 15px; height: 15px; display: block; }

/* ── Stream View ──────────────────────────────────────────────────────────── */
.stream-view {
  display: flex;
  flex-direction: column;
  padding: 12px 16px 16px;
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}

.stream-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 0 10px;
  border-bottom: 1px solid var(--sep);
  margin-bottom: 10px;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.toolbar-view-modes {
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  overflow: hidden;
}

.toolbar-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.toolbar-btn svg { width: 16px; height: 16px; pointer-events: none; }
.toolbar-btn:hover { background: var(--bg3); color: var(--text1); }
.toolbar-btn.active { background: var(--accent-light); color: var(--accent); }

.toolbar-view-modes .toolbar-btn {
  border-right: 1px solid var(--sep);
}
.toolbar-view-modes .toolbar-btn:last-child { border-right: none; }

.toolbar-species-cap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.toolbar-cap-label {
  font-size: 0.75rem;
  color: var(--text3);
  white-space: nowrap;
}

.cap-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 120px;
  height: 4px;
  border-radius: 2px;
  background: var(--bg4);
  outline: none;
  border: none;
  cursor: pointer;
}

.cap-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

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

.cap-slider-value {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  min-width: 30px;
  text-align: center;
}

.toolbar-conf-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text3);
  white-space: nowrap;
}

.conf-slider-value {
  font-weight: 600;
  color: var(--accent);
  min-width: 34px;
  font-size: 0.75rem;
}

.toolbar-sort-label {
  font-size: 0.75rem;
  color: var(--text3);
  white-space: nowrap;
}

.sort-select {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  cursor: pointer;
}

.stream-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 64px 16px;
}

.stream-spinner { }

.stream-loading-text {
  font-size: 0.875rem;
  color: var(--text3);
}

.stream-empty {
  padding: 48px 16px;
  text-align: center;
}

.stream-empty-text {
  font-size: 0.875rem;
  color: var(--text3);
}

/* Single-card navigation */
.single-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 0 12px;
}

.single-counter {
  font-size: 0.8rem;
  color: var(--text3);
  min-width: 60px;
  text-align: center;
}

.single-card-wrap {
  position: relative;
}

/* Full-height transparent hit zones on each side of the card */
.single-img-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 0;
  color: #fff;
  cursor: pointer;
  z-index: 10;
  transition: background var(--transition);
}

.single-img-nav:not(:disabled):hover {
  background: rgba(0, 0, 0, 0.15);
}

.single-img-nav:disabled {
  opacity: 0;
  pointer-events: none;
}

.single-img-prev { left: 0; }
.single-img-next { right: 0; }

/* Arrow icon pill — visible inside the transparent zone */
.single-nav-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition);
}

.single-img-nav:not(:disabled):hover .single-nav-arrow {
  background: rgba(0, 0, 0, 0.75);
}

.single-nav-arrow svg { width: 20px; height: 20px; }

/* Card enter animation */
.card-enter {
  opacity: 0;
  transform: translateY(-8px);
}
.card-enter--active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Desktop: 2-column list view */
@media (min-width: 900px) {
  .stream-view { max-width: none; }

  .detections-grid.view-list {
    grid-template-columns: 1fr;
    gap: 6px;
    width: 100%;
    max-width: clamp(900px, 78vw, 1400px);
    margin: 0 auto;
  }

  .detections-grid.view-single {
    max-width: 920px;
  }

  /* List card stats panel — desktop only */
  .card-list-stats {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-self: center;
  }

  .card-list-stats-row {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .card-daily-count {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
  }

  .card-activity-bars {
    display: flex;
    align-items: flex-end;
    gap: 1px;
    height: 30px;
    width: 100%;
  }

  .card-activity-bar {
    flex: 1;
    min-height: 2px;
    background: var(--bg4);
    border-radius: 1px 1px 0 0;
  }

  .card-activity-bar.active {
    background: var(--accent);
    opacity: 0.6;
  }

  /* Show abs time in list card meta-row on desktop */
  .detection-card.layout-list .card-abs-time { display: inline; }
}

.view-container.calendar-host {
  max-width: none;
  padding: 0;
}

/* Detection Cards ──────────────────────────────────────────────────────────── */
.detections-grid {
  display: grid;
  gap: 8px;
}

.detections-grid.view-list {
  grid-template-columns: 1fr;
  gap: 4px;
}

.detections-grid.view-small-tile {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

.detections-grid.view-large-tile {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.detections-grid.view-single {
  grid-template-columns: 1fr;
  max-width: none;
  margin: 0 -16px; /* break out of stream-view side padding on mobile */
}

/* ── Detection Card (shared) ─────────────────────────────────────────────── */
.detection-card {
  background: var(--bg2);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  position: relative;
  z-index: 1;
}

.detection-card.menu-open { z-index: 9000; }

.detection-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(74, 158, 255, 0.12), 0 2px 8px rgba(0,0,0,0.3);
  transform: translateY(-1px);
}

.detection-card.layout-list:hover {
  transform: none;
  box-shadow: none;
  background: var(--bg3);
}

/* ── List layout ─────────────────────────────────────────────────────────── */

/* Card: photo | body | menu — mobile base */
.detection-card.layout-list {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  overflow: visible;
}

.detection-card.layout-list .card-thumb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
}

/* Mobile body: name + meta stacked vertically */
.detection-card.layout-list .card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.detection-card.layout-list .card-names { min-width: 0; }

.detection-card.layout-list .card-common-name {
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detection-card.layout-list .card-sci-name { font-size: 0.78rem; }

/* Meta: confidence + time side-by-side on mobile */
.detection-card.layout-list .card-meta-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 8px;
  font-size: 0.78rem;
}

.detection-card.layout-list .conf-badge { font-size: 0.73rem; }

.detection-card.layout-list .card-actions { justify-self: end; }
.detection-card.layout-list .card-btn { min-width: 32px; min-height: 36px; }

/* Hidden on mobile — restored on desktop */
.detection-card.layout-list .card-list-stats,
.detection-card.layout-list .card-abs-time,
.detection-card.layout-list .first-heard-badge { display: none; }

/* Spectrogram: compact strip below name+meta inside the body flex column */
.detection-card.layout-list .card-spectrogram {
  display: block;
  width: 100%;
  height: 32px;
  margin-top: 4px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  background: var(--bg3);
  cursor: pointer;
  border: 1px solid var(--sep);
}

/* ── Desktop list: proportional 7-column grid ─────────────────────────────── */
/* photo(44px) | name(2fr≥120px) | conf(68px) | time(100px) | activity(1fr≥90px) | spectrogram(1.8fr≥160px) | menu(40px) */
@media (min-width: 900px) {
  .detection-card.layout-list {
    grid-template-columns: 44px minmax(120px, 2fr) 68px 100px minmax(90px, 1fr) minmax(160px, 1.8fr) 40px;
    column-gap: 20px;
    padding: 8px 20px;
  }

  /* Dissolve body and meta-row so children become direct card grid items */
  .detection-card.layout-list .card-body,
  .detection-card.layout-list .card-meta-row { display: contents; }

  /* Explicit column for each element */
  .detection-card.layout-list .card-thumb       { grid-column: 1; }
  .detection-card.layout-list .card-names       { grid-column: 2; align-self: center; min-width: 0; }
  .detection-card.layout-list .conf-badge       { grid-column: 3; align-self: center; justify-self: center; white-space: nowrap; }
  .detection-card.layout-list .card-rel-time    { grid-column: 4; align-self: center; white-space: nowrap; font-size: 0.82rem; color: var(--text2); }
  .detection-card.layout-list .card-list-stats  {
    grid-column: 5;
    align-self: center;
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
  }
  .detection-card.layout-list .card-spectrogram {
    grid-column: 6;
    align-self: center;
    display: block;
    width: 100%;
    height: 54px;
    margin: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg3);
    border: 1px solid var(--sep);
    position: relative;
    z-index: 1;
  }
  .detection-card.layout-list .card-actions     { grid-column: 7; align-self: center; justify-self: center; }

  /* Not shown in the flat desktop row */
  .detection-card.layout-list .verified-badge,
  .detection-card.layout-list .card-abs-time,
  .detection-card.layout-list .first-heard-badge { display: none; }

  /* Restore multi-line name on desktop */
  .detection-card.layout-list .card-common-name {
    font-size: 1rem;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .detection-card.layout-list .card-sci-name { font-size: 0.82rem; }
}

/* Small tile layout */
.detection-card.layout-small-tile {
  display: flex;
  flex-direction: column;
}

.detection-card.layout-small-tile .card-thumb {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
}

.detection-card.layout-small-tile .card-body {
  padding: 8px;
}

/* Large tile layout */
.detection-card.layout-large-tile {
  display: flex;
  flex-direction: column;
}

.detection-card.layout-large-tile .card-thumb {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.detection-card.layout-large-tile .card-spectrogram {
  width: 100%;
  height: 72px;
  overflow: hidden;
  border: 1px solid var(--sep);
  border-radius: var(--radius-sm);
  margin-top: 6px;
}

.detection-card.layout-large-tile .card-body {
  padding: 12px;
}

/* Single layout — grid so photo can span left column on desktop */
.detection-card.layout-single {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: "thumb" "body" "actions";
}

.detection-card.layout-single .card-thumb {
  grid-area: thumb;
  width: 100%;
  height: 260px;
  overflow: hidden;
}

.detection-card.layout-single .card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.detection-card.layout-single .card-body {
  grid-area: body;
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.detection-card.layout-single .card-actions {
  grid-area: actions;
}

.detection-card.layout-single .card-spectrogram {
  width: 100%;
  height: 100%;
  min-height: 200px;
  overflow: hidden;
  border: 1px solid var(--sep);
  border-radius: var(--radius-sm);
}

.detection-card.layout-single .card-spectrogram-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

/* Single layout — horizontal on tablet/desktop */
@media (min-width: 768px) {
  .detections-grid.view-single {
    max-width: 1100px;
    margin: 0 auto; /* restore centered layout, cancel mobile negative margin */
  }

  .detection-card.layout-single {
    grid-template-columns: 44% 1fr;
    grid-template-rows: 1fr auto;
    grid-template-areas:
      "thumb body"
      "thumb actions";
    height: 480px;
  }

  .detection-card.layout-single .card-thumb {
    height: 100%;
  }

  .detection-card.layout-single .card-body {
    padding: 20px 20px 12px;
    overflow: hidden;
  }

  .detection-card.layout-single .card-actions {
    padding: 8px 20px 16px;
  }

  .detection-card.layout-single .card-common-name { font-size: 1.1rem; }
}

/* Single card enrichment panel */
.card-single-extra {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 0 4px;
  flex: 0 0 auto;
}

/* Spectrogram area grows to fill remaining card body space */
.detection-card.layout-single .card-spectrogram-area {
  flex: 1;
  display: flex;
  align-items: stretch;
  padding: 8px 0 0;
  min-height: 200px;
}

/* Birdbase pills */
.card-birdbase-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.card-birdbase-pill {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid var(--sep);
  color: var(--text3);
  white-space: nowrap;
  line-height: 1.6;
}

/* Mini 24-hour activity bar chart */
.card-mini-activity {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 28px;
  flex-shrink: 0;
}

.card-mini-bar {
  flex: 1;
  background: var(--bg4);
  border-radius: 2px 2px 0 0;
  min-height: 3px;
  transition: height 0.2s ease;
}

.card-mini-bar.active {
  background: var(--accent);
  opacity: 0.65;
}

/* Wikipedia simple excerpt */
.card-wiki-excerpt {
  font-size: 0.78rem;
  color: var(--text2);
  line-height: 1.55;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
}

/* Feeder hint badge on detection cards */
.card-feeder-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  flex-wrap: nowrap;
  min-width: 0;
}

.card-feeder-badge {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--orange);
  background: var(--orange-light);
  border: 1px solid rgba(245, 146, 42, 0.3);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.card-feeder-foods {
  font-size: 0.65rem;
  color: var(--text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Card image — bird photos bias crop toward top where birds sit */
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.card-spectrogram img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Card body content */
.card-common-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text1);
}

.card-sci-name {
  font-size: 0.8rem;
  color: var(--text2);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.card-time {
  font-size: 0.72rem;
  color: var(--text3);
}

.conf-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.conf-badge.conf-high { background: rgba(63, 185, 80, 0.15); color: var(--conf-high); }
.conf-badge.conf-med  { background: rgba(210, 153, 34, 0.15); color: var(--conf-med); }
.conf-badge.conf-low  { background: rgba(248, 81, 73, 0.15); color: var(--conf-low); }

.first-heard-badge {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--orange);
  background: var(--orange-light);
  padding: 1px 5px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Card action buttons */
.card-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.card-actions .card-btn {
  position: relative;
  z-index: 4;
  background-clip: padding-box;
}

.card-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

.card-btn svg { width: 14px; height: 14px; }
.card-btn:hover { background: var(--bg3); color: var(--text1); }
.card-btn.active { color: var(--accent); }
.card-btn.fav-btn.active { color: var(--orange); }
.card-btn.play-btn.playing { color: var(--live-dot); }

.card-download {
  position: relative;
}

.card-download-menu {
  position: absolute;
  right: 0;
  top: 36px;
  background: var(--bg3);
  border: 1px solid color-mix(in srgb, var(--sep) 75%, transparent);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.25);
  padding: 4px;
  min-width: 170px;
  z-index: 9999;
}

.card-download-item {
  display: block;
  padding: 6px 8px;
  font-size: 0.75rem;
  color: var(--text2);
  text-decoration: none;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.card-download-item:hover {
  background: color-mix(in srgb, var(--text1) 8%, transparent);
  color: var(--text1);
}

/* ── Card more (hamburger) menu for list layout ──────────────────────────── */
.card-more {
  position: relative;
}

.card-more-menu {
  position: absolute;
  right: 0;
  top: 36px;
  background: var(--bg3);
  border: 1px solid color-mix(in srgb, var(--sep) 75%, transparent);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.25);
  padding: 4px;
  min-width: 160px;
  z-index: 9999;
}

.card-more-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  font-size: 0.75rem;
  color: var(--text2);
  text-decoration: none;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.card-more-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.card-more-item:hover {
  background: color-mix(in srgb, var(--text1) 8%, transparent);
  color: var(--text1);
}

.card-more-item.is-favorite {
  color: var(--orange);
}

/* ── Confidence Slider ────────────────────────────────────────────────────── */
.conf-slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.conf-slider-label {
  font-size: 0.75rem;
  color: var(--text3);
  white-space: nowrap;
}

.conf-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 4px;
  border-radius: 2px;
  background-image:
    linear-gradient(90deg,
      color-mix(in srgb, var(--conf-low) 35%, var(--bg4)) 0%,
      color-mix(in srgb, var(--conf-low) 35%, var(--bg4)) 50%,
      color-mix(in srgb, var(--conf-med) 35%, var(--bg4)) 50%,
      color-mix(in srgb, var(--conf-med) 35%, var(--bg4)) 75%,
      color-mix(in srgb, var(--conf-high) 35%, var(--bg4)) 75%,
      color-mix(in srgb, var(--conf-high) 35%, var(--bg4)) 100%),
    linear-gradient(90deg,
      transparent 49%,
      color-mix(in srgb, var(--text3) 35%, transparent) 50%,
      transparent 51%),
    linear-gradient(90deg,
      transparent 74%,
      color-mix(in srgb, var(--text3) 35%, transparent) 75%,
      transparent 76%);
  background-color: var(--bg4);
  outline: none;
  border: none;
  cursor: pointer;
}

.conf-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

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

.conf-value {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  min-width: 34px;
}

/* ── Lightbox / Modal ─────────────────────────────────────────────────────── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-top: calc(16px + env(safe-area-inset-top));
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  overflow-y: auto;
  animation: fadeIn 0.2s ease;
}

.lightbox-content {
  background: var(--bg2);
  border: 1px solid var(--sep);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  box-shadow: var(--shadow);
  animation: slideUp 0.25s ease;
}

/* Swipe-to-dismiss handle (touch devices only) */
.lb-swipe-handle {
  display: none;
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--text3);
  opacity: 0.4;
  margin: 8px auto 0;
  flex-shrink: 0;
}
@media (pointer: coarse) {
  .lb-swipe-handle { display: block; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--sep);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text2);
  transition: background var(--transition), color var(--transition);
}

.lightbox-close:hover {
  background: var(--bg4);
  color: var(--text1);
}

.lightbox-close svg { width: 15px; height: 15px; }

/* Lightbox Header */
.lightbox-header {
  position: relative;
  overflow: hidden;
}

.lightbox-hero {
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: center 20%;
}

.lightbox-hero-placeholder {
  width: 100%;
  height: 260px;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.lightbox-title-bar {
  padding: 16px;
  background: linear-gradient(180deg, transparent 0%, var(--bg2) 100%);
  margin-top: -60px;
  position: relative;
}

.lightbox-common-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text1);
  line-height: 1.2;
}

.lightbox-sci-name {
  font-size: 0.875rem;
  color: var(--text2);
  font-style: italic;
  margin-top: 2px;
}

.lightbox-stats {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.lightbox-stat {
  font-size: 0.75rem;
  color: var(--text3);
}

.lightbox-stat strong {
  color: var(--accent);
  font-weight: 700;
}

/* Lightbox Body */
.lightbox-body { padding: 0 16px 16px; }

.lightbox-section {
  margin-top: 20px;
}

.lightbox-section-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text2);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--sep);
  display: flex;
  align-items: center;
  gap: 8px;
}

.lightbox-section-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 12px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── Lightbox detection list ─────────────────────────────────────────────── */
.lightbox-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.lightbox-title-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-top: 2px;
}

.lb-heatmap-wrap {
  margin-top: 4px;
}

.lb-det-total {
  font-size: 0.75rem;
  color: var(--text3);
  font-weight: normal;
  margin-left: 4px;
}

.lb-det-list {
  display: flex;
  flex-direction: column;
}

.lb-det-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--sep);
  position: relative;
  flex-wrap: wrap;
  cursor: pointer;
  z-index: 1;
}

.lb-det-row.menu-open { z-index: 1000; }

.lb-det-row:last-child { border-bottom: none; }

/* Spectrogram thumbnail */
.lb-det-spec-wrap {
  position: relative;
  width: 80px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg3);
  cursor: pointer;
}

.lb-det-spec {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lb-det-expand-btn {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition);
  padding: 0;
}

.lb-det-expand-btn svg { width: 10px; height: 10px; }
.lb-det-spec-wrap:hover .lb-det-expand-btn { opacity: 1; }

/* Time & info */
.lb-det-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.lb-det-time {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text1);
  white-space: nowrap;
}

.lb-det-rel {
  font-size: 0.7rem;
  color: var(--text3);
}

/* Row actions */
.lb-det-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
}

.lb-det-actions .card-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text3);
  text-decoration: none;
  cursor: pointer;
}

.lb-det-actions .card-btn:hover { background: var(--bg3); color: var(--text1); }
.lb-det-actions .card-btn svg { width: 14px; height: 14px; pointer-events: none; }
.lb-det-actions .lb-play-btn.playing { color: var(--live-dot); }
.lb-det-actions .lb-pin-btn.active { color: var(--accent); }

.lb-download {
  position: relative;
}

.lb-download-menu {
  position: absolute;
  right: 0;
  top: 36px;
  background: var(--bg2);
  border: 1px solid var(--sep);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 4px;
  min-width: 170px;
  z-index: 2000;
}

.lb-download-item {
  display: block;
  padding: 6px 8px;
  font-size: 0.75rem;
  color: var(--text2);
  text-decoration: none;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.lb-download-item:hover {
  background: var(--bg3);
  color: var(--text1);
}

/* Expanded spectrogram panel — spans below the row */
.lb-expand-panel {
  width: 100%;
  border-top: 1px solid var(--sep);
  background: var(--bg3);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 6px;
}

.lb-expand-inner {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lb-expand-spec-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--sep);
  background: var(--bg4);
  cursor: pointer;
}

.lb-expand-spec-img {
  width: 100%;
  height: auto;
  display: block;
}

.lb-expand-track {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  pointer-events: none;
  will-change: left;
  transform: translateX(-1px);
}

.lb-expand-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.lb-expand-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text1);
}

.lb-expand-sci {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--text2);
}

.lb-expand-extras {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.lb-extra-item {
  font-size: 0.72rem;
  color: var(--text2);
  background: var(--bg3);
  border-radius: 10px;
  padding: 2px 8px;
  white-space: nowrap;
}

.lb-expand-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lb-expand-controls .card-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text2);
  text-decoration: none;
}

.lb-expand-controls .card-btn:hover { background: var(--bg4); color: var(--text1); }
.lb-expand-controls .card-btn svg { width: 14px; height: 14px; pointer-events: none; }

/* Admin row: review / lock / delete — own line on mobile */
.lb-admin-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
@media (max-width: 480px) {
  .lb-admin-row {
    flex-basis: 100%;
  }
}

/* Wikipedia section */
.lb-wiki-body {
  padding-top: 6px;
}

.lb-wiki-extract {
  font-size: 0.82rem;
  color: var(--text2);
  line-height: 1.6;
}

.lb-wiki-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--accent);
}

.lb-wiki-empty {
  font-size: 0.82rem;
  color: var(--text3);
}

.lb-wiki-loading {
  padding: 8px 0;
}

/* Lightbox section — details/summary toggle */
.lightbox-section-toggle {
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.lightbox-section-toggle::-webkit-details-marker { display: none; }
details.lightbox-about[open] .lightbox-section-toggle::after { content: ' ▲'; font-size: 0.65rem; }
details.lightbox-about:not([open]) .lightbox-section-toggle::after { content: ' ▼'; font-size: 0.65rem; }

/* Verify section */
.lb-verify-hint {
  font-size: 0.8rem;
  color: var(--text3);
  margin-bottom: 8px;
}

.lb-verify-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lb-verify-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--bg3);
  color: var(--text2);
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.lb-verify-btn svg { width: 16px; height: 16px; }
.lb-verify-correct:hover { border-color: var(--conf-high); color: var(--conf-high); background: rgba(63,185,80,0.1); }
.lb-verify-incorrect:hover { border-color: var(--conf-low); color: var(--conf-low); background: rgba(248,81,73,0.1); }
.lb-verify-active.lb-verify-correct { border-color: var(--conf-high); color: var(--conf-high); background: rgba(63,185,80,0.15); }
.lb-verify-active.lb-verify-incorrect { border-color: var(--conf-low); color: var(--conf-low); background: rgba(248,81,73,0.15); }

/* View all link */
.lb-view-all {
  text-align: center;
  padding-bottom: 4px;
}

.lb-view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--accent);
}

.lb-view-all-link svg { width: 14px; height: 14px; }
.lb-view-all-link:hover { text-decoration: underline; }

/* ── BIRDBASE species traits ──────────────────────────────────────────────── */
.lb-traits-section { margin-top: 16px; }

.lb-traits-source {
  font-size: 0.62rem;
  color: var(--text3);
  font-weight: 400;
  font-style: italic;
  margin-left: 6px;
  vertical-align: middle;
}

.lb-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ── Unified pill base — shared by all lightbox info pills ────────────── */
.lb-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.73rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg3);
  color: var(--text2);
  border: 1px solid var(--sep);
  white-space: nowrap;
  line-height: 1.5;
}

/* Trait-specific aliases (backwards compat) */
.lb-trait {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.73rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg3);
  color: var(--text2);
  border: 1px solid var(--sep);
  white-space: nowrap;
  line-height: 1.5;
}

.lb-trait-label {
  font-weight: 400;
  color: var(--text2);
}

.lb-trait-muted { color: var(--text3); font-style: italic; }

/* IUCN badge — .lb-iucn-lc/nt/vu/en/cr/ex/dd */
.lb-iucn { gap: 6px; }
.lb-iucn strong { font-size: 0.72rem; letter-spacing: 0.02em; }

.lb-iucn-lc  { background: rgba(63,185,80,0.08);  color: var(--conf-high); border-color: rgba(63,185,80,0.25); }
.lb-iucn-nt  { background: rgba(154,197,62,0.08); color: #9ac53e;          border-color: rgba(154,197,62,0.25); }
.lb-iucn-vu  { background: rgba(210,153,34,0.08); color: var(--conf-med);  border-color: rgba(210,153,34,0.25); }
.lb-iucn-en  { background: rgba(245,146,42,0.08); color: var(--orange);    border-color: rgba(245,146,42,0.25); }
.lb-iucn-cr  { background: rgba(248,81,73,0.08);  color: var(--conf-low);  border-color: rgba(248,81,73,0.25); }
.lb-iucn-ex  { background: rgba(110,118,129,0.08); color: var(--text3);    border-color: var(--sep); }
.lb-iucn-dd  { background: rgba(110,118,129,0.08); color: var(--text3);    border-color: var(--sep); }

.lb-iucn-lc .lb-trait-label,
.lb-iucn-nt .lb-trait-label { color: inherit; opacity: 0.85; }
.lb-iucn-vu .lb-trait-label,
.lb-iucn-en .lb-trait-label,
.lb-iucn-cr .lb-trait-label { color: inherit; opacity: 0.85; }
.lb-iucn-ex .lb-trait-label,
.lb-iucn-dd .lb-trait-label { color: var(--text3); }

/* ── Spectrogram Player ───────────────────────────────────────────────────── */
.spectrogram-player {
  background: var(--bg3);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--sep);
}

.spectrogram-container {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.spectrogram-img {
  width: 100%;
  height: auto;
  display: block;
}

.tracking-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent), 0 0 2px rgba(255,255,255,0.5);
  pointer-events: none;
  will-change: left;
  transform: translateX(-1px);
}

.spectrogram-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg3);
  border-top: 1px solid var(--sep);
}

.time-display {
  font-size: 0.72rem;
  color: var(--text3);
  font-variant-numeric: tabular-nums;
  display: flex;
  gap: 2px;
}

/* ── Heatmap ──────────────────────────────────────────────────────────────── */
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 2px;
}

.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 2px;
  background: var(--bg3);
  position: relative;
  cursor: default;
}

.heatmap-cell[data-level] {
  background: color-mix(in srgb, var(--accent) calc(var(--level, 0) * 1%), var(--bg3));
}

.heatmap-labels {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 2px;
  margin-top: 4px;
}

.heatmap-label {
  font-size: 0.55rem;
  color: var(--text3);
  text-align: center;
}

/* ── Calendar ─────────────────────────────────────────────────────────────── */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-day-header {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text3);
  font-weight: 600;
  padding: 4px 0;
}

.calendar-day {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
  padding: 2px;
  min-height: 36px;
}

.calendar-day:hover { border-color: var(--sep); background: var(--bg3); }
.calendar-day.selected { border-color: var(--accent); background: var(--accent-light); }
.calendar-day.today { font-weight: 700; }
.calendar-day.other-month { opacity: 0.35; }
.calendar-day.no-data { cursor: default; }

.calendar-day-num {
  font-size: 0.8rem;
  line-height: 1;
  color: var(--text1);
}

.calendar-day-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 3px;
}

/* ── Stats Charts ─────────────────────────────────────────────────────────── */
.chart-container {
  background: var(--bg2);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.chart-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text1);
  margin-bottom: 12px;
}

.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bar-chart-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bar-chart-label {
  min-width: 120px;
  max-width: 120px;
  font-size: 0.75rem;
  color: var(--text2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

.bar-chart-bar-wrap {
  flex: 1;
  height: 18px;
  background: var(--bg3);
  border-radius: 9px;
  overflow: hidden;
}

.bar-chart-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 9px;
  transition: width 0.5s ease;
  min-width: 2px;
}

.bar-chart-value {
  min-width: 40px;
  font-size: 0.72rem;
  color: var(--text3);
  text-align: right;
}

/* ── Summary Cards ────────────────────────────────────────────────────────── */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.summary-card {
  background: var(--bg2);
  border: 1px solid var(--sep);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 16px 16px 14px;
  text-align: center;
}

.summary-card-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.summary-card-label {
  font-size: 0.72rem;
  color: var(--text3);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Search / Filter Bar ──────────────────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  padding: 6px 10px;
  flex: 1;
}

.search-bar svg {
  width: 15px;
  height: 15px;
  color: var(--text3);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text1);
  font-size: 0.875rem;
}

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

/* ── Species Card (Birds view) ────────────────────────────────────────────── */
.species-card {
  background: var(--bg2);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.species-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.species-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.species-card-body {
  padding: 12px;
}

.species-card-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text1);
}

.species-card-sci {
  font-size: 0.75rem;
  color: var(--text2);
  font-style: italic;
}

.species-card-meta {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.species-card-stat {
  font-size: 0.7rem;
  color: var(--text3);
}

.species-card-stat strong {
  color: var(--text2);
  font-weight: 600;
}

.new-badge {
  background: var(--orange-light);
  color: var(--orange);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 20px;
}

/* ── Toast Notifications ──────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 480px;
}

.toast {
  background: var(--bg4);
  color: var(--text1);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.85rem;
  box-shadow: var(--shadow);
  animation: toastIn 0.25s ease forwards;
  pointer-events: auto;
  text-align: center;
}

.toast.toast-success { border-color: var(--live-dot); }
.toast.toast-error { border-color: var(--offline-dot); }

/* Update-available toast — persistent, has action buttons */
.toast.toast-update {
  display: flex;
  align-items: center;
  gap: 10px;
  border-color: var(--accent);
  padding: 9px 10px 9px 14px;
}

.toast-update-msg {
  flex: 1;
  text-align: left;
}

.toast-update-btn {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.toast-dismiss-btn {
  font-size: 1rem;
  color: var(--text3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  flex-shrink: 0;
  line-height: 1;
}

.toast-dismiss-btn:hover { color: var(--text1); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-12px); }
}

/* ── New Species Banner ────────────────────────────────────────────────────── */
.new-species-banner {
  position: fixed;
  top: calc(var(--header-height) + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 2px solid var(--orange);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 20px rgba(245, 146, 42, 0.3), var(--shadow);
  animation: bannerIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  width: calc(100% - 32px);
  max-width: 480px;
}

.new-species-content {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}

.new-species-emoji { font-size: 1.5rem; }

.new-species-text {
  flex: 1;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--orange);
}

.new-species-close {
  font-size: 1.25rem;
  color: var(--text3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

@keyframes bannerIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-20px) scale(0.9); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* ── Settings Modal ───────────────────────────────────────────────────────── */
.settings-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 800;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.settings-panel {
  background: var(--bg2);
  border-top: 1px solid var(--sep);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom);
  animation: slideUp 0.3s ease;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--sep);
  position: sticky;
  top: 0;
  background: var(--bg2);
}

.settings-header h2 {
  font-size: 1rem;
  font-weight: 600;
}

.settings-body { padding: 16px; }

.settings-group {
  margin-bottom: 20px;
}

.settings-group-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3);
  margin-bottom: 10px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--sep);
}

.settings-row:last-child { border-bottom: none; }

.settings-row-label {
  font-size: 0.875rem;
  color: var(--text1);
}

.settings-row-desc {
  font-size: 0.72rem;
  color: var(--text3);
  margin-top: 2px;
}

/* Theme Selector */
.theme-selector {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.theme-btn {
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--sep);
  font-size: 0.75rem;
  cursor: pointer;
  background: var(--bg3);
  color: var(--text2);
  transition: all var(--transition);
}

.theme-btn.active {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}

.theme-section-label {
  width: 100%;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text3);
  margin-top: 4px;
}

.theme-section-label:first-child {
  margin-top: 0;
}

/* Settings action button (e.g. Reload) */
.settings-action-btn {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 5px 14px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity var(--transition);
}

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

/* ── Loading / Empty States ───────────────────────────────────────────────── */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 16px;
  color: var(--text3);
  font-size: 0.875rem;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--sep);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 64px 16px;
  color: var(--text3);
  text-align: center;
}

.empty-state svg {
  width: 48px;
  height: 48px;
  opacity: 0.35;
}

.empty-state h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text2);
}

.empty-state p {
  font-size: 0.875rem;
  max-width: 280px;
}

/* ── Pagination ───────────────────────────────────────────────────────────── */
.load-more-btn {
  display: block;
  width: 100%;
  padding: 10px;
  text-align: center;
  background: var(--bg3);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  color: var(--text2);
  cursor: pointer;
  font-size: 0.875rem;
  margin-top: 12px;
  transition: background var(--transition), color var(--transition);
}

.load-more-btn:hover { background: var(--bg4); color: var(--text1); }
.load-more-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Detection Card — spectrogram tracking bar ───────────────────────────── */
.card-spectrogram {
  position: relative;
  overflow: hidden;
}

.card-spectrogram-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-track-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  pointer-events: none;
  will-change: left;
  transform: translateX(-1px);
}

.detection-card.is-playing {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-light);
}

.detection-card.is-playing .card-play-btn {
  color: var(--live-dot);
}

.card-fav-btn.is-favorite {
  color: var(--orange);
}

/* Card meta row */
.card-names {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.card-meta-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.card-rel-time {
  font-size: 0.72rem;
  color: var(--text3);
}


.card-abs-time {
  font-size: 0.7rem;
  color: var(--text3);
}

.clip-indicator {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  color: var(--orange);
  opacity: 0.85;
}

.clip-indicator svg {
  width: 100%;
  height: 100%;
}

/* ── Birds View ───────────────────────────────────────────────────────────── */
.birds-view {
  padding: 16px;
  max-width: var(--content-max);
  margin: 0 auto;
}

.birds-stats-header {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--bg2);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
}

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

.birds-stat-value {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.birds-stat-label {
  font-size: 0.65rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.birds-stat-clickable {
  cursor: pointer;
  border-radius: var(--radius);
  padding: 4px 6px;
  margin: -4px -6px;
  transition: background var(--transition);
}
.birds-stat-clickable:hover {
  background: var(--bg3);
}

.birds-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.birds-search-wrap {
  flex: 1;
  min-width: 160px;
}

.birds-search-input {
  width: 100%;
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.birds-sort-select {
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 0.8rem;
  cursor: pointer;
}

.birds-fav-btn {
  padding: 5px 12px;
  border: 1px solid var(--sep);
  border-radius: 20px;
  font-size: 0.75rem;
  background: var(--bg3);
  color: var(--text2);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.birds-fav-btn.is-active {
  background: var(--orange-light);
  color: var(--orange);
  border-color: var(--orange);
}

.birds-season-filters {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.birds-season-btn {
  padding: 4px 10px;
  border: 1px solid var(--sep);
  border-radius: 20px;
  font-size: 0.72rem;
  background: var(--bg3);
  color: var(--text2);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.birds-season-btn.is-active,
.birds-season-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}

.season-spring { border-color: #3fb950 !important; }
.season-spring.is-active { background: rgba(63,185,80,0.12) !important; color: #3fb950 !important; }
.season-summer { border-color: #d29922 !important; }
.season-summer.is-active { background: rgba(210,153,34,0.12) !important; color: #d29922 !important; }
.season-fall   { border-color: #f5922a !important; }
.season-fall.is-active   { background: rgba(245,146,42,0.12) !important; color: #f5922a !important; }
.season-winter { border-color: var(--accent) !important; }
.season-winter.is-active { background: var(--accent-light) !important; color: var(--accent) !important; }

/* Feeder food filters */
.birds-feeder-filters {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.birds-feeder-input-wrap {
  position: relative;
}
.birds-feeder-input {
  padding: 5px 10px;
  border: 1px solid var(--sep);
  border-radius: 20px;
  font-size: 0.75rem;
  background: var(--bg3);
  color: var(--text1);
  width: 180px;
  outline: none;
  transition: border-color var(--transition);
}
.birds-feeder-input:focus {
  border-color: var(--accent);
}
.birds-feeder-input::placeholder {
  color: var(--text3);
}
.birds-feeder-suggestions {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--bg2);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  z-index: 20;
  max-height: 200px;
  overflow-y: auto;
}
.birds-feeder-suggestions.is-open { display: block; }
.birds-feeder-suggestion {
  padding: 6px 10px;
  font-size: 0.75rem;
  color: var(--text1);
  cursor: pointer;
  transition: background var(--transition);
}
.birds-feeder-suggestion:hover {
  background: var(--bg3);
}
.birds-feeder-pills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}
.birds-feeder-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
  background: rgba(63,185,80,0.12);
  color: #3fb950;
  border: 1px solid rgba(63,185,80,0.3);
  white-space: nowrap;
}
.birds-feeder-pill-x {
  background: none;
  border: none;
  color: inherit;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  opacity: 0.7;
  transition: opacity var(--transition);
}
.birds-feeder-pill-x:hover { opacity: 1; }

.birds-grid-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.birds-result-count {
  font-size: 0.75rem;
  color: var(--text3);
}

.birds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

@media (max-width: 480px) {
  .birds-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
  }
}

.birds-species-card {
  background: var(--bg2);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.birds-species-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.birds-card-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg3);
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .birds-card-photo { aspect-ratio: 1; }
}

.birds-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.birds-new-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--orange);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 20px;
}

.birds-season-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 20px;
  background: var(--bg3);
  border: 1px solid var(--sep);
  color: var(--text2);
}

.birds-card-body {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.birds-card-names {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.birds-card-common {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.birds-card-sci {
  font-size: 0.72rem;
  color: var(--text2);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.birds-card-stats {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.birds-card-count,
.birds-card-first,
.birds-card-last {
  font-size: 0.68rem;
  color: var(--text3);
}

.birds-card-conf {
  font-size: 0.68rem;
  font-weight: 600;
  align-self: flex-start;
  padding: 1px 5px;
  border-radius: 20px;
}

.birds-card-conf.conf-high { background: rgba(63, 185, 80, 0.15); color: var(--conf-high); }
.birds-card-conf.conf-med  { background: rgba(210, 153, 34, 0.15); color: var(--conf-med); }
.birds-card-conf.conf-low  { background: rgba(248, 81, 73, 0.15); color: var(--conf-low); }

.birds-card-photo .birds-fav-star {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  background: rgba(0,0,0,0.45);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--text1);
  transition: background var(--transition), color var(--transition);
}
.birds-card-photo .birds-fav-star:hover {
  background: rgba(0,0,0,0.7);
}
.birds-card-photo .birds-fav-star.is-favorite { color: var(--orange); }
.birds-card-photo .birds-fav-star svg { width: 16px; height: 16px; }

.birds-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 64px 16px;
  color: var(--text3);
  font-size: 0.875rem;
}

.spinner-ring {
  width: 28px;
  height: 28px;
  border: 2px solid var(--sep);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.birds-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 48px 16px;
  color: var(--text3);
  font-size: 0.875rem;
  text-align: center;
}

.birds-empty-icon svg {
  width: 48px;
  height: 48px;
  opacity: 0.3;
}

/* ── Favorites View ───────────────────────────────────────────────────────── */
.favorites-view {
  padding: 16px;
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.favs-page-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text1);
  margin-bottom: 4px;
}

.favs-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.favs-section-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text2);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--sep);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.favs-section-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 12px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

.favs-section-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

@media (max-width: 480px) {
  .favs-section-content {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
  }
}

.favs-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 16px;
  color: var(--text3);
  text-align: center;
}

.favs-empty-icon {
  width: 48px;
  height: 48px;
  opacity: 0.3;
}

.favs-empty-icon svg {
  width: 100%;
  height: 100%;
}

.favs-empty-text {
  font-size: 0.875rem;
}

.favs-species-card {
  background: var(--bg2);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.favs-species-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.favs-card-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg3);
  flex-shrink: 0;
}

.favs-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.favs-card-body {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.favs-card-common {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.favs-card-sci {
  font-size: 0.72rem;
  color: var(--text2);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.favs-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.favs-card-count {
  font-size: 0.68rem;
  color: var(--text3);
}

.favs-card-last,
.favs-card-time,
.favs-card-id {
  font-size: 0.68rem;
  color: var(--text3);
}

.favs-card-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  border-top: 1px solid var(--sep);
}

.favs-detection-card {
  background: var(--bg2);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.favs-detection-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

@keyframes favsCardRemove {
  to { opacity: 0; transform: scale(0.9); }
}

.favs-card--removing {
  animation: favsCardRemove 0.35s ease forwards;
  pointer-events: none;
}

.favs-unstar-btn.is-favorite,
.favs-unpin-btn.is-pinned {
  color: var(--orange);
}

.favs-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.favs-section-loading {
  padding: 16px;
  font-size: 0.8rem;
  color: var(--text3);
  text-align: center;
}

/* ── Weekly Heatmap ───────────────────────────────────────────────────────── */
.weekly-heatmap {
  font-size: 0.7rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.weekly-heatmap-header {
  display: flex;
  align-items: center;
  margin-bottom: 2px;
}

.weekly-heatmap-hour-label-spacer {
  width: 40px;
  flex-shrink: 0;
}

.weekly-heatmap-day-labels {
  display: grid;
  grid-template-columns: repeat(var(--num-days, 7), 1fr);
  flex: 1;
  gap: 2px;
}

.weekly-heatmap-day-label {
  text-align: center;
  font-size: 0.62rem;
  color: var(--text3);
  line-height: 1.2;
  padding: 2px 0;
}

.weekly-heatmap-day-label span {
  display: block;
  font-weight: 600;
  color: var(--text2);
}

.weekly-heatmap-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.weekly-heatmap-row {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 14px;
}

.weekly-heatmap-hour-label {
  width: 40px;
  flex-shrink: 0;
  font-size: 0.6rem;
  color: var(--text3);
  text-align: right;
  padding-right: 4px;
}

.weekly-heatmap-cells {
  display: grid;
  grid-template-columns: repeat(var(--num-days, 7), 1fr);
  flex: 1;
  gap: 2px;
}

.weekly-heatmap-cell {
  height: 14px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--accent) calc(var(--level, 0) * 1%), var(--bg3));
  cursor: default;
}

.heatmap-empty,
.heatmap-peak {
  font-size: 0.72rem;
  color: var(--text3);
  margin-top: 6px;
  text-align: center;
}

/* ── Misc Utilities ───────────────────────────────────────────────────────── */
.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;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }

.divider {
  height: 1px;
  background: var(--sep);
  margin: 16px 0;
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  .view-container { padding: 20px 24px; }
  .toast-container { bottom: 16px; }
  .settings-modal { align-items: center; }
  .settings-panel {
    border-radius: var(--radius-xl);
    border: 1px solid var(--sep);
    max-height: 70vh;
  }
}

@media (max-width: 480px) {
  .summary-cards { grid-template-columns: repeat(2, 1fr); }
  .bar-chart-label { min-width: 80px; max-width: 80px; font-size: 0.65rem; }
}

/* Focus visible outline for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Verified Badge ──────────────────────────────────────────────────────── */
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
}

.verified-badge svg {
  width: 10px;
  height: 10px;
}

.verified-correct {
  background: rgba(63, 185, 80, 0.18);
  color: var(--conf-high);
}

.verified-false-pos {
  background: rgba(248, 81, 73, 0.18);
  color: var(--conf-low);
}

/* Thin vertical separator between verify and admin button groups */
.lb-btn-divider {
  width: 1px;
  height: 18px;
  background: var(--sep);
  align-self: center;
  flex-shrink: 0;
  margin: 0 2px;
}

/* ── Admin Buttons (lightbox expanded panel) ─────────────────────────────── */
.lb-admin-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lb-admin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--bg3);
  color: var(--text2);
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.lb-admin-btn svg { width: 16px; height: 16px; }

.lb-admin-btn:hover {
  background: var(--bg4);
  color: var(--text1);
}

.lb-admin-active.lb-lock-btn {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.lb-delete-btn {
  color: rgba(248, 81, 73, 0.55);
  border-color: rgba(248, 81, 73, 0.25);
}

.lb-delete-btn:hover {
  color: var(--conf-low);
  border-color: var(--conf-low);
  background: rgba(248, 81, 73, 0.1);
}

/* ── Ignore Species Button ───────────────────────────────────────────────── */
.ignore-btn {
  color: var(--text3);
  transition: color var(--transition), background var(--transition);
}

.ignore-btn:hover {
  color: var(--conf-low);
  background: rgba(248, 81, 73, 0.1);
}

.ignore-btn.active {
  color: var(--conf-low);
  background: rgba(248, 81, 73, 0.15);
}

/* ── Detection Row Removal Animation ─────────────────────────────────────── */
@keyframes fadeSlideOut {
  from { opacity: 1; transform: translateX(0); max-height: 200px; }
  to   { opacity: 0; transform: translateX(20px); max-height: 0; padding: 0; margin: 0; border-width: 0; overflow: hidden; }
}

.lb-det-row--removing {
  animation: fadeSlideOut 0.35s ease forwards;
  pointer-events: none;
}

/* ── False Positive Filter Pill Toggle ───────────────────────────────────── */
.toolbar-fp-filter {
  display: flex;
  align-items: center;
}

.fp-pill-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--sep);
  background: transparent;
  color: var(--text3);
  font-size: 0.73rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
}

.fp-pill-btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.fp-pill-btn:hover {
  border-color: var(--text3);
  color: var(--text2);
  background: var(--bg3);
}

.fp-pill-btn.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Calendar Export Button ──────────────────────────────────────────────── */
.cal-export-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--sep);
  background: var(--bg3);
  color: var(--text2);
  font-size: 0.73rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
}

.cal-export-btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.cal-export-btn:hover {
  background: var(--bg4);
  color: var(--text1);
  border-color: var(--text3);
}

/* ── Ecology section ─────────────────────────────────────────────────────── */

/* Notable Behaviors */
.lb-behavior-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lb-behavior-pill {
  font-size: 0.73rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(74, 158, 255, 0.2);
  line-height: 1.5;
}

/* Season tabs */
.lb-season-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.lb-season-tab {
  font-size: 0.73rem;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--sep);
  background: transparent;
  color: var(--text3);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  -webkit-tap-highlight-color: transparent;
  line-height: 1.5;
}

.lb-season-tab.active,
.lb-season-tab:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: rgba(74, 158, 255, 0.25);
}

/* Diet panels */
.lb-diet-panel { display: none; }
.lb-diet-panel.active { display: block; }

.lb-diet-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.lb-diet-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text3);
  padding-top: 4px;
  min-width: 46px;
  flex-shrink: 0;
}

.lb-diet-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lb-diet-pill {
  font-size: 0.73rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg3);
  color: var(--text2);
  border: 1px solid var(--sep);
  white-space: nowrap;
  line-height: 1.5;
}

.lb-diet-pill-feeder {
  background: var(--orange-light);
  color: var(--orange);
  border-color: rgba(245, 146, 42, 0.2);
}

/* About This Species — consolidated wrapper */
.lb-about-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

.lb-about-subsection {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lb-about-subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0;
  padding: 0;
}

.lb-feeder-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lb-feeder-pill {
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--orange);
  background: rgba(245, 146, 42, 0.06);
  border: 1px solid rgba(245, 146, 42, 0.25);
  border-radius: 6px;
  padding: 4px 10px;
  line-height: 1.5;
}

.lb-feeder-type-pill {
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid rgba(74, 158, 255, 0.2);
  border-radius: 6px;
  padding: 4px 10px;
  line-height: 1.5;
}

.lb-feeder-source {
  font-size: 0.62rem;
  font-weight: 400;
  color: var(--text3);
  font-style: italic;
  margin-left: 6px;
}

/* Learn More section title wrapper */
.lb-ext-links-section .lb-ext-links {
  margin-top: 0;
}

/* Migration */
.lb-migration-text {
  font-size: 0.82rem;
  color: var(--text2);
  line-height: 1.6;
  margin: 0;
}

/* Collapsible ecology sections (individual + outer wrapper) */
details.lb-eco-details > summary,
details.lb-eco-wrapper > summary {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

details.lb-eco-details[open] .lightbox-section-toggle::after,
details.lb-eco-wrapper[open] > summary.lightbox-section-toggle::after { content: ' ▲'; font-size: 0.65rem; }
details.lb-eco-details:not([open]) .lightbox-section-toggle::after,
details.lb-eco-wrapper:not([open]) > summary.lightbox-section-toggle::after { content: ' ▼'; font-size: 0.65rem; }

/* Spacing between summary and content inside each collapsible */
details.lb-eco-details > :not(summary) { margin-top: 10px; }


.lb-appearance-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.lb-appearance-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.lb-appearance-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text3);
  padding-top: 2px;
  min-width: 76px;
  flex-shrink: 0;
}

.lb-appearance-text {
  font-size: 0.82rem;
  color: var(--text2);
  line-height: 1.55;
  margin: 0;
}

/* External links row */
.lb-ext-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--sep);
}

.lb-ext-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.73rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--sep);
  color: var(--text2);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  -webkit-tap-highlight-color: transparent;
  line-height: 1.5;
}

.lb-ext-link:hover {
  border-color: rgba(74, 158, 255, 0.25);
  color: var(--accent);
  background: var(--accent-light);
}
