/* ═══════════════════════════════════════════════════════
   VERDEX — Garden Heritage Plant Tracker Stylesheet
   Sandy beige + greens, Animal Crossing vibes
   ═══════════════════════════════════════════════════════ */

/* ── Quicksand (self-hosted) ── */
@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/verdex/static/fonts/quicksand-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ── Primitive Colors ── */
  --vx-bg: #f5f0e8;
  --vx-bg2: #ede7db;
  --vx-surface: #ffffff;
  --vx-surface2: #faf7f2;
  --vx-border: rgba(46,90,39,0.12);
  --vx-border-hover: rgba(46,90,39,0.25);
  --vx-primary: #2e8b57;
  --vx-primary-light: #3da06a;
  --vx-primary-dark: #1e6b3f;
  --vx-primary-glow: rgba(46,139,87,0.1);
  --vx-primary-pale: #e8f5ee;
  --vx-earth: #a0764a;
  --vx-earth-light: #c49a6c;
  --vx-earth-dark: #7a5a38;
  --vx-sky: #4a90b8;
  --vx-sun: #d4a030;
  --vx-berry: #c45c7a;
  --vx-text: #2d3a2e;
  --vx-text2: #5c7a5e;
  --vx-text3: #8da68f;

  /* ── Night / Atmospheric Primitives ── */
  --vx-moss: #1a5c38;
  --vx-twilight: #2d3a5c;
  --vx-dawn: #f0c27a;
  --vx-moonlight: #c8d6e5;
  --vx-firefly: #f5e6ab;

  /* ── Semantic Colors (day mode default) ── */
  --vx-color-surface: var(--vx-bg);
  --vx-color-surface-raised: var(--vx-surface);
  --vx-color-surface-sunken: var(--vx-bg2);
  --vx-color-text: var(--vx-text);
  --vx-color-text-secondary: var(--vx-text2);
  --vx-color-text-muted: var(--vx-text3);
  --vx-color-accent: var(--vx-primary);
  --vx-color-accent-hover: #257a4c;
  --vx-color-highlight: var(--vx-sun);
  --vx-color-danger: #c45050;
  --vx-color-success: var(--vx-primary);

  /* ── Spacing (8px grid) ── */
  --vx-space-0: 0;
  --vx-space-1: 4px;
  --vx-space-2: 8px;
  --vx-space-3: 12px;
  --vx-space-4: 16px;
  --vx-space-5: 20px;
  --vx-space-6: 24px;
  --vx-space-8: 32px;
  --vx-space-10: 40px;
  --vx-space-12: 48px;
  --vx-space-16: 64px;

  /* ── Typography Scale (Major Third ~1.25) ── */
  --vx-text-xs: 0.75rem;    /* 12px */
  --vx-text-sm: 0.875rem;   /* 14px */
  --vx-text-base: 1rem;     /* 16px */
  --vx-text-lg: 1.25rem;    /* 20px */
  --vx-text-xl: 1.5rem;     /* 24px */
  --vx-text-2xl: 2rem;      /* 32px */
  --vx-text-3xl: 2.5rem;    /* 40px */

  /* ── Elevation (green-tinted shadows) ── */
  --vx-shadow-flat: none;
  --vx-shadow-low: 0 1px 3px rgba(46,67,40,0.08);
  --vx-shadow-mid: 0 4px 8px rgba(46,67,40,0.12);
  --vx-shadow-high: 0 8px 24px rgba(46,67,40,0.16);
  --vx-shadow-top: 0 16px 48px rgba(46,67,40,0.20);

  /* ── Border Radius ── */
  --vx-radius: 16px;
  --vx-radius-sm: 8px;
  --vx-radius-lg: 24px;
  --vx-radius-full: 9999px;

  /* ── Border Widths ── */
  --vx-border-thin: 1px;
  --vx-border-thick: 2px;

  /* ── Motion Tokens ── */
  --vx-duration-instant: 100ms;
  --vx-duration-fast: 200ms;
  --vx-duration-normal: 350ms;
  --vx-duration-slow: 500ms;
  --vx-duration-ambient: 4s;

  --vx-ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --vx-ease-enter: cubic-bezier(0, 0, 0.2, 1);
  --vx-ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --vx-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --vx-ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);

  /* ── Layout ── */
  --vx-nav-h: 56px;
  --vx-nav-bottom-h: 0px;
  --vx-safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Day/Night Theme Overrides ── */
[data-time="dawn"] {
  --vx-color-surface: #f8f0e0;
  --vx-color-surface-raised: #fffdf8;
  --vx-color-highlight: var(--vx-dawn);
}
[data-time="dusk"] {
  --vx-color-surface: #efe6d8;
  --vx-color-surface-raised: #f8f2ea;
  --vx-color-text-muted: #9a8e7e;
}
[data-time="night"] {
  --vx-bg: #1a2332;
  --vx-bg2: #121a28;
  --vx-surface: #243044;
  --vx-surface2: #1e2a3c;
  --vx-text: #d4dde8;
  --vx-text2: #8fa4b8;
  --vx-text3: #5c7a8e;
  --vx-primary-pale: rgba(46,139,87,0.12);
  --vx-border: rgba(100,140,180,0.12);
  --vx-border-hover: rgba(100,140,180,0.25);
  --vx-color-surface: #1a2332;
  --vx-color-surface-raised: #243044;
  --vx-color-surface-sunken: #121a28;
  --vx-color-text: #d4dde8;
  --vx-color-text-secondary: #8fa4b8;
  --vx-color-text-muted: #5c7a8e;
  --vx-color-accent: #4aad7a;
  --vx-color-highlight: var(--vx-firefly);
}

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

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: var(--vx-bg);
  color: var(--vx-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* ── Animated monstera leaf backdrop ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%232e8b57' opacity='0.03' d='M332.9 17.37c-11.7-.1-24.2 1.23-37.5 4.13c-33.1 7.21-48.6 28.49-56.2 54.09c11.2 22.86 20.1 46.01 25 71.91c-9.6-6.9-19.7-1.7-22.6 5c-4.3-22.4-10-42.9-17.8-62.93c-48.8-34.88-83-20.9-89.6-18.76C49.64 98.12 25.54 165.7 39.84 239.1c19.32-43.4 86.56-68.7 113.56-68.6c6.9.1 47 9.5 13.6 20c-54.8 17.3-98.29 48.7-116.81 86c8.78 24.5 21.34 49.1 36.89 72.4c14.42-42 40.22-89 96.72-125.1c14.5-9.3 23.8.7 12.2 13.2c-53.5 57.4-75.1 104.2-81 148.6c17.4 20.3 37.2 38.9 58.5 54.7c1.6-54.4 20.3-117.7 56.3-164.6c3.7-6.6 22-2.7 15.6 9c-27.9 50.9-43.2 119.9-44.5 174c25.6 15.2 52.9 26.3 80.9 31.9c-15.1-35.2-18.5-80.5-6.9-120.8c5.1-17.8 20.8-8.1 17.6 4.2c-10 38.8 8.6 87.5 28.1 120.6c20.7.1 41.6-3.1 62.3-10.2c11.8-4 22.7-12.3 32.7-23.8c-11.3-22.8-27-44.1-46.6-57.2c-7.4-5-3.2-23.6 10.2-14.8c19.1 12.6 37.6 29.7 52.8 48.7c9.8-16.8 18.2-37 25-59.4c-29.7-34.7-83.3-82-128.8-101.7c-9.6-4.1-8.7-21.5 7.6-16.4c47.8 14.8 98 46.2 131.1 78c3.9-19.9 6.7-40.8 8.1-61.9c-39-27.6-95.5-67.2-147.1-74.8c-9.5-1.4-13.6-18.6 3-17.8c58.3 2.7 109.8 23.5 145.1 50.5c-.5-28.6-3.6-56.7-9.7-82.9c-41.7-13.6-113.5-18.5-141.5-6.1c-11.1 4.9-29.9-4.8-6.8-16.6c37.6-22.1 94.5-22.8 138.3-11c-21.3-57.97-60.7-99.32-123.4-99.83'/%3E%3C/svg%3E");
  background-size: 420px 420px;
  background-position: center center;
  animation: vx-bg-drift 30s ease-in-out infinite;
}
@keyframes vx-bg-drift {
  0% { background-position: 40% 40%; opacity: 1; }
  25% { background-position: 60% 35%; opacity: 0.8; }
  50% { background-position: 55% 60%; opacity: 1; }
  75% { background-position: 35% 55%; opacity: 0.8; }
  100% { background-position: 40% 40%; opacity: 1; }
}

/* ── Pixel grass border ── */
.vx-grass {
  height: 24px; margin-top: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Crect x='0' y='16' width='24' height='8' fill='%23a0764a' opacity='0.25'/%3E%3Crect x='0' y='12' width='4' height='4' fill='%232e8b57' opacity='0.4'/%3E%3Crect x='4' y='8' width='4' height='4' fill='%231e6b3f' opacity='0.4'/%3E%3Crect x='8' y='12' width='4' height='4' fill='%233da06a' opacity='0.35'/%3E%3Crect x='12' y='10' width='4' height='4' fill='%232e8b57' opacity='0.25'/%3E%3Crect x='16' y='12' width='4' height='4' fill='%233da06a' opacity='0.4'/%3E%3Crect x='20' y='8' width='4' height='4' fill='%231e6b3f' opacity='0.35'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: bottom;
  opacity: 0.7;
}

/* ── NAV ── */
.vx-nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--vx-nav-h);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 2px solid var(--vx-border);
  display: flex; align-items: center; padding: 0 16px;
  z-index: 1000; gap: 12px;
}

