/* Gartenplaner – Design-System
   Farbe: Rittersporn-Blau als Handlungsfarbe, Blattgrün nur für „gut für die Natur“,
   Bernstein für „fällig“, Rot für „überfällig/invasiv“. Hell/Dunkel folgt dem System. */

:root {
  --bg: #F3F5F2;
  --surface: #FFFFFF;
  --surface-2: #E8ECE6;
  --line: #D3D9D1;
  --text: #18201B;
  --text-2: #4E5A52;
  --accent: #3A4BA8;
  --accent-soft: #E3E6F6;
  --on-accent: #FFFFFF;
  --leaf: #2C6A3E;
  --leaf-soft: #DDEEDF;
  --amber: #8F5300;
  --amber-soft: #FBEBD2;
  --red: #B3261E;
  --red-soft: #FBE1DE;
  --scrim: rgba(18, 24, 20, .38);
  --shadow: 0 1px 2px rgba(20, 30, 24, .06), 0 8px 24px rgba(20, 30, 24, .08);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 20px;
  --tabbar-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1311;
    --surface: #171C19;
    --surface-2: #222A25;
    --line: #2F3933;
    --text: #E4EAE5;
    --text-2: #A3AFA6;
    --accent: #A7B2F6;
    --accent-soft: #252B4A;
    --on-accent: #10153A;
    --leaf: #82C796;
    --leaf-soft: #1E3325;
    --amber: #EBAA55;
    --amber-soft: #3A2A12;
    --red: #F4897F;
    --red-soft: #3D1D1A;
    --scrim: rgba(0, 0, 0, .55);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

@media (prefers-contrast: more) {
  :root { --text-2: #2F3832; --line: #8C968F; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root { --text-2: #CBD3CD; --line: #6D7870; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.45 var(--font); /* 17 px */
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
img { max-width: 100%; display: block; }
/* iPhone/iPad: Textgröße folgt der Systemeinstellung (Dynamic Type) */
@supports (font: -apple-system-body) {
  html { font: -apple-system-body; }
  body { font-size: 1rem; font-family: var(--font); }
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.boot { padding: 2rem; color: var(--text-2); text-align: center; }
i.bot, .bot { font-style: italic; }
[hidden] { display: none !important; }

/* ---------- Gerüst ---------- */
.shell { min-height: 100dvh; }
.main {
  padding: calc(var(--safe-t) + 8px) calc(16px + var(--safe-r)) calc(var(--tabbar-h) + var(--safe-b) + 32px) calc(16px + var(--safe-l));
  max-width: 760px;
  margin: 0 auto;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 44px;
}
.topbar .actions { display: flex; gap: 4px; margin-left: auto; }
.large-title {
  font: 700 2.125rem/1.15 var(--font-display);
  letter-spacing: -.01em;
  margin: 4px 0 2px;
}
.subtitle { color: var(--text-2); margin: 0 0 20px; }

/* Tab-Leiste unten (iPhone) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding: 0 var(--safe-r) var(--safe-b) var(--safe-l);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid var(--line);
}
@media (prefers-reduced-transparency: reduce) { .tabbar { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; } }
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--text-2); text-decoration: none; font-size: .6875rem; font-weight: 500;
  min-height: 44px;
}
.tabbar a[aria-current="page"] { color: var(--accent); }
.tabbar svg { width: 26px; height: 26px; }

/* Seitenleiste ab Tablet-Breite */
@media (min-width: 900px) { .plan-canvas { height: min(75dvh, 760px) !important; } }
@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 240px 1fr; }
  .tabbar {
    position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 2px;
    padding: calc(var(--safe-t) + 24px) 12px 24px calc(12px + var(--safe-l));
    border-top: 0; border-right: 1px solid var(--line); background: var(--surface);
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .tabbar::before { content: "Gartenplaner"; font: 700 1.25rem var(--font-display); padding: 0 12px 16px; color: var(--text); }
  .tabbar a { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 12px; border-radius: var(--r-s); font-size: 1rem; color: var(--text); }
  .tabbar a svg { width: 22px; height: 22px; color: var(--text-2); }
  .tabbar a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
  .tabbar a[aria-current="page"] svg { color: var(--accent); }
  .main { padding-bottom: 48px; padding-top: calc(var(--safe-t) + 24px); }
}

/* ---------- Bausteine ---------- */
.icon { width: 22px; height: 22px; flex: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border-radius: var(--r-m);
  border: 0; background: var(--surface-2); color: var(--text); font-weight: 600; cursor: pointer;
  text-decoration: none;
}
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn.plain { background: transparent; color: var(--accent); padding: 0 8px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: transparent; color: var(--accent); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

.section { margin: 28px 0 0; }
.section > h2, .section-head h2 {
  font: 600 1.25rem/1.3 var(--font-display); margin: 0 0 8px;
}
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.section-head .btn.plain { min-height: 36px; }
.hint { color: var(--text-2); font-size: .9375rem; margin: 6px 0 0; }

/* Gruppierte Listen (iOS-„inset grouped“) */
.list {
  list-style: none; margin: 0; padding: 0;
  background: var(--surface); border-radius: var(--r-m); overflow: hidden;
}
.list > li + li { border-top: 1px solid var(--line); }
.row {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px;
  color: inherit; text-decoration: none; width: 100%; text-align: left; background: none; border: 0;
}
a.row:active, button.row:active { background: var(--surface-2); }
.row .grow { flex: 1; min-width: 0; }
.row .title { display: block; font-weight: 500; overflow-wrap: anywhere; }
.row .meta { display: block; color: var(--text-2); font-size: .9375rem; overflow-wrap: anywhere; }
.row .chev { color: var(--text-2); width: 18px; height: 18px; }
.thumb {
  width: 56px; height: 56px; border-radius: var(--r-s); flex: none; object-fit: cover;
  background: var(--surface-2); color: var(--text-2); display: grid; place-items: center;
}
.thumb svg { width: 26px; height: 26px; }
.empty {
  background: var(--surface); border-radius: var(--r-m); padding: 20px; color: var(--text-2);
}
.empty p { margin: 0 0 12px; }

/* Abzeichen */
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px;
  font-size: .8125rem; font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap;
}
.badge.leaf { background: var(--leaf-soft); color: var(--leaf); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }

/* Fällig-Kennzeichnung */
.due { font-size: .875rem; font-weight: 600; white-space: nowrap; color: var(--text-2); }
.due.over { color: var(--red); }
.due.now { color: var(--amber); }

/* Abhaken */
.check {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: transparent;
  display: grid; place-items: center; cursor: pointer; flex: none; color: transparent; padding: 0;
  position: relative;
}
.check::after { content: ""; position: absolute; inset: -8px; } /* größere Trefferfläche */
.check:hover { border-color: var(--accent); }
.check.done { background: var(--leaf); border-color: var(--leaf); color: var(--surface); }
.check svg { width: 18px; height: 18px; }

/* Suche und Filter */
.search {
  display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: var(--r-m);
  padding: 0 12px; min-height: 40px; color: var(--text-2);
}
.search input { border: 0; background: transparent; flex: 1; min-width: 0; padding: 8px 0; outline: none; color: var(--text); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-size: .9375rem; cursor: pointer;
}
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.group-label { display: flex; justify-content: space-between; color: var(--text-2); font-size: .9375rem; font-weight: 600; margin: 22px 4px 8px; }
.group-label .count { font-weight: 500; font-variant-numeric: tabular-nums; }

/* Formulare */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > span, .field legend { font-size: .9375rem; font-weight: 600; color: var(--text-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r-s);
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.field .help { font-size: .875rem; color: var(--text-2); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border-radius: var(--r-s); padding: 2px; gap: 2px; }
.segmented button { min-height: 36px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; font-size: .9375rem; }
.segmented button[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow); font-weight: 600; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.multi { display: flex; flex-wrap: wrap; gap: 8px; }
.multi label { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: .9375rem; }
.multi input { accent-color: var(--accent); }
.multi label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.form-error { color: var(--red); font-weight: 600; margin: 0; }

/* Bottom Sheet */
dialog.sheet {
  border: 0; padding: 0; margin: auto 0 0; width: 100%; max-width: 100%; max-height: 92dvh;
  background: var(--bg); color: var(--text); border-radius: var(--r-l) var(--r-l) 0 0;
  box-shadow: var(--shadow);
}
dialog.sheet::backdrop { background: var(--scrim); }
@media (min-width: 700px) {
  dialog.sheet { margin: auto; max-width: 560px; border-radius: var(--r-l); max-height: 86dvh; }
}
.sheet-inner { display: flex; flex-direction: column; max-height: inherit; }
.sheet-head {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  padding: 8px 8px 6px; border-bottom: 1px solid var(--line); position: relative;
}
.sheet-head::before { content: ""; position: absolute; top: 5px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: var(--line); }
.sheet-head h2 { margin: 6px 0 0; font-size: 1.0625rem; font-weight: 600; text-align: center; }
.sheet-head .left { justify-self: start; }
.sheet-head .right { justify-self: end; }
.sheet-body { overflow-y: auto; padding: 16px 16px calc(24px + var(--safe-b)); -webkit-overflow-scrolling: touch; }
@media (prefers-reduced-motion: no-preference) {
  dialog.sheet[open] { animation: sheet-in .28s cubic-bezier(.2, .8, .2, 1); }
  @keyframes sheet-in { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
}

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: var(--r-m); z-index: 50;
  box-shadow: var(--shadow); font-weight: 500; max-width: calc(100% - 32px); display: flex; gap: 12px; align-items: center;
}
.toast button { background: none; border: 0; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; min-height: 32px; }
@media (min-width: 900px) { .toast { bottom: 24px; } }

/* Hinweisband */
.banner {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r-m);
  background: var(--accent-soft); color: var(--text); margin: 0 0 16px;
}
.banner.offline { background: var(--amber-soft); }
.banner p { margin: 0; }
.banner .icon { color: var(--accent); margin-top: 2px; }

/* ---------- Heute: Phänologische Uhr ---------- */
.clock-wrap { display: grid; justify-items: center; margin: 0 0 8px; }
.clock { width: min(100%, 340px); height: auto; overflow: visible; }
.clock .month-label { font: 600 11px var(--font); fill: var(--text-2); }
.clock .month-label.now { fill: var(--text); }
.clock .center-season { font: 700 22px var(--font-display); fill: var(--text); }
.clock .center-sign { font: 500 13px var(--font); fill: var(--text-2); }
.clock .center-date { font: 600 13px var(--font); fill: var(--text-2); }
.clock .bar { fill: var(--accent); opacity: .85; }
.clock .bar.done { fill: var(--leaf); }
.clock .track { fill: none; stroke: var(--surface-2); }
.clock .needle { stroke: var(--text); stroke-width: 2; stroke-linecap: round; }
.clock .needle-dot { fill: var(--text); }
.clock a { cursor: pointer; }
.clock-legend { display: flex; gap: 16px; justify-content: center; color: var(--text-2); font-size: .8125rem; margin-top: 4px; flex-wrap: wrap; }
.clock-legend span { display: inline-flex; align-items: center; gap: 6px; }
.clock-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.clock-legend .p { background: var(--accent); }
.clock-legend .d { background: var(--leaf); }
.clock-legend .s { background: linear-gradient(90deg, #A9CB7C, #2F7A3F, #C2702E, #8A9AA8); }

/* Pool-Kennzahlen */
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: var(--r-m); overflow: hidden; }
.metric { background: var(--surface); padding: 12px 14px; }
.metric b { display: block; font: 700 1.5rem/1.2 var(--font-display); }
.metric small { color: var(--text-2); font-size: .8125rem; }
.metric.ok b { color: var(--leaf); }
.metric.off b { color: var(--red); }
.chart { width: 100%; height: auto; background: var(--surface); border-radius: var(--r-m); }
.chart .band { fill: var(--leaf-soft); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .pt { fill: var(--accent); }
.chart .axis { font: 500 11px var(--font); fill: var(--text-2); }

/* ---------- Objekt ---------- */
.hero { margin: 4px 0 16px; border-radius: var(--r-l); overflow: hidden; background: var(--surface-2); aspect-ratio: 4 / 3; display: grid; place-items: center; color: var(--text-2); }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero svg { width: 64px; height: 64px; opacity: .6; }
.obj-title { font: 700 1.75rem/1.2 var(--font-display); margin: 0; overflow-wrap: anywhere; }
.obj-sub { color: var(--text-2); margin: 4px 0 0; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 0; }
.quick .btn { flex-direction: column; min-height: 64px; gap: 4px; font-size: .875rem; background: var(--surface); color: var(--accent); }
.quick .btn.primary { background: var(--accent); color: var(--on-accent); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline .year { font: 700 1.125rem var(--font-display); margin: 18px 0 8px; color: var(--text); }
.timeline .year:first-child { margin-top: 0; }
.entry { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.entry .when { color: var(--text-2); font-size: .875rem; font-variant-numeric: tabular-nums; padding-top: 2px; }
.entry .what { font-weight: 600; }
.entry p { margin: 2px 0 0; color: var(--text-2); font-size: .9375rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.entry .eff { font-size: .8125rem; font-weight: 700; }
.entry .eff.yes { color: var(--leaf); }
.entry .eff.no { color: var(--red); }
.entry button.link { background: none; border: 0; padding: 0; color: inherit; text-align: left; cursor: pointer; width: 100%; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 4px; }
.photo-grid button { padding: 0; border: 0; background: var(--surface-2); aspect-ratio: 1; border-radius: 6px; overflow: hidden; cursor: pointer; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; background: var(--surface); border-radius: var(--r-m); padding: 14px; }
.facts dt { color: var(--text-2); font-size: .9375rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.prose { background: var(--surface); border-radius: var(--r-m); padding: 14px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.prose + .prose { margin-top: 8px; }
.prose strong { display: block; font-size: .9375rem; color: var(--text-2); margin-bottom: 2px; }

/* Blühkalender-Streifen */
.bloom { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; margin: 4px 0 0; }
.bloom span { height: 22px; border-radius: 4px; background: var(--surface-2); font-size: .6875rem; display: grid; place-items: center; color: var(--text-2); }
.bloom span.on { background: var(--bloom, var(--accent)); color: #fff; font-weight: 700; }

/* Insektenwert */
.dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); display: inline-block; }
.dots i.on { background: var(--leaf); }

/* Foto-Ansicht */
dialog.viewer { border: 0; padding: 0; background: #000; color: #fff; width: 100%; height: 100%; max-width: 100%; max-height: 100%; }
dialog.viewer::backdrop { background: #000; }
.viewer-inner { display: grid; grid-template-rows: auto 1fr auto; height: 100%; padding: var(--safe-t) var(--safe-r) var(--safe-b) var(--safe-l); }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; }
.viewer-bar .icon-btn { color: #fff; }
.viewer img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.viewer figcaption { padding: 12px 16px; color: #ddd; }

/* ---------- Kalender ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; }
.cal-head h2 { font: 600 1.25rem var(--font-display); margin: 0; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; background: var(--surface); border-radius: var(--r-m); padding: 8px; }
.cal .dow { text-align: center; font-size: .75rem; color: var(--text-2); font-weight: 600; padding: 4px 0; }
.cal button {
  aspect-ratio: 1 / 1.05; border: 0; background: transparent; border-radius: var(--r-s); cursor: pointer;
  display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 4px 0; min-height: 44px; font-variant-numeric: tabular-nums;
}
.cal button.other { color: var(--text-2); opacity: .5; }
.cal button.today span:first-child { background: var(--accent); color: var(--on-accent); border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; font-weight: 700; }
.cal button[aria-pressed="true"] { background: var(--accent-soft); }
.cal .marks { display: flex; gap: 3px; height: 6px; }
.cal .marks i { width: 6px; height: 6px; border-radius: 50%; }
.cal .marks .p { background: var(--accent); }
.cal .marks .d { background: var(--leaf); }

/* ---------- Anmeldung ---------- */
.auth { max-width: 420px; margin: 0 auto; padding: calc(var(--safe-t) + 48px) 20px 48px; }
.auth .logo { width: 72px; height: 72px; border-radius: 18px; margin: 0 0 20px; }
.auth h1 { font: 700 2rem/1.15 var(--font-display); margin: 0 0 8px; }
.auth p.lead { color: var(--text-2); margin: 0 0 24px; }
.code { font: 600 1.125rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; background: var(--surface-2); padding: 10px 12px; border-radius: var(--r-s); overflow-wrap: anywhere; user-select: all; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Zeile mit Abhak-Knopf: innerer Knopf ohne zweiten Innenabstand */
.row .row { padding: 0; min-height: 44px; }

/* ---------- Wetter ---------- */
.weather { background: var(--surface); border-radius: var(--r-m); padding: 14px; display: grid; gap: 14px; }
.weather-now { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: baseline; }
.weather-now b { font: 700 2.5rem/1 var(--font-display); grid-row: span 2; }
.weather-now span { font-weight: 600; }
.weather-now small { color: var(--text-2); font-size: .875rem; }
.weather-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; text-align: center; }
.weather-days li { display: grid; gap: 2px; font-variant-numeric: tabular-nums; }
.weather-days .dow { font-size: .8125rem; color: var(--text-2); font-weight: 600; }
.weather-days .t { font-weight: 600; }
.weather-days .tmin { color: var(--text-2); font-size: .9375rem; }
.weather-days .tmin.frost { color: var(--accent); font-weight: 700; }
.weather-days .rain { color: var(--text-2); font-size: .75rem; }
.hint.small { font-size: .75rem; }
.row.reco > .icon { color: var(--leaf); }
.row.reco.amber > .icon { color: var(--amber); }
.row.reco.red > .icon { color: var(--red); }
.row.reco.red .title { color: var(--red); }

/* Blühkalender */
.bloom-table { width: 100%; border-collapse: separate; border-spacing: 2px; background: var(--surface); border-radius: var(--r-m); padding: 8px; font-size: .875rem; }
.bloom-table th { font-weight: 600; color: var(--text-2); font-size: .75rem; }
.bloom-table th[scope=row] { text-align: left; color: var(--text); font-size: .875rem; font-weight: 500; max-width: 9rem; overflow-wrap: anywhere; padding-right: 6px; }
.bloom-table td { height: 26px; border-radius: 4px; background: var(--surface-2); }
.bloom-table td.on { background: var(--bloom, var(--accent)); }
.bloom-table tfoot td { background: transparent; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.bloom-table tfoot td.gap { color: var(--red); background: var(--red-soft); }
.bloom-wrap { overflow-x: auto; }

/* Projekte */
.progress { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.progress i { display: block; height: 100%; background: var(--leaf); width: var(--p, 0%); }
.progress.over i { background: var(--red); }
.sum-row { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.tips { display: grid; gap: 12px; }
.tip { background: var(--surface); border-radius: var(--r-m); padding: 14px; }
.tip h3 { margin: 0 0 4px; font: 600 1.0625rem var(--font-display); display: flex; gap: 8px; align-items: center; }
.tip p { margin: 4px 0 0; color: var(--text-2); }
.tip .btn-row { margin-top: 10px; }
.tip.now { outline: 2px solid var(--leaf); }

/* Gartenplan */
.plan-shell { position: relative; }
.plan-toolbar { display: flex; gap: 6px; align-items: center; margin: 0 0 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.plan-toolbar::-webkit-scrollbar { display: none; }
.plan-toolbar .chip { flex: none; }
.plan-toolbar .chip { display: inline-flex; align-items: center; gap: 6px; }
.plan-toolbar .chip svg { width: 18px; height: 18px; }
.plan-canvas { background: var(--surface); border-radius: var(--r-m); overflow: hidden; touch-action: none; height: max(320px, calc(100dvh - var(--tabbar-h) - var(--safe-b) - 290px)); user-select: none; -webkit-user-select: none; }
.plan-canvas svg { width: 100%; height: 100%; display: block; }
.plan-canvas .area { stroke-width: 2; vector-effect: non-scaling-stroke; fill-opacity: .35; }
.plan-canvas .line { fill: none; stroke-width: 3; vector-effect: non-scaling-stroke; }
.plan-canvas .plant { fill-opacity: .55; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.plan-canvas .sel { stroke: var(--accent) !important; stroke-width: 3; stroke-dasharray: 6 4; }
.plan-canvas text { font-family: var(--font); fill: var(--text); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.plan-canvas .draft { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 4 3; }
.plan-canvas .handle { fill: var(--surface); stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.plan-status { color: var(--text-2); font-size: .875rem; min-height: 1.4em; margin: 6px 2px 0; }
