:root {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 16px;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-size: 16px;
  line-height: 1.5;
}

/* ========= Base (shared) ========= */

#status {
  font-size: 14px;
  color: #555;
}

.hidden,
.filters-panel.hidden {
  display: none !important;
}

/* ---------- Toast (inline guidance) ---------- */
.toast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
  max-width: min(620px, 100%);
  margin-left: 10px;
}

.toast-msg {
  color: #222;
  font-size: 14px;
  line-height: 1.2;
}

.toast-action {
  border: none;
  background: #111;
  color: #fff;
  border-radius: 999px;
  padding: 8px 10px;
  font-weight: 700;
  cursor: pointer;
}

.toast-close {
  border: none;
  background: transparent;
  color: #666;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

/* Small “x” icon button used in modals */
.icon-btn {
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  color: #444;
}

/* Manual location coordinate row */
.coord-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
}

.coord-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 150px;
}

.coord-field span {
  font-size: 14px;
  color: #666;
}

.coord-field input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  font-size: 14px;
}

.error {
  font-size: 14px;
  color: #b00020;
}

.section-title {
  margin: 14px 0 8px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #555;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

/* Form controls */
select,
textarea,
input[type="text"],
input[list] {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 16px;
  line-height: 1.35;
}

textarea {
  resize: vertical;
  min-height: 44px;
}

.form-row {
  display: grid;
  gap: 6px;
}

.form-row > span {
  font-size: 14px;
  color: #555;
}

.fieldset {
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.fieldset legend {
  font-size: 14px;
  color: #555;
  padding: 0 6px;
}

.fieldset-title {
  font-size: 14px;
  color: #555;
  font-weight: 600;
}

.fieldset.field legend {
  padding: 0 6px;
  font-weight: 700;
}

.check,
.radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  z-index: 2000;
  padding: 16px;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 0;
  border-radius: 18px;
  width: min(100%, 420px);
  max-width: 420px;
  max-height: calc(100dvh - 24px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-sizing: border-box;
}

@supports not (height: 100dvh) {
  .modal-content {
    max-height: calc(100vh - 24px);
  }
}

.modal-content h3 {
  margin: 0;
  font-size: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-actions button {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d0d0d0;
  background: white;
  cursor: pointer;
  min-height: 44px;
}

/* ========= MOBILE-FIRST LAYOUT ========= */
/* Your current mobile HTML uses: <main class="layout layout--mobile"> */

.layout--mobile {
  position: relative;
  height: 100dvh;
  min-height: 100dvh;
  width: 100%;
  overflow: hidden;
}

/* Fallback for older browsers */
@supports not (height: 100dvh) {
  .layout--mobile {
    height: 100vh;
    min-height: 100vh;
  }
}

/* Map occupies full screen on mobile */
.layout--mobile #map {
  height: 100%;
  width: 100%;
  min-height: 100%;
}

/* On mobile, hide the top header (FABs take over) */
header {
  display: none;
}


.map-app-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  min-height: 64px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1550;
  background: #ffffff;
  color: #111;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  border-radius: 0;
  pointer-events: none;
}

.map-app-banner__action {
  margin-left: auto;
  pointer-events: auto;
  flex: 0 0 auto;
}

.map-app-banner__logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.map-app-banner__title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

/* Floating Action Buttons */
.fab-stack {
  position: fixed;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1500;
}


.fab-stack--top {
  right: calc(12px + env(safe-area-inset-right));
  top: calc(80px + env(safe-area-inset-top));
  align-items: flex-end;
  gap: 10px;
}

/* Help + Share side-by-side row */
.fab-row {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: stretch;
}

.fab-row .fab {
  flex: 1;
}


.fab-stack--bottom {
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom));
  width: calc(100vw - 24px);
  max-width: 520px;
  align-items: stretch;
  gap: 12px;
}

/* Bottom buttons: larger and full-width */
.fab-stack--bottom .fab {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 14px;
}

/* Top recenter button: clearer, not full-width */
#btnLocateFab,
#btnPredatorSafetyTips {
  min-width: 190px;
}

.fab-stack--top .fab {
  border-radius: 16px;
}

/* Base FAB style */
.fab {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 650;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  background: #fff;
  cursor: pointer;
}

.fab:active {
  transform: translateY(1px);
}

.fab--secondary {
  opacity: 0.95;
}

/* Alerts bell FAB */
.fab--alert {
  min-height: 0;
  min-width: 0;
  width: auto;
  padding: 10px 12px;
  border-radius: 999px;
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #ffffff;
}

.fab--alert svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.fab--alert .fab__label {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  min-width: 2.3ch;
  text-align: center;
}

.fab--alert-off {
  background: #6b7280;
}

.fab--alert-off:hover {
  background: #5b6472;
}

.fab--alert-on {
  background: #2e7d32;
}

.fab--alert-on:hover {
  background: #27682a;
}

.fab--alert:active {
  transform: translateY(1px);
}

/* Bottom sheet */
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1400;
  background: #fff;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.18);
  height: 44vh;
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}

.sheet-handle {
  width: 46px;
  height: 5px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  margin: 10px auto 6px;
  flex: 0 0 auto;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  flex: 0 0 auto;
}

.sheet-title {
  font-size: 16px;
  margin: 0;
}

.sheet-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
}

