/* Garden Journal — mobile-first PWA styles */

:root {
  --bg: #f4f3ec;
  --surface: #fcfcfb;
  --ink: #1d251c;
  --ink-2: #52514e;
  --muted: #898781;
  --line: #e1e0d9;
  --accent: #2e6b34;
  --accent-ink: #ffffff;
  --accent-soft: #e4efe2;
  --danger: #b3352f;
  --bloom: #fbe9f0;
  --bloom-ink: #97365c;
  --due: #fdf0dc;
  --due-ink: #8a5a10;
  --shadow: 0 1px 3px rgba(29, 37, 28, 0.08);
  /* chart roles (validated palette) */
  --viz-surface: #fcfcfb;
  --viz-series: #008300;
  --viz-grid: #e1e0d9;
  --viz-axis: #c3c2b7;
  --viz-label: #898781;
  --viz-ink: #0b0b0b;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121311;
    --surface: #1a1a19;
    --ink: #f0efe9;
    --ink-2: #c3c2b7;
    --muted: #898781;
    --line: #2c2c2a;
    --accent: #6fbf73;
    --accent-ink: #10240f;
    --accent-soft: #24301f;
    --danger: #e66767;
    --bloom: #3a2530;
    --bloom-ink: #e8a2c0;
    --due: #363020;
    --due-ink: #e8c27a;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    --viz-surface: #1a1a19;
    --viz-series: #008300;
    --viz-grid: #2c2c2a;
    --viz-axis: #383835;
    --viz-label: #898781;
    --viz-ink: #ffffff;
  }
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
  overscroll-behavior-y: none;
}

#app {
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 14px 24px;
  padding-top: max(12px, env(safe-area-inset-top));
}

h1 { font-size: 1.5rem; letter-spacing: -0.01em; }
h2 { font-size: 1.02rem; margin-bottom: 8px; }
a { color: var(--accent); text-decoration: none; }
small { color: var(--muted); }

.page-head { margin: 6px 2px 12px; }
.page-head .sub { color: var(--ink-2); font-size: 0.92rem; margin-top: 2px; }
.back { display: inline-block; margin-bottom: 6px; font-weight: 600; }

/* panels & cards */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.cards { display: flex; flex-direction: column; gap: 10px; }
.card {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  color: var(--ink);
  box-shadow: var(--shadow);
}
.card:active { transform: scale(0.99); }
.card-thumb {
  width: 64px; height: 64px; border-radius: 10px; flex: none;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; overflow: hidden;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-body { flex: 1; min-width: 0; }
.card-title { font-weight: 650; }
.card-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 0.82rem; color: var(--ink-2); }
.card-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.card-arrow { color: var(--muted); font-size: 1.3rem; padding-right: 2px; }

.badge {
  font-size: 0.74rem; font-weight: 600;
  padding: 2px 8px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent);
}
.badge.bloom { background: var(--bloom); color: var(--bloom-ink); }
.badge.due { background: var(--due); color: var(--due-ink); }

