* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background-color: #c3c6c6;
  color: #333;
}

/* Page grid: top bar, hero, main, footer */
.page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}

/* 1. Top bar with social icons */
.top-bar {
  background-color: #8c6239;
  color: #fff;
  /* padding: 0.5rem 1.5rem; */
  min-height: 40px;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.9rem;
}

.top-bar-coming-soon {
  background-color: #2b322d;
  color: #fff;
  min-height: 40px;
  display: grid;
  grid-template-rows: 2fr;
  justify-content: center;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.9rem;
}

.top-bar-socials {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: 40px;
  height: 40px;
}

.icon {
  color: #fff;
  width: 40px;
  height: 40px;
}

.icon-link:hover {
  background-color: #2b322d;
  width: 40px;
  height: 40px;
}

.hero {
  position: sticky;
  top: 0;
  z-index: 2000;

  background-color: #2b322d;
  color: #fff;
  display: grid;
  grid-template-columns: 1fr 4fr; /* 25% / 75% ratio */
  gap: 1.5rem;
  padding: 1.5rem;
  padding-top: 0;
  padding-bottom: 0;
  align-items: stretch;
  /* border-bottom: 1px solid #fff; */
  max-height: 200px;
}

.logo {
  font-size: 1.6rem;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.logo > a > img {
  width: 100%;
  max-height: 175px;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  object-fit: contain;
}

.nav {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1.5rem;
  color: #fff;
}

.nav a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
}

.nav a:hover {
  text-decoration: underline;
}

.main-full-width {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
}

.main-with-sidebar {
  --sidebar-width: 320px;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  /* grid-template-columns: minmax(260px, 320px) 1fr; */
  /* gap: 1.5rem; */
  /* padding: 1.5rem; */
  min-height: 0;
  height: calc(100vh - 260px);
  position: relative;
}

.sidebar {
  background-color: #ffffff;
  padding: 1rem;
  border-radius: 4px;
  border: 1px solid #ddd;
  overflow: auto;
}

.content {
  --map-quick-left: 21px;
  --map-quick-size: 44px;
  --map-bottom-tab-strip-height: 34px;
  --map-bottom-tab-strip-offset: var(--map-bottom-tab-strip-height);
  background-color: #ffffff;
  position: relative;
  display: flex;
  padding: 0;
  border-radius: 4px;
  border: 1px solid #ddd;
  overflow: hidden;
  min-height: 0;
}

.sidebar label,
.sidebar button,
.sidebar select,
.sidebar input {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
}

.sidebar input,
.sidebar select,
.sidebar button {
  padding: 0.45rem;
}

.sidebar input[type="checkbox"] {
  display: inline-block;
  width: auto;
  margin-top: 0;
  margin-right: 0.4rem;
  vertical-align: middle;
}

.sidebar-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0.25rem;
  margin-bottom: 0;
  border-bottom: 1px solid #cfd7dc;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.sidebar-tab-btn {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin-top: 0;
  padding: 0.52rem 0.65rem;
  border: 1px solid transparent;
  border-bottom: 0;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  background: linear-gradient(180deg, #edf3f7 0%, #dfe8ee 100%);
  color: #415360;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.15;
  cursor: pointer;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease;
}

.sidebar-tab-btn.is-active {
  border-color: #cfd7dc;
  background: #fff;
  color: #18384e;
  transform: translateY(1px);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.95) inset;
}

.sidebar-tab-btn:focus-visible {
  outline: 2px solid #2e77aa;
  outline-offset: 1px;
}

.sidebar-tab-panel {
  border: 1px solid #cfd7dc;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #fff;
  padding: 0.8rem 0.75rem 0.25rem;
  margin-bottom: 0.9rem;
}

.layer-group {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e8e8e8;
}

.layer-group h3 {
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.address-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: center;
}

.address-search-group.location-mode .address-search-row {
  display: none;
}

.address-search-row input {
  margin-top: 0;
}

.address-search-row button {
  margin-top: 0;
  width: auto;
  min-width: 78px;
}

.address-search-actions {
  margin-top: 0.45rem;
  display: flex;
  justify-content: flex-start;
}

.address-search-actions button {
  width: auto;
  margin-top: 0;
  padding: 0.34rem 0.48rem;
  font-size: 0.78rem;
}

.address-search-results {
  margin-top: 0.45rem;
  display: grid;
  gap: 0.35rem;
}

.address-search-result-item {
  width: 100%;
  margin-top: 0;
  border: 1px solid #d7dfe4;
  border-radius: 6px;
  background: #f7fbff;
  padding: 0.45rem 0.5rem;
  text-align: left;
  color: #1b2c39;
  cursor: pointer;
}

