/* ── Custom Properties ── */

:root {
  --green: #2D6A4F;
  --green-dark: #1B5E3F;
  --green-light: #E8F5E9;
  --green-ring: rgba(45, 106, 79, 0.25);
  --amber: #C97B3A;
  --blue: #2889A0;
  --text: #222222;
  --text-secondary: #717171;
  --text-muted: #b0b0b0;
  --border: #EBEBEB;
  --bg: #FFFFFF;
  --bg-hover: #F7F7F7;
  --panel-width: 440px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.12);
  --shadow-lg: 0 6px 20px rgba(0,0,0,0.15);
  --radius: 12px;
}

/* ── Keyframes ── */

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

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

/* ── Base ── */

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
  color: var(--text);
  background: var(--bg);
  height: 100vh;
  height: 100dvh;
  position: relative;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

/* ── Split-screen layout (Airbnb style) ── */

body.app-active {
  display: flex;
}

/* Map: fills remaining space on desktop, top portion on mobile */

#map {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
}

@media (min-width: 768px) {
  .app-active #map {
    position: relative;
    width: auto;
    flex: 1;
    height: 100vh;
    height: 100dvh;
    order: 2;
  }
}

@media (max-width: 767px) {
  .app-active #map {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 50vh;
    z-index: 1;
  }
}

/* ── Listings Panel (Airbnb sidebar) ── */

#listings-panel {
  display: none;
  flex-direction: column;
  z-index: 10;
}

/* Desktop: solid sidebar on the left */
@media (min-width: 768px) {
  .app-active #listings-panel {
    display: flex;
    width: var(--panel-width);
    height: 100vh;
    height: 100dvh;
    background: var(--bg);
    border-right: 1px solid var(--border);
    order: 1;
    flex-shrink: 0;
  }
}

/* Tablet: narrower panel to leave more map room */
@media (min-width: 768px) and (max-width: 1024px) {
  :root { --panel-width: 360px; }
}

/* Mobile: panel below the map */
@media (max-width: 767px) {
  .app-active #listings-panel {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: 50vh;
    background: var(--bg);
    border-top: 1px solid var(--border);
    z-index: 500;
  }
}

/* ── Listings search ── */

#listings-search {
  padding: 20px 24px 12px;
  flex-shrink: 0;
}

.listings-search-wrapper {
  position: relative;
  width: 100%;
  z-index: 20;
}

.listings-search-wrapper .search-icon {
  position: absolute;
  left: 14px;
  top: 0;
  height: 100%;
  pointer-events: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

#location-input {
  padding: 14px 16px 14px 42px;
  width: 100%;
  font-size: 15px;
  font-weight: 400;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s, border-color 0.25s;
  min-height: 50px;
  -webkit-appearance: none;
  appearance: none;
  color: var(--text);
}

#location-input:focus {
  outline: none;
  border-color: rgba(45, 106, 79, 0.3);
  box-shadow: 0 0 0 3px var(--green-ring);
}

#location-input::placeholder {
  color: var(--text-muted);
}

/* ── Search suggestions dropdown ── */

.search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.04);
  z-index: 100;
  overflow: hidden;
}

.search-suggestions:empty {
  display: none;
}

.suggestion-row {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 16px;
  min-height: 44px;
  cursor: pointer;
  transition: background 0.1s;
}

.suggestion-row:hover,
.suggestion-row.active {
  background: var(--bg-hover);
}

.suggestion-row + .suggestion-row {
  border-top: 1px solid var(--border);
}

.suggestion-primary {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}

.suggestion-secondary {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* ── Filter chips (Airbnb style) ── */

#listings-filters {
  display: flex;
  gap: 8px;
  padding: 12px 24px;
  overflow-x: auto;
  flex-shrink: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
}

#listings-filters::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  padding: 8px 16px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
}

.filter-chip:hover {
  border-color: var(--text);
}

.filter-chip.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.filter-divider {
  width: 1px;
  align-self: stretch;
  background: var(--border);
  margin: 2px 4px;
  flex-shrink: 0;
}

/* ── Listings count ── */

#listings-count {
  padding: 16px 24px 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}

#listings-count:empty {
  display: none;
}

/* ── Listings scroll area ── */

#listings-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 24px 24px;
}

/* ── Listing card (Airbnb style) ── */

.listing-card {
  padding: 20px 0;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border);
}

.listing-card:last-child {
  border-bottom: none;
}

.listing-card:hover {
  background: var(--bg-hover);
  margin: 0 -24px;
  padding: 20px 24px;
}

