/* ==========================================================================
   CAMP TOGETHER · STYLES
   National-park poster meets naturalist's field guide.
   ========================================================================== */

:root {
  /* paper */
  --cream:        #F2E8D5;
  --cream-deep:   #E8DCC0;
  --cream-light:  #F8F1E0;
  --paper-edge:   #D9C9A8;

  /* forest */
  --forest:       #2D4030;
  --forest-dark:  #1A2620;
  --moss:         #5A6B47;
  --moss-light:   #8A9A75;

  /* warm accents */
  --clay:         #C8623E;
  --clay-dark:    #9C4A2D;
  --ochre:        #D89B3D;
  --ochre-light:  #E8B86A;

  /* contrast */
  --navy:         #1A2840;

  /* ink */
  --ink:          #2A2018;
  --ink-soft:     #5A4A38;
  --ink-faint:    #8A7A66;

  /* shadow on paper */
  --shadow-1:     0 1px 0 rgba(42,32,24,0.06), 0 6px 14px rgba(42,32,24,0.08);
  --shadow-2:     0 2px 0 rgba(42,32,24,0.08), 0 18px 32px rgba(42,32,24,0.14);

  /* type */
  --serif:  "Fraunces", "Iowan Old Style", "Hoefler Text", Georgia, serif;
  --sans:   "Jost", "Avenir Next", "Helvetica Neue", system-ui, sans-serif;
  --mono:   "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* --------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* --------------------------------------------------------------- page */
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  background-image:
    /* topographic contour wash, very faint */
    radial-gradient(ellipse 60% 30% at 20% 18%, rgba(45,64,48,0.04), transparent 70%),
    radial-gradient(ellipse 50% 25% at 85% 82%, rgba(200,98,62,0.04), transparent 70%);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* paper grain overlay */
.grain {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: multiply;
  opacity: 0.7;
}

/* ============================================================ masthead */
.masthead {
  position: relative;
  padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.5rem, 5vw, 5rem) 0;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 2px solid var(--forest);
}

/* mountain scene — anchored to bottom of masthead, full width */
.masthead-scene {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  width: 100%;
  height: clamp(280px, 38vw, 460px);
  z-index: -1;
  pointer-events: none;
}

.masthead-inner {
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  padding-bottom: clamp(180px, 28vw, 320px); /* space for the mountains */
  /* Reserve space on the right for the hero illustration. Removed on
     mobile by the @media rule on .masthead-hero. */
  padding-right: clamp(0px, 40vw, 540px);
}

@media (max-width: 760px) {
  .masthead-inner { padding-right: 0; }
}

/* Field-guide hero illustration.
   Desktop: absolutely positioned, vertically centered against the title.
   Mobile: NOT hidden — instead becomes a block-level image above the title
   (rules in the mobile @media block at the bottom of this file). */
