/* ====================================================================
   Omri's birthday zine — Hebrew RTL, warm paper palette, scroll-snap-ready
   ==================================================================== */

:root {
  --paper:     #fdf6ec;
  --paper-2:   #f5ead2;
  --ink:       #1f1c19;
  --ink-soft:  #4a4036;
  --ink-mute:  #8a7d6c;
  --terra:     #b04a23;
  --sky:       #2a5d8f;
  --dune:      #d9a96b;
  --rule:      #1f1c19;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Heebo", system-ui, sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Scroll-snap is opt-in per section, ready for Day 2 when sections fill out. */
.hero, .horizon-section {
  scroll-snap-align: start;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 540px;
  overflow: hidden;
}
.hero-map {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 1;
}
.hero-map::after {
  /* Soft vignette so the headline reads cleanly over the satellite imagery. */
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 35%, rgba(0,0,0,0.55) 100%),
    linear-gradient(to top, rgba(0,0,0,0.35), rgba(0,0,0,0) 30%);
  pointer-events: none;
}
.hero-overlay {
  position: absolute;
  z-index: 2;
  inset-block-end: 8vh;
  inset-inline-start: 6vw;
  color: #fdf6ec;
  text-shadow: 0 2px 8px rgba(0,0,0,0.55);
  max-width: 80vw;
}
.hero-title {
  font-family: "Heebo", sans-serif;
  font-weight: 900;
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  margin: 0 0 0.2em 0;
  letter-spacing: -0.01em;
}
.hero-tagline {
  /* The personal one-liner from Efrat — slightly smaller than the headline,
     warm tone, italic-leaning weight. Wraps naturally on small screens. */
  font-family: "Heebo", sans-serif;
  font-size: clamp(1.15rem, 2.7vw, 1.85rem);
  font-weight: 500;
  font-style: normal;
  margin: 0 0 0.6em 0;
  line-height: 1.4;
  max-width: 38em;
  color: #fff3e0;
  opacity: 0.95;
}
.hero-subtitle {
  font-size: clamp(1.0rem, 2.1vw, 1.4rem);
  font-weight: 400;
  opacity: 0.85;
  margin: 0 0 0.6em 0;
}
.hero-coords {
  font-size: 0.85rem;
  opacity: 0.75;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

/* ============ Horizon section ============ */
.horizon-section {
  max-width: 920px;
  margin: 0 auto;
  padding: 12vh 6vw 6vh;
  text-align: center;
}
.section-title {
  font-family: "Heebo", sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin: 0 0 0.4em 0;
  color: var(--ink);
}
.section-caption {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin: 0 auto 2.2rem;
  max-width: 36em;
}
.horizon-plot {
  width: 100%;
  min-height: 520px;
}
.section-footnote {
  font-size: 0.85rem;
  color: var(--ink-mute);
  margin-top: 0.6rem;
}

/* ============ Footer ============ */
.footer {
  text-align: center;
  padding: 3rem 1.5rem 4rem;
  color: var(--ink-mute);
  font-size: 0.9rem;
  border-top: 1px solid rgba(31, 28, 25, 0.08);
  margin-top: 2rem;
  max-width: 60em;
  margin-inline: auto;
  line-height: 1.55;
}
.footer-line {
  margin: 0.5em 0;
}
.footer-signature {
  font-weight: 600;
  color: var(--ink, #1f1c19);
  font-size: 1rem;
}
.footer-sources {
  font-size: 0.78rem;
  opacity: 0.72;
}
.footer-thanks {
  margin-top: 1.2em;
  font-style: normal;
  max-width: 38em;
  margin-inline: auto;
  font-size: 0.92rem;
}
.footer-built {
  font-size: 0.72rem;
  opacity: 0.5;
  margin-top: 1.2em;
}

/* ============ Section heads ============ */
.section-head {
  text-align: center;
  margin-bottom: 2rem;
}

/* ============ "Now" cards ============ */
.now-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8vh 5vw 6vh;
}
.now-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--paper-2);
  border: 1px solid rgba(31, 28, 25, 0.08);
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: 0 1px 0 rgba(31, 28, 25, 0.03);
}
.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.8rem 0;
  color: var(--ink);
}
.card-meta {
  font-size: 0.82rem;
  color: var(--ink-mute);
  margin: 0.8rem 0 0 0;
}
.card-fallback {
  color: var(--ink-mute);
  font-style: italic;
  margin: 0;
}

.weather-row {
  display: flex;
  gap: 1.2rem;
  align-items: flex-end;
  flex-wrap: wrap;
}
.weather-metric { display: flex; flex-direction: column; }
.weather-value {
  font-size: 1.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--terra);
}
.weather-label {
  font-size: 0.82rem;
  color: var(--ink-mute);
}