.vx-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--vx-primary-dark);
  font-size: 18px; font-weight: 800; letter-spacing: -0.5px;
  flex-shrink: 0;
}
.vx-logo-icon { width: 32px; height: 32px; flex-shrink: 0; }
.vx-logo span {
  background: linear-gradient(135deg, var(--vx-primary-dark), var(--vx-primary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.vx-nav-links {
  display: flex; align-items: center; gap: 2px; margin-left: auto;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.vx-nav-link {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 600; color: var(--vx-text2);
  text-decoration: none; transition: all var(--vx-duration-fast);
  white-space: nowrap; flex-shrink: 0;
  min-height: 44px;
}
.vx-nav-link:hover { background: var(--vx-primary-pale); color: var(--vx-primary-dark); }
.vx-nav-link.active { background: var(--vx-primary-pale); color: var(--vx-primary); }
.vx-nav-user {
  position: relative; margin-left: auto; flex-shrink: 0;
}
.vx-user-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--vx-primary-pale); color: var(--vx-primary-dark);
  border: 1.5px solid var(--vx-border); cursor: pointer;
  transition: all var(--vx-duration-fast);
}
.vx-user-btn:hover { background: var(--vx-primary); color: #fff; border-color: var(--vx-primary); }
.vx-user-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 160px; background: var(--vx-surface);
  border: 1.5px solid var(--vx-border); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 6px; z-index: 1001;
}
.vx-user-menu.open { display: block; }
.vx-um-name {
  padding: 8px 12px; font-size: 13px; font-weight: 700;
  color: var(--vx-text1); border-bottom: 1px solid var(--vx-border);
  margin-bottom: 4px;
}
.vx-um-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: var(--vx-text2);
  text-decoration: none; transition: all var(--vx-duration-fast);
}
.vx-um-item:hover { background: var(--vx-primary-pale); color: var(--vx-primary-dark); }

/* ── MAIN ── */
.vx-main { margin-top: var(--vx-nav-h); min-height: calc(100vh - var(--vx-nav-h)); padding-bottom: calc(80px + var(--vx-nav-bottom-h)); position: relative; z-index: 1; }
.vx-container { max-width: 640px; margin: 0 auto; padding: 24px 16px; }

/* ── HERO ── */
.vx-hero { text-align: center; margin-bottom: 20px; padding: 20px 0; }
.vx-hero-icon { margin-bottom: 12px; }
.vx-hero-title {
  font-size: 36px; font-weight: 900; letter-spacing: -1px;
  background: linear-gradient(135deg, var(--vx-primary-dark) 0%, var(--vx-primary) 50%, var(--vx-primary-light) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.vx-hero-sub {
  font-size: 13px; color: var(--vx-text2); margin-top: 6px;
  font-weight: 600;
}


/* ── STATS BAR ── */
.vx-stats-bar {
  display: flex; gap: 8px; justify-content: center;
  margin-bottom: 16px;
}
.vx-stat {
  background: var(--vx-surface);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-sm); padding: 8px 14px;
  text-align: center; flex: 1; min-width: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform 0.2s;
}
.vx-stat:hover { transform: translateY(-2px); }
.vx-stat-num {
  display: block; font-size: 20px; font-weight: 800;
  color: var(--vx-primary);
}
.vx-stat-label { font-size: 10px; color: var(--vx-text2); }

/* ── FEED ── */
.vx-feed { display: flex; flex-direction: column; gap: 16px; }

.vx-feed-card {
  background: var(--vx-surface);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius);
  overflow: hidden; transition: all 0.3s;
  cursor: pointer; text-decoration: none; color: inherit;
  display: block;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  animation: vx-card-in 0.4s ease-out both;
}
@keyframes vx-card-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.vx-feed-card:hover {
  border-color: var(--vx-border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(46,139,87,0.1);
}

.vx-fc-header { display: flex; align-items: center; gap: 12px; padding: 14px 16px 10px; }
.vx-fc-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--vx-primary-pale);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.vx-fc-icon img { width: 28px; height: 28px; }
.vx-fc-info { flex: 1; min-width: 0; }
.vx-fc-name {
  font-size: 16px; font-weight: 700; color: var(--vx-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vx-fc-name .vx-variety { font-weight: 500; color: var(--vx-text2); font-size: 14px; }
.vx-fc-slot {
  font-size: 11px; font-weight: 700; color: var(--vx-primary);
  background: var(--vx-primary-pale); padding: 2px 8px;
  border-radius: 20px;
}

.vx-fc-action-line {
  font-size: 12px; color: var(--vx-text3); margin-top: 2px;
}
.vx-fc-body { padding: 12px 16px; }
.vx-fc-action { font-size: 14px; color: var(--vx-text2); line-height: 1.5; }
.vx-fc-action strong { color: var(--vx-primary-dark); font-weight: 600; }

.vx-fc-photo {
  width: 100%; max-height: 300px; object-fit: cover;
  border-top: 1px solid var(--vx-border);
}

.vx-fc-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-top: 1px solid rgba(0,0,0,0.04);
  font-size: 12px; color: var(--vx-text3);
}
.vx-fc-cat {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
  padding: 2px 8px; border-radius: 6px;
}
.vx-fc-cat.vegetable { color: #2e8b57; background: rgba(46,139,87,0.08); }
.vx-fc-cat.herb { color: #4a90b8; background: rgba(74,144,184,0.08); }
.vx-fc-cat.fruit { color: #c45c7a; background: rgba(196,92,122,0.08); }
.vx-fc-cat.flower { color: #d4a030; background: rgba(212,160,48,0.08); }

/* Knowledge snippet in feed — compact stat pills */
.vx-fc-knowledge {
  margin: 0 16px 12px; padding: 0;
}
.vx-fc-kstats { display: flex; gap: 5px; flex-wrap: wrap; }
.vx-kstat-pill {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--vx-text2);
  background: var(--vx-primary-pale);
  padding: 3px 8px; border-radius: 12px;
}

/* Feed loading & empty */
.vx-feed-loading {
  text-align: center; padding: 32px;
  color: var(--vx-text2); font-size: 13px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.vx-feed-empty { text-align: center; padding: 48px 24px; }
.vx-feed-empty h3 { font-size: 18px; margin-top: 16px; color: var(--vx-primary); }
.vx-feed-empty p { font-size: 14px; color: var(--vx-text2); margin-top: 8px; }

/* Sprout avatar canvas sizing */
.sprout-avatar-lg {
  width: 80px; height: 80px;
  filter: drop-shadow(0 0 12px rgba(0,188,212,0.3));
}
.vx-collection-sprout {
  margin-bottom: 8px;
}
.vx-collection-sprout .sprout-avatar {
  width: 56px; height: 56px;
  filter: drop-shadow(0 0 8px rgba(0,188,212,0.3));
}

/* Sprouting seed loader */
.vx-sprout-loader { width: 40px; height: 60px; position: relative; }
.vx-seed {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 12px; height: 10px; background: var(--vx-earth);
  border-radius: 50% 50% 40% 40%;
}
.vx-stem {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 0; background: var(--vx-primary);
  border-radius: 2px; animation: vx-grow-stem 1.5s ease-out infinite;
}
.vx-leaf {
  position: absolute; top: 10px; width: 10px; height: 8px;
  background: var(--vx-primary-light); border-radius: 50%;
  opacity: 0; animation: vx-grow-leaf 1.5s ease-out infinite;
}
.vx-leaf-l { left: 6px; transform: rotate(-30deg); animation-delay: 0.6s; }
.vx-leaf-r { right: 6px; transform: rotate(30deg); animation-delay: 0.8s; }
@keyframes vx-grow-stem { 0% { height: 0; } 60%,100% { height: 30px; } }
@keyframes vx-grow-leaf {
  0%, 40% { opacity: 0; transform: scale(0.3) rotate(-30deg); }
  70%,100% { opacity: 1; transform: scale(1) rotate(-30deg); }
}

/* ── BACK BUTTON ── */
.vx-back-row { margin-bottom: 8px; }
.vx-back-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 600; color: var(--vx-text2);
  text-decoration: none; padding: 6px 12px;
  border-radius: 8px; transition: all 0.15s;
}
.vx-back-btn:hover { background: var(--vx-primary-pale); color: var(--vx-primary); }

/* ── SLOT BADGE ── */
.vx-slot-badge-wrap { text-align: center; margin-bottom: 20px; }
.vx-slot-badge {
  display: inline-block;
  font-size: 28px; font-weight: 900;
  color: var(--vx-primary);
  letter-spacing: 2px; padding: 8px 24px;
  border: 2px solid var(--vx-border);
  border-radius: 12px;
  background: var(--vx-surface);
  box-shadow: 0 2px 8px rgba(46,139,87,0.08);
}

/* ── REGISTER FORM ── */
.vx-register-card {
  background: var(--vx-surface);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius);
  padding: 28px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.vx-register-header { text-align: center; margin-bottom: 24px; }
.vx-register-icon { margin-bottom: 12px; }
.vx-register-header h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; color: var(--vx-primary-dark); }
.vx-register-header p { font-size: 14px; color: var(--vx-text2); }

.vx-field { margin-bottom: 16px; }
.vx-field label {
  display: block; font-size: 13px; font-weight: 700;
  margin-bottom: 6px; color: var(--vx-primary-dark);
}
.vx-optional { font-weight: 400; color: var(--vx-text3); }

.vx-field input[type="text"],
.vx-field input[type="date"],
.vx-field textarea,
.vx-modal-content input[type="text"] {
  width: 100%; padding: 12px 14px;
  background: var(--vx-surface2); color: var(--vx-text);
  border: 1.5px solid var(--vx-border);
  border-radius: var(--vx-radius-sm);
  font-size: 16px; font-family: inherit;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}
.vx-field input:focus,
.vx-field textarea:focus,
.vx-modal-content input:focus {
  outline: none; border-color: var(--vx-primary);
  box-shadow: 0 0 0 3px var(--vx-primary-glow);
}
/* Validation states */
.vx-field.vx-field-error input,
.vx-field.vx-field-error textarea {
  border-color: var(--vx-color-danger);
  box-shadow: 0 0 0 3px rgba(196,80,80,0.1);
}
.vx-field.vx-field-error input:focus,
.vx-field.vx-field-error textarea:focus {
  border-color: var(--vx-color-danger);
  box-shadow: 0 0 0 3px rgba(196,80,80,0.15);
}
.vx-field.vx-field-valid input,
.vx-field.vx-field-valid textarea {
  border-color: var(--vx-color-success);
}
.vx-field-msg {
  font-size: var(--vx-text-xs); margin-top: var(--vx-space-1);
  display: none;
}
.vx-field-error .vx-field-msg { display: block; color: var(--vx-color-danger); }
.vx-field-valid .vx-field-msg { display: block; color: var(--vx-color-success); }
.vx-field textarea { resize: vertical; min-height: 60px; }

/* Autocomplete */
.vx-autocomplete-wrap { position: relative; }
.vx-autocomplete-list {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--vx-surface);
  border: 1px solid var(--vx-border-hover);
  border-radius: 0 0 var(--vx-radius-sm) var(--vx-radius-sm);
  max-height: 240px; overflow-y: auto; z-index: 100;
  display: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.vx-autocomplete-list.open { display: block; }
.vx-ac-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; transition: background 0.15s;
}
.vx-ac-item:hover { background: var(--vx-primary-pale); }
.vx-ac-item img { width: 24px; height: 24px; }
.vx-ac-item-name { font-size: 14px; font-weight: 600; color: var(--vx-text); }
.vx-ac-item-cat { font-size: 11px; color: var(--vx-text3); text-transform: uppercase; letter-spacing: 0.5px; }

/* Photo upload */
.vx-photo-upload {
  position: relative;
  border: 2px dashed var(--vx-border);
  border-radius: var(--vx-radius);
  min-height: 120px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s;
  overflow: hidden; cursor: pointer;
  background: var(--vx-surface2);
}
.vx-photo-upload:hover { border-color: var(--vx-primary); }
.vx-file-input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
  width: 100%; height: 100%; z-index: 2;
}
.vx-upload-prompt {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--vx-text3); padding: 20px;
}
.vx-upload-prompt svg { opacity: 0.4; }
.vx-upload-prompt span { font-size: 13px; }
.vx-photo-preview { width: 100%; max-height: 300px; object-fit: cover; border-radius: var(--vx-radius); }

/* Knowledge preview */
.vx-knowledge-preview {
  background: var(--vx-primary-pale);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-sm);
  padding: 14px; margin-bottom: 16px;
}
.vx-kp-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.vx-kp-header strong { font-size: 15px; color: var(--vx-primary-dark); }
.vx-kp-cat { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--vx-text3); margin-left: 6px; }
.vx-kp-desc { font-size: 13px; color: var(--vx-text2); line-height: 1.5; margin-bottom: 8px; }
.vx-kp-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.vx-kp-stat { font-size: 12px; color: var(--vx-text2); display: flex; align-items: center; gap: 4px; }

