/* styles.css — "Raining In..." v2 design system */

/* ============================================================
   1. Design tokens
   ============================================================ */
:root {
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Outfit', 'Segoe UI', sans-serif;

  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;

  --shadow-s: 0 2px 8px rgba(16, 42, 67, 0.08);
  --shadow-m: 0 8px 30px rgba(16, 42, 67, 0.12);
  --shadow-l: 0 24px 60px rgba(16, 42, 67, 0.18);

  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Light theme (default) */
:root {
  --bg: #f2f7fb;
  --bg-grad-a: #dceefb;
  --bg-grad-b: #f7fbf4;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --surface-raised: #ffffff;
  --ink: #17293a;
  --ink-soft: #51697d;
  --ink-faint: #64798c;
  --line: rgba(23, 41, 58, 0.1);
  --accent: #1f9d55;
  --accent-soft: #e3f5ea;
  --accent-ink: #0e6537;
  --rain: #2f6fae;
  --rain-soft: #e3effa;
  --sun: #f6b93b;
  --sun-soft: #fdf3dc;
  --danger-soft: #fdeaea;
  --sky-top: #aed6f2;
  --sky-bottom: #eaf5fc;
  --cloud: #ffffff;
  --hill-back: #bfe3c8;
  --hill-front: #96d3a7;
}

/* Dark theme — keyed off the JS-resolved data-effective attribute */
[data-effective="dark"] {
  --bg: #0c141f;
  --bg-grad-a: #101d2c;
  --bg-grad-b: #0c1720;
  --surface: #16222f;
  --surface-glass: rgba(22, 34, 47, 0.72);
  --surface-raised: #1b2937;
  --ink: #e9f1f7;
  --ink-soft: #a4b8c8;
  --ink-faint: #74899b;
  --line: rgba(233, 241, 247, 0.1);
  --accent: #4ecb7d;
  --accent-soft: rgba(78, 203, 125, 0.14);
  --accent-ink: #8fe6b0;
  --rain: #6aa9dd;
  --rain-soft: rgba(106, 169, 221, 0.16);
  --sun: #f6c453;
  --sun-soft: rgba(246, 196, 83, 0.14);
  --danger-soft: rgba(240, 120, 120, 0.14);
  --sky-top: #16283f;
  --sky-bottom: #0e1a29;
  --cloud: #2b3d51;
  --hill-back: #1c3a2c;
  --hill-front: #24503a;
}

:root { --sun-ink: #a9760e; }
[data-effective="dark"] { --sun-ink: #f0c674; }

/* ============================================================
   2. Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: linear-gradient(180deg, var(--bg-grad-a) 0%, var(--bg-grad-b) 45%, var(--bg) 100%);
  background-attachment: fixed;
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.5s ease, color 0.3s ease;
}

a { color: var(--accent-ink); }
button { font-family: inherit; }

.skip-link {
  position: absolute;
  top: -48px;
  left: 1rem;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1.1rem;
  border-radius: 0 0 var(--radius-s) var(--radius-s);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }

/* Ambient rain canvas overlays everything, never captures input */
#rain-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 90;
  opacity: 0;
  transition: opacity 0.8s ease;
}
#rain-canvas.active { opacity: 1; }

/* ============================================================
   3. Top bar
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--surface-glass);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-drop { display: inline-block; animation: drop-bob 2.6s ease-in-out infinite; }
@keyframes drop-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.logo-dots { color: var(--rain); }

.icon-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.05rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s var(--ease-spring), background 0.2s ease, box-shadow 0.2s ease;
}
.icon-btn:hover { transform: scale(1.08) rotate(8deg); box-shadow: var(--shadow-s); }
.icon-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ============================================================
   4. Hero
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 1.5rem 0;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom));
  z-index: -2;
  transition: background 0.5s ease;
}

.sun {
  position: absolute;
  top: 48px;
  right: 12%;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe9a8, var(--sun));
  box-shadow: 0 0 60px 18px rgba(246, 185, 59, 0.35);
  animation: sun-breathe 6s ease-in-out infinite;
}
@keyframes sun-breathe {
  0%, 100% { transform: scale(1); box-shadow: 0 0 60px 18px rgba(246, 185, 59, 0.35); }
  50% { transform: scale(1.06); box-shadow: 0 0 80px 26px rgba(246, 185, 59, 0.45); }
}

/* In the dark, the sun becomes the moon and stars come out */
[data-effective="dark"] .sun {
  background:
    radial-gradient(circle at 62% 30%, rgba(158, 173, 194, 0.55) 0 9%, transparent 10%),
    radial-gradient(circle at 40% 60%, rgba(158, 173, 194, 0.45) 0 7%, transparent 8%),
    radial-gradient(circle at 70% 68%, rgba(158, 173, 194, 0.4) 0 5%, transparent 6%),
    radial-gradient(circle at 35% 35%, #f4f7fb, #c2cddc);
  animation: moon-glow 7s ease-in-out infinite;
}
@keyframes moon-glow {
  0%, 100% { box-shadow: 0 0 46px 12px rgba(178, 200, 235, 0.22); }
  50% { box-shadow: 0 0 66px 20px rgba(178, 200, 235, 0.32); }
}

[data-effective="dark"] .hero-sky::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, #dfe9f6 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 12%, #c8d8ec 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 30%, #dfe9f6 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 8%,  #c8d8ec 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 71% 26%, #dfe9f6 50%, transparent 51%),
    radial-gradient(1px 1px at 84% 14%, #c8d8ec 50%, transparent 51%),
    radial-gradient(1px 1px at 20% 44%, #c8d8ec 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 92% 38%, #dfe9f6 50%, transparent 51%),
    radial-gradient(1px 1px at 65% 46%, #c8d8ec 50%, transparent 51%);
  animation: twinkle 4.5s ease-in-out infinite alternate;
}
@keyframes twinkle {
  from { opacity: 0.45; }
  to { opacity: 1; }
}

.cloud {
  position: absolute;
  background: var(--cloud);
  border-radius: 60px;
  opacity: 0.9;
  filter: drop-shadow(0 6px 12px rgba(16, 42, 67, 0.08));
}
.cloud::before, .cloud::after {
  content: '';
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.cloud-a { width: 140px; height: 44px; top: 12%; left: -180px; animation: drift 46s linear infinite; }
.cloud-a::before { width: 58px; height: 58px; top: -28px; left: 24px; }
.cloud-a::after  { width: 78px; height: 66px; top: -32px; left: 58px; }

.cloud-b { width: 110px; height: 36px; top: 30%; left: -140px; animation: drift 58s linear infinite; animation-delay: -18s; opacity: 0.7; }
.cloud-b::before { width: 46px; height: 46px; top: -22px; left: 18px; }
.cloud-b::after  { width: 58px; height: 50px; top: -25px; left: 44px; }

.cloud-c { width: 170px; height: 52px; top: 6%;  left: -220px; animation: drift 70s linear infinite; animation-delay: -35s; opacity: 0.8; }
.cloud-c::before { width: 70px; height: 64px; top: -32px; left: 30px; }
.cloud-c::after  { width: 92px; height: 76px; top: -38px; left: 70px; }

.cloud-d { width: 90px; height: 30px; top: 44%; left: -120px; animation: drift 52s linear infinite; animation-delay: -8s; opacity: 0.55; }
.cloud-d::before { width: 38px; height: 38px; top: -18px; left: 14px; }
.cloud-d::after  { width: 48px; height: 42px; top: -21px; left: 36px; }

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100vw + 420px)); }
}

.hero-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 4.5rem;
}

.hero-eyebrow {
  display: inline-block;
  background: var(--surface-glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 1.2rem;
  animation: rise-in 0.7s var(--ease-out) both;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  animation: rise-in 0.7s var(--ease-out) 0.1s both;
}

.hero-highlight {
  background: linear-gradient(100deg, var(--accent), var(--rain), var(--accent));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-pan 6s ease-in-out infinite;
}
@keyframes gradient-pan {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 560px;
  margin: 1.1rem auto 0;
  animation: rise-in 0.7s var(--ease-out) 0.2s both;
}

.hero-cta {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  margin-top: 1.8rem;
  animation: rise-in 0.7s var(--ease-out) 0.3s both;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-m); }
.btn:active, .chip:active, .tab:active, .icon-btn:active { transform: scale(0.96); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost {
  background: var(--surface-glass);
  color: var(--ink);
  border-color: var(--line);
  backdrop-filter: blur(8px);
}

.hero-hills {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  z-index: -1;
  line-height: 0;
}
.hero-hills svg { width: 100%; height: 90px; display: block; }
.hill-back { fill: var(--hill-back); }
.hill-front { fill: var(--hill-front); }

/* ============================================================
   5. Controls (tabs, filters)
   ============================================================ */
.controls, .city-section { scroll-margin-top: 80px; }

.controls {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.4rem 1.25rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tabs {
  display: inline-flex;
  gap: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem;
  align-self: center;
  box-shadow: var(--shadow-s);
}

.tab {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s var(--ease-spring);
}
.tab:hover { transform: translateY(-1px); }
.tab.active { background: var(--accent); color: #fff; }
.tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  justify-content: center;
}

.plant-search-wrap {
  position: relative;
  flex: 0 1 280px;
}
.search-glyph {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.6;
}
#plant-filter {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#plant-filter:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.chips { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: center; }
.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s var(--ease-spring), border-color 0.2s ease;
}
.chip:hover { transform: translateY(-1px); }
.chip.active { background: var(--rain-soft); color: var(--rain); border-color: var(--rain); }
.chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ============================================================
   6. Plant grid & cards
   ============================================================ */
.grid-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2.5rem;
}

.plant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 1.1rem;
}

