/* ==========================================================
   Bonsai · Premium PWA · © אופיר ברנס (Ofir Baranes) 2026
   Palette: deep moss, jade-sage, warm sienna, bone, copper
   ========================================================== */

:root {
  --bg-0: #0E1612;
  --bg-1: #131D18;
  --bg-2: #182520;
  --bg-3: #1F2E27;
  --surface-glass: rgba(28, 42, 35, 0.62);
  --surface-glass-strong: rgba(34, 50, 42, 0.78);
  --surface-elev: rgba(40, 60, 50, 0.5);
  --border: rgba(160, 200, 175, 0.10);
  --border-strong: rgba(176, 214, 188, 0.22);

  --jade-50: #EAF4EC;
  --jade-100: #BCD4C0;
  --jade-300: #8FB89B;
  --jade-500: #5F977A;
  --jade-700: #3E705A;
  --jade-900: #1F3C30;

  --sienna-300: #E4A07A;
  --sienna-500: #C66B3D;
  --sienna-700: #8A4422;

  --copper: #D9A066;
  --bone: #F5EFE6;
  --bone-dim: #D9D2C3;
  --mute: #8F9C93;
  --mute-soft: #6B7770;

  --danger: #D97757;
  --warn: #E0B355;
  --ok: #7FB28A;

  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.55), 0 12px 30px -10px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 12px 32px -10px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 0 1px rgba(143, 184, 155, 0.15), 0 20px 50px -20px rgba(95, 151, 122, 0.35);

  --rad-sm: 10px;
  --rad-md: 16px;
  --rad-lg: 22px;
  --rad-xl: 28px;
  --rad-pill: 999px;

  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-smooth: cubic-bezier(.4, 0, .2, 1);
  --t-fast: .18s;
  --t-med: .35s;
  --t-slow: .6s;

  --font-display: 'Frank Ruhl Libre', 'Heebo', serif;
  --font-mono: 'IBM Plex Mono', 'Menlo', monospace;
  --font-body: 'Heebo', system-ui, sans-serif;
  --font-accent: 'Instrument Serif', 'Frank Ruhl Libre', serif;

  color-scheme: dark;
}

/* RESET ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--bone);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100dvh;
}
button { font: inherit; color: inherit; border: 0; background: transparent; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; background: transparent; border: 0; outline: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* Ambient background ------------------------------------- */
body::before, body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
}
body::before {
  background:
    radial-gradient(900px 600px at 88% -10%, rgba(143, 184, 155, 0.18), transparent 60%),
    radial-gradient(700px 500px at -10% 60%, rgba(198, 107, 61, 0.10), transparent 65%),
    radial-gradient(1200px 900px at 50% 110%, rgba(95, 151, 122, 0.10), transparent 70%);
}
body::after {
  background-image:
    radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
  opacity: .35;
  mix-blend-mode: overlay;
}

#app { position: relative; z-index: 1; padding-bottom: 110px; max-width: 720px; margin: 0 auto; }

/* HEADER --------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 12px;
  background: linear-gradient(180deg, rgba(14,22,18,0.92), rgba(14,22,18,0.65) 65%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: 34px; border-radius: 12px; background:
  radial-gradient(circle at 30% 30%, var(--jade-300), var(--jade-700) 70%);
  box-shadow: 0 6px 14px rgba(95,151,122,.4), inset 0 1px 0 rgba(255,255,255,.18);
  display:grid; place-items:center;
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-name { font-family: var(--font-display); font-size: 20px; letter-spacing: -.01em; }
.brand-name b { color: var(--jade-100); font-weight: 700; }
.brand-name .dot { color: var(--sienna-500); margin: 0 4px; }

.topbar-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  transition: transform var(--t-fast) var(--ease-spring), background var(--t-fast);
  color: var(--bone-dim);
}
.icon-btn:hover { background: rgba(255,255,255,0.08); color: var(--bone); transform: translateY(-1px); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 18px; height: 18px; }

/* HERO ----------------------------------------------------- */
.hero {
  position: relative;
  margin: 12px 16px 22px;
  border-radius: var(--rad-xl);
  overflow: hidden;
  min-height: 250px;
  isolation: isolate;
  box-shadow: var(--shadow-lg);
}
.hero-img { position: absolute; inset: 0; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-img::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(225deg, rgba(14,22,18,0.55) 0%, rgba(14,22,18,0.85) 50%, rgba(14,22,18,0.95) 100%),
    radial-gradient(800px 300px at 10% 100%, rgba(198,107,61,0.18), transparent 70%);
}
.hero-content { position: relative; padding: 28px 24px 26px; z-index: 1; }
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--sienna-300);
  margin-bottom: 12px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 7vw, 38px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--bone);
  margin-bottom: 10px;
}
.hero-title em { font-family: var(--font-accent); font-style: italic; color: var(--jade-100); font-weight: 400; }
.hero-sub {
  font-size: 14px;
  color: var(--bone-dim);
  max-width: 420px;
  line-height: 1.55;
}

