/* ==========================================================================
   Colton's Plant Companion — Warm Earth Theme
   Mobile-first botanical garden journal aesthetic
   ========================================================================== */

/* ---------- Custom Properties — Sand & Stone with Pops ---------- */
:root {
  /* Backgrounds — warm sand tones */
  --bg-primary: #f6f2ec;
  --bg-secondary: #ece7df;
  --bg-card: #fffefa;
  --bg-card-hover: #faf6f0;

  /* Text — deep stone greys */
  --text-primary: #2c2926;
  --text-secondary: #5e5854;
  --text-tertiary: #8a8480;

  /* Accents — stone & sage */
  --accent-botanical: #4d7050;
  --accent-botanical-light: #e4ede6;
  --accent-terracotta: #a0785a;
  --accent-terracotta-light: #f2ebe3;

  /* Pops of color — botanical accents */
  --pop-coral: #b86e58;
  --pop-sage: #4d7050;  /* Unified with --accent-botanical */
  --pop-ochre: #9e8438;
  --pop-slate: #5e7180;

  /* Claude brand */
  --claude-orange: #D97757;

  /* Borders & Shadows — soft stone */
  --border-soft: #ddd8d0;
  --shadow-warm: rgba(60, 50, 40, 0.06);
  --shadow-warm-lg: rgba(60, 50, 40, 0.12);

  /* Pill variants — muted earth tones */
  --pill-shade-bg: #dfe8e9;
  --pill-shade-text: #3d6068;
  --pill-sun-bg: #f5edda;
  --pill-sun-text: #6b5a2e;
  --pill-heat-bg: #f4e2da;
  --pill-heat-text: #7a3e22;
  --pill-cool-bg: #dce4f0;
  --pill-cool-text: #3a4e6a;
  --pill-zone-bg: #e8e2ee;
  --pill-zone-text: #4a3868;
  --pill-bee-bg: #f5f0dd;
  --pill-bee-text: #6a5a28;
  --pill-perennial-bg: #ddeae0;
  --pill-perennial-text: #2d5e3a;
  --pill-annual-bg: #f4e4da;
  --pill-annual-text: #7a3e22;

  /* Tabs */
  --tab-active: var(--accent-terracotta);
  --tab-inactive: #9e9790;

  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fast: 150ms var(--ease-out);
  --transition-base: 250ms var(--ease-out);
  --transition-slow: 400ms var(--ease-out);
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  font-display: swap;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle sand-grain texture overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(100, 80, 60, 0.03) 1px, transparent 1px),
    radial-gradient(circle at 80% 70%, rgba(100, 80, 60, 0.02) 1px, transparent 1px);
  background-size: 4px 4px, 6px 6px;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: "Fraunces", "Georgia", serif;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
}

/* ---------- Utility ---------- */
.hidden {
  display: none !important;
}

.scroll-x {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.scroll-x::-webkit-scrollbar {
  display: none;
}

/* ---------- App Shell ---------- */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: 100vw;
  overflow: hidden;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
  padding: 16px 20px 12px;
  background: linear-gradient(135deg, rgba(90, 138, 98, 0.08) 0%, rgba(122, 158, 128, 0.04) 100%);
  border-bottom: 1px solid rgba(90, 138, 98, 0.12);
}

.header-greeting {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.header-meta {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--pop-sage);
  font-weight: 500;
}