.sun-row {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.sun-metric { display: flex; flex-direction: column; min-width: 9rem; }
.sun-label { font-size: 0.85rem; color: var(--ink-mute); }
.sun-value {
  font-size: 1.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.sun-delta {
  font-size: 0.82rem;
  margin-top: 0.2rem;
  display: inline-block;
}
.sun-delta--early { color: var(--terra); font-weight: 500; }
.sun-delta--late { color: var(--sky); font-weight: 500; }

.moon-row {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.moon-svg {
  border-radius: 50%;
  background: #0b0d18;
}
.moon-meta { display: flex; flex-direction: column; gap: 0.2rem; }
.moon-name { font-weight: 700; font-size: 1.05rem; }
.moon-pct {
  font-size: 0.9rem;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}

.iss-when {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 0.3rem 0;
  font-variant-numeric: tabular-nums;
}
.iss-detail {
  color: var(--ink-soft);
  margin: 0;
}

.week-bullets {
  margin: 0;
  padding-inline-start: 1.2rem;
  list-style: disc;
}
.week-bullets li {
  margin-bottom: 0.5rem;
  line-height: 1.45;
}

/* ============ Yard section ============ */
.yard-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8vh 5vw 6vh;
}
.yard-map {
  width: 100%;
  height: 420px;
  border-radius: 14px;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(31, 28, 25, 0.1);
}
.yard-subtitle {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 1.8rem 0 1rem 0;
  text-align: center;
}
.yard-chart {
  width: 100%;
  min-height: 360px;
}
.zone-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.zone-card {
  background: var(--paper-2);
  border: 1px solid rgba(31, 28, 25, 0.08);
  border-inline-start: 6px solid var(--zone-color, var(--terra));
  border-radius: 12px;
  padding: 1rem 1.2rem 1.2rem;
}
.zone-card-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}
.zone-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--zone-color, var(--terra));
}
.zone-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}
.zone-hours {
  margin: 0.4rem 0;
  font-variant-numeric: tabular-nums;
}
.zone-facing {
  font-size: 0.85rem;
  color: var(--ink-mute);
  margin: 0.2rem 0;
}
.zone-notes {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin: 0.5rem 0;
}
.zone-suggest {
  font-size: 0.92rem;
  color: var(--ink);
  margin: 0.5rem 0 0;
  line-height: 1.5;
}

/* Leaflet tooltip styling for zone labels. */
.zone-tooltip {
  background: rgba(253, 246, 236, 0.92);
  border: 1px solid rgba(31, 28, 25, 0.2);
  color: var(--ink);
  font-family: "Heebo", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ============ Garden section ============ */
.garden-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8vh 5vw 6vh;
}
.plant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.plant-grid-added {
  display: contents;
}
.plant-card {
  background: var(--paper-2);
  border: 1px solid rgba(31, 28, 25, 0.08);
  border-radius: 14px;
  padding: 1.1rem 1.25rem 1.3rem;
  box-shadow: 0 1px 0 rgba(31, 28, 25, 0.03);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.plant-card-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.plant-icon {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: 1px solid rgba(31, 28, 25, 0.08);
}
.plant-icon--emoji { font-size: 2rem; line-height: 1; }
.plant-icon--img   { object-fit: contain; padding: 4px; }
.plant-card-titles { display: flex; flex-direction: column; }
.plant-name-he {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}
.plant-name-latin {
  font-size: 0.8rem;
  color: var(--ink-mute);
  font-style: italic;
  margin-top: 0.2rem;
}
.plant-zone        { margin: 0; color: var(--ink); }
.plant-zone-reason {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.45;
}
.plant-months      { font-size: 0.95rem; color: var(--ink); }
.plant-months-list { color: var(--terra); font-weight: 500; }
.plant-months-note {
  font-size: 0.85rem;
  color: var(--ink-mute);
  margin-top: 0.3rem;
}
.plant-water {
  background: var(--paper);
  border: 1px solid rgba(31, 28, 25, 0.07);
  border-radius: 10px;
  padding: 0.6rem 0.75rem 0.7rem;
}
.plant-water-title {
  font-size: 0.85rem;
  color: var(--ink-mute);
  margin-bottom: 0.4rem;
}
.plant-water-row {
  display: flex;
  gap: 0.6rem;
  justify-content: space-between;
}
.plant-water-cell {
  flex: 1 1 0;
  text-align: center;
}
.plant-water-season {
  font-size: 0.75rem;
  color: var(--ink-mute);
}
.plant-water-value {
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--sky);
}
.plant-water-value--summer { color: var(--terra); }
.plant-water-note {
  font-size: 0.75rem;
  color: var(--ink-mute);
  margin-top: 0.4rem;
}
.plant-warnings {
  margin: 0;
  padding-inline-start: 1.1rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.plant-warnings li { margin-bottom: 0.3rem; line-height: 1.45; }

.plant-card--added {
  border: 1px dashed rgba(31, 28, 25, 0.3);
  background: var(--paper);
  color: var(--ink-soft);
  font-style: italic;
}
.plant-card--added .plant-icon { background: var(--paper-2); }
.plant-card--added .plant-name-he { font-style: normal; }
.plant-card--added .plant-card-placeholder {
  font-size: 0.92rem;
  color: var(--ink-mute);
}

.add-plant-row {
  background: var(--paper-2);
  border: 1px solid rgba(31, 28, 25, 0.08);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.add-plant-label { font-weight: 700; color: var(--ink); }
.add-plant-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
#add-plant-input {
  flex: 1 1 200px;
  min-width: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(31, 28, 25, 0.18);
  background: var(--paper);
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  direction: rtl;
}
#add-plant-button {
  padding: 0.55rem 1.1rem;
  background: var(--terra);
  color: var(--paper);
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.95rem;
}
#add-plant-button:hover { filter: brightness(1.06); }
#add-plant-button:active { transform: translateY(1px); }