.masthead-hero {
  position: absolute;
  /* Lifted further up so the SVG sits clearly above the mountain scene
     and visually anchors closer to the top of the title block. */
  top: 18%;
  right: 0;
  transform: translateY(-50%) rotate(-2deg);
  width: clamp(300px, 38vw, 520px);
  height: auto;
  filter:
    drop-shadow(0 2px 1px rgba(60, 50, 35, 0.05))
    drop-shadow(0 10px 18px rgba(60, 50, 35, 0.15));
  transition: transform 600ms cubic-bezier(0.2, 0.9, 0.2, 1);
  /* Sit BEHIND the bulletin / title / subtitle so text always reads,
     but in front of the masthead-scene mountains. */
  z-index: 1;
  pointer-events: none;
  animation: hero-arrive 900ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

@keyframes hero-arrive {
  from { opacity: 0; transform: translateY(-50%) rotate(-8deg) scale(0.94); }
  to   { opacity: 1; transform: translateY(-50%) rotate(-2deg) scale(1); }
}

.masthead-hero:hover {
  transform: translateY(-50%) rotate(0deg) scale(1.02);
}

/* Ensure the bulletin chip and all masthead text sit above the SVG. */
.masthead-inner > .bulletin,
.masthead-inner > .eyebrow,
.masthead-inner > .title,
.masthead-inner > .subtitle,
.masthead-inner > .metaline,
.masthead-inner > .landing-actions {
  position: relative;
  z-index: 4;
}

/* ============================================================
   TIER-A MOBILE POLISH — fix the obviously broken bits on phone.
   Goal: not embarrassing on a 375px viewport. Not full mobile-first.
   ============================================================ */

@media (max-width: 640px) {

  /* Hero illustration: drop out of absolute positioning, become a block-level
     image at the top of the masthead. This is the most arresting element on
     a phone screen, so we let it lead. */
  .masthead-hero {
    position: static;
    display: block;
    width: 88%;
    max-width: 420px;
    margin: 0 auto 1rem;
    transform: rotate(-2deg);
    animation: hero-arrive-mobile 700ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
  }
  @keyframes hero-arrive-mobile {
    from { opacity: 0; transform: rotate(-6deg) translateY(-12px) scale(0.94); }
    to   { opacity: 1; transform: rotate(-2deg) translateY(0) scale(1); }
  }
  .masthead-hero:hover {
    transform: rotate(0deg) scale(1.02);
  }

  /* No right-side reservation on mobile since the SVG is on top, not beside. */
  .masthead-inner {
    padding-right: 0;
  }

  /* Masthead — let the bulletin chip wrap to a second line if needed,
     and dial down its uppercase letter-spacing so the text actually fits. */
  .bulletin {
    display: inline-flex;
    flex-wrap: wrap;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-align: left;
    padding: 0.5rem 0.85rem;
  }
  .bulletin-text {
    white-space: normal;
  }

  /* Metaline (4 bullets) — stack into rows instead of horizontal */
  .metaline {
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-start;
  }
  .metaline li:not(:first-child) {
    padding-left: 0;
    border-left: none;
  }

  /* Landing CTA stack — vertical buttons, full width.
     Applies to both .landing-actions (top masthead) and .center
     (the secondary "Get started + View live results" pair at bottom
     of the "How this works" section). */
  .landing-actions,
  .center {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .landing-cta {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }
  .landing-secondary {
    display: block;
    margin-left: 0;
    margin-top: 0.2rem;
    text-align: center;
  }

  /* "— 2026 —" line under the title needs breathing room on phone
     where the title's tight line-height crowds it. */
  .title-year {
    margin-top: 1.2rem;
  }

  /* "How it works" cards — give them breathing room for thumbs */
  .join-card {
    padding: 1.2rem 1.1rem;
  }

  /* Form fields tap-friendly — min 44px tall (Apple HIG) */
  .field input,
  .field select,
  .field textarea {
    min-height: 44px;
    font-size: 16px; /* prevents iOS Safari auto-zoom on focus */
  }

  /* Buttons large enough to tap reliably */
  .btn, .cta, button.cta-primary, button.cta-clay, .landing-cta,
  .btn-clay, .btn-primary {
    min-height: 44px;
  }

  /* Campsites browser — drop the 720px min-height on phone; let content size */
  .browser {
    min-height: auto;
    gap: 0.9rem;
  }
  .browser-left {
    grid-template-rows: 280px auto;
    gap: 0.7rem;
  }
  .browser-undermap {
    /* On phone the under-map area can grow naturally instead of scrolling
       inside a fixed-height window. Less awkward than nested scrolling. */
    max-height: 60vh;
  }

  /* Rubric popover — bottom-sheet on phone.
     Anchoring it to the tiny inline-flex .rubric-title-wrap was unreliable;
     instead we lift it out as a viewport-fixed sheet that slides up from
     the bottom. Standard mobile pattern, predictable positioning. */
  .rubric-help {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100vw;
    max-width: 100vw;
    max-height: 78vh;
    overflow-y: auto;
    border-radius: 12px 12px 0 0;
    transform: translateY(100%);
    /* Reset desktop's transform/translateY animation; bottom-sheet uses
       its own slide-up. */
    box-shadow:
      0 -2px 0 rgba(255, 250, 235, 0.7) inset,
      0 -8px 24px rgba(60, 50, 35, 0.18),
      0 -30px 70px rgba(60, 50, 35, 0.14);
    padding: 1.2rem 1.3rem 1.6rem;
  }
  .rubric-help.is-open {
    transform: translateY(0);
  }
  .rubric-help-arrow {
    display: none;
  }
  .rubric-help-row {
    grid-template-columns: 1fr;
    gap: 0.1rem;
    padding: 0.6rem 0;
  }
  /* Visual handle/grip at the top of the sheet, signaling "this slides" */
  .rubric-help::after {
    content: "";
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(74, 58, 46, 0.25);
    border-radius: 2px;
  }
  .rubric-help-head {
    margin-top: 0.5rem;
  }

  /* Dim the page slightly behind the bottom-sheet for focus */
  body:has(.rubric-help.is-open)::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(60, 50, 35, 0.35);
    z-index: 55;
    pointer-events: none;
    animation: rubric-sheet-fade 220ms ease both;
  }
  @keyframes rubric-sheet-fade {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  .rubric-help {
    z-index: 60;
  }

  /* Calendar grid — stack month label above the weekend cells, not beside */
  .cal-month {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .cal-month-label {
    border-right: none;
    border-bottom: 1px dashed var(--paper-edge);
    padding-right: 0;
    padding-bottom: 0.4rem;
    padding-top: 0;
    flex-direction: row;
    align-items: baseline;
    gap: 0.5rem;
  }

  /* Dashboard heatmap — let it scroll horizontally if it doesn't fit */
  .heat-grid {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
  }
  .heat-cell {
    /* Stop cells from squishing too narrow; force horizontal scroll instead */
    min-width: 80px;
  }

  /* Section paddings tighter on phone */
  .section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Note: .form-row already stacks to 1fr via the existing @640px rule
     at line ~1436 — no redundant override needed here. */

  /* Reset-demo floating button shouldn't cover content */
  .reset-link {
    font-size: 0.7rem;
    padding: 0.35rem 0.7rem;
  }
}

/* Very narrow phones — additional belt + suspenders */
@media (max-width: 380px) {
  .title-row-1 { font-size: 2.4rem; }
  .title-row-2 { font-size: 3rem; }
  .subtitle { font-size: 1rem; }
}

/* "bulletin" little chip at very top */
.bulletin {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.85rem;
  background: var(--cream-light);
  border: 1px solid var(--forest);
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
  color: var(--forest);
  margin-bottom: 1.5rem;
}
.bulletin-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 0 0 3px rgba(200,98,62,0.18);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(200,98,62,0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(200,98,62,0.05); }
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-weight: 500;
  color: var(--clay-dark);
}

/* The big stacked title */
.title {
  margin: 0.6rem 0 1.4rem;
  font-family: var(--serif);
  font-weight: 600;
  color: var(--forest-dark);
  line-height: 0.92;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
}
.title-row-1 {
  display: block;
  font-size: clamp(2.8rem, 11vw, 8.8rem);
}
.title-row-2 {
  display: block;
  font-size: clamp(3.4rem, 14vw, 11rem);
  font-weight: 600;
  margin-left: clamp(0.4rem, 6vw, 5rem);
}
.title-row-2 em {
  font-style: italic;
  color: var(--clay);
  font-weight: 400;
  font-variation-settings: "opsz" 144;
}
.title-year {
  display: block;
  margin-top: 0.6rem;
  margin-left: clamp(0.5rem, 4vw, 2.5rem);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.5em;
  color: var(--ink-soft);
}

.subtitle {
  max-width: 32ch;
  margin: 0 0 1.6rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  line-height: 1.45;
  color: var(--ink);
}

.metaline {
  list-style: none;
  padding: 0; margin: 0 0 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.6rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  font-weight: 500;
}
.metaline li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.metaline li::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--ochre);
  transform: rotate(45deg);
}