/* Your HTML does not wrap content in .sheet-content, so let the main body scroll */
.sheet > *:not(.sheet-handle):not(.sheet-header) {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.sheet-content {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Filters section */
.filters-wrap,
.sheet-section,
.filters-panel {
  padding: 10px 14px;
}

.filters-wrap > summary {
  cursor: pointer;
  font-weight: 700;
  margin-bottom: 10px;
}

.filters,
.filters-panel {
  display: grid;
  gap: 10px;
  margin: 0;
}

.filter-group {
  display: grid;
  gap: 6px;
}

.filter-group-title {
  font-size: 12px;
  font-weight: 700;
  color: #555;
}

.filter {
  display: grid;
  gap: 6px;
}

.filter span {
  font-size: 14px;
  color: #555;
}

.filters select,
.filters-panel select {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid #d0d0d0;
  background: white;
  font-size: 16px;
}

#btnResetFilters {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d0d0d0;
  background: white;
  cursor: pointer;
  font-size: 14px;
}

#btnApplyFilters {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--color-action, #43a047);
  background: var(--color-action, #43a047);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}

/* Lists */
.tag-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.tag-item {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}

#tagPhotoPreview {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

#btnClearPhoto {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d0d0d0;
  background: white;
  cursor: pointer;
  font-size: 14px;
}

.tag-title {
  font-size: 16px;
  font-weight: 650;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.tag-title__category {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
}

.tag-meta {
  font-size: 14px;
  color: #555;
}

.tag-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.tag-actions button {
  height: 38px;
  padding: 0 12px;
  border: 1px solid #d0d0d0;
  background: white;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
}

.tag-actions button:active {
  transform: translateY(1px);
}

/* Wildlife panel overlay */
.panel {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 3000;
  display: grid;
  place-items: end center;
  padding: 10px;
}

.panel.hidden {
  display: none;
}

.panel-card {
  width: min(100%, 520px);
  max-width: 520px;
  max-height: min(88dvh, 900px);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  box-sizing: border-box;
}

@supports not (height: 100dvh) {
  .panel-card {
    max-height: 88vh;
  }
}

.panel-title {
  margin: 0;
  font-size: 16px;
}

.panel-close {
  appearance: none;
  border: 0;
  background: transparent;
  font-weight: 800;
  padding: 6px 10px;
  cursor: pointer;
}

.panel-content {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 14px 18px;
}

.panel-section {
  margin-top: 12px;
}

/* Notification settings UI */
.panel-body {
  padding: 12px 4px 4px;
}

.field {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.field > span,
.muted {
  font-size: 14px;
  opacity: 0.85;
}

.toggle-row,
.check-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 8px 0;
}

.toggle-row input,
.check-row input {
  transform: scale(1.1);
}

fieldset.field {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  padding: 10px;
}

/* Notification on/off button */
.notif-toggle-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
  min-width: 170px;
}

.notif-toggle-btn.is-off {
  background: #b42318;
  color: #fff;
}

.notif-toggle-btn.is-on {
  background: #0e8a3a;
  color: #fff;
}

.notif-toggle-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.notif-help-text {
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
  opacity: 0.85;
  max-width: 320px;
}

.form-label-strong {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.inline-field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.inline-field .form-label-strong {
  margin-bottom: 0;
}

.inline-field select {
  width: auto;
  min-width: 120px;
}

.toggle-row select {
  margin-top: 0;
}

/* Leaflet zoom controls: positioned under recenter+bell */
@media (max-width: 899px) {
  .leaflet-top.leaflet-right {
    right: calc(12px + env(safe-area-inset-right));
    top: calc(12px + env(safe-area-inset-top) + 120px);
    margin-right: 0;
  }
}

.mini-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
  padding-bottom: 4px;
}

.mini-title {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.2;
}

.mini-close {
  border: 0;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}

.mini-meta {
  margin-top: 4px;
  opacity: 0.75;
  font-size: 13px;
}

.mini-desc {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.mini-img {
  width: 100%;
  max-width: 100%;
  max-height: 140px;
  object-fit: cover;
  margin-top: 8px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.leaflet-popup-content {
  margin: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
}

.leaflet-popup-content-wrapper {
  border-radius: 14px !important;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18) !important;
}

.leaflet-popup-close-button {
  font-size: 20px !important;
  padding: 8px 10px 0 0 !important;
  color: rgba(0, 0, 0, 0.55);
  line-height: 1;
}

.leaflet-popup-close-button:hover {
  color: rgba(0, 0, 0, 0.9);
}

#btnCancelTag {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d0d0d0;
  background: #fff;
  color: #333;
  cursor: pointer;
  font-size: 14px;
}

#btnCancelTag:hover {
  background: #f5f5f5;
}

.panel-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: #111;
  font-size: 24px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 10px;
}

.panel-close:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* In-app banner shown when a push alert arrives while the site is open */
.in-app-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  top: 12px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(232, 245, 233, 0.98), rgba(241, 248, 233, 0.98));
  border: 1px solid rgba(67, 160, 71, 0.24);
  box-shadow: 0 10px 26px rgba(27, 94, 32, 0.14);
  backdrop-filter: blur(10px);
  color: #17351d;
}

.in-app-banner.hidden {
  display: none;
}

.in-app-banner__content {
  min-width: 0;
}

.in-app-banner__title {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.2;
  color: inherit;
}

.in-app-banner__body {
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.25;
  opacity: 0.95;
  color: inherit;
}

.in-app-banner__close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 0;
  background: rgba(67, 160, 71, 0.12);
  color: #1f5f2b;
  border: 1px solid rgba(67, 160, 71, 0.18);
  cursor: pointer;
}

/* Notification flow buttons */
#btnEnableAlerts {
  padding: 8px 10px;
  border: 1px solid #c62828;
  background: #c62828;
  color: #ffffff;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

#btnEnableAlerts:hover {
  filter: brightness(0.95);
}

#btnEnableAlerts:active {
  transform: translateY(1px);
}

#btnTestNotif,
.filter-actions #btnTestNotif {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d0d0d0;
  background: white;
  cursor: pointer;
  font-size: 14px;
}

#btnSaveNotif,
.filter-actions #btnSaveNotif {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--color-action, #43a047);
  background: var(--color-action, #43a047);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}

#btnTestNotif:active,
#btnSaveNotif:active {
  transform: translateY(1px);
}

/* Wildlife info UI should never be covered by Leaflet zoom controls */
.leaflet-popup-pane {
  z-index: 3000 !important;
}

.leaflet-control-container,
.leaflet-control {
  z-index: 2000 !important;
}

#tagInfoOverlay {
  position: fixed;
  z-index: 4000;
  bottom: calc(200px + env(safe-area-inset-bottom));
  left: calc(12px + env(safe-area-inset-left));
  max-width: min(280px, calc(100vw - 24px));
  max-height: 40vh;
}

#tagInfoOverlay .mini-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 12px;
  max-height: inherit;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.leaflet-popup {
  z-index: 3001 !important;
}

/* Map quick stats */
/* ── Map Quick Stats: two-zone card ─────────────────────────
   Top zone  = white, shows metrics (passive info)
   Bottom CTA zone = coloured action bar (clearly a button)
──────────────────────────────────────────────────────────── */
.map-quick-stats {
  text-align: left;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  padding: 0;          /* padding lives inside each zone now */
  cursor: pointer;
  overflow: hidden;    /* keeps CTA bar inside rounded corners */
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.map-quick-stats:active {
  transform: scale(0.97);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.fab-stack--bottom .map-quick-stats {
  width: 100%;
}

/* ── Metrics zone (top, white) ── */
.map-quick-stats__top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: start;
  padding: 11px 14px 10px;
}

.map-quick-stats__label {
  font-size: 11px;
  color: #6b7280;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-transform: uppercase;
}

.map-quick-stats__value {
  font-size: 15px;
  font-weight: 800;
  color: #111827;
  line-height: 1.2;
  margin-top: 2px;
}

/* ── CTA action bar (bottom, coloured) ── */
.map-quick-stats__cta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;

  /* default state: dark charcoal */
  background: #1a1a1a;
  color: #fff;

  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;

  /* hairline separator from the metrics zone */
  border-top: 1px solid rgba(0, 0, 0, 0.06);

  /* Explicit bottom corners to match parent card radius —
     some mobile WebKit builds don't clip child backgrounds
     to the parent border-radius without this. */
  border-bottom-left-radius: 17px;
  border-bottom-right-radius: 17px;
}

