/* ============================================================
   Sprout ✿ — pastel cute UI
   ============================================================ */

:root {
  color-scheme: light;
  --pink-50:  #fff5f8;
  --pink-100: #ffe3ec;
  --pink-200: #ffd1dc;
  --pink-300: #ffb5c9;
  --pink-500: #ff8fae;
  --pink-700: #d96a8a;

  --green-50:  #f0faf0;
  --green-100: #d8f0d8;
  --green-200: #b8e0c2;
  --green-300: #8fd3a0;
  --green-500: #5ab97a;
  --green-700: #3b8c58;
  --garden-title-text: #537b60;
  --garden-title-gradient: linear-gradient(135deg, #45906a 0%, #57a87d 52%, #6bbf90 100%);
  --garden-title-highlight: rgba(49, 83, 61, 0.16);
  --garden-title-shadow: rgba(49, 83, 61, 0.16);
  --wood-100:  #f1dec1;
  --wood-200:  #e2c79f;
  --wood-300:  #d0ac82;
  --wood-700:  #b28c68;
  --wood-ink:  #6b503a;

  --cream:    #fffaf2;
  --ink:      #5a4a5a;
  --ink-soft: #8a7a8a;
  --line:     #f3d6e0;

  --shadow: 0 8px 30px rgba(255, 143, 174, 0.18),
            0 2px 8px  rgba(143, 211, 160, 0.12);
  --shadow-soft: 0 4px 14px rgba(255, 143, 174, 0.12);
  --radius: 22px;
  --page-bg: linear-gradient(150deg,
    var(--pink-100) 0%,
    var(--pink-50) 28%,
    var(--cream) 50%,
    var(--green-50) 72%,
    var(--green-100) 100%);
  --surface-card: rgba(255, 255, 255, 0.85);
  --surface-control: rgba(255, 255, 255, 0.7);
  --surface-popover: #fff;
  --surface-input: #fff;
  --surface-soft: rgba(255, 255, 255, 0.65);
  --surface-muted: rgba(255, 255, 255, 0.5);
  --surface-hover: #fff;
  --border-strong: #fff;
  --plant-bg: linear-gradient(180deg, #eaf7ff 0%, #fef1f6 55%, #fff5f8 100%);
  --ground-bg: linear-gradient(180deg, #f6c9b8, #e89878);
  --pot-bg: linear-gradient(180deg, #ffb89c 0%, #ff9377 100%);
  --pot-rim-bg: linear-gradient(180deg, #ffcdb8, #ff9d7e);
  --request-bg: linear-gradient(135deg, #fff5f8 0%, #f0faf0 100%);
  --modal-backdrop: rgba(90, 74, 90, 0.35);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --pink-50:  #2b2228;
  --pink-100: #372831;
  --pink-200: #4a303c;
  --pink-300: #a96f86;
  --pink-500: #c9839d;
  --pink-700: #d9a0b5;

  --green-50:  #1f2924;
  --green-100: #293a32;
  --green-200: #385346;
  --green-300: #648f78;
  --green-500: #78aa8d;
  --green-700: #98c2a5;
  --garden-title-text: #91b89c;
  --garden-title-gradient: linear-gradient(135deg, #b9c9ba 0%, #93ac99 52%, #b9b6aa 100%);
  --garden-title-highlight: rgba(255, 255, 255, 0.24);
  --garden-title-shadow: rgba(0, 0, 0, 0.24);
  --wood-100:  #8c745e;
  --wood-200:  #77624f;
  --wood-300:  #645243;
  --wood-700:  #cdb492;
  --wood-ink:  #e6d3bd;

  --cream:    #242126;
  --ink:      #dcd0d8;
  --ink-soft: #ab9da6;
  --line:     #463941;

  --shadow: 0 12px 32px rgba(0, 0, 0, 0.3),
            0 2px 10px rgba(111, 164, 134, 0.06);
  --shadow-soft: 0 6px 16px rgba(0, 0, 0, 0.22);
  --page-bg: linear-gradient(150deg,
    #202127 0%,
    #282128 32%,
    #242627 58%,
    #202b25 100%);
  --surface-card: rgba(39, 34, 39, 0.9);
  --surface-control: rgba(48, 41, 48, 0.82);
  --surface-popover: #302830;
  --surface-input: #2b252c;
  --surface-soft: rgba(255, 255, 255, 0.055);
  --surface-muted: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(217, 141, 168, 0.1);
  --border-strong: rgba(235, 219, 228, 0.11);
  --plant-bg: linear-gradient(180deg, #202d34 0%, #28252e 58%, #30282e 100%);
  --ground-bg: linear-gradient(180deg, #7a5d55, #574640);
  --pot-bg: linear-gradient(180deg, #b97866 0%, #8c574f 100%);
  --pot-rim-bg: linear-gradient(180deg, #cc8c76, #a16255);
  --request-bg: linear-gradient(135deg, rgba(217, 141, 168, 0.1) 0%, rgba(134, 188, 153, 0.09) 100%);
  --modal-backdrop: rgba(11, 11, 14, 0.58);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

/* ---------- language toggle ---------- */
.lang-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  background: var(--surface-card);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  padding: 3px;
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-size: 12px;
  backdrop-filter: blur(6px);
}
.lang-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
  min-width: 30px;
  min-height: 26px;
}
.lang-opt:hover:not(.active) { color: var(--pink-500); }
.lang-opt.active {
  background: var(--pink-300);
  color: white;
}
:root[data-theme="dark"] .lang-opt.active {
  background: linear-gradient(135deg, #bd8196, #cc95a8);
  color: #2b2228;
}
.theme-toggle {
  position: fixed;
  top: 14px;
  right: 90px;
  z-index: 100;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface-card);
  color: var(--ink-soft);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-size: 16px;
  line-height: 1;
  backdrop-filter: blur(6px);
  transition: transform 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.theme-toggle:hover { transform: translateY(-1px); color: var(--pink-500); }
.theme-toggle[aria-pressed="true"] { color: var(--green-700); }

/* ---------- profile menu (topbar) ---------- */
.profile-menu { position: relative; align-self: center; }
.profile-btn {
  border: 2px solid var(--border-strong);
  background: var(--surface-control);
  padding: 2px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.18s ease;
  line-height: 0;
}
.profile-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(255,143,174,0.25); }
.profile-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-200), var(--green-200));
  color: var(--ink);
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-weight: 700;
  font-size: 18px;
}
.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  margin: 0;
  padding: 6px;
  list-style: none;
  min-width: 196px;
  background: var(--surface-popover);
  border: 2px solid var(--pink-100);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(255, 143, 174, 0.24);
}
.profile-dropdown li { list-style: none; }
.pd-item {
  display: flex;
  align-items: center;
  min-height: 38px;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.pd-item:hover { background: var(--pink-50); }
.pd-theme,
.pd-lang {
  display: flex;
  align-items: center;
  min-height: 34px;
  gap: 4px;
  margin: 4px 6px;
  padding: 3px;
  background: var(--surface-control);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-size: 12px;
}
.theme-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
  min-height: 26px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  padding: 5px 11px;
  transition: background 0.15s ease, color 0.15s ease;
}
.theme-opt:hover:not(.active) { color: var(--pink-500); }
.theme-opt.active {
  background: var(--green-300);
  color: white;
}
:root[data-theme="dark"] .theme-opt.active {
  background: linear-gradient(135deg, #7ca78b, #8eb99e);
  color: #202820;
}
.pd-lang .lang-opt {
  flex: 1;
  min-width: 0;
}
.pd-danger { color: var(--ink-soft); }
.pd-danger:hover { background: var(--pink-50); color: var(--pink-700); }
@media (max-width: 520px) {
  .lang-toggle { top: 10px; right: 10px; font-size: 11px; }
  .lang-opt { padding: 4px 9px; min-width: 26px; }
  .theme-toggle { top: 10px; right: 78px; width: 29px; height: 29px; font-size: 14px; }
}

html, body { height: 100%; }

body {
  margin: 0;
  font-family: 'Quicksand', 'Fredoka', 'Poor Story', system-ui, sans-serif;
  color: var(--ink);
  background: var(--page-bg);
  background-attachment: fixed; /* seamless pink→green across the whole viewport */
  min-height: 100%;
  overflow-x: hidden;
  /* garden breeze: JS toggles .breezy to gust this 0→1 and back; plants and
     floaties read it to sway harder during a gust (see gardenBreeze in app.js) */
  --breeze: 0;
  transition: --breeze 1.5s ease-in-out;
}
body.breezy { --breeze: 1; }

/* ---------- floating decorations ---------- */
.floaties {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.floaty {
  position: absolute;
  font-size: 28px;
  opacity: 0.35;
  animation: float linear infinite;
  filter: drop-shadow(0 2px 4px rgba(255, 143, 174, 0.25));
}
.floaty:nth-child(1) { left: 6%;  top: 80%;  font-size: 32px; animation-duration: 22s; color: var(--pink-300); }
.floaty:nth-child(2) { left: 18%; top: 90%;  font-size: 22px; animation-duration: 28s; animation-delay: -6s; color: var(--green-300); }
.floaty:nth-child(3) { left: 36%; top: 95%;  font-size: 26px; animation-duration: 25s; animation-delay: -12s; color: var(--pink-200); }
.floaty:nth-child(4) { left: 56%; top: 88%;  font-size: 30px; animation-duration: 30s; animation-delay: -4s; }
.floaty:nth-child(5) { left: 70%; top: 92%;  font-size: 22px; animation-duration: 26s; animation-delay: -16s; color: var(--pink-500); }
.floaty:nth-child(6) { left: 84%; top: 85%;  font-size: 28px; animation-duration: 24s; animation-delay: -9s; color: var(--green-200); }
.floaty:nth-child(7) { left: 92%; top: 95%;  font-size: 24px; animation-duration: 27s; animation-delay: -18s; color: var(--pink-300); }

@keyframes float {
  0%   { transform: translate(0, 0)     rotate(0deg);   opacity: 0; }
  10%  { opacity: 0.4; }
  90%  { opacity: 0.35; }
  /* lean downwind as the breeze gusts */
  100% { transform: translate(calc(var(--breeze, 0) * 34px), -110vh) rotate(360deg); opacity: 0; }
}

/* ---------- garden breeze ---------- */
/* registered so --breeze can smoothly transition (and be read inside keyframes) */
@property --breeze {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}

/* ---------- views ---------- */
.view {
  position: relative;
  z-index: 1;
}

/* ---------- typography ---------- */
.logo {
  font-family: 'Pacifico', 'Gaegu', cursive;
  /* shrink on narrow screens so the wordmark never overflows / clips its card */
  font-size: clamp(42px, 11vw, 64px);
  /* Pacifico is a connected brush script — a little tracking stops the capital
     S's swash from overlapping the following letters */
  letter-spacing: 0.06em;
  margin: 0;
  background: linear-gradient(135deg, var(--pink-500), var(--green-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-align: center;
  /* extra line-height + top padding so Pacifico's tall S swash stays inside the
     gradient paint box; with background-clip:text anything above it loses its
     fill and looks cut off */
  line-height: 1.6;
  padding: 12px 2px 10px;
}
.logo.small { font-size: 32px; line-height: 1.25; padding: 3px 2px 0; letter-spacing: 0.05em; }
.tagline {
  text-align: center;
  margin: 16px 0 28px;
  color: var(--ink-soft);
  font-size: 15px;
}
.logo + .tagline,
.logo + .onboard-lead {
  margin-top: 16px;
}
h2 {
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--pink-700);
}
h3 {
  font-family: 'Fredoka', 'Jua', sans-serif;
  margin: 0;
  color: var(--pink-700);
}
.muted { color: var(--ink-soft); font-size: 14px; margin: 0; }
.muted.small { font-size: 12px; }
.center { text-align: center; }

/* ---------- cards ---------- */
.card {
  background: var(--surface-card);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  border: 2px solid var(--border-strong);
  box-shadow: var(--shadow);
  padding: 32px;
}

/* ---------- auth ---------- */
#view-login, #view-signup, #view-shared, #view-onboarding {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  min-height: 100vh;
}
/* main view hugs its content so the footer sits right beneath it */
#view-main { min-height: auto; }

/* ---------- onboarding ---------- */
.onboard-card {
  width: 100%;
  max-width: 460px;
  text-align: center;
}
.onboard-lead {
  font-size: 16px;
  color: var(--ink);
  margin: 8px 0 18px;
  line-height: 1.5;
}
.onboard-points {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.onboard-points li {
  background: var(--pink-50);
  border: 1.5px solid var(--pink-100);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.4;
}
.onboard-step h2 { font-size: 22px; margin-bottom: 4px; }
.onboard-step .muted { margin-bottom: 16px; }
.onboard-step input {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  min-height: 47px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--surface-input);
  color: var(--ink);
  outline: none;
  margin-bottom: 16px;
}
.onboard-step input:focus { border-color: var(--pink-300); box-shadow: 0 0 0 4px var(--pink-100); }
.onboard-step .btn { width: 100%; }

.seed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 6px 0 20px;
}
.seed-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 99px;
  padding: 14px 8px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--surface-control);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.seed-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.seed-card.selected {
  border-color: var(--pink-300);
  box-shadow: 0 0 0 4px var(--pink-100);
}
.seed-shape {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 -3px 6px rgba(0,0,0,0.06);
}
.seed-dot {
  width: 15px;
  height: 21px;
  background: linear-gradient(135deg, #b07a4e 0%, #8a5a34 60%, #6e441f 100%);
  border-radius: 50% 50% 48% 48% / 64% 64% 36% 36%;
  transform: rotate(-18deg);
  box-shadow: inset 1px 2px 2px rgba(255,255,255,0.25), inset -1px -2px 3px rgba(0,0,0,0.2);
}
.seed-label {
  min-height: 14px;
  font-size: 11px;
  color: var(--ink-soft);
  font-family: 'Fredoka', 'Jua', sans-serif;
}
.auth-card {
  width: 100%;
  max-width: 420px;
}
#view-login .auth-card {
  min-height: 542px;
}
#view-signup .auth-card {
  min-height: 632px;
}

/* ---------- shared (public read-only) plant ---------- */
.shared-wrap {
  width: 100%;
  max-width: 480px;
  text-align: center;
}
.shared-wrap .plant-name { cursor: default; }
.shared-wrap .plant-name:hover { transform: none; box-shadow: var(--shadow-soft); }
.shared-wrap .plant-area { margin: 14px auto 0; }
.shared-wrap #sharedCtaBtn {
  display: inline-block;
  margin-top: 18px;
  text-decoration: none;
}

/* ---------- neighbor picker (send modal) ---------- */
.send-to-wrap {
  position: relative;
  width: 100%;
}
.send-to-wrap input { width: 100%; }
.neighbor-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 60;
  margin: 0;
  padding: 4px;
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  background: var(--surface-popover);
  border: 2px solid var(--pink-100);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(255, 143, 174, 0.22);
}
.neighbor-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.neighbor-item:hover { background: var(--surface-hover); }
.ni-avatar {
  width: 28px;
  height: 28px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-200), var(--green-200));
  color: var(--ink);
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-weight: 700;
  font-size: 14px;
}
.ni-name {
  flex: 1 1 auto;
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ni-leaves {
  flex: none;
  font-size: 12px;
  color: var(--ink-soft);
}

/* ---------- plant action buttons ---------- */
.plant-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}
.share-btn {
  min-width: 176px;
  font-size: 14px;
  padding: 10px 22px;
}
.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}
.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.3px;
}
.form label > span:first-child {
  display: block;
  min-height: 20px;
  line-height: 1.35;
}
.hint-inline {
  font-weight: 500;
  font-size: 11px;
  color: var(--pink-500);
  letter-spacing: 0;
  margin-left: 4px;
}
.form input::placeholder,
.form textarea::placeholder {
  color: var(--pink-300);
  opacity: 0.85;
}
.form input, .form textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--surface-input);
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.form input {
  width: 100%;
  min-height: 47px;
}
.form input:focus, .form textarea:focus {
  border-color: var(--pink-300);
  box-shadow: 0 0 0 4px var(--pink-100);
}
.form textarea { resize: vertical; min-height: 99px; }
.form .btn {
  width: 100%;
}
.form textarea.over-limit {
  border-color: var(--pink-500);
  box-shadow: 0 0 0 4px rgba(225, 90, 115, 0.12);
}
.char-counter {
  align-self: flex-end;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}
