/* ── HERO ────────────────────────────────────────────────────────────────── */
.explore-hero {
  background: var(--forest);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, max-height 0.3s ease, margin-bottom 0.3s ease, padding 0.3s ease;
  max-height: 400px;
}
.explore-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(212,124,15,0.18) 0%, transparent 65%),
              radial-gradient(ellipse at 10% 80%, rgba(45,106,71,0.4) 0%, transparent 55%);
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.hero-left {}
.hero-title { font-size: 34px; font-weight: 700; color: #fff; letter-spacing: -0.8px; line-height: 1.1; white-space: nowrap; }
.hero-sub { font-size: 13.5px; color: rgba(255,255,255,0.6); margin-top: 4px; }
.hero-stats { display: flex; gap: 28px; margin-top: 20px; }
.hero-stat-val { font-size: 28px; font-weight: 600; color: #fff; font-family: var(--mono); letter-spacing: -0.5px; line-height: 1; }
.hero-stat-lbl { font-size: 10px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.6px; margin-top: 3px; }
.hero-stat.gold .hero-stat-val { color: var(--gold); }
.hero-right { text-align: right; flex-shrink: 0; }
.hero-pct { font-size: 42px; font-weight: 600; color: #fff; font-family: var(--mono); letter-spacing: -1px; line-height: 1; }
.hero-pct-lbl { font-size: 11px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }
.hero-bar { width: 120px; height: 4px; background: rgba(255,255,255,0.2); border-radius: 999px; overflow: hidden; margin-top: 8px; margin-left: auto; }
.hero-bar-fill { height: 100%; background: var(--gold); border-radius: 999px; transition: width 0.5s; }
.hero-milestone {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px; margin-left: auto;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px; padding: 6px 14px;
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.95);
  letter-spacing: 0.1px; white-space: nowrap;
}

.hero-collapsed {
  opacity: 0;
  max-height: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  pointer-events: none;
}

/* ── STATS BANNER (keep for compat) ────────────────────────────────────── */
.stats-banner {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 24px;
  display: grid; grid-template-columns: 1fr auto;
  gap: 16px; align-items: center; margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.stats-nums { display: flex; gap: 32px; }
.stat-item {}
.stat-val { font-size: 24px; font-weight: 600; letter-spacing: -0.5px; color: var(--text); font-family: var(--mono); }
.stat-lbl { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 1px; }
.stat-item.accent .stat-val { color: var(--gold); }
.progress-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.progress-pct { font-size: 13px; font-weight: 500; color: var(--text2); font-family: var(--mono); }
.progress-bar { width: 160px; height: 4px; background: var(--border); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--forest-mid); border-radius: 999px; transition: width 0.5s; }

/* ── CONTROLS ───────────────────────────────────────────────────────────── */
.controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search-wrap { position: relative; flex: 1; min-width: 200px; }
.search-wrap input {
  width: 100%; padding: 7px 12px 7px 32px;
  border: 1px solid var(--border2); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font-family: var(--font);
  font-size: 13.5px; outline: none; transition: border-color 0.12s;
}
.search-wrap input:focus { border-color: var(--green-mid); }
.search-wrap input::placeholder { color: var(--text3); }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text3); pointer-events: none; }
.search-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--text3); cursor: pointer; font-size: 12px; display: none; }

.select-wrap select {
  padding: 7px 28px 7px 10px; border: 1px solid var(--border2);
  border-radius: var(--radius); background: var(--surface); color: var(--text);
  font-family: var(--font); font-size: 13.5px; outline: none; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23a3a3a3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
  transition: border-color 0.12s;
}
.select-wrap select:focus { border-color: var(--green-mid); }

.toggle-group { display: flex; border: 1px solid var(--border2); border-radius: var(--radius); overflow: hidden; }
.toggle-opt {
  padding: 7px 14px; font-size: 13px; font-weight: 500; cursor: pointer;
  border: none; background: var(--surface); color: var(--text2);
  font-family: var(--font); transition: all 0.12s; white-space: nowrap;
}
.toggle-opt + .toggle-opt { border-left: 1px solid var(--border2); }
.toggle-opt:hover { background: var(--surface2); color: var(--text); }
.toggle-opt.active { background: var(--surface2); color: var(--text); }
.toggle-opt.active.green { background: var(--green-light); color: var(--green-text); }
.toggle-opt.active.amber { background: var(--amber-light); color: var(--amber); }

/* ── PARK TABLE ─────────────────────────────────────────────────────────── */
.park-table-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
}

.state-group-header {
  padding: 10px 16px; font-size: 11px; font-weight: 600;
  color: var(--forest-text); letter-spacing: 0.6px;
  background: var(--forest-light);
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between;
  text-transform: uppercase;
}

.park-row {
  display: grid; grid-template-columns: 36px 1fr auto auto;
  align-items: center; gap: 12px; padding: 10px 16px;
  border-bottom: 1px solid var(--border); cursor: pointer;
  transition: background 0.1s;
}
.me-section .park-table-wrap {
  border-radius: 0;
  border: none;
  box-shadow: none;
  margin-bottom: 0;
}
.park-row:last-child { border-bottom: none; }
.park-row:hover { background: var(--surface2); }