/* State: new sightings → alert red */
.map-quick-stats--state-new .map-quick-stats__cta {
  background: linear-gradient(90deg, #c62828, #d32f2f);
}

/* State: all caught up → forest green */
.map-quick-stats--state-ok .map-quick-stats__cta {
  background: linear-gradient(90deg, #43a047, #4caf50);
}

/* State: empty → muted navy */
.map-quick-stats--state-empty .map-quick-stats__cta {
  background: #2a2a2a;
  opacity: 0.9;
}

/* Pulse ring on the whole button when there are NEW sightings */
.map-quick-stats--state-new {
  animation: mqsPulse 2.4s ease-in-out infinite;
}

@keyframes mqsPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(0,0,0,0.18); }
  50%       { box-shadow: 0 8px 28px rgba(198,40,40,0.45), 0 0 0 4px rgba(198,40,40,0.15); }
}

/* Badge pill inside the CTA bar */
.map-quick-stats__badge {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  white-space: nowrap;
}

.map-quick-stats__badge--new {
  background: rgba(255, 255, 255, 0.26);
}

.map-quick-stats__badge--ok {
  background: rgba(255, 255, 255, 0.20);
}

/* CTA text column */
.map-quick-stats__ctaText {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* The dynamic headline text */
#mapStatCta {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

/* Fixed "browse & filter" micro-hint — always visible */
.map-quick-stats__sub2 {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.3;
}

/* Chevron arrow on the right */
.map-quick-stats__chevron {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.75);
  transition: transform 0.15s ease;
}

.map-quick-stats:hover .map-quick-stats__chevron,
.map-quick-stats:focus-visible .map-quick-stats__chevron {
  transform: translateX(3px);
  color: #fff;
}

/* Sort chips */
/* sort-chips layout moved to bottom of file (Medium/Low UX improvements) */

.chip {
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  line-height: 1.2;
}



.chip.is-selected {
  background: #c62828;
  border-color: #c62828;
  color: #fff;
}

.chip.is-selected:hover {
  background: #b71c1c;
  border-color: #b71c1c;
}

.chip.is-selected:focus-visible {
  outline: 2px solid rgba(198, 40, 40, 0.45);
}

.chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ===== Predator Safety Tips ===== */

.predator-safety-modal {
  max-width: 520px;
  display: grid;
  gap: 14px;
}


.predator-safety-intro {
  margin: 0;
  font-size: 14px;
  color: #333;
  line-height: 1.45;
}

.predator-safety-updated {
  font-size: 12px;
  color: #555;
}

.predator-safety-disclaimer {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(198, 40, 40, 0.18);
  background: #fff7f7;
  color: #7f1d1d;
  font-size: 13px;
  line-height: 1.45;
}

.predator-safety-card {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  display: grid;
  gap: 10px;
}

.predator-safety-card__header {
  display: grid;
  gap: 6px;
}

.predator-safety-card__header h4 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}

.predator-safety-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--color-alert);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.predator-safety-badge--gear {
  background: #111;
}

.predator-safety-species-image {
  margin: 4px 0 12px;
}

.predator-safety-species-image img {
  width: 100%;
  max-width: 480px;
  max-height: 220px;
  display: block;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.predator-safety-species-image p {
  font-size: 11px;
  color: #888;
  margin: 4px 0 0;
  line-height: 1.4;
}

.predator-safety-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.predator-safety-list li {
  color: #111;
  line-height: 1.45;
}

.predator-safety-list--immediate li {
  font-weight: 700;
}

.predator-safety-sources {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.predator-safety-sources strong {
  display: block;
  margin-bottom: 2px;
}

.predator-safety-sources a {
  color: #0b57d0;
  text-decoration: none;
}

.predator-safety-sources a:hover {
  text-decoration: underline;
}

.predator-safety-source-note {
  margin: 0 0 4px;
  color: #555;
  line-height: 1.45;
}

/* Global sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

input[type="text"],
input[list],
input[type="number"],
input[type="email"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="file"],
select,
textarea {
  width: 100%;
  max-width: 100%;
}

button {
  max-width: 100%;
}

/* ========= DESKTOP OVERRIDE ========= */
@media (min-width: 900px) {
  html,
  body {
    height: 100%;
    margin: 0;
    overflow: hidden;
  }

  body {
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
  }

  header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 20px;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1600;
  }

  header .controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }

  .layout,
  .layout--mobile {
    width: 100vw;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    position: relative;
  }

  #map,
  .layout--mobile #map {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  /* Desktop now uses the in-map banner instead of the older header bar. */
  header {
    display: none;
  }

  body {
    display: block;
    min-height: 100vh;
  }

  .layout,
  .layout--mobile {
    height: 100vh;
  }

  .map-app-banner {
    display: flex;
  }

  .fab-stack--top {
    top: calc(84px + env(safe-area-inset-top));
  }

  .fab-stack--bottom {
    left: auto;
    right: 20px;
    transform: none;
    width: 360px;
    max-width: none;
    bottom: 20px;
  }

  .panel {
    place-items: center end;
    padding: 20px;
  }

  .panel-card {
    width: min(720px, calc(100vw - 40px));
    max-width: 720px;
    max-height: calc(100vh - 40px);
    border-radius: 20px;
  }

  #tagInfoOverlay {
    bottom: 100px;
    left: 20px;
    max-width: 320px;
  }
}

.check input,
.radio input,
.toggle-row input,
.check-row input {
  width: auto;
  max-width: none;
  margin: 0;
  flex: 0 0 auto;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

input[type="text"],
input[list],
input[type="number"],
input[type="email"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="file"],
select,
textarea {
  width: 100%;
  max-width: 100%;
}

.check input,
.radio input,
.toggle-row input,
.check-row input {
  width: auto;
  max-width: none;
  margin: 0;
  flex: 0 0 auto;
}

button {
  max-width: 100%;
}

textarea {
  resize: vertical;
  min-height: 44px;
}

.chip--filters {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Auto-size to content so "View Filters (2)" never clips */
  flex: 0 0 auto;
  width: auto;
  min-width: max-content;
  padding-left: 16px;
  padding-right: 16px;
}

.filter-summary {
  padding: 0 14px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.chip.has-active-filters {
  background: #c62828;
  border-color: #c62828;
  color: #fff;
}

.chip.has-active-filters:hover {
  background: #b71c1c;
  border-color: #b71c1c;
}

.photo-upload-row {
  gap: 10px;
}

.photo-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.photo-upload-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(247,249,252,1) 100%);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.photo-upload-trigger:active {
  transform: scale(0.985);
}

.photo-upload-trigger:hover {
  border-color: rgba(0, 0, 0, 0.14);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.08);
}

