/* ── Design tokens ───────────────────────────────────────────── */
:root {
  --bg:           #F5F0E8;
  --surface:      #EDE7DA;
  --surface2:     #E3DBCb;
  --card:         #FAF7F2;
  --primary:      #4A7C59;
  --primary-soft: #7BAD8A;
  --accent:       #E07A38;
  --accent2:      #C2996A;
  --text:         #2A1F14;
  --text-muted:   #7A6A5A;
  --border:       #D3C9BA;
  --shadow-sm:    0 1px 3px rgba(42,31,20,0.08);
  --shadow-md:    0 4px 16px rgba(42,31,20,0.10);
  --shadow-lg:    0 8px 32px rgba(42,31,20,0.14);
  --r:            14px;
  --r-sm:         8px;
  --r-pill:       999px;

  /* flower colours */
  --poppy:       #F4883A;
  --lupine:      #7060C4;
  --yarrow:      #E8AABA;
  --fuchsia:     #C43558;
  --bluegrass:   #6AADD8;
  --monkey:      #E06060;
}

/* ── Reset / base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

/* ── Layout shell ────────────────────────────────────────────── */
#app {
  display: flex;
  height: 100%;
  flex-direction: column;
}

/* desktop sidebar */
#sidebar {
  display: none;
  width: 64px;
  flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--border);
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  gap: 8px;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 50;
}

#sidebar .logo-mark {
  font-family: 'Lora', serif;
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 16px;
  line-height: 1;
}

#sidebar .nav-item {
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: background 0.18s, color 0.18s;
}
#sidebar .nav-item:hover { background: var(--surface); color: var(--text); }
#sidebar .nav-item.active { background: var(--primary); color: #fff; }
#sidebar .nav-item svg { width: 20px; height: 20px; }

/* main content area */
#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* sections */
.section {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}
.section.active { display: flex; }

/* ── Mobile bottom nav ──────────────────────────────────────── */
#bottom-nav {
  display: flex;
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  border-radius: var(--r-pill);
  padding: 8px 6px;
  gap: 2px;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  align-items: center;
}

#bottom-nav .bn-item {
  width: 48px; height: 40px;
  border-radius: var(--r-pill);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: rgba(255,255,255,0.5);
  transition: background 0.18s, color 0.18s;
  gap: 2px;
  font-size: 10px;
  font-weight: 500;
}
#bottom-nav .bn-item svg { width: 18px; height: 18px; }
#bottom-nav .bn-item:hover { color: rgba(255,255,255,0.8); }
#bottom-nav .bn-item.active { background: var(--primary); color: #fff; }

/* ── Garden view ─────────────────────────────────────────────── */
#section-garden {
  padding: 24px 20px 100px;
}

