:root {
  font-size: 14px;
  scrollbar-gutter: stable;
  --type-name-detail-size: 25px;
  --type-name-detail-lh: 30px;
  --type-name-card-size: 18px;
  --type-name-card-lh: 23px;
  --type-sci-card-size: 13.5px;
  --type-sci-card-lh: 18px;
  --type-sci-size: 16px;
  --type-sci-lh: 21px;
  --type-secondary-size: 12.5px;
  --type-secondary-lh: 17px;
  --type-tag-size: 12.5px;
  --type-tag-lh: 15px;
  --type-caption-size: 13.5px;
  --type-caption-lh: 19px;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
  padding-inline: var(--sp-screen);
  padding-block: 0 60px;
}

main {
  max-width: 1120px;
  margin: 0 auto;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  text-wrap: balance;
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: var(--type-page-title-size);
  line-height: var(--type-page-title-lh);
  font-weight: var(--type-page-title-weight);
  color: var(--text-primary);
}

code, .mono {
  font-family: var(--font-mono);
}

a {
  color: var(--theme-primary);
}

.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty a {
  font-weight: 600;
}

html {
  overflow-x: clip;
}

header {
  position: relative;
  z-index: 50;
  isolation: isolate;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 26px;
  padding: 18px 0;
  color: var(--text-on-inverse);
  font-size: 14px;
  line-height: 1;
}

header::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: var(--theme-primary-shade);
}

header .brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--text-on-inverse);
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: var(--type-brand-size);
  line-height: var(--type-brand-lh);
  font-weight: var(--type-brand-weight);
  letter-spacing: 0.01em;
}

header .brand img {
  width: 30px;
  height: 30px;
  display: block;
  flex: none;
  align-self: center;
}

header .brand .tagline {
  margin-left: 2px;
  font-size: 13px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text-on-inverse-muted);
}

header .nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

header .nav a, header .nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  margin: 0;
  padding: 0 12px 0 10px;
  border: 0;
  border-radius: var(--r-button);
  cursor: pointer;
  background: none;
  color: var(--text-on-inverse-muted);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition);
}

header .nav a svg, header .nav-toggle svg {
  display: block;
  width: 16px;
  height: 16px;
  flex: none;
  stroke-width: 36;
}

header .nav a span, header .nav-toggle span {
  display: block;
}

header .nav a:hover, header .nav-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-on-inverse);
}

header .nav a[aria-current], header .nav-toggle[aria-current] {
  background: rgba(255, 255, 255, 0.18);
  color: var(--text-on-fill);
}

header .nav-toggle .chev {
  display: flex;
  margin-left: -2px;
}

header .nav-toggle .chev svg {
  display: block;
  width: 14px;
  height: 14px;
}

header .nav-toggle[aria-expanded=true] .chev {
  transform: rotate(180deg);
}

header .nav-group {
  position: relative;
}

header .menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-overlay);
}

header .menu[hidden] {
  display: none;
}

header .menu a {
  height: 38px;
  padding: 0 10px;
  color: var(--text-primary);
  font-weight: 500;
}

header .menu a svg {
  color: var(--theme-primary);
}

header .menu a:hover {
  background: var(--green-tint-hover);
  color: var(--text-primary);
}

header .menu a[aria-current] {
  background: var(--theme-primary-soft);
  color: var(--theme-primary);
}

.page-title {
  margin: 0 0 6px;
}

.lede {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  max-width: 62ch;
}

@media (max-width: 900px) {
  header .brand .tagline {
    display: none;
  }
}

@media (max-width: 720px) {
  header {
    margin-bottom: 20px;
    padding: 12px 0;
  }
  header .nav a span, header .nav-toggle span {
    display: none;
  }
  header .nav a, header .nav-toggle {
    padding: 0 11px;
  }
  header .nav a svg, header .nav-toggle svg {
    width: 22px;
    height: 22px;
  }
  header .nav .menu a span {
    display: block;
  }
  header .nav-toggle .chev {
    display: none;
  }
}