.app-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* ---------- Views & Page Transitions ---------- */
.view {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: var(--space-md);
  padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.view.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.view-scroll {
  min-height: 100%;
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.view-title {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.scroll-x {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scroll-x::-webkit-scrollbar { display: none; }

.clickable { cursor: pointer; }
.clickable:hover { opacity: 0.8; }

/* ---------- Buttons: Variants ---------- */
.btn-sm {
  padding: 6px 14px;
  font-size: 0.78rem;
  min-height: 44px;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.btn-danger-icon:hover {
  background: var(--pill-heat-bg);
  color: var(--pill-heat-text);
  border-color: var(--pill-heat-text);
}

/* ---------- Zone Card Sub-components ---------- */
.zone-card-name {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.zone-card-meta {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.zone-card-notes {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  font-style: italic;
  margin-top: 4px;
}

.zone-meta {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.zone-meta-tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-secondary, #ede9e2);
  color: var(--text-secondary);
}

.zone-card-actions {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  padding: 4px;
}

.zone-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-soft);
}

.zone-plant-thumb {
  flex-shrink: 0;
  text-align: center;
  width: 68px;
  cursor: pointer;
}

.zone-plant-thumb img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid var(--bg-primary);
  transition: border-color 0.15s;
}

.zone-plant-thumb:hover img {
  border-color: var(--accent-botanical);
}

.zone-plant-thumb span {
  display: block;
  font-size: 0.65rem;
  color: var(--text-tertiary);
  margin-top: 3px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zone-card-count {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  padding: var(--space-xs) var(--space-md) var(--space-md);
}

/* ---------- Zone/Planner Pills ---------- */
.zone-pill {
  flex-shrink: 0;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-soft);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.zone-pill:hover {
  border-color: var(--accent-terracotta);
  color: var(--accent-terracotta);
}

.zone-pill.active {
  background: var(--accent-terracotta);
  border-color: var(--accent-terracotta);
  color: #fff;
}

/* ---------- Tab Bar ---------- */
.tab-bar {
  position: sticky;
  bottom: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  height: calc(60px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(246, 242, 236, 0.85);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  padding: var(--space-sm) 0;
  color: var(--tab-inactive);
  transition: color var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
}

.tab-item.active {
  color: var(--tab-active);
}

.tab-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.tab-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
}

/* ---------- Search Bar ---------- */
.search-bar {
  width: 100%;
  box-sizing: border-box;
  padding: 10px var(--space-md);
  min-height: 44px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
  font-size: 1rem;
  color: var(--text-primary);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.search-bar:focus-within {
  border-color: var(--accent-terracotta);
  box-shadow: 0 0 0 3px var(--accent-terracotta-light);
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  color: var(--text-primary);
}

.search-bar input::placeholder {
  color: var(--text-tertiary);
}

.search-bar svg,
.search-bar .search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

/* ---------- Filter Chips ---------- */
.filter-chips {
  display: flex;
  gap: var(--space-sm);
  padding-bottom: var(--space-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex-shrink: 0;
  padding: 7px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-soft);
  background: var(--bg-card);
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all var(--transition-fast);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.filter-chip:hover {
  border-color: var(--accent-terracotta);
  color: var(--accent-terracotta);
}

.filter-chip.active {
  background: var(--accent-terracotta);
  border-color: var(--accent-terracotta);
  color: #fff;
}

/* ---------- Plant Count ---------- */
.plant-count {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-bottom: var(--space-md);
  font-weight: 500;
}

/* ---------- Plant Grid ---------- */
.plant-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

/* ---------- Plant Card ---------- */
.plant-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow-warm);
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
  cursor: pointer;
  animation: fadeSlideUp 0.5s var(--ease-out) both;
}

.plant-card:nth-child(1) { animation-delay: 0ms; }
.plant-card:nth-child(2) { animation-delay: 40ms; }
.plant-card:nth-child(3) { animation-delay: 80ms; }
.plant-card:nth-child(4) { animation-delay: 120ms; }
.plant-card:nth-child(5) { animation-delay: 160ms; }
.plant-card:nth-child(6) { animation-delay: 200ms; }
.plant-card:nth-child(7) { animation-delay: 240ms; }
.plant-card:nth-child(8) { animation-delay: 280ms; }
.plant-card:nth-child(9) { animation-delay: 300ms; }
.plant-card:nth-child(10) { animation-delay: 300ms; }

.plant-card:hover,
.plant-card:active {
  background: var(--bg-card-hover);
  box-shadow: 0 6px 20px var(--shadow-warm-lg);
  transform: scale(1.01);
}

.plant-card-img {
  position: relative;
  overflow: hidden;
  background: var(--bg-secondary);
}

.plant-card-img img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.plant-card:hover .plant-card-img img {
  transform: scale(1.04);
}

.plant-card-body {
  padding: var(--space-md);
}

.plant-card-name {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 2px;
}

.plant-card-latin {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

/* ---------- Pills ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  line-height: 1.5;
}

.plant-card-body .pill {
  margin-right: 4px;
  margin-bottom: 4px;
}

.pill-shade {
  background: var(--pill-shade-bg);
  color: var(--pill-shade-text);
}

.pill-sun {
  background: var(--pill-sun-bg);
  color: var(--pill-sun-text);
}

.pill-heat {
  background: var(--pill-heat-bg);
  color: var(--pill-heat-text);
}

.pill-cool {
  background: var(--pill-cool-bg);
  color: var(--pill-cool-text);
}

.pill-zone {
  background: var(--pill-zone-bg);
  color: var(--pill-zone-text);
}

.pill-bee {
  background: var(--pill-bee-bg);
  color: var(--pill-bee-text);
}

.pill-perennial {
  background: var(--pill-perennial-bg);
  color: var(--pill-perennial-text);
}

.pill-annual {
  background: var(--pill-annual-bg);
  color: var(--pill-annual-text);
}

/* ---------- Bee Badge ---------- */
.bee-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 6px var(--shadow-warm);
  font-size: 1rem;
  line-height: 1;
}

/* ---------- FAB (Floating Action Button) ---------- */
.fab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--accent-botanical);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1;
  border: none;
  box-shadow: 0 4px 14px rgba(91, 127, 94, 0.3);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  animation: fabPulse 2s var(--ease-out) 1s 1;
  cursor: pointer;
}

.fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(160, 120, 90, 0.4);
}

.fab:active {
  transform: scale(0.95);
}

.fab.hidden {
  display: none;
}

/* ---------- Modal / Bottom Sheet ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(30, 22, 10, 0);
  pointer-events: none;
  transition: background var(--transition-base);
}

.modal-overlay.open {
  background: rgba(44, 41, 38, 0.45);
  pointer-events: auto;
}

.modal-sheet {
  position: relative;
  width: 100%;
  max-height: 85vh;
  max-height: 85dvh;
  background: var(--bg-card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform var(--transition-slow);
}

.modal-overlay.open .modal-sheet {
  transform: translateY(0);
}

/* Drag handle — swipe affordance */
.modal-sheet::before {
  content: "";
  display: block;
  width: 40px;
  height: 5px;
  margin: 10px auto 6px;
  background: var(--text-tertiary);
  border-radius: var(--radius-full);
  flex-shrink: 0;
  opacity: 0.4;
}

.modal-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 2px 8px var(--shadow-warm);
  font-size: 1.1rem;
  z-index: 10;
  transition: background var(--transition-fast);
}

.modal-close:hover {
  background: #fff;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: var(--space-lg);
}

.modal-name {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.modal-latin {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.modal-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-lg);
}

.modal-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.modal-section {
  margin-bottom: var(--space-lg);
}

.modal-section-title {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

/* ---------- Stats Grid ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.stats-grid > div {
  padding: var(--space-md);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  margin-bottom: 2px;
}

.stat-value {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ---------- Pair / Prop Tags ---------- */
.pair-tag,
.prop-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-right: 6px;
  margin-bottom: 6px;
}

.pair-tag {
  background: var(--accent-botanical-light);
  color: var(--accent-botanical);
}

.prop-tag {
  background: var(--accent-terracotta-light);
  color: var(--accent-terracotta);
}

/* ---------- Bee Callout ---------- */
.bee-callout {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--pill-bee-bg);
  border-radius: var(--radius-md);
  border-left: 3px solid #b8a050;
  font-size: 0.9rem;
  color: var(--pill-bee-text);
  line-height: 1.6;
}

/* ---------- Garden / Zone View ---------- */
.zone-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.zone-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow-warm);
  animation: fadeSlideUp 0.4s var(--ease-out) both;
}

.zone-card-plants {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.zone-card-plants::-webkit-scrollbar {
  display: none;
}

.zone-card-plants img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--bg-primary);
}

.zone-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  color: var(--text-tertiary);
}

.zone-empty .empty-icon {
  color: var(--accent-botanical);
  margin-bottom: var(--space-md);
  opacity: 0.6;
}

.zone-empty p {
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 260px;
}

/* ---------- Forms ---------- */
.zone-form,
.add-plant-form {
  padding: var(--space-lg);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
}

.add-plant-form {
  position: fixed;
  inset: 0;
  z-index: 210;
  border-radius: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: fadeSlideUp 0.35s var(--ease-out);
}

.form-field {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input,
.form-select {
  width: 100%;
  padding: 12px var(--space-md);
  font-size: 1rem;
  background: var(--bg-primary);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  min-height: 44px;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent-terracotta);
  box-shadow: 0 0 0 3px var(--accent-terracotta-light);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%237a6a52' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

textarea.form-input {
  min-height: 100px;
  resize: vertical;
}

/* ---------- Form Actions (sticky at bottom of modals) ---------- */
.form-actions {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md) 0 0;
  position: sticky;
  bottom: 0;
  background: var(--bg-card);
  padding-bottom: env(safe-area-inset-bottom, var(--space-md));
  z-index: 5;
}

.form-actions::before {
  content: "";
  position: absolute;
  top: calc(-1 * var(--space-md));
  left: calc(-1 * var(--space-lg));
  right: calc(-1 * var(--space-lg));
  height: var(--space-md);
  background: linear-gradient(transparent, var(--bg-card));
  pointer-events: none;
}

.form-actions .btn-primary,
.form-actions .btn-secondary {
  flex: 1;
}