.garden-header {
  padding: 20px 20px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.garden-title {
  font-family: 'Lora', serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.garden-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-add {
  flex-shrink: 0;
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-pill);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  transition: background 0.18s, transform 0.15s;
  box-shadow: var(--shadow-sm);
}
.btn-add:hover { background: #3d6b4b; transform: translateY(-1px); }
.btn-add svg { width: 15px; height: 15px; }

/* Water strip */
.water-strip {
  margin: 0 20px 16px;
  background: linear-gradient(135deg, #dff0e8 0%, #edf5e1 100%);
  border: 1px solid #c6ddc9;
  border-radius: var(--r);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.water-info { flex: 1; }
.water-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}
.water-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}
.btn-water {
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-pill);
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  display: flex; align-items: center; gap: 7px;
  transition: background 0.18s, transform 0.15s, opacity 0.18s;
  flex-shrink: 0;
}
.btn-water:hover:not(:disabled) { background: #3d6b4b; transform: translateY(-1px); }
.btn-water:disabled {
  background: var(--surface2);
  color: var(--text-muted);
  cursor: default;
}
.btn-water svg { width: 16px; height: 16px; }

/* Mini stats bar */
.stats-bar {
  margin: 0 20px 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.stat-pill {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 5px;
}
.stat-pill strong { color: var(--text); font-weight: 600; }

/* Garden canvas */
#garden-grid {
  margin: 0 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 12px;
}

/* Plant card */
.plant-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: box-shadow 0.18s, transform 0.18s;
  position: relative;
  overflow: hidden;
}
.plant-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.plant-card.faded { opacity: 0.55; filter: grayscale(0.4); }
.plant-card.faded:hover { opacity: 0.75; }

.plant-svg-wrap {
  width: 100px; height: 100px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}

.plant-svg-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.plant-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.2;
  max-width: 78px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plant-type {
  font-size: 8px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.1;
  max-width: 78px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.plant-role {
  font-size: 9px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
  max-width: 78px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.state-badge {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  border-radius: 50%;
}
.state-sprouts { background: #90EE90; }
.state-full_leaves { background: #7CB342; }
.state-pruned { background: #9E9E9E; }

/* Empty garden state */
#empty-garden {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  text-align: center;
  gap: 12px;
  flex: 1;
}
#empty-garden .empty-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 8px;
}
#empty-garden h3 {
  font-family: 'Lora', serif;
  font-size: 20px;
  color: var(--text);
}
#empty-garden p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 260px;
  line-height: 1.6;
}

/* Water shimmer animation */
@keyframes shimmer {
  0%   { filter: brightness(1) saturate(1); }
  40%  { filter: brightness(1.25) saturate(1.3); }
  100% { filter: brightness(1) saturate(1); }
}
.shimmer { animation: shimmer 0.8s ease forwards; }

/* Plant entrance */
@keyframes plant-in {
  0%   { opacity: 0; transform: scale(0.6) translateY(10px); }
  60%  { transform: scale(1.08) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.plant-enter { animation: plant-in 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }

/* ── Stats section ──────────────────────────────────────────── */
#section-stats {
  padding: 24px 20px 100px;
  gap: 8px;
}
.stats-heading {
  font-family: 'Lora', serif;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
}
.stats-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.stat-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stat-row-label {
  font-size: 14px;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 10px;
}
.stat-row-label svg { width: 18px; height: 18px; opacity: 0.6; }
.stat-row-val {
  font-family: 'Lora', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
.legend-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
  font-size: 12px;
  transition: background 0.18s, transform 0.15s, border-color 0.18s;
}
.legend-item:hover {
  background: var(--surface);
  border-color: var(--primary);
  transform: translateY(-1px);
}
.legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-name { font-weight: 600; color: var(--text); }
.legend-count { color: var(--text-muted); margin-top: 1px; }

/* ── Share section ──────────────────────────────────────────── */
#section-share {
  padding: 24px 20px 100px;
  gap: 16px;
}
.share-heading {
  font-family: 'Lora', serif;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
}
.share-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.raison-detre-card {
  background: linear-gradient(135deg, rgba(74, 124, 89, 0.06) 0%, rgba(168, 213, 168, 0.04) 100%);
  border: 1.5px solid rgba(74, 124, 89, 0.15);
  border-radius: var(--r);
  padding: 22px 20px;
  margin-bottom: 8px;
}

.raison-detre-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
  letter-spacing: 0.3px;
  margin: 0;
  font-weight: 500;
}

.share-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.toggle-label { font-size: 14px; font-weight: 600; color: var(--text); }
.toggle-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.toggle-switch {
  position: relative;
  width: 46px; height: 26px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: var(--r-pill);
  transition: background 0.2s;
  cursor: pointer;
}
.toggle-track::after {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-track { background: var(--primary); }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(20px); }

.url-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.url-text {
  flex: 1;
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
  font-family: monospace;
}
.btn-copy {
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  transition: background 0.18s;
}
.btn-copy:hover { background: #3d6b4b; }

.share-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.share-field input, .share-field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s, background 0.18s;
}
.share-field input:focus, .share-field textarea:focus {
  border-color: var(--primary);
  background: var(--card);
}
.btn-share-save {
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-pill);
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 600;
  align-self: flex-start;
  transition: background 0.18s, transform 0.15s;
}
.btn-share-save:hover { background: #3d6b4b; transform: translateY(-1px); }

/* ── Public garden view ─────────────────────────────────────── */
#public-view {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  background: #F6F3EE;
}
#public-view.active { display: flex; }

/* Public app header with creator attribution */
.public-app-header {
  background: #F6F3EE;
  border-bottom: none;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  gap: 8px;
}

.public-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.public-header-credit {
  color: #8B7D6B;
}

