:root {
  --bg: #101513;
  --bg-soft: #18201c;
  --card: rgba(255, 255, 255, 0.075);
  --card-strong: rgba(255, 255, 255, 0.12);
  --text: #f4f7f2;
  --muted: #b8c3b4;
  --accent: #7ed957;
  --accent-dark: #142012;
  --gold: #e2b65d;
  --empty: #d7ded4;
  --border: rgba(255, 255, 255, 0.15);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
  --radius: 22px;
  --garden-hero-image: url("../garden/2026/summary/20260702_103352.jpg");
}

* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(126, 217, 87, 0.18), transparent 30rem),
    radial-gradient(circle at bottom right, rgba(226, 182, 93, 0.12), transparent 28rem),
    linear-gradient(135deg, #0c110f, #172119 52%, #0d130f);
  line-height: 1.5;
}

a {
  color: inherit;
}

section,
.card,
.bed-content,
.auto-gallery,
.plant-detail,
.plant-detail-inner,
.equipment-details {
  min-width: 0;
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 46px;
}

/* Header */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.garden-logo-link {
  display: block;
  width: min(460px, 58vw);
  height: 150px;
  overflow: hidden;
  text-decoration: none;
  border-radius: 18px;
  flex: 0 1 auto;
}

.garden-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transform: scale(1.08);
  filter: drop-shadow(0 0 18px rgba(126, 217, 87, 0.24));
}

.back-link {
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 10px 15px;
  border-radius: 999px;
  white-space: nowrap;
  transition: 0.2s ease;
  flex: 0 0 auto;
}

.back-link:hover,
.back-link:focus {
  background: var(--card-strong);
  transform: translateY(-1px);
}

/* Hero */

.hero {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 8px);
  background:
    linear-gradient(90deg, rgba(9, 14, 10, 0.92), rgba(9, 14, 10, 0.55), rgba(9, 14, 10, 0.22)),
    var(--garden-hero-image) center/cover no-repeat;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  padding: clamp(22px, 4vw, 42px);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
}

.hero-content {
  max-width: 720px;
}

.eyebrow {
  display: inline-block;
  color: var(--accent-dark);
  background: var(--accent);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 14px;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero p {
  margin: 0;
  color: #dce8d8;
  font-size: clamp(1rem, 2vw, 1.22rem);
  max-width: 60ch;
}

/* Shared cards */

.card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.14);
  overflow: hidden;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card p {
  color: var(--muted);
  margin: 0;
}

/* Summary */

.summary-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 16px;
  margin-top: 16px;
}

.summary-card h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.quick-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  padding: 15px;
}

.stat strong {
  display: block;
  color: var(--accent);
  font-size: 1.45rem;
  line-height: 1;
}

.stat span {
  display: block;
  color: var(--muted);
  margin-top: 7px;
  font-size: 0.9rem;
}

/* Garden layout image */

.garden-map-card {
  margin-top: 16px;
}

.garden-layout-image {
  width: 100%;
  max-width: 100%;
  max-height: 620px;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
}

/* Photo galleries */

.current-garden-card {
  margin-top: 16px;
}

.photo-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 14px;
}

.photo-header h2 {
  margin: 0 0 4px;
}

.photo-header p,
.photo-date {
  color: var(--muted);
  margin: 0 0 10px;
}

.main-progress-photo {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
}

.bed-gallery,
.plant-gallery {
  margin-top: 18px;
}

.photo-timeline {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  max-width: 100%;
  padding: 12px 2px 2px;
  scrollbar-width: thin;
}

.photo-timeline button {
  flex: 0 0 96px;
  width: 96px;
  max-width: 96px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border-radius: 14px;
  padding: 7px;
  cursor: pointer;
  text-align: center;
  transition: 0.2s ease;
}

.photo-timeline button:hover,
.photo-timeline button:focus {
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-1px);
}

.photo-timeline button img {
  width: 100%;
  height: 72px;
  aspect-ratio: auto;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  margin-bottom: 6px;
}

.photo-timeline button span {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
}

.empty-gallery {
  border: 1px dashed var(--border);
  border-radius: 18px;
  padding: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

/* Bed sections */

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin: 36px 0 16px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  letter-spacing: -0.04em;
}