.photo-upload-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  font-size: 20px;
  background: linear-gradient(135deg, #eef4ff 0%, #f5f8ff 100%);
  border: 1px solid rgba(65, 105, 225, 0.14);
}

.photo-upload-copy {
  display: grid;
  gap: 2px;
}

.photo-upload-copy strong {
  font-size: 16px;
  line-height: 1.2;
  color: #111;
}

.photo-upload-copy small {
  font-size: 13px;
  line-height: 1.3;
  color: #667085;
}

#tagPhotoPreview {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

#btnClearPhoto {
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}

#btnClearPhoto:active {
  transform: scale(0.985);
}

@media (max-width: 640px) {
  .photo-upload-trigger {
    min-height: 60px;
    padding: 15px 16px;
    border-radius: 20px;
  }

  .photo-upload-copy strong {
    font-size: 17px;
  }

  .photo-upload-copy small {
    font-size: 14px;
  }

  #btnClearPhoto {
    min-height: 50px;
    font-size: 16px;
  }
}

/* Modal title banners */

.modal-title-banner h2,
.modal-title-banner h3 {
  margin: 0;
  color: white;
}

.modal-title-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  margin: 0;
  padding: 12px 16px;

  background: #c62828;
  color: #fff;

  border-radius: 14px 14px 0 0;
}

.modal-title-banner h2,
.modal-title-banner h3 {
  margin: 0;
  color: #fff;
  font-size: 16px;
  line-height: 1.2;
}

.modal-title-banner .icon-btn,
.modal-title-banner .panel-close {
  color: #fff;
  background: transparent;
}

.modal-title-banner .icon-btn:hover,
.modal-title-banner .panel-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.modal-content h3 {
  margin: 0;
  font-size: 16px;
}

.warning-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 18px;
  height: 18px;

  margin-right: 6px;

  background: #c62828;
  color: #fff;

  font-size: 13px;
  font-weight: 900;

  border-radius: 50%;
}

.modal-body {
  padding: 12px 16px 16px;
}

/* ========= Medium + Low Priority UX Improvements ========= */

/* --- Chip group labels (Sort / Filter) --- */
.sort-chips {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.chip-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 120px;
}

.chip-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  padding-left: 4px;
}

.chip-group-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip-group-row .chip {
  flex: 1;
  min-width: 0;
}

/* Filters chip sizes to its own text — never forced into equal-width flex split */
.chip-group-row .chip--filters {
  flex: 0 0 auto;
  width: auto;
}

/* --- Inline location hint below disabled Closest chip --- */
.chip-location-hint {
  display: block;
  font-size: 11px;
  color: #888;
  text-align: center;
  margin-top: 2px;
  padding-left: 4px;
}

/* --- Required field note at top of form --- */
.form-required-note {
  margin: 0 0 10px;
  font-size: 12px;
  color: #888;
}

/* --- Predator Safety Tips amber accent --- */
.fab--safety {
  background: #fff8e1;
  border: 1px solid #f9a825;
  color: #5d4037;
}

.fab--safety:hover {
  background: #fff3cd;
  border-color: #f57f17;
}

/* --- Desktop: preserve 5-across chip layout override --- */
@media (min-width: 768px) {
  .sort-chips {
    flex-wrap: nowrap;
  }
  .chip-group {
    flex: 0 0 auto;
  }
}


/* ═══════════════════════════════════════════════════
   COLOR SYSTEM — design tokens + semantic roles
   ═══════════════════════════════════════════════════ */
:root {
  /* Core palette */
  --color-alert:        #c62828;   /* red   — danger, alerts, new sightings */
  --color-alert-hover:  #b71c1c;
  --color-action:       #43a047;   /* forest green — save / confirm / create */
  --color-action-hover: #2e7d32;

  /* Category card accents */
  --cat-predator-bg:    #fff5f5;    /* red   — matches map circle */
  --cat-predator-border:#c62828;
  --cat-smelly-bg:      #fffde7;    /* yellow — matches map circle */
  --cat-smelly-border:  #f9a825;
  --cat-hooved-bg:      #fff3e0;    /* orange — matches map circle */
  --cat-hooved-border:  #e65100;
  --cat-domestic-bg:    #f3e5f5;    /* purple — distinct, no blue */
  --cat-domestic-border:#7b1fa2;
  --cat-livestock-bg:   #e8f5e9;    /* green  — matches map circle */
  --cat-livestock-border:#43a047;
  --cat-other-bg:       #fafafa;    /* grey   — matches map circle */
  --cat-other-border:   #757575;
}

/* ── Primary action buttons (Save, Confirm) ── */
/* Save tag */
#btnSaveTag {
  background: var(--color-action);
  border: 1px solid var(--color-action);
  color: #fff;
}
#btnSaveTag:hover {
  background: var(--color-action-hover);
  border-color: var(--color-action-hover);
}
#btnSaveTag:active {
  transform: translateY(1px);
}

/* Save notifications */
#btnSaveNotif,
.filter-actions #btnSaveNotif {
  background: var(--color-action);
  border-color: var(--color-action);
  color: #fff;
}
#btnSaveNotif:hover,
.filter-actions #btnSaveNotif:hover {
  background: var(--color-action-hover);
  border-color: var(--color-action-hover);
}