.info-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  vertical-align: middle;
  padding: 3px 9px 3px 7px;
  border: 1px solid transparent;
  border-radius: var(--r-tag);
  font-family: var(--font-sans);
  font-size: var(--type-tag-size);
  line-height: var(--type-tag-lh);
  font-weight: var(--type-tag-weight);
  white-space: nowrap;
}

.info-label .icon {
  width: var(--i-tag);
  height: var(--i-tag);
  flex: none;
  fill: currentColor;
}

.info-label .text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-label .text.mono {
  font-family: var(--font-mono);
  font-weight: 500;
}

.info-label:not(:has(.icon)) {
  padding-left: 9px;
}

.info-label.icon-only {
  padding: 4px;
}

.info-label.look-green {
  background: var(--theme-primary-soft);
  color: var(--theme-primary);
  border-color: var(--theme-primary-soft);
}

.info-label.look-green-solid {
  background: var(--theme-primary);
  color: var(--theme-primary-contrast);
  border-color: var(--theme-primary);
}

.info-label.look-yellow {
  background: var(--theme-secondary-soft);
  color: var(--yellow-text);
  border-color: var(--theme-secondary-soft);
}

.info-label.look-red {
  background: var(--theme-danger-soft);
  color: var(--theme-danger);
  border-color: var(--theme-danger-soft);
}

.info-label.look-grey {
  background: var(--theme-neutral-soft);
  color: var(--theme-neutral);
  border-color: var(--theme-neutral-soft);
}

.info-label.look-lime {
  background: var(--lime-soft);
  color: var(--lime-text);
  border-color: var(--lime-soft);
}

.info-label.look-violet {
  background: var(--violet-soft);
  color: var(--violet-text);
  border-color: var(--violet-soft);
}

.info-label.look-outline {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.info-label.look-orange {
  background: var(--orange);
  color: var(--text-on-fill);
  border-color: var(--orange);
}

.source-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: var(--r-tag);
  vertical-align: middle;
  white-space: nowrap;
  background: var(--theme-neutral-soft);
  color: var(--theme-neutral);
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 11px;
  line-height: 15px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: lowercase;
  text-decoration: none;
}

.source-tag.credit {
  text-transform: none;
  text-decoration: underline;
  color: var(--theme-neutral);
}

.edge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: rgba(var(--overlay-rgb), 0.25);
}

.edge .fill {
  height: 100%;
  background: var(--confidence-high);
}

.edge .fill.ok {
  background: var(--confidence-mid);
}

.edge .fill.low {
  background: var(--confidence-low);
}

.conf-tab {
  position: absolute;
  right: 10px;
  bottom: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 21px;
  padding: 0 9px;
  border-radius: var(--r-tag);
  background: var(--confidence-high);
  color: var(--text-on-fill);
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.conf-tab.ok {
  background: var(--confidence-mid);
}

.conf-tab.low {
  background: var(--confidence-low);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  margin: 0;
  padding: 0 18px;
  border: 1.5px solid transparent;
  border-radius: var(--r-button);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}

.btn.grow {
  flex: 1;
}

.btn.small {
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
}

.btn.primary {
  background: var(--theme-primary);
  color: var(--theme-primary-contrast);
}

.btn.primary:hover {
  background: var(--green-hover);
}

.btn.primary:active {
  background: var(--green-pressed);
}

.btn.accent {
  background: var(--orange);
  color: var(--on-accent);
}

.btn.accent:hover {
  background: var(--orange-hover);
}

.btn.accent:active {
  background: var(--orange-pressed);
}

.btn.secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
  font-weight: 600;
}

.btn.secondary:hover {
  background: var(--green-tint-hover);
}

.btn.secondary:active {
  background: var(--green-tint-pressed);
}

.btn.ghost {
  background: var(--bg-surface);
  color: var(--theme-primary);
  border-color: var(--theme-primary);
  font-weight: 600;
}

.btn.ghost:hover {
  background: var(--theme-primary-soft);
}

.btn.ghost:active {
  background: var(--green-tint-pressed);
}

.btn:disabled, .btn:disabled:hover, .btn:disabled:active {
  background: var(--disabled-bg);
  color: var(--disabled-text);
  border-color: var(--disabled-border);
  cursor: not-allowed;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.field input, .field select, .field textarea {
  font-weight: 400;
  font-size: 14px;
  color: var(--text-primary);
}

.field.narrow-field {
  max-width: 220px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
}

.check input {
  margin-top: 3px;
  flex: none;
}

.check .hint {
  display: block;
  margin: 2px 0 0;
}

.inline-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 400;
}