/* CTAs in masthead */
.ctas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  max-width: 920px;
}
.cta {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1.1rem;
  background: var(--cream-light);
  border: 1.5px solid var(--forest);
  font-weight: 500;
  font-size: 0.94rem;
  color: var(--forest-dark);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  box-shadow: 3px 3px 0 var(--forest);
}
.cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--forest);
  background: #FFF6E0;
}
.cta:active {
  transform: translate(0, 0);
  box-shadow: 1px 1px 0 var(--forest);
}
.cta-num {
  font-family: var(--serif);
  font-weight: 600;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--clay);
  line-height: 1;
  padding-right: 0.7rem;
  border-right: 1px solid var(--paper-edge);
}
.cta-primary {
  background: var(--forest);
  color: var(--cream-light);
  box-shadow: 3px 3px 0 var(--forest-dark);
}
.cta-primary:hover { background: var(--forest-dark); box-shadow: 5px 5px 0 var(--forest-dark); }
.cta-primary .cta-num { color: var(--ochre); border-right-color: rgba(248,241,224,0.25); }
.cta-clay {
  background: var(--clay);
  color: var(--cream-light);
  border-color: var(--clay-dark);
  box-shadow: 3px 3px 0 var(--clay-dark);
}
.cta-clay:hover { background: var(--clay-dark); box-shadow: 5px 5px 0 var(--clay-dark); }
.cta-clay .cta-num { color: var(--ochre-light); border-right-color: rgba(248,241,224,0.25); }


/* ============================================================ sections */
.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 5vw, 5rem);
  position: relative;
  z-index: 2;
}

.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 1.4rem;
  align-items: end;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--forest);
}
.section-num {
  grid-row: 1 / 3;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: var(--clay);
  line-height: 0.85;
  letter-spacing: -0.01em;
  align-self: end;
  font-variation-settings: "opsz" 144;
}
.section-title {
  grid-column: 2;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  color: var(--forest-dark);
  line-height: 1;
  margin: 0;
  letter-spacing: -0.015em;
}
.section-lede {
  grid-column: 2;
  margin: 0.6rem 0 0;
  max-width: 56ch;
  font-size: 1.02rem;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

/* ornament between sections */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  max-width: 720px;
  margin: 1rem auto;
  padding: 0 1.5rem;
}
.ornament-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--moss), transparent);
}

.footnote {
  margin: 1.5rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-style: italic;
}


/* ============================================================ heatmap */
.legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  margin-bottom: 1.2rem;
}
.legend-label { font-weight: 500; }
.swatch {
  width: 22px; height: 14px;
  border: 1px solid rgba(42,32,24,0.18);
}
.swatch.s1 { background: #E5B7A6; }
.swatch.s2 { background: #DDA56A; }
.swatch.s3 { background: #C9B770; }
.swatch.s4 { background: #8FA168; }
.swatch.s5 { background: #4D6B45; }

.heatmap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.heat-month {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  align-items: stretch;
}
.heat-month-label {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--forest-dark);
  padding-top: 0.65rem;
  border-right: 1px dashed var(--paper-edge);
  padding-right: 0.5rem;
  display: flex;
  flex-direction: column;
}
.heat-month-label .month-num {
  font-style: italic;
  font-weight: 400;
  color: var(--clay);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  font-family: var(--sans);
  text-transform: uppercase;
}

.heat-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.6rem;
}

.heat-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.7rem 0.85rem;
  min-height: 88px;
  border: 1.5px solid rgba(42,32,24,0.55);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  font-family: var(--sans);
}
.heat-cell::after {
  /* tiny perforation feel */
  content: "";
  position: absolute;
  left: 6px; right: 6px; top: 22px;
  height: 1px;
  background-image: linear-gradient(to right, currentColor 50%, transparent 50%);
  background-size: 4px 1px;
  opacity: 0.18;
}
.heat-cell:hover, .heat-cell:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--forest);
  z-index: 5;
  outline: none;
}
.heat-cell-date {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  opacity: 0.85;
}
.heat-cell-ratio {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
}
.heat-cell-ratio em {
  font-style: italic;
  font-weight: 400;
  font-size: 0.95rem;
  margin-left: 0.15rem;
  opacity: 0.7;
}
.heat-cell-status {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
  opacity: 0.85;
}

/* color buckets — applied via .b1..b5 */
.heat-cell.b1 { background: #E5B7A6; color: #5A2418; }   /* worst */
.heat-cell.b2 { background: #DDA56A; color: #4A2A10; }
.heat-cell.b3 { background: #C9B770; color: #3D3010; }
.heat-cell.b4 { background: #8FA168; color: #1F2A14; }
.heat-cell.b5 { background: #4D6B45; color: #F2E8D5; }   /* best */

.heat-cell.is-best {
  border-color: var(--forest-dark);
  border-width: 2px;
}
.heat-cell.is-best .heat-cell-status::before {
  content: "★ ";
  color: var(--ochre-light);
}


/* ============================================================ campsites */
.campsite-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.sort-toggle {
  display: inline-flex;
  background: var(--cream-light);
  border: 1.5px solid var(--forest);
  padding: 4px;
  gap: 4px;
}
.sort-toggle button {
  padding: 0.55rem 1rem;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--forest-dark);
  transition: background 0.15s, color 0.15s;
}
.sort-toggle button:hover { background: var(--cream-deep); }
.sort-toggle button.active {
  background: var(--forest);
  color: var(--cream-light);
}
.cta-suggest {
  background: var(--clay);
  color: var(--cream-light);
  border-color: var(--clay-dark);
  box-shadow: 3px 3px 0 var(--clay-dark);
  padding: 0.85rem 1.2rem;
  text-transform: none;
  font-weight: 600;
  display: inline-block;
}
.cta-suggest:hover {
  background: var(--clay-dark);
  transform: translate(-2px,-2px);
  box-shadow: 5px 5px 0 var(--clay-dark);
}

.campsite-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.6rem;
}

.card {
  position: relative;
  background: var(--cream-light);
  border: 1.5px solid var(--forest);
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
}

.card-image {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--cream-deep);
  overflow: hidden;
  border-bottom: 1.5px solid var(--forest);
}
.card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* warm vintage tone */
  filter: saturate(0.85) contrast(1.05) sepia(0.12);
  transition: transform 0.6s ease;
}
.card:hover .card-image img { transform: scale(1.04); }

.card-image::after {
  /* subtle warm wash on photo */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(216,155,61,0.05), rgba(45,64,48,0.18));
  pointer-events: none;
}

/* postage-stamp vote badge */
.vote-badge {
  position: absolute;
  top: 0.85rem; right: 0.85rem;
  background: var(--cream-light);
  border: 2px dashed var(--clay-dark);
  padding: 0.45rem 0.7rem 0.35rem;
  text-align: center;
  font-family: var(--serif);
  color: var(--clay-dark);
  min-width: 64px;
  transform: rotate(3deg);
  box-shadow: 2px 2px 0 rgba(42,32,24,0.18);
}
.vote-badge .vote-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  font-variation-settings: "opsz" 144;
}
.vote-badge .vote-label {
  display: block;
  font-family: var(--sans);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  margin-top: 0.2rem;
  color: var(--clay-dark);
}