.listing-card.highlighted {
  background: rgba(45, 106, 79, 0.04);
  margin: 0 -24px;
  padding: 20px 24px;
  border-left: 3px solid var(--green);
}

.listing-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.listing-type {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
}

.listing-area {
  font-size: 12px;
  color: var(--text-secondary);
}

.listing-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.25;
}

.listing-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.activity-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.activity-tag.walk {
  background: var(--green-light);
  color: var(--green);
}

.activity-tag.run {
  background: #FFF3E0;
  color: #E65100;
}

.activity-tag.bike {
  background: #E0F7FA;
  color: #00695C;
}

.amenity-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.listing-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.listing-distance {
  font-size: 13px;
  color: var(--text-secondary);
}

.listing-verdict {
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
}

.listing-verdict.caution {
  color: var(--amber);
}

.listing-verdict.warning {
  color: #d32f2f;
}

/* ── Detail view ── */

#listing-detail {
  display: none;
  flex-direction: column;
  padding: 24px;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#listing-detail.visible {
  display: flex;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px 0;
  margin-bottom: 12px;
  min-height: 44px;
}

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

.detail-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.2;
}

.detail-type-area {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.detail-section {
  margin-bottom: 20px;
}

.detail-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-amenities {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-amenity-row {
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-amenity-row .amenity-icon {
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.detail-conditions {
  background: var(--bg-hover);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
}

.detail-conditions-row {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 6px;
}

.detail-conditions-row:last-child {
  margin-bottom: 0;
}

.detail-directions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
  width: 100%;
}

.detail-directions:hover {
  opacity: 0.85;
}

.detail-inner-places {
  margin-top: 8px;
}

.detail-inner-place {
  font-size: 14px;
  color: var(--text);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.detail-inner-place:last-child {
  border-bottom: none;
}

/* ── Conditions bar (floats on map) ── */

#sunset-time-container {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 1000;
  max-width: calc(90vw);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  animation: fadeSlideDown 0.5s ease-out both;
}

/* Desktop: center over the map area only */
@media (min-width: 768px) {
  .app-active #sunset-time-container {
    left: calc(var(--panel-width) + ((100vw - var(--panel-width)) / 2));
  }
}

#sunset-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: center;
}

#sunset-time {
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}

#sunset-time.default {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  color: var(--green);
}

#sunset-time.loading {
  animation: pulse 1.2s ease-in-out infinite;
}

/* ── Timezone trigger ── */

#timezone-trigger {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  min-height: 26px;
  transition: all 0.15s;
}

#timezone-trigger.visible {
  display: flex;
}

#timezone-trigger:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.06);
}

#timezone-trigger:hover {
  background: rgba(0, 0, 0, 0.06);
}

#timezone-trigger svg {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.tz-chevron {
  opacity: 0.5;
  transition: transform 0.2s ease;
}

#timezone-trigger.active .tz-chevron {
  transform: rotate(180deg);
}

#timezone-label {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Timezone modal ── */

#tz-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#tz-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

#tz-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.97);
  width: 380px;
  max-width: calc(100vw - 32px);
  max-height: 70vh;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 2001;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  overflow: hidden;
}

#tz-modal.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

#tz-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
}

#tz-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

#tz-modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s;
}

#tz-modal-close:hover {
  background: var(--bg-hover);
  color: var(--text);
}

#timezone-search {
  padding: 12px 20px;
  font-size: 14px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  outline: none;
  width: 100%;
  color: var(--text);
}

#timezone-search::placeholder {
  color: var(--text-muted);
}

#timezone-options {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.timezone-option {
  padding: 0 20px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.1s;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.timezone-option.selected {
  font-weight: 600;
}

.timezone-option .tz-check {
  display: none;
  color: var(--green);
  flex-shrink: 0;
}

.timezone-option.selected .tz-check {
  display: block;
}

.tz-group-header {
  padding: 10px 20px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 1;
}

.timezone-option:hover {
  background: var(--bg-hover);
}

/* Mobile: tz modal bottom sheet */
@media (max-width: 600px) {
  #tz-modal {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    max-height: 75vh;
    transform: translateY(100%);
    border-radius: var(--radius) var(--radius) 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  #tz-modal.visible {
    transform: translateY(0);
  }
}

/* Legacy hidden */
#weather-card { display: none; }

/* ── Leaflet overrides ── */

.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.85) !important;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 10px;
  z-index: 900;
  opacity: 0.6;
}

.leaflet-container {
  cursor: default !important;
}

/* No map warm filter — keep it clean */
.leaflet-tile-pane {
  filter: saturate(0.95) brightness(1.01);
}

/* Legend removed */

