/* RootZone Bat field collector — mobile-first, standalone. Not RootZone Field. */
:root {
  --bg: #121418;
  --bg-elev: #1a1d24;
  --bg-card: #21252d;
  --line: #2c313c;
  --text: #ece7dc;
  --muted: #9a9588;
  --accent: #e2b15a;
  --accent-2: #6fbfa8;
  --danger: #d9786a;
  --caution: #e2b15a;
  --ok: #6fbfa8;
  --gap: #d9786a;
  --radius: 14px;
  --tap: 44px;
  --header: 56px;
  --nav: 64px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
body {
  min-height: 100dvh;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-2); }
h1, h2, h3 { font-weight: 600; letter-spacing: 0.01em; margin: 0; }
.app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
}
.header {
  height: var(--header);
  flex: 0 0 var(--header);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}
.header .mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(145deg, #2a2418, #1a1d24);
  border: 1px solid var(--accent);
  color: var(--accent);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
}
.header .titles { flex: 1; min-width: 0; }
.header h1 { font-size: 15px; line-height: 1.15; }
.header p { margin: 0; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  width: var(--tap); height: var(--tap);
  border: 0; background: transparent; color: var(--accent);
  border-radius: 10px; display: grid; place-items: center;
}
.icon-btn:active { background: var(--bg-card); }
.main {
  flex: 1 1 auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px calc(var(--nav) + env(safe-area-inset-bottom) + 16px);
}
.nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: calc(var(--nav) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg-elev);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 20;
}
.nav button {
  border: 0; background: transparent; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase;
}
.nav button svg { width: 22px; height: 22px; }
.nav button.active { color: var(--accent); }
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}
.card h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 10px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
label.field { display: block; margin-bottom: 10px; }
label.field span, .field-label {
  display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); margin-bottom: 4px;
}
input[type="text"], input[type="number"], input[type="date"], input[type="time"],
input[type="email"], select, textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 16px; /* prevent iOS zoom */
}
textarea { min-height: 88px; resize: vertical; }
.btn {
  min-height: var(--tap);
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
}
.btn.primary { background: var(--accent); color: #1a1408; border-color: var(--accent); font-weight: 600; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: #5a2e28; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 8px; margin-top: 8px; }
.btn-row .btn { flex: 1; }
.list-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  min-height: var(--tap);
}
.list-item:last-child { border-bottom: 0; }
.list-item .meta { flex: 1; min-width: 0; }
.list-item .meta strong { display: block; font-size: 15px; }
.list-item .meta small { color: var(--muted); font-size: 12px; }
.chip-set { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.chip {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  text-align: left;
  line-height: 1.25;
}
.chip.on { border-color: var(--accent); background: #2a2418; color: var(--accent); }
.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pill.ok { background: #1b3330; color: var(--ok); }
.pill.caution { background: #332a16; color: var(--caution); }
.pill.gap { background: #3a201c; color: var(--gap); }
.pill.note { background: var(--bg); color: var(--muted); }
.banner {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 10px;
}
.banner.ok { background: #1b3330; color: var(--ok); }
.banner.caution { background: #332a16; color: var(--caution); }
.banner.gap { background: #3a201c; color: var(--gap); }
.banner.info { background: #1a1d24; color: var(--muted); border: 1px solid var(--line); }
.sun-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #171a20;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
  font-size: 13px;
}
.sun-panel strong { color: var(--accent); font-variant-numeric: tabular-nums; }
.flag {
  border-left: 3px solid var(--line);
  padding: 8px 10px;
  margin-bottom: 8px;
  background: var(--bg);
  border-radius: 0 8px 8px 0;
}
.flag.gap { border-left-color: var(--gap); }
.flag.caution { border-left-color: var(--caution); }
.flag .code { font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.flag p { margin: 4px 0 0; font-size: 13px; line-height: 1.4; }
.empty { color: var(--muted); text-align: center; padding: 24px 8px; font-size: 14px; }
.fab-space { height: 8px; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 4px 0 8px;
}
.section-head h2 { font-size: 16px; text-transform: none; letter-spacing: 0; color: var(--text); }
.tiny { font-size: 12px; color: var(--muted); line-height: 1.4; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.gps { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--accent-2); }
.track-stat { font-size: 13px; color: var(--accent-2); }
.hidden { display: none !important; }
.tab-bar { display: flex; gap: 6px; margin-bottom: 12px; }
.tab-bar button { flex: 1; }
.check { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.kicker { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }

.photo-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; align-items: flex-start; }
.photo-card {
  flex: 0 0 132px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
}
.photo-card img { width: 118px; height: 88px; object-fit: cover; border-radius: 8px; display: block; }
.photo-card .photo-caption {
  width: 100%; min-height: 36px; margin-top: 6px; padding: 6px 8px;
  font-size: 13px; border-radius: 8px;
}
.photo-card small { display: block; color: var(--muted); font-size: 10px; margin: 4px 0; }
.photo-card .photo-del { width: 100%; min-height: 36px; font-size: 12px; margin-top: 2px; }
.photo-add input[type="file"] { display: none; }