.inline-field select {
  min-height: 32px;
}

.hint.block {
  display: block;
  margin: 4px 0 0;
}

#useLocationBtn {
  margin-bottom: 14px;
}

.banner {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--r-input);
  font-size: 14px;
}

.banner.error {
  background: var(--theme-danger-soft);
  color: var(--theme-danger);
}

.banner.ok {
  background: var(--theme-primary-soft);
  color: var(--theme-primary);
}

.banner.ok a {
  font-weight: 700;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--type-eyebrow-size);
  line-height: var(--type-eyebrow-lh);
  font-weight: var(--type-eyebrow-weight);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0 20px;
}

.tb-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.search-wrap {
  position: relative;
  flex: 1 1 240px;
  max-width: 360px;
}

.search-wrap .ic {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-wrap input[type=search] {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 36px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-pill);
  font-family: inherit;
  font-size: 14px;
  background: var(--bg-surface);
  color: var(--text-primary);
}

.search-wrap input[type=search]:focus {
  outline: none;
  border-color: var(--theme-primary);
}

.search-wrap input[type=search]::-webkit-search-cancel-button {
  cursor: pointer;
}

.seg {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg-surface);
}

.seg button {
  height: 32px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
}

.seg button:hover {
  background: var(--green-tint-hover);
  color: var(--text-primary);
}

.seg button.active, .seg button.active:hover {
  background: var(--theme-primary);
  color: var(--theme-primary-contrast);
}

.more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-pill);
  cursor: pointer;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color var(--transition), border-color var(--transition);
}

.more-btn .ic {
  flex: none;
}

.more-btn:hover {
  background: var(--green-tint-hover);
  border-color: var(--border-strong);
}

.more-btn.open, .more-btn.open:hover {
  background: var(--theme-primary-soft);
  border-color: var(--theme-primary);
  color: var(--theme-primary);
}

.filter-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}

.filter-panel[hidden] {
  display: none;
}

.filter-panel .fgroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.filter-panel .fgroup h4 {
  margin: 0 0 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.filter-panel .fgroup select {
  width: 100%;
  height: 34px;
  min-height: 0;
  border-color: var(--border);
  background-color: var(--bg-page);
  font-size: 13px;
}

.filter-panel .check-row {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}

.filter-panel .check-row input {
  margin: 0;
  accent-color: var(--theme-primary);
}

.filter-panel .dates {
  display: flex;
  gap: 8px;
}

.filter-panel .dateField {
  gap: 5px;
  font-size: 12.5px;
}

.filter-panel .dateField input[type=date] {
  flex: 1;
  min-width: 0;
  height: 30px;
  min-height: 0;
  padding: 0 6px;
  border-color: var(--border);
  font-size: 12.5px;
}

.active-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.active-row[hidden] {
  display: none;
}

.active-row .muted {
  font-size: var(--type-secondary-size);
  color: var(--text-muted);
}

.active-row .active-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 8px 0 12px;
  border: 0;
  border-radius: var(--r-pill);
  cursor: pointer;
  background: var(--theme-primary-soft);
  color: var(--theme-primary);
  font-family: inherit;
  font-size: var(--type-secondary-size);
  font-weight: 600;
}

.active-row .active-chip:hover {
  background: var(--green-tint-pressed);
}

.active-row .clear-all {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--type-secondary-size);
  color: var(--text-muted);
  text-decoration: underline;
}

select {
  appearance: none;
  -webkit-appearance: none;
  min-height: var(--t-input);
  padding: 0 34px 0 12px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-input);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  cursor: pointer;
  background: var(--bg-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%233c5043' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center/12px 8px;
}

select:hover {
  border-color: var(--theme-primary);
}

select:focus {
  outline: none;
  border-color: var(--theme-primary);
}

#sortSelect {
  height: 38px;
  min-height: 0;
  border-color: var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

.title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  flex-wrap: wrap;
  margin: 0 0 6px;
}