.form-hint {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-bottom: var(--space-md);
  line-height: 1.5;
}

/* ---------- Dashboard Ideas Link ---------- */
.dashboard-ideas-link {
  display: block;
  text-align: center;
  padding: var(--space-md) var(--space-lg);
  margin-top: var(--space-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pop-coral);
  text-decoration: none;
  border: 1.5px dashed var(--border-soft);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.dashboard-ideas-link:hover {
  border-color: var(--pop-coral);
  background: var(--accent-terracotta-light);
}

/* ---------- Stacked Bottom-Right: FAB + Claude + Back ---------- */
.fab-stack {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  right: var(--space-md);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.claude-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--claude-orange);
  color: #fff;
  box-shadow: 0 3px 12px rgba(217, 119, 87, 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  text-decoration: none;
}

.claude-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(217, 119, 87, 0.45);
}

.claude-fab:active {
  transform: scale(0.95);
}

.claude-fab svg {
  width: 22px;
  height: 22px;
}

.back-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-secondary);
  border: none;
  box-shadow: 0 2px 10px rgba(44, 41, 38, 0.15);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
}

.back-fab:hover {
  transform: scale(1.08);
}

.back-fab:active {
  transform: scale(0.95);
}

.back-fab.hidden {
  display: none;
}

/* ---------- App Toast ---------- */
.app-toast {
  position: fixed;
  bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(44, 41, 38, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 200;
  white-space: nowrap;
}

.app-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent-terracotta);
  border: none;
  border-radius: var(--radius-full);
  min-height: 44px;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 0 2px 8px rgba(160, 120, 90, 0.2);
}

.btn-primary:hover {
  background: #8c664a;
  box-shadow: 0 4px 14px rgba(160, 120, 90, 0.3);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-terracotta);
  background: transparent;
  border: 1.5px solid var(--accent-terracotta);
  border-radius: var(--radius-full);
  min-height: 44px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--accent-terracotta-light);
}

.btn-secondary:active {
  transform: scale(0.97);
}

.btn-botanical {
  border-color: var(--accent-botanical);
  color: var(--accent-botanical);
}

.btn-botanical:hover,
.btn-botanical:active {
  background: var(--accent-botanical-light);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #8a3028;
  background: transparent;
  border: 1.5px solid #b04030;
  border-radius: var(--radius-full);
  min-height: 44px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.btn-danger:hover {
  background: #f6e6e2;
  color: #7a2018;
}

.btn-danger:active {
  transform: scale(0.97);
}

/* ---------- Planner View ---------- */
.zone-selector {
  display: flex;
  gap: var(--space-sm);
  padding-bottom: var(--space-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.zone-selector::-webkit-scrollbar {
  display: none;
}

.zone-pill {
  flex-shrink: 0;
  padding: 8px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-soft);
  background: var(--bg-card);
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all var(--transition-fast);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.zone-pill.active {
  background: var(--accent-botanical);
  border-color: var(--accent-botanical);
  color: #fff;
}

.planner-section {
  margin-bottom: var(--space-xl);
}

.planner-section-title {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.suggestion-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  margin-bottom: var(--space-sm);
  box-shadow: 0 1px 4px var(--shadow-warm);
  transition: box-shadow var(--transition-fast);
}

.suggestion-card:hover {
  box-shadow: 0 4px 12px var(--shadow-warm-lg);
}

.suggestion-img {
  flex-shrink: 0;
  cursor: pointer;
}

.suggestion-img img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid var(--border-soft);
}

.suggestion-body {
  flex: 1;
  min-width: 0;
}

.suggestion-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: 2px;
}

.suggestion-name {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.suggestion-name:hover {
  color: var(--accent-terracotta);
}

.suggestion-latin {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--text-tertiary);
  margin-bottom: var(--space-xs);
}

.suggestion-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: var(--space-sm);
}

.match-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: var(--radius-pill);
}

.match-badge[data-match="great"],
.match-badge.match-great {
  background: var(--accent-botanical-light);
  color: var(--accent-botanical);
}

.match-badge[data-match="good"],
.match-badge.match-good {
  background: var(--pill-sun-bg);
  color: var(--pill-sun-text);
}

.match-badge[data-match="poor"],
.match-badge.match-poor {
  background: var(--pill-heat-bg);
  color: var(--pill-heat-text);
}

.companion-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  background: var(--accent-botanical-light);
  color: var(--accent-botanical);
}

.spacing-hint {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  font-style: italic;
}

.conflict-warning {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px var(--space-md);
  background: #f5f0dd;
  border-left: 3px solid #b8a050;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem;
  color: #6a5000;
  margin-bottom: var(--space-md);
}

.add-to-zone-btn {
  flex-shrink: 0;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-terracotta);
  border: 1.5px solid var(--accent-terracotta);
  border-radius: var(--radius-full);
  background: transparent;
  transition: all var(--transition-fast);
  min-height: 44px;
  white-space: nowrap;
}

.add-to-zone-btn:hover {
  background: var(--accent-terracotta);
  color: #fff;
}

/* ---------- Explore View ---------- */
.explore-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  box-shadow: 0 4px 16px var(--shadow-warm);
}

.explore-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.explore-hero .explore-hero-content {
  padding: var(--space-lg);
}

.explore-hero h2,
.explore-hero h3,
.explore-hero-title {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.explore-hero-eyebrow {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--pop-coral);
  margin-bottom: var(--space-xs);
}

.explore-hero p,
.explore-hero-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}

.explore-hero-tasks {
  list-style: none;
  padding: 0;
  margin: 0;
}

.explore-hero-tasks li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: var(--space-xs) 0;
  padding-left: 1.2em;
  position: relative;
  line-height: 1.5;
}

.explore-hero-tasks li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--accent-botanical);
  font-weight: 600;
}

.explore-section {
  margin-bottom: var(--space-xl);
}

.explore-section-title {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.combo-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  margin-bottom: var(--space-sm);
  box-shadow: 0 1px 4px var(--shadow-warm);
}

.combo-plants {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-xs);
}

.combo-plants::-webkit-scrollbar { display: none; }

.combo-name {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.combo-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-sm);
}

.combo-plant-thumb {
  flex-shrink: 0;
  text-align: center;
  width: 64px;
  cursor: pointer;
}

.combo-plant-thumb img {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid var(--border-soft);
  transition: border-color 0.15s;
}

.combo-plant-thumb:hover img {
  border-color: var(--accent-botanical);
}

.combo-plant-thumb span {
  display: block;
  font-size: 0.65rem;
  color: var(--text-tertiary);
  margin-top: 3px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discovery-card {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  margin-bottom: var(--space-sm);
  box-shadow: 0 1px 4px var(--shadow-warm);
  align-items: center;
}

.discovery-card img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
}

.discovery-info {
  flex: 1;
  min-width: 0;
}