.address-search-result-item:hover,
.address-search-result-item:focus-visible {
  border-color: #9db5c5;
  background: #eef6fc;
}

.address-search-result-title {
  margin: 0;
  font-size: 0.83rem;
  font-weight: 600;
}

.address-search-result-meta {
  margin: 0.12rem 0 0;
  font-size: 0.74rem;
  color: #536772;
}

.address-search-empty {
  margin: 0;
  font-size: 0.8rem;
  color: #666;
}

.user-location-popup {
  display: grid;
  gap: 0.35rem;
}

.user-location-popup-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
}

.user-location-delete-btn {
  width: auto;
  margin-top: 0;
  border: 1px solid #c7c7c7;
  border-radius: 4px;
  background: #f7f7f7;
  color: #333;
  padding: 0.2rem 0.42rem;
  font-size: 0.76rem;
  cursor: pointer;
}

.layer-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.35rem;
  font-size: 0.84rem;
  color: #1f2a33;
}

.layer-table th,
.layer-table td {
  padding: 0.32rem 0.3rem;
  border-bottom: 1px solid #ececec;
  text-align: left;
  vertical-align: middle;
}

.layer-table th {
  font-size: 0.73rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #666;
}

.sidebar .layer-group h3,
.sidebar .layer-table th,
.sidebar .layer-table td,
.sidebar .layer-table a,
.sidebar .checkbox-label {
  color: #1f2a33;
}

.reserve-layer-table th:nth-child(2),
.reserve-layer-table td:nth-child(2),
.reserve-layer-table th:nth-child(3),
.reserve-layer-table td:nth-child(3) {
  text-align: center;
}

.reserve-layer-table td:nth-child(2) {
  width: 52px;
}

.reserve-layer-table td:nth-child(3) {
  width: 58px;
}

.area-layer-table th:nth-child(2),
.area-layer-table td:nth-child(2) {
  text-align: center;
  width: 64px;
}

.reserve-visibility-header-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.reserve-visibility-header-link:hover,
.reserve-visibility-header-link:focus-visible {
  color: #0f4c7a;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.92rem;
}

.reserve-visibility-toggle {
  border: 0;
  background: transparent;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #232323;
  transition:
    opacity 0.14s ease,
    color 0.14s ease;
}

.reserve-visibility-toggle i {
  font-size: 1.3rem;
}

.reserve-visibility-toggle[data-visible="0"] {
  color: #949494;
  opacity: 0.55;
}

.area-layer-visibility-toggle[data-zoom-blocked="1"] {
  color: #9a6400;
  opacity: 1;
}

.area-layer-visibility-toggle:disabled {
  cursor: not-allowed;
}

.reserve-filter-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.sidebar h2 {
  margin-bottom: 0.5rem;
}

.sidebar-mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.sidebar-mobile-header h2 {
  margin: 0;
}

.mobile-sidebar-close {
  width: auto;
  border: 1px solid #c6c6c6;
  background: #f5f5f5;
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
}

.mobile-sidebar-open-btn {
  display: none;
  position: absolute;
  left: max(10px, env(safe-area-inset-left));
  right: auto;
  bottom: 0;
  transform: none;
  min-width: 146px;
  height: 34px;
  z-index: 1192;
  border: 1px solid #c6c6c6;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #f7f7f7;
  color: #333;
  padding: 0 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.09);
}

.mobile-sidebar-backdrop {
  display: none;
}

.mobile-map-fab-stack {
  position: absolute;
  left: var(--map-quick-left);
  top: 12px;
  right: auto;
  bottom: auto;
  z-index: 1215;
  display: grid;
  gap: 0.55rem;
}

.mobile-map-fab {
  width: var(--map-quick-size);
  height: var(--map-quick-size);
  border-radius: 50%;
  border: 1px solid #bac9d3;
  background: rgba(255, 255, 255, 0.96);
  color: #1f3d53;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(10, 26, 36, 0.22);
}

.mobile-map-fab-icon {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
}

.map-loading-indicator {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(252, 254, 255, 0.64);
  backdrop-filter: blur(1.5px);
  z-index: 1170;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.16s ease,
    visibility 0.16s ease;
}

.map-loading-indicator.visible {
  opacity: 1;
  visibility: visible;
}

.map-loading-indicator__content {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid #cfd7dc;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #18384e;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(12, 23, 34, 0.14);
}