/* ── New Sighting FAB — red, alert-level urgency ── */
.fab--new-sighting {
  background: var(--color-alert) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 14px 18px !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25) !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.fab--new-sighting:hover {
  background: var(--color-alert-hover) !important;
}
.fab--new-sighting:active {
  transform: translateY(1px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

/* ── Sighting card category tints ──
   Left border accent immediately signals category.
   Subtle background keeps text readable on white.    */
.tag-item.cat--predator {
  background: var(--cat-predator-bg);
  border-left: 4px solid var(--cat-predator-border);
  border-top: 1px solid rgba(198, 40, 40, 0.15);
  border-right: 1px solid rgba(198, 40, 40, 0.10);
  border-bottom: 1px solid rgba(198, 40, 40, 0.15);
}

.tag-item.cat--smelly {
  background: var(--cat-smelly-bg);
  border-left: 4px solid var(--cat-smelly-border);
  border-top: 1px solid rgba(249, 168, 37, 0.18);
  border-right: 1px solid rgba(249, 168, 37, 0.12);
  border-bottom: 1px solid rgba(249, 168, 37, 0.18);
}

.tag-item.cat--hooved {
  background: var(--cat-hooved-bg);
  border-left: 4px solid var(--cat-hooved-border);
  border-top: 1px solid rgba(230, 81, 0, 0.18);
  border-right: 1px solid rgba(230, 81, 0, 0.12);
  border-bottom: 1px solid rgba(230, 81, 0, 0.18);
}

.tag-item.cat--domestic {
  background: var(--cat-domestic-bg);
  border-left: 4px solid var(--cat-domestic-border);
  border-top: 1px solid rgba(123, 31, 162, 0.18);
  border-right: 1px solid rgba(123, 31, 162, 0.12);
  border-bottom: 1px solid rgba(123, 31, 162, 0.18);
}

.tag-item.cat--livestock {
  background: var(--cat-livestock-bg);
  border-left: 4px solid var(--cat-livestock-border);
  border-top: 1px solid rgba(67, 160, 71, 0.18);
  border-right: 1px solid rgba(67, 160, 71, 0.12);
  border-bottom: 1px solid rgba(67, 160, 71, 0.18);
}

.tag-item.cat--other {
  background: var(--cat-other-bg);
  border-left: 4px solid var(--cat-other-border);
}

/* Tag title always black — background box carries the category colour */
.tag-item.cat--predator  .tag-title,
.tag-item.cat--smelly    .tag-title,
.tag-item.cat--hooved    .tag-title,
.tag-item.cat--domestic  .tag-title,
.tag-item.cat--livestock .tag-title,
.tag-item.cat--other     .tag-title { color: #111; }

/* Ensure meta text stays readable on all tinted backgrounds */
.tag-item.cat--predator  .tag-meta,
.tag-item.cat--smelly    .tag-meta,
.tag-item.cat--hooved    .tag-meta,
.tag-item.cat--domestic  .tag-meta,
.tag-item.cat--livestock .tag-meta,
.tag-item.cat--other     .tag-meta {
  color: #555;
}

@media (min-width: 768px) {
  header {
    display: none;
  }

  body {
    display: block;
    min-height: 100vh;
  }

  .layout,
  .layout--mobile {
    height: 100vh;
  }

  .map-app-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    min-height: 64px;
    padding: calc(10px + env(safe-area-inset-top)) 16px 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1550;
    background: #ffffff;
    color: #111;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-radius: 0;
    pointer-events: none;
  }

  .fab-stack--top {
    right: calc(12px + env(safe-area-inset-right));
    top: calc(84px + env(safe-area-inset-top));
    align-items: flex-end;
    gap: 10px;
  }
}

.cta-pill{
  background: linear-gradient(135deg, var(--color-alert), var(--color-alert-hover));
  color:#fff;
  padding:6px 10px;
  border-radius:10px;
  box-shadow:0 2px 6px rgba(0,0,0,0.18);
}

/* ============================================================
   SAFETY TOOLS CHECKLIST
   ============================================================ */
.predator-safety-tools {
  margin-top: 16px;
  border: 2px solid rgba(198,40,40,0.22);
}

.predator-safety-badge--gear {
  background: #c62828;
}

.safety-tools-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.safety-tool-item {
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.09);
  border-radius: 10px;
  transition: background 0.2s;
}

.safety-tool-item:has(.safety-tool-check:checked) {
  background: rgba(67,160,71,0.08);
  border-color: rgba(67,160,71,0.28);
}

.safety-tool-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  cursor: pointer;
  user-select: none;
}

.safety-tool-check {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #43a047;
  cursor: pointer;
}

.safety-tool-icon {
  font-size: 20px;
  line-height: 1.3;
  flex-shrink: 0;
}

.safety-tool-label strong {
  display: block;
  font-size: 14px;
  color: #1e293b;
  line-height: 1.3;
}

.safety-tool-label small {
  display: block;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  margin-top: 2px;
}

.safety-tools-reset {
  background: none;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  font-size: 12px;
  padding: 6px 14px;
  cursor: pointer;
  display: block;
  margin: 0 auto;
  transition: background 0.15s, color 0.15s;
}
.safety-tools-reset:hover {
  background: #f1f5f9;
  color: #334155;
}

/* ============================================================
   TUTORIAL MODAL
   ============================================================ */
.tutorial-modal {
  max-width: 420px !important;
  border-radius: 24px !important;
}

.tutorial-body {
  padding-bottom: 6px;
}

.tutorial-steps {
  min-height: 220px;
}

.tutorial-step {
  text-align: center;
  padding: 10px 4px 18px;
  animation: fadeIn 0.25s ease;
}

.tutorial-step.hidden {
  display: none;
}

.tutorial-step__icon {
  font-size: 54px;
  line-height: 1;
  margin-bottom: 16px;
}

.tutorial-step__title {
  font-size: 20px;
  font-weight: 800;
  color: #111;
  margin: 0 0 10px;
}

.tutorial-step__desc {
  font-size: 15px;
  color: #4a5568;
  line-height: 1.6;
  margin: 0 0 22px;
}

