/* Minjerribah Wildlife Map: design system v4.
   Cream paper, deep forest ink, coral action colour, serif display type.
   Compact controls, smartphone first. */

:root {
  --ink: #1c3a31;
  --ink-soft: #5b6f66;
  --ink-faint: #8a978f;
  --paper: #f8f4ea;
  --card: #fffdf8;
  --line: #e7e0d0;
  --line-strong: #d5ccb8;

  --forest: #1e4638;
  --forest-deep: #142f26;
  --forest-soft: #e2ece6;
  --coral: #e2603d;
  --coral-deep: #c14a2a;
  --coral-soft: #fbe9e3;
  --grad-action: linear-gradient(135deg, #e96a45, #cf4d2b);

  --sand: #f3ecdb;
  --sand-line: #e5d9bd;

  --help: #d92d20;
  --help-soft: #fde5e2;
  --care: #d97706;
  --care-soft: #fdf0d5;
  --released: #1a8a53;
  --released-soft: #ddf3e4;
  --ok: #2563c4;
  --ok-soft: #dfeafb;
  --dead: #4b5a55;
  --dead-soft: #e8ebe8;
  --emergency: #7a1710;

  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  --shadow-1: 0 1px 2px rgba(28, 58, 49, 0.05), 0 2px 6px rgba(28, 58, 49, 0.05);
  --shadow-2: 0 3px 10px rgba(28, 58, 49, 0.09), 0 10px 26px rgba(28, 58, 49, 0.10);
  --shadow-3: 0 8px 22px rgba(28, 58, 49, 0.14), 0 22px 56px rgba(28, 58, 49, 0.16);
  --glass: rgba(252, 250, 243, 0.88);
  --glass-border: rgba(255, 255, 255, 0.6);

  --nav-h: 60px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.35em; }
h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 6vw, 1.9rem); letter-spacing: -0.01em; }
h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; margin-top: 1.7em; }
h3 { font-size: 0.95rem; font-weight: 700; }
p { margin: 0.4em 0 0.9em; }
a { color: var(--forest); }

.eyebrow {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 6px;
}

/* ---------- page scaffold ---------- */

.app {
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 18px);
}
.wrap { max-width: 660px; margin: 0 auto; padding: 14px 16px; }

.topbar {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 10px;
  padding: 16px 16px 4px;
  max-width: 660px;
  margin: 0 auto;
}
.topbar h1 { margin: 0; }
.topbar .sub { color: var(--ink-soft); font-size: 0.8rem; }

/* ---------- bottom navigation ---------- */

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1100;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: var(--nav-h);
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--ink-faint);
  text-decoration: none;
}
.tabbar a svg { width: 21px; height: 21px; }
.tabbar a[aria-current="page"] { color: var(--forest); }
.nav-plus {
  justify-self: center;
  width: 54px;
  height: 54px;
  margin-top: -22px;
  border-radius: 50%;
  background: var(--grad-action);
  color: #fff;
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(201, 74, 42, 0.45);
  border: 3px solid var(--paper);
}
.nav-plus:active { transform: scale(0.93); }

/* ---------- buttons ---------- */

button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--card);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-1);
  transition: transform 0.12s;
  text-decoration: none;
  color: var(--ink);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--forest); border: none; color: #fff; box-shadow: 0 4px 14px rgba(20, 47, 38, 0.3); }
.btn-danger { color: var(--help); border-color: var(--help-soft); }
.btn-block { width: 100%; }
.btn-small { min-height: 38px; padding: 6px 13px; font-size: 0.8rem; border-radius: var(--r-pill); }
.btn-mini { min-height: 34px; padding: 4px 12px; font-size: 0.78rem; border-radius: var(--r-pill); box-shadow: none; }