/* ── Global Focus-Visible ── */
:focus-visible {
  outline: 2px solid var(--vx-primary);
  outline-offset: 2px;
}
[data-time="night"] :focus-visible {
  outline-color: var(--vx-firefly);
}
/* Remove outline for non-keyboard focus */
:focus:not(:focus-visible) { outline: none; }

/* Buttons */
.vx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border: none; border-radius: var(--vx-radius-sm);
  font-size: 16px; font-weight: 700; font-family: inherit;
  cursor: pointer; transition: all var(--vx-duration-fast) var(--vx-ease-default);
  min-height: 48px;
}
/* Size variants */
.vx-btn-sm { padding: 8px 16px; font-size: var(--vx-text-sm); min-height: 36px; gap: 6px; }
.vx-btn-lg { padding: 16px 32px; font-size: var(--vx-text-lg); min-height: 56px; }
/* Icon-only button */
.vx-btn-icon {
  width: 44px; height: 44px; min-height: 44px;
  padding: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--vx-border);
  color: var(--vx-text2); cursor: pointer;
  transition: all var(--vx-duration-fast) var(--vx-ease-default);
}
.vx-btn-icon:hover { background: var(--vx-primary-pale); color: var(--vx-primary); border-color: transparent; }
/* Secondary variant */
.vx-btn-secondary {
  background: transparent; color: var(--vx-primary);
  border: 2px solid var(--vx-primary);
}
.vx-btn-secondary:hover { background: var(--vx-primary-pale); }
.vx-btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--vx-primary-dark), var(--vx-primary));
  color: #fff; box-shadow: 0 4px 12px rgba(30,107,63,0.25);
}
.vx-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(30,107,63,0.35); }
.vx-btn-primary:active { transform: translateY(0); }
.vx-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.vx-btn-ghost {
  background: transparent; color: var(--vx-text2);
  border: 1px solid var(--vx-border);
}
.vx-btn-ghost:hover { background: var(--vx-primary-pale); color: var(--vx-primary-dark); }
.vx-btn-danger {
  background: rgba(196,60,60,0.08); color: #c43c3c;
  border: 1px solid rgba(196,60,60,0.2);
}
.vx-btn-danger:hover { background: rgba(196,60,60,0.15); }
.vx-btn-reset {
  background: transparent; color: var(--vx-text3);
  border: 1px solid var(--vx-border); font-size: var(--vx-text-sm);
  padding: 8px 16px; min-height: 36px;
}
.vx-btn-reset:hover { background: rgba(196,60,60,0.06); color: #c43c3c; border-color: rgba(196,60,60,0.2); }
.vx-reset-wrap { text-align: center; margin-top: var(--vx-space-6); }

/* ── PLANT DETAILS ── */
.vx-plant-card {
  background: var(--vx-surface);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius);
  padding: 24px 20px; margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.vx-plant-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.vx-plant-icon {
  width: 64px; height: 64px; border-radius: 16px;
  background: var(--vx-primary-pale);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.vx-plant-title { flex: 1; }
.vx-plant-title h2 { font-size: 22px; font-weight: 700; line-height: 1.2; color: var(--vx-primary-dark); }
.vx-variety { font-weight: 500; color: var(--vx-text2); font-size: 18px; }
.vx-plant-meta { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; align-items: center; }
.vx-meta-tag {
  font-size: 12px; padding: 3px 10px; border-radius: 6px;
  background: var(--vx-primary-pale); color: var(--vx-text2);
}
.vx-meta-cat { text-transform: capitalize; }

.vx-plant-notes {
  padding: 12px 14px; border-radius: var(--vx-radius-sm);
  background: var(--vx-surface2);
  font-size: 14px; color: var(--vx-text2); line-height: 1.5;
  margin-bottom: 16px;
}

/* Variety info panel */
.vx-variety-panel {
  background: rgba(212,160,48,0.06);
  border: 1px solid rgba(212,160,48,0.2);
  border-radius: var(--vx-radius);
  padding: 18px 20px; margin-bottom: 16px;
}
.vx-variety-panel .vx-kpanel-title { color: var(--vx-earth-dark); }
.vx-scoville .vx-kpi-val { color: #c43c3c; font-weight: 700; }

/* Knowledge panel */
.vx-knowledge-panel { border-top: 1px solid var(--vx-border); padding-top: 16px; }
.vx-kpanel-title {
  font-size: 14px; font-weight: 700; color: var(--vx-primary);
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.vx-kpanel-desc { font-size: 14px; color: var(--vx-text2); line-height: 1.6; margin-bottom: 14px; }

.vx-kpanel-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 10px; margin-bottom: 14px;
}
.vx-kpanel-item {
  background: var(--vx-surface2); padding: 10px 12px;
  border-radius: var(--vx-radius-sm); text-align: center;
  border: 1px solid rgba(0,0,0,0.03);
}
.vx-kpi-icon { font-size: 18px; display: block; margin-bottom: 2px; }
.vx-kpi-label { font-size: 10px; color: var(--vx-text3); text-transform: uppercase; display: block; }
.vx-kpi-val { font-size: 13px; font-weight: 600; text-transform: capitalize; display: block; color: var(--vx-text); }

.vx-kpanel-tips { margin-top: 12px; }
.vx-kpanel-tips h4 { font-size: 13px; font-weight: 700; color: var(--vx-primary); margin-bottom: 8px; }
.vx-kpanel-tips ul { list-style: none; }
.vx-kpanel-tips li {
  position: relative; padding-left: 18px;
  font-size: 13px; color: var(--vx-text2); line-height: 1.6; margin-bottom: 4px;
}
.vx-kpanel-tips li::before { content: '🌿'; position: absolute; left: 0; font-size: 10px; }

/* ── PHOTO TIMELINE ── */
.vx-timeline { margin-top: 8px; }
.vx-timeline-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 700; margin-bottom: 16px;
  color: var(--vx-primary);
}
.vx-photo-count { font-weight: 400; font-size: 13px; color: var(--vx-text3); }

.vx-photos { display: flex; flex-direction: column; gap: 16px; }
.vx-photo-card {
  border-radius: var(--vx-radius); overflow: hidden;
  border: 1px solid var(--vx-border);
  background: var(--vx-surface);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.vx-photo-card img { width: 100%; display: block; max-height: 400px; object-fit: cover; }
.vx-photo-meta {
  padding: 10px 14px; display: flex; align-items: center;
  justify-content: space-between; gap: 8px; flex-wrap: wrap;
}
.vx-photo-date { font-size: 12px; color: var(--vx-text3); }
.vx-photo-caption { font-size: 13px; color: var(--vx-text2); }
.vx-photo-weather {
  font-size: 11px; color: var(--vx-sky);
  background: rgba(74,144,184,0.08);
  padding: 2px 8px; border-radius: 6px;
}

/* Sprout AI analysis bubble */
.vx-sprout-bubble {
  margin: 0 14px 12px; padding: 10px 14px;
  background: var(--vx-primary-pale);
  border-radius: var(--vx-radius-sm);
  border: 1px solid rgba(46,139,87,0.15);
}
.vx-sprout-header {
  display: flex; align-items: center; gap: 6px; margin-bottom: 4px;
}
.vx-sprout-icon {
  width: 22px; height: 22px; line-height: 1; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.vx-sprout-icon .sprout-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  filter: drop-shadow(0 0 3px rgba(0,188,212,0.4));
}
.vx-sprout-name {
  font-size: 11px; font-weight: 700; color: var(--vx-primary-dark);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.vx-sprout-text {
  font-size: 13px; color: var(--vx-text); line-height: 1.5; margin: 0;
}

.vx-no-photos {
  text-align: center; padding: 32px;
  background: var(--vx-surface); border-radius: var(--vx-radius);
  border: 1px dashed var(--vx-border);
}
.vx-no-photos p { font-size: 14px; color: var(--vx-text3); }

/* ── FAB ── */
.vx-fab {
  position: fixed; bottom: 24px; right: 24px;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--vx-primary-dark), var(--vx-primary));
  color: #fff; border: none; cursor: pointer;
  box-shadow: 0 4px 20px rgba(30,107,63,0.3);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; z-index: 100;
  padding-bottom: var(--vx-safe-bottom);
}
.vx-fab:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(30,107,63,0.4); }
.vx-fab:active { transform: scale(0.95); }

/* ── MODAL ── */
.vx-modal {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: flex-end; justify-content: center;
}
.vx-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(45,58,46,0.6);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: vx-modal-bg-in var(--vx-duration-normal) var(--vx-ease-default);
}
@keyframes vx-modal-bg-in {
  from { opacity: 0; } to { opacity: 1; }
}
.vx-modal-content {
  position: relative; z-index: 1;
  background: var(--vx-surface);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius) var(--vx-radius) 0 0;
  padding: var(--vx-space-6) var(--vx-space-5) calc(var(--vx-space-6) + var(--vx-safe-bottom));
  width: 100%; max-width: 500px;
  max-height: 80vh; overflow-y: auto;
  animation: vx-modal-in var(--vx-duration-normal) var(--vx-ease-bounce);
}
@keyframes vx-modal-in {
  from { opacity: 0; transform: translateY(40px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.vx-modal-content h3 { font-size: var(--vx-text-lg); margin-bottom: var(--vx-space-4); color: var(--vx-primary-dark); }
.vx-modal-actions { display: flex; gap: var(--vx-space-3); margin-top: var(--vx-space-4); }
.vx-modal-actions .vx-btn { flex: 1; }

/* ── GANTT CHART ── */
.vx-gantt-header { margin-bottom: 20px; }
.vx-gantt-header h2 {
  font-size: 22px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  color: var(--vx-primary-dark);
}
.vx-gantt-sub { font-size: 14px; color: var(--vx-text2); margin-top: 4px; }

.vx-gantt-wrap {
  background: var(--vx-surface);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.vx-gantt-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
#gantt-canvas { display: block; }

.vx-gantt-legend {
  display: flex; gap: 20px; justify-content: center;
  margin-top: 16px; padding: 12px;
  font-size: 12px; color: var(--vx-text2);
}
.vx-legend-item { display: flex; align-items: center; gap: 6px; }
.vx-legend-swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

/* ── GARDEN GRID VIEW ── */
.vx-container-wide { max-width: 900px; }

.vx-garden-header { margin-bottom: 16px; }
.vx-garden-header h2 {
  font-size: 22px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  color: var(--vx-primary-dark);
}
.vx-garden-sub { font-size: 14px; color: var(--vx-text2); margin-top: 4px; }

.vx-garden-legend {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  margin-bottom: 16px; font-size: 12px; color: var(--vx-text2);
}
.vx-gl-item { display: flex; align-items: center; gap: 5px; }
.vx-gl-swatch { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.vx-gl-planted { background: var(--vx-primary); }
.vx-gl-empty { background: var(--vx-bg2); border: 1px dashed var(--vx-border); }
.vx-gl-cats { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
.vx-gl-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.vx-garden {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(46,139,87,0.03) 0%, transparent 70%),
    var(--vx-surface);
  border: 2px solid var(--vx-earth);
  border-radius: var(--vx-radius);
  padding: 8px; position: relative; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.vx-garden::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='1' fill='%23a0764a' opacity='0.06'/%3E%3Ccircle cx='5' cy='8' r='0.5' fill='%23a0764a' opacity='0.04'/%3E%3Ccircle cx='35' cy='30' r='0.7' fill='%23a0764a' opacity='0.04'/%3E%3C/svg%3E");
  z-index: 0;
}

.vx-fence-top, .vx-fence-bottom {
  display: flex; justify-content: space-around; padding: 0 4px;
  position: relative; z-index: 1;
}
.vx-fence-top { margin-bottom: 6px; }
.vx-fence-bottom { margin-top: 6px; }
.vx-fence-post {
  width: 6px; height: 14px;
  background: linear-gradient(180deg, var(--vx-earth-light), var(--vx-earth));
  border-radius: 2px 2px 0 0; position: relative;
}
.vx-fence-top .vx-fence-post::after {
  content: ''; position: absolute; top: -4px; left: -1px;
  width: 8px; height: 5px;
  background: var(--vx-earth-light);
  border-radius: 3px 3px 0 0;
}

.vx-garden-grid {
  display: grid; grid-template-columns: repeat(10, 1fr);
  gap: 4px; padding: 4px; position: relative; z-index: 1;
}

.vx-pot {
  display: flex; flex-direction: column; align-items: center;
  text-decoration: none; color: inherit;
  border-radius: 10px; padding: 4px 2px 3px;
  transition: all 0.2s; position: relative;
  aspect-ratio: 1; justify-content: center; min-width: 0;
}
.vx-pot:hover { transform: scale(1.15); z-index: 10; box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.vx-pot:active { transform: scale(1.05); }

.vx-pot-empty {
  background: rgba(160,118,74,0.04);
  border: 1px dashed rgba(160,118,74,0.15);
}
.vx-pot-empty:hover { background: rgba(46,139,87,0.06); border-color: rgba(46,139,87,0.25); }
.vx-pot-empty .vx-pot-soil {
  background: rgba(160,118,74,0.1);
  border: 1px dashed rgba(160,118,74,0.2);
}

.vx-pot-planted {
  background: rgba(46,139,87,0.06);
  border: 1px solid rgba(46,139,87,0.15);
}
.vx-pot-planted:hover { background: rgba(46,139,87,0.1); border-color: var(--vx-primary); }

.vx-pot-vegetable { border-color: rgba(46,139,87,0.2); }
.vx-pot-vegetable:hover { box-shadow: 0 4px 16px rgba(46,139,87,0.15); }
.vx-pot-herb { border-color: rgba(74,144,184,0.2); }
.vx-pot-herb:hover { box-shadow: 0 4px 16px rgba(74,144,184,0.15); }
.vx-pot-fruit { border-color: rgba(196,92,122,0.2); }
.vx-pot-fruit:hover { box-shadow: 0 4px 16px rgba(196,92,122,0.15); }
.vx-pot-flower { border-color: rgba(212,160,48,0.2); }
.vx-pot-flower:hover { box-shadow: 0 4px 16px rgba(212,160,48,0.15); }

.vx-pot-soil {
  width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(160,118,74,0.15), rgba(160,118,74,0.3));
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  border: 2px solid rgba(160,118,74,0.12);
}
.vx-pot-planted .vx-pot-soil {
  background: radial-gradient(circle at 40% 40%, rgba(46,139,87,0.08), rgba(160,118,74,0.2));
  border-color: rgba(46,139,87,0.12);
}

.vx-pot-plant-icon {
  width: 60%; height: 60%; object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
  animation: vx-pot-sway 4s ease-in-out infinite;
}
@keyframes vx-pot-sway { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(2deg); } 75% { transform: rotate(-2deg); } }
.vx-pot:nth-child(2n) .vx-pot-plant-icon { animation-delay: -1s; }
.vx-pot:nth-child(3n) .vx-pot-plant-icon { animation-delay: -2s; }
.vx-pot:nth-child(5n) .vx-pot-plant-icon { animation-delay: -0.5s; }
.vx-pot:nth-child(7n) .vx-pot-plant-icon { animation-delay: -3s; }

.vx-pot-plus { font-size: 14px; font-weight: 300; color: rgba(160,118,74,0.3); line-height: 1; }
.vx-pot-empty:hover .vx-pot-plus { color: var(--vx-primary); }

.vx-pot-label { font-size: 8px; font-weight: 700; color: var(--vx-text3); margin-top: 2px; line-height: 1; }
.vx-pot-planted .vx-pot-label { color: var(--vx-primary); opacity: 0.7; }

.vx-pot-name {
  font-size: 7px; font-weight: 600; color: var(--vx-text2);
  text-align: center; line-height: 1.1; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.vx-pot:hover::after {
  content: attr(title);
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: var(--vx-surface);
  border: 1px solid var(--vx-border);
  color: var(--vx-text); padding: 5px 10px; border-radius: 6px;
  font-size: 11px; white-space: nowrap; z-index: 20;
  pointer-events: none; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ── SEASONAL SOWING — Clean Grouped Layout ── */
.vx-seasonal {
  background: var(--vx-surface);
  border: 1.5px solid var(--vx-border);
  border-radius: var(--vx-radius);
  padding: 16px; margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.vx-seasonal-header {
  font-size: 15px; color: var(--vx-primary-dark); font-weight: 800;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--vx-border);
}
.vx-seasonal-icon { font-size: 18px; line-height: 1; }

.vx-seasonal-group { margin-bottom: 12px; }
.vx-seasonal-group:last-child { margin-bottom: 0; }

.vx-seasonal-action-label {
  font-size: 12px; font-weight: 700; color: var(--vx-text2);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 5px;
}

.vx-seasonal-pills { display: flex; flex-wrap: wrap; gap: 5px; }

.vx-seasonal-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 16px;
  font-size: 12px; font-weight: 600; color: var(--vx-text);
  background: var(--vx-surface2);
  border: 1px solid var(--vx-border);
  transition: all 0.15s;
}
.vx-seasonal-pill:hover {
  background: var(--vx-primary-pale);
  border-color: var(--vx-primary);
  transform: translateY(-1px);
}
.vx-seasonal-pill img { flex-shrink: 0; }

.vx-seasonal-vegetable { border-color: rgba(46,139,87,0.15); }
.vx-seasonal-herb { border-color: rgba(74,144,184,0.15); }
.vx-seasonal-fruit { border-color: rgba(196,92,122,0.15); }
.vx-seasonal-flower { border-color: rgba(212,160,48,0.15); }

.vx-seasonal-more {
  font-size: 11px; color: var(--vx-text3); font-weight: 600;
  padding: 4px 8px; align-self: center;
}

/* ── GARDENER LEVEL BAR ── */
.vx-level-bar {
  background: var(--vx-surface);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius);
  padding: var(--vx-space-4);
  margin-bottom: var(--vx-space-4);
  box-shadow: var(--vx-shadow-low);
}
.vx-level-header {
  display: flex; align-items: center; gap: var(--vx-space-2);
  margin-bottom: var(--vx-space-2);
}
.vx-level-badge {
  font-size: var(--vx-text-sm); font-weight: 800;
  background: linear-gradient(135deg, var(--vx-primary-dark), var(--vx-primary));
  color: #fff; padding: 2px 10px; border-radius: var(--vx-radius-full);
}
.vx-level-title {
  font-size: var(--vx-text-sm); font-weight: 700;
  color: var(--vx-primary-dark);
}
.vx-level-xp {
  margin-left: auto; font-size: var(--vx-text-xs);
  font-weight: 700; color: var(--vx-sun);
}
.vx-xp-track {
  height: 8px; background: var(--vx-bg2);
  border-radius: var(--vx-radius-full); overflow: hidden;
}
.vx-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--vx-primary), var(--vx-sun));
  border-radius: var(--vx-radius-full);
  transition: width 0.8s var(--vx-ease-bounce);
  min-width: 4px;
}
.vx-level-next {
  font-size: 11px; color: var(--vx-text3);
  text-align: right; margin-top: 4px;
}

/* ── DAILY STREAK ── */
.vx-streak-bar {
  background: var(--vx-surface);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius);
  padding: var(--vx-space-3) var(--vx-space-4);
  margin-bottom: var(--vx-space-4);
  box-shadow: var(--vx-shadow-low);
  text-align: center;
}
.vx-streak-label {
  font-size: var(--vx-text-xs); font-weight: 600;
  color: var(--vx-text2); margin-bottom: var(--vx-space-2);
}
.vx-streak-bonus {
  color: var(--vx-sun); font-weight: 800;
}
.vx-streak-seeds {
  display: flex; justify-content: center; gap: var(--vx-space-2);
}
.vx-streak-seed {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  border-radius: 50%;
  background: var(--vx-bg2);
  transition: all var(--vx-duration-fast) var(--vx-ease-bounce);
}
.vx-streak-sprouted {
  background: var(--vx-primary-pale);
  animation: vx-counter-roll 0.4s var(--vx-ease-bounce) both;
}