.state-tag {
  position: absolute;
  top: 0.85rem; left: 0.85rem;
  background: var(--forest-dark);
  color: var(--cream-light);
  padding: 0.3rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.card-body {
  padding: 1.1rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1;
}
.card-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.1;
  color: var(--forest-dark);
  letter-spacing: -0.01em;
}
.card-region {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--clay-dark);
  font-weight: 600;
}
.card-blurb {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.6rem 0;
  border-top: 1px dashed var(--paper-edge);
  border-bottom: 1px dashed var(--paper-edge);
  margin: 0.2rem 0;
}
.card-stat {
  display: flex;
  flex-direction: column;
  font-size: 0.95rem;
}
.card-stat .stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  font-weight: 600;
}
.card-stat .stat-value {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--forest-dark);
  font-variation-settings: "opsz" 144;
}

.amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.amenity {
  font-size: 0.72rem;
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--moss);
  color: var(--moss);
  background: rgba(90,107,71,0.06);
  letter-spacing: 0.02em;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.6rem;
  font-size: 0.78rem;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-style: italic;
}
.card-foot a {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 600;
  color: var(--clay-dark);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  border-bottom: 1.5px solid var(--clay);
  padding-bottom: 1px;
  transition: color 0.15s;
}
.card-foot a:hover { color: var(--forest-dark); border-color: var(--forest); }


/* ============================================================ groups */
.totals-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 2rem;
  background: var(--forest);
  color: var(--cream-light);
  border: 1.5px solid var(--forest-dark);
  box-shadow: var(--shadow-1);
}
.total-cell {
  flex: 1 1 160px;
  padding: 1rem 1.4rem;
  border-right: 1px solid rgba(248,241,224,0.18);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.total-cell:last-child { border-right: 0; }
.total-cell .total-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ochre-light);
  font-weight: 600;
}
.total-cell .total-value {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1.1;
  font-variation-settings: "opsz" 144;
}
.total-cell .total-value em {
  font-style: italic;
  color: var(--ochre-light);
  font-weight: 400;
  font-size: 1.2rem;
  margin-left: 0.3rem;
}

.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}

.group-card {
  position: relative;
  background: var(--cream-light);
  border: 1.5px solid var(--forest);
  box-shadow: var(--shadow-1);
  padding: 1.4rem 1.5rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  overflow: hidden;
}
/* perforated left edge feel */
.group-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background:
    repeating-linear-gradient(
      to bottom,
      var(--clay) 0 8px,
      transparent 8px 16px
    );
}
.group-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-left: 0.6rem;
}
.group-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--clay-dark);
  font-weight: 600;
}
.group-name {
  margin: 0.15rem 0 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.05;
  color: var(--forest-dark);
  font-variation-settings: "opsz" 144;
}
.group-name em {
  font-style: italic;
  font-weight: 400;
  color: var(--clay);
}

.group-stamp {
  flex-shrink: 0;
  width: 64px; height: 64px;
  border: 1.5px solid var(--forest);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  color: var(--forest);
  transform: rotate(-8deg);
  background: rgba(45,64,48,0.04);
}
.group-stamp .stamp-num {
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
}
.group-stamp .stamp-label {
  font-family: var(--sans);
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  margin-top: 0.1rem;
}

.group-contact {
  padding-left: 0.6rem;
  font-size: 0.92rem;
}
.group-contact .contact-name {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink);
  font-weight: 400;
}
.group-contact .contact-phone {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-left: 0.5rem;
}

.group-attrs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-left: 0.6rem;
}
.attr {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  background: var(--cream-deep);
  border: 1px solid var(--paper-edge);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--forest-dark);
}
.attr svg { width: 14px; height: 14px; }
.attr.attr-car-yes { background: rgba(90,107,71,0.15); border-color: var(--moss); color: var(--forest-dark); }
.attr.attr-car-no  { background: rgba(200,98,62,0.10); border-color: var(--clay); color: var(--clay-dark); }

.group-notes {
  padding-left: 0.6rem;
  margin: 0.2rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.group-members {
  padding-left: 0.6rem;
  font-size: 0.78rem;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
  border-top: 1px dashed var(--paper-edge);
  padding-top: 0.6rem;
  margin-top: 0.2rem;
}
.group-members strong {
  color: var(--forest);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  display: block;
  margin-bottom: 0.25rem;
}


/* ============================================================ tooltip */
.tooltip {
  position: absolute;
  z-index: 100;
  background: var(--forest-dark);
  color: var(--cream-light);
  padding: 0.7rem 0.9rem;
  font-size: 0.86rem;
  line-height: 1.4;
  max-width: 260px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 8px 22px rgba(0,0,0,0.25);
  border-left: 3px solid var(--clay);
}
.tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}
.tooltip strong {
  display: block;
  font-family: var(--serif);
  font-size: 1rem;
  margin-bottom: 0.3rem;
  color: var(--ochre-light);
}
.tooltip ul {
  margin: 0; padding-left: 1.1rem;
}
.tooltip li { margin: 0.1rem 0; }
.tooltip .tooltip-empty {
  font-style: italic;
  color: var(--ochre-light);
}


/* ============================================================ footer */
.footer {
  background: var(--forest-dark);
  color: var(--cream-deep);
  padding: 2.5rem 1.5rem;
  margin-top: 3rem;
  position: relative;
  z-index: 2;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
}
.footer-text {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--cream);
  opacity: 0.75;
  max-width: 36ch;
}