.title-row .page-title {
  margin: 0;
}

.title-row .count {
  margin: 0;
}

.results-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 14px;
}

.results-bar:not(:has(button)) {
  display: none;
}

.pager {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pager button {
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-input);
  background: var(--bg-surface);
  color: var(--theme-primary);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition);
}

.pager button:hover:not(:disabled) {
  background: var(--theme-primary-soft);
}

.pager button.on {
  background: var(--theme-primary);
  border-color: var(--theme-primary);
  color: var(--theme-primary-contrast);
}

.pager button:disabled {
  color: var(--disabled-text);
  border-color: var(--border);
  cursor: default;
}

.pager .gap {
  color: var(--text-muted);
  padding: 0 2px;
}

.pager-bottom {
  justify-content: center;
  margin: 18px 0 0;
}

.dateField {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  color: var(--text-muted);
}

.dateField input[type=date] {
  min-height: var(--t-input);
  padding: 0 8px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-input);
  font-family: inherit;
  font-size: 1rem;
  background: var(--bg-surface);
  color: var(--text-primary);
}

.count {
  font-size: 12.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: var(--sp-card);
}

.card, .row {
  --accent: var(--theme-primary);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-paper);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-raised);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.card.status-to_find, .row.status-to_find {
  --accent: var(--yellow-bar);
}

.card:hover, .row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-float);
}

.card:active, .row:active {
  transform: none;
  background: var(--theme-primary-soft);
}

.row {
  border-left: 5px solid var(--accent);
}

.row:hover {
  transform: translateY(-2px);
}

.name {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-serif);
  font-weight: var(--type-name-card-weight);
}

.sci {
  font-style: italic;
  color: var(--text-muted);
  font-weight: var(--type-sci-card-weight);
}

.meta {
  color: var(--text-muted);
  font-size: var(--type-secondary-size);
  line-height: var(--type-secondary-lh);
  font-weight: 400;
}

.emoji-flag {
  font-family: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
}

.flag .emoji-flag {
  font-size: 0.9em;
}

.card {
  display: flex;
  flex-direction: column;
}

.card .thumb-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--theme-primary-soft);
  flex: none;
  border-bottom: 1px dashed var(--border-strong);
}

.card .thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card .status-badge {
  position: absolute;
  top: 8px;
  left: 8px;
}

.card .no-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: var(--r-tag);
  background: var(--theme-neutral);
  color: var(--theme-neutral-contrast);
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.card .body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 12px 12px;
}

.card .eyebrow {
  margin-bottom: 3px;
  font-size: 10.5px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card .name {
  font-size: var(--type-name-card-size);
  line-height: var(--type-name-card-lh);
}

.card .name .flag {
  align-self: center;
}

.card .sci {
  font-family: var(--font-serif);
  font-size: var(--type-sci-card-size);
  line-height: var(--type-sci-card-lh);
  color: var(--theme-primary-tint);
}

.card .facts {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 16px;
  color: var(--text-muted);
}

.card .snippet {
  margin: 4px 0 0;
  font-size: 11.5px;
  line-height: 16px;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card .tags {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-top: auto;
  padding-top: 10px;
}

.card .tags .info-label {
  width: 100%;
}

.card .foot {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  background: var(--bg-page);
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  line-height: 16px;
  font-weight: 400;
  color: var(--text-muted);
}

.card .foot .place {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card .foot .foot-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.card .foot .date, .card .foot .from-claude {
  font-family: var(--font-mono);
  font-size: 11px;
}

.card .foot .from-claude {
  color: var(--claude-text, var(--text-muted));
}

.conf-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.conf-track {
  flex: 1;
  height: 5px;
  border-radius: var(--r-pill);
  background: rgba(var(--overlay-rgb), 0.1);
  overflow: hidden;
}

.conf-track .fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--confidence-high);
}

.conf-track .fill.ok {
  background: var(--confidence-mid);
}

.conf-track .fill.low {
  background: var(--confidence-low);
}

.conf-pct {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--confidence-high);
}

.conf-pct.ok {
  color: var(--confidence-mid);
}

.conf-pct.low {
  color: var(--confidence-low);
}

.list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-card);
}