/* ---------- chips ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 6px 16px;
  max-width: 660px;
  margin: 0 auto;
}

.chip {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 6px 15px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--card);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: transform 0.12s;
}
.chip:active { transform: scale(0.95); }
.chip[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: #fff; }
.chip[data-status="help"][aria-pressed="true"], .chip[data-filter="help"][aria-pressed="true"] { background: var(--help); border-color: var(--help); }
.chip[data-status="care"][aria-pressed="true"], .chip[data-filter="care"][aria-pressed="true"] { background: var(--care); border-color: var(--care); }
.chip[data-status="released"][aria-pressed="true"], .chip[data-filter="released"][aria-pressed="true"] { background: var(--released); border-color: var(--released); }
.chip[data-status="ok"][aria-pressed="true"], .chip[data-filter="ok"][aria-pressed="true"] { background: var(--ok); border-color: var(--ok); }
.chip[data-status="dead"][aria-pressed="true"], .chip[data-filter="dead"][aria-pressed="true"] { background: var(--dead); border-color: var(--dead); }

.chip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.chip-grid .chip {
  white-space: normal;
  text-align: center;
  padding: 8px 5px;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.72rem;
  line-height: 1.15;
  border-radius: var(--r-sm);
}
.chip-grid .chip .chip-emoji { font-size: 1.2rem; line-height: 1; }
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }

.hint { font-size: 0.8rem; color: var(--ink-soft); margin: 6px 0 0; }

/* ---------- forms ---------- */

label {
  display: block;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 16px 0 6px;
}
label .opt { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink-faint); }

input, select, textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  min-height: 44px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3.5px rgba(30, 70, 56, 0.16);
}
.chip:focus-visible, .btn:focus-visible, .tabbar a:focus-visible, .tile:focus-visible,
.answer:focus-visible, .nav-plus:focus-visible {
  outline: 3px solid rgba(226, 96, 61, 0.55);
  outline-offset: 2px;
}

.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 2px 14px 14px;
  margin: 10px 0;
  box-shadow: var(--shadow-1);
}
.form-card > label:first-child { margin-top: 12px; }

/* Dark forest band card (exports, archive actions). */
.band-card {
  background: var(--forest);
  color: #f2efe6;
  border-radius: var(--r-lg);
  padding: 18px;
  margin: 16px 0;
  box-shadow: var(--shadow-2);
}
.band-card .eyebrow { color: rgba(242, 239, 230, 0.65); }
.band-card h2 { color: #fff; margin-top: 0; }
.band-card .hint, .band-card p { color: rgba(242, 239, 230, 0.8); }
.band-card .btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  box-shadow: none;
}
.band-card a { color: #fff; }
.band-card label { color: rgba(242, 239, 230, 0.7); }
.band-card input[type="file"] { color: #f2efe6; }

/* ---------- the map page ---------- */

.map-app { position: relative; height: 100dvh; padding-bottom: 0; overflow: hidden; }
#map { position: absolute; inset: 0; background: #cfe0da; }

/* All the floating chrome stacks in one flow: nothing can overlap. */
.map-chrome {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  left: 0; right: 0;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}
.map-chrome > * { pointer-events: auto; }

.map-app .topbar {
  margin: 0 10px;
  max-width: none;
  padding: 9px 14px;
  border-radius: var(--r-md);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-2);
  align-items: center;
  flex-wrap: nowrap;
}
.map-app .topbar h1 { font-size: 1.1rem; white-space: nowrap; }
.map-app .topbar .sub { font-size: 0.72rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-app .topbar .btn-small { margin-left: auto; flex: 0 0 auto; }

.map-app .chips { max-width: none; padding: 2px 10px; }
.map-app .chips .chip { box-shadow: var(--shadow-1); }
.map-app .lookouts { max-width: none; padding: 0 10px; }

.fab {
  position: fixed;
  right: 14px;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 16px);
  z-index: 1060;
  min-height: 50px;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  background: var(--grad-action);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(201, 74, 42, 0.45);
}
.fab:active { transform: scale(0.95); }

.legend-toggle {
  position: fixed;
  left: 12px;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 16px);
  z-index: 1050;
  min-height: 40px;
  padding: 7px 15px;
  border-radius: var(--r-pill);
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  font-weight: 700;
  font-size: 0.8rem;
  box-shadow: var(--shadow-2);
}
.legend-toggle.layers-toggle { left: 98px; }