/* ============================================================ small screens */
@media (max-width: 720px) {
  .heat-month {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .heat-month-label {
    border-right: 0;
    border-bottom: 1px dashed var(--paper-edge);
    padding-bottom: 0.4rem;
    flex-direction: row;
    align-items: baseline;
    gap: 0.5rem;
  }
  .heat-row {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }
  .ctas { grid-template-columns: 1fr; }
  .campsite-controls { flex-direction: column; align-items: stretch; }
  .sort-toggle { justify-content: center; }
}


/* ============================================================ entrance animations */
@media (prefers-reduced-motion: no-preference) {
  .masthead-inner > * {
    opacity: 0;
    animation: rise 0.7s ease-out forwards;
  }
  .bulletin   { animation-delay: 0.05s; }
  .eyebrow    { animation-delay: 0.15s; }
  .title      { animation-delay: 0.25s; }
  .subtitle   { animation-delay: 0.45s; }
  .metaline   { animation-delay: 0.55s; }
  .ctas       { animation-delay: 0.65s; }

  .heat-cell, .card, .group-card {
    animation: fadeIn 0.5s ease-out backwards;
  }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ##########################################################################
   ##  SURVEY-APP STYLES                                                   ##
   ##  page header, progress, forms, calendar input, rank picker, map      ##
   ########################################################################## */

/* ============================================================ page header */
.page-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(242, 232, 213, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--paper-edge);
}
.page-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.75rem clamp(1rem, 4vw, 2.5rem);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--forest-dark);
}
.brand em { font-style: italic; color: var(--clay); font-weight: 400; }
.brand:hover { color: var(--clay); }

/* progress dots */
.progress {
  list-style: none; margin: 0; padding: 0;
  display: flex;
  align-items: center;
  gap: 0;
  justify-self: center;
}
.progress-step {
  display: flex;
  align-items: center;
}
.progress-step + .progress-step::before {
  content: "";
  width: clamp(20px, 4vw, 60px);
  height: 1px;
  background: var(--paper-edge);
  margin: 0 0.4rem;
}
.progress-step a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.4rem;
}
.progress-step .dot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--paper-edge);
  background: var(--cream-light);
  color: var(--ink-faint);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 0.78rem;
  font-style: italic;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.progress-step .step-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--ink-faint);
}
.progress-step.is-current .dot {
  background: var(--forest);
  border-color: var(--forest-dark);
  color: var(--cream-light);
  transform: scale(1.15);
  box-shadow: 0 0 0 4px rgba(45,64,48,0.12);
}
.progress-step.is-current .step-label { color: var(--forest-dark); }
.progress-step.is-done .dot {
  background: var(--clay);
  border-color: var(--clay-dark);
  color: var(--cream-light);
}
.progress-step.is-done .dot .dot-num::before {
  content: "✓";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--clay);
  color: var(--cream-light);
  font-style: normal;
  font-size: 0.95rem;
  border-radius: 50%;
}
.progress-step.is-done .step-label { color: var(--clay-dark); }
.progress-step.is-future a { pointer-events: none; opacity: 0.7; }

@media (max-width: 720px) {
  .progress-step .step-label { display: none; }
}

/* who chip */
.who-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.5rem 0.35rem 0.85rem;
  background: var(--cream-light);
  border: 1.5px solid var(--forest);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--forest-dark);
}
.who-chip .who-group { color: var(--ink-faint); font-weight: 400; }
.who-chip .who-out {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--cream-deep);
  color: var(--clay-dark);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.who-chip .who-out:hover { background: var(--clay); color: var(--cream-light); }
.who-chip-empty {
  background: var(--clay);
  color: var(--cream-light);
  border: 1.5px solid var(--clay-dark);
  padding: 0.45rem 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
}

/* ============================================================ survey wrapper */
.survey {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 5vw, 3rem) 4rem;
  position: relative;
  z-index: 2;
}
.survey-eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-weight: 500;
  color: var(--clay-dark);
  margin: 0 0 0.6rem;
}
.survey-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  line-height: 1.05;
  color: var(--forest-dark);
  margin: 0 0 0.6rem;
  letter-spacing: -0.015em;
}
.survey-title em { font-style: italic; color: var(--clay); font-weight: 400; }
.survey-lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 0 2.5rem;
  line-height: 1.5;
}

/* ============================================================ form fields */
.form {
  display: grid;
  gap: 1.5rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.field-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--forest-dark);
}
.field-hint {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-top: -0.15rem;
}
.field input,
.field select,
.field textarea {
  font: inherit;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--cream-light);
  border: 1.5px solid var(--paper-edge);
  padding: 0.65rem 0.85rem;
  border-radius: 0;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(45,64,48,0.15);
}
.field textarea { resize: vertical; min-height: 90px; }

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--forest); }

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 1.4rem;
  border: 1.5px solid var(--forest);
  background: var(--cream-light);
  color: var(--forest-dark);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--forest);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--forest);
  background: #FFF6E0;
}
.btn:active { transform: translate(0,0); box-shadow: 1px 1px 0 var(--forest); }
.btn-primary {
  background: var(--forest);
  color: var(--cream-light);
  box-shadow: 3px 3px 0 var(--forest-dark);
}
.btn-primary:hover { background: var(--forest-dark); box-shadow: 5px 5px 0 var(--forest-dark); }
.btn-clay {
  background: var(--clay);
  color: var(--cream-light);
  border-color: var(--clay-dark);
  box-shadow: 3px 3px 0 var(--clay-dark);
}
.btn-clay:hover { background: var(--clay-dark); box-shadow: 5px 5px 0 var(--clay-dark); }
.btn-link {
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--paper-edge);
  text-underline-offset: 4px;
  padding: 0.5rem 0;
  font-weight: 500;
}
.btn-link:hover { color: var(--clay-dark); transform: none; box-shadow: none; background: none; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.save-status {
  font-size: 0.78rem;
  color: var(--moss);
  font-style: italic;
  font-family: var(--serif);
  opacity: 0;
  transition: opacity 0.3s;
}
.save-status.visible { opacity: 1; }
.save-status::before { content: "✓ "; color: var(--moss); }

/* ============================================================ join page */
.join-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: stretch;
}
@media (max-width: 720px) {
  .join-grid { grid-template-columns: 1fr; }
}
.join-card {
  background: var(--cream-light);
  border: 1.5px solid var(--forest);
  box-shadow: var(--shadow-1);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.join-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--forest-dark);
}
.join-card h3 em { font-style: italic; color: var(--clay); font-weight: 400; }
.join-card p {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
}
.join-existing-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 320px;
  overflow-y: auto;
}
.join-pick {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  padding: 0.7rem 1rem;
  background: var(--cream-deep);
  border: 1px solid var(--paper-edge);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--forest-dark);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.join-pick:hover { background: var(--ochre-light); border-color: var(--clay); }
.join-pick .pick-group {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--clay-dark);
  font-weight: 600;
}