/* KPI STRIP ----------------------------------------------- */
.kpi-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 16px 18px;
}
.kpi {
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: var(--rad-md);
  padding: 14px 12px;
  backdrop-filter: blur(12px);
  transition: transform var(--t-med) var(--ease-spring), border-color var(--t-fast);
  position: relative;
}
.kpi:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.kpi-label {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--mute); margin-bottom: 6px;
}
.kpi-value {
  font-family: var(--font-mono);
  font-size: 22px; font-weight: 600;
  color: var(--bone);
  display: flex; align-items: baseline; gap: 3px;
}
.kpi-value .unit { font-size: 11px; color: var(--mute); font-weight: 400; }
.kpi-trend {
  margin-top: 4px;
  font-size: 10.5px;
  display: flex; align-items: center; gap: 4px;
  color: var(--jade-300);
}
.kpi-trend.down { color: var(--sienna-300); }

/* SECTION TITLES ----------------------------------------- */
.section { padding: 0 16px; margin-bottom: 22px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 500; letter-spacing: -.01em;
}
.section-title em { font-family: var(--font-accent); font-style: italic; color: var(--jade-100); }
.section-meta { font-family: var(--font-mono); font-size: 11px; color: var(--mute); }

/* TREE PANEL --------------------------------------------- */
.tree-panel {
  position: relative;
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: var(--rad-xl);
  padding: 18px 18px 14px;
  backdrop-filter: blur(14px);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.tree-panel::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(70% 80% at 50% 35%, rgba(143,184,155,.10), transparent 60%);
  pointer-events: none;
}
.tree-stage { position: relative; height: 280px; display: grid; place-items: end center; }
.tree-stage svg.bonsai { width: 100%; height: 100%; max-width: 360px; }
.tree-ground {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 220px; height: 16px;
  background: radial-gradient(ellipse, rgba(198,107,61,0.35), transparent 70%);
  filter: blur(6px);
}
.tree-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; }
.tier-badge {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--sienna-300);
  display: inline-flex; align-items: center; gap: 7px;
}
.tier-badge .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--sienna-500);
  box-shadow: 0 0 12px var(--sienna-500);
  animation: pulse 2.2s infinite;
}
@keyframes pulse { 0%,100% { opacity:1; transform:scale(1);} 50%{opacity:.55; transform:scale(1.2);} }

.tier-progress {
  flex: 1; max-width: 200px; margin-right: 12px;
  height: 4px; border-radius: 99px; background: rgba(255,255,255,0.05);
  position: relative; overflow: hidden;
}
.tier-progress > span {
  display:block; height: 100%;
  background: linear-gradient(90deg, var(--jade-700), var(--jade-300));
  border-radius: 99px;
  transition: width var(--t-slow) var(--ease-spring);
}

/* JAR / CATEGORY CHIPS ----------------------------------- */
.jars-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.jar-card {
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: var(--rad-md);
  padding: 14px;
  position: relative; overflow: hidden;
  transition: transform var(--t-med) var(--ease-spring), border-color var(--t-fast);
}
.jar-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.jar-card::before {
  content: ''; position: absolute; top: 0; right: 0; width: 70px; height: 70px;
  background: radial-gradient(circle, var(--jar-color, var(--jade-500)), transparent 70%);
  opacity: .22; filter: blur(8px);
}
.jar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.jar-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--jar-color, var(--jade-500)); box-shadow: 0 0 10px var(--jar-color, var(--jade-500)); }
.jar-name { font-size: 13.5px; font-weight: 500; flex: 1; }
.jar-amount { font-family: var(--font-mono); font-size: 18px; color: var(--bone); }
.jar-amount .unit { font-size: 11px; color: var(--mute); margin-right: 3px; }
.jar-bar { height: 3px; border-radius: 99px; background: rgba(255,255,255,0.04); overflow: hidden; margin-top: 4px; }
.jar-bar > span { display:block; height: 100%; background: var(--jar-color, var(--jade-500)); }
.jar-meta { font-family: var(--font-mono); font-size: 10px; color: var(--mute); margin-top: 6px; letter-spacing: .08em; }

