:root {
  --green: #2f5d50;
  --green-dark: #23463c;
  --bg: #f7f7f4;
  --text: #2e2e2e;
  --muted: #6b6b6b;
  --gold: #f2c94c;
  --white: #ffffff;
  --shadow: 0 0.625rem 1.75rem rgba(47, 93, 80, 0.12);
  --radius: 1rem;
  --radius-sm: 0.75rem;
  --max-width: 47.5rem;
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Source Sans 3", "Helvetica Neue", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: radial-gradient(circle at top, #ffffff 0%, #f7f7f4 50%, #eef2ee 100%);
  min-height: 100vh;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 0.625rem 0.625rem 1.5rem;
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 247, 244, 0.95);
  backdrop-filter: blur(0.5rem);
  border-bottom: 0.0625rem solid rgba(47, 93, 80, 0.12);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0 0.625rem;
  width: min(100%, var(--max-width));
  margin: 0 auto;
}

.logo {
  width: 3rem;
  height: 3rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0;
}

.found-counter {
  font-size: 0.9rem;
  color: var(--green-dark);
  background: #e6efe9;
  padding: 0.375rem 0.625rem;
  border-radius: 62.4375rem;
}

.nav {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  padding: 0.125rem 0.625rem 0.25rem;
  font-size: 0.95rem;
}

.nav a {
  padding: 0.375rem 0.75rem;
  border-radius: 62.4375rem;
  color: var(--green-dark);
  border: 0.0625rem solid transparent;
}

.nav a[aria-current="page"] {
  background: var(--green);
  color: var(--white);
}

.nav a:focus-visible,
.button:focus-visible,
.select:focus-visible,
.bird-row:focus-visible,
.bird-thumb:focus-visible,
.modal-close:focus-visible {
  outline: 0.125rem solid var(--gold);
  outline-offset: 0.125rem;
}

.hero-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 0.75rem;
  box-shadow: var(--shadow);
  border: 0.0625rem solid rgba(47, 93, 80, 0.12);
}

.season-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--green-dark);
}

.list {
  display: grid;
  gap: 0.25rem;
}

.bird-row {
  display: grid;
  grid-template-columns: 4.875rem 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.375rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 0.0625rem solid rgba(47, 93, 80, 0.12);
  box-shadow: 0 0.375rem 1rem rgba(47, 93, 80, 0.08);
  cursor: pointer;
}

.bird-row:hover {
  transform: translateY(-0.0625rem);
  transition: transform 0.15s ease;
}

.bird-row.is-found {
  border-color: rgba(47, 93, 80, 0.4);
  background: #eaf4ee;
}

.bird-row.is-seasonal {
  background: #fdf6e1;
}

body[data-season="winter"] .bird-row.is-seasonal {
  background: #e9f4ff;
}

body[data-season="winter"] .bird-row.is-seasonal.is-found {
  background: #d7ebff;
  border-color: rgba(45, 123, 179, 0.4);
}

.bird-thumb {
  position: relative;
  width: 4.375rem;
  height: 4.375rem;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 0.125rem solid transparent;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.bird-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bird-thumb .check {
  position: absolute;
  bottom: 0.25rem;
  right: 0.25rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.bird-row.is-found .bird-thumb .check {
  opacity: 1;
  transform: scale(1);
}

.bird-name {
  font-weight: 600;
  font-size: 1.12rem;
}

.bird-meta {
  display: flex;
  gap: 0.375rem;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.85rem;
}

.tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--gold);
  color: var(--text);
  padding: 0.125rem 0.5rem;
  border-radius: 62.4375rem;
}

.chevron {
  color: var(--green-dark);
}

.chevron .icon {
  width: 1.5rem;
  height: 1.5rem;
}

.modal-close .icon {
  width: 1.5rem;
  height: 1.5rem;
}

.card {
  margin-top: 1.25rem;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.125rem;
  box-shadow: var(--shadow);
  border: 0.0625rem solid rgba(47, 93, 80, 0.12);
}

.card h2 {
  font-family: var(--font-display);
  margin-top: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.125rem;
  border-radius: 62.4375rem;
  border: none;
  background: var(--green);
  color: var(--white);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  color: var(--green-dark);
  border: 0.0625rem solid rgba(47, 93, 80, 0.4);
}