/* ── Track button ── */

#track-button {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  right: calc(16px + env(safe-area-inset-right, 0px));
  background: var(--bg);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  z-index: 1000;
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.15s;
  display: none;
  align-items: center;
  gap: 6px;
  min-height: 40px;
}

#track-button:hover {
  box-shadow: var(--shadow-lg);
}

/* ── Responsive ── */

@media (max-width: 767px) {
  #sunset-time-container {
    padding: 8px 14px;
    top: calc(10px + env(safe-area-inset-top, 0px));
    gap: 2px;
    border-radius: 12px;
    max-width: calc(100vw - 24px);
  }
  #sunset-top-row { flex-wrap: wrap; gap: 4px 8px; }
  #sunset-time { font-size: 12px; }
  #timezone-trigger { font-size: 10px; padding: 2px 6px; min-height: 24px; }
  #timezone-label { max-width: 90px; }
  #listings-search { padding: 16px 16px 8px; }
  #location-input { font-size: 16px; } /* prevent iOS auto-zoom on focus */
  #listings-filters { padding: 10px 16px; }
  .filter-chip { min-height: 36px; display: inline-flex; align-items: center; }
  #listings-scroll { padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
  #listing-detail { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  .listing-card:hover,
  .listing-card.highlighted { margin: 0 -16px; padding: 20px 16px; }
  #track-button {
    bottom: auto;
    top: calc(50vh - 52px);
    right: 12px;
    font-size: 12px;
    min-height: 36px;
    padding: 6px 12px;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  #sunset-time-container {
    top: calc(4px + env(safe-area-inset-top, 0px));
    padding: 6px 10px;
    gap: 1px;
  }
  #sunset-time { font-size: 11px; }
  /* Landscape mobile: give map more room, panel takes less */
  .app-active #map { height: 40vh; }
  .app-active #listings-panel { top: 40vh; }
  #track-button { top: calc(40vh - 48px); }
}

@media (min-width: 768px) {
  #sunset-time { font-size: 14px; }
}

/* ── Hero overlay ── */

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes blobFloat1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(15px, -20px) rotate(6deg); }
  66% { transform: translate(-10px, 10px) rotate(-4deg); }
}

@keyframes blobFloat2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-20px, 15px) rotate(-5deg); }
  66% { transform: translate(12px, -8px) rotate(8deg); }
}

@keyframes blobFloat3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(10px, 12px) rotate(4deg); }
  66% { transform: translate(-15px, -18px) rotate(-6deg); }
}

#hero-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  background: linear-gradient(160deg, #f7f3ee 0%, #eef1ec 40%, #e8ede5 100%);
  transition: opacity 500ms ease;
  overflow: hidden;
}

/* Decorative organic blobs */
.hero-blob {
  position: absolute;
  pointer-events: none;
  opacity: 0.07;
}

.hero-blob-1 {
  width: 500px;
  height: 500px;
  top: -120px;
  right: -80px;
  color: var(--green);
  animation: blobFloat1 20s ease-in-out infinite;
}

.hero-blob-2 {
  width: 400px;
  height: 400px;
  bottom: -100px;
  left: -60px;
  color: var(--amber);
  animation: blobFloat2 24s ease-in-out infinite;
}

.hero-blob-3 {
  width: 300px;
  height: 300px;
  top: 50%;
  left: 60%;
  color: var(--blue);
  animation: blobFloat3 18s ease-in-out infinite;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  animation: heroFadeIn 0.8s ease-out both;
  animation-delay: 0.15s;
  padding: 0 24px;
}

.hero-wordmark {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 52px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.04em;
  margin-bottom: 8px;
  line-height: 1;
}

.hero-tagline {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 44px;
  letter-spacing: 0.01em;
}

.hero-search-wrapper {
  position: relative;
  width: 85vw;
  max-width: 520px;
  margin-bottom: 0;
  z-index: 2;
}

.hero-search-wrapper .search-icon {
  position: absolute;
  left: 22px;
  top: 0;
  height: 100%;
  pointer-events: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  z-index: 2;
}

#hero-search-input {
  width: 100%;
  padding: 20px 24px 20px 54px;
  font-size: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  background: var(--bg);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  min-height: 62px;
  -webkit-appearance: none;
  appearance: none;
  color: var(--text);
  transition: box-shadow 0.25s, border-color 0.25s;
}

#hero-search-input:focus {
  outline: none;
  border-color: rgba(45, 106, 79, 0.3);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 0 0 3px var(--green-ring);
}

#hero-search-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

