/* Ladybug Plants — minimal static log */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #1f2421;
  background: #f6f4ef;
  -webkit-font-smoothing: antialiased;
}
a { color: #2f5d3b; }
header.site {
  padding: 28px 20px 8px;
  max-width: 1100px;
  margin: 0 auto;
}
header.site h1 {
  font-size: 1.8rem;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
header.site .meta {
  color: #5e6663;
  font-size: 0.95rem;
}
.filters {
  position: sticky;
  top: 0;
  background: #f6f4efdd;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10;
  padding: 12px 20px;
  margin: 8px 0 0;
  border-bottom: 1px solid #e3dfd5;
}
.filters-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill {
  appearance: none;
  border: 1px solid #d6d1c4;
  background: #fff;
  color: #1f2421;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.pill:hover { background: #ece7d8; }
.pill[aria-pressed="true"] {
  background: #2f5d3b;
  color: #fff;
  border-color: #2f5d3b;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1100px;
  margin: 24px auto 60px;
  padding: 0 20px;
}
@media (max-width: 880px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; gap: 14px; } }
.card {
  background: #fff;
  border: 1px solid #e3dfd5;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-align: left;
  font: inherit;
  color: inherit;
  padding: 0;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.card .photo {
  aspect-ratio: 1 / 1;
  width: 100%;
  background: #eee;
  overflow: hidden;
}
.card .photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.card .body { padding: 12px 14px 14px; }
.card .common {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 2px;
}
.card .latin {
  font-style: italic;
  color: #5e6663;
  font-size: 0.9rem;
  margin: 0 0 8px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  background: #ece7d8;
  color: #4a4f48;
}
.tag.conf-high   { background: #d3ecd6; color: #1f5025; }
.tag.conf-medium { background: #fbedc4; color: #6e4a05; }
.tag.conf-low    { background: #f3d5cf; color: #7a2a1b; }
.tag.conf-na     { background: #e3dfd5; color: #4a4f48; }
.tag.native      { background: #d1e9da; color: #1d4934; }
.tag.invasive    { background: #f6c8c0; color: #8a1f12; }
.tag.followup    { background: #e6dcf5; color: #4c3884; }
.card .desc {
  font-size: 0.88rem;
  color: #3b3f3c;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Detail modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 25, 22, 0.6);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 100;
  padding: 24px 12px;
  overflow-y: auto;
}
.modal.open { display: flex; }
.modal-card {
  background: #fff;
  max-width: 760px;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}
.modal-photo {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  background: #1f2421;
  display: block;
}
.modal-body { padding: 20px 22px 24px; }
.modal-body h2 {
  margin: 0 0 2px;
  font-size: 1.4rem;
}
.modal-body .latin {
  font-style: italic;
  color: #5e6663;
  margin: 0 0 12px;
}
.modal-body .field {
  margin: 12px 0;
}
.modal-body .field-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5e6663;
  font-weight: 600;
  margin-bottom: 2px;
}
.modal-body p { margin: 4px 0; }
.modal-close {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(255,255,255,0.92);
  border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
footer.site {
  text-align: center;
  padding: 30px 20px 50px;
  color: #5e6663;
  font-size: 0.85rem;
}
.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #5e6663;
  padding: 40px 0;
}