/* ============================================================ calendar input */
.cal-mode {
  display: inline-flex;
  background: var(--cream-light);
  border: 1.5px solid var(--forest);
  padding: 4px;
  gap: 4px;
  margin-bottom: 1.5rem;
}
.cal-mode button {
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--forest-dark);
  transition: background 0.15s, color 0.15s;
}
.cal-mode button.active {
  background: var(--forest);
  color: var(--cream-light);
}

.cal-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  user-select: none;
  -webkit-user-select: none;
}
.cal-month {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
}
.cal-month-label {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--forest-dark);
  padding-top: 0.65rem;
  border-right: 1px dashed var(--paper-edge);
  padding-right: 0.5rem;
  display: flex;
  flex-direction: column;
}
.cal-month-label .month-num {
  font-style: italic;
  font-weight: 400;
  color: var(--clay);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  font-family: var(--sans);
  text-transform: uppercase;
}
.cal-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
}

.cal-cell {
  position: relative;
  padding: 0.7rem 0.85rem;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1.5px solid rgba(42,32,24,0.4);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
  background: var(--cream-light);
  color: var(--ink);
}
.cal-cell:hover { background: var(--cream-deep); }
.cal-cell-date {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  opacity: 0.85;
}
.cal-cell-status {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  font-style: italic;
}
.cal-cell-icon {
  align-self: flex-end;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  line-height: 1;
}
/* states */
.cal-cell.is-blocked {
  background: #C8623E;
  color: var(--cream-light);
  border-color: var(--clay-dark);
}
.cal-cell.is-blocked .cal-cell-icon::before { content: "✕"; }
.cal-cell.is-free {
  background: #4D6B45;
  color: var(--cream-light);
  border-color: var(--forest-dark);
}
.cal-cell.is-free .cal-cell-icon::before { content: "✓"; }
.cal-cell.is-dragging-over {
  transform: scale(0.98);
  box-shadow: 0 0 0 3px var(--ochre) inset;
}

.cal-help {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-faint);
  font-size: 0.92rem;
  margin: 0.5rem 0 1.5rem;
}

/* ============================================================ rank picker */
.rank-summary {
  background: var(--cream-light);
  border: 1.5px solid var(--forest);
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.8rem;
  box-shadow: var(--shadow-1);
}
.rank-summary h3 {
  margin: 0 0 0.8rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--forest-dark);
}
.rank-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}
@media (max-width: 640px) {
  .rank-slots { grid-template-columns: 1fr; }
}
.rank-slot {
  position: relative;
  background: var(--cream-deep);
  border: 1.5px dashed var(--paper-edge);
  padding: 0.85rem;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.rank-slot.is-filled {
  background: var(--cream-light);
  border-style: solid;
  border-color: var(--forest);
}
.rank-slot .slot-num {
  font-family: var(--serif);
  font-weight: 600;
  font-style: italic;
  font-size: 1.4rem;
  color: var(--clay);
  line-height: 1;
}
.rank-slot .slot-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--forest-dark);
  line-height: 1.2;
}
.rank-slot .slot-empty {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-faint);
  font-size: 0.92rem;
  margin-top: 0.4rem;
}
.rank-slot .slot-remove {
  position: absolute;
  top: 6px; right: 6px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--clay);
  color: var(--cream-light);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
}
.rank-slot.is-filled .slot-remove { display: inline-flex; }

/* ============================================================ campsite browser */
.browser {
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: 1.4rem;
  margin-bottom: 1.4rem;
  align-items: stretch;
  min-height: 720px;
}

/* Left column: map at top (taller), thumbnails fill the rest. */
.browser-left {
  display: grid;
  grid-template-rows: 2fr 2fr;
  gap: 0.9rem;
  min-height: 0;
}

@media (max-width: 880px) {
  .browser { grid-template-columns: 1fr; }
  .browser-left { grid-template-rows: 320px auto; }
}

.browser-map {
  border: 1.5px solid var(--forest);
  background: var(--cream-deep);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-1);
  min-height: 0;
}

/* Scrollable mini-poster grid under the map. The .browser-poster on the
   right column determines the total left-column height; this area scrolls
   when there are more thumbnails than fit. */
.browser-undermap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.7rem;
  overflow-y: auto;
  align-content: start;
  padding-right: 0.3rem;
  min-height: 0;
}

/* Off-map sites: same visual treatment as in-map sites. The "off map"
   note in the score line is the only signal. */

/* Scrollbar styling for the under-map grid */
.browser-undermap::-webkit-scrollbar {
  width: 8px;
}
.browser-undermap::-webkit-scrollbar-track {
  background: transparent;
}
.browser-undermap::-webkit-scrollbar-thumb {
  background: rgba(60, 50, 35, 0.2);
  border-radius: 4px;
}
.browser-undermap::-webkit-scrollbar-thumb:hover {
  background: rgba(60, 50, 35, 0.35);
}

.browser-poster .poster-empty {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-faint);
  text-align: center;
  padding: 4rem 1rem;
}
.poster-card {
  height: 100%;
  /* Override .card's overflow:hidden so the rubric popover can escape. */
  overflow: visible;
}
.poster-action {
  margin-top: 0.7rem;
}
.poster-action .cta {
  width: 100%;
  justify-content: center;
}