.row {
  display: flex;
  align-items: stretch;
  min-height: 80px;
}

.row .thumb-wrap {
  position: relative;
  width: 80px;
  flex: none;
  background: var(--theme-primary-soft);
  overflow: hidden;
}

.row .thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.row .info {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.row .name-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

.row .name {
  flex: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: var(--type-name-card-size);
  line-height: var(--type-name-card-lh);
}

.row .sci-inline {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-style: italic;
  font-weight: 400;
  color: var(--text-muted);
  font-size: var(--type-sci-card-size);
}

.row .conf-row {
  margin-top: 4px;
  max-width: 360px;
}

.row .row-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.row .row-labels .info-label {
  font-weight: 500;
}

.no-photo {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--bg-page);
  color: var(--text-muted);
  font-size: var(--type-secondary-size);
  line-height: 1.2;
  text-align: center;
}

.no-photo svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.row .no-photo {
  gap: 0;
}

.row .no-photo svg {
  width: 24px;
  height: 24px;
}

.row .no-photo span {
  display: none;
}

dialog {
  border: none;
  border-radius: var(--r-dialog);
  padding: 0;
  max-width: min(920px, calc(100% - 32px));
  width: 100%;
  background: var(--bg-paper);
  color: var(--text-primary);
  box-shadow: var(--shadow-overlay);
}

dialog::backdrop {
  background: var(--scrim-dialog);
}

dialog.lightbox-dialog {
  max-width: 94vw;
  width: auto;
  background: transparent;
  text-align: center;
  box-shadow: none;
}

dialog.lightbox-dialog::backdrop {
  background: var(--scrim-lightbox);
}

dialog.lightbox-dialog img {
  max-width: 94vw;
  max-height: 90vh;
  border-radius: var(--r-photo);
}

.round-btn, .detail-header .detail-delete, .detail-header .detail-close {
  position: absolute;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--r-circle);
  cursor: pointer;
  padding: 0;
  background: rgba(var(--overlay-rgb), 0.55);
  color: var(--text-on-fill);
  font-size: 1.3rem;
  line-height: 1;
  transition: background-color var(--transition);
}

.round-btn:hover, .detail-header .detail-delete:hover, .detail-header .detail-close:hover {
  background: rgba(var(--overlay-rgb), 0.8);
}

.lightbox-close {
  position: fixed;
  top: 16px;
  right: 20px;
  background: var(--overlay-fill);
  color: var(--text-on-fill);
  border: none;
  border-radius: var(--r-circle);
  width: 36px;
  height: 36px;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.detail-header {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-dialog) var(--r-dialog) 0 0;
}

.detail-header img {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 50vh;
  object-fit: cover;
  display: block;
  background: var(--bg-page);
}

.detail-header .detail-close {
  top: 14px;
  right: 14px;
}

.detail-header .detail-delete {
  top: 14px;
  right: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-header .detail-delete:hover {
  background: var(--theme-danger);
}

.detail-header-conf {
  position: absolute;
  left: 14px;
  top: 14px;
}

.detail-header-attrib {
  position: absolute;
  right: 12px;
  bottom: 10px;
  background: var(--overlay-fill);
  color: var(--text-on-fill);
  font-size: var(--type-secondary-size);
  padding: 4px 9px;
  border-radius: var(--r-tag);
  max-width: calc(100% - 110px);
}

.detail-header-attrib a {
  color: inherit;
  text-decoration: underline;
}

.detail-body {
  --block-x: 28px;
  display: flex;
  flex-direction: column;
}

.detail-body .title-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 20px;
}

.detail-body .title-block .eyebrow {
  margin-bottom: 4px;
  font-size: 11.5px;
  font-weight: 400;
}

.detail-body .kind-tag {
  align-self: flex-start;
  margin-bottom: 6px;
}

.detail-body h2 {
  font-size: var(--type-name-detail-size);
  line-height: var(--type-name-detail-lh);
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-body h2 .emoji-flag {
  font-size: 0.85em;
}

.detail-body .sci {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--theme-primary-tint);
  font-size: var(--type-sci-size);
  line-height: var(--type-sci-lh);
  font-weight: var(--type-sci-weight);
}