.legend {
  position: fixed;
  left: 12px;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 64px);
  z-index: 1055;
  width: min(320px, calc(100vw - 24px));
  max-height: 52dvh;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  padding: 15px;
  font-size: 0.82rem;
}
.legend h3 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 8px; color: var(--ink-soft); }
.legend ul { list-style: none; margin: 0 0 12px; padding: 0; }
.legend li { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.legend .swatch { width: 13px; height: 13px; border-radius: 50%; flex: 0 0 auto; }
.legend .swatch-ring { border: 3px solid var(--care); background: transparent !important; }
.legend .codes { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px; }
.legend .codes span { display: flex; align-items: center; gap: 6px; }
.legend .codes .g { font-size: 1rem; }

.layers-panel { display: flex; flex-direction: column; gap: 7px; align-items: stretch; }
.layers-panel .chip { justify-content: flex-start; display: flex; }
.layers-panel[hidden] { display: none; }

.pickbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1150;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--forest-deep);
  color: #fff;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
  font-weight: 700;
  font-size: 0.92rem;
}
.pickbar button {
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--r-pill);
  padding: 7px 16px;
  min-height: 40px;
  font-weight: 700;
}

.map-fallback { padding: 40px 24px; text-align: center; color: var(--ink-soft); }

/* ---------- map pins ---------- */

.mwr-pin { background: none; border: none; }
.pin-chip {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fffdf8;
  border: 3px solid var(--pin-c, var(--forest));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 3px 10px rgba(20, 47, 38, 0.35);
}
.pin-chip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top: 8px solid var(--pin-c, var(--forest));
}
.mwr-pin.help .pin-chip { width: 48px; height: 48px; font-size: 23px; }
.mwr-pin .pulse, .watch-ring {
  position: absolute;
  left: 50%; top: 50%;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  pointer-events: none;
}
.mwr-pin .pulse { background: rgba(217, 45, 32, 0.5); animation: mwr-pulse 1.8s ease-out infinite; }
.watch-ring { border: 3px solid var(--care); animation: mwr-ring 2s ease-out infinite; }
.mwr-pin.lookout { width: 14px; height: 14px; }
@keyframes mwr-pulse { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(5); opacity: 0; } }
@keyframes mwr-ring { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(4.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .mwr-pin .pulse, .watch-ring { animation: none; display: none; }
}

/* Locate control lifted clear of the header and the tab bar, sized for a thumb. */
.maplibregl-ctrl-bottom-right {
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 14px);
  right: 12px;
}
.maplibregl-ctrl-group {
  border-radius: var(--r-pill) !important;
  overflow: hidden;
  box-shadow: var(--shadow-2) !important;
  border: 1px solid var(--glass-border) !important;
}
.maplibregl-ctrl-group button { width: 46px !important; height: 46px !important; }
.maplibregl-ctrl-attrib { border-radius: 8px; }

.maplibregl-popup-content { font: inherit; border-radius: var(--r-md); padding: 13px 15px; box-shadow: var(--shadow-3); background: var(--card); }
.pop strong { display: block; font-size: 0.98rem; margin-bottom: 3px; }
.pop .meta { color: var(--ink-soft); margin: 2px 0; font-size: 0.82rem; }
.pop-btns { display: flex; gap: 6px; margin-top: 10px; }
.pop-btns .btn { flex: 1; min-height: 36px; padding: 4px 6px; font-size: 0.76rem; border-radius: var(--r-pill); box-shadow: none; }
.watch-line {
  background: var(--care-soft);
  color: var(--care);
  font-weight: 700;
  border-radius: 8px;
  padding: 4px 10px;
  margin: 6px 0;
  font-size: 0.8rem;
}

/* ---------- badges, case cards ---------- */

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.badge.st-help { background: var(--help-soft); color: var(--help); }
.badge.st-care { background: var(--care-soft); color: var(--care); }
.badge.st-released { background: var(--released-soft); color: var(--released); }
.badge.st-ok { background: var(--ok-soft); color: var(--ok); }
.badge.st-dead { background: var(--dead-soft); color: var(--dead); }