.tutorial-btn-next {
  background: linear-gradient(135deg, #2e7d32, #43a047);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 13px 36px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}
.tutorial-btn-next:hover { opacity: 0.9; }

.tutorial-btn-practice {
  background: linear-gradient(135deg, #059669, #10b981);
  padding: 13px 28px;
}

.tutorial-btn-location {
  background: linear-gradient(135deg, #1565c0, #1e88e5);
  padding: 13px 28px;
}

.tutorial-btn-location:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.tutorial-location-status {
  font-size: 13px;
  color: #374151;
  min-height: 18px;
  margin: 8px 0 4px;
  line-height: 1.5;
  text-align: center;
}

.tutorial-skip-location {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 13px;
  padding: 8px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tutorial-skip-location:hover { color: #64748b; }

.tutorial-practice-note {
  font-size: 13px;
  color: #059669;
  background: rgba(5,150,105,0.08);
  border: 1px solid rgba(5,150,105,0.2);
  border-radius: 8px;
  padding: 8px 12px;
  margin: 0 0 18px;
  line-height: 1.5;
}

.tutorial-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 12px;
}

.tutorial-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: background 0.2s, transform 0.2s;
}

.tutorial-dot--active {
  background: #43a047;
  transform: scale(1.3);
}

.tutorial-skip {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 13px;
  padding: 8px;
  cursor: pointer;
  margin-bottom: 4px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tutorial-skip:hover { color: #64748b; }

/* ============================================================
   SPECIES AUTOCOMPLETE DROPDOWN
   ============================================================ */
.species-input-wrap {
  position: relative;
  width: 100%;
}

.species-input-wrap input {
  width: 100%;
  box-sizing: border-box;
}

.species-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 9999;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
  max-height: 240px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.species-dropdown--open {
  display: block;
}

.species-dropdown__item {
  padding: 11px 16px;
  font-size: 15px;
  color: #111;
  cursor: pointer;
  line-height: 1.3;
  transition: background 0.1s;
}

.species-dropdown__item strong {
  color: #c62828;
  font-weight: 800;
}

.species-dropdown__item:hover,
.species-dropdown__item--active {
  background: rgba(0,0,0,0.05);
}

.species-dropdown__item + .species-dropdown__item {
  border-top: 1px solid rgba(0,0,0,0.05);
}

/* ============================================================
   DISTANCE UNIT PILL TOGGLE (replaces select dropdown)
   ============================================================ */
.dist-unit-pills {
  display: flex;
  gap: 4px;
}

.dist-unit-pill {
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 999px;
  background: #fff;
  color: #444;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.dist-unit-pill:hover {
  background: rgba(0,0,0,0.05);
}

.dist-unit-pill--active {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* ============================================================
   FILTER ACTION BUTTONS (Clear + Apply & Close)
   ============================================================ */
.filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.07);
}

.filter-action-btn {
  flex: 1;
  min-width: 110px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.15);
  background: #fff;
  color: #333;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.filter-action-btn--clear {
  background: #fff;
  color: #c62828;
  border-color: rgba(198,40,40,0.25);
}

.filter-action-btn--clear:hover {
  background: rgba(198,40,40,0.06);
}

.filter-action-btn--apply {
  background: #43a047;
  color: #fff;
  border-color: #43a047;
}

.filter-action-btn--apply:hover {
  background: #2e7d32;
  border-color: #2e7d32;
}

/* ============================================================
   HELP FAB BUTTON
   ============================================================ */
.fab--help {
  background: #fff;
  color: #111;
  border: 1px solid rgba(0,0,0,0.14);
  font-size: 13px;
  font-weight: 700;
}

.fab--help:hover {
  background: #f5f5f5;
}

.fab--share {
  background: #fff;
  color: #1a6b2e;
  border: 1px solid rgba(26,107,46,0.25);
  font-size: 13px;
  font-weight: 700;
}

.fab--share:hover {
  background: #f0faf3;
  border-color: rgba(26,107,46,0.5);
}

/* ============================================================
   HELP MODAL
   ============================================================ */
.help-modal {
  max-width: 540px;
  display: flex;
  flex-direction: column;
  max-height: min(90dvh, 860px);
  overflow: hidden;
}

.help-modal-body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
  padding: 0;
}

/* Tab bar */
.help-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
}

.help-tab {
  flex: 1;
  padding: 12px 8px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  background: none;
  cursor: pointer;
  color: #666;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.help-tab--active {
  color: #c62828;
  border-bottom-color: #c62828;
}

.help-tab:hover:not(.help-tab--active) {
  color: #333;
  background: rgba(0,0,0,0.03);
}

/* Scrollable panel content */
.help-panel {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  padding: 16px 18px 24px;
}

/* Guide sections */
.help-section {
  margin-bottom: 22px;
}

.help-section:last-child {
  margin-bottom: 0;
}

.help-section-title {
  font-size: 15px;
  font-weight: 800;
  color: #111;
  margin: 0 0 8px;
}

.help-section p {
  font-size: 14px;
  color: #333;
  line-height: 1.6;
  margin: 0 0 8px;
}

.help-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.help-list li {
  font-size: 13px;
  color: #444;
  line-height: 1.55;
}

.help-list li strong {
  color: #111;
}

/* Report form */
.help-report-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}

.help-report-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: #333;
}

.help-report-label small {
  font-weight: 400;
  color: #888;
}

.help-required {
  color: #c62828;
}

.help-report-select,
.help-report-textarea,
.help-report-input {
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: #111;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
}

.help-report-textarea {
  min-height: 90px;
}

.help-report-submit {
  background: #c62828;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 13px 0;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s;
}

.help-report-submit:hover {
  background: #b71c1c;
}

.help-report-status {
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
}

.help-report-status--success {
  background: rgba(67,160,71,0.1);
  color: #43a047;
  border: 1px solid rgba(67,160,71,0.25);
}

.help-report-status--error {
  background: rgba(198,40,40,0.08);
  color: #c62828;
  border: 1px solid rgba(198,40,40,0.22);
}

/* ============================================================
   SHARE MODAL
   ============================================================ */
.share-modal {
  max-width: 460px;
  display: flex;
  flex-direction: column;
}

.share-modal-body {
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.share-tagline {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-secondary, #555);
  line-height: 1.5;
  text-align: center;
}

.share-message-box {
  background: var(--color-surface-raised, #f4f6f9);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  padding: 14px 16px;
}

.share-message-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text, #111);
}

.share-url-inline {
  font-weight: 700;
  color: #1a6b2e;
  word-break: break-all;
}

.share-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share-btn {
  display: block;
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s;
}

.share-btn:active {
  transform: translateY(1px);
}

.share-btn--primary {
  background: #1a6b2e;
  color: #fff;
}

.share-btn--primary:hover {
  background: #155724;
}

.share-btn--copy {
  background: #fff;
  color: #1a6b2e;
  border: 1.5px solid #1a6b2e;
}

.share-btn--copy:hover {
  background: #f0faf3;
}

.share-status {
  margin: 0;
  font-size: 13px;
  text-align: center;
  color: #1a6b2e;
  min-height: 18px;
}

/* ============================================================
   ALERTS PANEL — redesigned
   ============================================================ */
.notif-panel-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.notif-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notif-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
}

/* Radius slider */
.notif-radius-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notif-radius-slider {
  flex: 1;
  accent-color: #43a047;
  height: 4px;
  cursor: pointer;
}

.notif-radius-label {
  font-size: 14px;
  font-weight: 800;
  color: #111;
  min-width: 60px;
  text-align: right;
}

.notif-radius-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #999;
  padding: 0 2px;
  margin-top: -4px;
}

/* Category cards */
.notif-cat-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif-cat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.1);
  background: #fff;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.notif-cat-card:has(.notif-cat-check:checked) {
  border-color: rgba(0,0,0,0.2);
}

.notif-cat-check {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #43a047;
}

.notif-cat-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.notif-cat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notif-cat-info strong {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  line-height: 1.2;
}

.notif-cat-info small {
  font-size: 11px;
  color: #777;
  line-height: 1.3;
}