/* CHART --------------------------------------------------- */
.chart-card {
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: var(--rad-xl);
  padding: 16px 14px 10px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-md);
}
.chart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; padding: 0 6px; }
.chart-title { font-family: var(--font-display); font-size: 15px; }
.chart-legend { display: flex; gap: 12px; font-family: var(--font-mono); font-size: 10px; color: var(--mute); }
.chart-legend span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 6px; vertical-align: middle; }
.legend-saved::before { background: var(--jade-300); }
.legend-goal::before { background: var(--sienna-500); }
.chart-svg { width: 100%; height: 180px; display: block; }
.chart-toolbar { display: flex; gap: 6px; padding: 8px 6px 4px; }
.range-btn {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 99px; color: var(--mute);
  border: 1px solid var(--border); background: transparent;
  transition: all var(--t-fast);
}
.range-btn.active { color: var(--jade-100); border-color: var(--border-strong); background: rgba(143,184,155,0.08); }
.range-btn:hover:not(.active) { color: var(--bone-dim); }

/* HEATMAP ------------------------------------------------- */
.heatmap-card {
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: var(--rad-xl);
  padding: 16px;
}
.heatmap-grid { display: grid; grid-template-columns: repeat(20, 1fr); gap: 4px; }
.heat-cell { aspect-ratio: 1; border-radius: 4px; background: rgba(255,255,255,0.04); transition: transform var(--t-fast); }
.heat-cell:hover { transform: scale(1.4); }
.heat-1 { background: rgba(143,184,155,0.25); }
.heat-2 { background: rgba(143,184,155,0.5); }
.heat-3 { background: rgba(143,184,155,0.75); }
.heat-4 { background: rgba(143,184,155,1); box-shadow: 0 0 6px rgba(143,184,155,0.5); }
.heatmap-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-family: var(--font-mono); font-size: 10px; color: var(--mute); }
.heatmap-scale { display: flex; align-items: center; gap: 3px; }
.heatmap-scale .heat-cell { width: 10px; height: 10px; }

/* TIMELINE LIST ------------------------------------------ */
.history-list { display: flex; flex-direction: column; gap: 6px; }
.history-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 12px 14px;
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: var(--rad-md);
  transition: all var(--t-fast);
}
.history-item:hover { border-color: var(--border-strong); transform: translateX(-2px); }
.history-marker { width: 10px; height: 10px; border-radius: 50%; background: var(--jar-color, var(--jade-300)); box-shadow: 0 0 8px var(--jar-color, var(--jade-300)); }
.history-body { min-width: 0; }
.history-cat { font-size: 13px; font-weight: 500; color: var(--bone); }
.history-meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--mute); margin-top: 2px; }
.history-amount { font-family: var(--font-mono); font-size: 15px; color: var(--jade-100); font-weight: 600; }
.history-amount .unit { font-size: 10px; color: var(--mute); margin-right: 2px; }

/* EMPTY STATE -------------------------------------------- */
.empty-state {
  text-align: center; padding: 26px 18px 22px;
  background: var(--surface-glass);
  border: 1px dashed var(--border-strong);
  border-radius: var(--rad-xl);
}
.empty-state img, .empty-state svg { width: 130px; height: 130px; margin: 0 auto 12px; opacity: .85; }
.empty-state h3 { font-family: var(--font-display); font-size: 17px; font-weight: 500; margin-bottom: 5px; }
.empty-state p { font-size: 13px; color: var(--mute); max-width: 280px; margin: 0 auto; }

/* FAB ----------------------------------------------------- */
.fab {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%);
  width: 64px; height: 64px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--jade-300), var(--jade-700) 70%);
  box-shadow: 0 14px 36px -8px rgba(95,151,122,0.55), 0 0 0 1px rgba(143,184,155,0.4), inset 0 1px 0 rgba(255,255,255,0.22);
  display: grid; place-items: center;
  color: var(--bg-0);
  z-index: 50;
  transition: transform var(--t-med) var(--ease-spring);
}
.fab::after {
  content: ''; position: absolute; inset: -10px; border-radius: 50%;
  border: 1px solid rgba(143,184,155,0.25);
  animation: ripple 2.5s var(--ease-smooth) infinite;
}
@keyframes ripple { 0% { transform: scale(.85); opacity: .8; } 100% { transform: scale(1.3); opacity: 0; } }
.fab:hover { transform: translateX(-50%) translateY(-3px) scale(1.04); }
.fab:active { transform: translateX(-50%) scale(.92); }
.fab svg { width: 26px; height: 26px; }