.card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-1);
}
.card .case-row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.case-avatar {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--forest-soft);
  position: relative;
}
.case-avatar .dot {
  position: absolute;
  top: -3px; right: -3px;
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 2px solid var(--card);
}
.case-avatar .dot.st-help { background: var(--help); }
.case-avatar .dot.st-care { background: var(--care); }
.case-avatar .dot.st-released { background: var(--released); }
.case-avatar .dot.st-ok { background: var(--ok); }
.case-avatar .dot.st-dead { background: var(--dead); }
.case-main { flex: 1; min-width: 0; }
.card .row1 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card .title { font-weight: 800; font-size: 0.95rem; }
.card .meta { color: var(--ink-soft); font-size: 0.78rem; margin-top: 2px; }
.card .notes { font-size: 0.85rem; margin-top: 4px; }
.case-actions { display: flex; gap: 6px; margin-top: 10px; padding-left: 58px; flex-wrap: wrap; }
.case-actions .btn-mini { border: 1px solid var(--line-strong); background: var(--paper); }

.empty {
  text-align: center;
  color: var(--ink-soft);
  background: var(--sand);
  border: 1.5px dashed var(--sand-line);
  border-radius: var(--r-lg);
  padding: 28px 18px;
  margin: 16px 0;
  font-size: 0.92rem;
}

/* ---------- the sheet ---------- */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 1180;
  background: rgba(15, 31, 26, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1200;
  max-width: 600px;
  margin: 0 auto;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--shadow-3);
}
.sheet::before {
  content: "";
  align-self: center;
  width: 38px;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--line-strong);
  margin: 9px 0 0;
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 18px 4px; }
.sheet-head h2 { margin: 0; font-size: 1.25rem; }
.sheet-close { min-height: 42px; min-width: 42px; font-size: 1.4rem; line-height: 1; color: var(--ink-faint); }
.sheet-body { overflow-y: auto; padding: 0 14px 12px; overscroll-behavior: contain; }
.sheet-foot {
  display: flex;
  gap: 10px;
  padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 12px);
  border-top: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.sheet-foot .btn-primary { flex: 1; }

.loc-box {
  background: var(--forest-soft);
  border: 1px solid rgba(30, 70, 56, 0.18);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 0.85rem;
}
.loc-box .coords { font-weight: 800; font-variant-numeric: tabular-nums; }
.loc-actions { display: flex; gap: 7px; margin-top: 9px; }
.loc-actions .btn { flex: 1; min-height: 40px; font-size: 0.8rem; padding: 6px 8px; }

.sheet .danger-row { margin-top: 16px; display: flex; gap: 10px; justify-content: center; }

/* ---------- report page ---------- */

.stat-row { display: flex; flex-wrap: wrap; gap: 9px; margin: 10px 0; }
.stat {
  flex: 1 1 100px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 11px 14px;
  box-shadow: var(--shadow-1);
}
.stat b { display: block; font-family: var(--font-display); font-size: 1.6rem; }
.stat span { color: var(--ink-soft); font-size: 0.75rem; }
.stat.alert { border-color: var(--help); background: var(--help-soft); }
.stat.alert b { color: var(--help); }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  font-size: 0.86rem;
  margin: 8px 0 18px;
  box-shadow: var(--shadow-1);
}
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: none; }
th { background: var(--forest-soft); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.range-row { display: flex; gap: 9px; }
.range-row > div { flex: 1; min-width: 0; }
.range-row label { margin-top: 0; }
.range-row input { min-width: 0; max-width: 100%; min-height: 40px; font-size: 14px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }

.merge-box, .gap-box {
  background: var(--sand);
  border: 1.5px dashed var(--sand-line);
  border-radius: var(--r-md);
  padding: 13px 15px;
  margin: 13px 0;
  font-size: 0.92rem;
}
input[type="file"] { background: none; border: none; padding: 8px 0; box-shadow: none; }

/* ---------- guide / about ---------- */

.call-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 13px 16px;
  margin: 9px 0;
  box-shadow: var(--shadow-1);
}
.call-card .who { font-weight: 800; font-size: 0.95rem; }
.call-card .when { color: var(--ink-soft); font-size: 0.8rem; }
.call-card a.tel { display: inline-flex; align-items: center; min-height: 42px; font-size: 1.15rem; font-weight: 800; text-decoration: none; color: var(--coral-deep); }
ol.steps { padding-left: 20px; }
ol.steps li { margin-bottom: 8px; }