.plant-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 1.3rem 1.1rem 1.15rem;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.3s ease, border-color 0.3s ease, opacity 0.5s ease;
}
.plant-card.revealed { opacity: 1; transform: translateY(0); }
.plant-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-m); border-color: var(--accent); }
.plant-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* light sweep across the card on hover */
.plant-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
  pointer-events: none;
}
.plant-card:hover::after { left: 140%; }
[data-effective="dark"] .plant-card::after {
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.fav-btn {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  border: none;
  background: transparent;
  font-size: 1.05rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
  border-radius: 50%;
  filter: grayscale(0.3);
  opacity: 0.65;
  transition: opacity 0.2s ease, transform 0.2s var(--ease-spring), filter 0.2s ease;
}
.fav-btn:hover { opacity: 1; transform: scale(1.15); filter: none; }
.fav-btn.faved { opacity: 1; filter: none; }
.fav-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.fav-btn.pop { animation: heart-pop 0.45s var(--ease-spring); }
@keyframes heart-pop {
  0% { transform: scale(0.6); }
  55% { transform: scale(1.45); }
  100% { transform: scale(1); }
}

.plant-card .emoji {
  font-size: 2.4rem;
  display: inline-block;
  margin-bottom: 0.55rem;
  transition: transform 0.35s var(--ease-spring);
}
.plant-card:hover .emoji { transform: scale(1.18) rotate(-6deg); }

/* custom polygonal SVG artwork */
.plant-card .card-art {
  width: 68px;
  height: 68px;
  margin-bottom: 0.55rem;
  transition: transform 0.35s var(--ease-spring);
  filter: drop-shadow(0 3px 5px rgba(16, 42, 67, 0.14));
}
.plant-card .card-art svg { width: 100%; height: 100%; display: block; }
.plant-card:hover .card-art { transform: scale(1.12) rotate(-4deg); }
[data-effective="dark"] .plant-card .card-art { filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45)); }