.discovery-name {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.discovery-latin {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.discovery-reason {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.discovery-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: var(--space-xs);
}

.tip-card {
  padding: var(--space-md);
  background: var(--accent-botanical-light);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-botanical);
  margin-bottom: var(--space-sm);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.tip-category {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pop-sage);
  margin-bottom: 2px;
}

.tip-title {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.tip-body {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.pollinator-report {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--pill-bee-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
}

.pollinator-report .stat-label {
  color: var(--pill-bee-text);
}

.pollinator-report .stat-value {
  color: var(--text-primary);
}

/* ---------- Plant Tip / What's Happening ---------- */
.plant-tip-section {
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--pop-sage);
}

.plant-tip-eyebrow {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pop-sage);
  margin-bottom: var(--space-xs);
}

.plant-tip-text {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.plant-tip-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ---------- Garden Intel Dashboard Card ---------- */
.garden-intel-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  box-shadow: 0 2px 8px var(--shadow-warm);
  animation: fadeSlideUp 0.4s var(--ease-out) both;
}

.garden-intel-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  cursor: pointer;
  transition: background var(--transition-fast);
  border-radius: var(--radius-md);
}

.garden-intel-item:hover {
  background: var(--bg-card-hover);
}

.garden-intel-item + .garden-intel-item {
  border-top: 1px solid var(--border-soft);
}

.garden-intel-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-botanical-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-botanical);
}

.garden-intel-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.garden-intel-name {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.garden-intel-summary {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 2px;
}

/* ---------- Photo Analysis ---------- */
.photo-analysis-badge {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  color: #fff;
  z-index: 2;
  letter-spacing: 0.02em;
}
.photo-analysis-badge--high { background: var(--pop-sage); }
.photo-analysis-badge--mid { background: var(--pop-ochre); }
.photo-analysis-badge--low { background: var(--pop-coral); }
.photo-analysis-panel {
  display: none;
  padding: var(--space-md);
  background: var(--bg-primary);
  border-top: 1px solid var(--border-soft);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
.photo-card.expanded .photo-analysis-panel { display: block; }
.photo-analysis-score-lg {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}
.photo-analysis-score-lg.score-high { color: var(--pop-sage); }
.photo-analysis-score-lg.score-mid { color: var(--pop-ochre); }
.photo-analysis-score-lg.score-low { color: var(--pop-coral); }
.photo-analysis-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-top: var(--space-sm);
  margin-bottom: var(--space-xs);
}
.photo-analysis-concerns { color: var(--pop-coral); font-weight: 500; }
.photo-analysis-recs { color: var(--accent-botanical); font-weight: 500; }

/* ---------- Keyframe Animations ---------- */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fabPulse {
  0% {
    box-shadow: 0 4px 14px rgba(160, 120, 90, 0.3);
  }
  50% {
    box-shadow: 0 4px 28px rgba(160, 120, 90, 0.45), 0 0 0 8px rgba(160, 120, 90, 0.08);
  }
  100% {
    box-shadow: 0 4px 14px rgba(160, 120, 90, 0.3);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* ---------- Responsive: 2-column grid at 640px ---------- */
@media (min-width: 640px) {
  .plant-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .view {
    padding: var(--space-lg);
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  }

  .modal-sheet {
    max-width: 560px;
    margin: 0 auto;
  }

  .stats-grid {
    gap: var(--space-md);
  }

  .explore-hero h2 {
    font-size: 1.5rem;
  }

  .pollinator-report {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Responsive: 3-column grid at 1024px ---------- */
@media (min-width: 1024px) {
  .plant-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
  }

  .view {
    padding: var(--space-xl) var(--space-2xl);
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  }


  .modal-sheet {
    max-width: 640px;
    border-radius: var(--radius-xl);
    margin-bottom: 5vh;
    max-height: 85vh;
  }

  .modal-overlay {
    align-items: center;
  }

  .modal-overlay.open .modal-sheet {
    animation: slideUp 0.4s var(--ease-out);
  }

  .search-bar {
    max-width: 480px;
  }

  .fab {
    right: var(--space-xl);
    width: 52px;
    height: 52px;
    font-size: 1.4rem;
  }

  .zone-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .explore-hero {
    display: flex;
    align-items: stretch;
  }

  .explore-hero img {
    width: 50%;
    aspect-ratio: auto;
  }

  .explore-hero .explore-hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-xl);
  }

  .explore-hero h2 {
    font-size: 1.7rem;
  }
}

/* ---------- Accessibility: Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .view {
    transition: none;
  }

  .modal-overlay,
  .modal-sheet {
    transition: none;
  }
}

/* ---------- Focus Visible ---------- */
:focus-visible {
  outline: 2px solid var(--accent-terracotta);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible) {
  outline: none;
}

/* ---------- Selection ---------- */
::selection {
  background: var(--accent-terracotta-light);
  color: var(--text-primary);
}

/* ---------- Scrollbar (non-hidden containers) ---------- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-soft);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* ---------- Planner: Current Plants Grid ---------- */
.current-plants-grid {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding-bottom: var(--space-xs);
  -webkit-overflow-scrolling: touch;
}

.current-plants-grid::-webkit-scrollbar { display: none; }

.current-plant-card {
  flex-shrink: 0;
  width: 100px;
  text-align: center;
  position: relative;
}

.current-plant-card img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid var(--border-soft);
  cursor: pointer;
  transition: border-color 0.2s;
}

.current-plant-card img:hover {
  border-color: var(--accent-botanical);
}

.current-plant-name {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: var(--space-xs);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remove-plant-btn {
  position: absolute;
  top: -6px;
  right: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--accent-terracotta);
  color: #fff;
  font-size: 14px;
  line-height: 44px;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}

.current-plant-card:hover .remove-plant-btn {
  opacity: 1;
}

@media (hover: none) {
  .remove-plant-btn {
    opacity: 0.7;
    width: 28px;
    height: 28px;
    line-height: 28px;
    top: -4px;
    right: 2px;
  }
}

.planner-empty-text {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  padding: var(--space-md) 0;
}

/* ---------- Planner: Browse All Grid ---------- */
.browse-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.browse-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
}

.browse-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.browse-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.browse-row .conflict-warning {
  font-size: 0.7rem;
  flex-shrink: 0;
}

.browse-row .add-to-zone-btn {
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: 0.7rem;
}

/* ---------- Pollinator Report (app.js classes) ---------- */
.pollinator-stat {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.pollinator-number {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--pop-sage);
  line-height: 1;
}

.pollinator-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.pollinator-bar {
  width: 100%;
  height: 10px;
  background: var(--border-soft);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-xs);
}

.pollinator-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-botanical), #8aaa7a);
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

.pollinator-pct {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-botanical);
  letter-spacing: 0.03em;
}

/* ==========================================================================
   NEW VIEWS — Seeds, Photos, Dashboard
   Added for 5-tab multi-view layout
   ========================================================================== */