.map-loading-indicator__spinner {
  width: 15px;
  height: 15px;
  border: 2px solid #c6d5df;
  border-top-color: #0f4c7a;
  border-radius: 50%;
  animation: map-loading-spin 0.8s linear infinite;
}

@keyframes map-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.hint {
  margin-top: 0.75rem;
  color: #555;
  font-size: 0.9rem;
}

#species-filter-clear {
  display: none;
}

.selected-species-list {
  max-height: 170px;
  overflow: auto;
  margin-top: 0.5rem;
  padding: 0.35rem;
  border: 1px solid #e4e4e4;
  border-radius: 4px;
  background: #fcfcfc;
}

.date-helper-row {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.45rem;
  margin-bottom: 0.4rem;
}

.date-helper-row button {
  margin-top: 0;
  padding: 0.35rem 0.4rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

.date-helper-row button.is-active {
  border-color: #0f4c7a;
  background: #e7f1f8;
  color: #0f4c7a;
  font-weight: 700;
}

.date-range-row {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.date-range-label {
  flex: 1 1 0;
  min-width: 0;
  margin-top: 0;
}

.date-range-label input {
  margin-top: 0.25rem;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(18, 25, 27, 0.58);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

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

.modal-card {
  width: min(560px, 100%);
  max-height: 86vh;
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #d8d8d8;
  padding: 1rem;
}

.user-feedback-card {
  width: min(420px, 100%);
}

.user-feedback-message {
  margin-top: 0.45rem;
  line-height: 1.4;
}

.species-group-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.species-group-tab-btn {
  width: auto;
  margin-top: 0;
  padding: 0.24rem 0.5rem;
  border: 1px solid #d6d6d6;
  border-radius: 999px;
  background: #f6f6f6;
  color: #333;
  font-size: 0.76rem;
  cursor: pointer;
}

.species-group-tab-btn.is-active {
  border-color: #0f4c7a;
  background: #e7f1f8;
  color: #0f4c7a;
  font-weight: 700;
}

.species-modal-list {
  border: 1px solid #e4e4e4;
  border-radius: 4px;
  min-height: 130px;
  max-height: 340px;
  overflow: auto;
  padding: 0.45rem;
  margin-top: 0.5rem;
}

.species-family-card {
  border: 1px solid #e7e7e7;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  background: #fff;
}

.species-family-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.45rem;
}

.species-family-toggle {
  border: none;
  background: transparent;
  padding: 0.2rem 0;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
}

.species-family-actions {
  display: flex;
  gap: 0.35rem;
}

.species-family-actions button {
  padding: 0.2rem 0.4rem;
  font-size: 0.78rem;
}

.species-family-panel {
  display: none;
  max-height: 240px;
  overflow: auto;
  border-top: 1px solid #eeeeee;
  padding: 0.45rem;
}

.species-family-card.open .species-family-panel {
  display: block;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.modal-actions-start {
  justify-content: flex-start;
  align-items: center;
}

#map {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
}

.sidebar-resize-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--sidebar-width);
  width: 14px;
  transform: translateX(-50%);
  border: 0;
  background: transparent;
  cursor: col-resize;
  z-index: 1230;
}

.sidebar-resize-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(24, 56, 78, 0.18);
}

.main-with-sidebar.is-resizing,
.main-with-sidebar.is-resizing * {
  user-select: none;
}

.map-fullscreen-btn {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 1210;
  border: 1px solid #c6c6c6;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  padding: 0.35rem 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  font-size: 0.8rem;
}

.main-with-sidebar:fullscreen {
  width: 100vw;
  height: 100vh;
  padding: 0;
  margin: 0;
  grid-template-columns: var(--sidebar-width) 1fr;
}

.main-with-sidebar:fullscreen .sidebar,
.main-with-sidebar:fullscreen .content {
  border-radius: 0;
}

.main-with-sidebar:fullscreen #map {
  height: 100vh;
  min-height: 0;
}

/* Keep map UI controls under the sticky site header/navigation. */
.leaflet-top,
.leaflet-bottom,
.leaflet-control {
  z-index: 700 !important;
}

.content .leaflet-top {
  top: 110px;
}

.content .leaflet-left .leaflet-control {
  margin-left: calc(
    var(--map-quick-left) + ((var(--map-quick-size) - 30px) / 2)
  );
}

.map-scroll-zoom-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translateX(-50%);
  background: rgba(28, 28, 28, 0.88);
  color: #ffffff;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  font-size: 2rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 900;
}

.map-scroll-zoom-hint.visible {
  opacity: 1;
}