.char-counter.over {
  color: #e15a73;
}
.send-daily {
  margin: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}
.send-daily:empty { display: none; }
.send-daily.none { color: #e15a73; }

.form .check {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  min-height: 54px;
  font-weight: 500;
  font-size: 13px;
  color: var(--ink);
}
.form .check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--pink-500); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-weight: 600;
  font-size: 16px;
  border: none;
  min-height: 50px;
  padding: 13px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.18s, filter 0.15s;
  letter-spacing: 0.3px;
  box-shadow: var(--shadow-soft);
}
.btn:hover  { transform: translateY(-2px); filter: brightness(1.04); }
.btn:active { transform: translateY(0);    filter: brightness(0.97); }
.btn-pink {
  background: linear-gradient(135deg, var(--pink-300), var(--pink-500));
  color: white;
}
.btn-green {
  background: linear-gradient(135deg, var(--green-200), var(--green-500));
  color: white;
}
:root[data-theme="dark"] .btn-pink {
  background: linear-gradient(135deg, #bc8096, #ca93a4);
  color: #2b2228;
}
:root[data-theme="dark"] .btn-green {
  background: linear-gradient(135deg, #7ca78b, #8eb99e);
  color: #202820;
}

.swap {
  margin: 18px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
}
.swap a {
  color: var(--pink-500);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px dotted var(--pink-200);
}
.swap a:hover { color: var(--pink-700); }

.error   { color: #e15a73; font-size: 13px; min-height: 18px; margin: 0; }
.success { color: var(--green-700); font-size: 13px; min-height: 18px; margin: 0; }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { cursor: pointer; }
.nav { display: flex; gap: 10px; flex-wrap: wrap; }
.nav > .navbtn { order: 10; }
.nav > .profile-menu { order: 20; }
.navbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  min-height: 42px;
  text-align: center;
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-weight: 500;
  font-size: 14px;
  border: 2px solid var(--border-strong);
  background: var(--surface-control);
  color: var(--ink);
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s, background 0.18s;
}
.navbtn:hover { transform: translateY(-1px); background: var(--surface-hover); }
.navbtn.ghost { background: transparent; box-shadow: none; color: var(--ink-soft); border-color: transparent; }
.navbtn.ghost:hover { color: var(--pink-500); background: var(--pink-50); }

/* ---------- click-to-copy ---------- */
.copyable {
  cursor: pointer;
  border-radius: 6px;
  padding: 1px 6px;
  margin: 0 -6px;
  transition: background 0.15s ease, color 0.15s ease;
  user-select: all;
}
.copyable:hover {
  background: var(--surface-hover);
  color: var(--pink-700);
}
.copyable:active {
  background: var(--pink-100);
}

/* ---------- footer ---------- */
.page-footer {
  text-align: center;
  padding: 4px 16px 10px;
  color: var(--ink-soft);
  font-size: 11px;
  opacity: 0.8;
  letter-spacing: 0.2px;
  line-height: 1.3;
}
.page-footer a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s ease;
}
.page-footer a:hover { color: var(--pink-500); text-decoration: underline; }
.page-footer .dot { margin: 0 6px; opacity: 0.5; }

/* ---------- main page title ---------- */
.page-title {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 279px;
  min-height: 72px;
  max-width: calc(100% - 48px);
  text-align: center;
  margin: 10px auto 24px;
  padding: 6px 44px 10px;
  border: 0;
  border-radius: 46% 54% 50% 50% / 62% 44% 56% 38%;
  background:
    radial-gradient(ellipse at 24% 30%, rgba(255, 255, 255, 0.72) 0 30%, transparent 31%),
    radial-gradient(ellipse at 78% 70%, rgba(216, 240, 216, 0.5) 0 38%, transparent 39%),
    linear-gradient(100deg, rgba(255, 227, 236, 0.82), var(--surface-card) 48%, rgba(216, 240, 216, 0.72));
  box-shadow:
    -12px 8px 0 -6px rgba(255, 209, 220, 0.72),
    13px -7px 0 -6px rgba(184, 224, 194, 0.72),
    0 12px 26px -24px rgba(90, 74, 90, 0.32),
    inset 0 -8px 0 rgba(255, 181, 201, 0.16);
  cursor: default;
  overflow: visible;
}
.page-title-text {
  position: relative;
  z-index: 2;
  display: block;
  font-family: 'Pacifico', 'Gaegu', cursive;
  font-size: 44px;
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: 0;
  color: var(--garden-title-text);
  background: var(--garden-title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 1px 0 var(--garden-title-highlight),
    0 7px 16px var(--garden-title-shadow);
  padding: 7px 2px 12px;
  margin: -7px 0 -12px;
}
.page-title::before,
.page-title::after {
  content: '';
  position: absolute;
  z-index: 1;
  display: block;
  width: 42px;
  height: 22px;
  border: 2px solid var(--border-strong);
  border-radius: 999px 14px 999px 14px;
  box-shadow: 0 5px 14px rgba(255, 143, 174, 0.14);
  transform: translateY(0) rotate(var(--garden-leaf-rotate));
  animation: garden-leaf-drift 5.8s ease-in-out infinite;
}
.page-title::before {
  --garden-leaf-rotate: -18deg;
  left: -21px;
  bottom: 3px;
  background:
    radial-gradient(circle at 28% 34%, rgba(255, 255, 255, 0.82) 0 18%, transparent 19%),
    linear-gradient(135deg, var(--pink-200), var(--pink-50) 58%, var(--pink-100));
}
.page-title::after {
  --garden-leaf-rotate: 18deg;
  right: -20px;
  top: 4px;
  background:
    radial-gradient(circle at 28% 34%, rgba(255, 255, 255, 0.78) 0 18%, transparent 19%),
    linear-gradient(135deg, var(--green-200), var(--green-50) 58%, var(--green-100));
  animation-delay: -2.9s;
}
@keyframes garden-leaf-drift {
  0%, 100% { transform: translateY(0) rotate(var(--garden-leaf-rotate)); }
  50%      { transform: translateY(-4px) rotate(calc(var(--garden-leaf-rotate) + 5deg)); }
}
:root[data-theme="dark"] .page-title {
  background:
    radial-gradient(ellipse at 24% 30%, rgba(255, 255, 255, 0.08) 0 30%, transparent 31%),
    radial-gradient(ellipse at 78% 70%, rgba(134, 188, 153, 0.14) 0 38%, transparent 39%),
    linear-gradient(100deg, rgba(217, 141, 168, 0.14), var(--surface-card) 48%, rgba(134, 188, 153, 0.14));
  box-shadow:
    -12px 8px 0 -6px rgba(217, 141, 168, 0.18),
    13px -7px 0 -6px rgba(134, 188, 153, 0.18),
    0 12px 24px -24px rgba(0, 0, 0, 0.45),
    inset 0 -8px 0 rgba(217, 141, 168, 0.06);
}
:root[data-theme="dark"] .page-title::before,
:root[data-theme="dark"] .page-title::after {
  border-color: rgba(235, 219, 228, 0.12);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.16);
}
:root[data-theme="dark"] .page-title::before {
  background:
    radial-gradient(circle at 28% 34%, rgba(255, 255, 255, 0.12) 0 18%, transparent 19%),
    linear-gradient(135deg, rgba(217, 141, 168, 0.36), var(--pink-50) 58%, var(--pink-100));
}
:root[data-theme="dark"] .page-title::after {
  background:
    radial-gradient(circle at 28% 34%, rgba(255, 255, 255, 0.1) 0 18%, transparent 19%),
    linear-gradient(135deg, rgba(134, 188, 153, 0.34), var(--green-50) 58%, var(--green-100));
}
[lang="ko"] .page-title-text {
  font-family: 'Nanum Pen Script', 'Gaegu', cursive;
  font-weight: 400;
  font-size: 44px;
  line-height: 1.28;
  letter-spacing: 0;
}
@media (max-width: 520px) {
  .page-title {
    min-width: min(236px, calc(100% - 34px));
    max-width: calc(100% - 34px);
    padding: 6px 34px 10px;
  }
  .page-title-text {
    font-size: 38px;
  }
  .page-title::before,
  .page-title::after {
    width: 34px;
    height: 18px;
  }
  .page-title::before { left: -17px; }
  .page-title::after { right: -17px; }
  [lang="ko"] .page-title-text { font-size: 38px; }
}

/* ---------- main layout ---------- */
.main-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 24px 60px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}
@media (max-width: 820px) {
  .main-wrap { grid-template-columns: 1fr; }
}