/* leaflet div-icon dot */
.map-dot-wrap { background: transparent !important; border: 0 !important; }
.map-dot {
  position: relative;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.map-dot .dot-core {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--clay);
  border: 2px solid var(--cream-light);
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  transition: transform 0.18s ease, background 0.18s ease;
}
.map-dot.dot-tier-3 .dot-core { background: #6E2014; }   /* most votes */
.map-dot.dot-tier-2 .dot-core { background: var(--clay-dark); }
.map-dot.dot-tier-1 .dot-core { background: var(--clay); }
.map-dot.dot-tier-0 .dot-core { background: var(--moss); } /* no votes yet */
.map-dot:hover .dot-core { transform: scale(1.25); }
.map-dot .dot-score {
  position: absolute;
  top: -10px; right: -12px;
  background: var(--forest-dark);
  color: var(--cream-light);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.7rem;
  padding: 1px 6px;
  border: 1px solid var(--cream-light);
  border-radius: 999px;
  line-height: 1.2;
  pointer-events: none;
}
.map-dot.is-selected .dot-core {
  transform: scale(1.4);
  box-shadow: 0 0 0 5px rgba(216, 155, 61, 0.55), 0 2px 8px rgba(0,0,0,0.35);
}
.map-dot .dot-pulse {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
  pointer-events: none;
}
.map-dot.is-selected .dot-pulse {
  color: var(--ochre);
  animation: dotPulse 1.6s ease-out infinite;
}
@keyframes dotPulse {
  0%   { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* thumbnail strip below the map */
.thumb-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}
.thumb {
  display: flex;
  align-items: stretch;
  gap: 0.7rem;
  text-align: left;
  background: var(--cream-light);
  border: 1.5px solid var(--paper-edge);
  padding: 0.4rem;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
  font-family: var(--sans);
}
.thumb:hover { border-color: var(--forest); transform: translateY(-2px); }
.thumb.is-selected {
  border-color: var(--clay);
  background: var(--cream-deep);
  box-shadow: 2px 2px 0 var(--clay);
}
.thumb.is-ranked { border-color: var(--ochre); }
.thumb.is-ranked .thumb-meta::after {
  content: "★";
  color: var(--ochre);
  margin-left: 0.4rem;
}
.thumb-img {
  flex-shrink: 0;
  width: 60px; height: 60px;
  background-size: cover;
  background-position: center;
  background-color: var(--moss-light);
  filter: saturate(0.9) sepia(0.1);
  border: 1px solid var(--paper-edge);
}
.thumb-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.85rem;
  flex: 1;
  min-width: 0;
}
.thumb-state {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--clay-dark);
}
.thumb-name {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--forest-dark);
  font-size: 0.92rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thumb-score {
  font-size: 0.72rem;
  color: var(--ink-faint);
}

/* ============================================================ landing CTA  */
.landing-cta {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 2rem;
  background: var(--clay);
  color: var(--cream-light);
  border: 2px solid var(--clay-dark);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
  box-shadow: 5px 5px 0 var(--clay-dark);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.landing-cta:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 var(--clay-dark);
}
.landing-cta-arrow {
  font-size: 1.6rem;
  line-height: 1;
}
.landing-secondary {
  display: inline-block;
  margin-left: 1.2rem;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.95rem;
  text-decoration: underline;
  text-decoration-color: var(--paper-edge);
  text-underline-offset: 4px;
}
.landing-secondary:hover { color: var(--clay-dark); }

/* ============================================================ utilities */
.spacer-1 { height: 1rem; }
.spacer-2 { height: 2rem; }
.center { text-align: center; }
.muted  { color: var(--ink-faint); }

.reset-link {
  position: fixed;
  bottom: 8px; right: 12px;
  font-size: 0.7rem;
  color: var(--ink-faint);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--paper-edge);
  padding: 4px 6px;
  z-index: 10;
}
.reset-link:hover { color: var(--clay-dark); }


/* ============================================================
   Suggest-a-campsite: prefill block, LLM badges, banners
   ============================================================ */

.prefill-block {
  background: rgba(60, 50, 35, 0.04);
  border: 1px dashed rgba(60, 50, 35, 0.25);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.4rem;
}

.prefill-status {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  min-height: 1.2em;
  font-style: italic;
}

