﻿/* India design experiment (2026-09-25): light, WWF-style layout language with our own palette.
   Tokens first; the "India design layer" at the end of this file restyles the shared components. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #eeecea;
  --accent: #c8102e;
  --accent-text: #ffffff;
  --text: #393939;
  --muted: #6b6b6b;
  --border: rgba(0, 0, 0, 0.1);
  --radius: 4px;
  --radius-sm: 3px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  --bar: #111111;
  --saffron: #f29100;
  --forest: #1f6b3a;
  --g-mammals: #e07b00;
  --g-birds: #0f7c8c;
  --g-reptiles: #2e7d32;
  --g-amphibians: #8e3b6e;
  --display: "Oswald", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --wrap: 1200px;
  --gutter: max(20px, calc((100% - var(--wrap)) / 2));
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Roboto, "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 96px;
}

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

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
}

.topbar {
  background: var(--bg);
  color: var(--text);
  padding: 22px 20px 10px;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topbar .brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar .brand .logo {
  font-size: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
}
.topbar .brand .logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.topbar .brand h1 { font-size: 17px; margin: 0; letter-spacing: 0.1px; font-weight: 800; }
.topbar .brand .sub { font-size: 11.5px; color: var(--muted); margin: 2px 0 0; letter-spacing: 0.3px; }
.topbar .hub-link { font-size: 12.5px; font-weight: 700; color: var(--muted); text-decoration: none; white-space: nowrap; flex: none; }
.topbar .hub-link:hover { color: var(--accent); }

.menu-burger-wrap { position: relative; flex: 0 0 auto; z-index: 20; }
.menu-burger {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-2);
  border: none;
  color: var(--text);
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.menu-dropdown {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 46px;
  right: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 6px;
}
.menu-dropdown.open { display: flex; }
.menu-dropdown a {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}
.menu-dropdown a:hover { background: var(--surface-2); }
.lang-switcher {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.lang-btn {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 0;
  border-radius: 10px;
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
}
.flag-icon {
  width: 24px;
  height: 18px;
  border-radius: 3px;
  display: block;
}
.lang-btn:hover { background: var(--surface-2); }
.lang-btn.active { background: var(--accent); color: var(--surface); border-color: var(--accent); }

.coming-soon-block { text-align: center; padding: 50px 12px; }
.coming-soon-block .emoji { font-size: 38px; margin-bottom: 14px; }
.coming-soon-block h3 { color: var(--text); font-size: 18px; text-transform: none; letter-spacing: 0; margin: 0 0 8px; }
.coming-soon-block p { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin: 0 0 20px; }

.badge-dark { background: #0c0c0e !important; }
.borneo-icon { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.hero {
  background: var(--bg);
  color: var(--text);
  padding: 18px 20px 30px;
}
.hero-cover {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  margin-bottom: 18px;
}
.hero h2 { font-family: "EB Garamond", Georgia, serif; font-size: 34px; line-height: 1.18; margin: 0 0 12px; font-weight: 600; letter-spacing: -0.2px; }
.section h2 { font-family: "EB Garamond", Georgia, serif; font-size: 25px; line-height: 1.25; font-weight: 600; letter-spacing: -0.1px; margin: 30px 0 12px; }
.hero p { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 0 0 20px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 13px 20px; border-radius: 999px; font-size: 13.5px; font-weight: 700; cursor: pointer; border: none; }
.btn-gold { background: var(--accent); color: var(--accent-text); }
.btn-outline { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }

.section { padding: 22px 20px; }
.section h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 0 0 14px; font-weight: 700; }
.section p.lead { font-size: 13.5px; color: var(--muted); line-height: 1.65; margin: -6px 0 16px; }

.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0; text-align: left; overflow: hidden; display: block; }
.feature-card .cover { width: 100%; height: 84px; object-fit: cover; display: block; }
.feature-card-body { padding: 14px 16px 16px; }
.feature-card .icon {
  font-size: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.feature-card h4 { font-size: 14px; margin: 0 0 4px; font-weight: 700; }
.feature-card p { font-size: 11.5px; color: var(--muted); margin: 0; line-height: 1.45; }

.loc-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0; margin-bottom: 14px; overflow: hidden; }
.loc-card .cover { width: 100%; height: 150px; object-fit: cover; display: block; }
.loc-card-body { padding: 16px; }
.loc-card .loc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.loc-card h4 { font-size: 16px; margin: 0; font-weight: 700; }
.loc-tag { font-size: 10px; background: var(--accent); color: var(--accent-text); padding: 4px 10px; border-radius: 999px; white-space: nowrap; font-weight: 700; }
.loc-card p { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 0 0 10px; }
.loc-highlights { font-size: 11.5px; color: var(--muted); }
.loc-highlights b { color: var(--text); }

.loc-website-link { font-size: 12px; font-weight: 700; color: var(--accent); margin: -4px 0 12px; }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; }
.tab-btn { flex: 0 0 auto; padding: 9px 16px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 700; border: 1px solid var(--border); cursor: pointer; }
.tab-btn.active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.species-group-heading { font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--accent); font-weight: 700; margin: 20px 0 8px; }
.species-group-heading:first-child { margin-top: 0; }

.species-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 10px; display: flex; gap: 12px; align-items: center; cursor: pointer; }
.species-card .thumb { width: 46px; height: 46px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 22px; flex: 0 0 auto; object-fit: cover; }
.species-card .info h5 { margin: 0 0 2px; font-size: 13.5px; font-weight: 700; }
.species-card .info .latin { font-size: 11px; font-style: italic; color: var(--muted); margin: 0 0 4px; }
.species-card .info .status { font-size: 11px; color: var(--accent); font-weight: 700; }

/* Malay / Indonesian common name, sits between the English and Latin names */
.local-name { font-size: 11.5px; color: var(--text); opacity: .85; margin: 0 0 2px; }
.local-name .ln-flag {
  width: 15px; height: 11px; border-radius: 2px;
  display: inline-block; vertical-align: -1px; margin-right: 4px;
}
/* Shared name carries both flags — pull them together so they read as one pair */
.local-name .ln-flag + .ln-flag { margin-left: -1px; }
.local-name .ln-sep { margin: 0 4px; color: var(--muted); }
.detail-local { font-size: 14px; margin: -8px 0 4px; }
.detail-local .ln-flag { width: 18px; height: 13px; vertical-align: -2px; }