/* ---------- Tab Bar: 5 Tabs ---------- */
.tab-bar {
  gap: 0;
}

.tab-item {
  flex: 1 1 20%;
  min-width: 0;
  padding: var(--space-xs) 0 calc(var(--space-xs) + env(safe-area-inset-bottom, 0px));
}

.tab-label {
  font-size: 0.625rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.tab-icon {
  width: 22px;
  height: 22px;
}

/* ---------- 1. Seed Status Colors ---------- */
.status-planted {
  background: #ece7df;
  color: #7a6e58;
}

.status-germinated {
  background: #dfeee2;
  color: #3e7a4a;
}

.status-transplanted {
  background: #d6e8da;
  color: #2e6838;
}

.status-established {
  background: #f2eacc;
  color: #8a7020;
}

.status-failed {
  background: #f2d8d6;
  color: #983838;
}

/* ---------- 2. Seed Card Styles ---------- */
#seed-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

/* --- Zone Card Photo (legacy — kept for fallback) --- */
.zone-card-photo {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}

.zone-card-photo-placeholder {
  width: 100%;
  height: 80px;
  background: linear-gradient(135deg, rgba(90, 138, 98, 0.06) 0%, rgba(122, 158, 128, 0.03) 100%);
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pop-sage);
}

/* ---------- Zone Card Redesign ---------- */
.zone-stripe {
  height: 6px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.zone-carousel-container {
  position: relative;
  overflow: hidden;
}

.zone-carousel-container:empty {
  display: none;
}

.zone-card-body {
  padding: 1rem 1.25rem;
}

.zone-meta-line {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.zone-planted-section {
  border-top: 1px solid var(--border-soft);
  padding-top: 0.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.zone-planted-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  margin-bottom: 0.375rem;
}

.zone-planted-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.zone-planted-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.zone-planted-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.zone-planted-type {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
}

.zone-no-plants {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  font-style: italic;
  margin: 0;
  padding: 0.25rem 0;
}

/* ---------- Zone Photo Carousel ---------- */
.zone-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.zone-carousel::-webkit-scrollbar {
  display: none;
}

.zone-carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  height: 160px;
}

.zone-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zone-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 0 4px;
  background: var(--bg-card);
}

.zone-carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-soft);
  transition: background 0.2s ease;
}

.zone-carousel-dot.active {
  background: var(--accent-terracotta);
}

.zone-photo-empty {
  height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-tertiary);
  cursor: pointer;
}

.zone-photo-empty svg {
  opacity: 0.5;
}

.zone-photo-empty span {
  font-size: 0.75rem;
}

/* --- Plant Photo Gallery (Swipeable) --- */
.modal-gallery-wrap {
  position: relative;
}

.modal-gallery {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.modal-gallery::-webkit-scrollbar {
  display: none;
}

.modal-gallery-img {
  flex: 0 0 100%;
  width: 100%;
  height: 240px;
  object-fit: cover;
  scroll-snap-align: center;
}

.modal-gallery-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 0;
}

.modal-gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d4cec4;
  transition: background 0.2s ease;
}

.modal-gallery-dot.active {
  background: var(--accent-terracotta);
}

.modal-gallery-dots:empty {
  display: none;
}

/* --- New Plant Highlight --- */
@keyframes plantHighlight {
  0%   { box-shadow: 0 0 0 0 rgba(90, 138, 98, 0); }
  30%  { box-shadow: 0 0 0 8px rgba(90, 138, 98, 0.3); }
  70%  { box-shadow: 0 0 0 8px rgba(90, 138, 98, 0.3); }
  100% { box-shadow: 0 0 0 0 rgba(90, 138, 98, 0); }
}

.plant-card-highlight {
  animation: plantHighlight 1.5s ease-out;
}

/* --- Seed Card Redesign (Lifecycle) --- */
.seed-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  cursor: pointer;
  touch-action: manipulation;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.seed-card:active {
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.seed-card:not(.is-failed):active {
  transform: scale(0.98);
  box-shadow: 0 1px 4px rgba(44, 41, 38, 0.1);
}

.seed-card.expanded {
  border-radius: 12px 12px 0 0;
  margin-bottom: 0;
}

.seed-card.is-failed {
  opacity: 0.7;
  cursor: default;
}

.seed-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.seed-plant-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.seed-variety-method {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* --- Status Badge --- */
.seed-status-pill {
  font-size: 0.69rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.seed-status-pill:active {
  transform: scale(0.95);
}

.seed-status-pill[data-status="planted"] { background: #f0ebe3; color: #8a7a60; }
.seed-status-pill[data-status="sprouted"] { background: #e8f5e2; color: #4a8a3a; }
.seed-status-pill[data-status="ready-to-transplant"] { background: #d4edda; color: #2d6a2d; }
.seed-status-pill[data-status="in-ground"] { background: #fff3cd; color: #856404; }
.seed-status-pill[data-status="failed"] { background: #f8d7da; color: #a04040; }

/* --- Progress Indicator --- */
.seed-progress {
  display: flex;
  align-items: center;
  margin: 8px 0 4px;
}

.seed-progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e0d8ce;
  flex-shrink: 0;
  transition: background 0.2s ease, width 0.2s ease, height 0.2s ease;
}

.seed-progress-dot.completed {
  width: 12px;
  height: 12px;
  background: var(--accent-botanical);
}

.seed-progress-dot.failed {
  background: #a04040;
  width: 12px;
  height: 12px;
}

.seed-progress-line {
  flex: 1;
  height: 3px;
  background: #e0d8ce;
  transition: background 0.2s ease;
}

.seed-progress-line.completed {
  background: var(--accent-botanical);
}

.seed-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.625rem;
  color: #8a7a60;
  padding: 0 1px;
}

.seed-progress-labels span.completed {
  color: var(--accent-botanical);
  font-weight: 600;
}

.seed-progress-labels span.failed {
  color: #a04040;
  font-weight: 600;
}

/* --- Card Footer --- */
.seed-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.seed-chevron {
  transition: transform 0.25s ease-out;
}

.seed-card.expanded .seed-chevron {
  transform: rotate(180deg);
}

/* ---------- Seed Progress Animation ---------- */
.seed-progress-track {
  position: relative;
}

.seed-progress-fill {
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Seed Swipe to Delete ---------- */
.seed-swipe-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
}

.seed-swipe-delete {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 80px;
  background: #dc2626;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
}

.seed-swipe-content {
  position: relative;
  z-index: 1;
  background: var(--bg-primary);
  transition: transform 0.2s ease;
}

/* ---------- Seed Estimate Label ---------- */
.seed-estimate-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--accent-botanical);
  text-align: center;
  padding: 2px 0;
}

/* ---------- Seed Progress Bar ---------- */
.seed-bar-container {
  padding: 0.5rem 0;
}

.seed-bar-track {
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
}

.seed-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-botanical), #8aaa7a);
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.seed-bar-fill.failed {
  width: 100% !important;
  background: var(--pop-coral);
}

.seed-bar-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}

.seed-bar-label {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
}

.seed-bar-label.completed {
  color: var(--accent-botanical);
  font-weight: 500;
}

.seed-bar-label.failed {
  color: var(--pop-coral);
  font-weight: 500;
}

.seed-card.expanded .seed-detail-panel {
  animation: seedPanelIn 0.25s ease-out;
}

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

/* --- Expand-in-Place Detail Panel --- */
.seed-detail-panel {
  background: #f9f6f1;
  border-radius: 0 0 12px 12px;
  border-top: 1px solid #e0d8ce;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.25s ease-out, opacity 0.25s ease-out;
  margin-bottom: 12px;
}

.seed-detail-panel.open {
  max-height: 600px;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .seed-detail-panel { transition: none; }
  .seed-chevron { transition: none; }
}

/* --- Tabs --- */
.seed-tabs {
  display: flex;
  background: var(--bg-card);
  border-bottom: 1px solid #e0d8ce;
}

.seed-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
  touch-action: manipulation;
  min-height: 44px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.seed-tab.active {
  color: var(--accent-terracotta);
  font-weight: 600;
  border-bottom-color: var(--accent-terracotta);
}

.seed-tab-content {
  display: none;
  padding: 16px;
}

.seed-tab-content.active {
  display: block;
}

/* --- Timeline --- */
.seed-timeline {
  position: relative;
  padding-left: 24px;
}

.seed-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #d4cec4;
}

.seed-timeline-event {
  margin-bottom: 20px;
  position: relative;
}

.seed-timeline-event:last-child {
  margin-bottom: 0;
}

.seed-timeline-dot {
  position: absolute;
  left: -21px;
  top: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-botanical);
  border: 2px solid #f9f6f1;
}