/* BOTTOM NAV --------------------------------------------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  display: flex; justify-content: space-around;
  padding: 8px 24px 18px;
  background: linear-gradient(180deg, transparent, rgba(14,22,18,0.95) 50%);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  max-width: 720px; margin: 0 auto;
}
.nav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 14px; border-radius: var(--rad-md);
  color: var(--mute); transition: color var(--t-fast);
  font-size: 10.5px; letter-spacing: .04em;
}
.nav-btn svg { width: 20px; height: 20px; }
.nav-btn.active { color: var(--jade-100); }
.nav-btn:hover { color: var(--bone-dim); }
.nav-spacer { width: 80px; }

/* VIEWS --------------------------------------------------- */
.view { display: none; }
.view.active { display: block; animation: fadein .35s var(--ease-smooth); }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* MODAL --------------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8, 14, 12, 0.65);
  backdrop-filter: blur(8px);
  display: none; align-items: flex-end; justify-content: center;
}
.modal-overlay.open { display: flex; animation: overlay-in var(--t-med) var(--ease-smooth); }
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 100%; max-width: 480px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border-strong);
  border-bottom: 0;
  border-radius: var(--rad-xl) var(--rad-xl) 0 0;
  padding: 22px 22px 28px;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: sheet-up .45s var(--ease-spring);
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.modal-grab { width: 36px; height: 4px; border-radius: 99px; background: var(--mute-soft); margin: 0 auto 16px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-title { font-family: var(--font-display); font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
.modal-title em { font-family: var(--font-accent); font-style: italic; color: var(--jade-100); }
.modal-close { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.04); display: grid; place-items: center; color: var(--bone-dim); }
.modal-close svg { width: 16px; height: 16px; }

/* FORM ---------------------------------------------------- */
.form-row { margin-bottom: 14px; }
.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--mute); margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--rad-sm);
  color: var(--bone);
  font-size: 14.5px;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--jade-300);
  background: rgba(143,184,155,0.04);
}
.form-amount {
  font-family: var(--font-mono);
  font-size: 28px;
  text-align: center;
  font-weight: 600;
  padding: 18px 14px;
  letter-spacing: -.02em;
}
.amount-shortcuts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.shortcut-chip {
  flex: 1; min-width: 60px;
  font-family: var(--font-mono); font-size: 12px;
  padding: 9px 8px;
  border: 1px solid var(--border);
  border-radius: var(--rad-pill);
  color: var(--bone-dim);
  transition: all var(--t-fast);
}
.shortcut-chip:hover, .shortcut-chip.active { border-color: var(--jade-300); color: var(--jade-100); background: rgba(143,184,155,0.06); }

.jar-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.jar-pick {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: var(--rad-pill);
  font-size: 12px;
  transition: all var(--t-fast);
}
.jar-pick .dot { width: 8px; height: 8px; border-radius: 50%; }
.jar-pick.active, .jar-pick:hover { border-color: var(--jade-300); background: rgba(143,184,155,0.05); }

.btn-primary {
  display: block; width: 100%;
  padding: 14px;
  background: linear-gradient(180deg, var(--jade-300), var(--jade-500));
  color: var(--bg-0);
  border-radius: var(--rad-md);
  font-weight: 600; font-size: 15px;
  margin-top: 8px;
  box-shadow: 0 8px 22px -8px rgba(143,184,155,0.55);
  transition: transform var(--t-fast) var(--ease-spring);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: scale(.98); }
.btn-secondary {
  display: block; width: 100%;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--rad-md);
  color: var(--bone-dim);
  font-weight: 500;
  margin-top: 8px;
}
.btn-secondary:hover { background: rgba(255,255,255,0.06); color: var(--bone); }

/* DONUT --------------------------------------------------- */
.donut-row { display: grid; grid-template-columns: 130px 1fr; gap: 18px; align-items: center; }
.donut-svg { width: 130px; height: 130px; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; }
.donut-legend li { display: flex; align-items: center; gap: 9px; font-size: 12.5px; }
.donut-legend .swatch { width: 9px; height: 9px; border-radius: 50%; }
.donut-legend .l-name { flex: 1; color: var(--bone-dim); }
.donut-legend .l-val { font-family: var(--font-mono); font-size: 11px; color: var(--mute); }

/* TOAST --------------------------------------------------- */
.toast {
  position: fixed; bottom: 110px; left: 50%; transform: translateX(-50%) translateY(8px);
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--border-strong);
  padding: 10px 18px; border-radius: var(--rad-pill);
  display: flex; align-items: center; gap: 9px;
  font-size: 13px;
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none;
  transition: all .35s var(--ease-spring);
  z-index: 90;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--jade-300); box-shadow: 0 0 9px var(--jade-300); }