.video-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 13px 15px;
  margin: 9px 0;
  box-shadow: var(--shadow-1);
}
.video-card video { width: 100%; border-radius: var(--r-sm); margin-top: 8px; }
.fb-link { font-weight: 800; }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 20px);
  transform: translateX(-50%);
  z-index: 1300;
  background: var(--forest-deep);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  font-size: 0.85rem;
  font-weight: 700;
  max-width: calc(100vw - 40px);
  text-align: center;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  box-shadow: var(--shadow-3);
}
.toast.show { opacity: 1; }

/* ---------- the public door ---------- */

.help-app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: 100px;
  max-width: 620px;
  margin: 0 auto;
}
.help-head { display: flex; align-items: center; gap: 12px; padding: 18px 18px 6px; }
.help-logo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; box-shadow: var(--shadow-1); }
.help-brand { font-family: var(--font-display); font-size: clamp(1.4rem, 6vw, 1.7rem); font-weight: 700; color: var(--forest-deep); line-height: 1.1; }
.help-sub { color: var(--ink-soft); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }

.draft-band {
  margin: 6px 18px 0;
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--sand);
  border: 1px dashed var(--sand-line);
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.screens { flex: 1; padding: 4px 18px 20px; }
.screen h2 { font-size: clamp(1.5rem, 6.5vw, 1.85rem); margin: 10px 0 8px; }
.screen-hint { color: var(--ink-soft); font-size: 0.9rem; }

.callout {
  display: flex;
  gap: 10px;
  background: var(--coral-soft);
  border: 1px solid #f3c9ba;
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin: 12px 0 14px;
  font-size: 0.85rem;
}
.callout strong { display: block; color: var(--coral-deep); }

.back-btn { min-height: 42px; padding: 6px 12px 6px 0; color: var(--forest); font-weight: 800; font-size: 0.9rem; }

.tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-height: 98px;
  padding: 12px 5px 10px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  transition: transform 0.12s;
}
.tile:active { transform: scale(0.94); }
.tile-glyph {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--forest-soft);
}
.tile-glyph img { width: 30px; height: 30px; }
.tile-emoji { font-size: 24px; line-height: 1; }
.tile-label { font-size: 0.73rem; font-weight: 700; text-align: center; line-height: 1.2; }