/* ── GROWTH STAGE INDICATORS (on garden pots) ── */
.vx-pot[data-stage="sprout"] .vx-pot-soil { border-color: rgba(46,139,87,0.2); }
.vx-pot[data-stage="growing"] .vx-pot-soil { border-color: rgba(46,139,87,0.35); }
.vx-pot[data-stage="thriving"] .vx-pot-soil {
  border-color: var(--vx-primary);
  box-shadow: 0 0 8px rgba(46,139,87,0.15);
}
.vx-pot[data-stage="legendary"] .vx-pot-soil {
  border-color: var(--vx-sun);
  box-shadow: 0 0 12px rgba(212,160,48,0.25);
}
.vx-pot[data-stage="legendary"]::before {
  content: '⭐'; position: absolute; top: -2px; right: -2px;
  font-size: 10px; z-index: 15;
}

/* ── HARVEST COUNTDOWN CARDS ── */
.vx-harvests { margin-bottom: 20px; }
.vx-harvests-title { font-size: 14px; font-weight: 700; color: var(--vx-primary-dark); margin-bottom: 10px; }
.vx-harvests-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.vx-harvest-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--vx-surface); border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-sm);
  padding: 10px 14px; min-width: 130px;
  text-decoration: none; color: inherit;
  transition: all 0.2s; flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.vx-harvest-card:hover { border-color: var(--vx-primary); transform: translateY(-2px); }
.vx-hc-ring { position: relative; width: 40px; height: 40px; flex-shrink: 0; }
.vx-hc-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.vx-hc-track { fill: none; stroke: var(--vx-bg2); stroke-width: 3; }
.vx-hc-fill { fill: none; stroke: var(--vx-primary); stroke-width: 3; stroke-linecap: round; }
.vx-hc-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.vx-hc-name { font-size: 12px; font-weight: 600; display: block; white-space: nowrap; color: var(--vx-text); }
.vx-hc-days { font-size: 13px; font-weight: 800; color: var(--vx-primary); display: block; }