.prefill-status-loading { color: #6b5b3e; }
.prefill-status-loading::after { content: " …"; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }

.prefill-status-error { color: #8b2f1a; font-style: normal; }
.prefill-status-ok    { color: #3e6b3b; font-style: normal; }

.llm-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #4a3a72;
  background: rgba(74, 58, 114, 0.1);
  padding: 0.05em 0.4em;
  border-radius: 3px;
  margin-left: 0.3em;
  vertical-align: middle;
  text-transform: none;
}

.drive-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.drive-row input { flex: 1; }

.autocut-banner {
  background: #fef0e3;
  border: 1px solid #d89b3d;
  color: #7a4615;
  padding: 0.7rem 1rem;
  border-radius: 5px;
  margin: 1rem 0;
  font-size: 0.92rem;
}

.confidence-chip {
  display: inline-block;
  font-size: 0.78rem;
  color: #6b6660;
  background: rgba(60, 50, 35, 0.06);
  padding: 0.15em 0.6em;
  border-radius: 12px;
  margin: 0.6rem 0;
}

/* ============================================================
   Rubric breakdown on the poster card
   ============================================================ */

.rubric {
  margin: 1.4rem 0 1rem;
  padding: 0.9rem 1rem;
  background: rgba(60, 50, 35, 0.03);
  border-radius: 5px;
  border: 1px solid rgba(60, 50, 35, 0.08);
  /* No `position: relative` here — popover anchors to the title-wrap span
     so it sits directly below the "Rubric" word, not the whole block. */
}

.rubric-title-wrap {
  position: relative;
  display: inline-flex;
  align-items: baseline;
}

.rubric-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.7rem;
  border-bottom: 1px solid rgba(60, 50, 35, 0.12);
  padding-bottom: 0.4rem;
}

/* The "Rubric" word is now a button that opens the help popover. Restyle so
   it doesn't look like a default <button> but signals interactivity. */
.rubric-title {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: "Fraunces", serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: #4a3a2e;
  text-decoration: underline dotted rgba(74, 58, 46, 0.35);
  text-underline-offset: 3px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.rubric-title:hover,
.rubric-title:focus-visible {
  color: #2d4030;
  text-decoration-color: #4d5f44;
  outline: none;
}

.rubric-title-mark {
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  line-height: 0.85em;
  text-align: center;
  font-size: 0.7em;
  font-weight: 400;
  font-family: "Jost", sans-serif;
  border: 1px solid rgba(74, 58, 46, 0.4);
  border-radius: 50%;
  color: #6b5b3e;
  transform: translateY(-0.05em);
  transition: transform 200ms ease, border-color 160ms ease, color 160ms ease;
}

.rubric-title[aria-expanded="true"] .rubric-title-mark {
  transform: translateY(-0.05em) rotate(45deg);
  border-color: #4d5f44;
  color: #4d5f44;
}

.rubric-total {
  font-family: "Fraunces", serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: #4a3a2e;
}

.rubric-row {
  display: grid;
  grid-template-columns: 1fr 90px 30px;
  align-items: center;
  gap: 0.6rem;
  padding: 0.18rem 0;
  font-size: 0.88rem;
}

.rubric-bar {
  height: 8px;
  background: rgba(60, 50, 35, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.rubric-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c8a6a, #4d5f44);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.rubric-label {
  color: #6b5b3e;
  text-transform: lowercase;
}

.rubric-bar, .rubric-val {
  cursor: help;
}

.rubric-val {
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-weight: 500;
  color: #4a3a2e;
}

.rubric-meta-wrap {
  margin-top: 0.7rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(60, 50, 35, 0.12);
}

.rubric-meta {
  font-size: 0.85rem;
  color: #6b6660;
  padding: 0.15rem 0;
}

.rubric-autocut {
  background: #fce5e0;
  border: 1px solid #c45f3e;
  color: #7a2f1a;
  padding: 0.5rem 0.7rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
}

.rubric-confidence {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: #6b6660;
  font-style: italic;
}

/* ============================================================
   Rubric help popover — field-guide annotation card
   Triggered by clicking the "Rubric" word.
   ============================================================ */

.rubric-help {
  position: absolute;
  /* Sit directly under the "Rubric" word with a tiny gap. */
  top: calc(100% + 0.5rem);
  left: 0;
  z-index: 60;
  /* Force the popover to size itself, not be constrained by the tiny
     inline-flex parent. */
  width: 420px;
  max-width: min(420px, 90vw);
  padding: 1.2rem 1.4rem 1.3rem;
  background: linear-gradient(180deg, #f8f0dd 0%, #f2e6c9 100%);
  color: #3a2e22;
  border: 1px solid rgba(74, 58, 46, 0.18);
  border-radius: 6px;
  box-shadow:
    0 1px 0 rgba(255, 250, 235, 0.7) inset,
    0 2px 4px rgba(60, 50, 35, 0.08),
    0 10px 30px rgba(60, 50, 35, 0.18),
    0 30px 70px rgba(60, 50, 35, 0.10);
  font-family: "Jost", sans-serif;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 220ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  text-align: left;
  white-space: normal;
}

.rubric-help.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Subtle paper texture using a layered gradient */
.rubric-help::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background:
    radial-gradient(circle at 20% 30%, rgba(74, 58, 46, 0.04), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(74, 58, 46, 0.03), transparent 55%);
  pointer-events: none;
}

/* The arrow / notch that points back at the "Rubric" word.
   The wrap anchors at left:0, so the arrow sits ~halfway under the word. */
.rubric-help-arrow {
  position: absolute;
  top: -7px;
  left: 18px;
  width: 14px;
  height: 14px;
  background: #f8f0dd;
  border-top: 1px solid rgba(74, 58, 46, 0.18);
  border-left: 1px solid rgba(74, 58, 46, 0.18);
  transform: rotate(45deg);
}

.rubric-help-head {
  margin-bottom: 0.9rem;
  position: relative;
}

.rubric-help-eyebrow {
  display: inline-block;
  font-family: "Jost", sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #8b7355;
  margin-bottom: 0.35rem;
}

.rubric-help-title {
  font-family: "Fraunces", serif;
  font-size: 1.15rem;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.005em;
  color: #2d4030;
  margin: 0 0 0.35rem;
  line-height: 1.2;
}

.rubric-help-lede {
  font-size: 0.82rem;
  line-height: 1.45;
  color: #5b4d3a;
  margin: 0;
}

.rubric-help-list {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.rubric-help-row {
  display: grid;
  grid-template-columns: 9.5em 1fr;
  gap: 0.7rem;
  align-items: baseline;
  padding: 0.45rem 0;
  border-top: 1px dotted rgba(74, 58, 46, 0.18);
  font-size: 0.83rem;
}

.rubric-help-row:first-child {
  border-top: none;
}

.rubric-help-key {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.rubric-help-label {
  font-family: "Fraunces", serif;
  font-weight: 600;
  color: #2d4030;
  font-size: 0.92rem;
}

.rubric-help-weight {
  font-family: "Jost", sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #8b7355;
  text-transform: uppercase;
}

.rubric-help-desc {
  color: #4a3a2e;
  line-height: 1.45;
}

.rubric-help-divider {
  text-align: center;
  letter-spacing: 0.4em;
  color: rgba(74, 58, 46, 0.4);
  margin: 0.9rem -0.3rem 0.7rem;
  font-size: 0.7rem;
}

.rubric-help-cuts-title {
  font-family: "Fraunces", serif;
  font-size: 0.82rem;
  font-weight: 600;
  font-style: italic;
  color: #7a4615;
  margin-bottom: 0.3rem;
  letter-spacing: 0.02em;
}

.rubric-help-cuts ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rubric-help-cuts li {
  font-size: 0.78rem;
  color: #5b4d3a;
  padding: 0.15rem 0 0.15rem 1rem;
  position: relative;
  line-height: 1.45;
}

.rubric-help-cuts li::before {
  content: "✗";
  position: absolute;
  left: 0;
  color: #c45f3e;
  font-size: 0.75rem;
  top: 0.15rem;
}

/* Narrow screens: take more of the poster width */
@media (max-width: 560px) {
  .rubric-help {
    width: calc(100% - 1.2rem);
    left: 0.6rem;
    padding: 1rem 1.1rem;
  }
  .rubric-help-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* ============================================================
   Mobile overrides — REPLAY at end of file so source order wins
   over the desktop .rubric-help rules above.
   ============================================================ */
@media (max-width: 640px) {
  .rubric-help {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: 78vh !important;
    overflow-y: auto !important;
    border-radius: 12px 12px 0 0 !important;
    transform: translateY(100%);
    box-shadow:
      0 -2px 0 rgba(255, 250, 235, 0.7) inset,
      0 -8px 24px rgba(60, 50, 35, 0.18),
      0 -30px 70px rgba(60, 50, 35, 0.14) !important;
    padding: 1.4rem 1.3rem 1.8rem !important;
    z-index: 60 !important;
  }
  .rubric-help.is-open {
    transform: translateY(0);
  }
  .rubric-help-arrow {
    display: none !important;
  }
  .rubric-help::before {
    /* Disable the desktop subtle radial-paper texture inside the bottom-sheet
       so the slide-up animation doesn't reveal a misaligned ::before layer. */
    display: none;
  }
  .rubric-help::after {
    content: "";
    position: absolute;
    top: 0.55rem;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 4px;
    background: rgba(74, 58, 46, 0.28);
    border-radius: 2px;
  }
}