.public-header-credit strong {
  color: #2A1F14;
  font-weight: 600;
}

.public-header-link {
  color: #3F6F4F;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.18s;
}

.public-header-link:hover {
  opacity: 0.7;
}

/* Main scrollable container */
.public-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 0;
}

/* Profile section - two column layout */
.public-profile-container {
  display: flex;
  gap: 48px;
  width: 100%;
  margin-bottom: 32px;
  align-items: flex-start;
}

.public-profile-left {
  display: flex;
  gap: 20px;
  flex: 1;
  align-items: flex-start;
}

.public-profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3F6F4F 0%, #5A8E6B 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(63, 111, 79, 0.18);
}

.public-profile-text {
  flex: 1;
}

.public-profile-name {
  font-size: 32px;
  font-weight: 800;
  color: #2A1F14;
  margin: 0 0 10px 0;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.public-profile-bio {
  font-size: 14px;
  color: #544C42;
  line-height: 1.6;
  margin: 0;
  font-weight: 400;
}

.public-looking-for-container {
  flex: 0 0 auto;
  text-align: right;
}

.public-looking-for-label {
  font-size: 12px;
  color: #5A4A3A;
  font-weight: 600;
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.public-looking-for-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(74, 124, 89, 0.08);
  border: 1px solid rgba(74, 124, 89, 0.15);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  color: #3F6F4F;
  font-weight: 500;
  transition: all 0.2s ease;
}

.public-looking-for-badge:hover {
  background: rgba(74, 124, 89, 0.12);
  border-color: rgba(74, 124, 89, 0.25);
}

#looking-for-skills {
  line-height: 1.4;
}

/* Action buttons */
.public-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  width: 100%;
  max-width: 600px;
}

.public-btn-primary,
.public-btn-secondary {
  flex: 1;
  height: 52px;
  border: none;
  border-radius: 26px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.2px;
}

.public-btn-primary {
  background: linear-gradient(135deg, #3F6F4F 0%, #2D5239 100%);
  color: #fff;
  box-shadow: 0 12px 32px rgba(63, 111, 79, 0.25);
}

.public-btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(63, 111, 79, 0.35);
}

.public-btn-primary:active {
  transform: translateY(-2px);
}

.public-btn-secondary {
  background: rgba(255, 255, 255, 1);
  color: #3F6F4F;
  border: 2.5px solid #3F6F4F;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(63, 111, 79, 0.12);
}

.public-btn-secondary:hover {
  background: rgba(255, 255, 255, 1);
  border-color: #2D5239;
  color: #2D5239;
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(63, 111, 79, 0.20);
}

.public-btn-secondary:active {
  transform: translateY(-2px);
}

.public-btn-primary svg,
.public-btn-secondary svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Why Job Garden button */
.public-why-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: #3F6F4F;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 0;
  transition: color 0.18s, opacity 0.18s;
  margin-bottom: 40px;
  text-decoration: none;
}

.public-why-button:hover {
  color: #2D5239;
  opacity: 0.8;
}

.public-why-button svg {
  width: 18px;
  height: 18px;
}

/* Raison d'être card */
.public-raison-detre {
  width: 100%;
  max-width: 600px;
  background: linear-gradient(135deg, rgba(74, 124, 89, 0.06) 0%, rgba(168, 213, 168, 0.04) 100%);
  border: 1.5px solid rgba(74, 124, 89, 0.15);
  border-radius: 16px;
  padding: 28px 24px;
  margin-bottom: 40px;
}

.public-raison-detre-text {
  font-size: 15px;
  color: #2A1F14;
  line-height: 1.8;
  letter-spacing: 0.3px;
  margin: 0;
  font-weight: 500;
}

/* Stats cards section */
.public-stats-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  margin-bottom: 40px;
}