.feature-detail-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--map-bottom-tab-strip-offset);
  width: 100%;
  height: min(42%, 320px);
  background: #ffffff;
  border: 1px solid #d6d6d6;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -10px 24px rgba(13, 27, 37, 0.22);
  padding: 0.8rem 0.9rem 1rem;
  transform: translateY(102%);
  transition: transform 0.2s ease;
  z-index: 1200;
  overflow: auto;
}

.feature-detail-panel.open {
  transform: translateY(0);
}

.feature-panel-tab {
  position: absolute;
  left: 140px;
  right: auto;
  top: auto;
  bottom: 0;
  width: 120px;
  height: 34px;
  border: 1px solid #c6c6c6;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #f7f7f7;
  color: #333;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0 0.55rem;
  cursor: pointer;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.09);
  z-index: 1305;
}

.feature-panel-tab i {
  font-size: 0.95rem;
}

.feature-panel-tab span {
  font-size: 0.8rem;
  font-weight: 600;
}

.map-status-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--map-bottom-tab-strip-offset);
  width: 100%;
  height: min(42%, 320px);
  background: #ffffff;
  border: 1px solid #d6d6d6;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -10px 24px rgba(13, 27, 37, 0.22);
  padding: 0.8rem 0.9rem 1rem;
  transform: translateY(102%);
  transition: transform 0.2s ease;
  z-index: 1180;
  overflow: auto;
}

.map-status-panel.open {
  transform: translateY(0);
}

.map-status-tab {
  position: absolute;
  left: 260px;
  top: auto;
  bottom: 0;
  width: 100px;
  height: 34px;
  border: 1px solid #c6c6c6;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #f7f7f7;
  color: #333;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0 0.5rem;
  cursor: pointer;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.09);
  z-index: 1305;
}

.map-debug-tab {
  position: absolute;
  left: 0;
  top: 120px;
  width: 36px;
  height: 36px;
  border: 1px solid #c6c6c6;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: #f7f7f7;
  color: #333;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.09);
  z-index: 1181;
}

.map-status-tab i {
  font-size: 0.95rem;
}

.map-status-tab span {
  font-size: 0.8rem;
  font-weight: 600;
}

.sighting-detail-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--map-bottom-tab-strip-offset);
  height: min(42%, 320px);
  background: #ffffff;
  border: 1px solid #d6d6d6;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -10px 24px rgba(13, 27, 37, 0.22);
  padding: 0.8rem 0.9rem 1rem;
  transform: translateY(102%);
  transition: transform 0.2s ease;
  z-index: 1190;
  overflow: auto;
}

.sighting-detail-panel.open {
  transform: translateY(0);
}

.sighting-panel-tab {
  position: absolute;
  left: 0;
  bottom: 0;
  transform: none;
  width: 140px;
  height: 34px;
  border: 1px solid #c6c6c6;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #f7f7f7;
  color: #333;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.09);
  z-index: 1305;
  font-size: 0.82rem;
  padding: 0 0.7rem;
}

.sighting-panel-tab span {
  font-weight: 600;
}

.feature-panel-close {
  display: inline-block;
  width: auto;
  margin: 0 0 0.45rem auto;
  padding: 0.2rem 0.55rem;
  border: 1px solid #c6c6c6;
  border-radius: 4px;
  background: #f7f7f7;
  cursor: pointer;
}

.feature-panel-type {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #666;
}

.feature-panel-title {
  margin: 0.15rem 0 0.65rem;
  font-size: 1.05rem;
  line-height: 1.3;
}

.feature-panel-body {
  display: grid;
  gap: 0.6rem;
}

.feature-card {
  background: #fafafa;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
}

.feature-card-heading {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #666;
}

.feature-panel-row {
  border-top: 1px solid #ececec;
  padding-top: 0.35rem;
  margin-top: 0.35rem;
}

.feature-panel-label {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #757575;
}

.feature-panel-value {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.1rem 0 0;
  font-size: 0.92rem;
  color: #1f1f1f;
  word-break: break-word;
}

.feature-panel-empty {
  margin: 0.2rem 0 0;
  color: #666;
  font-size: 0.9rem;
}

.feature-type-icon {
  color: #4a4a4a;
}

.feature-panel-icon {
  color: #7a7a7a;
  min-width: 0.9rem;
}

.feature-source-badge {
  margin-left: auto;
  font-size: 0.68rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid #d3d3d3;
  background: #f2f2f2;
  color: #444;
  letter-spacing: 0.03em;
}

.feature-source-badge.source-ebird {
  background: #e8f2ff;
  border-color: #b7d4ff;
  color: #1b4e8a;
}

.feature-source-badge.source-nbn {
  background: #e9f7ef;
  border-color: #b9e2c9;
  color: #1f6b3c;
}