/* DROP ANIMATION ON TREE --------------------------------- */
@keyframes drop-fall {
  0%   { opacity: 0; transform: translateY(-40px) scale(.4); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(40px) scale(1.2); }
}
.tree-drop {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 8px; height: 14px; border-radius: 4px 4px 50% 50%;
  background: linear-gradient(180deg, var(--jade-100), var(--jade-300));
  filter: blur(.5px);
  animation: drop-fall 1.4s var(--ease-smooth) forwards;
}

/* SETTINGS LIST ------------------------------------------ */
.settings-list { display: flex; flex-direction: column; gap: 6px; }
.setting-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px;
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: var(--rad-md);
}
.setting-row label { font-size: 13.5px; color: var(--bone); font-weight: 500; }
.setting-row .desc { font-size: 11px; color: var(--mute); margin-top: 2px; font-family: var(--font-mono); letter-spacing: .04em; }
.setting-row select, .setting-row input[type=text] {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 7px 10px; border-radius: 8px;
  font-size: 12.5px;
  min-width: 100px;
}

/* SEARCH / FILTER BAR ----------------------------------- */
.filter-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.search-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: var(--rad-pill);
  font-size: 13px;
}
.search-input:focus { border-color: var(--jade-300); }

/* QUOTE BANNER ------------------------------------------- */
.quote-banner {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 16px; line-height: 1.55;
  color: var(--bone-dim);
  text-align: center;
  padding: 18px 22px;
  border-radius: var(--rad-lg);
  background: linear-gradient(180deg, rgba(143,184,155,0.06), rgba(198,107,61,0.03));
  border: 1px solid var(--border);
  position: relative;
}
.quote-banner::before, .quote-banner::after {
  content: '"';
  font-family: var(--font-display);
  font-size: 28px; color: var(--jade-300); opacity: .55;
  position: absolute;
}
.quote-banner::before { top: 6px; right: 14px; }
.quote-banner::after { bottom: -8px; left: 14px; }
.quote-author { display: block; margin-top: 8px; font-family: var(--font-mono); font-style: normal; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }

/* GOAL CARD ---------------------------------------------- */
.goal-card {
  background: linear-gradient(160deg, rgba(143,184,155,0.10), rgba(198,107,61,0.05));
  border: 1px solid var(--border-strong);
  border-radius: var(--rad-xl);
  padding: 20px;
  position: relative; overflow: hidden;
}
.goal-card::before {
  content: ''; position: absolute; top: -20px; left: -20px; width: 120px; height: 120px;
  background: radial-gradient(circle, var(--sienna-500), transparent 65%);
  opacity: .18; filter: blur(10px);
}
.goal-row { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 10px; }
.goal-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.goal-name { font-family: var(--font-display); font-size: 18px; font-weight: 500; margin-top: 3px; }
.goal-pct { font-family: var(--font-mono); font-size: 26px; color: var(--jade-100); font-weight: 600; }
.goal-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,0.06); overflow: hidden; }
.goal-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--sienna-500), var(--jade-300)); border-radius: 99px; transition: width var(--t-slow) var(--ease-spring); }
.goal-stats { display: flex; justify-content: space-between; margin-top: 10px; font-family: var(--font-mono); font-size: 11px; color: var(--mute); }
.goal-stats b { color: var(--bone); font-weight: 500; }

/* ABOUT MODAL TEXT --------------------------------------- */
.about-section { margin-bottom: 16px; }
.about-section h4 { font-family: var(--font-display); font-size: 14px; margin-bottom: 6px; color: var(--jade-100); }
.about-section p { font-size: 13px; color: var(--bone-dim); line-height: 1.6; }
.about-section ul { padding-right: 18px; list-style: disc inside; font-size: 13px; color: var(--bone-dim); line-height: 1.7; }
.about-footer { text-align: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: 10.5px; color: var(--mute); letter-spacing: .04em; }
.about-footer b { color: var(--copper); font-weight: 500; }

/* RESPONSIVE --------------------------------------------- */
@media (max-width: 380px) {
  .hero-content { padding: 22px 18px; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(3) { grid-column: span 2; }
  .jars-grid { grid-template-columns: 1fr; }
}
@media (min-width: 720px) {
  .hero { min-height: 320px; }
  .hero-title { font-size: 44px; }
  .tree-stage { height: 360px; }
  .donut-row { grid-template-columns: 160px 1fr; }
  .donut-svg { width: 160px; height: 160px; }
}

/* SCROLLBAR ---------------------------------------------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(143,184,155,0.15); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(143,184,155,0.3); }

/* FOCUS-VISIBLE ------------------------------------------ */
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--jade-300); outline-offset: 2px; border-radius: 4px;
}