.seed-timeline-dot.failed { background: #a04040; }
.seed-timeline-dot.revert { background: var(--pop-ochre); }

.seed-timeline-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.seed-timeline-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.seed-timeline-note {
  font-size: 0.75rem;
  color: var(--pop-sage);
  margin-top: 4px;
  font-style: italic;
}

/* --- Actions Tab --- */
.seed-action-primary {
  width: 100%;
  background: var(--accent-botanical);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-size: 0.94rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  touch-action: manipulation;
  margin-bottom: 10px;
  min-height: 44px;
}

.seed-action-primary:active { opacity: 0.85; }
.seed-action-primary:disabled { opacity: 0.5; cursor: default; }

.seed-action-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.seed-action-secondary {
  flex: 1;
  background: #f0ebe3;
  color: var(--text-secondary);
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  touch-action: manipulation;
  min-height: 44px;
}

.seed-action-secondary:active { opacity: 0.85; }

.seed-action-fail {
  flex: 1;
  background: #fef2f2;
  color: #a04040;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  touch-action: manipulation;
  min-height: 44px;
}

.seed-action-fail:active { opacity: 0.85; }

.seed-action-photo {
  width: 100%;
  background: #fff;
  color: var(--text-secondary);
  border: 1px solid #e0d8ce;
  padding: 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  touch-action: manipulation;
  min-height: 44px;
}

.seed-action-photo:active { opacity: 0.85; }

/* --- Photos Tab --- */
.seed-photos-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.seed-photos-scroll::-webkit-scrollbar { display: none; }

.seed-photo-thumb {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.seed-photos-empty {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-align: center;
  padding: 12px 0;
}

/* --- Confirm Dialog --- */
.confirm-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 22, 10, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.confirm-dialog-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.confirm-dialog {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 340px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.confirm-dialog-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.confirm-dialog-body {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}

.confirm-dialog-notes {
  width: 100%;
  border: 1px solid #e0d8ce;
  border-radius: 8px;
  padding: 10px;
  font-size: 0.82rem;
  font-family: var(--font-body);
  resize: vertical;
  min-height: 44px;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.confirm-dialog-notes:focus {
  outline: none;
  border-color: var(--accent-terracotta);
}

.confirm-dialog-actions {
  display: flex;
  gap: 10px;
}

.confirm-dialog-actions .btn-cancel {
  flex: 1;
  background: #f0ebe3;
  color: var(--text-secondary);
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  min-height: 44px;
}

.confirm-dialog-actions .btn-confirm {
  flex: 1;
  background: var(--accent-terracotta);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  min-height: 44px;
}

.confirm-dialog-actions .btn-confirm.destructive {
  background: #dc2626;
}

/* ---------- 3. Photo View Styles ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.photo-date-group {
  margin-bottom: var(--space-lg);
}

.photo-date-heading {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.photo-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-secondary);
  aspect-ratio: 1 / 1;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--shadow-warm);
  border: 1px solid var(--border-soft);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  animation: fadeSlideUp 0.4s var(--ease-out) both;
}

.photo-card:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px var(--shadow-warm-lg);
}

.photo-card-img-wrap {
  width: 100%;
  height: 100%;
  position: relative;
}

.photo-card-no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  color: var(--text-tertiary);
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.photo-card:hover img {
  transform: scale(1.06);
}

.photo-card .photo-caption-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-sm) var(--space-sm);
  background: linear-gradient(transparent, rgba(30, 22, 10, 0.7));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  pointer-events: none;
}

.photo-mode-toggle {
  display: flex;
  gap: 0;
  margin-bottom: var(--space-md);
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  padding: 3px;
  border: 1px solid var(--border-soft);
}

.photo-mode-btn {
  flex: 1;
  padding: 10px var(--space-md);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-mode-btn:hover {
  color: var(--text-primary);
}

.photo-mode-btn.active {
  background: var(--bg-card);
  color: var(--accent-terracotta);
  box-shadow: 0 2px 6px var(--shadow-warm);
  font-weight: 700;
}

.photo-entity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: var(--space-xs);
}

.photo-entity-tags .tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  background: var(--accent-botanical-light);
  color: var(--accent-botanical);
  white-space: nowrap;
}

.photo-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--radius-pill);
  background: var(--accent-terracotta-light);
  color: var(--accent-terracotta);
}

.photo-upload-form {
  padding: var(--space-lg);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
}

.photo-upload-form .form-field {
  margin-bottom: var(--space-md);
}

/* Photo upload drop zone */
.photo-drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-lg);
  border: 2px dashed var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  color: var(--text-tertiary);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  min-height: 120px;
}

.photo-drop-zone:hover,
.photo-drop-zone.dragover {
  border-color: var(--accent-terracotta);
  background: var(--accent-terracotta-light);
}

.photo-drop-zone .drop-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.photo-drop-zone .drop-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ---------- 4. Dashboard Styles ---------- */
.dashboard-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  box-shadow: 0 2px 8px var(--shadow-warm);
  animation: fadeSlideUp 0.4s var(--ease-out) both;
}

.dashboard-card:nth-child(1) { animation-delay: 0ms; }
.dashboard-card:nth-child(2) { animation-delay: 80ms; }
.dashboard-card:nth-child(3) { animation-delay: 160ms; }
.dashboard-card:nth-child(4) { animation-delay: 240ms; }
.dashboard-card:nth-child(5) { animation-delay: 320ms; }

.dashboard-card-title {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

.dashboard-card-eyebrow {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pop-coral);
  margin-bottom: var(--space-xs);
}

/* Seasonal spotlight */
.dashboard-seasonal {
  background: linear-gradient(135deg, #eee9e0 0%, #f2ede6 50%, #f6f2ec 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  animation: fadeSlideUp 0.5s var(--ease-out) both;
}

.dashboard-seasonal-tip {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.dashboard-seasonal-tasks {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dashboard-seasonal-tasks li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: var(--space-xs) 0;
  padding-left: 1.4em;
  position: relative;
  line-height: 1.5;
}

.dashboard-seasonal-tasks li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--accent-botanical);
  font-weight: 700;
}

/* Seed summary */
.seed-summary {
  text-align: center;
  padding: var(--space-md) 0;
}

.seed-summary-number {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--pop-sage);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.seed-summary-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.seed-summary-breakdown {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
}

.seed-summary-breakdown .seed-status-pill {
  font-size: 0.68rem;
  padding: 3px 10px;
}

/* ---------- Dashboard Seed List ---------- */
.seed-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.seed-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border-soft);
  min-height: 44px;
}