/* ---------- profile ---------- */
.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.avatar {
  position: relative;
  border: 4px solid var(--border-strong);
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--pink-200), var(--green-200));
  display: grid;
  place-items: center;
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-weight: 700;
  color: var(--ink);
  font-size: 44px;
  box-shadow: var(--shadow-soft);
  padding: 0;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  transition: transform 0.16s ease, box-shadow 0.18s ease;
}
.avatar::after {
  content: '✎';
  position: absolute;
  right: -4px;
  bottom: 2px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface-card);
  color: var(--pink-700);
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-size: 14px;
  line-height: 1;
  opacity: 0;
  transform: translateY(4px) scale(0.88);
  box-shadow: var(--shadow-soft);
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.avatar:hover,
.avatar:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 143, 174, 0.22);
}
.avatar:hover::after,
.avatar:focus-visible::after {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.avatar:focus-visible {
  outline: 3px solid var(--pink-300);
  outline-offset: 4px;
}
.profile-card #profName.copyable,
.profile-card #profEmail.copyable {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  border-radius: 999px;
  overflow-wrap: anywhere;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.profile-card #profName.copyable:hover {
  background: var(--pink-100);
  color: var(--pink-700);
  box-shadow: 0 0 0 3px var(--surface-soft);
}
.profile-card #profEmail.copyable:hover {
  background: var(--green-50);
  color: var(--green-700);
  box-shadow: 0 0 0 3px var(--surface-soft);
}
.profile-delete-account {
  align-self: flex-start;
  margin: auto 0 0;
  padding: 18px 0 0;
  border: none;
  background: transparent;
  color: var(--pink-700);
  cursor: pointer;
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: left;
}
.profile-delete-account:hover {
  color: #c84d68;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.profile-delete-account:focus-visible {
  outline: 2px solid var(--pink-300);
  outline-offset: 3px;
  border-radius: 6px;
}
.id-chip {
  display: inline-block;
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-weight: 600;
  background: var(--pink-100);
  color: var(--pink-700);
  padding: 6px 14px;
  border-radius: 999px;
  margin: 4px 0 4px;
  cursor: pointer;
  user-select: all;
  letter-spacing: 0.4px;
  transition: background 0.18s;
}
.id-chip:hover { background: var(--pink-200); }
.stats {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 18px 0 8px;
}
.stat {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  background: var(--green-50);
  padding: 12px 14px;
  border-radius: 16px;
  border: 2px solid var(--green-100);
  text-align: center;
}
.stage-stat {
  appearance: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.18s ease, background 0.15s ease;
}
.stage-stat:hover {
  transform: translateY(-1px);
  border-color: var(--green-300);
  background: var(--surface-hover);
  box-shadow: var(--shadow-soft);
}
.stage-stat:focus-visible {
  outline: 3px solid var(--green-200);
  outline-offset: 3px;
}
.leaf-badge {
  position: absolute;
  top: -9px;
  right: -9px;
  background: var(--pink-500);
  color: #fff;
  border-radius: 999px;
  min-width: 22px;
  padding: 2px 7px;
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  animation: leaf-badge-pop 0.32s ease;
}
@keyframes leaf-badge-pop {
  0%   { transform: scale(0); }
  70%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}