.plant-card .name { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; }
.plant-card .botanical { font-size: 0.78rem; font-style: italic; color: var(--ink-faint); margin-top: 0.1rem; }
.plant-card .origin {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.7rem;
}

.water-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.water-badge.low { background: var(--sun-soft); color: var(--sun-ink); }
.water-badge.moderate { background: var(--accent-soft); color: var(--accent-ink); }
.water-badge.high { background: var(--rain-soft); color: var(--rain); }

.card-arrow {
  color: var(--ink-faint);
  font-size: 0.95rem;
  transition: transform 0.25s var(--ease-out), color 0.2s ease;
}
.plant-card:hover .card-arrow { transform: translateX(4px); color: var(--accent); }

.grid-empty { text-align: center; color: var(--ink-soft); padding: 2rem 0; font-size: 1.05rem; }

/* ============================================================
   7. Plant modal
   ============================================================ */
.plant-modal {
  border: none;
  border-radius: var(--radius-l);
  padding: 0;
  max-width: 680px;
  width: calc(100vw - 2rem);
  max-height: calc(100vh - 3rem);
  background: var(--surface-raised);
  color: var(--ink);
  box-shadow: var(--shadow-l);
  overflow: hidden;
}
.plant-modal::backdrop {
  background: rgba(8, 16, 26, 0.55);
  backdrop-filter: blur(4px);
}
.plant-modal[open] { animation: modal-pop 0.4s var(--ease-spring); }
@keyframes modal-pop {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-shell { position: relative; max-height: calc(100vh - 3rem); overflow-y: auto; }

.modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 5;
  background: var(--surface-glass);
  backdrop-filter: blur(6px);
}