.button.text {
  background: transparent;
  color: var(--muted);
  padding: 0;
}

.select {
  width: 100%;
  padding: 0.625rem 2.5rem 0.625rem 0.75rem;
  border-radius: 0.75rem;
  border: 0.0625rem solid rgba(47, 93, 80, 0.3);
  font-size: 1rem;
  background: var(--white);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem 1rem;
}

.footer-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 1.5rem;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.125rem;
  background: rgba(47, 93, 80, 0.35);
  z-index: 30;
}

.modal.is-open {
  display: flex;
}

.modal-card {
  background: var(--white);
  border-radius: 1.25rem;
  width: min(100%, 32.5rem);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.125rem 0.5rem;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0;
}

.modal-close {
  border: none;
  background: transparent;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--muted);
  padding: 0.5rem;
}

.modal-body {
  padding: 0 1.125rem 1.125rem;
  overflow-y: auto;
}

.modal-body p {
  color: var(--muted);
  line-height: 1.5;
}

.modal-footer {
  position: sticky;
  bottom: 0;
  background: var(--white);
  padding: 0.75rem 1.125rem 1.125rem;
  border-top: 0.0625rem solid rgba(47, 93, 80, 0.12);
}

.modal-footer .button {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.05rem;
}

.modal-hero {
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 0.875rem;
}

.modal .logo {
  width: 8.75rem;
  height: 8.75rem;
  margin-bottom: 0.625rem;
}

.season-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 0.0625rem dashed rgba(47, 93, 80, 0.4);
  background: #f4f6f0;
}

.location-row {
  margin-top: 0.375rem;
}

.season-label {
  font-weight: 600;
  color: var(--green-dark);
}

.location-row .season-toggle {
  min-width: 0;
}

.location-value {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 12rem;
}


@media (min-width: 42rem) {
  .header {
    position: sticky;
  }

  .nav {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 0;
  }
}

@media (min-width: 45rem) {
  .location-value {
    max-width: 20rem;
  }
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.season-icon {
  color: #f2c94c;
}

body[data-season="winter"] .season-icon {
  color: #5aa9e6;
}

.bird-thumb .icon {
  width: 0.875rem;
  height: 0.875rem;
}

.habitat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0.625rem 0;
  padding: 0;
  list-style: none;
}

.habitat-list li {
  background: #e6efe9;
  color: var(--green-dark);
  padding: 0.25rem 0.625rem;
  border-radius: 62.4375rem;
  font-size: 0.8rem;
}

.assets-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.asset-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem;
  border: 0.0625rem solid rgba(47, 93, 80, 0.12);
  box-shadow: var(--shadow);
}

.asset-card small {
  color: var(--muted);
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  background: var(--green);
  color: var(--white);
  padding: 0.625rem 1rem;
  border-radius: 62.4375rem;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(0.625rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 40;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--white);
  border-top: 0.0625rem solid rgba(47, 93, 80, 0.2);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 -0.375rem 1.5rem rgba(47, 93, 80, 0.12);
}

.consent-banner p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
}

.consent-actions {
  display: flex;
  gap: 0.5rem;
}

.consent-actions .button {
  flex: 1;
}

@media (min-width: 42rem) {
  .consent-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .consent-actions {
    flex: 0 0 auto;
  }
}


@media (min-width: 42rem) {
  .header {
    position: sticky;
  }

  .nav {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 0;
  }
}

@media (min-width: 45rem) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
  }

  .page-title {
    font-size: 1.6rem;
  }

  .bird-row {
    padding: 0.625rem 0.75rem;
  }

  .assets-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 40rem) {
  .modal {
    align-items: flex-end;
    padding: 0;
  }

  .modal-card {
    width: 100%;
    max-height: 92vh;
    border-radius: 1.25rem 1.25rem 0 0;
  }
}

@supports (-webkit-touch-callout: none) {
  @media (max-width: 40rem) {
    .modal-card {
      max-height: 88vh;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.season-change {
  padding: 0.375rem 0.75rem;
  font-size: 0.85rem;
}