/* "or" divider */
.hero-divider {
  display: flex;
  align-items: center;
  width: 85vw;
  max-width: 520px;
  margin: 20px 0;
  gap: 16px;
}

.hero-divider::before,
.hero-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
}

.hero-divider span {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: lowercase;
}

#hero-track-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 12px;
  border: 1px solid rgba(45, 106, 79, 0.2);
  background: rgba(45, 106, 79, 0.04);
  transition: all 0.2s;
  cursor: pointer;
}

#hero-track-link:hover {
  background: rgba(45, 106, 79, 0.08);
  border-color: rgba(45, 106, 79, 0.35);
  box-shadow: 0 2px 12px rgba(45, 106, 79, 0.1);
}

#hero-track-link svg {
  opacity: 0.7;
}

/* ── Two-state: hero visible ── */

body:not(.app-active) #sunset-time-container {
  opacity: 0;
  transform: translateX(-50%) translateY(-20px);
  pointer-events: none;
}
body:not(.app-active) #listings-panel { display: none; }
body:not(.app-active) #track-button { display: none; }
body:not(.app-active) #parks-count { display: none; }

/* ── Two-state: active ── */

.app-active #hero-overlay {
  opacity: 0;
  pointer-events: none;
}

.app-active #sunset-time-container {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
  transition: opacity 300ms ease 100ms, transform 300ms ease 100ms;
}

.app-active #track-button { display: flex; }

/* ── Weather inline ── */

#weather-inline {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  white-space: nowrap;
}

#weather-inline:empty { display: none; }

@media (max-width: 767px) {
  #weather-inline { font-size: 11px; }
  /* Prevent conditions bar from becoming too wide on small phones */
  #sunset-time { white-space: normal; text-align: center; }
}

/* ── Parks count ── */

#parks-count {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

#parks-count:empty { display: none; }

/* ── Hero responsive ── */

@media (max-width: 600px) {
  .hero-wordmark { font-size: 40px; }
  .hero-tagline { font-size: 16px; margin-bottom: 32px; }
  .hero-search-wrapper { width: 92vw; max-width: none; }
  .hero-divider { width: 92vw; max-width: none; margin: 16px 0; }
  #hero-search-input { font-size: 16px; padding: 16px 20px 16px 48px; min-height: 54px; }
  .hero-search-wrapper .search-icon { left: 18px; }
  #hero-track-link { font-size: 13px; padding: 11px 20px; }
  .hero-blob-1 { width: 350px; height: 350px; top: -80px; right: -100px; }
  .hero-blob-2 { width: 280px; height: 280px; bottom: -60px; left: -80px; }
  .hero-blob-3 { width: 200px; height: 200px; }
}

/* Very short screens (landscape phones, iPhone SE) */
@media (max-height: 600px) {
  .hero-content { padding: 0 20px; }
  .hero-wordmark { font-size: 32px; margin-bottom: 4px; }
  .hero-tagline { font-size: 14px; margin-bottom: 20px; }
  #hero-search-input { min-height: 48px; padding: 14px 18px 14px 44px; font-size: 15px; }
  .hero-divider { margin: 12px 0; }
  #hero-track-link { padding: 10px 18px; font-size: 13px; }
  .hero-blob { opacity: 0.04; }
}

/* ── Dimmed/highlighted map features ── */

.park-dimmed {
  opacity: 0.15 !important;
}

.park-highlighted {
  stroke-width: 3 !important;
  stroke: var(--green) !important;
  fill-opacity: 0.35 !important;
}

/* ── "Search this area" button ── */

#search-area-btn {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  z-index: 1000;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
  transition: box-shadow 0.15s;
}

#search-area-btn:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
}

@media (min-width: 768px) {
  .app-active #search-area-btn {
    left: calc(var(--panel-width) + ((100vw - var(--panel-width)) / 2));
  }
}

@media (max-width: 767px) {
  #search-area-btn {
    bottom: auto;
    top: calc(50vh - 60px);
    font-size: 13px;
    padding: 8px 16px;
  }
}

/* ── Skeleton loading cards ── */

@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}

.skeleton-card {
  pointer-events: none;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--bg-hover) 25%, #e8e8e8 50%, var(--bg-hover) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.5s infinite linear;
  margin-bottom: 10px;
}

.skeleton-short { width: 30%; }
.skeleton-long { width: 80%; height: 16px; }
.skeleton-tags { width: 50%; }
.skeleton-medium { width: 40%; }

/* ── Footer ── */

.footer-text {
  font-size: 12px;
  color: var(--text-secondary);
}
.footer-text a {
  color: var(--text);
  text-decoration: underline;
  font-weight: 500;
}