.detail-body .title-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.section-block {
  padding: 14px var(--block-x);
}

.section-block.tone {
  background: var(--block-tone, var(--bg-page));
}

.section-block.tone + .section-block.tone {
  border-top: 1px dashed var(--border-strong);
}

.detail-field, .ribbon-body {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.detail-field .label, .ribbon-body .label {
  font-family: var(--font-serif);
  font-size: var(--type-heading-size);
  line-height: var(--type-heading-lh);
  font-weight: var(--type-heading-weight);
  color: var(--text-primary);
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.detail-field a, .ribbon-body a {
  color: var(--theme-primary);
}

.detail-field textarea, .ribbon-body textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-input);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-surface);
  resize: vertical;
}

.detail-field textarea:focus, .ribbon-body textarea:focus {
  outline: none;
  border-color: var(--theme-primary);
}

.detail-field textarea + button, .ribbon-body textarea + button {
  margin-top: 8px;
}

.data-sources {
  margin-top: 10px;
  font-size: var(--type-secondary-size);
  color: var(--text-muted);
}

.data-sources .ds-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.data-sources .ds-head svg {
  flex: none;
  transition: transform var(--transition);
}

.data-sources .ds-head.open svg {
  transform: rotate(180deg);
}

.data-sources .ds-head b {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}

.data-sources .ds-bar {
  height: 8px;
  margin: 6px 0 0;
  border-radius: var(--r-pill);
  background: var(--claude);
  overflow: hidden;
}

.data-sources .ds-fill {
  height: 100%;
  background: var(--theme-primary);
}

.data-sources .ds-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.data-sources .ds-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  border-top: 1px solid var(--border);
}

.data-sources .ds-source {
  font-family: var(--font-mono);
  text-transform: lowercase;
}

.data-sources .ds-source.claude {
  color: var(--text-primary);
  font-weight: 600;
}

.confidence {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.confidence .conf-bar {
  flex: 1;
  height: 8px;
}

.confidence .pct {
  flex: none;
  font-family: var(--font-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.type-line {
  margin-bottom: 4px;
  font-size: var(--type-secondary-size);
  color: var(--text-muted);
}

.conf-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.conf-bar {
  flex: 0 0 160px;
  height: 6px;
  border-radius: var(--r-pill);
  background: rgba(var(--overlay-rgb), 0.1);
  overflow: hidden;
}

.conf-bar .fill {
  height: 100%;
  background: var(--confidence-high);
}

.conf-bar .fill.ok {
  background: var(--confidence-mid);
}

.conf-bar .fill.low {
  background: var(--confidence-low);
}

.term {
  border-bottom: 1px dotted var(--text-muted);
  cursor: help;
  text-decoration: none;
}

a.term {
  text-decoration: underline;
  text-decoration-style: dotted;
  border-bottom: none;
}

[data-tip] {
  cursor: help;
}

.tooltip-bubble {
  position: fixed;
  z-index: 1000;
  inset: auto;
  margin: 0;
  border: none;
  overflow: visible;
  background: var(--bg-inverse);
  color: var(--text-on-inverse);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.42;
  text-align: left;
  white-space: normal;
  width: max-content;
  max-width: 260px;
  padding: 8px 11px;
  border-radius: var(--r-tooltip);
  box-shadow: var(--shadow-overlay);
  pointer-events: none;
}

.taxonomy {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 26px;
  margin-top: 12px;
}

.tax-item {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg-surface);
}

.tax-item:nth-child(3n) .tax-arrow {
  display: none;
}

.tax-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: -22px;
  display: flex;
  width: 18px;
  justify-content: center;
  color: var(--theme-primary-tint);
}

.tax-line {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--r-card) var(--r-card) 0 0;
  background: var(--theme-neutral-soft);
}

.tax-line .taxon-icon {
  flex: none;
  color: var(--theme-primary-tint);
}

.tax-rank {
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--text-primary);
}

.tax-name {
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--theme-primary);
  text-decoration: none;
}

a.tax-name:hover {
  text-decoration: underline;
}

.tax-desc {
  margin: 0;
  padding: 8px 12px 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-primary);
}

.confidence-value {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ref-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin: 0;
  font-size: 1rem;
}