/* Weather banner at top of modal — class set by JS: sunny / cloudy / rainy / night */
.modal-weather {
  position: relative;
  padding: 2.2rem 1.8rem 1.6rem;
  color: #fff;
  overflow: hidden;
  text-align: center;
  transition: background 0.6s ease;
}
.modal-weather.sunny  { background: linear-gradient(150deg, #4aa3df, #7cc2ee 55%, #f6d365); }
.modal-weather.cloudy { background: linear-gradient(150deg, #5b7590, #8ba2b8); }
.modal-weather.rainy  { background: linear-gradient(150deg, #3a4f66, #5b7590); }
.modal-weather.night  { background: linear-gradient(150deg, #172438, #2c3e5c); }

.mw-location { font-size: 0.85rem; opacity: 0.85; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }
.mw-headline { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; margin-top: 0.3rem; }
.mw-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; margin-top: 0.8rem; font-size: 0.9rem; opacity: 0.95; }
.mw-stats span { display: inline-flex; align-items: center; gap: 0.3rem; }

/* local raindrops inside the banner */
.mw-drop {
  position: absolute;
  top: -20px;
  width: 2px;
  height: 16px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.75));
  border-radius: 0 0 2px 2px;
  animation: mw-fall linear infinite;
}
@keyframes mw-fall {
  from { transform: translateY(-20px); opacity: 0.85; }
  to { transform: translateY(220px); opacity: 0; }
}

.modal-content { padding: 1.5rem 1.8rem 2rem; text-align: center; }

.modal-plant-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.modal-photo {
  flex: 0 0 108px;
  width: 108px;
  height: 108px;
  border-radius: var(--radius-m);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  overflow: hidden;
  box-shadow: var(--shadow-s);
}
.modal-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.modal-title-wrap h2 { font-family: var(--font-display); font-size: 1.55rem; line-height: 1.15; }
.modal-title-wrap .botanical { font-style: italic; color: var(--ink-faint); font-size: 0.9rem; margin-top: 0.15rem; }
.modal-title-wrap .origin-line { color: var(--ink-soft); font-size: 0.9rem; margin-top: 0.45rem; line-height: 1.45; }

/* Verdict box */
.verdict {
  margin-top: 1.3rem;
  border-radius: var(--radius-m);
  padding: 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  animation: rise-in 0.5s var(--ease-out) both;
}
.verdict.water { background: var(--rain-soft); }
.verdict.maybe { background: var(--sun-soft); }
.verdict.skip  { background: var(--accent-soft); }
.verdict.error { background: var(--danger-soft); }

.verdict-icon { font-size: 1.8rem; line-height: 1; }
.verdict-title { font-weight: 700; font-size: 1.02rem; }
.verdict-text { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.55; margin-top: 0.2rem; }
.verdict-hint {
  color: var(--ink-soft);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--line);
}

/* Forecast strip */
.forecast { margin-top: 1.4rem; }
.forecast h3, .care h3, .wiki-extract h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-bottom: 0.7rem;
  font-weight: 700;
}

.forecast-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem;
}

.fday {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 0.55rem 0.2rem 0.5rem;
  font-size: 0.72rem;
  color: var(--ink-soft);
}
.fday.today { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.fday .d-name { font-weight: 700; }
.fday .d-icon { font-size: 1.15rem; margin: 0.25rem 0; display: block; }
.fday .d-bar-track {
  height: 34px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin: 0.25rem 0;
}
.fday .d-bar {
  width: 8px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--rain), #7db8e8);
  min-height: 2px;
  transform-origin: bottom;
  animation: bar-grow 0.7s var(--ease-out) both;
}
@keyframes bar-grow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}
.fday .d-mm { color: var(--rain); font-weight: 600; }

.forecast-summary {
  margin-top: 0.7rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: center;
}

/* Care panel */
.care { margin-top: 1.4rem; }
.care-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
}
.care-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 0.7rem 0.85rem;
  font-size: 0.85rem;
}
.care-item .label { color: var(--ink-faint); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.care-item .value { margin-top: 0.2rem; font-weight: 600; }

.tip-box, .fact-box, .harvest-box {
  margin-top: 0.9rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-soft);
  padding: 0.85rem 1rem;
  border-top: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-s);
  text-align: center;
}
.fact-box { border-top-color: var(--sun); background: var(--sun-soft); }
.harvest-box { border-top-color: var(--rain); background: var(--rain-soft); }