.stat-num {
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--green-700);
  line-height: 1.1;
  white-space: nowrap;
}
.stat-label {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.stage-stat .stat-label::after {
  content: '›';
  display: inline-block;
  margin-left: 4px;
  color: var(--green-500);
  font-weight: 700;
}
.hint {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 14px 0 0;
  line-height: 1.5;
}

/* ---------- plant ---------- */
.plant-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  text-align: center;
  border-color: var(--green-100);
  background: linear-gradient(180deg, var(--surface-card) 0%, var(--surface-soft) 100%);
}
.plant-card-header {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 24px 28px 16px;
  background: linear-gradient(135deg, var(--green-50) 0%, var(--surface-card) 54%, var(--pink-50) 100%);
  border-bottom: 1px solid var(--green-100);
}
.plant-title-sign {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  gap: 7px;
  width: min(100%, 390px);
  margin-bottom: 10px;
  padding: 19px 30px 16px;
  border: 2px solid rgba(143, 211, 160, 0.42);
  border-radius: 16px 16px 22px 16px;
  background:
    linear-gradient(90deg, rgba(184, 224, 194, 0.5) 0 10px, transparent 10px),
    repeating-linear-gradient(0deg, transparent 0 17px, rgba(184, 224, 194, 0.2) 17px 18px),
    linear-gradient(180deg, var(--surface-card) 0%, var(--surface-control) 100%);
  box-shadow:
    0 12px 24px -22px rgba(83, 123, 96, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 10px 0 0 rgba(184, 224, 194, 0.18);
  animation: plant-marker-sway 7.5s ease-in-out infinite;
  transform: translateY(0) rotate(-0.5deg);
}
@keyframes plant-marker-sway {
  0%, 100% { transform: translateY(0) rotate(-0.5deg); }
  50%      { transform: translateY(-2px) rotate(0.45deg); }
}
.plant-title-sign::after {
  content: '';
  position: absolute;
  display: block;
}
.plant-title-sign::after {
  z-index: 2;
  left: 50%;
  top: -11px;
  width: 72px;
  height: 21px;
  border: 1px solid rgba(255, 143, 174, 0.18);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.38), transparent 42%),
    linear-gradient(135deg, rgba(255, 209, 220, 0.68), var(--surface-control));
  box-shadow: 0 4px 10px rgba(255, 143, 174, 0.1);
  transform: translateX(-50%) rotate(1.5deg);
}
:root[data-theme="dark"] .plant-title-sign {
  border-color: rgba(134, 188, 153, 0.2);
  background:
    linear-gradient(90deg, rgba(134, 188, 153, 0.16) 0 10px, transparent 10px),
    repeating-linear-gradient(0deg, transparent 0 17px, rgba(134, 188, 153, 0.09) 17px 18px),
    linear-gradient(180deg, var(--surface-card) 0%, var(--surface-control) 100%);
  box-shadow:
    0 12px 24px -22px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 10px 0 0 rgba(134, 188, 153, 0.08);
}
:root[data-theme="dark"] .plant-title-sign::after {
  border-color: rgba(217, 141, 168, 0.18);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(135deg, rgba(217, 141, 168, 0.24), var(--surface-control));
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
}
.plant-name {
  font-family: 'Jua', 'Fredoka', sans-serif;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.12;
  color: var(--green-700);
  text-align: center;
  margin: 0 auto 12px;
  padding: 8px 20px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-block;
  background: linear-gradient(135deg, var(--green-50) 0%, var(--surface-input) 100%);
  border: 2px solid var(--green-200);
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.18s ease, background 0.15s ease;
  letter-spacing: 0;
}
.plant-name:hover {
  transform: translateY(-2px) rotate(-1deg);
  box-shadow: 0 6px 20px rgba(143, 211, 160, 0.28);
  background: var(--green-50);
}
.plant-card .plant-name {
  position: relative;
  max-width: 100%;
  margin: 0;
  padding: 0 32px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 34px;
  line-height: 1.05;
  color: var(--green-700);
  text-shadow: 0 1px 0 var(--border-strong);
  overflow-wrap: anywhere;
}
#plantName::before {
  content: '✎';
  position: absolute;
  top: 50%;
  right: 0;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(107, 80, 58, 0.2);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.76);
  color: var(--pink-700);
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-size: 12px;
  line-height: 1;
  opacity: 0;
  transform: translate(6px, -50%) scale(0.9);
  box-shadow: 0 3px 10px rgba(107, 80, 58, 0.14);
  transition: opacity 0.16s ease, transform 0.16s ease, background 0.16s ease;
}
.plant-title-sign .plant-name {
  z-index: 1;
  color: var(--garden-title-text);
  text-shadow:
    0 1px 0 var(--border-strong),
    0 5px 14px rgba(83, 123, 96, 0.14);
}
.plant-card .plant-name::after {
  content: '';
  display: block;
  width: min(120px, 70%);
  height: 4px;
  margin: 7px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green-200), var(--pink-200), var(--green-200));
}
.plant-title-sign .plant-name::after {
  width: min(104px, 64%);
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--green-300), transparent);
}
.plant-card .plant-name:hover {
  transform: translateY(-1px);
  box-shadow: none;
  background: transparent;
  color: var(--green-500);
}
#plantName:hover::before,
#plantName:focus-visible::before {
  opacity: 1;
  transform: translate(0, -50%) scale(1);
  background: var(--surface-card);
}
:root[data-theme="dark"] #plantName::before {
  border-color: rgba(235, 219, 228, 0.12);
  background: rgba(48, 41, 48, 0.84);
  color: var(--pink-500);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}