.bottom-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 448px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
  display: flex;
  padding: 8px;
  z-index: 20;
}
.bottom-nav a { flex: 1; text-align: center; padding: 8px 4px; font-size: 10px; color: var(--muted); font-weight: 700; border-radius: 999px; }

.install-banner {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%) translateY(12px);
  width: calc(100% - 32px);
  max-width: 448px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  z-index: 25;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.install-banner.visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.install-banner .install-banner-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex: 0 0 auto;
  object-fit: cover;
}
.install-banner .install-banner-body { flex: 1; min-width: 0; }
.install-banner .install-banner-title { font-size: 12.5px; font-weight: 700; margin: 0 0 1px; }
.install-banner .install-banner-sub { font-size: 11px; color: var(--muted); margin: 0; }
.install-banner-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.install-banner-btn {
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.install-banner-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.install-banner-close:hover { color: var(--text); }
@media (min-width: 720px) { .install-banner { display: none; } }

.back-to-top-wrap {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 448px;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  z-index: 19;
}
.back-to-top {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--bg);
  font-size: 19px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.bottom-nav a .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: 0 auto 3px;
  font-size: 16px;
  border-radius: 50%;
}
.bottom-nav a.active { color: var(--text); }
.bottom-nav a.active .nav-icon { background: var(--accent); }

.detail-topbar { display: flex; align-items: center; gap: 12px; }
.back-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex: 0 0 auto;
}
.detail-topbar h1 { font-size: 16px; margin: 0; font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-topbar .loc-tag { flex: 0 0 auto; }

.detail-topbar-wrap { flex-wrap: wrap; }
.detail-topbar-wrap .back-btn { order: 1; }
.detail-topbar-wrap .menu-burger-wrap { order: 2; }
.detail-title-row { order: 3; flex: 1 1 100%; margin-top: 8px; }
.detail-title-row h1 { white-space: normal; overflow: visible; text-overflow: clip; margin: 0 0 6px; }
.detail-title-row .loc-tag { display: inline-block; }

.detail-cover { width: 100%; height: 190px; object-fit: cover; border-radius: var(--radius); display: block; margin-bottom: 16px; }
.detail-intro { font-size: 13.5px; line-height: 1.65; color: var(--muted); margin: 0 0 10px; }

.photo-carousel { position: relative; margin-bottom: 16px; }
.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track .photo-frame,
.carousel-track > img.detail-cover {
  flex: 0 0 100%;
  scroll-snap-align: start;
  min-width: 0;
}
.carousel-track .detail-cover { margin-bottom: 0; border-radius: 0; }
.carousel-counter {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(12, 12, 14, 0.75);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 5;
  pointer-events: none;
}

.carousel-track .detail-cover { cursor: zoom-in; }

.photo-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 10, 0.96);
  z-index: 500;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.photo-lightbox.open { display: block; }
.photo-lightbox.visible { opacity: 1; }

.lightbox-viewport {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(12, 12, 14, 0.75);
  color: var(--text);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.lightbox-close { top: 14px; right: 14px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }

.lightbox-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(12, 12, 14, 0.75);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 2;
}

.target-list { list-style: none; counter-reset: target; margin: 0; padding: 0; }
.target-list li {
  counter-increment: target;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}
.target-list li::before {
  content: counter(target);
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 11.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.target-list li.linked a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
}
.target-list li.linked a::after {
  content: "\203A";
  color: var(--accent);
  font-weight: 800;
  font-size: 16px;
}

.sub-location-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; }
.sub-location-card h5 { margin: 0 0 4px; font-size: 13.5px; font-weight: 700; }
.sub-location-card p { margin: 0; font-size: 12px; line-height: 1.55; color: var(--muted); }