.wiki-extract { margin-top: 1.4rem; }
.wiki-extract p { font-size: 0.9rem; line-height: 1.6; color: var(--ink-soft); }
.wiki-extract a { font-size: 0.85rem; font-weight: 600; }

/* Skeleton shimmer while data loads */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--line);
  border-radius: var(--radius-s);
  min-height: 1em;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* ============================================================
   8. City check
   ============================================================ */
.city-section {
  max-width: 640px;
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}

.city-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 2rem 1.8rem;
  text-align: center;
  box-shadow: var(--shadow-s);
}

.city-card h2 { font-family: var(--font-display); font-size: 1.7rem; }
.blink-cursor { color: var(--rain); animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.city-sub { color: var(--ink-soft); font-size: 0.95rem; margin: 0.4rem 0 1.2rem; }

.search-wrapper { position: relative; max-width: 420px; margin: 0 auto; }
.search-wrapper input {
  width: 100%;
  padding: 0.8rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-wrapper input:focus { outline: none; border-color: var(--rain); box-shadow: 0 0 0 3px var(--rain-soft); }

.search-results {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0; right: 0;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-m);
  z-index: 20;
  display: none;
  overflow: hidden;
  text-align: left;
}
.search-results.visible { display: block; animation: rise-in 0.25s var(--ease-out); }

.search-result-item {
  padding: 0.7rem 1.1rem;
  cursor: pointer;
  font-size: 0.92rem;
  transition: background 0.15s ease;
}
.search-result-item:hover, .search-result-item.active { background: var(--accent-soft); }

.city-result {
  margin-top: 1.1rem;
  border-radius: var(--radius-m);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-out), padding 0.4s ease;
}
.city-result.visible { max-height: 260px; padding: 1.1rem 1.2rem; }
.city-result.raining { background: var(--rain-soft); }
.city-result.dry { background: var(--sun-soft); }
.city-result.error { background: var(--danger-soft); }
.city-result .cr-line { font-weight: 600; font-size: 1.05rem; }
.city-result .cr-details { color: var(--ink-soft); font-size: 0.88rem; margin-top: 0.3rem; }

/* ============================================================
   9. Footer & toasts
   ============================================================ */
.footer {
  text-align: center;
  padding: 2.2rem 1.25rem 2.6rem;
  color: var(--ink-faint);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}
.footer p { margin: 0.3rem 0; }
.footer a { text-decoration: none; font-weight: 600; }
.footer a:hover { text-decoration: underline; }

.toast-root {
  position: fixed;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: var(--bg);
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-m);
  animation: toast-in 0.35s var(--ease-spring), toast-out 0.35s ease 2.6s both;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

/* ============================================================
   10. Motion & responsive
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  #rain-canvas { display: none; }
}

@media (max-width: 640px) {
  .hero { padding-top: 3.2rem; min-height: 460px; }
  .hero-cta { flex-direction: column; align-items: center; }
  .modal-plant-head { flex-direction: column; align-items: center; text-align: center; }
  .forecast-days { grid-template-columns: repeat(4, 1fr); }
  .modal-content { padding: 1.2rem 1.1rem 1.6rem; }
  .modal-weather { padding: 1.8rem 1.2rem 1.3rem; }
}