.add-plant-toast {
  min-height: 1.2em;
  font-size: 0.9rem;
  color: var(--sky);
  transition: opacity 0.4s ease;
  opacity: 0;
}
.add-plant-toast.visible { opacity: 1; }

/* ============ Energy section (Day 4) ============ */
.energy-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8vh 5vw 6vh;
}
.energy-panel {
  background: var(--paper-2);
  border: 1px solid rgba(31, 28, 25, 0.08);
  border-radius: 14px;
  padding: 1.4rem 1.5rem 1.5rem;
  margin-bottom: 1.6rem;
  box-shadow: 0 1px 0 rgba(31, 28, 25, 0.03);
}
.energy-panel-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.4rem 0;
  color: var(--ink);
}
.energy-panel-sub {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0 0 1rem 0;
}
.energy-chart {
  width: 100%;
  min-height: 320px;
  margin-bottom: 0.6rem;
}
.energy-annual {
  margin: 0.6rem 0 0.3rem;
  font-size: 0.98rem;
  color: var(--ink);
}
.energy-honest {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-mute);
  font-style: italic;
}

/* Shading SVG diagram */
.shading-svg {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  margin: 0.5rem auto 0.8rem;
  background: var(--paper);
  border-radius: 10px;
  border: 1px solid rgba(31, 28, 25, 0.08);
  padding: 0.4rem;
}

/* PV daydream stat row */
.energy-pv-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1rem 0 0.6rem;
}
.energy-pv-stat {
  background: var(--paper);
  border: 1px solid rgba(31, 28, 25, 0.08);
  border-radius: 12px;
  padding: 1rem 0.8rem;
  text-align: center;
}
.energy-pv-value {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--terra);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.energy-pv-label {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 0.3rem;
}

/* Light-touch tweaks for tiny screens. */
@media (max-width: 480px) {
  .hero-overlay { inset-block-end: 6vh; }
  .horizon-section { padding-block: 8vh; }
  .horizon-plot { min-height: 420px; }
  .yard-map { height: 320px; }
  .weather-value { font-size: 1.6rem; }
  .sun-value { font-size: 1.4rem; }
  .plant-water-value { font-size: 1.1rem; }
  .energy-pv-value { font-size: 1.4rem; }
  .energy-chart { min-height: 280px; }
}

/* ============ Day 5 — Sky section ============ */
.sky-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8vh 5vw 6vh;
}

.sky-card {
  background: var(--paper-2);
  border: 1px solid rgba(31, 28, 25, 0.08);
  border-radius: 14px;
  padding: 1.4rem 1.5rem 1.6rem;
  margin-bottom: 1.6rem;
  box-shadow: 0 1px 0 rgba(31, 28, 25, 0.03);
}
.sky-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.4rem 0;
  color: var(--ink);
}
.sky-card-sub {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0 0 1rem 0;
  line-height: 1.5;
}
.sky-card-footnote {
  font-size: 0.82rem;
  color: var(--ink-mute);
  font-style: italic;
  margin-top: 0.8rem;
  margin-bottom: 0;
}
.sky-subhead {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.4rem 0 0.6rem;
  color: var(--ink);
}

