:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f4f7f4;
  background: #10231b;
  --bg: #10231b;
  --panel: rgba(32, 60, 48, .88);
  --panel-2: rgba(43, 76, 61, .72);
  --line: rgba(255,255,255,.15);
  --line-strong: rgba(255,255,255,.26);
  --text: #f4f7f4;
  --muted: #c6d1ca;
  --accent: #6d9d7f;
  --accent-strong: #8eb69b;
  --danger: #ffb0b0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 18px 36px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(79,123,97,.20), transparent 34%),
    radial-gradient(circle at 88% 24%, rgba(90,117,101,.13), transparent 28%),
    linear-gradient(180deg, #1b2a23 0%, #10231b 42%, #0d1c16 100%);
}

.shell {
  max-width: 1180px;
  margin: 0 auto;
}

.brand-header {
  margin: 0 -18px 26px;
  padding: 28px 18px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(29,42,35,.98), rgba(24,38,31,.92));
  box-shadow: 0 16px 38px rgba(0,0,0,.18);
}

.brand-wrap {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand-logo {
  width: 138px;
  height: 138px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,.28));
}

.brand-copy {
  min-width: 0;
  flex: 1;
}

.brand-name {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(34px, 3.8vw, 48px);
  line-height: 1.05;
  font-weight: 850;
  letter-spacing: .025em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.18);
}

.brand-tagline {
  margin: 7px 0 0;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 650;
  color: #dbe7df;
}

.page-title-block {
  margin-top: 18px;
}

.page-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(23px, 2.4vw, 31px);
  line-height: 1.08;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.16);
}

.sub {
  margin: 7px 0 0;
  max-width: 820px;
  line-height: 1.45;
  color: var(--muted);
  font-size: 14px;
}

.clear-button {
  margin-top: 0;
  padding: 10px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255,255,255,.07);
  color: #fff;
  cursor: pointer;
  font-weight: 750;
  white-space: nowrap;
}

.clear-button:hover { background: rgba(255,255,255,.13); }

.mode-card,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,.14);
  backdrop-filter: blur(6px);
}

.mode-card {
  margin-top: 18px;
  padding: 18px 20px;
}

.card {
  padding: 20px;
  margin-top: 22px;
}

.mode-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.mode-label {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 0;
  color: #eef5f0;
}

.mode-switch {
  display: flex;
  width: fit-content;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,.04);
}

.mode-button {
  border: 0;
  background: transparent;
  padding: 10px 21px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  color: #d7e2db;
}

.mode-button.active {
  background: #dfe9e2;
  color: #1d3327;
}

.mode-help {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

#searchForm { display: flex; flex-direction: column; }
.search-section {
  position: relative;
  z-index: 1;
  transition: order .15s ease;
}

/* Keep an open autocomplete card above every card that follows it.
   The JS class is more reliable than focus alone when the pointer moves
   from the input into the dropdown. */
.search-section:focus-within { z-index: 800; }
.search-section.dropdown-open { z-index: 1200; }
.section-title { margin: 0 0 18px; font-size: 24px; color: #fff; }

.location-grid {
  display: grid;
  grid-template-columns: 140px 155px minmax(180px, .9fr) minmax(300px, 1.7fr);
  gap: 12px;
  align-items: start;
}

.bird-row { max-width: 740px; }

.field,
label {
  display: grid;
  gap: 7px;
  font-weight: 650;
  color: #f0f5f2;
}

label span { color: var(--danger); }
input, select, button { font: inherit; }

input,
select {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: rgba(247,250,248,.95);
  color: #18251e;
  outline: none;
}

input:focus,
select:focus {
  border-color: #a7cab2;
  box-shadow: 0 0 0 3px rgba(167,202,178,.18);
}

input:disabled {
  background: rgba(229,235,231,.72);
  color: #677169;
}

.autocomplete { position: relative; }

.suggestions {
  position: absolute;
  z-index: 1400;
  left: 0;
  right: 0;
  top: 73px;
  max-height: 360px;
  overflow-y: auto;
  background: #f7faf8;
  border: 1px solid #bdc9c1;
  border-radius: 9px;
  box-shadow: 0 14px 34px rgba(0,0,0,.28);
}

.suggestions.hidden { display: none; }

.suggestion-heading {
  padding: 8px 12px;
  background: #e8eee9;
  color: #445248;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid #d5ddd7;
}

.suggestion {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #e0e6e2;
  background: #f7faf8;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  color: #17211b;
}

.suggestion:hover { background: #eaf1ec; }
.group-suggestion { background: #edf4ef; }
.suggestion strong, .suggestion small { display: block; }
.suggestion small { margin-top: 3px; color: #657067; line-height: 1.35; }
.no-result { padding: 12px; color: #59655d; }

.selected {
  min-height: 16px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.action-row {
  order: 3;
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 18px;
}

.primary-button {
  padding: 11px 18px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 9px;
  cursor: pointer;
  background: #7fa58b;
  color: #112219;
  font-weight: 850;
}

.primary-button:hover { background: #93b39d; }

.mandatory {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.result-head h2 { margin: 0; color: #fff; }
#status { font-size: 14px; color: var(--muted); }
.summary { margin: 12px 0; color: #e8f0eb; }
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #dce7e0;
}
td { color: #f0f4f1; }
td small { color: var(--muted); }

footer {
  padding: 18px 2px;
  font-size: 12px;
  color: #aebdb4;
}

.bird-choice {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.choice-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1 1 320px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  cursor: pointer;
}

.choice-option input { width: auto; min-height: 0; margin-top: 3px; }
.choice-option span { color: inherit; }
.choice-option strong { display: block; color: #fff; }
.choice-option small { display: block; margin-top: 4px; color: var(--muted); font-weight: 400; line-height: 1.35; }
.hidden { display: none !important; }

@media (max-width: 900px) {
  .location-grid { grid-template-columns: 1fr; }
  .mode-card-top { align-items: flex-start; }
  .bird-row { max-width: none; }
  .action-row { align-items: flex-start; flex-direction: column; }
  .brand-wrap { align-items: flex-start; }
  .brand-logo { width: 96px; height: 96px; }
  .brand-name { font-size: 30px; }
  .page-title { font-size: 26px; }
}

@media (max-width: 620px) {
  body { padding-left: 12px; padding-right: 12px; }
  .brand-header { margin-left: -12px; margin-right: -12px; }
  .brand-wrap { gap: 14px; }
  .brand-logo { width: 72px; height: 72px; }
  .brand-name { font-size: 24px; }
  .brand-tagline { font-size: 13px; }
  .page-title-block { margin-top: 14px; }
  .page-title { font-size: 22px; }
  .card, .mode-card { padding: 16px; }
}