/* search & chips */
.searchrow input {
  width: 100%; padding: 10px 14px; font-size: 1rem;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink);
}
.chiprow { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.chiprow::-webkit-scrollbar { display: none; }
.chip {
  flex: none; font-size: 0.84rem; font-weight: 600;
  padding: 6px 12px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip.static { background: var(--accent-soft); color: var(--ink); border: none; padding: 4px 10px; font-weight: 500; }
.chip.static.bloom { background: var(--bloom); color: var(--bloom-ink); }

/* buttons & forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 7px 12px; font-size: 0.86rem; }
.btn.tiny { padding: 4px 10px; font-size: 0.8rem; border-radius: 9px; }
.btn.big { width: 100%; padding: 14px; font-size: 1.05rem; margin-top: 4px; }
.btn:active { opacity: 0.85; }
.file-btn { position: relative; }

label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink-2); margin-bottom: 10px; }
input[type="text"], input[type="date"], input[type="number"], input[type="search"], select, textarea {
  display: block; width: 100%; margin-top: 4px;
  padding: 9px 12px; font-size: 1rem; font-family: inherit;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink);
}
textarea { resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inline-form .row { margin-bottom: 0; }
.hint { font-size: 0.82rem; color: var(--muted); font-weight: 400; margin: 6px 0; }
.hint-inline { font-size: 0.8rem; color: var(--muted); font-weight: 400; }

.big-form .panel h2 { margin-bottom: 12px; }
.autofill-note {
  background: var(--accent-soft); color: var(--accent);
  font-size: 0.86rem; font-weight: 600;
  padding: 8px 12px; border-radius: 10px; margin: -2px 0 12px;
}
.lookup-btn { margin: -2px 0 12px; }
.lookup-btn:disabled { opacity: 0.6; }

/* zone-fit badges in autocomplete */
.s-fit {
  display: block; font-size: 0.76rem; font-weight: 600; margin-top: 2px;
}
.s-fit.ok { color: var(--accent); }
.s-fit.warn { color: var(--due-ink); }
.s-fit.no { color: var(--danger); }

/* frost + freeze lines in the weather panel */
.wx-frost { font-size: 0.88rem; color: var(--due-ink); font-weight: 600; margin: 6px 0; }

/* settings checkbox row */
.check-row { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; color: var(--ink); }
.check-row input { width: auto; margin: 0; accent-color: var(--accent); }

/* autocomplete */
.suggest-wrap { position: relative; }
.suggest {
  position: absolute; z-index: 30; left: 0; right: 0; top: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15); overflow: hidden;
}
.suggest button {
  display: block; width: 100%; text-align: left;
  padding: 11px 14px; font-size: 0.98rem; font-family: inherit;
  background: none; border: none; border-bottom: 1px solid var(--line);
  color: var(--ink); cursor: pointer;
}
.suggest button:last-child { border-bottom: none; }
.suggest button:active { background: var(--accent-soft); }

/* month toggles */
.month-toggle { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 12px; }
.m-btn {
  font-size: 0.72rem; font-weight: 600; padding: 4px 7px;
  border-radius: 7px; border: 1px solid var(--line);
  background: var(--bg); color: var(--muted); cursor: pointer;
}
.m-btn.on { background: var(--bloom); color: var(--bloom-ink); border-color: transparent; }

/* detail page */
.detail-head { margin-bottom: 12px; }
.detail-hero {
  width: 100%; aspect-ratio: 16/10; border-radius: 16px; overflow: hidden;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; font-size: 3rem;
  margin: 8px 0 10px; box-shadow: var(--shadow);
}
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.species { color: var(--muted); font-style: italic; margin-top: -2px; }
.meta-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.head-actions { display: flex; gap: 8px; margin-top: 4px; }

.care-grid { display: flex; flex-direction: column; gap: 10px; }
.care-row dt { font-weight: 650; font-size: 0.86rem; margin-bottom: 1px; }
.care-row dd { color: var(--ink-2); font-size: 0.92rem; }

.bloom-strip { display: flex; gap: 3px; align-items: center; margin-top: 12px; }
.bloom-m {
  width: 20px; height: 20px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem; font-weight: 700;
  background: var(--bg); color: var(--muted);
}
.bloom-m.on { background: var(--bloom); color: var(--bloom-ink); }
.bloom-m.now { outline: 2px solid var(--accent); outline-offset: 1px; }
.bloom-cap { font-size: 0.74rem; color: var(--muted); margin-left: 6px; }

/* reminders */
.rem-row, .task-row, .area-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.rem-row:last-child, .task-row:last-child, .area-row:last-child { border-bottom: none; }
.rem-ic { font-size: 1.2rem; }
.rem-label { flex: 1; font-weight: 600; font-size: 0.92rem; }
.rem-label small { display: block; font-weight: 400; }
.due-txt { font-size: 0.8rem; font-weight: 700; color: var(--accent); }
.due-txt.over { color: var(--due-ink); background: var(--due); padding: 2px 8px; border-radius: 99px; }
.task-body { flex: 1; color: var(--ink); min-width: 0; }
.task-body small { display: block; }
.area-row span { flex: 1; }

.rem-edit {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.rem-edit select { width: auto; margin: 0; }
.rem-edit input[type="text"] { flex: 1; min-width: 90px; margin: 0; }
.rem-every { display: inline-flex; align-items: center; gap: 5px; font-size: 0.85rem; color: var(--ink-2); }
.rem-every input { width: 58px; margin: 0; text-align: center; }

/* measurements & journal */
.m-list { margin: 10px 0; }
.m-row {
  display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline;
  font-size: 0.88rem; padding: 6px 0; border-bottom: 1px solid var(--line);
}
.m-row:last-child { border-bottom: none; }
.m-date { color: var(--muted); font-size: 0.8rem; min-width: 88px; }
.m-vals { font-weight: 600; }
.m-note { color: var(--ink-2); width: 100%; padding-left: 88px; font-size: 0.84rem; }
.j-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.j-row:last-child { border-bottom: none; }
.j-date { font-size: 0.78rem; color: var(--muted); }
.inline-form { margin-top: 12px; }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.gallery .empty { grid-column: 1 / -1; }
.g-item { margin: 0; }
.g-item img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 10px; display: block;
}
.g-item figcaption { font-size: 0.7rem; color: var(--muted); text-align: center; margin-top: 2px; }

/* lightbox & pin picker */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.88);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px; gap: 12px;
}
.lightbox > img { max-width: 100%; max-height: 75vh; border-radius: 12px; object-fit: contain; }
.lb-bar { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.lb-bar span { color: #fff; align-self: center; font-size: 0.86rem; }
.pin-hint { color: #fff; font-weight: 600; text-align: center; }
.pin-map-wrap {
  width: 100%; max-height: 62vh; overflow: auto;
  border-radius: 10px; -webkit-overflow-scrolling: touch;
}
.pin-map { position: relative; }
.pin-map img { width: 100%; border-radius: 10px; display: block; }

/* maps & pins */
.minimap, .bigmap { position: relative; border-radius: 12px; overflow: hidden; }
.minimap { margin-top: 8px; }
.minimap img, .bigmap img { width: 100%; display: block; }
.bigmap-wrap {
  border-radius: 12px; overflow: auto; -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow); border: 1px solid var(--line);
  max-height: 70vh;
}
.bigmap { border-radius: 0; }

/* pins are colour-coded by plant type, carrying the same icon as photo-less cards */
.pin {
  --pin: #8d6e63;
  position: absolute; transform: translate(-50%, -50%);
  width: 26px; height: 26px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 2px solid #fff;
  background: var(--pin); color: #fff;
  font-size: 0.85rem; line-height: 1; padding: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.45); cursor: pointer;
}
.pin.t-tree { --pin: #2f7d32; }
.pin.t-shrub { --pin: #7aa05a; }
.pin.t-flower { --pin: #d95b8c; }
.pin.t-vine { --pin: #2a9d8f; }
.pin.t-grass { --pin: #c8952a; }
.pin.live { width: 30px; height: 30px; font-size: 1rem; }
.pin.ghost { opacity: 0.5; }
.pin.picked { width: 32px; height: 32px; font-size: 1.05rem; border-color: #ffd54f; }
.pin.static { position: static; transform: none; width: 24px; height: 24px; }

.pin-legend { display: flex; flex-wrap: wrap; gap: 10px 14px; margin: 8px 2px 0; }
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 0.78rem; color: var(--ink-2); }

/* map zoom controls */
.zoombar { display: flex; align-items: center; gap: 10px; margin: 0 2px 8px; }
.zoom-ctl {
  display: inline-flex; align-items: center; gap: 2px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden;
}
.zoom-ctl button {
  width: 40px; height: 34px; border: none; background: none;
  color: var(--ink); font-size: 1.25rem; line-height: 1; cursor: pointer;
}
.zoom-ctl button:disabled { color: var(--muted); opacity: 0.5; }
.zoom-ctl button:active:not(:disabled) { background: var(--accent-soft); }
.zoom-label {
  min-width: 46px; text-align: center; font-size: 0.8rem;
  color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.pin-picker .zoombar { justify-content: center; }
.pin-picker .hint-inline { color: #d8d7d0; }
.pin-pop {
  position: absolute; transform: translate(-50%, 8px); z-index: 5;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  font-size: 0.9rem; white-space: nowrap; max-width: 80%;
}
.pin-pop a { color: var(--ink); }
.pin-pop small { white-space: normal; }

/* general to-do tasks */
.todo-check {
  width: 26px; height: 26px; flex: none;
  border-radius: 8px; border: 2px solid var(--line);
  background: var(--bg); color: transparent;
  font-size: 0.95rem; font-weight: 800; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.todo-check:active { background: var(--accent-soft); }
.todo .task-body small { display: block; }
.todo-over { color: var(--due-ink); font-weight: 650; }
.row-btn { align-self: end; margin-bottom: 10px; }

/* completed history */
.hist-month {
  font-size: 0.74rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin: 12px 0 2px;
}
.hist-row {
  display: flex; gap: 10px; align-items: center;
  padding: 6px 0; border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.hist-row:last-child { border-bottom: none; }
.hist-date { color: var(--muted); font-size: 0.78rem; min-width: 46px; flex: none; }
.hist-text { flex: 1; }

/* rain banner + weather */
.banner {
  display: block;
  background: var(--due); color: var(--due-ink);
  font-weight: 650; font-size: 0.92rem;
  padding: 11px 14px; border-radius: 12px;
  margin-bottom: 12px;
}
/* backup reminder banner */
.banner.backup {
  display: flex; align-items: stretch; gap: 0; padding: 0;
  background: var(--accent-soft); color: var(--ink);
  border: 1px solid var(--line);
}
.banner-body {
  flex: 1; text-align: left; background: none; border: none; cursor: pointer;
  font: inherit; color: inherit; padding: 10px 14px;
}
.banner-body small { display: block; font-weight: 500; font-size: 0.78rem; color: var(--ink-2); }
.banner-x {
  background: none; border: none; border-left: 1px solid var(--line);
  color: var(--ink-2); font-size: 0.95rem; padding: 0 14px; cursor: pointer;
}

/* new-version prompt (sits above every view) */
#update-bar {
  max-width: 640px; margin: 0 auto;
  padding: 12px 14px 0;
  padding-top: max(12px, env(safe-area-inset-top));
}
#update-bar[hidden] { display: none; }
.update-note {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 12px; padding: 11px 14px; box-shadow: var(--shadow);
}
.update-text { flex: 1; min-width: 190px; font-size: 0.92rem; }
.update-text small { display: block; font-weight: 550; opacity: 0.95; font-size: 0.78rem; }
.update-actions { display: flex; gap: 8px; margin-left: auto; }
.update-actions .btn { background: rgba(255, 255, 255, 0.18); color: var(--accent-ink); border-color: transparent; }
.update-actions .btn.primary { background: var(--accent-ink); color: var(--accent); }

/* blocking progress overlay (backup export / restore) */
#busy {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(0, 0, 0, 0.6); align-items: center; justify-content: center; padding: 24px;
}
#busy.show { display: flex; }
.busy-box {
  background: var(--surface); border-radius: 14px; padding: 22px 26px;
  text-align: center; max-width: 280px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.busy-box p { font-size: 0.9rem; }
.spinner {
  width: 28px; height: 28px; margin: 0 auto 12px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

.wx-status { font-weight: 650; font-size: 0.95rem; margin-bottom: 8px; }
.wx-status.dry { color: var(--due-ink); }
.wx-status.ok { color: var(--accent); }
.wx-next { font-size: 0.88rem; color: var(--ink-2); margin: 10px 0 8px; }
.fc-strip {
  display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.fc-strip::-webkit-scrollbar { display: none; }
.fc-day {
  flex: none; width: 52px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 7px 2px;
}
.fc-day.rainy { background: var(--accent-soft); border-color: transparent; }
.fc-dow { font-size: 0.68rem; font-weight: 700; color: var(--ink-2); }
.fc-dom { font-size: 0.62rem; color: var(--muted); }
.fc-ic { font-size: 1.15rem; line-height: 1.3; }
.fc-hi { font-size: 0.78rem; font-weight: 700; }
.fc-lo { font-size: 0.7rem; color: var(--muted); }
.fc-rain { font-size: 0.66rem; font-weight: 700; color: var(--accent); min-height: 0.9em; }

/* collapsible form sections */
details.panel > summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  -webkit-tap-highlight-color: transparent;
}
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary h2 { margin-bottom: 0; }
details.panel > summary::after {
  content: "▸"; color: var(--muted); font-size: 1.1rem;
  transition: transform 0.15s ease;
}
details.panel[open] > summary::after { transform: rotate(90deg); }
details.panel[open] > summary { margin-bottom: 12px; }

/* tappable area name on garden cards */
.area-link {
  background: none; border: none; padding: 0;
  font: inherit; color: var(--accent); font-weight: 600; cursor: pointer;
}

/* early submit on the add form */
.mid-submit { margin: 0; }
.mid-submit-hint { text-align: center; margin: 6px 0 12px; }

/* map/list toggle */
.seg.map-seg { display: flex; margin-bottom: 12px; }
.seg.map-seg button { flex: 1; white-space: nowrap; }

/* segmented control */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.seg button {
  padding: 8px 16px; font-size: 0.9rem; font-weight: 600; font-family: inherit;
  background: var(--surface); color: var(--ink-2); border: none; cursor: pointer;
}
.seg button.on { background: var(--accent); color: var(--accent-ink); }

/* empty states */
.empty { color: var(--muted); font-size: 0.9rem; padding: 6px 0; }
.empty.big { text-align: center; padding: 40px 24px; color: var(--ink-2); }
.empty.big p { margin-bottom: 8px; }
.empty-art { font-size: 3rem; margin-bottom: 8px; }

/* tab bar */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-around; align-items: center;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  font-size: 0.66rem; font-weight: 600; color: var(--muted);
  min-width: 56px; padding: 3px 0;
}
.tabbar a .t-ic { font-size: 1.35rem; line-height: 1.2; }
.tabbar a.active { color: var(--accent); }
.tabbar a.add-btn .t-ic {
  background: var(--accent); color: var(--accent-ink);
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin-top: -14px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
}

/* toast */
#toast {
  position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(10px); z-index: 200;
  background: var(--ink); color: var(--bg);
  padding: 9px 18px; border-radius: 99px; font-size: 0.9rem; font-weight: 600;
  opacity: 0; pointer-events: none; transition: all 0.25s ease;
  max-width: 88vw; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* growth chart */
.viz-root { position: relative; }
.viz-root svg { width: 100%; height: auto; display: block; background: var(--viz-surface); border-radius: 8px; touch-action: pan-y; }
.viz-grid { stroke: var(--viz-grid); stroke-width: 1; }
.viz-axis { stroke: var(--viz-axis); stroke-width: 1; }
.viz-label { fill: var(--viz-label); font-size: 9px; font-family: inherit; }
.viz-value { fill: var(--viz-ink); font-size: 10px; font-weight: 600; font-family: inherit; }
.viz-line { fill: none; stroke: var(--viz-series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-dot { fill: var(--viz-series); stroke: var(--viz-surface); stroke-width: 2; }
.viz-dot.active { r: 5.5; }
.viz-tip {
  position: absolute; top: 2px;
  background: var(--ink); color: var(--bg);
  font-size: 0.76rem; font-weight: 600;
  padding: 4px 9px; border-radius: 7px;
  pointer-events: none; white-space: nowrap;
}
.viz-empty { color: var(--muted); font-size: 0.88rem; }