.operator-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.operator-card h4 { margin: 0 0 6px; font-size: 14.5px; font-weight: 800; }
.operator-card p { margin: 0 0 10px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.operator-contact { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.operator-contact a, .operator-contact .operator-note { font-size: 12px; font-weight: 700; color: var(--accent); }
.operator-contact .operator-note { color: var(--muted); font-weight: 500; }

.detail-cover-emoji {
  width: 100%;
  height: 190px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}
.detail-latin { font-size: 13px; font-style: italic; color: var(--muted); margin: -4px 0 16px; }
.detail-para { font-size: 13.5px; line-height: 1.7; color: var(--text); margin: 0 0 14px; }

.stats-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.stats-title { font-size: 15px; font-weight: 800; margin: 0 0 16px; }
.stat-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.stat-row:last-child { margin-bottom: 0; }
.stat-icon { width: 42px; height: 42px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; color: var(--accent); }
.stat-icon svg { width: 20px; height: 20px; }
.stat-info { min-width: 0; }
.stat-label { font-size: 11px; font-weight: 700; color: var(--muted); margin: 0 0 2px; }
.stat-value { font-size: 14.5px; color: var(--text); margin: 0; line-height: 1.35; }

.upload-photo-btn { display: block; text-align: center; margin-top: 18px; }

.photo-frame { position: relative; display: block; }
.credit-icon {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(12, 12, 14, 0.75);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  font-style: italic;
  font-family: Georgia, serif;
  cursor: pointer;
  z-index: 5;
  padding: 0;
  line-height: 1;
}
.credit-panel {
  position: absolute;
  bottom: 36px;
  right: 8px;
  left: 8px;
  background: rgba(12, 12, 14, 0.94);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 11px;
  line-height: 1.55;
  display: none;
  z-index: 6;
}
.credit-panel.open { display: block; }
.credit-panel a { color: var(--accent); text-decoration: underline; }

/* Species swipe navigation */
.sp-swipe-wrap { position: relative; touch-action: pan-y; }
.sp-swipe-hint { text-align: center; font-size: 11px; color: var(--muted); margin: -8px 0 16px; }

/* Location swipe navigation */
.loc-swipe-wrap { position: relative; touch-action: pan-y; }
.loc-swipe-hint { text-align: center; font-size: 11px; color: var(--muted); margin: -8px 0 16px; }

/* Arrows ON the photo page the photo — the only thing a user reads them as.
   Added by JS on desktop only, and only when there is more than one photo. */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(12, 12, 14, 0.72);
  color: var(--text);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
  z-index: 6;
  transition: background 0.15s, color 0.15s;
}
.carousel-arrow-prev { left: 8px; }
.carousel-arrow-next { right: 8px; }
.carousel-arrow:hover { background: var(--accent); color: var(--accent-text); }

/* Species / region navigation: named links under the photo, never a bare
   arrow beside it. */
.detail-nav-row {
  display: flex;
  gap: 10px;
  margin: 0 0 18px;
}
.detail-nav-link {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.detail-nav-link-next { justify-content: flex-end; text-align: right; }
.detail-nav-glyph { font-size: 17px; line-height: 1; flex: 0 0 auto; }
.detail-nav-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-nav-link:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--text);
}

/* Search */
.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  padding: 13px 18px;
  margin-bottom: 18px;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus { outline: none; border-color: var(--accent); }

.search-empty { font-size: 13px; color: var(--muted); text-align: center; margin-top: 30px; }

.search-group-heading { font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--accent); font-weight: 700; margin: 20px 0 8px; }
.search-group-heading:first-child { margin-top: 0; }

.search-result-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; display: flex; gap: 12px; align-items: center; cursor: pointer; }
.search-result-card .thumb { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 18px; flex: 0 0 auto; object-fit: cover; }
.search-result-card .info h5 { margin: 0 0 2px; font-size: 13px; font-weight: 700; }
.search-result-card .info p { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.4; }
.search-result-card .info .latin { font-style: italic; }

.notice-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.notice-overlay.open { display: flex; }
.notice-overlay.visible { opacity: 1; }
.notice-modal {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px 24px;
  max-width: 360px;
  width: 100%;
}
.notice-modal h3 { margin: 0 0 10px; font-size: 18px; font-weight: 800; }
.notice-modal p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.notice-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--surface-2);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notice-close:hover { background: var(--accent); color: var(--accent-text); }
.credit-panel .credit-license { color: var(--muted); display: block; }

#trip-map {
  width: 100%;
  height: 420px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 16px;
}
#locations-map {
  width: 100%;
  height: 420px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 20px;
}
.locations-map-popup { width: 160px; }
.locations-map-popup img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
  display: block;
}
.locations-map-popup h5 { margin: 0 0 4px; font-size: 13.5px; font-weight: 700; }
.locations-map-popup p { margin: 0 0 8px; font-size: 11.5px; color: var(--muted); }
.locations-map-popup a { color: var(--accent); font-weight: 700; font-size: 12px; }
.popup-trip-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.popup-trip-btn.in-trip {
  background: var(--accent);
  color: var(--accent-text, #141416);
  border-color: var(--accent);
}
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: var(--surface);
  color: var(--text);
}
.leaflet-popup-content { margin: 12px 14px; font-family: inherit; }
.trip-map-popup h5 { margin: 0 0 4px; font-size: 13.5px; font-weight: 700; }
.trip-map-popup p { margin: 0 0 8px; font-size: 11.5px; color: var(--muted); }
.trip-map-popup a { color: var(--accent); font-weight: 700; font-size: 12px; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-control-attribution {
  background: rgba(29, 29, 32, 0.8) !important;
  color: var(--muted) !important;
}
.leaflet-control-attribution a { color: var(--text) !important; }
.leaflet-control-zoom a {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
.leaflet-control-zoom a:hover { background: var(--surface-2) !important; }

.trip-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px 8px 8px;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 4px;
  -webkit-tap-highlight-color: transparent;
}
.trip-toggle-track {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: background 0.2s ease;
}
.trip-toggle[aria-pressed="true"] .trip-toggle-track { background: var(--accent); }
.trip-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--text);
  transition: transform 0.2s ease, background 0.2s ease;
}
.trip-toggle[aria-pressed="true"] .trip-toggle-thumb {
  transform: translateX(22px);
  background: var(--accent-text);
}
.trip-toggle-label { font-size: 13px; font-weight: 700; color: var(--text); text-align: left; }
.trip-toggle[aria-pressed="true"] .trip-toggle-label { color: var(--accent); }