.plant-title-sign .plant-name:hover {
  color: var(--green-700);
}
.plant-name.unnamed {
  font-family: 'Jua', 'Fredoka', sans-serif;
  font-size: 20px;
  color: var(--ink-soft);
  font-style: italic;
  font-weight: 400;
  border-style: dotted;
  background: var(--surface-muted);
}
.plant-card .plant-name.unnamed {
  color: var(--garden-title-text);
  font-size: 28px;
  font-style: normal;
  background: transparent;
  opacity: 0.78;
}
.plant-start-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 12px;
  border: 1px solid var(--green-100);
  border-radius: 999px;
  background: var(--surface-control);
  color: var(--green-700);
  font-family: 'Fredoka', 'Jua', 'Poor Story', sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  box-shadow: 0 2px 8px rgba(143, 211, 160, 0.16);
}
.plant-title-sign .plant-start-date {
  z-index: 1;
  border-color: rgba(143, 211, 160, 0.28);
  background: rgba(255, 255, 255, 0.5);
  color: var(--garden-title-text);
  box-shadow: inset 0 -2px 0 rgba(184, 224, 194, 0.16);
}
:root[data-theme="dark"] .plant-title-sign .plant-start-date {
  border-color: rgba(134, 188, 153, 0.18);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 -2px 0 rgba(134, 188, 153, 0.06);
}
.plant-start-date:empty {
  display: none;
}

/* ---------- past plants (graduated) ---------- */
.past-plants {
  max-width: 1100px;
  margin: 8px auto 32px;
  padding: 0 24px;
}
.past-plants .section-h {
  margin: 8px 0 12px;
}
.past-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.past-card {
  background: var(--surface-soft);
  border: 2px solid var(--green-100);
  border-radius: 18px;
  padding: 10px 8px 12px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  position: relative;
  opacity: 0.92;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}
.past-card:hover {
  transform: translateY(-2px);
  border-color: var(--green-300);
  opacity: 1;
  box-shadow: 0 6px 18px rgba(143, 211, 160, 0.25);
}
/* subtle danger button inside the past-plant modal */
.remove-plant-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  min-width: 132px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-size: 13px;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.remove-plant-btn:hover {
  background: var(--pink-50);
  color: var(--pink-700);
}
.remove-plant-btn:disabled { opacity: 0.5; cursor: default; }

/* past-plant modal: plant name is read-only (no rename) */
#modal-past-plant .plant-name {
  cursor: default;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  overflow-wrap: anywhere;
  background: linear-gradient(135deg, var(--green-50) 0%, var(--surface-input) 100%);
}
#modal-past-plant .plant-name:hover {
  transform: none;
  box-shadow: var(--shadow-soft);
}
#modal-past-plant .plant-area {
  margin: 12px auto 0;
}
.center { text-align: center; }
.past-card .mini-plant {
  position: relative;
  width: 100%;
  height: 140px;
  overflow: hidden;
}
.past-card .mini-plant svg {
  width: 100%;
  height: 100%;
}
.past-card .mini-plant .ground {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 6px;
  background: var(--green-200);
  border-radius: 3px;
}
.past-card .mini-plant .pot-base {
  position: absolute;
  bottom: -2px; left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 8px;
  background: var(--pink-200);
  border-radius: 4px;
}
.past-name {
  font-family: 'Jua', 'Fredoka', sans-serif;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.12;
  color: var(--green-700);
  margin-top: 6px;
  text-align: center;
  overflow-wrap: anywhere;
}
.past-meta {
  font-size: 11px;
  color: var(--ink-soft);
  line-height: 1.35;
  margin-top: 4px;
}