.seed-list-row:last-child {
  border-bottom: none;
}

.seed-list-info {
  flex: 1;
  min-width: 0;
}

.seed-list-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.seed-list-variety {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Recent photos grid */
.recent-photos-grid {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: var(--space-xs);
}

.recent-photos-grid::-webkit-scrollbar {
  display: none;
}

.recent-photo-thumb {
  flex-shrink: 0;
  width: 110px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-secondary);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  border: 1px solid var(--border-soft);
}

.recent-photo-thumb:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 12px var(--shadow-warm-lg);
}

.recent-photo-thumb img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  display: block;
}

.recent-photo-caption {
  font-size: 0.68rem;
  color: var(--text-secondary);
  padding: 4px 6px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-placeholder-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  color: var(--text-tertiary);
}

/* Stats row */
.stats-row {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  padding: var(--space-sm) 0;
}

.stat-bubble {
  text-align: center;
  min-width: 64px;
}

.stat-bubble-number {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.stat-bubble-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.dashboard-empty {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-tertiary);
  text-align: center;
  padding: var(--space-lg) var(--space-md);
}

/* ---------- 5. Suggestions Panel (inline in garden) ---------- */
.suggestions-panel {
  padding: var(--space-md);
  border-top: 1px solid var(--border-soft);
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
}

.suggestions-panel .planner-section-title {
  font-size: 0.95rem;
  margin-bottom: var(--space-sm);
}

.suggestions-panel .suggestion-card {
  margin-bottom: var(--space-sm);
}

/* Match quality — partial variant */
.match-badge.match-partial {
  background: var(--pill-sun-bg);
  color: var(--pill-sun-text);
}

/* ---------- 6. Transplant Dialog ---------- */
#transplant-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(30, 22, 10, 0);
  pointer-events: none;
  transition: background var(--transition-base);
}

#transplant-dialog-overlay.open {
  background: rgba(30, 22, 10, 0.45);
  pointer-events: auto;
}

#transplant-dialog-overlay .modal-sheet {
  transform: translateY(100%);
  transition: transform var(--transition-slow);
}

#transplant-dialog-overlay.open .modal-sheet {
  transform: translateY(0);
}

/* ---------- 7. Modal Extra Section (plants.js injected) ---------- */
.modal-extra-section {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-soft);
}

.modal-extra-section h4 {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.modal-extra-section .recent-photos-grid {
  margin-bottom: var(--space-sm);
}


/* ---------- Responsive: Seed & Photo grids at 640px ---------- */
@media (min-width: 640px) {
  #seed-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
  }

  .recent-photo-thumb {
    width: 140px;
  }

  .recent-photo-thumb img {
    height: 100px;
  }

  .stats-row {
    gap: var(--space-xl);
  }

  .tab-label {
    font-size: 0.62rem;
  }

  .tab-icon {
    width: 24px;
    height: 24px;
  }
}

/* ---------- Responsive: Seed & Photo grids at 1024px ---------- */
@media (min-width: 1024px) {
  #seed-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
  }

  .photo-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
  }

  .dashboard-card {
    padding: var(--space-xl);
  }

  .seed-summary-number {
    font-size: 3.2rem;
  }

  .stat-bubble-number {
    font-size: 2.4rem;
  }

  .recent-photo-thumb {
    width: 160px;
  }

  .recent-photo-thumb img {
    height: 110px;
  }

  .tab-label {
    font-size: 0.65rem;
  }
}

/* ---------- Photos View Toggle ---------- */
.view-mode-toggle {
  display: flex;
  gap: 4px;
}

.view-mode-toggle button {
  padding: 10px 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm, 6px);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.view-mode-toggle button.active,
.view-mode-toggle button[aria-pressed="true"] {
  background: var(--accent-terracotta);
  color: #fff;
  border-color: var(--accent-terracotta);
}

/* ---------- Skeleton Loading ---------- */
.skeleton {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 254, 250, 0.5) 50%,
    transparent 100%
  );
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.skeleton-text {
  height: 0.875rem;
  margin-bottom: 0.5rem;
  width: 80%;
}

.skeleton-text.short {
  width: 50%;
}

.skeleton-heading {
  height: 1.25rem;
  margin-bottom: 0.75rem;
  width: 60%;
}

.skeleton-card {
  height: 120px;
  margin-bottom: 1rem;
}

.skeleton-image {
  width: 100%;
  aspect-ratio: 16/9;
  margin-bottom: 0.75rem;
}

/* ---------- Button Spinner ---------- */
.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Garden Action Sheet ---------- */
.garden-action-sheet {
  max-height: 280px;
}

.garden-action-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px;
  margin-bottom: 8px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  cursor: pointer;
  text-align: left;
  transition: transform var(--transition-fast);
}

.garden-action-option:active {
  transform: scale(0.98);
  background: var(--bg-secondary);
}

/* ---------- Composition Builder ---------- */
.composer-sheet {
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.composer-step {
  padding-bottom: var(--space-lg);
}

.composer-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 2;
}

.composer-back,
.composer-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--radius-full);
}

.composer-back:active,
.composer-close:active {
  background: var(--bg-secondary);
}

.composer-top-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-terracotta);
}

.composer-body {
  padding: 0 var(--space-md);
}

.composer-header {
  padding: var(--space-md) var(--space-md) 0;
}