/* ── CATEGORY FILTER TABS ── */
.vx-filter-tabs {
  display: flex; gap: 6px; margin-bottom: 16px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px;
}
.vx-ftab {
  padding: 10px 16px; border-radius: 20px;
  font-size: var(--vx-text-sm); font-weight: 600; font-family: inherit;
  border: 1px solid var(--vx-border);
  background: var(--vx-surface); color: var(--vx-text2);
  cursor: pointer; transition: all var(--vx-duration-fast); white-space: nowrap;
  min-height: 44px; display: inline-flex; align-items: center;
}
.vx-ftab:hover { background: var(--vx-primary-pale); }
.vx-ftab.active { background: var(--vx-primary-pale); color: var(--vx-primary); border-color: var(--vx-primary); }
.vx-ftab-vegetable.active { color: #2e8b57; border-color: rgba(46,139,87,0.4); background: rgba(46,139,87,0.08); }
.vx-ftab-herb.active { color: #4a90b8; border-color: rgba(74,144,184,0.4); background: rgba(74,144,184,0.08); }
.vx-ftab-fruit.active { color: #c45c7a; border-color: rgba(196,92,122,0.4); background: rgba(196,92,122,0.08); }
.vx-ftab-flower.active { color: #d4a030; border-color: rgba(212,160,48,0.4); background: rgba(212,160,48,0.08); }

/* ── SKELETON LOADERS ── */
.vx-skeletons { display: flex; flex-direction: column; gap: 16px; }
.vx-skeleton-card {
  background: var(--vx-surface); border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius); padding: 20px; animation: vx-shimmer 1.5s infinite;
}
.vx-skel-header { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.vx-skel-circle { width: 44px; height: 44px; border-radius: 12px; background: var(--vx-bg2); flex-shrink: 0; }
.vx-skel-lines { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.vx-skel-body { display: flex; flex-direction: column; gap: 6px; }
.vx-skel-line { height: 12px; border-radius: 6px; background: var(--vx-bg2); }
.vx-skel-line.w90 { width: 90%; } .vx-skel-line.w70 { width: 70%; }
.vx-skel-line.w60 { width: 60%; } .vx-skel-line.w40 { width: 40%; }
@keyframes vx-shimmer { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ── SEED PACKET CHECKBOX ── */
.vx-checkbox-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--vx-text2);
  cursor: pointer; padding: 8px 0; margin-top: 6px; user-select: none;
}
.vx-checkbox-label input[type="checkbox"] { display: none; }
.vx-checkbox-box {
  width: 28px; height: 28px; border-radius: 6px;
  border: 2px solid var(--vx-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all 0.2s; background: var(--vx-surface2);
}
.vx-checkbox-label input:checked + .vx-checkbox-box {
  border-color: var(--vx-sun); background: rgba(212,160,48,0.12);
}
.vx-photo-packet { position: relative; }
.vx-packet-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: rgba(212,160,48,0.92); color: #fff;
  padding: 3px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 700;
}

/* ── EDIT FORM ── */
.vx-edit-form {
  background: var(--vx-primary-pale);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-sm);
  padding: 16px; margin: 12px 0;
}
.vx-edit-row { display: flex; gap: 10px; }
.vx-edit-row .vx-field { flex: 1; }
.vx-edit-actions { display: flex; gap: 10px; margin-top: 12px; }
.vx-edit-actions .vx-btn { flex: 1; }
.vx-edit-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: none; color: var(--vx-text3);
  font-size: 12px; font-family: inherit; cursor: pointer;
  padding: 2px 8px; border-radius: 6px; transition: all 0.2s;
}
.vx-edit-btn:hover { color: var(--vx-primary); background: var(--vx-primary-pale); }

/* ── COMPANION PLANTS ── */
.vx-neighbours { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--vx-border); }
.vx-neighbours-group { margin-bottom: 10px; }
.vx-neighbours-group h4 { font-size: 12px; font-weight: 700; margin-bottom: 6px; color: var(--vx-text2); }
.vx-neighbour-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.vx-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.vx-pill-good { background: rgba(46,139,87,0.08); color: #2e8b57; border: 1px solid rgba(46,139,87,0.2); }
.vx-pill-bad { background: rgba(196,60,60,0.06); color: #c43c3c; border: 1px solid rgba(196,60,60,0.15); }

/* ── PHOTO COMPARISON SLIDER ── */
.vx-compare-wrap { text-align: center; margin: 12px 0; }
.vx-compare-btn { margin: 0 auto; }
.vx-compare-content { max-width: 600px; }
.vx-compare-slider {
  position: relative; width: 100%; overflow: hidden;
  border-radius: var(--vx-radius-sm);
  touch-action: none; user-select: none;
}
.vx-compare-img { width: 100%; display: block; }
.vx-compare-before-clip { position: absolute; top: 0; left: 0; bottom: 0; overflow: hidden; }
.vx-compare-before-clip img { width: 100vw; max-width: 600px; }
.vx-compare-handle {
  position: absolute; top: 0; bottom: 0; width: 3px;
  background: var(--vx-primary); transform: translateX(-50%); cursor: ew-resize; z-index: 5;
}
.vx-compare-line { position: absolute; inset: 0; background: var(--vx-primary); }
.vx-compare-grip {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--vx-primary); color: #fff; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.vx-compare-labels {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-size: 11px; color: var(--vx-text3);
}

/* ── GARDEN SEARCH ── */
.vx-garden-search { margin-bottom: 12px; }
.vx-garden-search input {
  width: 100%; padding: 10px 14px;
  background: var(--vx-surface); color: var(--vx-text);
  border: 1px solid var(--vx-border); border-radius: var(--vx-radius-sm);
  font-size: 14px; font-family: inherit;
}
.vx-garden-search input:focus { border-color: var(--vx-primary); box-shadow: 0 0 0 3px var(--vx-primary-glow); }
.vx-pot-dim { opacity: 0.15; pointer-events: none; }
.vx-pot-highlight { animation: vx-pot-pulse 0.8s ease-in-out 2; }
@keyframes vx-pot-pulse {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 12px var(--vx-primary), 0 0 24px var(--vx-primary-glow); }
}

/* ── GARDEN WEATHER INDICATOR ── */
.vx-garden-weather {
  display: inline-flex; align-items: center; gap: var(--vx-space-1);
  font-size: var(--vx-text-xs); font-weight: 600;
  color: var(--vx-sky); background: rgba(74,144,184,0.08);
  padding: 4px 12px; border-radius: var(--vx-radius-full);
  margin-bottom: var(--vx-space-3);
}

/* ── GARDEN WEATHER OVERLAYS ── */
.vx-garden[data-weather="rain"]::after {
  content: ''; position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    100deg,
    transparent,
    transparent 98%,
    rgba(74,144,184,0.15) 98%,
    rgba(74,144,184,0.15) 100%
  );
  background-size: 12px 30px;
  animation: vx-rain-fall 0.5s linear infinite;
}
@keyframes vx-rain-fall {
  from { background-position: 0 0; }
  to { background-position: -4px 30px; }
}

.vx-garden[data-weather="snow"]::after {
  content: ''; position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.6) 1px, transparent 1px);
  background-size: 20px 20px;
  animation: vx-snow-fall 3s linear infinite;
}
@keyframes vx-snow-fall {
  from { background-position: 0 0; }
  to { background-position: 10px 60px; }
}

.vx-garden[data-weather="cloudy"]::after {
  content: ''; position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.04) 0%, transparent 40%);
}

.vx-garden[data-weather="clear"]::after {
  content: ''; position: absolute; top: 0; right: 0; z-index: 2;
  width: 60%; height: 60%; pointer-events: none;
  background: radial-gradient(ellipse at top right, rgba(255,220,100,0.06) 0%, transparent 70%);
}

/* ── POT BREATHING (ambient life) ── */
@media (prefers-reduced-motion: no-preference) {
  .vx-pot-planted .vx-pot-soil {
    animation: vx-pot-breathe 5s ease-in-out infinite;
  }
  .vx-pot:nth-child(2n) .vx-pot-soil { animation-delay: -1.2s; }
  .vx-pot:nth-child(3n) .vx-pot-soil { animation-delay: -2.5s; }
  .vx-pot:nth-child(5n) .vx-pot-soil { animation-delay: -3.8s; }
  .vx-pot:nth-child(7n) .vx-pot-soil { animation-delay: -0.7s; }
}
@keyframes vx-pot-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* ── GARDEN STATS FOOTER ── */
.vx-garden-stats {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-top: 16px; padding: 12px 16px;
  background: var(--vx-surface); border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-sm); font-size: 13px; color: var(--vx-text2);
}
.vx-gs-item strong { color: var(--vx-primary); }
.vx-gs-vegetable { color: #2e8b57; }
.vx-gs-herb { color: #4a90b8; }
.vx-gs-fruit { color: #c45c7a; }
.vx-gs-flower { color: #d4a030; }
.vx-gs-empty { color: var(--vx-text3); }

/* ── CONFETTI ── */
.vx-confetti {
  position: fixed; top: -40px; z-index: 9999;
  pointer-events: none;
  animation: vx-confetti-fall linear forwards;
}
@keyframes vx-confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ── PAGE FADE TRANSITION ── */
.vx-main { animation: vx-fade-in 0.3s ease-out; }
@keyframes vx-fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  :root { --vx-nav-bottom-h: 56px; }
  .vx-container { padding: 16px 12px; }
  .vx-hero-title { font-size: 28px; }

  /* Top bar: just logo + user */
  .vx-nav { gap: 8px; }
  .vx-nav-links {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: calc(var(--vx-nav-bottom-h) + var(--vx-safe-bottom));
    padding-bottom: var(--vx-safe-bottom);
    margin: 0; gap: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1.5px solid var(--vx-border);
    border-bottom: none;
    justify-content: space-around;
    overflow: visible;
    z-index: 1000;
  }
  .vx-nav-link {
    flex-direction: column; gap: 2px;
    padding: 6px 4px; min-height: 0;
    font-size: 9px; border-radius: 0;
    flex: 1; justify-content: center; align-items: center;
  }
  .vx-nav-link svg { width: 20px; height: 20px; }
  .vx-nav-link span { display: block; }
  .vx-nav-link.active { background: none; color: var(--vx-primary); }
  .vx-nav-link:hover { background: none; }

  .vx-kpanel-grid { grid-template-columns: repeat(2, 1fr); }
  .vx-fab { bottom: calc(var(--vx-nav-bottom-h) + 16px); right: 16px; }
  .vx-garden-grid { grid-template-columns: repeat(5, 1fr); gap: 3px; }
  .vx-pot-name { display: none; }
  .vx-pot-label { font-size: 7px; }
  .vx-fence-post { width: 4px; height: 10px; }
  .vx-garden-legend { font-size: 10px; gap: 10px; }
}
@media (min-width: 601px) and (max-width: 768px) {
  .vx-garden-grid { grid-template-columns: repeat(8, 1fr); }
}

/* ── TOAST ── */
.vx-toast {
  position: fixed; top: calc(var(--vx-nav-h) + 12px);
  left: 50%; transform: translateX(-50%);
  background: var(--vx-primary-dark); color: #fff;
  padding: 10px 20px; border-radius: 8px;
  font-size: 14px; font-weight: 600; z-index: 3000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: vx-toast-in 0.3s ease-out;
}
@keyframes vx-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── GALLERY ── */
/* ── SCRAPBOOK GALLERY ── */
.vx-gallery-header { margin-bottom: var(--vx-space-4); }
.vx-gallery-header h2 {
  font-size: var(--vx-text-xl); font-weight: 700; color: var(--vx-primary-dark);
  display: flex; align-items: center; gap: var(--vx-space-2);
}
.vx-gallery-sub {
  font-size: var(--vx-text-sm); color: var(--vx-text2); margin-top: var(--vx-space-1);
}
.vx-gallery-sub strong { color: var(--vx-primary); font-weight: 800; }

/* Scrapbook page background */
.vx-scrapbook {
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 31px,
      rgba(46,139,87,0.06) 31px,
      rgba(46,139,87,0.06) 32px
    ),
    linear-gradient(135deg, var(--vx-surface) 0%, var(--vx-surface2) 100%);
  border-radius: var(--vx-radius-lg);
  padding: var(--vx-space-6) var(--vx-space-4);
  box-shadow: var(--vx-shadow-low);
  border: 1px solid var(--vx-border);
  position: relative;
  min-height: 200px;
}
/* Spiral binding dots along left edge */
.vx-scrapbook::before {
  content: '';
  position: absolute; left: 18px; top: 20px; bottom: 20px;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    var(--vx-border) 0px, var(--vx-border) 6px,
    transparent 6px, transparent 20px
  );
  opacity: 0.5;
}

/* Month section headers */
.vx-scrapbook-month {
  display: flex; align-items: center; gap: var(--vx-space-3);
  margin: var(--vx-space-6) 0 var(--vx-space-4);
  padding-left: var(--vx-space-8);
}
.vx-scrapbook-month:first-child { margin-top: 0; }
.vx-scrapbook-month-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--vx-primary-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.vx-scrapbook-month-label {
  font-size: var(--vx-text-lg); font-weight: 700;
  color: var(--vx-primary-dark); letter-spacing: 0.5px;
}
.vx-scrapbook-month-count {
  font-size: var(--vx-text-xs); color: var(--vx-text3);
  background: var(--vx-bg2); padding: 2px 10px;
  border-radius: 20px; font-weight: 600;
}
.vx-scrapbook-month-line {
  flex: 1; height: 1px;
  background: linear-gradient(to right, var(--vx-border), transparent);
}

/* Photo grid — scrapbook layout */
.vx-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--vx-space-5);
  padding: 0 var(--vx-space-4) 0 var(--vx-space-8);
}