.section-title p {
  margin: 0;
  color: var(--muted);
  max-width: 52ch;
}

.bed-list {
  display: grid;
  gap: 14px;
}

.bed-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  align-items: start;
}

.bed-label {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-dark);
  font-weight: 900;
  font-size: 0.95rem;
}

.bed-label.gold {
  background: var(--gold);
}

.bed-label.empty {
  background: var(--empty);
}

.bed-content h3 {
  margin: 0 0 8px;
  font-size: 1.28rem;
}

.plant-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.plant-list li {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.07);
  color: #edf5ea;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.88rem;
}

/* Plant dropdown details */

.plant-details,
.equipment-details {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.plant-details h4 {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
}

.plant-detail {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  overflow: hidden;
}

.plant-detail summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 15px 44px 15px 16px;
  color: var(--text);
  font-weight: 800;
  border-radius: 18px;
  transition: 0.2s ease;
}

.plant-detail summary::-webkit-details-marker {
  display: none;
}

.plant-detail summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--accent);
  transform: translateY(-50%);
  font-weight: 900;
  line-height: 1;
}

.plant-detail[open] summary {
  background: rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid var(--border);
  border-radius: 18px 18px 0 0;
}

.plant-detail[open] summary::after {
  content: "−";
}

.plant-detail-inner {
  padding: 16px;
}

.plant-notes {
  color: var(--muted);
  margin: 0;
}

.plant-meta-list {
  margin-top: 12px;
}

.plant-detail .main-progress-photo {
  aspect-ratio: 4 / 3;
}

.plant-detail .photo-timeline button {
  flex-basis: 82px;
  width: 82px;
  max-width: 82px;
}

.plant-detail .photo-timeline button img {
  height: 62px;
}

/* Equipment */

.equipment-card h3 {
  margin-bottom: 8px;
}

.equipment-details {
  margin-top: 16px;
}

/* Notes */

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

footer {
  text-align: center;
  color: var(--muted);
  margin-top: 42px;
  font-size: 0.92rem;
}

/* Cached Garden Gallery Controls */

.garden-main-photo-button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.garden-main-photo-button .main-progress-photo {
  pointer-events: none;
}

.garden-lightbox-source {
  display: none;
}

.photo-timeline button.is-active {
  border-color: var(--accent);
  background: rgba(126, 217, 87, 0.15);
  box-shadow: 0 0 0 2px rgba(126, 217, 87, 0.12);
}

/* Tablet */

@media (max-width: 900px) {
  .summary-grid,
  .notes-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile */

@media (max-width: 620px) {
  .page {
    width: 100%;
    padding: 14px 12px 46px;
  }

  .site-header {
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    margin-bottom: 14px;
  }

  .garden-logo-link {
    width: min(230px, 54vw);
    height: 90px;
    border-radius: 14px;
  }

  .garden-logo {
    transform: scale(1.1);
  }

  .back-link {
    padding: 9px 12px;
    font-size: 0.88rem;
  }

  .hero {
    min-height: 330px;
    padding: 22px;
    background:
      linear-gradient(0deg, rgba(9, 14, 10, 0.94), rgba(9, 14, 10, 0.45)),
      var(--garden-hero-image) center/cover no-repeat;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }

  .garden-layout-image {
    max-height: 420px;
    border-radius: 14px;
  }

  .section-title {
    display: block;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .section-title p {
    margin-top: 6px;
  }

  .bed-list {
    width: 100%;
  }

  .bed-row {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 22px;
  }

  .bed-label {
    width: fit-content;
    padding: 0 16px;
  }

  .current-garden-card,
  .card {
    width: 100%;
  }

  .main-progress-photo {
    aspect-ratio: 4 / 3;
  }

  .photo-timeline button {
    flex-basis: 88px;
    width: 88px;
    max-width: 88px;
  }

  .photo-timeline button img {
    height: 66px;
  }

  .plant-detail summary {
    padding: 14px 42px 14px 14px;
  }

  .plant-detail-inner {
    padding: 14px;
  }

  .plant-detail .photo-timeline button {
    flex-basis: 78px;
    width: 78px;
    max-width: 78px;
  }

  .plant-detail .photo-timeline button img {
    height: 58px;
  }
}