.public-stats-card {
  background: linear-gradient(135deg, #FAFAF8 0%, #F5F1EB 100%);
  border: 1.5px solid #E8E3D8;
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(63, 111, 79, 0.04),
              inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
}

.public-stats-card:hover {
  border-color: rgba(74, 124, 89, 0.3);
  box-shadow: 0 12px 32px rgba(63, 111, 79, 0.12),
              inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform: translateY(-4px);
  background: linear-gradient(135deg, #FFF 0%, #F8F4ED 100%);
}

.stats-card-icon {
  font-size: 36px;
  margin-bottom: 12px;
  display: inline-block;
  transition: transform 0.3s ease;
}

.public-stats-card:hover .stats-card-icon {
  transform: scale(1.15);
}

.stats-card-number {
  font-size: 32px;
  font-weight: 800;
  color: #2A1F14;
  margin: 0;
  line-height: 1;
  letter-spacing: -0.5px;
}

.stats-card-label {
  font-size: 13px;
  color: #3F6F4F;
  font-weight: 700;
  margin: 10px 0 6px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-card-description {
  font-size: 12px;
  color: #7A6A5A;
  font-weight: 400;
  margin: 0;
  line-height: 1.4;
}

.stats-card-description {
  font-size: 12px;
  color: #7A6A5A;
  margin: 0;
  line-height: 1.4;
}

/* Garden visualization (HERO) */
.public-garden-hero {
  width: 100%;
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
}

.public-garden-hero > div {
  width: 100%;
  max-width: 900px;
}

.public-garden-hero #public-garden-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 20px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #F6F3EE;
  box-shadow: 0 24px 64px rgba(63, 111, 79, 0.16), 
              0 12px 32px rgba(63, 111, 79, 0.10),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.public-garden-hero #public-garden-canvas:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 72px rgba(63, 111, 79, 0.20), 
              0 14px 36px rgba(63, 111, 79, 0.14);
}



/* Minimal stats row */
.public-stats-minimal {
  display: flex;
  gap: 32px;
  justify-content: center;
  margin-bottom: 48px;
  width: 100%;
  flex-wrap: wrap;
}

.public-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.public-stat .stat-emoji {
  font-size: 20px;
}

.public-stat-label {
  color: #5A4A3A;
  font-weight: 500;
}

/* Share section */
.public-share-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  width: 100%;
  max-width: 700px;
  margin-bottom: 72px;
  padding: 40px 40px;
  background: linear-gradient(135deg, rgba(63, 111, 79, 0.08) 0%, rgba(168, 213, 168, 0.06) 100%);
  border-radius: 24px;
  border: 1.5px solid rgba(63, 111, 79, 0.12);
  box-shadow: 0 12px 40px rgba(63, 111, 79, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
}

.public-share-section:hover {
  border-color: rgba(63, 111, 79, 0.20);
  box-shadow: 0 16px 48px rgba(63, 111, 79, 0.12),
              inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.public-share-text {
  flex: 1;
}

.public-share-count {
  font-size: 19px;
  font-weight: 700;
  color: #2A1F14;
  margin: 0 0 10px 0;
  letter-spacing: -0.3px;
}

.public-share-message {
  font-size: 15px;
  color: #544C42;
  margin: 0;
  line-height: 1.6;
  letter-spacing: 0.3px;
}




/* Responsive design */
@media (max-width: 768px) {
  .public-container {
    padding: 32px 16px 0;
  }

  .public-profile-container {
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
  }

  .public-looking-for-container {
    text-align: left;
  }

  .public-profile-name {
    font-size: 28px;
  }

  .public-profile-bio {
    font-size: 13px;
  }

  .public-buttons {
    flex-direction: column;
    margin-bottom: 32px;
    gap: 10px;
  }

  .public-btn-primary,
  .public-btn-secondary {
    width: 100%;
  }

  .public-stats-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 32px;
  }

  .stats-card-number {
    font-size: 24px;
  }

  .stats-card-label {
    font-size: 11px;
  }

  .public-garden-hero {
    margin-bottom: 32px;
  }



  .public-share-section {
    flex-direction: column;
    gap: 24px;
    padding: 32px 24px;
    margin-bottom: 48px;
  }

  .public-footer {
    padding: 24px 16px;
  }
}

@media (max-width: 480px) {
  .public-container {
    padding: 24px 12px 0;
  }

  .public-profile-avatar {
    width: 56px;
    height: 56px;
    font-size: 28px;
  }

  .public-profile-name {
    font-size: 24px;
  }

  .public-profile-bio {
    font-size: 12px;
  }

  .public-looking-for-label {
    font-size: 11px;
  }

  .public-looking-for-badge {
    font-size: 12px;
    padding: 6px 10px;
  }

  .public-buttons {
    margin-bottom: 24px;
    gap: 8px;
  }

  .public-btn-primary,
  .public-btn-secondary {
    height: 44px;
    font-size: 14px;
  }

  .public-stats-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 24px;
  }

  .public-stats-card {
    padding: 16px 10px;
  }

  .stats-card-icon {
    font-size: 28px;
    margin-bottom: 6px;
  }

  .stats-card-number {
    font-size: 20px;
  }

  .stats-card-label {
    font-size: 10px;
    margin: 6px 0 4px 0;
  }

  .stats-card-description {
    font-size: 10px;
  }

  .public-garden-text {
    padding: 16px 24px;
  }

  .public-garden-text p {
    font-size: 16px;
  }



  .public-share-section {
    padding: 28px 20px;
    margin-bottom: 48px;
  }

  .public-share-count {
    font-size: 16px;
  }

  .public-share-message {
    font-size: 13px;
  }
}


@media (max-width: 480px) {
  .btn-primary-large {
    padding: 14px 32px;
    font-size: 15px;
    max-width: 100%;
  }
  
  .btn-support {
    padding: 11px 16px;
    font-size: 13px;
    flex: 1 1 calc(50% - 5px);
    min-width: auto;
  }
  
  .list-status-select {
    max-width: 140px;
    padding: 6px 8px;
    font-size: 11px;
  }
}

.help-option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #F9F7F4;
  border: 1.5px solid #E8E3D8;
  border-radius: var(--r);
  padding: 16px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  box-shadow: 0 2px 8px rgba(42,31,20,0.06);
}