/* ---- Card 1: Bortle scale ---- */
.sky-bortle-card {
  /* Slightly darker palette to evoke night sky */
  background: linear-gradient(180deg, #f5ead2 0%, #ede0b8 100%);
}
.sky-bortle-text {
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0 0 1rem 0;
  line-height: 1.6;
}
.bortle-scale {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 0.8rem auto;
  height: auto;
}

/* ---- Card 2: 60-day moon strip ---- */
.moon-strip {
  display: grid;
  grid-template-columns: repeat(30, 1fr);
  gap: 4px;
  margin: 0.6rem 0 1.2rem;
  direction: ltr; /* Time flows left → right inside the strip */
}
@media (max-width: 720px) {
  .moon-strip {
    grid-template-columns: repeat(15, 1fr);
  }
}
@media (max-width: 380px) {
  .moon-strip {
    grid-template-columns: repeat(10, 1fr);
  }
}
.moon-strip-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.moon-strip-svg {
  display: block;
  line-height: 0;
}
.moon-strip-cell { display: block; }
.moon-strip-label {
  font-size: 0.65rem;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
  height: 0.8em;
  line-height: 1;
}

.moon-key-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.8rem;
  margin: 0.4rem 0 0.4rem;
}
.moon-key-card {
  background: var(--paper);
  border: 1px solid rgba(31, 28, 25, 0.08);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
}
.moon-key-label {
  font-size: 0.82rem;
  color: var(--ink-mute);
  margin-bottom: 0.2rem;
}
.moon-key-date {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

/* ---- Card 3: Planet table ---- */
.planet-table-wrap {
  overflow-x: auto;
  margin: 0.4rem 0;
}
.planet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.planet-table th,
.planet-table td {
  padding: 0.55rem 0.7rem;
  text-align: start;
  border-bottom: 1px solid rgba(31, 28, 25, 0.08);
}
.planet-table th {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink-mute);
  background: var(--paper);
}
.planet-table .planet-name { font-weight: 700; color: var(--ink); }
.planet-table .planet-mag,
.planet-table .planet-rise,
.planet-table .planet-set {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.planet-table .planet-window {
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.planet-table tr:last-child td { border-bottom: none; }

/* ---- Card 4: ISS timeline ---- */
.iss-timeline {
  list-style: none;
  margin: 0.4rem 0;
  padding: 0;
  border-inline-start: 2px solid rgba(31, 28, 25, 0.15);
}
.iss-event {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 2fr;
  gap: 1rem;
  padding: 0.7rem 0.9rem 0.9rem 0.9rem;
  margin-inline-start: -2px;
  border-inline-start: 4px solid var(--sky);
  background: var(--paper);
  border-radius: 0 10px 10px 0;
  margin-bottom: 0.6rem;
}
.iss-event--excellent {
  border-inline-start-color: var(--terra);
  background: linear-gradient(90deg, rgba(217, 169, 107, 0.18), var(--paper) 60%);
}
.iss-event-date {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}
.iss-event-clock {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--terra);
  line-height: 1.2;
}
.iss-event-meta { display: flex; flex-direction: column; gap: 0.2rem; }
.iss-event-elev { font-size: 0.95rem; color: var(--ink); }
.iss-event-elev strong { font-variant-numeric: tabular-nums; }
.iss-event-dir { font-size: 0.9rem; color: var(--ink-soft); }
.iss-badge {
  display: inline-block;
  margin-inline-start: 0.5rem;
  padding: 0.1rem 0.5rem;
  background: var(--terra);
  color: var(--paper);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ---- Card 5: Meteor showers ---- */
.meteor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 0.4rem 0;
}
.meteor-card {
  background: var(--paper);
  border: 1px solid rgba(31, 28, 25, 0.1);
  border-radius: 12px;
  padding: 0.9rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.meteor-card--moon-strong {
  background: rgba(176, 74, 35, 0.05);
  border-color: rgba(176, 74, 35, 0.3);
}
.meteor-head { display: flex; flex-direction: column; gap: 0.1rem; }
.meteor-name { font-size: 1.05rem; font-weight: 700; margin: 0; color: var(--ink); }
.meteor-name-lat {
  font-size: 0.8rem;
  color: var(--ink-mute);
  font-style: italic;
}
.meteor-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  padding: 0.4rem 0;
  border-top: 1px solid rgba(31, 28, 25, 0.06);
  border-bottom: 1px solid rgba(31, 28, 25, 0.06);
}
.meteor-stat-label {
  font-size: 0.75rem;
  color: var(--ink-mute);
  margin-bottom: 0.1rem;
}
.meteor-stat-value {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.meteor-radiant { margin-top: 0.2rem; }
.meteor-radiant-label {
  font-size: 0.78rem;
  color: var(--ink-mute);
  margin-bottom: 0.15rem;
}
.meteor-radiant-time {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--sky);
  font-variant-numeric: tabular-nums;
}
.meteor-radiant-note {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ink-mute);
  margin-inline-start: 0.4rem;
}
.meteor-radiant-blocked {
  font-size: 0.9rem;
  color: var(--ink-mute);
  font-style: italic;
}
.meteor-moon {
  font-size: 0.85rem;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
}
.meteor-moon--strong { background: rgba(217, 169, 107, 0.25); color: var(--ink); }
.meteor-moon--weak { background: rgba(42, 93, 143, 0.10); color: var(--sky); }
.meteor-parent {
  font-size: 0.75rem;
  color: var(--ink-mute);
}