/* Polaroid card */
.vx-gallery-thumb {
  background: var(--vx-surface);
  border-radius: 4px;
  padding: 6px 6px 0 6px;
  box-shadow:
    0 1px 3px rgba(45,58,46,0.1),
    0 4px 12px rgba(45,58,46,0.06);
  cursor: pointer;
  position: relative;
  transition: transform var(--vx-duration-fast) var(--vx-ease-bounce),
              box-shadow var(--vx-duration-fast) var(--vx-ease-default);
  transform-origin: center center;
}
.vx-gallery-thumb:hover {
  z-index: 2;
  transform: rotate(0deg) scale(1.05) translateY(-4px) !important;
  box-shadow:
    0 8px 24px rgba(45,58,46,0.15),
    0 2px 6px rgba(45,58,46,0.1);
}

/* Photo inside polaroid */
.vx-gallery-thumb-img {
  width: 100%; aspect-ratio: 1;
  object-fit: cover; display: block;
  border-radius: 2px;
}

/* Caption strip (handwriting style) */
.vx-gallery-thumb-caption {
  padding: 6px 4px 8px;
  font-family: 'Segoe Script', 'Comic Neue', 'Caveat', cursive;
  font-size: 11px; line-height: 1.3;
  color: var(--vx-text2);
  text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-height: 26px;
  display: flex; align-items: center; justify-content: center;
}

/* Seed packet badge on polaroid */
.vx-gallery-packet {
  position: absolute; top: 10px; left: 10px;
  font-size: 14px; line-height: 1;
  background: rgba(255,255,255,0.92);
  border-radius: 4px; padding: 2px 5px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Category dot */
.vx-gallery-cat-dot {
  position: absolute; top: 10px; right: 10px;
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.vx-gallery-cat-vegetable { background: #2e8b57; }
.vx-gallery-cat-herb { background: #4a90b8; }
.vx-gallery-cat-fruit { background: #c45c7a; }
.vx-gallery-cat-flower { background: #d4a030; }

/* Tape decoration (random per card via JS data-tape) */
.vx-gallery-thumb[data-tape="1"]::before,
.vx-gallery-thumb[data-tape="2"]::before {
  content: '';
  position: absolute; z-index: 3;
  background: rgba(212,200,160,0.45);
  backdrop-filter: blur(1px);
}
.vx-gallery-thumb[data-tape="1"]::before {
  width: 40px; height: 14px;
  top: -5px; left: 50%; transform: translateX(-50%) rotate(-2deg);
  border-radius: 2px;
}
.vx-gallery-thumb[data-tape="2"]::before {
  width: 36px; height: 14px;
  top: -4px; right: 8px;
  transform: rotate(8deg);
  border-radius: 2px;
}

/* ── LIGHTBOX (Scrapbook page-spread style) ── */
.vx-lightbox {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; align-items: center; justify-content: center;
}
.vx-lightbox-backdrop {
  position: absolute; inset: 0;
  background: rgba(45,58,46,0.8);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.vx-lightbox-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  background: rgba(255,255,255,0.92); border: none;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--vx-text);
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  transition: transform var(--vx-duration-fast) var(--vx-ease-bounce);
}
.vx-lightbox-close:hover { transform: scale(1.1); }

.vx-lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 10; background: rgba(255,255,255,0.92);
  border: none; width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--vx-text);
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  transition: transform var(--vx-duration-fast) var(--vx-ease-bounce),
              opacity var(--vx-duration-fast);
}
.vx-lightbox-nav:hover { transform: translateY(-50%) scale(1.1); }
.vx-lightbox-prev { left: 16px; }
.vx-lightbox-next { right: 16px; }

/* Page-spread card with torn-paper edge */
.vx-lightbox-card {
  position: relative; z-index: 5;
  background: var(--vx-surface);
  border-radius: var(--vx-radius-lg);
  max-width: 520px; width: 92%;
  max-height: 90vh; overflow-y: auto;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.2),
    0 2px 8px rgba(0,0,0,0.08);
  animation: vx-lightbox-in 0.3s var(--vx-ease-bounce);
}
/* Torn paper top edge */
.vx-lightbox-card::before {
  content: '';
  position: absolute; top: -6px; left: 8px; right: 8px; height: 6px;
  background:
    linear-gradient(135deg, var(--vx-surface) 33.33%, transparent 33.33%) 0 0 / 12px 6px,
    linear-gradient(225deg, var(--vx-surface) 33.33%, transparent 33.33%) 0 0 / 12px 6px;
  background-repeat: repeat-x;
}
@keyframes vx-lightbox-in {
  from { opacity: 0; transform: scale(0.92) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.vx-lightbox-img-wrap { position: relative; }
.vx-lightbox-img {
  width: 100%; display: block;
  border-radius: var(--vx-radius-lg) var(--vx-radius-lg) 0 0;
  max-height: 60vh; object-fit: cover;
}

.vx-lightbox-meta { padding: var(--vx-space-4) var(--vx-space-5); }

.vx-lightbox-header {
  display: flex; align-items: center; gap: var(--vx-space-3);
  margin-bottom: var(--vx-space-3);
}
.vx-lightbox-info { flex: 1; min-width: 0; }
.vx-lightbox-sub {
  display: flex; align-items: center; gap: var(--vx-space-2);
  margin-top: var(--vx-space-1); font-size: var(--vx-text-sm); color: var(--vx-text2);
}
.vx-lightbox-date { font-size: var(--vx-text-xs); color: var(--vx-text3); }

.vx-lightbox-weather {
  display: inline-block;
  font-size: var(--vx-text-xs); color: var(--vx-sky);
  background: rgba(74,144,184,0.08);
  padding: 3px 10px; border-radius: 20px;
  margin-bottom: var(--vx-space-2);
}

/* Handwriting-style caption in lightbox */
.vx-lightbox-caption {
  font-family: 'Segoe Script', 'Comic Neue', 'Caveat', cursive;
  font-size: 15px; color: var(--vx-text2);
  line-height: 1.6; margin-bottom: var(--vx-space-2);
  padding: var(--vx-space-2) var(--vx-space-3);
  background: rgba(245,240,232,0.5);
  border-radius: var(--vx-radius-sm);
  border-left: 3px solid var(--vx-primary-pale);
}

.vx-lightbox-packet-tag {
  display: inline-block;
  font-size: var(--vx-text-xs); font-weight: 600;
  background: rgba(212,160,48,0.1);
  color: var(--vx-sun); padding: 3px 10px;
  border-radius: 20px; margin-bottom: var(--vx-space-2);
}

.vx-lightbox-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--vx-primary); font-size: var(--vx-text-sm); font-weight: 600;
  text-decoration: none; padding: var(--vx-space-2) var(--vx-space-3);
  border-radius: var(--vx-radius-sm);
  background: var(--vx-primary-pale);
  transition: all var(--vx-duration-fast); margin-top: var(--vx-space-1);
}
.vx-lightbox-link:hover { background: rgba(46,139,87,0.15); }

.vx-lightbox-counter {
  text-align: center; font-size: var(--vx-text-xs); font-weight: 600;
  color: var(--vx-text3); padding: var(--vx-space-2) var(--vx-space-4) var(--vx-space-3);
}

/* Gallery responsive */
@media (min-width: 601px) {
  .vx-gallery-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 900px) {
  .vx-gallery-grid { grid-template-columns: repeat(5, 1fr); gap: var(--vx-space-6); }
}
@media (max-width: 600px) {
  .vx-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--vx-space-4);
    padding-left: var(--vx-space-4);
  }
  .vx-scrapbook { padding: var(--vx-space-4) var(--vx-space-2); }
  .vx-scrapbook::before { display: none; }
  .vx-scrapbook-month { padding-left: var(--vx-space-2); }
  .vx-lightbox-card {
    max-width: 100%; width: 100%;
    border-radius: var(--vx-radius-lg) var(--vx-radius-lg) 0 0;
    position: absolute; bottom: 0; left: 0; right: 0;
    max-height: 85vh;
  }
  .vx-lightbox-card::before { display: none; }
  .vx-lightbox { align-items: flex-end; }
  .vx-lightbox-nav { display: none; }
  @keyframes vx-lightbox-in {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* Reduced motion — no polaroid rotation or hover bounce */
@media (prefers-reduced-motion: reduce) {
  .vx-gallery-thumb { transform: none !important; }
  .vx-gallery-thumb:hover { transform: none !important; }
}

/* ── DAILY REPORT CARD ── */
/* ── Welcome (new user onboarding) ── */
.vx-welcome {
  background: var(--vx-surface);
  border: 1.5px solid rgba(46,139,87,0.25);
  border-radius: var(--vx-radius);
  padding: 24px 20px;
  margin-bottom: 20px;
  text-align: center;
}
.vx-welcome-sprout {
  width: 70px; height: 75px; margin: 0 auto 8px;
}
.vx-welcome-sprout canvas { width: 70px; height: 75px; }
.vx-welcome-title {
  font-size: 1.3rem; font-weight: 800; color: var(--vx-primary-dark);
  margin: 0 0 8px 0;
}
.vx-welcome-text {
  font-size: 0.9rem; color: var(--vx-text2); line-height: 1.5;
  margin: 0 0 16px 0; max-width: 440px; margin-left: auto; margin-right: auto;
}
.vx-welcome-steps {
  display: flex; flex-direction: column; gap: 6px;
  max-width: 360px; margin: 0 auto 16px; text-align: left;
}
.vx-welcome-step {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.85rem; color: var(--vx-text);
}
.vx-ws-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--vx-primary); color: #fff;
  font-size: 0.75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.vx-welcome-cta {
  font-size: 0.85rem; font-weight: 700; color: var(--vx-primary);
  margin: 0 0 12px 0;
}
.vx-welcome-slots {
  display: flex; justify-content: center; gap: 8px;
}
.vx-welcome-slots .vx-pot {
  width: 60px; height: 68px;
}

.vx-daily-report {
  background: var(--vx-surface);
  border: 1.5px solid rgba(46,139,87,0.2);
  border-radius: var(--vx-radius);
  padding: 16px; margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(46,139,87,0.06);
  animation: vx-card-in 0.4s ease-out;
}
.vx-dr-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.vx-dr-avatar {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--vx-primary-pale); border-radius: 50%;
  flex-shrink: 0; overflow: hidden;
  box-shadow: 0 0 8px rgba(0,188,212,0.25), 0 0 16px rgba(0,188,212,0.1);
  border: 2px solid rgba(0,188,212,0.2);
}
.vx-dr-avatar .sprout-avatar {
  width: 40px; height: 40px; border-radius: 50%;
}
.vx-dr-title-wrap { flex: 1; }
.vx-dr-title {
  font-size: 13px; font-weight: 700; color: var(--vx-primary-dark);
  text-transform: uppercase; letter-spacing: 0.5px; display: block;
}
.vx-dr-date { font-size: 11px; color: var(--vx-text3); }
.vx-dr-text {
  font-size: 14px; color: var(--vx-text); line-height: 1.6; margin: 0;
}