.help-option-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(74,124,89,0.2);
}

.help-option-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Consolidated help modal form styles */
#help-step-1, #help-step-2, #help-step-3 {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#help-step-2 input, #help-step-3 textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--text);
  background: var(--card);
  font-family: inherit;
  outline: none;
  transition: all 0.18s ease;
  box-shadow: 0 2px 8px rgba(42,31,20,0.04);
}

#help-step-2 input:focus, #help-step-3 textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 4px 12px rgba(74,124,89,0.12);
}

#help-step-2 input::placeholder, #help-step-3 textarea::placeholder {
  color: #9A8A7A;
}




/* Message item styling */
.message-item {
  transition: background 0.18s, box-shadow 0.18s;
}

.message-item:hover {
  background: var(--card) !important;
  box-shadow: var(--shadow-sm);
}

.message-actions button:hover {
  opacity: 0.85;
  transform: scale(1.05);
}
#add-modal, #status-modal, #water-modal, #flower-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--playful-surface-scrim);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
#add-modal.open, #status-modal.open, #water-modal.open, #flower-modal.open {
  opacity: 1;
  pointer-events: all;
}

.modal-sheet {
  background: var(--card);
  border-radius: 20px 20px 0 0;
  padding: 20px 20px 40px 20px;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  transform: translateY(40px);
  transition: transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
}
#add-modal.open .modal-sheet,
#status-modal.open .modal-sheet,
#water-modal.open .modal-sheet,
#flower-modal.open .modal-sheet { transform: translateY(0); }

.modal-handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 16px;
}
.modal-title {
  font-family: 'Lora', serif;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 18px;
}
.form-field {
  margin-bottom: 14px;
}
.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s, background 0.18s;
  -webkit-appearance: none;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  border-color: var(--primary);
  background: var(--card);
}
.form-field textarea { resize: vertical; min-height: 70px; }