.tg-koala { background: #e4ecf5; }
.tg-kangaroo { background: #f6e9d2; }
.tg-wallaby { background: #f2dfcb; }
.tg-snake { background: #ece5d1; }
.tg-goanna { background: #e2ecd6; }
.tg-bluetongue { background: #d9e9f2; }
.tg-echidna { background: #efe3d5; }
.tg-possum { background: #e7e1f1; }
.tg-seaturtle { background: #d6edE5; }
.tg-marine { background: #d8e6f3; }
.tg-shark { background: #dfe9ef; }
.tg-pelican { background: #fbf0d5; }
.tg-shorebird { background: #e2eff5; }
.tg-landbird { background: #e6f1d7; }
.tg-raptor { background: #f4e4d6; }
.tg-bat { background: #e5deec; }
.tg-other { background: #eae8e2; }
.tg-unsure { background: #f0eee8; }

.answer-list, .answer-cards { display: flex; flex-direction: column; gap: 9px; }
.answer {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  padding: 14px 16px;
  min-height: 56px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 0.98rem;
  box-shadow: var(--shadow-1);
  transition: transform 0.12s;
}
.answer:active { transform: scale(0.975); }
.answer strong { font-weight: 800; }
.answer span { color: var(--ink-soft); font-size: 0.82rem; }
.answer-big { background: var(--grad-action); border: none; color: #fff; box-shadow: 0 5px 16px rgba(201, 74, 42, 0.35); }
.answer-big span { color: rgba(255, 255, 255, 0.9); }

.action-card {
  border-radius: var(--r-lg);
  padding: 18px;
  margin: 12px 0 14px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
}
.action-card h2 { margin: 9px 0 5px; font-size: 1.45rem; }
.action-card p { margin: 0 0 10px; font-size: 0.95rem; }
.urg-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: var(--r-pill);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.urg-now { border-top: 5px solid var(--help); }
.urg-now .urg-tag { background: var(--help-soft); color: var(--help); }
.urg-soon { border-top: 5px solid var(--care); }
.urg-soon .urg-tag { background: var(--care-soft); color: var(--care); }
.urg-watch { border-top: 5px solid var(--ok); }
.urg-watch .urg-tag { background: var(--ok-soft); color: var(--ok); }
.urg-emergency { border-top: 5px solid var(--emergency); }
.urg-emergency .urg-tag { background: var(--emergency); color: #fff; }
.action-card.danger { background: #fff9f6; border-color: #f3c9ba; }

ul.dos, ul.donts { list-style: none; margin: 0 0 8px; padding: 0; }
ul.dos li, ul.donts li { position: relative; padding: 4px 0 4px 28px; font-weight: 600; font-size: 0.92rem; }
ul.dos li::before, ul.donts li::before { position: absolute; left: 0; top: 3px; font-weight: 800; }
ul.dos li::before { content: "✓"; color: var(--released); }
ul.donts li::before { content: "✕"; color: var(--help); }

.btn-call, .btn-call-secondary {
  display: flex;
  width: 100%;
  min-height: 54px;
  border-radius: var(--r-md);
  font-size: 1rem;
  margin-top: 8px;
  text-align: center;
}
.btn-call { background: var(--grad-action); border: none; color: #fff; font-weight: 800; box-shadow: 0 5px 16px rgba(201, 74, 42, 0.35); }
.btn-call-secondary { font-weight: 700; font-size: 0.88rem; }
.bite-line { font-weight: 800; color: var(--help); margin: 10px 0 0; font-size: 0.9rem; }

.photo-label { margin-top: 12px; position: relative; }
.photo-preview img { max-width: 100%; border-radius: var(--r-sm); margin-top: 8px; max-height: 240px; object-fit: cover; }
.share-box { font-family: ui-monospace, Consolas, monospace; font-size: 0.76rem; line-height: 1.45; }

.call-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  z-index: 1100;
  max-width: 596px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 10px 16px 11px;
  border-radius: var(--r-md);
  background: var(--grad-action);
  color: #fff;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 10px 28px rgba(201, 74, 42, 0.5);
}
.call-bar:active { transform: scale(0.98); }
.call-bar-label { font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; }
.call-bar-num { font-weight: 800; font-size: 0.98rem; }

/* ---------- lookouts, paste ---------- */

.lookouts { padding: 6px 18px 0; display: flex; gap: 9px; overflow-x: auto; scrollbar-width: none; }
.lookouts::-webkit-scrollbar { display: none; }
.lookout-title {
  flex: 0 0 auto;
  align-self: center;
  font-weight: 800;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--care);
}
.lookout-card {
  flex: 0 0 auto;
  max-width: 240px;
  background: var(--care-soft);
  border: 1px solid #efd6a4;
  border-radius: var(--r-sm);
  padding: 8px 12px;
  font-size: 0.78rem;
  box-shadow: var(--shadow-1);
}
.lookout-card strong { display: block; }
.lookout-card span { color: var(--ink-soft); }

.paste-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  margin: 7px 0;
  font-weight: 600;
  font-size: 0.88rem;
  box-shadow: var(--shadow-1);
}
.warn { color: var(--help); font-weight: 700; font-size: 0.85rem; }

/* ---------- larger screens ---------- */

@media (min-width: 720px) {
  .chip-grid { grid-template-columns: repeat(4, 1fr); }
  .tile-grid { grid-template-columns: repeat(4, 1fr); }
  .sheet { border-radius: var(--r-lg); bottom: 24px; }
}

/* ---------- print (report page) ---------- */

@media print {
  .tabbar, .btn, .btn-row, .chips, .range-row, .merge-box, .toast, .fab,
  .legend-toggle, .call-bar, .band-card { display: none !important; }
  .app { padding-bottom: 0; }
  body { background: #fff; }
  table { border-radius: 0; box-shadow: none; }
  .stat { box-shadow: none; }
}