/* ---- Card 6: Raptor calendar ---- */
.raptor-calendar {
  display: grid;
  grid-template-rows: auto repeat(auto-fit, minmax(40px, auto));
  gap: 4px;
  margin: 0.4rem 0;
}
.raptor-cal-header,
.raptor-cal-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.6fr) repeat(12, 1fr);
  gap: 3px;
  align-items: center;
}
.raptor-cal-month {
  font-size: 0.75rem;
  color: var(--ink-mute);
  text-align: center;
  font-weight: 500;
}
.raptor-cal-name {
  padding: 0.3rem 0.5rem;
}
.raptor-name-he {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.2;
}
.raptor-name-lat {
  font-size: 0.7rem;
  color: var(--ink-mute);
  font-style: italic;
}
.raptor-cal-cell {
  height: 26px;
  border-radius: 4px;
  background: rgba(31, 28, 25, 0.05);
}
.raptor-cal-cell--out { background: var(--terra); }
.raptor-cal-cell--ret { background: var(--sky); }
.raptor-cal-cell--out.raptor-cal-cell--ret {
  background: linear-gradient(90deg, var(--terra) 50%, var(--sky) 50%);
}
.raptor-legend {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.raptor-legend-out,
.raptor-legend-ret {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  vertical-align: middle;
  margin-inline-end: 0.3rem;
}
.raptor-legend-out { background: var(--terra); }
.raptor-legend-ret { background: var(--sky); }

/* ---- Card 7: Dust storm bars ---- */
.dust-bars {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 6px;
  align-items: end;
  height: 180px;
  margin: 0.6rem 0 0.4rem;
}
.dust-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}
.dust-bar-stack {
  width: 100%;
  height: 70%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.dust-bar {
  width: 80%;
  max-width: 36px;
  background: linear-gradient(180deg, var(--dune), var(--terra));
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
}
.dust-bar-pct {
  font-size: 0.7rem;
  color: var(--ink-mute);
  margin-top: 0.3rem;
  font-variant-numeric: tabular-nums;
}
.dust-bar-month {
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-top: 0.1rem;
}

@media (max-width: 600px) {
  .iss-event { grid-template-columns: 1fr; }
  .iss-event-clock { font-size: 1.3rem; }
  .raptor-cal-header,
  .raptor-cal-row {
    grid-template-columns: minmax(90px, 1.2fr) repeat(12, 1fr);
  }
  .raptor-name-he { font-size: 0.78rem; }
  .raptor-name-lat { display: none; }
}

/* ============ Day 6 — Year clock + poster section ============ */
.yearclock-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8vh 5vw 6vh;
}
.yearclock-wrap {
  width: 100%;
  max-width: 900px;
  margin: 1rem auto 1.4rem;
  display: flex;
  justify-content: center;
}
.yearclock-wrap > svg.year-clock-svg {
  width: 100%;
  height: auto;
  display: block;
  background: var(--paper);
  border-radius: 16px;
  box-shadow: 0 1px 0 rgba(31, 28, 25, 0.06);
}
.yearclock-download-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin: 1.2rem 0 0.5rem;
}
.yearclock-download {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  background: var(--terra);
  color: var(--paper);
  font-family: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(31, 28, 25, 0.18);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.yearclock-download:hover { filter: brightness(1.08); }
.yearclock-download:active { transform: translateY(1px); }
.yearclock-download-hint {
  font-size: 0.85rem;
  color: var(--ink-mute);
  margin: 0;
}
.yearclock-honest {
  font-size: 0.85rem;
  color: var(--ink-mute);
  font-style: italic;
  max-width: 38em;
  margin: 1.2rem auto 0;
  line-height: 1.55;
  text-align: center;
}

@media (max-width: 480px) {
  .yearclock-wrap { max-width: 100%; }
}

/* ====================================================================
   Day 7 — Numbers banner ("החיים שלך במספרים")
   ==================================================================== */
.numbers-section {
  padding: 3rem 6vw 3.5rem;
  background: linear-gradient(to bottom, var(--paper) 0%, var(--paper-2) 100%);
  border-top: 1px solid rgba(31, 28, 25, 0.08);
  border-bottom: 1px solid rgba(31, 28, 25, 0.08);
}
.numbers-section .section-head {
  text-align: center;
  margin-bottom: 2rem;
}
.numbers-section .section-title {
  margin: 0 0 0.4em;
}
.numbers-lede {
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 38em;
  margin: 0 auto;
  line-height: 1.5;
}
.numbers-grid {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
  max-width: 1100px;
}
@media (min-width: 640px) {
  .numbers-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .numbers-grid { grid-template-columns: repeat(4, 1fr); }
}
.number-tile {
  background: var(--paper);
  border: 1px solid rgba(31, 28, 25, 0.10);
  border-radius: 14px;
  padding: 1.3rem 1rem 1.1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 1px 0 rgba(31, 28, 25, 0.04);
}
.number-tile--live {
  background: linear-gradient(135deg, var(--paper) 0%, #fff8e6 100%);
  border-color: var(--terra);
}
.number-value {
  font-family: "Heebo", system-ui, sans-serif;
  font-weight: 900;
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  line-height: 1.05;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  /* Keep digit positions from jittering as the count ticks. */
  font-feature-settings: "tnum" 1, "lnum" 1;
}
.number-value--live {
  color: var(--terra);
}
.number-label {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.35;
  font-weight: 500;
}
.live-dot {
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: #c0392b;
  margin-inline-start: 0.3em;
  vertical-align: middle;
  animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50%      { opacity: 1.0;  transform: scale(1.0); }
}
.numbers-footnote {
  margin: 1.4rem auto 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-mute);
  font-style: italic;
  max-width: 38em;
}

/* ====================================================================
   Day 7 — Climate widget ("התנאים עכשיו במצפה רמון")
   ==================================================================== */
.climate-section {
  padding: 3rem 6vw 3.5rem;
}
.climate-section .section-head {
  text-align: center;
  margin-bottom: 1.6rem;
}
.climate-widget {
  background: var(--paper);
  border: 1px solid rgba(31, 28, 25, 0.10);
  border-radius: 18px;
  padding: 1.6rem clamp(1rem, 3vw, 2rem);
  max-width: 1100px;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(31, 28, 25, 0.06);
}
.climate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px dashed rgba(31, 28, 25, 0.15);
}
.climate-title {
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-weight: 700;
  margin: 0;
}
.climate-updated {
  font-size: 0.85rem;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.climate-updated::before {
  content: "⏱ ";
  margin-inline-end: 0.2em;
}
.climate-error {
  display: none;
  background: #fbeae3;
  color: #8a3a1a;
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.climate-error.visible { display: block; }

.climate-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .climate-grid {
    grid-template-columns: minmax(220px, 320px) 1fr;
    align-items: start;
  }
}

/* Wind compass */
.wind-compass-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.wind-compass {
  width: clamp(180px, 50vw, 240px);
  height: auto;
  display: block;
}
.wind-summary {
  text-align: center;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.45;
}
.wind-summary-primary { font-weight: 700; color: var(--ink); }
.wind-summary-gust { color: var(--ink-mute); font-size: 0.88rem; }

/* Right column: metrics grid */
.climate-metrics {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.climate-temp-block {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px dashed rgba(31, 28, 25, 0.10);
}
.climate-temp {
  font-size: clamp(2.2rem, 4.5vw, 3rem);
  font-weight: 900;
  line-height: 1;
  color: var(--terra);
  font-variant-numeric: tabular-nums;
}
.climate-temp-meta {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.45;
  text-align: end;
}
.climate-metric {
  background: var(--paper-2);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.climate-metric-label {
  font-size: 0.85rem;
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  gap: 0.3em;
}
.climate-metric-value {
  font-size: 1.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
/* Air-quality chip styles */
.aqi-chip {
  display: inline-block;
  padding: 0.1em 0.6em;
  border-radius: 999px;
  font-size: 0.85em;
  font-weight: 700;
  margin-inline-start: 0.4em;
}
.aqi-good        { background: #c6e7c2; color: #1f5d1c; }
.aqi-moderate    { background: #fff1b3; color: #786300; }
.aqi-usg         { background: #ffd7a8; color: #8a4a00; }
.aqi-unhealthy   { background: #f9b0b0; color: #802020; }
.aqi-veryunhealthy { background: #c8a3d8; color: #4a1f5c; }
.aqi-hazardous   { background: #8b2a2a; color: #fdf6ec; }
/* UV chip styles */
.uv-low      { background: #c6e7c2; color: #1f5d1c; }
.uv-moderate { background: #fff1b3; color: #786300; }
.uv-high     { background: #ffd7a8; color: #8a4a00; }
.uv-veryhigh { background: #f9b0b0; color: #802020; }
.uv-extreme  { background: #c8a3d8; color: #4a1f5c; }

.climate-narrative {
  margin: 1.2rem 0 0;
  padding: 0.9rem 1rem;
  background: var(--paper-2);
  border-radius: 10px;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  font-style: italic;
}
.climate-footnotes {
  margin: 1rem 0 0;
  font-size: 0.78rem;
  color: var(--ink-mute);
  line-height: 1.45;
  font-style: italic;
}
.climate-footnotes p { margin: 0.2em 0; }

/* ====================================================================
   Day 7 (deliverable D) — Horizon viz with sliders
   ==================================================================== */
.horizon-section {
  padding: 3rem 6vw 3.5rem;
}
.horizon-section .section-head {
  text-align: center;
  margin-bottom: 1.2rem;
}
.horizon-strip-wrap {
  position: relative;
  max-width: 1100px;
  margin: 0 auto 1rem;
  background: var(--paper);
  border: 1px solid rgba(31, 28, 25, 0.12);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(31, 28, 25, 0.06);
}
.horizon-strip {
  display: block;
  width: 100%;
  height: clamp(180px, 36vw, 320px);
  cursor: crosshair;
}
.horizon-tooltip {
  position: absolute;
  background: rgba(31, 28, 25, 0.92);
  color: #fdf6ec;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.35;
  pointer-events: none;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-variant-numeric: tabular-nums;
}
.horizon-sliders {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: end;
  justify-content: center;
  max-width: 1100px;
  margin: 1rem auto;
  padding: 1rem;
  background: var(--paper-2);
  border-radius: 12px;
}
.horizon-slider-group {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.horizon-slider-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.horizon-slider-label output {
  font-weight: 700;
  color: var(--ink);
}
.horizon-slider {
  width: 100%;
  accent-color: var(--terra);
  direction: ltr; /* sliders read more naturally LTR */
}
.horizon-now-btn {
  padding: 0.55rem 1.1rem;
  background: var(--terra);
  color: var(--paper);
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: filter 0.15s ease;
  align-self: end;
}
.horizon-now-btn[aria-pressed="false"] {
  background: var(--ink-mute);
}
.horizon-now-btn:hover { filter: brightness(1.05); }
.horizon-caption {
  text-align: center;
  max-width: 38em;
  margin: 1rem auto 0.4rem;
  font-size: 1.02rem;
  color: var(--ink);
  line-height: 1.55;
}
.horizon-section .section-footnote {
  text-align: center;
  max-width: 40em;
  margin: 0.4rem auto 0;
  font-size: 0.82rem;
  color: var(--ink-mute);
}

/* ====================================================================
   Priority 1-4 interactive wiring — edit mode, house panel, plant
   editing, yard editing. Loaded last so they override structural rules.
   ==================================================================== */

/* Edit-mode toggle bar */
.edit-mode-bar {
  position: fixed;
  top: 0.7rem;
  inset-inline-end: 0.7rem;
  z-index: 1050;
}
.edit-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.95rem;
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(31, 28, 25, 0.10);
  transition: background 0.15s, transform 0.1s;
}
.edit-mode-toggle:hover { background: var(--paper-2); }
.edit-mode-toggle[aria-pressed="true"] {
  background: #4a8a3a;
  color: #fdf6ec;
  border-color: #2f5a26;
}
.edit-mode-toggle-icon { font-size: 1rem; }

/* Edit-only affordances. Hidden unless body.edit-mode. */
.edit-affordance { display: none !important; }
body.edit-mode .edit-affordance { display: flex !important; }
body.edit-mode .edit-affordance.add-plant-row { display: block !important; }

/* House specs panel */
.house-section {
  max-width: 60rem;
  margin: 2.4rem auto;
  padding: 1.4rem 1.2rem;
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  display: none;  /* hidden unless edit-mode */
}
body.edit-mode .house-section { display: block; }
.house-section .section-head { margin-bottom: 1rem; }
.house-section .section-title { font-size: 1.4rem; }
.house-section .section-caption {
  color: var(--ink-soft);
  max-width: 50em;
  font-size: 0.95rem;
}
.house-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.9rem;
  margin-top: 0.6rem;
}
.house-card {
  background: var(--paper);
  border: 1px solid var(--ink-mute);
  border-radius: 6px;
  padding: 0.85rem 0.9rem;
}
.house-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.55rem;
  gap: 0.5rem;
}
.house-card-title {
  font-size: 0.98rem;
  font-weight: 700;
  margin: 0;
}
.house-card-diff {
  font-size: 0.72rem;
  color: var(--terra);
  background: rgba(176, 74, 35, 0.10);
  border-radius: 999px;
  padding: 1px 0.5rem;
}
.house-card-body { font-size: 0.92rem; }
.house-slider-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.house-slider { flex: 1; cursor: pointer; }
.house-slider-out {
  min-width: 5rem;
  text-align: center;
  font-weight: 500;
  color: var(--ink);
}
.house-hint {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  color: var(--ink-mute);
}
.house-card--compass .compass-wrap {
  width: 9rem;
  height: 9rem;
  margin: 0 auto 0.4rem;
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.house-card--compass .compass-wrap:active { cursor: grabbing; }
.compass-svg { width: 100%; height: 100%; }
[data-compass-arrow] { transition: transform 0.05s linear; transform-origin: 0 0; }
.house-orientation-readout {
  text-align: center;
  margin: 0.2rem 0;
  font-size: 0.95rem;
}
.house-segmented {
  display: flex;
  gap: 0.3rem;
}
.house-seg {
  flex: 1;
  padding: 0.45rem 0.4rem;
  background: var(--paper);
  border: 1px solid var(--ink-mute);
  border-radius: 4px;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}
.house-seg.is-active {
  background: var(--terra);
  color: var(--paper);
  border-color: var(--terra);
  font-weight: 600;
}
.house-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
}
.house-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
}
.house-zone-canopies {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.house-zone-canopy-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
}
.house-zone-swatch {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 2px;
  display: inline-block;
}
.house-zone-name { flex: 1; }
.house-canopy-input {
  width: 4.5rem;
  padding: 0.2rem 0.35rem;
  font: inherit;
  border: 1px solid var(--ink-mute);
  border-radius: 3px;
}
.house-controls {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.1rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.house-control-btn {
  padding: 0.5rem 0.9rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 4px;
  font: inherit;
  cursor: pointer;
}
.house-control-btn:hover { background: var(--paper-2); }

/* Plant card edit affordance (button + inline edit panel) */
.plant-card { position: relative; }
.plant-edit-btn {
  position: absolute;
  top: 0.4rem;
  inset-inline-start: 0.4rem;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  border: 1px solid var(--ink-mute);
  background: var(--paper);
  font-size: 0.95rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}
body.edit-mode .plant-edit-btn { display: inline-flex; }
.plant-edit-btn:hover { background: var(--paper-2); }
.plant-edit-panel {
  margin-top: 0.7rem;
  padding: 0.7rem 0.8rem;
  background: var(--paper-2);
  border: 1px solid var(--ink-mute);
  border-radius: 6px;
  font-size: 0.9rem;
}
.plant-edit-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.plant-edit-head h4 { margin: 0; font-size: 1rem; }
.plant-edit-close {
  border: none;
  background: transparent;
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.3rem;
}
.plant-edit-row {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.4rem;
}
.plant-edit-row--full {
  grid-template-columns: 1fr;
  gap: 0.2rem;
}
.plant-edit-row select,
.plant-edit-row input[type="text"],
.plant-edit-row textarea {
  font: inherit;
  padding: 0.25rem 0.4rem;
  border: 1px solid var(--ink-mute);
  border-radius: 3px;
  background: var(--paper);
}
.plant-edit-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.plant-edit-save,
.plant-edit-remove {
  padding: 0.35rem 0.8rem;
  font: inherit;
  border-radius: 3px;
  border: 1px solid var(--ink);
  cursor: pointer;
}
.plant-edit-save { background: #4a8a3a; color: var(--paper); border-color: #2f5a26; }
.plant-edit-remove { background: var(--paper); color: var(--terra); border-color: var(--terra); }

/* Plant catalog popup */
.plant-catalog-popup {
  position: fixed;
  inset: 0;
  background: rgba(31, 28, 25, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
  z-index: 2000;
  overflow-y: auto;
}
.plant-catalog-popup > * {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 0.5rem 0.8rem;
  width: min(38rem, 100%);
}
.plant-catalog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}
.plant-catalog-head h3 { margin: 0; }
.plant-catalog-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.plant-catalog-search {
  font: inherit;
  margin-bottom: 0.6rem;
  padding: 0.4rem 0.6rem;
}
.plant-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 0.5rem;
  padding: 0.6rem;
  max-height: 60vh;
  overflow-y: auto;
}
.plant-catalog-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.6rem 0.4rem;
  background: var(--paper-2);
  border: 1px solid var(--ink-mute);
  border-radius: 5px;
  cursor: pointer;
  font: inherit;
}
.plant-catalog-item:hover { background: var(--dune); }
.plant-catalog-emoji { font-size: 1.5rem; }
.plant-catalog-name { font-size: 0.85rem; }

/* "Open catalog" button in the add-plant area */
.catalog-btn {
  padding: 0.35rem 0.8rem;
  background: var(--paper-2);
  border: 1px solid var(--ink);
  border-radius: 3px;
  font: inherit;
  cursor: pointer;
  margin-inline-start: 0.4rem;
}
.catalog-btn:hover { background: var(--dune); }

/* Yard zone editing affordances */
body.edit-mode .yard-map { cursor: crosshair; }
body.edit-mode .leaflet-interactive { cursor: grab; }
.zone-handle {
  background: var(--terra);
  border: 2px solid var(--paper);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--ink);
  width: 12px !important;
  height: 12px !important;
  cursor: nwse-resize;
}
.add-zone-btn {
  display: none;
  margin: 0.6rem 0;
  padding: 0.5rem 1rem;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  font: inherit;
  cursor: pointer;
}
body.edit-mode .add-zone-btn { display: inline-block; }
.add-zone-btn:hover { background: var(--paper-2); }
.zone-color-popup .zone-color-title {
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.zone-color-swatches {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}
.zone-color-sw {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 4px;
  border: 1.5px solid var(--ink);
  cursor: pointer;
}
.zone-color-delete {
  background: var(--paper);
  color: var(--terra);
  border: 1px solid var(--terra);
  border-radius: 3px;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  font: inherit;
}

/* Save toast for yard / plant edits */
.save-toast {
  position: fixed;
  bottom: 1.3rem;
  inset-inline-start: 50%;
  transform: translateX(-50%) translateY(180%);
  padding: 0.55rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-size: 0.9rem;
  z-index: 2100;
  transition: transform 0.25s ease-out;
  pointer-events: none;
}
.save-toast.visible {
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