.form-actions {
  display: flex; gap: 10px; margin-top: 4px;
}
.btn-primary {
  flex: 1;
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-pill);
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.18s;
}
.btn-primary:hover { background: #3d6b4b; }
.btn-cancel {
  background: var(--surface);
  color: var(--text-muted);
  border-radius: var(--r-pill);
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.18s;
}
.btn-cancel:hover { background: var(--surface2); }

/* Status options */
.status-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.status-opt {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--r);
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}
.status-opt:hover { border-color: var(--primary-soft); background: var(--card); }
.status-opt.active { border-color: var(--primary); background: #edf5f0; }
.status-opt-icon { font-size: 28px; margin-bottom: 4px; }
.status-opt-name { font-size: 13px; font-weight: 600; color: var(--text); }
.status-opt-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Water action buttons */
.water-action-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.water-action-btn:hover {
  border-color: var(--primary);
  background: var(--card);
  transform: translateY(-2px);
}

/* Detail in status modal */
.app-detail-row {
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.app-detail-company { font-weight: 600; font-size: 15px; }
.app-detail-role { font-size: 13px; color: var(--text-muted); }

/* ── Toast ───────────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #fff;
  border-radius: var(--r-pill);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
  white-space: nowrap;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── App header ──────────────────────────────────────────────– */
#app-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  gap: 8px;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  font-size: 11px;
}

.header-credit {
  color: var(--text-muted);
}

.header-credit strong {
  color: var(--text);
  font-weight: 600;
}

.header-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.header-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.18s;
}

.header-link:hover {
  opacity: 0.8;
}

/* Mobile header stacking */
@media (max-width: 640px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  
  .header-subtitle {
    white-space: normal;
  }
}

/* ── Easter egg ──────────────────────────────────────────────── */
#easter-egg {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #C6E5D3;
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  color: white;
  cursor: pointer;
  z-index: 90;
  transition: background 0.18s;
}
#easter-egg:hover { background: #B0D8C5; opacity: 0.9; }

/* ── List view ──────────────────────────────────────────────── */
#section-list {
  padding: 24px 20px 100px;
  gap: 16px;
}

.list-heading {
  font-family: 'Lora', serif;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
}

.list-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

#list-apps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  transition: box-shadow 0.18s, transform 0.18s;
}
.list-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.list-item-header {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.list-item-company {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.list-item-role {
  font-size: 12px;
  color: var(--text-muted);
}

.list-item-status {
  flex-shrink: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* On narrow screens, let the status area go to its own row */
@media (max-width: 480px) {
  .list-item {
    flex-wrap: wrap;
    gap: 8px;
  }
  .list-item-header {
    flex: 1 1 auto;
    min-width: 0;
    width: calc(100% - 36px); /* account for checkbox */
  }
  .list-item-status {
    width: 100%;
    justify-content: flex-end;
    padding-left: 36px; /* align with header text */
    flex-shrink: 0;
  }
  .list-status-select {
    max-width: 160px;
  }
}

.list-status-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-status-select:hover {
  border-color: var(--primary);
  background: var(--card);
}

.list-status-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(74, 124, 89, 0.1);
}

/* Bulk actions toolbar */
#bulk-actions-toolbar {
  flex-wrap: wrap;
}

#bulk-delete-btn:hover {
  background: #C2754B;
}

#bulk-delete-btn:active {
  transform: scale(0.98);
}

/* Sort buttons */
#sort-date-btn,
#sort-status-btn {
  transition: background 0.18s, color 0.18s, border-color 0.18s, opacity 0.18s, transform 0.15s;
}

#sort-date-btn:hover,
#sort-status-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

#sort-date-btn:active,
#sort-status-btn:active {
  transform: translateY(0);
}

#empty-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  text-align: center;
  gap: 12px;
  flex: 1;
}
#empty-list .empty-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 8px;
}
#empty-list h3 {
  font-family: 'Lora', serif;
  font-size: 20px;
  color: var(--text);
}
#empty-list p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 260px;
  line-height: 1.6;
}

/* ── Help guide ─────────────────────────────────────────────── */
#help-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--playful-surface-scrim);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
#help-modal.open {
  opacity: 1;
  pointer-events: all;
}

.help-sheet {
  background: var(--card);
  border-radius: 20px 20px 0 0;
  padding: 20px;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  transform: translateY(40px);
  transition: transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
}
#help-modal.open .help-sheet {
  transform: translateY(0);
}

.help-close {
  float: right;
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.18s;
}
.help-close:hover {
  background: var(--surface2);
}

.help-content {
  clear: both;
  margin-top: 16px;
}

.help-item {
  margin-bottom: 20px;
}

.help-item h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.help-item p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Responsive: mobile and tablet ─────────────────────────────── */
@media (max-width: 767px) {
  .water-strip { margin-top: 20px; }
}