.graduate-btn {
  min-width: 232px;
  font-size: 14px;
  padding: 10px 22px;
}

.plant-stage-banner {
  text-align: center;
  font-family: 'Fredoka', 'Poor Story', sans-serif;
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--surface-control);
  border: 1px solid var(--green-100);
  border-radius: 999px;
  padding: 7px 14px;
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.plant-area {
  position: relative;
  height: 520px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 18px;
  background: var(--plant-bg);
}
.plant-card .plant-area {
  margin: 18px 22px 0;
  border: 2px solid var(--border-strong);
  box-shadow: inset 0 0 0 1px var(--surface-soft), var(--shadow-soft);
}
.plant-card > .hint.center {
  margin: 12px 24px 0;
}
.plant-card .plant-actions {
  margin: 14px 24px 24px;
  padding-top: 14px;
  border-top: 1px dashed var(--green-100);
}
#view-main .card {
  border-radius: 14px;
}
#view-main .stat,
#view-main .plant-stage-banner,
#view-main .plant-area,
#view-main .past-card {
  border-radius: 10px;
}
@media (max-width: 520px) {
  .plant-card-header {
    padding: 20px 18px 14px;
  }
  .plant-title-sign {
    margin-bottom: 10px;
    padding: 17px 18px 14px;
    border-radius: 14px 14px 20px 14px;
  }
  .plant-title-sign::after {
    top: -10px;
    width: 62px;
    height: 19px;
  }
  .plant-card .plant-name {
    font-size: 30px;
  }
  .plant-stage-banner {
    border-radius: 16px;
    line-height: 1.35;
  }
  .plant-card .plant-area {
    margin: 14px 14px 0;
    border-radius: 16px;
  }
  .plant-card .plant-actions {
    margin: 14px 18px 22px;
  }
}
.pot {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
.pot svg { width: 100%; height: 100%; }
.ground {
  position: absolute;
  bottom: 38px;
  left: 0; right: 0;
  height: 14px;
  background: var(--ground-bg);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  margin: 0 18%;
  z-index: 1;
}
.pot-base {
  position: absolute;
  bottom: 0;
  left: 14%; right: 14%;
  height: 50px;
  background: var(--pot-bg);
  border-radius: 0 0 20px 20px;
  box-shadow: inset 0 8px 0 rgba(255, 255, 255, 0.2);
  z-index: 0;
}
.pot-base::before {
  content: '';
  position: absolute;
  top: -8px; left: -6px; right: -6px;
  height: 16px;
  background: var(--pot-rim-bg);
  border-radius: 8px;
}

/* leaves/flowers are svg <g> elements, click targets in full plant views */
.plant-area svg g.leaf,
.plant-area svg g.flower {
  --growth-hover-scale: 1;
  cursor: pointer;
  transition: transform 0.18s ease-out;
  transform-box: fill-box;
  transform-origin: center;
}
.plant-area svg g.leaf:hover,
.plant-area svg g.flower:hover { --growth-hover-scale: 1.1; }
.plant-area svg g.leaf.static,
.plant-area svg g.flower.static { cursor: default; }
.plant-area svg g.leaf.static:hover,
.plant-area svg g.flower.static:hover { --growth-hover-scale: 1; }
.plant-area svg g.leaf:not(.grow-in):not(.static) {
  animation: leaf-flutter 5.6s ease-in-out infinite;
  animation-delay: calc(var(--growth-drift, 0) * -0.7s);
}
.plant-area svg g.flower:not(.grow-in):not(.static) {
  animation: bloom-breathe 6.8s ease-in-out infinite;
  animation-delay: calc(var(--growth-drift, 0) * -0.8s);
}
#plantSvg .grow-in { animation: growIn 0.6s ease-out both; transform-box: fill-box; transform-origin: center; }
@keyframes growIn {
  0%   { transform: scale(0) rotate(-20deg); opacity: 0; }
  60%  { transform: scale(1.15) rotate(8deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}
.plant-area svg .sway,
#pastPlantSvg .sway {
  animation: sway 4.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: bottom center;
}
@keyframes sway {
  0%, 100% { transform: rotate(calc(-1.6deg - var(--breeze, 0) * 2.4deg)); }
  50%      { transform: rotate(calc( 1.8deg + var(--breeze, 0) * 2.6deg)); }
}
@keyframes leaf-flutter {
  0%, 100% { transform: translateY(0) rotate(calc(-1.4deg - var(--breeze, 0) * 2deg)) scale(var(--growth-hover-scale)); }
  50%      { transform: translateY(calc(-2px - var(--breeze, 0) * 3px)) rotate(calc(1.8deg + var(--breeze, 0) * 2.6deg)) scale(var(--growth-hover-scale)); }
}
@keyframes bloom-breathe {
  0%, 100% { transform: translateY(0) rotate(calc(-1deg - var(--breeze, 0) * 1.4deg)) scale(var(--growth-hover-scale)); }
  50%      { transform: translateY(-1px) rotate(calc(1deg + var(--breeze, 0) * 1.6deg)) scale(calc(var(--growth-hover-scale) * 1.03)); }
}

/* an unopened leaf trembles and gives off a soft shine until it's read.
   higher specificity than the flutter rule so unread leaves wobble instead;
   tremble animates transform, shine animates filter, so the two coexist. */
.plant-area svg g.leaf.unread:not(.grow-in):not(.static),
.plant-area svg g.flower.unread:not(.grow-in):not(.static) {
  animation: leaf-tremble 0.62s ease-in-out infinite,
             leaf-shine 1.7s ease-in-out infinite;
}
@keyframes leaf-tremble {
  0%   { transform: translate(0, 0)          rotate(-3deg)   scale(var(--growth-hover-scale, 1)); }
  25%  { transform: translate(0.6px, -0.6px) rotate(3deg)    scale(var(--growth-hover-scale, 1)); }
  50%  { transform: translate(0, 0.4px)      rotate(-2.4deg) scale(var(--growth-hover-scale, 1)); }
  75%  { transform: translate(-0.6px, -0.4px) rotate(2.6deg) scale(var(--growth-hover-scale, 1)); }
  100% { transform: translate(0, 0)          rotate(-3deg)   scale(var(--growth-hover-scale, 1)); }
}
@keyframes leaf-shine {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 226, 122, 0)); }
  50%      { filter: drop-shadow(0 0 5px rgba(255, 226, 122, 0.9)); }
}

@media (prefers-reduced-motion: reduce) {
  .floaty,
  .page-title::before,
  .page-title::after,
  .plant-title-sign,
  .plant-area svg .sway,
  #pastPlantSvg .sway,
  .plant-area svg g.leaf,
  .plant-area svg g.flower,
  #plantSvg .grow-in {
    animation: none !important;
  }
  body { transition: none; }
  /* no tremble/shine animation — keep a static glow so unread leaves still stand out */
  .plant-area svg g.leaf.unread,
  .plant-area svg g.flower.unread {
    filter: drop-shadow(0 0 4px rgba(255, 226, 122, 0.85));
  }
}

