﻿:root {
    color-scheme: light;
    --ink: #21372d;
    --muted: #52645a;
    --green: #214c3a;
    --green-hover: #143727;
    --paper: #f5f3eb;
    --surface: #fffef9;
    --line: #cdd6cb;
    --soft-green: #e4ecdf;
    --radius: 18px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--green); text-underline-offset: .2em; }
button, input, select { font: inherit; }
button, input, select, summary, a { -webkit-tap-highlight-color: transparent; }
button { background: var(--green); color: #fff; border: 1px solid var(--green); border-radius: 9px; padding: .65rem 1rem; cursor: pointer; font-weight: 650; min-height: 44px; }
button:hover:not(:disabled) { background: var(--green-hover); }
button:disabled { opacity: .55; cursor: not-allowed; }
button.secondary { background: var(--surface); color: var(--green); border-color: var(--line); }
button.quiet { color: var(--green); background: transparent; border-color: transparent; text-decoration: underline; text-underline-offset: .2em; }
button.secondary:hover:not(:disabled), button.quiet:hover:not(:disabled) { background: var(--soft-green); }
:focus-visible { outline: 3px solid #a05a13; outline-offset: 4px; }
h1, h2, h3, h4, p { margin: 0 0 1rem; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3.3rem); }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.15rem; }
label { display: flex; flex-direction: column; gap: .35rem; font-size: .95rem; font-weight: 600; margin-bottom: 1rem; }
input, select { width: 100%; max-width: 100%; min-width: 0; min-height: 44px; border: 1px solid #84988a; border-radius: 8px; background: #fff; color: var(--ink); padding: .6rem .75rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; min-width: 0; }
legend { font-size: 1.1rem; font-weight: 700; margin-bottom: .75rem; }
summary { cursor: pointer; min-height: 44px; padding: .6rem 0; color: var(--green); font-weight: 600; }
details { margin: .8rem 0; }
figure { margin: 0; }
.birdy-shell { max-width: 1440px; margin: 0 auto; }
.app-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.3rem; padding: 1.5rem 3rem; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; font-size: 1.6rem; font-weight: 750; letter-spacing: -.03em; }
.brand img { width: 68px; height: 60px; object-fit: contain; }
.brand small { display: block; font-size: .875rem; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.app-header nav { display: flex; flex-wrap: wrap; gap: .3rem; }
.app-header nav a { padding: .65rem 1rem; border-radius: 30px; text-decoration: none; font-weight: 650; }
.app-header nav a[aria-current="page"] { background: var(--green); color: #fff; }
.location-strip { padding: .75rem 3rem; background: var(--soft-green); font-size: .9rem; overflow-wrap: anywhere; }
.location-strip span { color: var(--muted); }
main { padding: 3rem; min-height: 65vh; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-heading p:last-child { margin-bottom: 0; color: var(--muted); }
.section-heading label { margin: 0; min-width: 120px; }
.eyebrow { text-transform: uppercase; letter-spacing: .13em; color: var(--green); font-size: .875rem; font-weight: 700; margin-bottom: .65rem; }
.badge { border: 1px solid var(--line); border-radius: 30px; padding: .5rem .9rem; font-size: .95rem; background: var(--surface); }
.daily-card { display: grid; grid-template-columns: 1.05fr 1fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: 0 12px 35px #21372d09; }
.daily-card .bird-photo { background: #e9eddf; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.daily-card .bird-photo img { max-height: 560px; }
.daily-copy { padding: clamp(1.5rem, 3vw, 3rem); min-width: 0; }
.daily-copy h2 { font-size: clamp(2rem, 4vw, 3rem); }
.scientific { font-style: italic; color: var(--muted); }
dl { margin: 1.5rem 0; }
dl div { margin-bottom: 1rem; }
dt { color: var(--muted); font-size: .875rem; }
dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.completion { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.completion .metadata { margin-top: .6rem; }
.metadata, figcaption { font-size: .875rem; color: var(--muted); }
.bird-photo a { display: block; }
.bird-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; display: block; background: #edf0e6; }
.bird-photo figcaption { padding: .5rem 1rem; }
.bird-photo > .metadata { padding: 0 1rem; }
.species-information { margin: 0; padding: .4rem 1rem; border-top: 1px solid var(--line); }
.photo-placeholder { aspect-ratio: 4 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1.5rem; color: var(--muted); background: #edf0e6; }
.photo-placeholder > span { font-size: 3rem; line-height: 1; margin-bottom: 1rem; }
.bird-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; align-items: start; }
.bird-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); min-width: 0; }
.card-copy { padding: 1.3rem; overflow-wrap: anywhere; }
.card-copy h2 { font-size: 1.55rem; margin-bottom: .4rem; }
.card-copy p { margin-bottom: .75rem; }
.explore-toolbar { display: flex; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.explore-toolbar label:first-child { flex: 1; min-width: min(260px, 100%); }
.explore-toolbar label:last-child { min-width: 180px; }
.pagination, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.pagination { justify-content: center; margin-top: 2rem; }
.empty-state { border: 1px dashed #93a88c; border-radius: var(--radius); padding: 3rem 2rem; text-align: center; background: #fbfaf4; }
.empty-state .actions { justify-content: center; }
.notice, .error { padding: 1rem; border-radius: 8px; overflow-wrap: anywhere; }
.notice { background: var(--soft-green); color: var(--green); }
.error { background: #fce8df; color: #842e17; border: 1px solid #d99d89; }
.settings-dialog { width: min(650px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; color: var(--ink); background: var(--surface); overflow-y: auto; }
.settings-dialog::backdrop { background: #172d2377; }
.settings-dialog .section-heading { margin-bottom: 1.2rem; }
.settings-dialog .section-heading h2 { margin: 0; }
.settings-dialog section { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.settings-dialog .actions { margin-bottom: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.backup-preview { background: var(--soft-green); padding: 1rem; border-radius: 10px; }
.checkbox-label { flex-direction: row; align-items: center; }
.checkbox-label input { width: 20px; height: 20px; min-height: 20px; flex-shrink: 0; }
.species-results { max-height: 240px; overflow-y: auto; list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 8px; }
.species-results button { width: 100%; text-align: left; text-decoration: none; }
.species-results .scientific { display: block; font-size: .9rem; }
.record-list { padding: 0; list-style: none; }
.record-list li { border-top: 1px solid var(--line); padding: .75rem 0; }
.record-list button { font-size: .9rem; padding: .4rem .5rem; }
.collection-actions { margin-bottom: 1.5rem; }
.app-footer { padding: 2rem 3rem; color: var(--muted); border-top: 1px solid var(--line); font-size: .875rem; }
.app-footer p { margin-bottom: .4rem; }
.skip-link { position: fixed; top: 1rem; left: 1rem; transform: translateY(-200%); background: var(--surface); padding: .75rem; z-index: 10; }
.skip-link:focus { transform: translateY(0); }
@media (max-width: 1100px) {
    .app-header { padding: 1.25rem 1.5rem; }
    .location-strip { padding: .75rem 1.5rem; }
    main { padding: 2rem 1.5rem; }
    .bird-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-footer { padding: 2rem 1.5rem; }
}
@media (max-width: 720px) {
    .daily-card { grid-template-columns: 1fr; }
    .app-header nav { order: 3; width: 100%; }
    .app-header nav a { flex: 1; text-align: center; padding: .65rem .5rem; }
    .brand small { max-width: 180px; }
    .bird-grid { grid-template-columns: 1fr; }
    .settings-dialog { padding: 1.25rem; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .daily-copy { padding: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