.ref-row a {
  color: var(--theme-primary);
  font-weight: 600;
  text-decoration: underline;
}

.ref-item {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.ref-plain {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-decoration: none;
}

.ref-plain.capitalize {
  text-transform: capitalize;
}

.ref-fetch-btn {
  min-height: 30px;
  padding: 0 12px;
  border: 1.5px solid var(--theme-primary);
  border-radius: var(--r-button);
  background: var(--bg-surface);
  color: var(--theme-primary);
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  transition: background-color var(--transition);
}

.ref-fetch-btn:hover {
  background: var(--theme-primary-soft);
}

.ref-fetch-btn:disabled {
  background: var(--disabled-bg);
  border-color: var(--disabled-border);
  color: var(--disabled-text);
  cursor: default;
}

.names-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: 2px;
}

.lang-line {
  display: inline-flex;
  align-items: center;
  line-height: 1.4;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.name-flag {
  margin-right: 6px;
  display: inline-flex;
  align-items: center;
  margin-top: -3px;
}

.names-other {
  color: var(--text-muted);
  margin-top: 6px;
}

.gallery-section h3 {
  font-size: var(--type-heading-size);
  line-height: var(--type-heading-lh);
  font-weight: var(--type-heading-weight);
  margin: 4px 0 8px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px 10px;
}

.gallery-item {
  position: relative;
  min-width: 0;
}

.gallery-item .photo-frame {
  position: relative;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--r-photo);
  display: block;
  background: var(--theme-primary-soft);
  cursor: zoom-in;
}

.gallery-item .photo-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: var(--r-circle);
  border: none;
  background: rgba(var(--overlay-rgb), 0.55);
  color: var(--text-on-fill);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.gallery-item .photo-delete:hover {
  background: var(--theme-danger);
}

.gallery-item .organ-tag {
  position: absolute;
  left: 6px;
  top: 6px;
  max-width: calc(100% - 40px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  line-height: 15px;
  text-transform: lowercase;
  font-weight: 500;
  background: rgba(var(--overlay-rgb), 0.55);
  color: var(--text-on-fill);
  padding: 2px 8px;
  border-radius: var(--r-tag);
}

.gallery-item .attrib {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.3;
  display: block;
  word-break: break-word;
}

.gallery-item .attrib a {
  color: inherit;
  text-decoration: underline;
}

.gallery-empty {
  color: var(--text-muted);
  font-style: italic;
}

.gallery-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
}

.gallery-actions select, .gallery-actions input[type=file], .gallery-actions input[type=text] {
  min-height: 32px;
  font-size: 1rem;
  padding: 0 8px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-input);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: inherit;
}

.gallery-actions select:is(select), .gallery-actions input[type=file]:is(select), .gallery-actions input[type=text]:is(select) {
  padding-right: 32px;
}

.gallery-actions input[type=file] {
  padding: 3px 8px;
}

.gallery-actions input[type=text] {
  width: 140px;
}

.gallery-actions button {
  min-height: 32px;
  padding: 0 14px;
  border: none;
  border-radius: var(--r-button);
  cursor: pointer;
  background: var(--theme-primary);
  color: var(--theme-primary-contrast);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  transition: background-color var(--transition);
}

.gallery-actions button:hover {
  background: var(--green-hover);
}

.gallery-actions button:active {
  background: var(--green-pressed);
}

.gallery-actions button:disabled {
  background: var(--disabled-bg);
  color: var(--disabled-text);
  cursor: default;
}

.gallery-section .gallery-actions + .gallery-note {
  margin-top: 14px;
}

.gallery-note {
  font-size: var(--type-secondary-size);
  line-height: var(--type-secondary-lh);
  color: var(--text-muted);
}

.gallery-actions-lg input[type=text] {
  width: 280px;
  min-height: var(--t-input);
  font-size: 1.1rem;
  padding: 0 12px;
}

.gallery-actions-lg button {
  min-height: var(--t-button);
  font-size: 1.1rem;
  padding: 0 18px;
}

.use-cat-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2px;
}

.use-cat-picker label {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border: 1.5px solid var(--theme-primary);
  border-radius: var(--r-pill);
  color: var(--theme-primary);
  background: var(--bg-surface);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition);
}