.composer-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-botanical);
  margin-bottom: 4px;
}

.composer-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.composer-subtitle {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 4px;
  margin-bottom: var(--space-md);
  line-height: 1.4;
}

/* Mode Cards */
.composer-mode-card {
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--border-soft);
  overflow: hidden;
  margin: 0 var(--space-md) var(--space-sm);
  box-shadow: 0 2px 12px var(--shadow-warm);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.composer-mode-card:active {
  transform: scale(0.98);
}

.composer-mode-stripe {
  height: 6px;
}

.composer-mode-body {
  padding: var(--space-md);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.composer-mode-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.composer-mode-name {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
}

.composer-mode-pills {
  display: flex;
  gap: 6px;
  margin-top: 5px;
  flex-wrap: wrap;
}

.composer-pill {
  font-size: 0.625rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
}

.composer-mode-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.5;
}

.composer-mode-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 0 var(--space-md) var(--space-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Sun Grid */
.composer-sun-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.composer-sun-card {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  padding: var(--space-md);
  text-align: center;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.composer-sun-card:active {
  transform: scale(0.96);
}

.composer-sun-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.composer-sun-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.composer-sun-hours {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
}

/* Role Cards */
.composer-role-card {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  padding: var(--space-md);
  margin-bottom: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform var(--transition-fast);
}

.composer-role-card:active {
  transform: scale(0.98);
}

.composer-role-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.composer-role-info {
  flex: 1;
}

.composer-role-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.composer-role-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Plant List */
.composer-plant-list {
  margin-top: var(--space-sm);
}

.composer-step-badge {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.composer-plant-row {
  background: var(--bg-card);
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.composer-plant-row:active {
  transform: scale(0.98);
}

.composer-plant-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.composer-plant-no-img {
  background: var(--accent-botanical-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-botanical);
}

.composer-plant-info {
  flex: 1;
  min-width: 0;
}

.composer-plant-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.composer-plant-meta {
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

.composer-empty {
  padding: var(--space-lg);
  text-align: center;
  color: var(--text-tertiary);
  font-style: italic;
}

/* Results — Anchor Card */
.composer-anchor-card {
  background: var(--bg-card);
  border-radius: 14px;
  border: 2px solid var(--accent-terracotta);
  padding: 14px;
  margin-bottom: var(--space-md);
}

.composer-anchor-role {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.composer-anchor-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
}

.composer-anchor-meta {
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

.composer-anchor-change {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--accent-terracotta);
  cursor: pointer;
  margin-top: 8px;
}

/* Results — Claude Header */
.composer-claude-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-md);
}

.composer-claude-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--claude-orange);
  display: flex;
  align-items: center;
  justify-content: center;
}

.composer-claude-title {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.composer-claude-subtitle {
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

/* Results — Suggestion Cards */
.composer-suggestion {
  margin-bottom: var(--space-sm);
}

.composer-suggestion-role {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.composer-suggestion-card {
  background: var(--bg-card);
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  padding: 14px;
  margin-bottom: 8px;
}

.composer-suggestion-label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

.composer-suggestion-plant {
  display: flex;
  align-items: center;
  gap: 10px;
}

.composer-suggestion-info {
  flex: 1;
  min-width: 0;
}

.composer-suggestion-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.composer-suggestion-meta {
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

.composer-suggestion-reason {
  font-size: 0.6875rem;
  color: var(--accent-botanical);
  font-style: italic;
  margin-top: 2px;
}

.composer-swap-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.composer-suggestion-other {
  border-style: dashed;
}

/* Actions */
.composer-actions {
  display: flex;
  gap: 10px;
  margin-top: var(--space-md);
  padding-bottom: var(--space-md);
}

.composer-actions .btn-primary {
  flex: 2;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: var(--accent-terracotta);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(160, 120, 90, 0.3);
}

.composer-actions .btn-secondary {
  flex: 1;
}

/* Save Sheet */
.composer-save-sheet {
  padding: var(--space-md);
}

.composer-save-sheet .form-group {
  margin-bottom: var(--space-sm);
}

/* Composer Entry Button */
.composer-entry-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  margin-top: var(--space-md);
  border-radius: 14px;
  border: 2px dashed var(--border-soft);
  background: transparent;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-botanical);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.composer-entry-btn:active {
  background: var(--accent-botanical-light);
  border-color: var(--accent-botanical);
}

/* Composer Discover Search */
.composer-discover-section {
  margin-top: var(--space-sm);
  border-top: 2px dashed var(--border-soft);
  padding-top: var(--space-sm);
}

.composer-discover-input {
  margin-bottom: var(--space-sm);
}

/* ---------- Discover Section ---------- */
.discover-header {
  padding: var(--space-md) 0 var(--space-sm);
  border-top: 2px dashed var(--border-soft);
  margin-top: var(--space-md);
}

.discover-title {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--accent-botanical);
}

.discover-subtitle {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.discover-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.discover-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px dashed var(--accent-botanical);
  box-shadow: 0 2px 8px var(--shadow-warm);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.discover-card:active {
  transform: scale(0.97);
}

.discover-card .plant-card-img {
  aspect-ratio: 4 / 3;
}

.discover-card .plant-card-body {
  padding: var(--space-xs) var(--space-sm) var(--space-sm);
}

.discover-shimmer {
  border-style: solid;
  border-color: var(--border-soft);
}

.discover-empty {
  text-align: center;
  padding: var(--space-lg);
  color: var(--text-tertiary);
  font-style: italic;
}

.discover-more-btn {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: var(--space-sm);
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-botanical);
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-botanical);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.discover-more-btn:active {
  background: var(--accent-botanical-light);
}

/* Discover Preview Modal */
.discover-preview-sheet {
  max-height: 90vh;
  overflow-y: auto;
}

.discover-preview-top {
  display: flex;
  justify-content: flex-end;
  padding: var(--space-xs) var(--space-sm) 0;
}

.discover-preview-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.discover-preview-close:active {
  background: var(--bg-secondary);
}

.discover-preview-body {
  padding: var(--space-sm) var(--space-md) var(--space-md);
}

.discover-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  margin-top: var(--space-md);
  border-radius: 12px;
  border: none;
  background: var(--accent-botanical);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(91, 127, 94, 0.3);
}

.discover-add-btn:active {
  opacity: 0.85;
}

/* ---------- Ideas FAB ---------- */
.ideas-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-tertiary);
  border: 1px solid var(--border-soft);
  box-shadow: 0 1px 6px var(--shadow-warm);
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.ideas-fab:active {
  transform: scale(0.92);
}

/* ---------- Focus Visible ---------- */
:focus-visible {
  outline: 2px solid var(--accent-botanical);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-botanical);
  outline-offset: 2px;
}

/* ---------- Reduced Motion ---------- */
/* Full reduced-motion support defined above at "Accessibility: Reduced Motion" */