/* ── GARDEN EDIT MODE ── */
.vx-btn-edit-grid {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 600; font-family: inherit;
  background: var(--vx-surface); color: var(--vx-text2);
  border: 1px solid var(--vx-border);
  cursor: pointer; transition: all 0.2s;
  margin-left: auto;
}
.vx-btn-edit-grid:hover { background: var(--vx-primary-pale); color: var(--vx-primary); }
.vx-btn-edit-grid.active {
  background: var(--vx-primary); color: #fff;
  border-color: var(--vx-primary);
}

.vx-grid-editing .vx-pot {
  animation: vx-wobble-1 0.3s ease-in-out infinite alternate;
  cursor: pointer;
}
.vx-grid-editing .vx-pot:nth-child(2n) { animation: vx-wobble-2 0.25s ease-in-out infinite alternate; animation-delay: -0.07s; }
.vx-grid-editing .vx-pot:nth-child(3n) { animation: vx-wobble-3 0.35s ease-in-out infinite alternate; animation-delay: -0.15s; }
.vx-grid-editing .vx-pot:nth-child(5n) { animation: vx-wobble-1 0.28s ease-in-out infinite alternate; animation-delay: -0.2s; }
.vx-grid-editing .vx-pot:nth-child(7n) { animation: vx-wobble-2 0.32s ease-in-out infinite alternate; animation-delay: -0.05s; }
.vx-grid-editing .vx-pot:nth-child(11n) { animation: vx-wobble-3 0.22s ease-in-out infinite alternate; animation-delay: -0.12s; }
@keyframes vx-wobble-1 {
  0% { transform: rotate(-2.5deg) scale(0.97); }
  100% { transform: rotate(2.5deg) scale(1.03); }
}
@keyframes vx-wobble-2 {
  0% { transform: rotate(2deg) translateY(-1px); }
  100% { transform: rotate(-2deg) translateY(1px); }
}
@keyframes vx-wobble-3 {
  0% { transform: rotate(-1.5deg) translateX(-1px); }
  100% { transform: rotate(3deg) translateX(1px); }
}
.vx-grid-editing .vx-pot-selected {
  outline: 3px solid var(--vx-primary) !important;
  outline-offset: -1px;
  background: var(--vx-primary-pale) !important;
  animation: vx-wobble-selected 0.15s ease-in-out infinite alternate !important;
}
@keyframes vx-wobble-selected {
  0% { transform: scale(1.08) rotate(-1deg); }
  100% { transform: scale(1.08) rotate(1deg); }
}

.vx-pot-dragging { opacity: 0.3; transform: scale(0.9) !important; }
.vx-pot-drop-target {
  outline: 2px dashed var(--vx-primary) !important;
  outline-offset: -2px;
  background: var(--vx-primary-pale) !important;
}

.vx-pot-touch-clone {
  position: fixed; z-index: 9999; pointer-events: none;
  opacity: 0.85; transform: scale(1.15);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  background: var(--vx-surface);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
}

/* ── LAYOUT PAGE ── */
.vx-layout-page {
  display: flex; height: calc(100vh - var(--vx-nav-h));
  margin-top: var(--vx-nav-h);
  overflow: hidden;
}

/* Sidebar */
.vx-layout-sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--vx-surface);
  border-right: 1px solid var(--vx-border);
  display: flex; flex-direction: column;
  z-index: 10; transition: margin-left 0.3s;
}
.vx-layout-sidebar.collapsed { margin-left: -200px; }
.vx-ls-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--vx-border);
}
.vx-ls-header h3 { font-size: 15px; font-weight: 700; color: var(--vx-primary-dark); margin: 0; }
.vx-ls-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--vx-text3); padding: 4px;
}
.vx-ls-search {
  margin: 8px 10px; padding: 8px 10px;
  border: 1px solid var(--vx-border); border-radius: 8px;
  font-size: 13px; font-family: inherit;
  background: var(--vx-surface2); color: var(--vx-text);
}
.vx-ls-search:focus { border-color: var(--vx-primary); box-shadow: 0 0 0 3px var(--vx-primary-glow); }
.vx-ls-list { flex: 1; overflow-y: auto; padding: 4px 8px; }
.vx-ls-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px;
  cursor: grab; transition: background 0.15s;
  font-size: 13px; color: var(--vx-text);
  border: 1px solid transparent; margin-bottom: 2px;
}
.vx-ls-item:hover { background: var(--vx-primary-pale); }
.vx-ls-item:active { cursor: grabbing; }
.vx-ls-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.vx-ls-slot { font-size: 10px; color: var(--vx-text3); font-weight: 700; }
.vx-ls-hint {
  padding: 10px 14px; font-size: 11px; color: var(--vx-text3);
  text-align: center; border-top: 1px solid var(--vx-border);
}
.vx-ls-empty {
  text-align: center; padding: 20px; color: var(--vx-text3); font-size: 13px;
}
.vx-ls-item-clone {
  padding: 8px 12px; background: var(--vx-surface);
  border: 1px solid var(--vx-primary); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}

/* Map area */
.vx-layout-map-wrap {
  flex: 1; overflow: hidden; position: relative;
  background: var(--vx-bg2);
  cursor: grab;
  touch-action: none;
}
.vx-layout-map-wrap:active { cursor: grabbing; }

.vx-layout-map {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  transform-origin: center center;
  transition: transform 0.1s ease-out;
}

/* Garden map structure */
.vx-lm-garden {
  position: relative;
  width: 700px; height: 490px;
  background: var(--vx-bg);
  border: 2px solid var(--vx-earth);
  border-radius: 4px;
  overflow: hidden;
}

/* Bark mulch (top 40%) */
.vx-lm-bark {
  position: absolute; top: 0; left: 0; right: 0; height: 40%;
  background: #8b7355;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Ccircle cx='3' cy='7' r='1' fill='%23725f47' opacity='0.5'/%3E%3Ccircle cx='14' cy='3' r='0.8' fill='%239a856b' opacity='0.4'/%3E%3Ccircle cx='8' cy='15' r='1.2' fill='%23725f47' opacity='0.3'/%3E%3C/svg%3E");
}