/* ---------- modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
  animation: fadeIn 0.18s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  background: var(--cream);
  border-radius: var(--radius);
  border: 2px solid var(--border-strong);
  box-shadow: var(--shadow);
  padding: 22px;
  width: min(100%, 380px);
  max-width: 380px;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  animation: pop 0.22s ease-out;
}
.modal-card.wide       { width: min(100%, 460px); max-width: 460px; }
.modal-card.extra-wide { width: min(100%, 600px); max-width: 600px; }
.modal-card.small      { width: min(100%, 340px); max-width: 340px; }
.settings-card         { width: min(100%, 440px); max-width: 440px; }
#modal-settings .settings-card {
  min-height: 628px;
}
.stage-card {
  max-width: 520px;
}
.settings-card > .muted {
  min-height: 40px;
  margin-bottom: 16px;
  line-height: 1.45;
}
.settings-section {
  display: grid;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px dashed var(--green-100);
}
.settings-section:first-of-type {
  border-top: 0;
  padding-top: 4px;
}
.settings-section h3 {
  min-height: 17px;
  margin: 0;
  color: var(--green-700);
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}
.settings-section-head,
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 62px;
}
.settings-profile-line {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.settings-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: 3px solid var(--border-strong);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-200), var(--green-200));
  color: var(--ink);
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-size: 22px;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}
.settings-profile-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 3px;
}
.settings-profile-copy strong,
.settings-profile-copy span {
  display: block;
  max-width: 100%;
  overflow-wrap: break-word;
}
.settings-profile-copy strong {
  color: var(--ink);
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-size: 17px;
  line-height: 1.15;
}
.settings-profile-copy span {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.25;
}
.settings-chip-btn,
.settings-action {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-control);
  color: var(--ink);
  cursor: pointer;
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.settings-chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 31px;
  padding: 7px 11px;
  font-size: 12px;
  white-space: nowrap;
}
.settings-action {
  display: flex;
  align-items: center;
  height: 40px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  font-size: 14px;
}
.settings-chip-btn:hover,
.settings-action:hover {
  background: var(--pink-50);
  color: var(--pink-700);
  transform: translateY(-1px);
}
.settings-action.danger {
  color: var(--pink-700);
  border-color: var(--pink-100);
}
.settings-label,
.settings-note {
  display: block;
}
.settings-label {
  color: var(--ink);
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}
.settings-note {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.25;
}
.settings-segment.pd-theme,
.settings-segment.pd-lang {
  flex: 0 0 142px;
  min-height: 34px;
  margin: 0;
}
.settings-actions {
  display: grid;
  width: 100%;
  gap: 8px;
}
@media (max-width: 520px) {
  .settings-section-head,
  .settings-row {
    align-items: stretch;
    flex-direction: column;
  }
  .settings-chip-btn {
    width: fit-content;
  }
  .settings-segment.pd-theme,
  .settings-segment.pd-lang {
    flex-basis: auto;
    width: 100%;
  }
}
.stage-progress-track {
  width: 100%;
  height: 10px;
  margin: 16px 0 14px;
  border-radius: 999px;
  background: var(--green-50);
  border: 1px solid var(--green-100);
  overflow: hidden;
}
.stage-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-200), var(--pink-300));
  transition: width 0.2s ease;
}
.stage-progress-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.stage-progress-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--green-100);
  border-radius: 14px;
  background: var(--surface-soft);
}
.stage-progress-step.current {
  border-color: var(--green-300);
  background: var(--green-50);
  box-shadow: inset 0 0 0 1px var(--surface-card);
}
.stage-progress-step.done {
  opacity: 0.8;
}
.stage-step-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--surface-control);
  font-size: 18px;
}
.stage-step-main,
.stage-step-side {
  display: grid;
  gap: 2px;
}
.stage-step-name {
  color: var(--ink);
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
}
.stage-step-desc,
.stage-step-range {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.25;
}
.stage-step-side {
  justify-items: end;
  text-align: right;
}
.stage-step-status {
  width: fit-content;
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--surface-control);
  color: var(--green-700);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}
.stage-progress-step.current .stage-step-status {
  background: var(--green-300);
  color: white;
}
.stage-progress-step.future .stage-step-status {
  color: var(--ink-soft);
}
@media (max-width: 520px) {
  .stage-progress-step {
    grid-template-columns: 30px minmax(0, 1fr);
  }
  .stage-step-icon {
    width: 30px;
    height: 30px;
  }
  .stage-step-side {
    grid-column: 2;
    justify-items: start;
    text-align: left;
  }
}
.danger-modal {
  border-color: var(--pink-200);
  min-height: 462px;
}
.danger-modal .muted {
  min-height: 150px;
  line-height: 1.5;
}
.delete-confirm-label {
  display: block;
  margin: 16px 0 6px;
  color: var(--ink);
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-size: 13px;
  font-weight: 600;
}
.delete-confirm-input {
  width: 100%;
  height: 42px;
  border: 2px solid var(--pink-100);
  border-radius: 14px;
  background: var(--surface-input);
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
  outline: none;
}
.delete-confirm-input:focus {
  border-color: var(--pink-300);
  box-shadow: 0 0 0 3px var(--pink-50);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.danger-modal .modal-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.danger-modal .modal-actions .btn,
.danger-modal .modal-actions .remove-plant-btn {
  width: 100%;
  height: 44px;
}
.danger-action:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
  filter: none;
}
/* send modal must not clip the neighbor dropdown */
#modal-send .modal-card {
  min-height: 548px;
  overflow: visible;
  max-height: none;
}
#modal-send .modal-card > .muted {
  min-height: 42px;
  line-height: 1.45;
}
/* shrink the tall plant area when shown inside a modal */
.modal .plant-area { height: 340px; }
@keyframes pop {
  from { transform: scale(0.94); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.profile-icon-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 8px;
}
.profile-icon-choice {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  border: 2px solid var(--pink-100);
  border-radius: 16px;
  background: var(--surface-control);
  color: var(--ink);
  font-family: 'Fredoka', 'Jua', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.profile-icon-choice:hover {
  transform: translateY(-2px);
  border-color: var(--pink-300);
  background: var(--surface-hover);
}
.profile-icon-choice.active {
  border-color: var(--pink-300);
  background: linear-gradient(135deg, var(--pink-100), var(--green-100));
  box-shadow: 0 0 0 4px var(--pink-100);
}
.profile-icon-choice:focus-visible {
  outline: 3px solid var(--pink-300);
  outline-offset: 3px;
}
.profile-icon-choice:disabled {
  cursor: default;
  opacity: 0.65;
  transform: none;
}
.x {
  position: absolute;
  top: 12px; right: 14px;
  border: none;
  background: var(--pink-100);
  color: var(--pink-700);
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.18s, transform 0.15s;
}
.x:hover { background: var(--pink-200); transform: rotate(90deg); }

/* ---------- sent list ---------- */
.sent-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  max-height: 50vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sent-item {
  background: var(--surface-popover);
  border: 2px solid var(--pink-100);
  border-radius: 16px;
  padding: 12px 14px;
}
.sent-item .row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.sent-item .to {
  font-weight: 600;
  color: var(--pink-700);
}
.sent-item .anon-tag {
  display: inline-block;
  background: var(--green-100);
  color: var(--green-700);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  margin-left: 6px;
}
.sent-item .msg { font-size: 14px; }
.empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 30px 0;
  font-size: 14px;
}

/* ---------- leaf modal ---------- */
.leaf-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.leaf-emoji {
  font-size: 32px;
  background: var(--green-100);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 3px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
}
.leaf-msg {
  background: var(--pink-50);
  border: 2px solid var(--pink-100);
  border-radius: 14px;
  padding: 14px;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--green-500);
  color: white;
  padding: 12px 24px;
  border-radius: 999px;
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-weight: 600;
  box-shadow: var(--shadow);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.pink { background: var(--pink-500); }

/* ---------- my garden ---------- */
.add-friend {
  display: flex;
  width: 100%;
  gap: 8px;
  margin: 14px 0 6px;
  min-height: 45px;
}
.add-friend input {
  flex: 1;
  min-width: 0;
  min-height: 45px;
  font-family: inherit;
  font-size: 15px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--surface-input);
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.add-friend input:focus {
  border-color: var(--pink-300);
  box-shadow: 0 0 0 4px var(--pink-100);
}
#modal-garden .modal-card > .muted {
  min-height: 64px;
  line-height: 1.45;
}
.add-friend button {
  flex: 0 0 98px;
  min-height: 45px;
  padding: 10px 18px;
}