.sighting-point-tooltip {
  display: grid;
  gap: 0.2rem;
  min-width: 220px;
  max-width: 280px;
}

.sighting-point-tooltip p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.28;
}

.sighting-point-tooltip a {
  margin-top: 0.2rem;
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
}

.sighting-detail-split {
  display: grid;
  grid-template-columns: 20% 80%;
  gap: 0.75rem;
}

.sighting-detail-meta {
  border-right: 1px solid #ececec;
  padding-right: 0.55rem;
}

.sighting-meta-heading {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.sighting-meta-heading .feature-card-heading {
  margin: 0;
}

.sighting-detail-row {
  margin-bottom: 0.4rem;
}

.sighting-detail-row .feature-panel-value {
  font-size: 0.82rem;
}

.sighting-detail-row .feature-panel-value a {
  font-size: 0.82rem;
}

.sighting-silhouette-wrap {
  display: grid;
  gap: 0.28rem;
  margin-top: 0.18rem;
}

.sighting-silhouette-image {
  width: 100%;
  max-width: 150px;
  max-height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.sighting-silhouette-attribution {
  margin: 0;
  font-size: 0.7rem;
  color: #666;
}

.sighting-silhouette-empty {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: #666;
}

.sighting-detail-trend {
  min-width: 0;
}

.sighting-trend-loading {
  margin: 0.2rem 0;
  color: #666;
  font-size: 0.8rem;
}

.sighting-trend-table-horizontal {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  table-layout: fixed;
}

.sighting-trend-table-horizontal th,
.sighting-trend-table-horizontal td {
  padding: 0.2rem 0.28rem;
  border-bottom: 1px solid #efefef;
  text-align: center;
}

.sighting-trend-table-horizontal th:first-child,
.sighting-trend-table-horizontal td:first-child {
  text-align: left;
  width: 56px;
  white-space: nowrap;
}

.sighting-trend-count-cell {
  font-weight: 600;
}

.sighting-trend-bar-cell {
  height: 54px;
  vertical-align: bottom;
}

.sighting-trend-vbar-track {
  width: 14px;
  height: 44px;
  margin: 0 auto;
  border-radius: 999px;
  background: #ececec;
  display: flex;
  align-items: flex-end;
}

.sighting-trend-vbar-fill {
  width: 100%;
  min-height: 2px;
  border-radius: 999px;
  background: #2f8f2f;
}

@media (max-width: 768px) {
  .sighting-detail-split {
    grid-template-columns: 1fr;
  }

  .sighting-detail-meta {
    border-right: 0;
    border-bottom: 1px solid #ececec;
    padding-right: 0;
    padding-bottom: 0.4rem;
  }
}

/* Card grid inside main content */
.card-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background-color: #fafafa;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  padding: 1rem;
}

.card h3 {
  margin-bottom: 0.5rem;
}

.reserves-hero-card {
  padding: 1.2rem 1.3rem;
  border-radius: 12px;
  border: 1px solid #dad4ca;
  background:
    linear-gradient(110deg, rgba(43, 50, 45, 0.95), rgba(66, 105, 44, 0.86)),
    radial-gradient(
      circle at right top,
      rgba(255, 231, 188, 0.26),
      transparent 60%
    );
  color: #f4f5f2;
  box-shadow: 0 8px 24px rgba(17, 24, 20, 0.16);
}

.reserves-hero-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.45rem;
}

.reserves-hero-logo {
  width: auto;
  height: auto;
  max-height: 100px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.93);
  padding: 0.25rem;
}

.reserves-hero-org {
  margin: 0;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ecebdc;
}

.reserves-hero-title {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.2;
}

.reserves-hero-card .hint {
  color: #ecece5;
}

.reserves-hero-tagline {
  margin-top: 0.7rem;
  font-size: 1.02rem;
  max-width: 72ch;
  line-height: 1.45;
  color: #f6f6ef;
}

