/* ============================================================
   Trail Conditions — Shared Stylesheet
   Applies to: index.html, /trail/dte/, /trail/poto/,
               /contact/, /admin/ and all future pages.
   ============================================================ */

/* ── Design tokens ─────────────────────────────────────────── */
:root {
  --forest:      #1a3d2b;
  --green:       #2d8c4e;
  --green-lt:    #e6f4ec;
  --amber:       #d4850a;
  --amber-lt:    #fff8e6;
  --orange:      #c06020;
  --orange-lt:   #fdf0e6;
  --red:         #c0392b;
  --blue:        #1a6b9a;
  --blue-lt:     #e8f4fb;
  --dirt:        #f5f0e8;
  --override-bg: #1a3d2b;
  --text:        #1a1a1a;
  --muted:       #5a5a5a;
  --border:      rgba(0,0,0,0.10);
}

/* ── Reset ──────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ───────────────────────────────────────────────────── */
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--dirt);
  color: var(--text);
  padding: 1.5rem 1rem 3rem;
  max-width: 780px;
  margin: 0 auto;
}

/* ── Header ─────────────────────────────────────────────────── */
header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.75rem;
}

header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem;
  color: var(--forest);
  line-height: 1.1;
}

header p {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.header-meta {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: right;
  padding-top: 0.2rem;
}

/* ── Trail grid ──────────────────────────────────────────────── */
.trail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .trail-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Trail card ──────────────────────────────────────────────── */
.trail-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.trail-card.primary {
  border-width: 2px;
  border-color: var(--forest);
}

/* ── Card header ─────────────────────────────────────────────── */
.card-header {
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.card-header h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem;
  color: var(--forest);
}

.card-header .meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Status banner ───────────────────────────────────────────── */
.status-banner {
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-open     { background: var(--green-lt);  color: var(--green); }
.status-caution  { background: var(--amber-lt);  color: var(--amber); }
.status-wet      { background: var(--orange-lt); color: var(--orange); }
.status-rain     { background: var(--blue-lt);   color: var(--blue); }
.status-ride-now { background: #fff3cd;           color: #b07d10; }
.status-loading  { background: #f0f0f0;           color: var(--muted); }

.dot-open     { background: var(--green); }
.dot-caution  { background: var(--amber); }
.dot-wet      { background: var(--orange); }
.dot-rain     { background: var(--blue); }
.dot-ride-now { background: #b07d10; }
.dot-loading  { background: #ccc; }

/* ── Card body ───────────────────────────────────────────────── */
.card-body { padding: 0.75rem 1.25rem 1rem; }

/* ── Stat rows ───────────────────────────────────────────────── */
.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border);
}

.stat-row:last-child { border-bottom: none; }

.stat-label { color: var(--muted); }
.stat-value { font-weight: 500; color: var(--text); }

/* ── Rain bar mini-chart ─────────────────────────────────────── */
.rain-bar-wrap  { margin-top: 0.75rem; }

.rain-bar-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.rain-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 48px;
}

.rain-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  height: 100%;
  justify-content: flex-end;
}

.rain-bar-fill {
  width: 100%;
  border-radius: 2px 2px 0 0;
  transition: height 0.4s ease;
  min-height: 2px;
}

.rain-bar-day { font-size: 9px; color: var(--muted); }

/* ── Note box ────────────────────────────────────────────────── */
.note-box {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.4;
}

/* ── Forecast strip ──────────────────────────────────────────── */
.forecast-strip {
  display: flex;
  gap: 4px;
  margin-top: 0.75rem;
}

.fc-day {
  flex: 1;
  background: var(--dirt);
  border-radius: 6px;
  padding: 4px 2px;
  text-align: center;
}

.fc-day .fc-label { font-size: 9px;  color: var(--muted); }
.fc-day .fc-mm    { font-size: 11px; font-weight: 500; color: var(--text); }
.fc-day .fc-prob  { font-size: 9px;  color: var(--blue); }
.fc-day.has-rain  { background: var(--blue-lt); }

/* ── Misc ────────────────────────────────────────────────────── */
.coords {
  font-family: monospace;
  font-size: 0.72rem;
  color: var(--muted);
}

.error-state {
  padding: 1rem 1.25rem;
  font-size: 0.82rem;
  color: var(--red);
  background: #fef5f5;
}

/* ── Dashboard controls ──────────────────────────────────────── */
.all-trails-toggle { margin-bottom: 1.25rem; }

.all-trails-toggle button {
  background: var(--forest);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 500;
}

.all-trails-toggle button:hover { opacity: 0.88; }

#all-trails { display: none; }

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.25rem 0 0.6rem;
}
.section-label-loc {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: 0.2rem;
}

.refresh-note {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 1.25rem;
  text-align: center;
}

/* ── Ride window summary strip ───────────────────────────────── */
.ride-window-summary {
  padding: 0.55rem 1.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
}

.ride-window-summary.good { background: var(--green-lt); color: #1a5c30; }
.ride-window-summary.warn { background: var(--amber-lt); color: #7a5000; }
.ride-window-summary.bad  { background: var(--blue-lt);  color: #0f4060; }

/* ── Drying conditions note ──────────────────────────────────── */
.drying-note {
  margin-top: 0.5rem;
  font-size: 0.76rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.4;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
}

.drying-note.warn { color: #7a5000; }
.drying-note.good { color: #1a5c30; }

/* ── Detail page link ────────────────────────────────────────── */
.detail-link-wrap {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.detail-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--forest);
  text-decoration: none;
}

.detail-link:hover { text-decoration: underline; }

/* ── Animation ───────────────────────────────────────────────── */
.pulse { animation: pulse 1.5s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ── NWS Alert Banner ────────────────────────────────────────── */
.nws-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-left: 4px solid var(--banner-border);
  background: var(--banner-bg);
  color: var(--banner-text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 12px;
  border-radius: 0 6px 6px 0;
  position: relative;
}

.nws-banner__icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.nws-banner__body {
  flex: 1;
  min-width: 0;
}

.nws-banner__title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.nws-banner__headline {
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nws-banner__meta {
  margin-top: 4px;
  font-size: 0.78rem;
  opacity: 0.7;
}

.nws-banner__dismiss {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.5;
  font-size: 1.1rem;
  padding: 0 0 0 8px;
  flex-shrink: 0;
  line-height: 1;
}

.nws-banner__dismiss:hover { opacity: 1; }

/* Stack multiple alerts */
#nws-alert-banner .nws-banner + .nws-banner { margin-top: -4px; }

/* ══════════════════════════════════════════════════════════
   Stage 9 — Redesign components
   ══════════════════════════════════════════════════════════ */

/* ── Status custom properties ───────────────────────────── */
.s-open    { --s-color: var(--green);  --s-bg: var(--green-lt);  }
.s-caution { --s-color: var(--amber);  --s-bg: var(--amber-lt);  }
.s-wet     { --s-color: var(--orange); --s-bg: var(--orange-lt); }
.s-rain    { --s-color: var(--blue);   --s-bg: var(--blue-lt);   }
.s-issue   { --s-color: var(--orange); --s-bg: var(--orange-lt); }
.s-closed  { --s-color: var(--red);    --s-bg: #fdf0f0;          }

/* ── Loading row placeholder ───────────────────────────── */
.row-loading {
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  animation: pulse 1.5s infinite;
}

/* ── Primary trail rows (overview) ─────────────────────── */
.primary-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.primary-row {
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 0.75rem 1rem 0.75rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 0.75rem;
  row-gap: 0.25rem;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.12s;
}
.primary-row:hover { box-shadow: 0 3px 12px rgba(0,0,0,0.09); }
.primary-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: var(--s-color, #ccc);
}
.pr-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--forest);
  align-self: center;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}
.pr-dist {
  font-size: 0.73rem;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.pr-pill {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.28rem 0.6rem;
  border-radius: 100px;
  white-space: nowrap;
  background: var(--s-bg, #eee);
  color: var(--s-color, #888);
}
.pr-pill .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--s-color, #888);
}
.pr-meta {
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  gap: 0.9rem;
}
.pr-meta span { white-space: nowrap; }

/* ── Secondary trail rows (overview) ───────────────────── */
.secondary-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.6rem;
}
.compact-row {
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.12s;
  position: relative;
  overflow: hidden;
}
.compact-row:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.compact-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--s-color, #ccc);
}
.compact-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--s-color, #ccc);
}
.compact-name {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 600;
}
.compact-status {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--s-color, #888);
}
.compact-meta {
  font-size: 0.72rem;
  color: var(--muted);
  min-width: 70px;
  text-align: right;
}

/* ── Hero card (today / plan pages) ────────────────────── */
.hero-card {
  background: #fff;
  border-radius: 18px;
  border: 2px solid var(--forest);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.hero-trail-name {
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  color: var(--forest);
  line-height: 1.2;
  max-width: 65%;
}
.hero-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  color: #fff;
}
.hero-status-pill .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.hero-stat {
  background: var(--dirt);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
}
.hero-stat-val {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--forest);
  line-height: 1;
}
.hero-stat-val sup { font-size: 0.75rem; }
.hero-stat-lbl {
  font-size: 0.67rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.hero-drain {
  margin-top: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-drain-label {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}
.hero-drain-desc {
  font-size: 0.68rem;
  color: var(--muted);
}
.drain-fast    { background: #e6f4ec; color: #1a6b30; }
.drain-avg     { background: #f0f0f0; color: #555;    }
.drain-slow    { background: #fff3e0; color: #b06000; }
.drain-slowest { background: #fdf0e6; color: var(--orange); }

.hero-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.85rem 0 0.6rem;
}
.hero-updated {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.hero-updated .dot-live {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

/* Inside hero card, ride-window summaries are plain text (no background strips) */
.hero-card .ride-window-summary {
  padding: 0;
  border: none;
  background: none;
  font-size: 0.82rem;
  font-weight: 500;
}
.hero-card .ride-window-summary.good { background: none; color: var(--green); }
.hero-card .ride-window-summary.warn { background: none; color: var(--amber); }
.hero-card .ride-window-summary.bad  { background: none; color: var(--orange); }

/* ── Section (white card wrapper) ──────────────────────── */
.section {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.section-header {
  padding: 0.85rem 1rem 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.rainsense-badge {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--blue);
  opacity: 0.7;
  margin-left: 0.4rem;
}

/* ── Hourly scroll ──────────────────────────────────────── */
.hourly-scroll {
  display: flex;
  overflow-x: auto;
  padding: 0.75rem 0.75rem 1rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hourly-scroll::-webkit-scrollbar { display: none; }
.hour-cell {
  flex-shrink: 0;
  width: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}
.hour-time { font-size: 0.7rem; color: var(--muted); font-weight: 500; }
.hour-time.now { color: var(--blue); font-weight: 700; }
.hour-icon { font-size: 1.35rem; line-height: 1; }
.hour-temp { font-size: 0.85rem; font-weight: 600; }
.hour-bar-wrap {
  width: 100%;
  height: 36px;
  display: flex;
  align-items: flex-end;
}
.hour-bar {
  width: 100%;
  border-radius: 2px 2px 0 0;
  min-height: 0;
}
.hour-amt {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--blue);
  height: 1rem;
  text-align: center;
  line-height: 1;
}

/* ── Past rain grid ─────────────────────────────────────── */
.past-rain-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 0.75rem 1rem 1rem;
  gap: 0.5rem;
}
.past-cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
}
.past-day-lbl {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}
.past-bar-wrap {
  width: 100%;
  height: 36px;
  display: flex;
  align-items: flex-end;
}
.past-bar {
  width: 100%;
  border-radius: 2px 2px 0 0;
  background: #4a85b8;
  min-height: 0;
}
.past-amt {
  font-size: 0.62rem;
  font-weight: 600;
  color: #4a85b8;
  height: 1rem;
  text-align: center;
  line-height: 1;
}
.past-rain-grid .today-col {
  border-left: 1.5px dashed var(--border);
  padding-left: 0.5rem;
  margin-left: -0.25rem;
}

/* ── Conditions grid ────────────────────────────────────── */
.cond-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 480px) {
  .cond-grid { grid-template-columns: repeat(2, 1fr); }
}
.cond-cell {
  padding: 0.9rem 1rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cond-cell:nth-child(4n)      { border-right: none; }
.cond-cell:nth-last-child(-n+4) { border-bottom: none; }
@media (max-width: 480px) {
  .cond-cell:nth-child(2n) { border-right: none; }
  .cond-cell:nth-last-child(-n+2) { border-bottom: none; }
}
.cond-icon { font-size: 1.1rem; margin-bottom: 0.2rem; }
.cond-val  { font-size: 1.05rem; font-weight: 600; }
.cond-lbl  { font-size: 0.67rem; color: var(--muted); margin-top: 0.1rem; }

/* ── Weekly Plan CTA ────────────────────────────────────── */
.plan-cta {
  display: block;
  background: var(--forest);
  color: #fff;
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  margin-bottom: 0.75rem;
  transition: opacity 0.12s;
}
.plan-cta:hover { opacity: 0.9; }
button.plan-cta { width: 100%; border: none; cursor: pointer; font-family: 'DM Sans', sans-serif; text-align: left; }
.plan-cta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.plan-cta-text { font-size: 1rem; font-weight: 600; }
.plan-cta-sub  { font-size: 0.75rem; color: rgba(255,255,255,0.65); margin-top: 0.2rem; }
.plan-cta-arrow { font-size: 1.4rem; line-height: 1; }
.plan-cta-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.strip-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.strip-lbl {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}
.strip-chip {
  width: 100%;
  height: 6px;
  border-radius: 3px;
}

/* ── 7-day forecast table ───────────────────────────────── */
.week-row {
  display: grid;
  grid-template-columns: 72px 28px 1fr 96px 48px;
  align-items: center;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}
.week-row:last-child { border-bottom: none; }
.week-row.today-row { background: rgba(26,61,43,0.04); }
.wd-day { font-size: 0.85rem; font-weight: 600; }
.wd-day.today-lbl { color: var(--forest); }
.wd-icon { font-size: 1.2rem; text-align: center; }
.wd-status-bar { display: flex; flex-direction: column; }
.wd-status-label {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  width: fit-content;
  background: var(--s-bg, #eee);
  color: var(--s-color, #888);
}
.wd-temps {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
}
.wd-lo { font-weight: 500; color: var(--muted); }
.wd-hi { font-weight: 600; color: var(--text); }
.temp-bar-track {
  flex: 1;
  height: 5px;
  background: #e8e8e8;
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}
.temp-bar-fill {
  position: absolute;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #74b0e8 0%, #f5a742 100%);
}
.wd-precip {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
}
.wd-rain-wrap {
  width: 100%;
  height: 28px;
  display: flex;
  align-items: flex-end;
}
.wd-rain-bar {
  width: 100%;
  border-radius: 2px 2px 0 0;
  min-height: 0;
}
.wd-rain-amt {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--blue);
  height: 13px;
  line-height: 1;
  text-align: center;
}

/* ── Drying outlook ─────────────────────────────────────── */
.drying-card { padding: 1rem; }
.drying-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.drying-row:last-child { border-bottom: none; }
.drying-time { font-size: 0.8rem; font-weight: 600; min-width: 60px; color: var(--muted); }
.drying-bar {
  flex: 1;
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
}
.drying-fill { height: 100%; border-radius: 4px; }
.fill-wet    { background: var(--orange); width: 85%; }
.fill-caution { background: var(--amber); width: 45%; }
.fill-open   { background: var(--green); width: 10%; }
.drying-label { font-size: 0.75rem; font-weight: 600; min-width: 60px; text-align: right; }
.drying-label.s-open    { color: var(--green); }
.drying-label.s-caution { color: var(--amber); }
.drying-label.s-wet     { color: var(--orange); }

/* ── Soil info card ─────────────────────────────────────── */
.soil-card {
  padding: 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}
.soil-badge {
  flex-shrink: 0;
  width: 44px; height: 44px;
  background: var(--forest);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.soil-info-name { font-size: 0.85rem; font-weight: 600; }
.soil-info-desc { font-size: 0.75rem; color: var(--muted); margin-top: 0.2rem; line-height: 1.4; }

/* ── Page nav links (today / plan header) ───────────────── */
.page-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  padding-top: 0.1rem;
}
.nav-link {
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link.back { color: var(--muted); }
.nav-link.fwd  { color: var(--blue); }
.nav-link.map  { color: var(--forest); }

/* ── Tab bar ─────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.25rem;
}
.tab {
  background: none;
  border: none;
  padding: 0.55rem 1rem 0.45rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  transition: color 0.12s;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--forest);
  font-weight: 600;
}
.tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--forest);
}

/* ── Trail list (unified, distance-sorted) ───────────────── */
.trail-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

/* ── Info tab ────────────────────────────────────────────── */
.info-section {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 1.25rem;
  margin-bottom: 0.75rem;
}
.info-section h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem;
  color: var(--forest);
  margin-bottom: 0.6rem;
}
.info-section p {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}
.info-section p:last-child { margin-bottom: 0; }

.info-link { color: var(--forest); font-weight: 500; text-decoration: none; }
.info-link:hover { text-decoration: underline; }

.status-guide { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.25rem; }
.sg-row { display: flex; align-items: flex-start; gap: 0.75rem; }
.sg-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.22rem 0.65rem;
  border-radius: 100px;
  white-space: nowrap;
  min-width: 100px;
  justify-content: center;
}
.sg-pill .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.sg-open    { background: var(--green-lt);  color: var(--green);  }
.sg-open    .dot { background: var(--green); }
.sg-caution { background: var(--amber-lt);  color: var(--amber);  }
.sg-caution .dot { background: var(--amber); }
.sg-wet     { background: var(--orange-lt); color: var(--orange); }
.sg-wet     .dot { background: var(--orange); }
.sg-rain    { background: var(--blue-lt);   color: var(--blue);   }
.sg-rain    .dot { background: var(--blue); }
.sg-closed  { background: #fdf0f0;          color: var(--red);    }
.sg-closed  .dot { background: var(--red); }
.sg-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.5; padding-top: 0.15rem; }

.how-steps { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.25rem; }
.how-step { display: flex; gap: 0.75rem; align-items: flex-start; }
.how-num {
  flex-shrink: 0;
  width: 22px; height: 22px;
  background: var(--forest);
  color: #fff;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}
.how-text { font-size: 0.85rem; color: var(--text); line-height: 1.5; }
.how-text strong { color: var(--forest); }

.rain-demo { margin-top: 0.75rem; }
.rain-demo-scale { margin-bottom: 0.9rem; }
.rain-demo-gradient {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(to right, rgb(200,228,244), rgb(14,80,144));
}
.rain-demo-scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.3rem;
}
.rain-demo-examples {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  text-align: center;
}
.rain-demo-ex { display: flex; flex-direction: column; align-items: center; }
.rain-demo-bar-wrap {
  height: 28px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 0.3rem;
}
.rain-demo-bar { width: 20px; border-radius: 2px 2px 0 0; }
.rain-demo-amt { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.rain-demo-lbl { font-size: 0.7rem; color: var(--muted); margin-top: 0.15rem; line-height: 1.3; }
.rain-demo-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.75rem;
  margin-bottom: 0;
  line-height: 1.5;
}

.donate-wrap { margin-top: 0.75rem; }
.donate-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--forest);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.12s;
}
.donate-btn:hover { opacity: 0.88; }
.donate-inactive {
  display: none;
  margin-left: 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
}

/* ── Map page ────────────────────────────────────────────── */
#map {
  width: 100%;
  height: calc(100vh - 130px);
}

#map-embed {
  width: 100%;
  height: calc(100vh - 180px);
}

.map-popup {
  font-family: 'DM Sans', sans-serif;
  min-width: 140px;
}
.map-popup-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 0.4rem;
}
.map-popup-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  margin-bottom: 0.35rem;
}
.map-popup-meta {
  font-size: 0.73rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.map-popup-link {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--forest);
  text-decoration: none;
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
}
.map-popup-link:hover { text-decoration: underline; }