.friend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 4px;
}

.friend-card {
  background: var(--surface-popover);
  border: 2px solid var(--pink-100);
  border-radius: 18px;
  padding: 12px;
  text-align: center;
  position: relative;
  transition: transform 0.18s, box-shadow 0.18s;
}
.friend-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}
.friend-card .remove-friend {
  position: absolute;
  top: 6px; right: 6px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  cursor: pointer;
  width: 26px; height: 26px;
  border-radius: 50%;
  transition: background 0.18s, color 0.18s;
}
.friend-card .remove-friend:hover {
  background: var(--pink-100);
  color: var(--pink-700);
}
.friend-card .mini-plant {
  position: relative;
  height: 150px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--plant-bg);
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
.friend-card .mini-plant svg { width: 100%; height: 100%; }
.friend-card .mini-plant .ground {
  position: absolute; bottom: 14px; left: 22%; right: 22%; height: 6px;
  background: var(--ground-bg);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  z-index: 1;
}
.friend-card .mini-plant .pot-base {
  position: absolute; bottom: 0; left: 22%; right: 22%; height: 18px;
  background: var(--pot-bg);
  border-radius: 0 0 8px 8px;
}
.friend-card .mini-plant .pot-base::before {
  content: ''; position: absolute; top: -4px; left: -3px; right: -3px; height: 7px;
  background: var(--pot-rim-bg); border-radius: 4px;
}
.friend-person {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: calc(100% - 18px);
  margin: 8px auto 0;
}
.friend-card .f-plant-name {
  position: relative;
  width: fit-content;
  max-width: calc(100% - 18px);
  margin: 10px auto 0;
  padding: 0 12px;
  color: var(--garden-title-text);
  font-family: 'Jua', 'Fredoka', sans-serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 1.05;
  text-align: center;
  overflow-wrap: anywhere;
  text-shadow:
    0 1px 0 var(--border-strong),
    0 5px 14px rgba(83, 123, 96, 0.12);
}
.friend-card .f-plant-name::after {
  content: '';
  display: block;
  width: min(96px, 68%);
  height: 3px;
  margin: 6px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--green-300), transparent);
}
.friend-card .f-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-200), var(--green-200));
  color: var(--ink);
  border: 2px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
  font-family: 'Fredoka', 'Jua', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
}
.friend-card .f-name {
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-weight: 600;
  color: var(--pink-700);
  font-size: 16px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.friend-card .f-id {
  font-size: 12px;
  color: var(--ink-soft);
}
.friend-card .f-stat {
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-size: 13px;
  color: var(--green-700);
  background: var(--green-50);
  border: 2px solid var(--green-100);
  border-radius: 999px;
  padding: 3px 10px;
  margin: 8px 0 10px;
  display: inline-block;
}
.friend-card .f-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 34px;
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-weight: 600;
  font-size: 13px;
  background: linear-gradient(135deg, var(--green-200), var(--green-500));
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s, filter 0.15s;
}
.friend-card .f-send:hover { transform: translateY(-1px); filter: brightness(1.04); }

.friend-empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 30px 12px;
  font-size: 14px;
  border: 2px dashed var(--pink-100);
  border-radius: 14px;
  margin-top: 16px;
}

/* ---------- section headers in garden modal ---------- */
.section-h {
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-soft);
  margin: 18px 0 8px;
  letter-spacing: 0.3px;
}
.section-h.sub { font-size: 13px; }
.badge {
  display: inline-block;
  background: var(--pink-500);
  color: white;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ---------- request lists ---------- */
.request-list, .outgoing-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.request-item {
  background: var(--request-bg);
  border: 2px solid var(--pink-100);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.request-item .ri-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-200), var(--green-200));
  display: grid; place-items: center;
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-weight: 700;
  color: var(--ink);
  font-size: 18px;
  flex-shrink: 0;
  border: 2px solid var(--border-strong);
}
.request-item .ri-info { flex: 1; min-width: 0; }
.request-item .ri-name {
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-weight: 600;
  color: var(--pink-700);
  font-size: 15px;
}
.request-item .ri-id {
  font-size: 12px;
  color: var(--ink-soft);
}
.request-item .ri-msg {
  font-size: 12px;
  color: var(--ink);
  background: var(--surface-popover);
  border-radius: 8px;
  padding: 4px 8px;
  margin-top: 4px;
  display: inline-block;
}
.request-item .ri-actions { display: flex; gap: 6px; flex-shrink: 0; }
.btn-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  min-height: 32px;
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-weight: 600;
  font-size: 12px;
  border: none;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.12s, filter 0.15s;
}
.btn-mini:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn-mini.accept {
  background: linear-gradient(135deg, var(--green-200), var(--green-500));
  color: white;
}
.btn-mini.decline {
  background: var(--surface-popover);
  color: var(--ink-soft);
  border: 2px solid var(--line);
  box-shadow: none;
}

.outgoing-item {
  background: var(--surface-popover);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.outgoing-item .oi-name { font-weight: 600; color: var(--pink-700); flex: 1; }
.outgoing-item .oi-cancel {
  background: transparent;
  border: none;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 50%;
  transition: background 0.18s, color 0.18s;
}
.outgoing-item .oi-cancel:hover { background: var(--pink-100); color: var(--pink-700); }

/* ---------- leaf invite ---------- */
.sender-photo {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 3px solid var(--border-strong);
  background: linear-gradient(135deg, var(--pink-200), var(--green-200));
  display: grid;
  place-items: center;
  font-family: 'Fredoka', 'Jua', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  padding: 0;
  transition: transform 0.18s, box-shadow 0.18s;
}
.sender-photo:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(255, 143, 174, 0.3);
}
.sender-photo.anon {
  background: linear-gradient(135deg, #e0d4e0, #c8b8c8);
  cursor: default;
}
.sender-photo.anon:hover { transform: none; box-shadow: var(--shadow-soft); }

.leaf-invite-row {
  text-align: center;
  margin: 8px 0 4px;
}
.leaf-invite-btn {
  min-width: 212px;
  min-height: 38px;
  font-size: 13px;
  padding: 8px 18px;
}
.leaf-invite-btn[disabled] {
  background: var(--green-100);
  color: var(--green-700);
  cursor: default;
  filter: none;
  transform: none;
  box-shadow: none;
}

/* ---------- nav badge ---------- */
.navbtn .nav-badge {
  display: inline-block;
  background: var(--pink-500);
  color: white;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  margin-left: 5px;
  vertical-align: middle;
}
