:root {
  --bg-1: #fff7e7;
  --bg-2: #edf7ee;
  --ink: #1f2f1d;
  --muted: #556452;
  --accent: #2e7a5e;
  --accent-strong: #185f47;
  --warm: #cf6d2d;
  --panel: rgba(255, 255, 255, 0.95);
  --line: rgba(56, 91, 78, 0.2);
  --shadow: 0 18px 34px rgba(31, 47, 29, 0.11);
  --shadow-soft: 0 8px 18px rgba(31, 47, 29, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, #ffe2a0 0%, transparent 32%),
    radial-gradient(circle at 92% 6%, #c7ecc7 0%, transparent 34%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2));
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(31, 47, 29, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 47, 29, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.ambient {
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(48px);
  pointer-events: none;
  z-index: 0;
}

.ambient-left {
  background: rgba(217, 122, 43, 0.25);
  left: -120px;
  bottom: -100px;
}

.ambient-right {
  background: rgba(46, 122, 94, 0.22);
  right: -100px;
  top: -80px;
}

.app-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.hero {
  text-align: center;
  margin-bottom: 0.4rem;
  grid-column: 1 / -1;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.55));
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 1.2rem 1rem;
  box-shadow: var(--shadow-soft);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  font-size: 0.75rem;
  color: var(--accent-strong);
  margin-bottom: 0.25rem;
}

h1,
h2,
h3 {
  font-family: "DM Serif Display", serif;
  margin: 0;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  line-height: 1.06;
  text-wrap: balance;
}

.subtitle {
  max-width: 680px;
  margin: 0.75rem auto 0;
  color: var(--muted);
}

.panel {
  background: var(--panel);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
  margin-top: 0;
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--warm), var(--accent));
  opacity: 0.85;
}

.panel h2 {
  font-size: 1.45rem;
  line-height: 1.15;
}

#planner-panel,
#seed-search-panel,
#climate-panel,
#seed-library-panel,
#reminders-panel {
  grid-column: span 6;
}

.panel:last-of-type {
  grid-column: 1 / -1;
}

.seed-form {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #22331f;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(46, 122, 94, 0.25);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(46, 122, 94, 0.08);
}

.full-width {
  grid-column: 1 / -1;
}

.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 12px;
  padding: 0.7rem 0.95rem;
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.primary-btn {
  grid-column: 1 / -1;
  background: linear-gradient(130deg, var(--accent), var(--accent-strong));
  color: white;
  box-shadow: 0 10px 18px rgba(24, 95, 71, 0.22);
}

.primary-btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.search-subtitle {
  margin: 0.45rem 0 0.75rem;
  color: #465844;
}

.seed-search-form {
  margin-bottom: 0.65rem;
}

.search-label {
  display: block;
  margin-bottom: 0.35rem;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
}

.search-btn {
  min-width: 120px;
}

.search-status {
  margin: 0.25rem 0 0.8rem;
  color: #40503d;
  min-height: 1.2rem;
}

.seed-search-result {
  display: grid;
  gap: 0.7rem;
}

.info-card {
  border: 1px solid var(--line);
  background: white;
  border-radius: 14px;
  padding: 0.85rem;
  box-shadow: var(--shadow-soft);
}

.info-card h3 {
  font-size: 1.2rem;
}

.info-summary {
  color: var(--muted);
  margin: 0.45rem 0 0;
}

.info-link {
  margin-top: 0.55rem;
  display: inline-block;
  color: var(--accent-strong);
  font-weight: 700;
}

.info-actions {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.source-badges {
  margin-top: 0.45rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.source-badge {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.74rem;
  font-weight: 800;
  color: #204538;
  background: #e7f4ee;
}

.reliability-badge {
  border-color: transparent;
}

.reliability-high {
  background: #dff3ea;
  color: #165340;
}

.reliability-medium {
  background: #fff2de;
  color: #8e4e1e;
}

.reliability-low {
  background: #ffe6e3;
  color: #8b2b22;
}

.citation-list {
  margin: 0.55rem 0 0;
  padding-left: 1rem;
  color: var(--muted);
}

.citation-list li {
  margin: 0.2rem 0;
}

.citation-list a {
  color: var(--accent-strong);
  font-weight: 700;
}

.verification-panel h4 {
  margin: 0.7rem 0 0.2rem;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: #244237;
}

.inline-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.status-strong {
  color: var(--accent-strong);
  font-weight: 700;
}

.topic-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.45rem;
}

.topic-links a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  background: #fafdf8;
}

.topic-links a:hover {
  background: #f1f8ed;
}

#seed-library-list .empty-state,
#reminder-list .empty-state {
  margin: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.plan-list {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

.plan-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem;
  box-shadow: var(--shadow-soft);
}

.panel,
.info-card,
.plan-card,
input,
select,
textarea {
  backdrop-filter: none;
}

.plan-top {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.chip {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.category-chip {
  background: #dff2eb;
  color: #185f47;
}

.schedule-chip {
  background: #fff0e2;
  color: #9a4f1b;
}

.plant-title {
  font-size: 1.35rem;
}

.plant-meta,
.timeline,
.plant-notes {
  color: var(--muted);
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
}

.actions {
  margin-top: 0.8rem;
  display: flex;
  gap: 0.5rem;
}

.ghost-btn {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.ghost-btn:hover {
  background: #eff9f2;
  transform: translateY(-1px);
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 1.1rem;
  text-align: center;
  color: var(--muted);
}

.reveal {
  animation: rise 650ms ease both;
}

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

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  #planner-panel,
  #seed-search-panel,
  #climate-panel,
  #seed-library-panel,
  #reminders-panel,
  .panel:last-of-type {
    grid-column: 1;
  }

  .hero {
    padding: 1rem 0.9rem;
    border-radius: 20px;
  }

  .seed-form {
    grid-template-columns: 1fr;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .search-btn {
    width: 100%;
  }

  .panel-head {
    flex-direction: column;
    align-items: stretch;
  }
}