/* ── Responsive: desktop ─────────────────────────────────────── */
@media (min-width: 768px) {
  #bottom-nav { display: none; }

  #sidebar { display: flex; }

  .water-strip { margin-top: 20px; }

  #app {
    flex-direction: row;
  }

  #main {
    margin-left: 64px;
    width: calc(100vw - 64px);
  }

  .section { padding-bottom: 40px; }
  #section-garden { padding-bottom: 40px; }
  #section-stats { padding-bottom: 40px; }
  #section-share { padding-bottom: 40px; }

  #garden-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 14px;
    margin: 0 24px;
  }
  #public-garden-grid {
    padding: 24px;
  }

  .garden-header { padding: 28px 24px 14px; }
  .garden-title { font-size: 32px; }

  .water-strip { margin: 0 24px 20px; }
  .stats-bar { margin: 0 24px 24px; }

  #section-stats, #section-share {
    padding: 28px 24px 40px;
  }

  #toast { bottom: 24px; }
  #easter-egg { bottom: 24px; right: 24px; }

  #add-modal, #status-modal {
    align-items: center;
  }
  .modal-sheet {
    border-radius: 20px;
    margin-bottom: 0;
  }

  .legend-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Flower SVG animations ──────────────────────────────────── */
@keyframes sway {
  0%, 100% { transform: rotate(-2deg); }
  50%       { transform: rotate(2deg); }
}
@keyframes bloom-pop {
  0%   { transform: scale(0.5); opacity: 0; }
  70%  { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes sprout-up {
  0%   { transform: scaleY(0); transform-origin: bottom; }
  100% { transform: scaleY(1); transform-origin: bottom; }
}

.flower-svg-wrap svg {
  animation: sway 4s ease-in-out infinite;
  transform-origin: bottom center;
  animation-delay: var(--sway-delay, 0s);
}
.flower-card.faded .flower-svg-wrap svg {
  animation: none;
}

/* ── Dialog / Modal ──────────────────────────────────────────── */
dialog.playful-dialog {
  border: none;
  border-radius: 20px;
  padding: 0;
  background: #FFFFFF;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24), 0 8px 24px rgba(0, 0, 0, 0.12);
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
}

dialog.playful-dialog::backdrop {
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(3px);
}

dialog.playful-dialog[open] {
  animation: modal-slide-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-slide-in {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Help Modal Styling */
.playful-dialog {
  border: none;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  background: #FAFAF8;
  padding: 0;
  max-width: 500px;
}

.playful-dialog::backdrop {
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
}

#public-help-modal input[type="email"],
#public-help-modal input[type="text"],
#public-help-modal textarea {
  background: #FAFAFA !important;
  border: 1.5px solid #E8E3D8 !important;
  border-radius: var(--r-sm) !important;
  padding: 13px 14px !important;
  font-size: 14px !important;
  color: var(--text) !important;
  transition: all 0.18s ease !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04) !important;
  font-family: inherit !important;
}

#public-help-modal input[type="email"]:focus,
#public-help-modal input[type="text"]:focus,
#public-help-modal textarea:focus {
  border-color: var(--primary) !important;
  background: #FFFFFF !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04), 0 0 0 3px rgba(74,124,89,0.1) !important;
  outline: none !important;
}

#public-help-modal textarea {
  resize: none !important;
  font-family: inherit !important;
  line-height: 1.5 !important;
  min-height: 120px !important;
}

#public-help-modal input::placeholder,
#public-help-modal textarea::placeholder {
  color: #ABA08A !important;
}

/* Loading state */
#loading {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 500;
  gap: 12px;
  transition: opacity 0.4s;
}
#loading.hide { opacity: 0; pointer-events: none; }

/* Mobile responsive adjustments */
@media (max-width: 480px) {
  .public-header {
    padding: 32px 20px 24px;
    gap: 16px;
  }
  
  .public-avatar {
    width: 70px;
    height: 70px;
    font-size: 32px;
  }
  
  .public-title {
    font-size: 26px;
    font-weight: 800;
  }
  
  .public-desc {
    font-size: 15px;
    margin-top: 8px;
  }
}
#loading .load-title {
  font-family: 'Lora', serif;
  font-size: 28px;
  color: var(--primary);
}
#loading .load-sub {
  font-size: 13px;
  color: var(--text-muted);
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loader-ring {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