.card-toggles {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding-left: 8px;
}
.card-toggle {
  flex: 0 0 auto;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.card-toggle-track {
  position: relative;
  display: block;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: background 0.2s ease;
}
.card-toggle[aria-pressed="true"] .card-toggle-track { background: var(--accent); }
.card-toggle-thumb {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text);
  transition: transform 0.2s ease, background 0.2s ease;
}
.card-toggle[aria-pressed="true"] .card-toggle-thumb {
  transform: translateX(14px);
  background: var(--accent-text);
}

.trip-toggle-seen[aria-pressed="true"] .trip-toggle-track { background: #5fd0e0; }
.trip-toggle-seen[aria-pressed="true"] .trip-toggle-thumb { background: #0c2e33; }
.trip-toggle-seen[aria-pressed="true"] .trip-toggle-label { color: #5fd0e0; }

.card-toggle-seen[aria-pressed="true"] .card-toggle-track { background: #5fd0e0; }
.card-toggle-seen[aria-pressed="true"] .card-toggle-thumb { background: #0c2e33; }

.cap-toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translate(-50%, 8px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 500;
  pointer-events: none;
  max-width: calc(100% - 32px);
  text-align: center;
}
.cap-toast.visible { opacity: 1; transform: translate(-50%, 0); }

.species-group-heading .group-trip-count { font-weight: 500; color: var(--muted); }

#my-trip-list { margin-bottom: 20px; }
.my-trip-empty { font-size: 13px; color: var(--muted); line-height: 1.6; }
.my-trip-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
}
.my-trip-item a { flex: 1; font-size: 13.5px; font-weight: 700; }
.my-trip-item .my-trip-tag { font-size: 11px; color: var(--muted); font-weight: 500; display: block; margin-top: 2px; }
.my-trip-remove {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--surface-2);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.my-trip-remove:hover { background: var(--accent); color: var(--accent-text); }

/* Wildlife checklist page */
.checklist-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 18px;
}
.checklist-progress-track {
  flex: 1;
  height: 8px;
  border-radius: 5px;
  background: var(--surface-2);
  overflow: hidden;
}
.checklist-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 5px;
  transition: width 0.3s ease;
}
.checklist-progress-count { font-size: 12.5px; font-weight: 700; color: var(--text); white-space: nowrap; }

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.checklist-item.hidden { display: none; }
.checklist-check {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.checklist-check svg { width: 14px; height: 14px; opacity: 0; transition: opacity 0.15s ease; }
.checklist-item.seen .checklist-check { background: var(--accent); border-color: var(--accent); }
.checklist-item.seen .checklist-check svg { opacity: 1; }
.checklist-names { min-width: 0; }
.checklist-common { margin: 0 0 2px; font-size: 13.5px; font-weight: 700; }
.checklist-latin { margin: 0; font-size: 11px; font-style: italic; color: var(--muted); }
.checklist-item.seen .checklist-common { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border); }

.species-group-heading.hidden { display: none; }

.checklist-actions { display: flex; gap: 10px; margin: 0 0 8px; flex-wrap: wrap; }
.checklist-actions .btn { flex: 1 1 auto; text-align: center; }
.checklist-actions-note { font-size: 11px; color: var(--muted); line-height: 1.5; margin: 0 0 18px; }

.enquiry-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.enquiry-row { display: flex; gap: 10px; }
.enquiry-row .search-input { margin-bottom: 0; flex: 1 1 0; min-width: 0; }
.enquiry-row .field-group { flex: 1 1 0; min-width: 0; }
.enquiry-form .search-input { margin-bottom: 0; }
.enquiry-form select.search-input { appearance: none; -webkit-appearance: none; }
.enquiry-form textarea.search-input { resize: vertical; font-family: inherit; padding-top: 12px; }
@media (max-width: 420px) {
  .enquiry-row { flex-direction: column; }
}

.field-group { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: 11px; font-weight: 700; color: var(--muted); padding-left: 4px; }

input[type="date"].search-input,
input[type="month"].search-input {
  color-scheme: dark;
}
input[type="date"].search-input::-webkit-datetime-edit,
input[type="month"].search-input::-webkit-datetime-edit {
  color: var(--text);
}
input[type="date"].search-input::-webkit-datetime-edit-text,
input[type="date"].search-input::-webkit-datetime-edit-month-field,
input[type="date"].search-input::-webkit-datetime-edit-day-field,
input[type="date"].search-input::-webkit-datetime-edit-year-field,
input[type="month"].search-input::-webkit-datetime-edit-text,
input[type="month"].search-input::-webkit-datetime-edit-month-field,
input[type="month"].search-input::-webkit-datetime-edit-year-field {
  color: var(--text);
}
input[type="date"].search-input::-webkit-calendar-picker-indicator,
input[type="month"].search-input::-webkit-calendar-picker-indicator {
  filter: invert(0.8);
}

.single-day-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  margin: -2px 0 4px;
  cursor: pointer;
  user-select: none;
}
.single-day-toggle input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

.danger-btn { color: #ff8a8a; border-color: rgba(255, 138, 138, 0.35); }
.danger-btn:hover { background: rgba(255, 138, 138, 0.12); }

.notice-modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.notice-modal-actions .btn { flex: 1 1 0; text-align: center; padding: 11px 16px; font-size: 13px; }
/* Resources page: source links and the full photo-credit list. */
.resource-links a, .credit-list a { color:var(--accent); text-decoration:underline; text-underline-offset:3px; }
.resource-links li { margin:14px 0; }
.credit-list { list-style:none; padding:0; }
.credit-list li { padding:14px 0; border-bottom:1px solid var(--border); }
.credit-list p { margin:5px 0; font-size:14px; color:var(--muted); }

/* =====================================================================
   India design layer (2026-09-25 experiment)
   WWF-style layout language: black bar with a logo block, full-bleed
   photo carousel, uppercase condensed headings, captioned image cards,
   grey topic cards with a full-width CTA bar. Our own palette.
   ===================================================================== */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

body { line-height: 1.5; }
.app { max-width: none; }
.section { max-width: calc(var(--wrap) + 40px); margin: 0 auto; }

/* Uppercase condensed display type for every heading the pages share */
.hero h2, .section h2, .section h3, .species-group-heading, .detail-topbar h1, .stats-title,
.tab-btn, .btn, .loc-card h4, .feature-card h4 {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.section h3 { color: var(--text); font-size: 20px; font-weight: 500; }
.section h2 { font-weight: 500; }
.species-group-heading { font-size: 15px; font-weight: 500; color: var(--text); border-bottom: 3px solid var(--text); padding-bottom: 6px; }
.btn { border-radius: 0; font-weight: 500; font-size: 15px; }

/* ---------- Top bar: black, logo block, uppercase nav, colour tabs ---------- */
.topbar {
  background: var(--bar);
  color: #fff;
  padding: 0 0 0 20px;
  min-height: 64px;
}
.topbar .brand h1, .topbar .brand .sub { color: #fff; }
.topbar .brand h1 { font-family: var(--display); text-transform: uppercase; font-weight: 500; font-size: 19px; letter-spacing: 0.03em; }
.topbar .brand .sub { color: rgba(255, 255, 255, 0.65); }
.topbar .brand .logo { background: #fff; border-radius: 0; }
.menu-burger { background: transparent; color: #fff; border-radius: 0; width: 56px; height: 64px; font-size: 22px; }
.menu-burger:hover { background: #2a2a2a; }
.menu-dropdown { border-radius: 0; background: var(--bar); border: none; }
.menu-dropdown a { color: #fff; font-family: var(--display); text-transform: uppercase; letter-spacing: 0.03em; border-radius: 0; }
.menu-dropdown a:hover { background: #2a2a2a; }
.back-btn { background: #2a2a2a; color: #fff; border-radius: 0; }

.site-bar { padding: 0; gap: 0; justify-content: flex-start; align-items: stretch; }
.bar-logo {
  display: flex; align-items: center; gap: 10px;
  background: #fff; color: var(--bar);
  padding: 8px 14px 8px 10px;
  font-family: var(--display); text-transform: uppercase; font-weight: 600;
  font-size: 15px; line-height: 1.05; letter-spacing: 0.02em;
  flex: 0 0 auto;
  position: relative; z-index: 2;
}
.bar-logo img { width: 48px; height: 48px; display: block; }
.bar-nav { display: none; }
.bar-search { margin-left: auto; display: flex; align-items: center; justify-content: center; width: 56px; color: #fff; }
.bar-search:hover { background: #2a2a2a; }
.bar-tabs { display: none; }
.site-bar .menu-burger-wrap { display: flex; align-items: stretch; }

@media (min-width: 900px) {
  .bar-logo { padding: 12px 18px 12px 14px; font-size: 17px; margin-bottom: -18px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); }
  .bar-logo img { width: 64px; height: 64px; }
  .bar-nav { display: flex; align-items: stretch; margin-left: 28px; }
  .bar-nav a {
    display: flex; align-items: center; padding: 0 16px;
    color: #fff; font-family: var(--display); text-transform: uppercase;
    font-size: 17px; letter-spacing: 0.04em;
  }
  .bar-nav a:hover, .bar-nav a.active { background: #2a2a2a; }
  .bar-nav a.active { box-shadow: inset 0 -4px 0 var(--saffron); }
  .bar-tabs { display: flex; align-items: stretch; }
  .bar-tabs a {
    display: flex; align-items: center; padding: 0 18px;
    color: #fff; font-family: var(--display); text-transform: uppercase;
    font-size: 15px; letter-spacing: 0.05em;
  }
  .bar-tabs a:hover { filter: brightness(1.12); }
}
.g-mammals { --g: var(--g-mammals); }
.g-birds { --g: var(--g-birds); }
.g-reptiles { --g: var(--g-reptiles); }
.g-amphibians { --g: var(--g-amphibians); }
.bar-tabs a { background: var(--g); }

/* ---------- Bottom nav: app navigation on phones only ---------- */
.bottom-nav { background: var(--bar); border: none; border-radius: 0; bottom: 0; width: 100%; max-width: none; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2); }
.bottom-nav a { color: rgba(255, 255, 255, 0.7); border-radius: 0; font-family: var(--display); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 400; }
.bottom-nav a .nav-icon { background: transparent; }
.bottom-nav a.active { color: #fff; }
.bottom-nav a.active .nav-icon { background: transparent; box-shadow: inset 0 -3px 0 var(--saffron); border-radius: 0; }
body { padding-bottom: 72px; }
@media (min-width: 900px) {
  .page-home .bottom-nav { display: none; }
  .page-home { padding-bottom: 0; }
}

/* ---------- Buttons ---------- */
.btn-ghost {
  display: inline-block; padding: 11px 22px;
  border: 2px solid #fff; color: #fff;
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.06em; font-size: 15px;
  transition: background 0.15s, color 0.15s;
}
.btn-ghost:hover { background: #fff; color: var(--bar); }
.btn-solid {
  display: inline-block; padding: 14px 26px;
  background: var(--accent); color: #fff;
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.06em; font-size: 16px;
}
.btn-solid:hover { filter: brightness(1.1); }

/* ---------- Hero carousel ---------- */
.hero-carousel { position: relative; background: var(--bar); }
.hc-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.hc-track::-webkit-scrollbar { display: none; }
.hc-slide {
  position: relative; flex: 0 0 100%; scroll-snap-align: start;
  height: min(78vh, 600px); min-height: 440px; overflow: hidden;
}
.hc-slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hc-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 90px 20px 58px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 30%, rgba(0, 0, 0, 0));
  color: #fff;
}
.hc-kicker { margin: 0 0 6px; font-family: var(--display); text-transform: uppercase; letter-spacing: 0.12em; font-size: 13px; color: var(--saffron); }
.hc-panel h2 { margin: 0 0 10px; font-family: var(--display); text-transform: uppercase; font-weight: 500; font-size: 36px; line-height: 1.05; letter-spacing: 0.01em; }
.hc-panel p { margin: 0 0 18px; font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, 0.88); max-width: 34em; }
.hc-credit { position: absolute; right: 10px; top: 8px; font-size: 10.5px; color: rgba(255, 255, 255, 0.75); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); max-width: 60%; text-align: right; }
.hc-arrow {
  position: absolute; top: 40%; transform: translateY(-50%);
  width: 44px; height: 64px; border: none; cursor: pointer;
  background: rgba(0, 0, 0, 0.35); color: #fff; font-size: 40px; line-height: 1;
  display: none;
}
.hc-arrow:hover { background: rgba(0, 0, 0, 0.6); }
.hc-prev { left: 0; }
.hc-next { right: 0; }
.hc-dots { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; gap: 8px; }
.hc-dots button { width: 10px; height: 10px; padding: 0; border: 2px solid #fff; background: transparent; cursor: pointer; }
.hc-dots button[aria-selected="true"] { background: #fff; }

@media (min-width: 900px) {
  .hc-panel {
    top: 0; right: auto; bottom: 0; width: 400px;
    padding: 0 40px 0 max(40px, calc((100vw - var(--wrap)) / 2));
    box-sizing: content-box;
    display: flex; flex-direction: column; justify-content: center;
    background: rgba(0, 0, 0, 0.55);
  }
  .hc-panel h2 { font-size: 50px; }
  .hc-panel .btn-ghost { align-self: flex-start; }
  .hc-panel p { font-size: 16px; }
  .hc-arrow { display: block; top: 50%; }
  .hc-credit { top: auto; bottom: 14px; right: 60px; }
}

/* ---------- Home: search band ---------- */
.home-search { background: var(--surface-2); padding: 26px var(--gutter); }
.home-search form { display: flex; max-width: 820px; margin: 0 auto; box-shadow: var(--shadow); }
.home-search input {
  flex: 1; min-width: 0; border: 2px solid var(--bar); border-right: none;
  padding: 16px 18px; font-size: 17px; font-family: inherit; color: var(--text); background: #fff; border-radius: 0;
}
.home-search input:focus { outline: 3px solid var(--saffron); outline-offset: -3px; }
.home-search button {
  border: none; background: var(--accent); color: #fff; padding: 0 26px; cursor: pointer;
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.06em; font-size: 17px;
}
.home-search-count { text-align: center; margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.home-search-count strong { color: var(--text); font-family: var(--display); font-weight: 500; font-size: 18px; }

/* ---------- Home: blocks ---------- */
.home-block { padding: 44px var(--gutter) 8px; }
.home-band { background: var(--surface-2); padding-bottom: 40px; margin-top: 36px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.block-title {
  margin: 0 0 20px; font-family: var(--display); text-transform: uppercase;
  font-weight: 500; font-size: 30px; line-height: 1.1; color: var(--text); letter-spacing: 0.01em;
}
.block-head .block-title { margin: 0; }
.block-more { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); font-size: 16px; }
.block-more:hover { text-decoration: underline; }
.block-sub { margin: 0; color: var(--muted); font-size: 14px; flex-basis: 100%; }
@media (min-width: 900px) { .block-title { font-size: 40px; } }

/* Group tiles: photo with a colour label bar */
.group-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 900px) { .group-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.group-tile { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--g); }
.group-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.group-tile:hover img { transform: scale(1.04); }
.group-tile-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  background: var(--g); color: #fff; padding: 9px 12px;
}
.group-tile-label strong { font-family: var(--display); text-transform: uppercase; font-weight: 500; font-size: 18px; letter-spacing: 0.03em; }
.group-tile-label em { font-style: normal; font-size: 12.5px; opacity: 0.9; }
@media (min-width: 900px) { .group-tile-label { padding: 12px 16px; } .group-tile-label strong { font-size: 22px; } }

/* Caption cards: image with an uppercase caption underneath */
.caption-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 12px; }
@media (min-width: 700px) { .caption-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .caption-grid { grid-template-columns: repeat(4, 1fr); gap: 28px 20px; } }
.caption-card { display: block; }
.caption-img { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--surface-2); margin-bottom: 10px; }
.caption-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.caption-card:hover .caption-img img { transform: scale(1.04); }
.caption-card strong { display: block; font-family: var(--display); text-transform: uppercase; font-weight: 600; font-size: 17px; line-height: 1.2; color: var(--text); letter-spacing: 0.01em; }
.caption-card em { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.caption-card:hover strong { color: var(--accent); }

/* Horizontal strip */
.strip { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 10px; scrollbar-width: thin; }
.strip .caption-card { flex: 0 0 200px; scroll-snap-align: start; }
@media (min-width: 900px) { .strip .caption-card { flex-basis: 240px; } }

/* Topic cards: grey card, photo, centred uppercase title, full-width CTA bar */
.topic-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 600px) { .topic-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .topic-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.topic-card { display: flex; flex-direction: column; background: var(--surface-2); }
.topic-card img, .topic-noimg { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: #d9d5d0; }
.topic-body { flex: 1; padding: 18px 18px 20px; text-align: center; }
.topic-body strong { display: block; font-family: var(--display); text-transform: uppercase; font-weight: 500; font-size: 24px; line-height: 1.1; margin-bottom: 10px; color: var(--text); }
.topic-body span { font-size: 14px; color: var(--muted); line-height: 1.55; }
.topic-cta {
  display: block; background: var(--accent); color: #fff; text-align: center; padding: 13px 10px;
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.06em; font-size: 16px;
}
.topic-card:hover .topic-cta { filter: brightness(1.12); }

/* Contribute band */
.contribute-band {
  margin-top: 48px; padding: 40px var(--gutter);
  background: var(--forest); color: #fff;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px;
}
.contribute-band h2 { margin: 0 0 8px; font-family: var(--display); text-transform: uppercase; font-weight: 500; font-size: 30px; line-height: 1.1; }
.contribute-band p { margin: 0; max-width: 44em; color: rgba(255, 255, 255, 0.88); }

/* Footer */
.site-footer { background: var(--bar); color: rgba(255, 255, 255, 0.72); padding: 40px var(--gutter) 28px; font-size: 14px; }
.footer-cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 60px; }
.footer-cols > div { max-width: 28em; }
.footer-brand { font-family: var(--display); text-transform: uppercase; font-size: 24px; color: #fff; margin: 0 0 8px; letter-spacing: 0.03em; }
.footer-cols p { margin: 0; }
.site-footer a { color: #fff; }
.site-footer nav { display: grid; grid-template-columns: repeat(2, auto); gap: 8px 36px; align-content: start; }
.site-footer nav a { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.05em; }
.site-footer nav a:hover { color: var(--saffron); }
.footer-note { margin: 28px 0 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.15); font-size: 12.5px; }

/* ---------- Shared components on the light theme ---------- */
.species-card, .search-result-card, .feature-card, .loc-card, .stats-card, .sub-location-card, .operator-card { box-shadow: none; }
.species-card .thumb, .search-result-card .thumb { border-radius: 0; }
.tab-btn { border-radius: 0; font-size: 15px; font-weight: 500; }
.card-toggle-seen[aria-pressed="true"] .card-toggle-track, .trip-toggle-seen[aria-pressed="true"] .trip-toggle-track { background: var(--g-birds); }
.card-toggle-seen[aria-pressed="true"] .card-toggle-thumb, .trip-toggle-seen[aria-pressed="true"] .trip-toggle-thumb { background: #fff; }
.trip-toggle-seen[aria-pressed="true"] .trip-toggle-label { color: var(--g-birds); }
.leaflet-control-attribution { background: rgba(255, 255, 255, 0.85) !important; }
.danger-btn { color: var(--accent); border-color: rgba(200, 16, 46, 0.35); }
.danger-btn:hover { background: rgba(200, 16, 46, 0.08); }

/* ---------- Inner pages: title band ---------- */
.page-inner .topbar.site-bar { position: sticky; top: 0; }
.page-head {
  background: var(--surface-2);
  padding: 30px var(--gutter) 26px;
  border-bottom: 4px solid var(--bar);
}
.page-head h1 {
  margin: 0; font-family: var(--display); text-transform: uppercase; font-weight: 500;
  font-size: 34px; line-height: 1.05; color: var(--text); letter-spacing: 0.01em;
}
.page-head p { margin: 8px 0 0; color: var(--muted); font-size: 15px; max-width: 44em; }
.page-back {
  display: inline-block; margin-bottom: 10px;
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.06em; font-size: 14px; color: var(--accent);
}
.page-back:hover { text-decoration: underline; }
.page-head-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.page-head .loc-tag, .loc-tag {
  border-radius: 0; background: var(--bar); color: #fff;
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 400; font-size: 12px; padding: 5px 10px;
}
@media (min-width: 900px) {
  .page-head { padding: 48px var(--gutter) 40px; }
  .page-head h1 { font-size: 52px; }
  .page-head p { font-size: 17px; }
}
.page-inner .section { padding-top: 28px; padding-bottom: 40px; }
.page-inner .site-footer { margin-top: 40px; }
@media (min-width: 900px) {
  .page-inner .bottom-nav { display: none; }
  .page-inner { padding-bottom: 0; }
}

/* ---------- Tabs: square, the species tabs take their group colour ---------- */
.tabs { gap: 4px; margin-bottom: 22px; border-bottom: 4px solid var(--bar); padding-bottom: 0; }
.tab-btn {
  background: var(--surface-2); color: var(--text); border: none; padding: 11px 18px;
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.05em;
}
.tab-btn:hover { background: #e2dfdb; }
.tab-btn.active { background: var(--bar); color: #fff; }
.tab-btn[data-tab="mammals"].active { background: var(--g-mammals); }
.tab-btn[data-tab="birds"].active { background: var(--g-birds); }
.tab-btn[data-tab="lizards"].active, .tab-btn[data-tab="snakes"].active, .tab-btn[data-tab="turtlescrocs"].active { background: var(--g-reptiles); }
.tab-btn[data-tab="amphibians"].active { background: var(--g-amphibians); }
@media (min-width: 900px) { .tab-btn { font-size: 17px; padding: 13px 24px; } }

/* ---------- Species list: a grid of cards on wide screens ---------- */
.species-card { border-radius: 0; padding: 10px 12px; align-items: center; }
.species-card:hover { border-color: var(--text); }
.species-card .thumb { width: 64px; height: 64px; font-size: 26px; }
.species-card .info h5, .search-result-card .info h5 { font-family: var(--display); text-transform: uppercase; font-weight: 500; font-size: 15px; letter-spacing: 0.02em; }
.species-group-heading { margin: 30px 0 12px; }
@media (min-width: 700px) {
  .page-species .tab-panel.active { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 12px; align-items: start; }
  .page-species .species-group-heading { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  .page-species .tab-panel.active { grid-template-columns: repeat(3, 1fr); }
}
.search-result-card { border-radius: 0; }
.search-result-card .thumb { width: 52px; height: 52px; }
.page-search .section { max-width: 860px; }
#search-input { border-radius: 0; border: 2px solid var(--bar); font-size: 17px; padding: 14px 16px; }

/* ---------- Detail pages: photos left, facts right on wide screens ---------- */
.detail-cover { border-radius: 0; }
.detail-latin { font-size: 16px; margin: 0 0 16px; }
.stats-card { border-radius: 0; background: var(--surface-2); border: none; }
.stats-title { font-weight: 500; }
.stat-icon { border-radius: 0; background: #fff; }
.trip-toggle { border-radius: 0; }
.upload-photo-btn { background: var(--accent); color: #fff; border: none; }
@media (min-width: 900px) {
  .page-species-detail .section, .page-location .section, .page-guide-detail .section {
    display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); column-gap: 44px; align-items: start;
  }
  .page-species-detail .section > *, .page-location .section > *, .page-guide-detail .section > * { grid-column: 2; }
  .page-species-detail .sp-swipe-wrap, .page-species-detail .sp-swipe-hint,
  .page-location .sp-swipe-wrap, .page-location .sp-swipe-hint,
  .page-guide-detail #guide-cover-gallery { grid-column: 1; grid-row: 1 / span 30; }
  .page-species-detail .detail-cover, .page-location .detail-cover, .page-guide-detail .detail-cover { height: 460px; }
}

/* ---------- Other shared components ---------- */
.loc-card, .sub-location-card, .operator-card, .feature-card { border-radius: 0; }
.section p.lead { font-size: 15px; }
.section h3 { font-size: 22px; }

.search-input, .popup-trip-btn, .install-banner-btn { border-radius: 0; }
@media (min-width: 900px) { #locations-map, #trip-map { height: 540px; } }

/* ---------- Places: region intro then a grid of place cards ---------- */
.page-locations .tab-panel.active { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.page-locations .tab-panel > h3, .page-locations .tab-panel > .lead { grid-column: 1 / -1; margin-bottom: 0; }
.page-locations .loc-card { margin-bottom: 0; display: flex; flex-direction: column; height: 100%; border: none; background: var(--surface-2); }
.page-locations .loc-card .cover { height: auto; aspect-ratio: 16 / 10; }
.page-locations .loc-card h4 { font-size: 22px; font-weight: 500; line-height: 1.1; }
.page-locations .loc-card .loc-top { flex-direction: column; gap: 6px; }
@media (min-width: 700px) { .page-locations .tab-panel.active { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .page-locations .tab-panel.active { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.loc-highlights b { font-family: var(--display); text-transform: uppercase; font-weight: 500; letter-spacing: 0.04em; }
@media (min-width: 900px) { .page-locations .tabs { flex-wrap: wrap; overflow: visible; } }