.use-cat-picker label:hover {
  background: var(--theme-primary-soft);
}

.use-cat-picker label:has(input:checked) {
  background: var(--theme-primary);
  color: var(--theme-primary-contrast);
}

.use-cat-picker label:has(input:checked):hover {
  background: var(--green-hover);
}

.use-cat-picker label:has(input:focus-visible) {
  outline: 2px solid var(--theme-primary);
  outline-offset: 2px;
}

.use-cat-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mine {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

input[type=checkbox] {
  accent-color: var(--theme-primary);
}

.detail-footer {
  font-family: var(--font-mono);
  font-size: var(--type-secondary-size);
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  padding-bottom: 20px;
}

.care-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 32px;
  align-items: start;
}

.care-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.care-rows {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.care-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.care-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--r-tag);
  background: var(--theme-primary-soft);
  color: var(--theme-primary);
}

.care-icon svg {
  width: 15px;
  height: 15px;
}

.care-row .care-label {
  flex: none;
  width: 96px;
  color: var(--text-muted);
}

.care-row .care-value {
  min-width: 0;
  font-weight: 500;
}

.disease-list {
  display: flex;
  flex-direction: column;
  margin-top: 4px;
}

.disease-link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border: 0;
  border-top: 1px solid var(--border);
  background: none;
  font: inherit;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}

.disease-link .disease-name {
  font-style: italic;
}

.disease-link .disease-kind {
  color: var(--text-muted);
  font-size: var(--type-secondary-size);
}

.disease-link:hover .disease-name {
  color: var(--theme-primary);
}

.disease-detail {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg-surface);
}

.disease-detail h4 {
  margin: 0 0 2px;
  font-style: italic;
}

.disease-detail h5 {
  margin: 8px 0 1px;
  font-size: var(--type-secondary-size);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.disease-detail p {
  margin: 0;
}

.switch-status {
  font-size: var(--type-secondary-size);
  margin-left: 8px;
}

.switch-status.ok {
  color: var(--theme-primary);
}

.switch-status.error {
  color: var(--theme-danger);
}

.disease-fold {
  margin-top: 8px;
}

.disease-fold summary {
  cursor: pointer;
  font-weight: 600;
  padding: 4px 0;
}

.data-credits {
  padding-top: 16px;
  padding-bottom: 4px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
}

.data-credits a {
  color: inherit;
  text-decoration: underline;
}

.data-credits span {
  margin-right: 4px;
}

.ribbons {
  margin: 0;
  border-top: 1px solid var(--border);
}

.ribbon {
  border-bottom: 1px solid var(--border);
}

.ribbon.tone {
  background: var(--block-tone, var(--bg-page));
}

.ribbon > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px var(--block-x);
  cursor: pointer;
  list-style: none;
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 22px;
  font-weight: 500;
}

.ribbon > summary::-webkit-details-marker {
  display: none;
}

.ribbon > summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 3px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform var(--transition);
}

.ribbon > summary:hover {
  background: var(--theme-primary-soft);
}

.ribbon[open] > summary::after {
  transform: rotate(-135deg);
}

.ribbon .ribbon-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px var(--block-x) 22px;
}

.detail-body input[type=file]::file-selector-button {
  margin-right: 10px;
  padding: 4px 12px;
  border: 1.5px solid var(--theme-primary);
  border-radius: var(--r-button);
  cursor: pointer;
  background: var(--bg-surface);
  color: var(--theme-primary);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
}

.detail-body input[type=file]::file-selector-button:hover {
  background: var(--theme-primary-soft);
}

@media (max-width: 900px) {
  .filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .main-row {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .filter-panel {
    grid-template-columns: minmax(0, 1fr);
  }
  .search-wrap {
    flex: 1 1 100%;
    max-width: none;
  }
  .results-bar .count {
    flex: 1 1 100%;
  }
  .cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .detail-body {
    --block-x: 16px;
  }
  .taxonomy {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tax-item:nth-child(3n) .tax-arrow {
    display: flex;
  }
  .tax-item:nth-child(2n) .tax-arrow {
    display: none;
  }
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .care-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
