/* Washington Trail Conditions: built for bright sun, cold hands and one-handed use. */
:root {
  --ink: #111111;
  --muted: #444444;
  --bg: #ffffff;
  --surface: #f2f5f2;
  --line: #c9d1cb;
  --accent: #1b4332;
  --accent-ink: #ffffff;
  --fresh: #1e7b34;
  --recent: #b45309;
  --stale: #5b6470;
  --old: #6b7280;
  --danger: #b91c1c;
  --radius: 14px;
  --tap: 48px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 18px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 8px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 16px; }
.visually-hidden { position: absolute; left: -9999px; }

.top {
  position: sticky; top: 0; z-index: 5; background: var(--accent); color: var(--accent-ink);
  padding: calc(8px + env(safe-area-inset-top)) 16px 0;
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-size: 19px; padding: 6px 0; }
.brand img { border-radius: 8px; }
.tabs { display: flex; gap: 4px; margin-top: 6px; }
.tabs a {
  flex: 1; text-align: center; color: #fff; text-decoration: none; font-weight: 600; font-size: 18px;
  padding: 12px 0; border-bottom: 4px solid transparent; min-height: var(--tap);
}
.tabs a[aria-current="page"] { border-bottom-color: #ffd166; }

main { padding: 16px; max-width: 720px; margin: 0 auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 10px 18px; border-radius: var(--radius);
  border: 3px solid var(--accent); background: #fff; color: var(--accent);
  font: inherit; font-size: 20px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.big { min-height: 56px; width: 100%; font-size: 22px; }
.btn.quiet { border-color: var(--line); color: var(--ink); font-weight: 600; }
.btn[disabled] { opacity: .45; cursor: default; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 16px; }

.fab {
  position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 6;
  display: flex; align-items: center; justify-content: center; min-height: 60px;
  background: var(--accent); color: #fff; font-size: 22px; font-weight: 700; text-decoration: none;
  border-radius: 18px; box-shadow: 0 6px 18px rgba(0,0,0,.25); max-width: 688px; margin: 0 auto;
}
.fab[hidden] { display: none; }

.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input[type="search"] {
  flex: 1; min-width: 160px; min-height: var(--tap); font: inherit; font-size: 18px;
  padding: 8px 12px; border: 2px solid var(--line); border-radius: 12px;
}
.status-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--muted); font-size: 16px; }

.card {
  display: block; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 12px; color: inherit; text-decoration: none;
}
a.card:active { background: #e3eae4; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card-head h3 { flex: 1; }
.dist { color: var(--muted); font-size: 16px; white-space: nowrap; }
.conds { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 18px; }
.conds li b { font-weight: 700; }
.meta { margin-top: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 16px; color: var(--muted); }

.chip {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 15px; color: #fff;
}
.chip.fresh { background: var(--fresh); }
.chip.recent { background: var(--recent); }
.chip.stale { background: var(--stale); }
.chip.old { background: #e5e7eb; color: var(--ink); }
.chip.none { background: #e5e7eb; color: var(--ink); }

.star {
  background: none; border: 2px solid var(--line); border-radius: 12px; min-width: var(--tap); min-height: var(--tap);
  font-size: 24px; cursor: pointer; color: var(--muted); line-height: 1;
}
.star[aria-pressed="true"] { color: #b45309; border-color: #b45309; }

.section-title { margin: 20px 0 8px; font-size: 20px; }
.empty { padding: 20px; text-align: center; color: var(--muted); }

/* Report flow */
.field { margin-bottom: 18px; }
.field legend, .field > label { font-weight: 700; font-size: 20px; margin-bottom: 8px; display: block; }
.field .hint { font-size: 16px; color: var(--muted); margin: -4px 0 8px; }
.choices { display: flex; gap: 8px; flex-wrap: wrap; }
.choice {
  flex: 1 1 calc(33% - 8px); min-width: 96px; min-height: 56px; padding: 8px 10px;
  border: 3px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink);
  font: inherit; font-size: 20px; font-weight: 600; cursor: pointer;
}
.choice[aria-pressed="true"], .choice[aria-checked="true"] {
  background: var(--accent); color: #fff; border-color: #0b2a1d;
}
.choice[aria-pressed="true"]::before, .choice[aria-checked="true"]::before { content: "\2713\00a0"; }
textarea.note {
  width: 100%; min-height: 72px; font: inherit; font-size: 18px; padding: 10px; border: 2px solid var(--line); border-radius: 12px;
}
.counter { text-align: right; font-size: 15px; color: var(--muted); }
.error { color: var(--danger); font-weight: 700; margin: 8px 0; }
.ok { color: var(--fresh); font-weight: 700; }
.picker-list { list-style: none; margin: 0; padding: 0; }
.picker-list button {
  width: 100%; text-align: left; min-height: 56px; padding: 10px 14px; margin-bottom: 8px;
  border: 3px solid var(--line); border-radius: var(--radius); background: #fff; font: inherit; font-size: 20px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.picker-list button.selected { border-color: var(--accent); background: #e6f0ea; }
.sticky-send {
  position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 6; max-width: 688px; margin: 0 auto;
}
.dev-box { border: 2px dashed #b45309; border-radius: 12px; padding: 10px; margin-bottom: 14px; font-size: 16px; }
.dev-box select { font-size: 16px; min-height: 40px; max-width: 100%; }

/* Report list */
.report { border-left: 6px solid var(--line); padding: 8px 12px; margin-bottom: 10px; background: #fff; border-radius: 8px; }
.report time { font-weight: 700; }
.report .conds { font-size: 17px; }
.report .note { margin-top: 6px; }
.toggle { display: flex; gap: 8px; margin: 10px 0; }
.toggle button { flex: 1; }

/* Map */
#map-wrap { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1; padding-top: 0; }
#map-wrap[hidden] { display: none; }
#map { position: absolute; inset: 0; }
body.map-mode main { display: none; }
body.map-mode .top { position: fixed; left: 0; right: 0; z-index: 7; }
.maplibregl-ctrl-attrib { font-size: 12px !important; background: rgba(255,255,255,.95) !important; }
.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 9;
  background: #111; color: #fff; padding: 14px; border-radius: 12px; font-size: 18px; text-align: center;
}
.toast[hidden] { display: none; }

/* Offline outbox */
.pending {
  display: block; background: #fff4d6; color: #7a4a00; border-bottom: 3px solid #b45309;
  padding: 12px 16px; font-weight: 700; text-decoration: none; font-size: 17px; text-align: center;
}
.pending[hidden] { display: none; }
button.flag {
  margin-top: 8px; background: none; border: 2px solid var(--line); border-radius: 10px; color: var(--muted);
  font: inherit; font-size: 15px; font-weight: 600; min-height: 36px; padding: 4px 12px; cursor: pointer;
}
button.flag[disabled] { opacity: .6; cursor: default; }
footer.site { margin: 24px 0 8px; font-size: 15px; color: var(--muted); text-align: center; }

.card.signup { background: #fff7e0; border-color: #e0b84a; }