/* Swatch colors matching category scheme */
.notif-cat-card--predator .notif-cat-swatch  { background: #c62828; }
.notif-cat-card--predator:has(.notif-cat-check:checked) { background: #fff5f5; border-color: #c62828; }

.notif-cat-card--smelly .notif-cat-swatch    { background: #f9a825; }
.notif-cat-card--smelly:has(.notif-cat-check:checked)  { background: #fffde7; border-color: #f9a825; }

.notif-cat-card--hooved .notif-cat-swatch    { background: #e65100; }
.notif-cat-card--hooved:has(.notif-cat-check:checked)  { background: #fff3e0; border-color: #e65100; }

.notif-cat-card--domestic .notif-cat-swatch  { background: #7b1fa2; }
.notif-cat-card--domestic:has(.notif-cat-check:checked){ background: #f3e5f5; border-color: #7b1fa2; }

.notif-cat-card--livestock .notif-cat-swatch { background: #43a047; }
.notif-cat-card--livestock:has(.notif-cat-check:checked){ background: #e8f5e9; border-color: #43a047; }

.notif-cat-card--other .notif-cat-swatch     { background: #757575; }
.notif-cat-card--other:has(.notif-cat-check:checked)   { background: #fafafa; border-color: #757575; }

/* Action buttons */
.notif-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.notif-btn-test {
  flex: 1;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.15);
  background: #fff;
  color: #333;
  cursor: pointer;
}

.notif-btn-save {
  flex: 1;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  background: #43a047;
  color: #fff;
  cursor: pointer;
}

.notif-btn-save:hover { background: #2e7d32; }

/* ============================================================
   DELETE BUTTON on Your Sightings
   ============================================================ */
.tag-btn-delete {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid rgba(198,40,40,0.3);
  background: rgba(198,40,40,0.06);
  color: #c62828;
  cursor: pointer;
  transition: background 0.15s;
}

.tag-btn-delete:hover {
  background: rgba(198,40,40,0.14);
}

/* ============================================================
   PIN PLACEMENT OVERLAY (Fix 6)
   ============================================================ */
.pin-placement-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1600;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.97);
  border-top: 1px solid rgba(0,0,0,0.1);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.pin-placement-overlay.hidden {
  display: none;
}

.pin-placement-instructions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #222;
  line-height: 1.5;
}

.pin-placement-icon {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 1px;
}

.pin-placement-actions {
  display: flex;
  gap: 10px;
}

.pin-placement-btn {
  flex: 1;
  padding: 13px 0;
  font-size: 15px;
  font-weight: 800;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pin-placement-btn--cancel {
  background: rgba(0,0,0,0.07);
  color: #444;
}

.pin-placement-btn--cancel:hover {
  background: rgba(0,0,0,0.12);
}

.pin-placement-btn--confirm {
  background: #c62828;
  color: #fff;
}

.pin-placement-btn--confirm:hover {
  background: #b71c1c;
}

/* Map crosshair */
.map-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -100%);
  z-index: 1500;
  pointer-events: none;
  text-align: center;
}

.map-crosshair.hidden {
  display: none;
}

.map-crosshair__pin {
  font-size: 36px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
  animation: pinBounce 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards;
}



@keyframes pinBounce {
  from { transform: translateY(-12px); opacity: 0.5; }
  to   { transform: translateY(0); opacity: 1; }
}

/* Legal */
.legal-section {
  padding-top: 4px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 8px;
}

.help-legal-btn,
.secondary-btn,
.primary-btn {
  appearance: none;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.help-legal-btn,
.secondary-btn {
  background: #fff;
  color: #222;
}

.primary-btn,
.modal-actions .primary-btn,
.legal-accept-footer .primary-btn {
  background: #c62828;
  color: #fff;
  border-color: #c62828;
}

.primary-btn:hover,
.modal-actions .primary-btn:hover,
.legal-accept-footer .primary-btn:hover {
  background: #b71c1c;
  border-color: #b71c1c;
}

.primary-btn[disabled],
.modal-actions .primary-btn[disabled],
.legal-accept-footer .primary-btn[disabled] {
  background: #c62828;
  color: #fff;
  border-color: #c62828;
  opacity: 0.55;
  cursor: not-allowed;
}

.legal-version-note,
.legal-copyright,
.legal-doc-version {
  font-size: 12px;
  color: #666;
}

.legal-version-note {
  margin: 0 0 6px;
}

.legal-copyright {
  margin: 0;
}

.legal-modal {
  max-width: 680px;
}

.legal-panel-body {
  padding-top: 14px;
}

.legal-doc-version {
  margin-bottom: 14px;
  font-weight: 700;
}

.legal-doc-content {
  color: #222;
}

.legal-doc-content h3 {
  margin: 18px 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: #111;
}

.legal-doc-content p,
.legal-doc-content li {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

.legal-doc-content ul {
  margin: 8px 0 14px 20px;
}

.legal-doc-content p {
  margin: 0 0 10px;
}

.legal-accept-modal {
  max-width: 520px;
}

.legal-accept-body {
  padding: 16px;
}

.legal-accept-lead {
  margin: 0 0 14px;
  line-height: 1.6;
  color: #333;
}

.legal-accept-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.legal-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: #222;
  margin: 6px 0 12px;
}

.legal-checkbox-row input {
  margin-top: 3px;
}

.legal-version-note--prompt {
  margin-bottom: 16px;
}

.legal-accept-footer {
  justify-content: flex-end;
}

/* ============================================================================
   LEGAL DOCUMENT STYLING - RECOMMENDED CSS
   Add to your style.css or create separate legal-styles.css
   ============================================================================ */

/* Legal Document Container */
.legal-document {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

/* Headings */
.legal-document h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: #111;
  border-bottom: 3px solid #43a047;
  padding-bottom: 10px;
}

.legal-document h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 30px 0 15px 0;
  color: #111;
  border-bottom: 2px solid #eee;
  padding-bottom: 8px;
}

.legal-document h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 25px 0 12px 0;
  color: #222;
}

.legal-document h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 20px 0 10px 0;
  color: #333;
}

.legal-document h5 {
  font-size: 14px;
  font-weight: 600;
  margin: 15px 0 8px 0;
  color: #444;
}

/* Meta Information */
.legal-meta {
  font-size: 14px;
  color: #666;
  margin: 0 0 30px 0;
  padding: 15px;
  background: #f9f9f9;
  border-left: 4px solid #43a047;
  border-radius: 4px;
}

.legal-meta strong {
  color: #111;
}

/* Table of Contents */
.legal-toc {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px 25px;
  margin: 25px 0;
}

.legal-toc p {
  margin: 0 0 10px 0;
  font-weight: 600;
  font-size: 16px;
}

.legal-toc ul,
.legal-toc ol {
  margin: 10px 0 0 0;
  padding-left: 20px;
}

.legal-toc li {
  margin: 6px 0;
}

.legal-toc a {
  color: #43a047;
  text-decoration: none;
}

.legal-toc a:hover {
  text-decoration: underline;
}

/* Paragraphs */
.legal-document p {
  margin: 12px 0;
  font-size: 15px;
}

/* Lists */
.legal-document ul,
.legal-document ol {
  margin: 15px 0;
  padding-left: 30px;
}

.legal-document li {
  margin: 8px 0;
  font-size: 15px;
}

.legal-document ul li {
  list-style-type: disc;
}

.legal-document ol li {
  list-style-type: decimal;
}

/* Strong/Bold */
.legal-document strong {
  font-weight: 600;
  color: #111;
}

/* Emphasized Text */
.legal-document em {
  font-style: italic;
  color: #555;
}

/* Warning Boxes (Important Notices) */
.legal-warning {
  background: #fff3cd;
  border: 2px solid #ffc107;
  border-left: 6px solid #ff9800;
  border-radius: 6px;
  padding: 20px;
  margin: 25px 0;
  font-size: 15px;
}

.legal-warning strong {
  color: #d84315;
  display: block;
  font-size: 16px;
  margin-bottom: 10px;
}

/* Info Boxes */
.legal-info {
  background: #e3f2fd;
  border: 2px solid #2196f3;
  border-left: 6px solid #1976d2;
  border-radius: 6px;
  padding: 20px;
  margin: 25px 0;
  font-size: 15px;
}

/* Horizontal Rules */
.legal-document hr {
  border: none;
  border-top: 2px solid #eee;
  margin: 30px 0;
}

/* Footer */
.legal-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px solid #eee;
  font-size: 14px;
  color: #666;
  text-align: center;
}

/* Links */
.legal-document a {
  color: #43a047;
  text-decoration: underline;
}

.legal-document a:hover {
  color: #2e7d32;
}

/* Code/Monospace */
.legal-document code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  color: #c62828;
}

/* Tables (if needed) */
.legal-document table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

.legal-document th,
.legal-document td {
  padding: 12px;
  border: 1px solid #ddd;
  text-align: left;
}

.legal-document th {
  background: #f5f5f5;
  font-weight: 600;
  color: #111;
}

.legal-document tr:nth-child(even) {
  background: #fafafa;
}

/* Modal Specific Styles */
.legal-modal .modal-content {
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
}

.legal-panel-body {
  padding: 30px;
}

.legal-doc-version {
  font-size: 13px;
  color: #666;
  margin-bottom: 20px;
  padding: 10px 15px;
  background: #f9f9f9;
  border-left: 4px solid #43a047;
  border-radius: 4px;
}

.legal-doc-content {
  font-size: 15px;
  line-height: 1.7;
}

/* Legal Acceptance Modal Styles */
.legal-accept-modal {
  max-width: 550px;
}

.legal-accept-body {
  padding: 30px;
}

.legal-accept-lead {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 25px 0;
  color: #111;
}

.legal-accept-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 25px;
}

.legal-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  background: #f9f9f9;
  border: 2px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 15px;
  transition: all 0.2s ease;
}

.legal-checkbox-row:hover {
  background: #f0f0f0;
  border-color: #43a047;
}

.legal-checkbox-row input[type="checkbox"] {
  margin-top: 3px;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.legal-checkbox-row span {
  font-size: 15px;
  color: #333;
  line-height: 1.5;
}

.legal-version-note {
  font-size: 13px;
  color: #666;
  margin: 15px 0;
}

.legal-accept-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

/* Help Section Legal Styles */
.legal-section {
  border-top: 2px solid #eee;
  padding-top: 20px;
  margin-top: 20px;
}

.legal-actions {
  display: flex;
  gap: 12px;
  margin: 15px 0;
  flex-wrap: wrap;
}

.help-legal-btn {
  flex: 1;
  min-width: 150px;
  padding: 12px 20px;
  background: #43a047;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.help-legal-btn:hover {
  background: #2e7d32;
}

.legal-copyright {
  font-size: 13px;
  color: #999;
  margin-top: 15px;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .legal-document {
    padding: 15px;
  }
  
  .legal-document h1 {
    font-size: 24px;
  }
  
  .legal-document h2 {
    font-size: 20px;
  }
  
  .legal-document h3 {
    font-size: 17px;
  }
  
  .legal-document p,
  .legal-document li {
    font-size: 14px;
  }
  
  .legal-toc {
    padding: 15px;
  }
  
  .legal-accept-actions {
    flex-direction: column;
  }
  
  .help-legal-btn {
    min-width: 100%;
  }
}

/* Print Styles */
@media print {
  .legal-document {
    max-width: 100%;
    padding: 0;
    font-size: 12pt;
  }
  
  .legal-document h1 {
    font-size: 18pt;
    page-break-after: avoid;
  }
  
  .legal-document h2 {
    font-size: 16pt;
    page-break-after: avoid;
  }
  
  .legal-document h3 {
    font-size: 14pt;
    page-break-after: avoid;
  }
  
  .legal-warning,
  .legal-info {
    border: 2px solid #000;
    page-break-inside: avoid;
  }
  
  .legal-toc {
    page-break-after: always;
  }
  
  .modal-title-banner,
  .panel-close,
  .legal-accept-actions,
  .legal-checkbox-row,
  .legal-accept-footer {
    display: none;
  }
}

/* Accessibility */
.legal-document:focus {
  outline: 2px solid #43a047;
  outline-offset: 4px;
}

.legal-checkbox-row:focus-within {
  outline: 2px solid #43a047;
  outline-offset: 2px;
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
  .legal-document {
    background: #1a1a1a;
    color: #e0e0e0;
  }
  
  .legal-document h1,
  .legal-document h2,
  .legal-document h3 {
    color: #fff;
  }
  
  .legal-meta {
    background: #2a2a2a;
    border-left-color: #66bb6a;
  }
  
  .legal-toc {
    background: #2a2a2a;
    border-color: #444;
  }
  
  .legal-warning {
    background: #3d3420;
    border-color: #ffa726;
  }
  
  .legal-info {
    background: #1a2a3a;
    border-color: #42a5f5;
  }
  
  .legal-checkbox-row {
    background: #2a2a2a;
    border-color: #444;
  }
  
  .legal-checkbox-row:hover {
    background: #333;
    border-color: #66bb6a;
  }
}


.notif-disclaimer {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #6b7280;
  text-align: center;
}

.legal-checkbox-row {
  align-items: flex-start;
}

.legal-checkbox-row input {
  margin-top: 3px;
}
