* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; font-family: -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", sans-serif; }

#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e5e7eb;
  padding: 8px 14px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
/* Camp-GO logo badge: deep-green pill, clickable, with the pin-style icon */
#topbar .title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  padding: 4px 16px 4px 8px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f3faec 0%, #ecfdf5 100%);
  border: 1px solid #c1deac;
  line-height: 1.15;
  transition: transform 0.12s, box-shadow 0.12s;
}
#topbar .title:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(35, 78, 41, 0.22);
}
#topbar .title .brand-icon-slot { display: inline-flex; align-items: center; }
#topbar .title .brand-icon-slot img,
#topbar .title .brand-icon-slot svg { width: 32px; height: 40px; }
#topbar .title .brand-text { display: flex; flex-direction: column; }
#topbar .title .brand-name {
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, #2E6B33, #234E29);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
#topbar .title .brand-tagline {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 500;
  color: #6b7280;
  letter-spacing: 0.01em;
  margin-top: 1px;
}
#topbar .filters { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; }
#topbar .filters label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; user-select: none; }
#topbar #status { margin-left: auto; font-size: 11px; color: #6b7280; }

#map { position: absolute; top: 64px; left: 0; right: 0; bottom: 0; }

.pin {
  width: 28px; height: 28px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  display: flex; align-items: center; justify-content: center;
}
.pin .pin-glyph {
  width: 14px; height: 14px;
  color: white;
  transform: rotate(45deg);  /* counter the parent's -45deg so glyph stays upright */
  stroke-width: 2.4;          /* slightly thicker so it reads at small size */
}
.pin-camp_ground, .pin-auto_camp { background: #2563eb; }
.pin-rv_park, .pin-car_camp { background: #16a34a; }
.pin-michi_no_eki { background: #f59e0b; }

/* ============= AI search box ============= */
#searchbar {
  position: fixed;
  top: 76px;
  left: 12px;
  width: min(380px, calc(100vw - 24px));
  z-index: 800;                          /* above map (Leaflet panes ~400-700), below detail (999) */
  pointer-events: none;                  /* children re-enable */
}
#searchbar > * { pointer-events: auto; }

#search-form {
  position: relative;
  display: flex;
  align-items: center;
  background: white;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  border: 1px solid #e5e7eb;
  padding: 0 4px 0 14px;
  height: 42px;
}
#search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px;
  color: #111827;
  background: transparent;
  font-family: inherit;
  min-width: 0;
}
#search-input::placeholder { color: #9ca3af; }

#search-submit, #search-clear {
  border: none; cursor: pointer; padding: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
#search-submit { background: #2563eb; color: white; margin-left: 6px; }
#search-submit:hover { background: #1d4ed8; }
#search-submit .ic { width: 16px; height: 16px; }
#search-submit.loading .ic { animation: spin 1s linear infinite; }

#search-clear { background: #f3f4f6; color: #6b7280; margin-right: -2px; }
#search-clear:hover { background: #e5e7eb; color: #111827; }
#search-clear .ic { width: 14px; height: 14px; }

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Small onboarding hint labels above the search box and region chips */
.hint-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 4px 4px;
  font-size: 11px;
  font-weight: 700;
  color: #4b5563;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 1px rgba(255,255,255,0.85);  /* readable over map */
}
.hint-label small {
  font-weight: 500;
  color: #6b7280;
  margin-left: 4px;
}
.hint-label .hint-icon { width: 14px; height: 14px; display: inline-flex; }
#hint-search       { margin-top: 0; }
#hint-search .hint-icon { color: #2563eb; }
#hint-region .hint-icon { color: #16a34a; }

#region-filter {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.region-chip {
  border: none;
  background: transparent;
  color: #4b5563;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.region-chip:hover { background: #f3f4f6; color: #111827; }