/* Brick walls */
.vx-lm-wall-left {
  position: absolute; top: 0; left: 0; width: 8px; height: 40%;
  background: repeating-linear-gradient(0deg, #a0522d 0px, #a0522d 6px, #8b4513 6px, #8b4513 8px);
  z-index: 2;
}
.vx-lm-wall-bottom-left {
  position: absolute; top: 60%; left: 0; width: 8px; height: 40%;
  background: repeating-linear-gradient(0deg, #a0522d 0px, #a0522d 6px, #8b4513 6px, #8b4513 8px);
  z-index: 2;
}

/* Raised beds */
.vx-lm-bed {
  position: absolute; z-index: 3;
  background: #6b5440;
  border: 2px solid #5a4535;
  border-radius: 3px;
}
.vx-lm-bed1 { top: 6%; left: 10%; width: 16%; height: 13%; }
.vx-lm-bed2 { top: 22%; left: 10%; width: 16%; height: 15%; }
.vx-lm-bed3 { top: 22%; right: 4%; width: 12%; height: 14%; }

/* Greenhouse */
.vx-lm-greenhouse {
  position: absolute; top: 4%; left: 35%; width: 24%; height: 32%;
  background: rgba(200,220,240,0.3);
  border: 2px solid #b0b8c0;
  border-radius: 2px; z-index: 3;
  display: flex; flex-direction: column; gap: 2px; padding: 3px;
}
.vx-lm-gh-pane {
  flex: 1; background: rgba(180,210,240,0.25);
  border: 1px solid rgba(176,184,192,0.5);
  border-radius: 1px;
}

/* Pond */
.vx-lm-pond {
  position: absolute; top: 2%; right: 4%; width: 18%; height: 18%;
  background: radial-gradient(ellipse, #5ba8d4 30%, #4a96c0 100%);
  border-radius: 40% 50% 45% 55%;
  border: 2px solid #4a8aad; z-index: 3;
}

/* Lawn */
.vx-lm-lawn {
  position: absolute; top: 44%; left: 25%; width: 50%; height: 40%;
  background: linear-gradient(135deg, #7ec87e 0%, #6ab86a 50%, #7ec87e 100%);
  border-radius: 2px; z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Crect x='0' y='0' width='15' height='15' fill='%2372b872' opacity='0.3'/%3E%3C/svg%3E");
}

/* Patios */
.vx-lm-patio-left {
  position: absolute; top: 44%; left: 0; width: 25%; height: 25%;
  background: #e8e0d0;
  border: 1px solid #d0c8b8; z-index: 1;
}
.vx-lm-passage {
  position: absolute; top: 70%; left: 0; width: 10%; height: 16%;
  background: #d8d0c0; z-index: 1;
  border-right: 2px solid #a0522d;
}
.vx-lm-patio-bottom {
  position: absolute; bottom: 0; left: 10%; width: 60%; height: 14%;
  background: #ddd6c8; z-index: 1;
  border-top: 1px solid #c8c0b0;
}
.vx-lm-flowerbed {
  position: absolute; bottom: 0; left: 20%; width: 40%; height: 8%;
  background: #6b5440; z-index: 2;
  border-radius: 2px;
}
.vx-lm-patio-right {
  position: absolute; bottom: 0; right: 0; width: 16%; height: 14%;
  background: #ccc5b8; z-index: 1;
  border: 1px solid #b8b0a0;
}
.vx-lm-fence-right {
  position: absolute; top: 0; right: 0; width: 6px; height: 100%;
  background: #c49a6c; z-index: 2;
}

/* Scale markers */
.vx-lm-scale {
  position: absolute; top: -18px; left: 0; right: 0;
  display: flex; justify-content: space-between;
  font-size: 9px; color: var(--vx-text3); padding: 0 2px;
  font-weight: 600;
}

/* Plant pins on map */
.vx-lm-pins { position: absolute; inset: 0; z-index: 10; }
.vx-lm-pin {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center;
  text-decoration: none; cursor: grab; z-index: 5;
  transition: transform 0.15s;
}
.vx-lm-pin:hover { transform: translate(-50%, -50%) scale(1.2); z-index: 20; }
.vx-lm-pin img {
  width: 28px; height: 28px; padding: 4px;
  background: var(--vx-surface);
  border-radius: 50%; border: 2px solid var(--vx-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.vx-lm-pin-vegetable img { border-color: #2e8b57; }
.vx-lm-pin-herb img { border-color: #4a90b8; }
.vx-lm-pin-fruit img { border-color: #c45c7a; }
.vx-lm-pin-flower img { border-color: #d4a030; }
.vx-pin-label {
  font-size: 8px; font-weight: 700; color: var(--vx-text);
  background: rgba(255,255,255,0.9); padding: 1px 4px;
  border-radius: 4px; margin-top: 2px;
  white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.vx-pin-dragging { opacity: 0.7; cursor: grabbing !important; }
.vx-pin-dragging img { border-color: var(--vx-sun) !important; }

/* Zoom controls */
.vx-layout-zoom {
  position: absolute; bottom: 16px; right: 16px;
  display: flex; flex-direction: column; gap: 4px; z-index: 20;
}
.vx-layout-zoom button {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--vx-surface); border: 1px solid var(--vx-border);
  font-size: 18px; font-weight: 700; cursor: pointer;
  color: var(--vx-text); box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; font-family: inherit;
}
.vx-layout-zoom button:hover { background: var(--vx-primary-pale); color: var(--vx-primary); }

/* Layout responsive */
@media (max-width: 600px) {
  .vx-layout-page { height: calc(100vh - var(--vx-nav-h) - var(--vx-nav-bottom-h)); }
  .vx-layout-sidebar {
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 200px; box-shadow: 4px 0 16px rgba(0,0,0,0.1);
  }
  .vx-layout-sidebar.collapsed { margin-left: -160px; }
  .vx-lm-garden { width: 500px; height: 350px; }
}

/* ── Layout Controls Bar ── */
.vx-layout-controls {
  position: absolute; top: 12px; right: 60px; z-index: 20;
  display: flex; gap: 6px;
}
.vx-lc-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 8px;
  font-size: 12px; font-weight: 600; font-family: inherit;
  background: var(--vx-surface); color: var(--vx-text2);
  border: 1px solid var(--vx-border); cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.2s;
}
.vx-lc-btn:hover { background: var(--vx-primary-pale); color: var(--vx-primary); }
.vx-lc-btn.active {
  background: var(--vx-primary); color: #fff;
  border-color: var(--vx-primary);
}

/* ── Garden Element Editing ── */
.vx-garden-editing {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.vx-garden-editing .vx-ge-editable {
  outline: 2px dashed rgba(46,139,87,0.4);
  outline-offset: -1px;
  cursor: move;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.vx-garden-editing .vx-ge-editable:hover {
  outline-color: var(--vx-primary);
  outline-style: solid;
}

.vx-ge-label {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 9px; font-weight: 700;
  color: rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.45);
  padding: 2px 6px; border-radius: 4px;
  pointer-events: none; white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  z-index: 5;
}

.vx-ge-handle {
  position: absolute; bottom: -3px; right: -3px;
  width: 14px; height: 14px;
  background: var(--vx-primary);
  border: 2px solid #fff;
  border-radius: 3px;
  cursor: nwse-resize;
  z-index: 10;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform 0.15s;
}
.vx-ge-handle:hover { transform: scale(1.3); }

.vx-ge-moving {
  opacity: 0.8;
  outline: 2px solid var(--vx-primary) !important;
  box-shadow: 0 4px 20px rgba(46,139,87,0.2);
}
.vx-ge-resizing {
  outline: 2px solid var(--vx-sun) !important;
}

/* When editing garden, disable pan cursor on wrapper */
.vx-garden-editing ~ .vx-layout-zoom { display: none; }

/* Override main padding for layout page */
.vx-layout-page + .vx-grass { display: none; }
.vx-layout-page { animation: none; }

/* ── COLLECTION PAGE (Pokedex) ── */
.vx-collection-grid { margin-bottom: var(--vx-space-6); }
.vx-collection-section { margin-bottom: var(--vx-space-5); }
.vx-collection-cat {
  font-size: var(--vx-text-sm); font-weight: 700;
  color: var(--vx-primary-dark); margin-bottom: var(--vx-space-2);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.vx-collection-items {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: var(--vx-space-2);
}
.vx-collection-item {
  display: flex; flex-direction: column; align-items: center;
  padding: var(--vx-space-3) var(--vx-space-1);
  border-radius: var(--vx-radius);
  background: var(--vx-surface);
  border: 1px solid var(--vx-border);
  text-align: center;
  transition: all var(--vx-duration-fast) var(--vx-ease-default);
}
.vx-collection-item:hover { transform: translateY(-2px); box-shadow: var(--vx-shadow-mid); }
.vx-collection-icon {
  width: 48px; height: 48px;
  border-radius: 50%; margin-bottom: var(--vx-space-1);
  display: flex; align-items: center; justify-content: center;
  background: var(--vx-primary-pale);
}
.vx-undiscovered .vx-collection-icon {
  background: var(--vx-bg2);
  filter: grayscale(1);
}
.vx-collection-name {
  font-size: 11px; font-weight: 600;
  color: var(--vx-text2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.vx-undiscovered .vx-collection-name { color: var(--vx-text3); }

/* ── ACHIEVEMENTS GRID ── */
.vx-achievements-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--vx-space-3);
  margin-bottom: var(--vx-space-6);
}
.vx-achievement-item {
  display: flex; flex-direction: column; align-items: center;
  padding: var(--vx-space-4) var(--vx-space-3);
  border-radius: var(--vx-radius);
  background: var(--vx-surface);
  border: 1px solid var(--vx-border);
  text-align: center;
  transition: all var(--vx-duration-fast) var(--vx-ease-default);
}
.vx-achievement-item:not(.vx-unlocked) {
  filter: grayscale(1); opacity: 0.5;
}
.vx-achievement-item.vx-unlocked {
  border-color: rgba(212,160,48,0.3);
  box-shadow: 0 2px 8px rgba(212,160,48,0.1);
}
.vx-achievement-badge {
  font-size: 32px; margin-bottom: var(--vx-space-2);
}
.vx-achievement-name {
  font-size: var(--vx-text-xs); font-weight: 700;
  color: var(--vx-primary-dark); margin-bottom: 2px;
}
.vx-achievement-desc {
  font-size: 11px; color: var(--vx-text3); line-height: 1.3;
}

/* ── AMBIENT PARTICLES ── */
.vx-particles {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
}
.vx-particle {
  position: absolute;
  will-change: transform, opacity;
  pointer-events: none;
}
@keyframes vx-particle-drift {
  0% { transform: translateY(0) translateX(0); opacity: var(--vx-particle-opacity, 0.4); }
  25% { transform: translateY(25vh) translateX(15px); }
  50% { transform: translateY(50vh) translateX(-10px); opacity: var(--vx-particle-opacity, 0.4); }
  75% { transform: translateY(75vh) translateX(20px); }
  100% { transform: translateY(105vh) translateX(5px); opacity: 0; }
}

/* ── POT WIGGLE (micro-interaction) ── */
@keyframes vx-pot-wiggle {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(3deg) scale(1.08); }
  50% { transform: rotate(-2deg) scale(1.05); }
  75% { transform: rotate(1deg) scale(1.02); }
  100% { transform: rotate(0deg) scale(1); }
}

/* ── CELEBRATION PARTICLES ── */
.vx-celebrate-particle {
  position: fixed; z-index: 9999;
  pointer-events: none;
  font-size: 18px;
  animation: vx-celebrate-burst 0.7s var(--vx-ease-exit) forwards;
}
@keyframes vx-celebrate-burst {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.5); opacity: 0; }
}

/* ── XP FLOAT ── */
.vx-xp-float {
  position: fixed; z-index: 9999;
  pointer-events: none;
  font-size: 22px; font-weight: 800;
  color: var(--vx-sun);
  text-shadow: 0 2px 4px rgba(0,0,0,0.15);
  transform: translateX(-50%);
  animation: vx-xp-rise 1.2s var(--vx-ease-exit) forwards;
}
@keyframes vx-xp-rise {
  0% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-80px) scale(1.3); }
}

/* ── EDGE GLOW ── */
.vx-edge-glow {
  position: fixed; inset: 0; z-index: 9998;
  pointer-events: none;
  border: 3px solid var(--vx-primary);
  border-radius: 0;
  opacity: 0;
  animation: vx-glow-flash 0.5s var(--vx-ease-enter) forwards;
}
@keyframes vx-glow-flash {
  0% { opacity: 0; box-shadow: inset 0 0 30px rgba(46,139,87,0.3); }
  40% { opacity: 1; box-shadow: inset 0 0 60px rgba(46,139,87,0.15); }
  100% { opacity: 0; box-shadow: inset 0 0 0 transparent; }
}

/* ── ACHIEVEMENT OVERLAY ── */
.vx-achievement-overlay {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(45,58,46,0.6);
  backdrop-filter: blur(8px);
  animation: vx-fade-in 0.3s var(--vx-ease-enter);
  transition: opacity 0.5s;
}
.vx-achievement-card {
  text-align: center;
  background: var(--vx-surface);
  border-radius: var(--vx-radius-lg);
  padding: var(--vx-space-10) var(--vx-space-8);
  box-shadow: var(--vx-shadow-top), 0 0 80px rgba(212,160,48,0.3);
  animation: vx-achievement-pop 0.5s var(--vx-ease-spring) both;
}
.vx-achievement-emoji {
  font-size: 64px;
  margin-bottom: var(--vx-space-4);
  animation: vx-achievement-spin 0.8s var(--vx-ease-bounce);
}
@keyframes vx-achievement-spin {
  0% { transform: scale(0) rotate(-180deg); }
  60% { transform: scale(1.2) rotate(10deg); }
  100% { transform: scale(1) rotate(0deg); }
}
@keyframes vx-achievement-pop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.vx-achievement-title {
  font-size: var(--vx-text-lg);
  font-weight: 800;
  color: var(--vx-primary-dark);
}

/* ── FAB PULSE (idle breathing) ── */
@keyframes vx-fab-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.vx-fab:not(:hover) {
  animation: vx-fab-pulse 3s var(--vx-ease-default) infinite;
  animation-delay: 5s;
}

/* ── STAT COUNTER ROLL ── */
@keyframes vx-counter-roll {
  0% { transform: translateY(8px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.vx-stat-num {
  animation: vx-counter-roll 0.4s var(--vx-ease-bounce) both;
}

/* ── TOAST UPGRADE (spring entrance) ── */
.vx-toast {
  animation: vx-toast-spring 0.4s var(--vx-ease-spring) !important;
}
@keyframes vx-toast-spring {
  0% { opacity: 0; transform: translateX(-50%) translateY(-20px) scale(0.9); }
  60% { transform: translateX(-50%) translateY(4px) scale(1.02); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* ── VIEW TRANSITIONS ── */
.vx-nav { view-transition-name: navbar; }

::view-transition-old(root) {
  animation: 200ms var(--vx-ease-exit) both fade-out;
}
::view-transition-new(root) {
  animation: 300ms var(--vx-ease-enter) both fade-in;
}
@keyframes fade-out {
  to { opacity: 0; transform: translateY(-4px); }
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(46,139,87,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(46,139,87,0.3); }