.reserves-chip-row {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.reserves-chip {
  background: rgba(255, 255, 255, 0.17);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 0.26rem 0.62rem;
  font-size: 0.8rem;
  line-height: 1.2;
}

.reserves-content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

.reserves-story-card,
.reserves-wildlife-card,
.reserves-features-card,
.reserves-visit-card,
.reserves-technical-card {
  border-radius: 12px;
  border: 1px solid #ddd8ce;
  background: linear-gradient(180deg, #fdfdfb, #f7f7f2);
}

.reserves-story-card h2,
.reserves-wildlife-card h2,
.reserves-features-card h2,
.reserves-visit-card h2 {
  margin-bottom: 0.6rem;
  color: #2e3a2d;
}

.reserves-copy {
  margin-bottom: 0.75rem;
  line-height: 1.56;
  color: #26312b;
}

.reserves-fact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.reserves-fact-label {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b6b63;
}

.reserves-fact-value {
  margin-top: 0.1rem;
  color: #252c27;
  word-break: break-word;
}

.reserves-link-row {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.reserves-link-row a {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.7rem;
  border: 1px solid #b9c7b6;
  border-radius: 7px;
  background: #eef7eb;
  color: #21401f;
  text-decoration: none;
  font-size: 0.86rem;
}

.reserves-link-row a:hover {
  background: #dcefd6;
}

.reserves-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.reserves-pill {
  border: 1px solid #cfdcc9;
  background: #edf5e8;
  color: #2f412c;
  border-radius: 999px;
  padding: 0.2rem 0.56rem;
  font-size: 0.82rem;
}

.reserves-wildlife-card h3 {
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: #4a5447;
}

.reserves-feature-list {
  display: grid;
  gap: 0.58rem;
}

.reserves-feature-item {
  border: 1px solid #e3e3dc;
  border-radius: 8px;
  padding: 0.55rem 0.62rem;
  background: #fafaf8;
}

.reserves-feature-item h3 {
  margin: 0 0 0.28rem;
  font-size: 0.9rem;
  color: #2e3a2d;
}

.reserves-feature-item p {
  margin: 0;
  line-height: 1.45;
  color: #3a4540;
}

.reserves-map-card {
  grid-column: 1 / -1;
}

.status-page {
  display: grid;
  gap: 1rem;
}

.status-hero-card h1 {
  margin-bottom: 0.4rem;
}

.status-card h2 {
  margin-bottom: 0.6rem;
}

.status-table th,
.status-table td {
  padding: 0.55rem 0.45rem;
}

.status-table td:first-child {
  font-weight: 600;
}

.reserves-map-hint {
  margin-top: 0;
  margin-bottom: 0.55rem;
}

#reserve-static-map {
  width: 100%;
  min-height: 360px;
  border: 1px solid #d9d9cf;
  border-radius: 10px;
  overflow: hidden;
}

.reserve-map-point {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.28));
}

.reserves-technical-card details {
  width: 100%;
}

.reserves-technical-card summary {
  cursor: pointer;
  font-weight: 600;
  color: #2f3a2d;
}

.reserve-details-table {
  margin-top: 0.9rem;
  table-layout: fixed;
}

.reserve-details-table td {
  word-break: break-word;
}

.reserve-details-table th:first-child,
.reserve-details-table td:first-child {
  width: 35%;
}

.reserves-directory-layout {
  display: grid;
  grid-template-columns: 1fr 4fr;
  gap: 1rem;
}