.region-chip.is-active {
  background: #16a34a;
  color: white;
  box-shadow: 0 1px 2px rgba(22, 163, 74, 0.4);
}
.region-chip.is-active:hover { background: #15803d; color: white; }

#search-results {
  margin-top: 8px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.14);
  border: 1px solid #e5e7eb;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.search-loading, .search-empty, .search-error {
  padding: 16px 14px;
  font-size: 13px;
  color: #4b5563;
  display: flex; align-items: center; gap: 8px;
}
.search-loading .ic {
  width: 16px; height: 16px;
  animation: spin 1.5s linear infinite;
  color: #2563eb;
}
/* Friendly multi-line error block (replaces the raw JSON we used to dump) */
.search-error {
  display: block;
  padding: 14px 16px;
  background: #fef2f2;
  color: #7f1d1d;
  border-left: 3px solid #ef4444;
  border-radius: 0 12px 12px 0;
  margin: 4px;
  line-height: 1.5;
}
.search-error .seq-head {
  font-size: 13px;
  font-weight: 700;
  color: #991b1b;
  margin-bottom: 4px;
}
.search-error .seq-body {
  font-size: 12px;
  color: #4b5563;
  margin-bottom: 6px;
}
.search-error .seq-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  padding: 4px 10px;
  background: white;
  border: 1px solid #dbeafe;
  border-radius: 999px;
}
.search-error .seq-link:hover { background: #eff6ff; }
.search-error-quota {
  border-left-color: #f59e0b;
  background: #fffbeb;
}
.search-error-quota .seq-head { color: #92400e; }

.sr-head {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid #f3f4f6;
}
.sr-head .sr-of { color: #9ca3af; font-weight: 500; }

.sr-list { list-style: none; margin: 0; padding: 4px; display: flex; flex-direction: column; gap: 2px; }
.sr-row {
  display: grid;
  grid-template-columns: 22px 56px 1fr 50px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}
.sr-row:hover { background: #f9fafb; }
.sr-rank {
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.sr-thumb {
  width: 56px; height: 42px;
  border-radius: 6px;
  object-fit: cover;
  background: #f3f4f6;
}
.sr-thumb-blank.pin-camp_ground, .sr-thumb-blank.pin-auto_camp { background: linear-gradient(135deg, #1e40af, #60a5fa); }
.sr-thumb-blank.pin-rv_park, .sr-thumb-blank.pin-car_camp { background: linear-gradient(135deg, #14532d, #4ade80); }
.sr-thumb-blank.pin-michi_no_eki { background: linear-gradient(135deg, #92400e, #fcd34d); }
.sr-body { min-width: 0; }
.sr-title {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sr-meta { display: flex; align-items: center; gap: 6px; margin: 2px 0 4px; font-size: 11px; }
.sr-type {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}
.sr-type-camp_ground, .sr-type-auto_camp { background: #dbeafe; color: #1e40af; }
.sr-type-rv_park, .sr-type-car_camp { background: #dcfce7; color: #166534; }
.sr-type-michi_no_eki { background: #fef3c7; color: #92400e; }
.sr-pref { color: #6b7280; }
.sr-reason {
  font-size: 11px;
  color: #4b5563;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sr-score { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.sr-score-bar {
  width: 44px; height: 5px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}
.sr-score-fill {
  height: 100%;
  background: linear-gradient(90deg, #84cc16, #16a34a);
  border-radius: 999px;
}
.sr-score-num {
  font-size: 11px;
  font-weight: 700;
  color: #111827;
  font-variant-numeric: tabular-nums;
}

/* Highlighted pins after a search */
.leaflet-marker-icon.pin-match {
  z-index: 1000 !important;
}
.leaflet-marker-icon.pin-match .pin {
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.85),
              0 0 16px rgba(245, 158, 11, 0.6),
              0 2px 4px rgba(0,0,0,0.3);
  animation: pin-pulse 1.6s ease-in-out infinite;
}
@keyframes pin-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.85), 0 0 12px rgba(245, 158, 11, 0.4), 0 2px 4px rgba(0,0,0,0.3); }
  50%      { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.55), 0 0 20px rgba(245, 158, 11, 0.7), 0 2px 4px rgba(0,0,0,0.3); }
}
.leaflet-marker-icon.pin-dim {
  opacity: 0.32;
  filter: saturate(0.6);
}

@media (max-width: 600px) {
  #searchbar { top: 100px; left: 8px; right: 8px; width: auto; }
}

/* ============= cluster bubbles ============= */
.cluster {
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: white;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  position: relative;
  transition: transform 0.15s ease-out;
}
.cluster::after {  /* soft outer halo to make clusters pop on busy maps */
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.18;
  z-index: -1;
}
.cluster span { line-height: 1; }
.cluster:hover { transform: scale(1.06); }

.cluster-sm { width: 36px; height: 36px; font-size: 12px; }
.cluster-md { width: 44px; height: 44px; font-size: 14px; }
.cluster-lg { width: 52px; height: 52px; font-size: 16px; }

.cluster-camp_ground, .cluster-auto_camp { background: #2563eb; color: #2563eb; }
.cluster-rv_park, .cluster-car_camp     { background: #16a34a; color: #16a34a; }
.cluster-michi_no_eki                   { background: #f59e0b; color: #f59e0b; }
/* The number text needs to stay white even though we set text color for the halo. */
.cluster span { color: #fff; }

/* ============= rich pin tooltip ============= */
/* Override Leaflet's default tooltip chrome so it can host an image. */
.leaflet-tooltip.pin-tooltip {
  background: white;
  border: none;
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  white-space: normal;
  max-width: 220px;
  overflow: hidden;
  pointer-events: none;
}
.leaflet-tooltip.pin-tooltip::before { display: none; }  /* hide the default arrow */

.pin-tip { width: 200px; font-family: inherit; }
.pin-tip-compact { width: auto; min-width: 140px; max-width: 220px; }

.pin-tip-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #e5e7eb, #f3f4f6);
  overflow: hidden;
}
.pin-tip-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

.pin-tip-body { padding: 8px 10px 10px; }
.pin-tip-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}
.pin-tip-badge-camp_ground, .pin-tip-badge-auto_camp { background: #dbeafe; color: #1e40af; }
.pin-tip-badge-rv_park, .pin-tip-badge-car_camp     { background: #dcfce7; color: #166534; }
.pin-tip-badge-michi_no_eki                         { background: #fef3c7; color: #92400e; }

.pin-tip-name {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
}
.pin-tip-pref {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
}

/* ============= base icon styles ============= */
.ic {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: -0.18em;
  width: 1em; height: 1em;          /* default — overridden in specific contexts */
}
.brand-icon { width: 16px; height: 16px; color: #16a34a; vertical-align: -3px; }

#detail {
  position: fixed; top: 64px; bottom: 0;
  /* Split-screen on desktop: detail takes ~half, map fills the rest.
     On narrow screens (<=900px) the panel falls back to a full-width overlay. */
  width: clamp(420px, 50vw, 720px);
  right: 0;
  background: white;
  box-shadow: -2px 0 12px rgba(0,0,0,0.12);
  overflow-y: auto;
  padding: 56px 20px 80px;            /* extra top padding to clear the fixed × */
  z-index: 999;
  transition: right 0.22s ease-out;
}
#detail.hidden { right: calc(-1 * clamp(420px, 50vw, 720px) - 16px); pointer-events: none; }

/* When the detail panel is open, shrink the map to live alongside it. */
body.detail-open #map { right: clamp(420px, 50vw, 720px); transition: right 0.22s ease-out; }
body:not(.detail-open) #map { right: 0; transition: right 0.22s ease-out; }
#detail-close {
  position: fixed;                     /* stay reachable regardless of scroll */
  top: 72px;                           /* align with the panel's top edge + 8px */
  right: 8px;
  background: rgba(255,255,255,0.92);
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #374151;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  z-index: 1001;                       /* above #detail (999) */
}
#detail-close .ic { width: 18px; height: 18px; }
#detail-close:hover { color: #111827; background: #f9fafb; }
#detail.hidden #detail-close { display: none; } /* also hide × while panel is hidden */

/* ============= detail panel redesign ============= */

#detail {
  background: #f7f7f5; /* warm off-white so cards stand out */
  padding: 0 0 80px;   /* hero is edge-to-edge; cards bring their own padding */
}
#detail-body { padding: 0; }

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

/* Hero */
.hero {
  position: relative;
  height: 220px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  color: white;
  margin: 0;
}
.hero-overlay {
  width: 100%;
  padding: 16px 20px 18px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 100%);
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.hero-badges { margin-bottom: 6px; }
.hero-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.01em;
}
.hero-sub { font-size: 12px; opacity: 0.92; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(255,255,255,0.92); color: #1f2937;
  text-shadow: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.badge .badge-icon { width: 11px; height: 11px; }
.badge-camp_ground, .badge-auto_camp { color: #1d4ed8; }
.badge-rv_park, .badge-car_camp     { color: #15803d; }
.badge-michi_no_eki                 { color: #b45309; }

/* Facts row (elevation, price-range pills) */
.facts {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 0 16px;
  margin-top: -4px;
}
.fact {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600;
  background: white; color: #374151;
  padding: 6px 11px; border-radius: 999px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.fact .ic { width: 13px; height: 13px; color: #6b7280; }

/* Card */
.card {
  background: white;
  margin: 0 12px;
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px solid #ececec;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.card-h {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.card-h .ic { width: 14px; height: 14px; color: #9ca3af; }
.price-note { font-size: 12px; color: #4b5563; line-height: 1.55; }

.desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #1f2937;
}

/* Amenities */
.amenities {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 8px;
}
.amenity {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 6px;
  background: #f3f4f6;
  border-radius: 10px;
  font-size: 11px;
  color: #374151;
}
.amenity-icon { display: flex; align-items: center; justify-content: center; }
.amenity-icon .ic { width: 24px; height: 24px; }
.amenity-label { font-weight: 600; }

/* Scores with progress bars */
.scores { display: flex; flex-direction: column; gap: 8px; }
.score-row {
  display: grid;
  grid-template-columns: 100px 1fr 24px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.score-label { color: #374151; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.score-icon { width: 14px; height: 14px; color: #6b7280; }
.score-bar {
  position: relative;
  height: 8px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}
.score-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease-out;
}
.score-fill-1 { background: #ef4444; }
.score-fill-2 { background: #f97316; }
.score-fill-3 { background: #eab308; }
.score-fill-4 { background: #84cc16; }
.score-fill-5 { background: #16a34a; }
.score-num {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: #111827;
}

/* Tags with rotating accent colors */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11px; font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid transparent;
}
.tag-0 { background: #eef2ff; color: #3730a3; }
.tag-1 { background: #ecfdf5; color: #065f46; }
.tag-2 { background: #fef3c7; color: #92400e; }
.tag-3 { background: #fce7f3; color: #9d174d; }
.tag-4 { background: #e0f2fe; color: #075985; }

/* Signal bars */
.signals { display: flex; flex-direction: column; gap: 6px; }
.signal-row {
  display: grid;
  grid-template-columns: 80px auto 1fr;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.signal-name { font-weight: 600; color: #374151; }
.signal-bars { display: inline-flex; gap: 2px; align-items: flex-end; }
.signal-bars .bar {
  width: 4px; background: #e5e7eb; border-radius: 1px;
}
.signal-bars .bar:nth-child(1) { height: 6px; }
.signal-bars .bar:nth-child(2) { height: 9px; }
.signal-bars .bar:nth-child(3) { height: 12px; }
.signal-bars .bar:nth-child(4) { height: 15px; }
.signal-strong .bar.on { background: #10b981; }
.signal-ok     .bar.on { background: #84cc16; }
.signal-weak   .bar.on { background: #f59e0b; }
.signal-none   .bar.on { background: #ef4444; }
.signal-text { color: #6b7280; font-size: 11px; }

/* Photos grid */
.photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.photos img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
  background: #f3f4f6;
}
/* If every <img> 404'd and was removed, hide the wrapping card. */
.card:has(.photos:empty) { display: none; }

/* Address */
.addr { font-size: 12px; color: #374151; line-height: 1.55; }

/* Sources */
.sources { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.sources a {
  display: inline-flex; align-items: center; gap: 4px;
  color: #2563eb; text-decoration: none;
  font-size: 12px; word-break: break-all;
}
.sources a:hover { text-decoration: underline; }
.sources .ext { width: 11px; height: 11px; opacity: 0.55; margin-left: 2px; vertical-align: -1px; }

/* ============= reviews ============= */
.rv-loading, .rv-error { font-size: 12px; color: #6b7280; padding: 4px 0; }
.rv-error { color: #b91c1c; }

.rv-summary {
  font-size: 14px;
  font-weight: 700;
  color: #f59e0b;
  margin-bottom: 8px;
}
.rv-summary .rv-count { color: #6b7280; font-weight: 500; font-size: 12px; margin-left: 4px; }
.rv-summary.rv-empty {
  font-weight: 500;
  color: #6b7280;
  font-size: 12px;
}

.rv-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px; }
.rv-item {
  background: #f9fafb;
  border-radius: 8px;
  padding: 10px 12px;
}
.rv-row1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.rv-stars { color: #f59e0b; font-size: 13px; letter-spacing: 1px; }
.rv-name { font-size: 12px; font-weight: 600; color: #374151; }
.rv-date { font-size: 11px; color: #9ca3af; margin-left: auto; }
.rv-row2 { font-size: 11px; color: #6b7280; margin-bottom: 4px; }
.rv-when { background: #fff; padding: 1px 6px; border-radius: 4px; border: 1px solid #e5e7eb; }
.rv-comment {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #1f2937;
  white-space: pre-wrap;
}

/* form */
.rv-form-wrap { margin-top: 4px; }
.rv-form-toggle {
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 700;
  color: #2563eb;
  padding: 6px 10px;
  background: #eff6ff;
  border-radius: 6px;
  display: inline-block;
}
.rv-form-toggle::-webkit-details-marker { display: none; }
.rv-form-toggle::before { content: "＋"; margin-right: 4px; }
details[open] > .rv-form-toggle::before { content: "−"; }

.rv-form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}
.rv-form-row { display: flex; flex-direction: column; gap: 4px; }
.rv-label { font-size: 11px; font-weight: 700; color: #374151; }
.rv-form input[type=text],
.rv-form input[type=month],
.rv-form textarea {
  font-family: inherit;
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
  color: #111827;
  outline: none;
}
.rv-form input:focus, .rv-form textarea:focus { border-color: #2563eb; }
.rv-form textarea { resize: vertical; min-height: 70px; }

.rv-stars-input { display: flex; gap: 2px; }
.rv-star-btn {
  background: none; border: none; cursor: pointer;
  font-size: 22px; line-height: 1;
  color: #d1d5db;
  padding: 0 2px;
  transition: color 0.1s, transform 0.1s;
}
.rv-star-btn.is-on, .rv-star-btn.is-hover { color: #f59e0b; }
.rv-star-btn:hover { transform: scale(1.15); }

.rv-form-actions { display: flex; align-items: center; gap: 10px; }
.rv-submit {
  background: #16a34a; color: white;
  border: none; padding: 8px 18px;
  border-radius: 6px; font-weight: 700; font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.rv-submit:hover { background: #15803d; }
.rv-submit:disabled { background: #9ca3af; cursor: wait; }

.rv-status { font-size: 11px; padding: 4px 8px; border-radius: 4px; }
.rv-status-info  { background: #eff6ff; color: #1e40af; }
.rv-status-ok    { background: #dcfce7; color: #166534; }
.rv-status-error { background: #fef2f2; color: #b91c1c; }

.rv-disclaimer { font-size: 10px; color: #9ca3af; line-height: 1.5; }

/* ============= landing page (the new /) ============= */

body.landing-page {
  background: #f7f7f5;
  color: #1f2937;
  font-family: -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  margin: 0;
  line-height: 1.6;
}

.landing { max-width: 920px; margin: 0 auto; padding: 0 16px 32px; }

/* Hero — deep forest green to match the Camp-GO logo */
.landing-hero {
  background: linear-gradient(160deg, #234E29 0%, #2E6B33 45%, #3F7440 100%);
  color: white;
  padding: 44px 24px 44px;
  border-radius: 0 0 28px 28px;
  margin: 0 -16px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.landing-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 15%, rgba(232,160,64,0.20), transparent 55%),
              radial-gradient(circle at 12% 88%, rgba(168,208,128,0.15), transparent 50%);
  pointer-events: none;
}
.landing-brand-logo {
  display: block;
  margin: 0 auto 12px;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.32));
  position: relative;
}
.landing-brand-name {
  margin: 0 0 4px;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 52px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0,0,0,0.22);
  position: relative;
}
.landing-brand-name .brand-camp { color: #ffffff; }
.landing-brand-name .brand-dash { color: #C0E08C; padding: 0 2px; }
.landing-brand-name .brand-go { color: #A8D080; position: relative; }
.landing-brand-name .brand-go::after {
  content: "";
  display: inline-block;
  width: 0; height: 0;
  margin-left: 6px; vertical-align: middle;
  border-left: 12px solid #FFC97A;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  transform: translateY(-3px);
}
.landing-tagline {
  margin: 4px 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  opacity: 0.95;
  position: relative;
}
.landing-hero-copy {
  font-size: 15px;
  line-height: 1.85;
  margin: 4px 0 22px;
  position: relative;
}
.landing-hero-copy strong { font-size: 22px; font-weight: 800; letter-spacing: 0.02em; color: #FFE5B8; }

.landing-cta {
  display: inline-block;
  padding: 12px 28px;
  background: white;
  color: #234E29;
  font-weight: 800;
  font-size: 15px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
  position: relative;
  transition: transform 0.12s, box-shadow 0.12s;
}
.landing-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.28); }
.landing-cta-bottom {
  display: block;
  max-width: 320px;
  margin: 28px auto 0;
  background: linear-gradient(135deg, #2E6B33, #234E29);
  color: white;
  text-align: center;
}

/* Block layout */
.landing-block {
  background: white;
  border-radius: 16px;
  padding: 22px 22px 24px;
  margin-bottom: 18px;
  border: 1px solid #ececec;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.landing-block-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.landing-block-num {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3F7440, #234E29);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; font-family: "Segoe UI", monospace;
  box-shadow: 0 2px 6px rgba(35, 78, 41, 0.25);
}
.landing-block-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  color: #111827;
}
.landing-block-head p {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
}

/* AI Search */
.landing-search {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.landing-search input {
  flex: 1;
  font-family: inherit;
  font-size: 14px;
  padding: 12px 18px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  color: #111827;
  outline: none;
  min-width: 0;
}
.landing-search input::placeholder { color: #9ca3af; }
.landing-search input:focus { border-color: #3F7440; background: white; }
.landing-search button {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #3F7440, #234E29);
  color: white;
  border: none;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.landing-search button:hover { background: linear-gradient(135deg, #234E29, #1a3a1f); }
.landing-search button svg { width: 16px; height: 16px; }

.landing-examples {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.landing-examples li a {
  display: inline-block;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}
.landing-examples li a:hover { background: #ecfdf5; border-color: #bbf7d0; color: #234E29; }

/* Regions */
.landing-regions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.landing-region {
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 16px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  text-decoration: none;
  color: #111827;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s, border-color 0.12s;
}
.landing-region:hover {
  background: #f3faec;
  border-color: #c1deac;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(63, 116, 64, 0.15);
}
.landing-region-name { font-size: 15px; font-weight: 700; }
.landing-region-count { font-size: 11px; color: #6b7280; font-weight: 500; }

/* Featured cards */
.landing-featured {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.landing-feat-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #f9fafb;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #ececec;
  transition: transform 0.12s, box-shadow 0.12s;
}
.landing-feat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.10); }
.landing-feat-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover; background-position: center;
  background-color: #e5e7eb;
}
.landing-feat-img-camp_ground, .landing-feat-img-auto_camp { background: linear-gradient(135deg, #1e40af, #60a5fa); }
.landing-feat-img-rv_park, .landing-feat-img-car_camp { background: linear-gradient(135deg, #14532d, #4ade80); }
.landing-feat-img-michi_no_eki { background: linear-gradient(135deg, #92400e, #fcd34d); }
.landing-feat-body { padding: 12px 14px 14px; }
.landing-feat-type {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 4px;
  margin-bottom: 6px;
}
.landing-feat-type-camp_ground, .landing-feat-type-auto_camp { background: #dbeafe; color: #1e40af; }
.landing-feat-type-rv_park, .landing-feat-type-car_camp { background: #dcfce7; color: #166534; }
.landing-feat-type-michi_no_eki { background: #fef3c7; color: #92400e; }
.landing-feat-card h3 { margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.landing-feat-card p { margin: 0; font-size: 11px; color: #6b7280; line-height: 1.5; }

/* About features list */
.landing-features {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  gap: 10px;
}
.landing-features li {
  background: #f9fafb;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.6;
}
.landing-features strong {
  display: block;
  color: #111827;
  font-size: 13.5px;
  margin-bottom: 2px;
}

/* Footer */
.landing-footer {
  text-align: center;
  padding: 24px 20px 40px;
  border-top: 1px solid #e5e7eb;
  font-size: 11px;
  color: #6b7280;
  line-height: 1.6;
}
.landing-footer p { margin: 4px 0; }

@media (max-width: 600px) {
  .landing-hero { padding: 40px 20px 36px; }
  .landing-brand-icon { width: 40px; height: 40px; }
  .landing-brand h1 { font-size: 34px; }
  .landing-block { padding: 18px 16px 20px; }
  .landing-search { flex-direction: column; }
  .landing-search button { width: 100%; justify-content: center; padding: 10px; }
}

/* ============= static-page (SEO) styles ============= */
/* These styles are used by /camps/{id}/ pages generated at build time.
   They must work without any JS — crawlers and Reader Mode care. */

body.static-page {
  background: #f7f7f5;
  color: #1f2937;
  font-family: -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  margin: 0;
  line-height: 1.6;
}

.static-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 50;
}
.static-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #111827;
}
.static-brand svg, .static-brand img { width: 28px; height: 36px; }
.static-brand strong {
  display: block; font-size: 17px; font-weight: 800; letter-spacing: -0.01em;
  background: linear-gradient(180deg, #2E6B33, #234E29);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.static-brand em { display: block; font-size: 10px; color: #6b7280; font-style: normal; }
.static-nav a {
  color: #2563eb;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eff6ff;
}
.static-nav a:hover { background: #dbeafe; }

.static-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px 16px 60px;
}

.static-camp .sc-hero {
  margin: 0 -16px 20px;
  height: 280px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  color: white;
  border-radius: 0;
}
.static-camp .sc-hero-camp_ground, .sc-hero-auto_camp { background: linear-gradient(135deg,#1e40af,#60a5fa); }
.static-camp .sc-hero-rv_park, .sc-hero-car_camp { background: linear-gradient(135deg,#14532d,#4ade80); }
.static-camp .sc-hero-michi_no_eki { background: linear-gradient(135deg,#92400e,#fcd34d); }
.sc-hero-inner {
  width: 100%;
  padding: 24px 20px 22px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 100%);
}
.sc-badges { display: flex; gap: 6px; margin-bottom: 8px; }
.sc-badge {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.95);
  color: #1f2937;
}
.sc-badge-camp_ground, .sc-badge-auto_camp { color: #1d4ed8; }
.sc-badge-rv_park, .sc-badge-car_camp { color: #15803d; }
.sc-badge-michi_no_eki { color: #b45309; }
.sc-badge-pref { color: #374151; }

.sc-title {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 4px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  line-height: 1.3;
}
.sc-sub {
  font-size: 12px;
  margin: 0;
  opacity: 0.92;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.sc-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 24px;
}
.sc-fact {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 14px;
}
.sc-fact-wide { grid-column: 1 / -1; }
.sc-fact-k { display: block; font-size: 10px; color: #6b7280; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.sc-fact-v { display: block; font-size: 14px; font-weight: 600; color: #111827; margin-top: 2px; }

.sc-section {
  background: white;
  border: 1px solid #ececec;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.sc-section h2 {
  font-size: 14px;
  font-weight: 700;
  color: #374151;
  letter-spacing: 0.03em;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f3f4f6;
}
.sc-desc { font-size: 14px; line-height: 1.75; color: #1f2937; margin: 0; }

.sc-scores { width: 100%; border-collapse: collapse; font-size: 13px; }
.sc-scores th {
  text-align: left;
  font-weight: 600;
  color: #4b5563;
  padding: 6px 12px 6px 0;
  width: 130px;
  white-space: nowrap;
  vertical-align: middle;
}
.sc-scores td { padding: 6px 0; vertical-align: middle; display: flex; align-items: center; gap: 12px; }
.sc-bar { flex: 1; height: 8px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.sc-bar-fill { height: 100%; border-radius: 999px; }
.sc-bar-fill-1 { background: #ef4444; }
.sc-bar-fill-2 { background: #f97316; }
.sc-bar-fill-3 { background: #eab308; }
.sc-bar-fill-4 { background: #84cc16; }
.sc-bar-fill-5 { background: #16a34a; }
.sc-bar-num { font-size: 12px; color: #6b7280; font-variant-numeric: tabular-nums; min-width: 50px; text-align: right; }

.sc-tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sc-tags li {
  font-size: 11px;
  font-weight: 600;
  background: #f3f4f6;
  color: #374151;
  padding: 4px 12px;
  border-radius: 999px;
}

.sc-signals { width: 100%; border-collapse: collapse; font-size: 13px; }
.sc-signals th { text-align: left; font-weight: 600; color: #6b7280; padding: 6px 12px 6px 0; }
.sc-signals td { padding: 6px 0; }
.sc-signal {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}
.sc-signal-strong { background: #d1fae5; color: #166534; }
.sc-signal-ok     { background: #fef3c7; color: #92400e; }
.sc-signal-weak   { background: #fee2e2; color: #991b1b; }
.sc-signal-none   { background: #fee2e2; color: #991b1b; }

.sc-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sc-photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; background: #f3f4f6; }
.sc-photos a { display: block; }

.sc-reviews { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.sc-reviews li { background: #f9fafb; border-radius: 8px; padding: 12px 14px; }
.sc-review-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.sc-review-stars { color: #f59e0b; font-size: 14px; letter-spacing: 1px; }
.sc-review-name { font-size: 13px; font-weight: 600; color: #374151; }
.sc-reviews time { font-size: 11px; color: #9ca3af; margin-left: auto; }
.sc-review-when { font-size: 11px; color: #6b7280; margin-bottom: 4px; }
.sc-reviews p { margin: 0; font-size: 13px; color: #1f2937; line-height: 1.7; white-space: pre-wrap; }

.sc-addr { font-size: 14px; margin: 0 0 8px; }
.sc-sources { list-style: none; padding: 0; margin: 0; }
.sc-sources li { margin-bottom: 4px; }
.sc-sources a { color: #2563eb; font-size: 12px; word-break: break-all; }

.sc-cta { display: inline-block; margin-top: 8px; color: #2563eb; font-weight: 600; }
.sc-cta:hover { text-decoration: underline; }

.sc-related-list { list-style: none; padding: 0; margin: 0; }
.sc-related-list li { padding: 8px 0; border-bottom: 1px solid #f3f4f6; }
.sc-related-list li:last-child { border-bottom: none; }
.sc-related-list a { color: #1d4ed8; text-decoration: none; font-size: 14px; }
.sc-related-list a:hover { text-decoration: underline; }
.sc-related-list small { color: #6b7280; font-size: 12px; margin-left: 6px; }

.static-footer {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  border-top: 1px solid #e5e7eb;
  font-size: 11px;
  color: #6b7280;
  line-height: 1.6;
}
.static-footer p { margin: 4px 0; }
.static-footer a { color: #2563eb; }
.static-copyright { margin-top: 12px !important; }

@media (max-width: 600px) {
  .static-camp .sc-hero { height: 220px; }
  .sc-title { font-size: 22px; }
  .sc-facts { grid-template-columns: 1fr; }
  .sc-scores th { width: 110px; font-size: 12px; }
}

/* Confidence footer */
.conf {
  margin: 0 16px;
  font-size: 10.5px;
  color: #9ca3af;
  font-style: italic;
  line-height: 1.55;
  padding: 4px 4px;
}

.legend {
  position: fixed; bottom: 12px; left: 12px; z-index: 998;
  background: white; padding: 8px 12px; border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  font-size: 11px; line-height: 1.6;
}
.legend .row { display: flex; align-items: center; gap: 6px; }
.legend .dot { width: 12px; height: 12px; border-radius: 50%; }

/* Below 900px the split view would cramp both halves — use full-screen overlay instead. */
@media (max-width: 900px) {
  #detail            { width: 100vw; }
  #detail.hidden     { right: -110vw; }
  body.detail-open #map { right: 0; }   /* map stays full-width; detail floats over it */
}

@media (max-width: 600px) {
  #topbar { padding: 6px 10px; gap: 6px; }
  #topbar .title { padding: 4px 10px 4px 8px; }
  #topbar .title .brand-name { font-size: 18px; }
  #topbar .title .brand-tagline { font-size: 9.5px; }
  #topbar .title .brand-icon { width: 22px; height: 22px; }
  #topbar .filters { font-size: 11px; }
  #map { top: 92px; }
  #detail { top: 92px; }
  #detail-close { top: 100px; }
}