.park-emoji { 
  width: 36px; height: 36px; border-radius: 8px; 
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.park-emoji svg { width: 16px; height: 16px; }
.park-info-col {}
.park-name { font-size: 13.5px; font-weight: 500; color: var(--text); }
.park-tags-row { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.tag {
  font-size: 10px; padding: 2px 7px; border-radius: 4px;
  background: var(--surface2); color: var(--text3); border: 1px solid var(--border);
  font-weight: 500; white-space: nowrap; letter-spacing: 0.1px;
}
/* Terrain chip — green tint */
.tag.terrain {
  background: var(--forest-light); color: var(--forest-text);
  border-color: rgba(45,106,71,0.25);
}
body.dark .tag.terrain { background: rgba(45,106,71,0.15); color: #6dbb8a; border-color: rgba(45,106,71,0.3); }
/* Feature chip — gold tint */
.tag.feature {
  background: var(--gold-light); color: var(--gold-text);
  border-color: rgba(212,124,15,0.25);
}
body.dark .tag.feature { background: rgba(212,124,15,0.12); color: #f0a840; border-color: rgba(212,124,15,0.3); }
/* Activity chip — neutral/blue tint */
.tag.activity {
  background: #eef3fb; color: #3b5ea6;
  border-color: rgba(59,94,166,0.2);
}
body.dark .tag.activity { background: rgba(59,94,166,0.12); color: #7ba4e8; border-color: rgba(59,94,166,0.25); }

/* ── PARK ICON COLOURS ──────────────────────────────────────────────────── */
/* List row: transparent bg, single calm stroke colour */
.park-icon-box { background: transparent; color: var(--forest-mid); }
/* Modal: very subtle surface tint, same stroke */
.park-icon-box.lg { background: var(--surface2); border-radius: 10px; }
body.dark .park-icon-box { color: #6dbb8a; }

.park-status { display: flex; align-items: center; gap: 6px; }
.status-pill {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  white-space: nowrap;
}
.status-pill.visited { background: var(--green-light); color: var(--green-text); }
.status-pill.planned { background: var(--amber-light); color: var(--amber); }

.park-action {
  width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--border2);
  background: var(--surface); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.12s; flex-shrink: 0;
}
.park-action:hover { border-color: var(--green-mid); background: var(--green-light); }
.park-row.visited .park-action { background: var(--green-mid); border-color: var(--green-mid); }

/* ── STICKY CONTROLS ────────────────────────────────────────────────────── */
#hero-sentinel { height: 0; }

.controls-wrap {
  padding-bottom: 8px;
}
.controls-wrap.is-sticky {
  position: sticky;
  top: 64px;
  z-index: 190;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(26,20,16,0.07);
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-left: max(24px, calc((100vw - 960px) / 2 + 24px));
  padding-right: max(24px, calc((100vw - 960px) / 2 + 24px));
  padding-top: 0;
  padding-bottom: 10px;
}

/* Sticky stats row — hidden until sticky */
.sticky-stats-row {
  display: flex;
  align-items: center;
  gap: 24px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height 0.3s ease, opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.controls-wrap.is-sticky .sticky-stats-row {
  max-height: 48px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  padding-top: 10px;
  padding-bottom: 6px;
}

.sticky-stat {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-shrink: 0;
}
.sticky-stat-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--mono);
  letter-spacing: -0.3px;
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1;
}
.sticky-stat-lbl {
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}
.sticky-stat.gold .sticky-stat-val { color: var(--gold); }

.sticky-pct-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.sticky-pct-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--mono);
  letter-spacing: -0.3px;
  min-width: 36px;
  text-align: right;
}
.sticky-pct-bar {
  width: 80px;
  height: 3px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.sticky-pct-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 999px;
  transition: width 0.5s ease;
}

/* ── MOBILE RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 720px) {
  /* Hero */
  .explore-hero { padding: 20px 20px; }
  .hero-inner { flex-direction: column; gap: 16px; align-items: flex-start; }
  .hero-title { font-size: 24px; }
  .hero-stats { gap: 16px; flex-wrap: wrap; }
  .hero-stat-val { font-size: 22px; }
  .hero-right { text-align: left; width: 100%; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
  .hero-pct { font-size: 32px; }
  .hero-bar { margin-left: 0; width: 100px; }
  .hero-milestone { margin-left: 0; }

  /* Controls */
  .controls { flex-direction: column; align-items: stretch; gap: 8px; }
  .search-wrap { min-width: 0; }
  .select-wrap { width: 100%; }
  .select-wrap select { width: 100%; }
  .toggle-group { width: 100%; }
  .toggle-opt { flex: 1; text-align: center; padding: 9px 8px; }

  /* Sticky controls: hide sticky stats on mobile to save space */
  .sticky-stats-row { display: none; }

  /* Sticky pct bar slightly smaller */
  .sticky-pct-bar { width: 60px; }
}