.reserves-directory-sidebar {
  border: 1px solid #ddd8ce;
  border-radius: 12px;
  background: linear-gradient(180deg, #fdfdfb, #f7f7f2);
  padding: 0.85rem;
  align-self: start;
}

.reserves-directory-sidebar h2 {
  margin-bottom: 0.6rem;
  color: #2f3a2d;
}

.reserves-filter-label {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.55rem;
  color: #4a5447;
}

.reserves-filter-label input,
.reserves-filter-label select {
  display: block;
  width: 100%;
  margin-top: 0.22rem;
  padding: 0.42rem 0.48rem;
  border: 1px solid #d4d4cf;
  border-radius: 6px;
  background: #fff;
}

.reserves-filter-actions {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

.reserves-filter-actions button {
  border: 1px solid #c6d4bf;
  border-radius: 6px;
  background: #edf6ea;
  color: #22401f;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
}

.reserves-directory-content {
  border: 1px solid #ddd8ce;
  border-radius: 12px;
  background: linear-gradient(180deg, #fdfdfb, #f7f7f2);
  padding: 0.85rem;
}

.reserves-directory-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.reserves-directory-card {
  border: 1px solid #dfe4da;
  border-radius: 9px;
  background: #fafcf8;
  padding: 0.62rem;
  display: grid;
  gap: 0.42rem;
}

.reserves-directory-card h3 {
  margin: 0;
  font-size: 1rem;
  color: #26312b;
}

.reserves-directory-meta {
  font-size: 0.78rem;
  color: #5f695e;
}

.reserves-directory-address {
  font-size: 0.84rem;
  color: #3b443f;
  min-height: 2.2em;
}

.reserves-directory-link {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  border: 1px solid #bdccb7;
  border-radius: 7px;
  padding: 0.32rem 0.55rem;
  background: #ecf5e8;
  color: #22401f;
  text-decoration: none;
  font-size: 0.82rem;
}

.reserves-directory-link:hover {
  background: #dcefd6;
}

#reserve-detail-hero[hidden],
#reserve-content[hidden],
#reserve-technical[hidden],
#reserve-directory-layout[hidden] {
  display: none !important;
}

/* 5. Footer */
.footer {
  background-color: #222;
  color: #fff;
  display: grid;
  grid-template-columns: 1fr 4fr; /* 25% / 75% ratio */
  gap: 1.5rem;
  padding: 1.5rem;
  padding-top: 0;
  padding-bottom: 0;
  align-items: center;
  /* border-bottom: 1px solid #fff; */
  height: 200px;
}

.footer__logo {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;

  margin-bottom: 0.5rem;
  align-items: flex-end;
}

.footer__logo > a > img {
  max-height: 80px;
}

.footer__info {
  font-size: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.footer-card-grid {
  width: 100%;
  justify-content: center;
  display: grid;
  grid-template-columns: 1fr 3fr;
}

.footer-card {
  display: inline-flex;
  justify-content: left;
  text-decoration: none;
  padding: 1rem;
  align-items: center;
  width: 100%;
}

.footer-card-text {
  display: inline-flex;
  justify-content: right;
  text-decoration: none;
  padding: 1rem;
  align-items: center;
  width: 100%;
}

.footer-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: 60px;
  height: 60px;
}

.footer-icon-link > i {
  color: #fff;
}

.footer-icon-link > i:hover {
  color: #8c6239;
}

/* Responsive behaviour */
@media (max-width: 1024px) {
  .content {
    --mobile-bottom-tab-offset: max(0px, env(safe-area-inset-bottom));
    --mobile-bottom-tabs-height: 36px;
    --map-quick-left: max(21px, env(safe-area-inset-left));
    --map-bottom-tab-strip-height: var(--mobile-bottom-tabs-height);
    --map-bottom-tab-strip-offset: calc(
      var(--mobile-bottom-tabs-height) + var(--mobile-bottom-tab-offset)
    );
  }

  /* Let cards resize better on medium screens */
  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .hero {
    grid-template-columns: auto 1fr;
    column-gap: 0.6rem;
    row-gap: 0;
    max-height: none;
    padding: 0.35rem 0.6rem;
    align-items: center;
  }

  .logo {
    width: auto;
    justify-content: flex-start;
    align-items: center;
  }

  .logo > a > img {
    width: auto;
    max-width: 170px;
    max-height: 58px;
    padding-top: 0;
    padding-bottom: 0;
  }

  .main-with-sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar-resize-handle {
    display: none;
  }

  .content {
    min-height: 0;
    border-radius: 0;
    padding-bottom: calc(
      var(--mobile-bottom-tabs-height) + var(--mobile-bottom-tab-offset)
    );
  }

  #map {
    min-height: 0;
    height: 100%;
  }

  .sidebar {
    position: fixed;
    inset: auto 0 0 0;
    left: 0;
    right: 0;
    width: 100%;
    min-width: 100vw;
    min-width: 100dvw;
    max-width: 100vw;
    max-width: 100dvw;
    margin: 0;
    z-index: 2400;
    border-radius: 16px 16px 0 0;
    border-top: 1px solid #d6d6d6;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: 0 -12px 32px rgba(13, 27, 37, 0.24);
    transform: translateY(102%);
    transition: transform 0.18s ease;
    overflow-y: auto;
    overflow-x: hidden;
    height: min(82vh, 760px);
    max-height: min(82vh, 760px);
    min-height: 320px;
    padding-top: 0.45rem;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }

  .sidebar.mobile-sheet-dragging {
    transition: none;
    overflow: hidden;
  }

  .sidebar > h2 {
    display: none;
  }

  .sidebar-mobile-header {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 0.2rem;
    touch-action: none;
  }

  .mobile-sheet-grab-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 0.4rem;
  }

  .mobile-sheet-grab {
    width: 48px;
    height: 6px;
    border-radius: 999px;
    border: 0;
    background: #bcc6cd;
    cursor: pointer;
    touch-action: none;
  }

  .mobile-sheet-grab:focus-visible {
    outline: 2px solid #2e77aa;
    outline-offset: 3px;
  }

  .mobile-sidebar-open-btn {
    display: inline-flex;
    position: absolute;
    left: 0;
    bottom: var(--mobile-bottom-tab-offset);
    width: 25%;
    min-width: 0;
    height: var(--mobile-bottom-tabs-height);
    align-items: center;
    justify-content: center;
    border: 1px solid #c6c6c6;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: #f7f7f7;
    color: #333;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.09);
    padding: 0 0.35rem;
    white-space: nowrap;
    font-size: 0.76rem;
    z-index: 1305;
  }

  .sighting-panel-tab {
    left: 25%;
    bottom: var(--mobile-bottom-tab-offset);
    width: 25%;
    min-width: 0;
    height: var(--mobile-bottom-tabs-height);
    padding: 0 0.35rem;
    white-space: nowrap;
    font-size: 0.76rem;
    transform: none;
    z-index: 1305;
  }

  .map-status-tab {
    top: auto;
    bottom: var(--mobile-bottom-tab-offset);
    left: 75%;
    min-width: 0;
    width: 25%;
    height: var(--mobile-bottom-tabs-height);
    border-left: 1px solid #c6c6c6;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.09);
    padding: 0 0.35rem;
    white-space: nowrap;
    font-size: 0.76rem;
    z-index: 1305;
    flex-direction: row;
  }

  .feature-panel-tab {
    top: auto;
    right: auto;
    bottom: var(--mobile-bottom-tab-offset);
    left: 50%;
    min-width: 0;
    width: 25%;
    height: var(--mobile-bottom-tabs-height);
    border-right: 1px solid #c6c6c6;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.09);
    padding: 0 0.35rem;
    white-space: nowrap;
    font-size: 0.76rem;
    z-index: 1305;
    flex-direction: row;
  }

  .map-status-tab span,
  .feature-panel-tab span {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    transform: none;
    letter-spacing: 0;
    text-transform: none;
    font-size: 0.76rem;
    font-weight: 600;
  }

  .mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2300;
    background: rgba(18, 24, 24, 0.42);
  }

  body.mobile-sidebar-open .sidebar {
    transform: translateY(0);
  }

  body.mobile-sidebar-open .mobile-sidebar-backdrop {
    display: block;
  }

  body.mobile-sidebar-open {
    overflow: hidden;
  }

  .map-fullscreen-btn {
    top: 12px;
  }

  body.mobile-sidebar-open .mobile-sidebar-open-btn {
    opacity: 0;
    pointer-events: none;
  }

  .mobile-map-fab-stack {
    left: var(--map-quick-left);
    top: 12px;
    right: auto;
    bottom: auto;
  }

  .leaflet-bottom {
    bottom: 4px !important;
  }

  .mobile-map-fab {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #bac9d3;
    background: rgba(255, 255, 255, 0.96);
    color: #1f3d53;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(10, 26, 36, 0.22);
  }

  .mobile-map-fab-icon {
    width: 20px;
    height: 20px;
  }

  .reserves-directory-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .reserves-content-grid {
    grid-template-columns: 1fr;
  }

  .main-with-sidebar {
    grid-template-columns: 1fr; /* Stack sidebar and content */
  }

  #map {
    height: 100%;
    min-height: 0;
  }

  .feature-detail-panel {
    width: 100%;
    max-height: 52%;
    height: auto;
    top: auto;
    bottom: var(--map-bottom-tab-strip-offset);
    left: 0;
    right: 0;
    width: 100vw;
    max-width: none;
    border-top: 1px solid #d6d6d6;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 32px rgba(13, 27, 37, 0.24);
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
    transform: translateY(102%);
  }

  .feature-detail-panel.open {
    transform: translateY(0);
  }

  .sighting-detail-panel {
    height: 52%;
    border-top: 1px solid #d6d6d6;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 32px rgba(13, 27, 37, 0.24);
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }

  .map-status-panel {
    width: 100%;
    max-height: 52%;
    height: auto;
    top: auto;
    bottom: var(--map-bottom-tab-strip-offset);
    left: 0;
    right: 0;
    width: 100vw;
    max-width: none;
    border-top: 1px solid #d6d6d6;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 32px rgba(13, 27, 37, 0.24);
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
    transform: translateY(102%);
  }

  .map-status-panel.open {
    transform: translateY(0);
  }

  .footer {
    grid-template-columns: 1fr;
    height: auto;
    padding: 0.85rem;
    gap: 0.5rem;
  }

  .footer__logo {
    justify-content: flex-start;
    margin-bottom: 0;
  }

  .footer-card-grid {
    grid-template-columns: 1fr;
  }

  .footer-card,
  .footer-card-text {
    justify-content: flex-start;
    padding: 0.35rem 0;
  }

  .footer-icon-link {
    width: 44px;
    height: 44px;
  }
}
