:root { color-scheme: light; font-family: Inter, ui-sans-serif, system-ui, sans-serif; background: #f3f5ec; color: #203126; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top, #fffdf2, #e7eddd); }
main { width: min(760px, 100%); background: rgba(255,255,255,.82); padding: clamp(24px, 5vw, 48px); border-radius: 28px; box-shadow: 0 20px 60px rgba(41,65,45,.12); }
.eyebrow { color: #64815f; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; }
h1 { font-family: Georgia, serif; font-size: clamp(2.3rem, 8vw, 4.4rem); line-height: .98; margin: 12px 0; font-weight: 500; }
.lead { color: #657068; line-height: 1.6; }
.drop { margin: 28px 0 14px; min-height: 260px; border: 1.5px dashed #95a58f; border-radius: 20px; display: grid; place-items: center; overflow: hidden; cursor: pointer; background: #f7f8f1; color: #52654f; }
.drop img { width: 100%; height: 320px; object-fit: cover; }
input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
button { width: 100%; border: 0; border-radius: 999px; padding: 15px 20px; background: #315d42; color: white; font: inherit; font-weight: 700; cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
.location-note { display: flex; gap: 8px; align-items: center; color: #657068; font-size: .9rem; margin: 0 4px 16px; }
#status { min-height: 24px; color: #8a3c2f; }
#result { border-top: 1px solid #dce2d6; margin-top: 22px; padding-top: 22px; }
#result h2 { font-family: Georgia, serif; font-size: 2rem; margin: 0 0 8px; }
.meta, .tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { background: #e8eee2; border-radius: 999px; padding: 6px 10px; font-size: .85rem; }
.warning { color: #8a5b1d; background: #fff4d8; border-radius: 12px; padding: 12px; }
.place { margin-top: 18px; padding: 14px; border-radius: 14px; background: #f1f4ec; color: #526058; font-size: .9rem; }
.image-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.image-compare figure { margin: 0; min-width: 0; }
.image-compare img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; background: #e8eee2; }
.image-compare figcaption { padding: 7px 2px 0; color: #657068; font-size: .78rem; }
.reference-empty { width: 100%; aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 16px; text-align: center; border-radius: 14px; background: #e8eee2; color: #657068; }
.original-photo { margin: 20px 0; }
.original-photo img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 16px; }
.original-photo figcaption, .candidate-card figcaption { padding-top: 7px; color: #657068; font-size: .78rem; }
.comparison-note { color: #6d5a3d; }
.candidate-grid { margin: 20px 0; }
.candidate-grid.has-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: stretch; }
.candidate-card { border: 1px solid #d7ddd2; border-radius: 18px; padding: 18px; background: #fbfcf7; transition: border-color .15s, box-shadow .15s; }
.candidate-card.selected { border-color: #315d42; box-shadow: 0 0 0 2px rgba(49,93,66,.14); }
.candidate-card h3 { font-family: Georgia, serif; font-size: 1.6rem; margin: 5px 0; }
.candidate-card figure { margin: 16px 0; }
.candidate-card figure img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: #e8eee2; }
.candidate-rank { color: #7c847e; font-weight: 700; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.scientific-name { margin-top: 0; color: #657068; }
.choose-candidate { margin-top: 16px; padding: 11px 14px; background: #5a745d; }
.save-button { margin-top: 18px; background: #bb6b38; }
.records { border-top: 1px solid #dce2d6; margin-top: 40px; padding-top: 30px; }
.records-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.records-heading h2 { font-family: Georgia, serif; font-size: 2rem; margin: 4px 0 0; }
#record-count { color: #657068; white-space: nowrap; }
.empty { color: #778079; padding: 24px 0; }
.record-card { padding: 24px 0; border-bottom: 1px solid #dce2d6; }
.record-card h3 { font-family: Georgia, serif; font-size: 1.6rem; margin: 0 0 4px; }
.record-card .record-time, .record-card .record-place { color: #657068; font-size: .9rem; line-height: 1.5; }
.record-card .record-place { margin: 8px 0; }
.record-card a { color: #315d42; }
footer { margin-top: 30px; color: #7c847e; font-size: .75rem; }
footer a { color: inherit; }
@media (max-width: 620px) { .image-compare, .candidate-grid.has-comparison { grid-template-columns: 1fr; } }
