/* AILY-Begleiter – gemeinsames Aussehen. Dunkelgrün und Blau bestimmen. */
:root {
  --gruen: #0b4f2e;
  --gruen-hell: #2f8a57;
  --gruen-zart: #e3f1e8;
  --blau: #1d5aa3;
  --blau-hell: #4f8bd6;
  --blau-zart: #e4edf8;
  --grund: #f3f6f4;
  --flaeche: #ffffff;
  --text: #13261c;
  --leise: #5b6b62;
  --linie: #d5dfd9;
  --warn: #b5501b;
  --fehler: #b3261e;
  --verlauf: linear-gradient(135deg, var(--gruen) 0%, #134e5a 50%, var(--blau) 100%);
  --rund: 14px;
  --schatten: 0 1px 2px rgba(11, 79, 46, .08), 0 4px 16px rgba(11, 79, 46, .08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --grund: #0c1712; --flaeche: #13231b; --text: #e6efe9; --leise: #9db1a5; --linie: #24382d;
    --gruen-zart: #173826; --blau-zart: #172b44; color-scheme: dark;
  }
  :root:not([data-theme="light"]) .kachel b, :root:not([data-theme="light"]) .tag-titel,
  :root:not([data-theme="light"]) h2, :root:not([data-theme="light"]) .marke { color: #8fe0a8; }
  :root:not([data-theme="light"]) .kachel:nth-child(2n) b, :root:not([data-theme="light"]) .termin .zeit,
  :root:not([data-theme="light"]) .marke.blau, :root:not([data-theme="light"]) a,
  :root:not([data-theme="light"]) button.leise { color: #9cc3f5; }
  :root:not([data-theme="light"]) .tafel h2 { color: #0b4f2e; }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--grund); color: var(--text); line-height: 1.45; font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--blau); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
button, input, select, textarea { font: inherit; color: inherit; }
button {
  border: 0; border-radius: 10px; padding: .6em 1em; cursor: pointer; background: var(--gruen); color: #fff;
  font-weight: 600; min-height: 44px; transition: filter .15s, transform .05s;
}
button:hover { filter: brightness(1.12); }
button:active { transform: scale(.98); }
button:disabled { opacity: .45; cursor: default; }
button.zweit { background: var(--blau); }
button.leise { background: transparent; color: var(--blau); border: 1px solid var(--linie); }
button.gefahr { background: transparent; color: var(--fehler); border: 1px solid var(--linie); }
button.klein { min-height: 32px; padding: .3em .7em; font-size: .9rem; }
button.miro { background: #ffd02f; color: #050038; }
input, select, textarea {
  width: 100%; padding: .65em .75em; border: 1px solid var(--linie); border-radius: 10px; background: var(--flaeche);
  min-height: 44px;
}
textarea { min-height: 6em; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid var(--blau-hell); outline-offset: 1px; }
label { display: block; font-weight: 600; margin: .8em 0 .3em; }
.leise { color: var(--leise); }
.klein { font-size: .88rem; }
.karte {
  background: var(--flaeche); border-radius: var(--rund); padding: 16px; box-shadow: var(--schatten); margin-bottom: 14px;
  border: 1px solid var(--linie);
}
.reihe { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.reihe > * { flex: 0 0 auto; }
.reihe .wachsen { flex: 1 1 180px; }
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.hinweis { padding: .7em 1em; border-radius: 10px; background: var(--blau-zart); margin: .6em 0; }
.hinweis.gut { background: var(--gruen-zart); }
.hinweis.warn { background: #fbe9dc; color: #6b2c0b; }
.marke { display: inline-block; padding: .1em .55em; border-radius: 99px; font-size: .8rem; font-weight: 600;
  background: var(--gruen-zart); color: var(--gruen); }
.marke.blau { background: var(--blau-zart); color: var(--blau); }
.marke.warn { background: #fbe9dc; color: var(--warn); }
.marke.fehler { background: #f9dedc; color: var(--fehler); }
.versteckt { display: none !important; }
pre.text { white-space: pre-wrap; font-family: inherit; margin: 0; }

/* Kopf */
.kopf { background: var(--verlauf); color: #fff; padding: 18px 16px 22px; }
.kopf h1 { font-size: 1.35rem; margin: 0; }
.kopf .unter { opacity: .85; font-size: .9rem; }
.kopf a { color: #fff; }
.inhalt { max-width: 760px; margin: -12px auto 0; padding: 0 16px 40px; }

/* Kachelmenü */
.kacheln { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .kacheln { grid-template-columns: repeat(3, 1fr); } }
.kachel {
  display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--rund); background: var(--flaeche);
  border: 1px solid var(--linie); box-shadow: var(--schatten); text-decoration: none; color: var(--text); min-height: 92px;
}
.kachel .sym { font-size: 1.6rem; line-height: 1; }
.kachel b { color: var(--gruen); }
.kachel:nth-child(2n) b { color: var(--blau); }
.kachel .live { margin-left: auto; }
.zurueck { display: inline-flex; align-items: center; gap: 6px; color: #fff; text-decoration: none; font-weight: 600;
  margin-bottom: 6px; opacity: .9; }

/* Auswahlknöpfe */
.wahl { display: grid; gap: 8px; }
.wahl button { background: var(--flaeche); color: var(--text); border: 2px solid var(--linie); text-align: left; font-weight: 500; }
.wahl button.an { border-color: var(--gruen); background: var(--gruen-zart); font-weight: 700; }
.skala5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.skala5 button { background: var(--flaeche); color: var(--text); border: 2px solid var(--linie); padding: .5em 0; }
.skala5 button.an { background: var(--blau); color: #fff; border-color: var(--blau); }
.farbwahl { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.farbwahl button { aspect-ratio: 1; min-height: 0; border: 3px solid var(--linie); padding: 0; }
.farbwahl button.an { border-color: var(--text); box-shadow: 0 0 0 3px var(--blau-hell); }

/* Balken */
.balken { display: grid; gap: 10px; }
.balken .zeile { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 10px; align-items: center; }
.balken .spur { height: 26px; background: var(--gruen-zart); border-radius: 8px; overflow: hidden; }
.balken .voll { height: 100%; background: var(--verlauf); border-radius: 8px; transition: width .5s; min-width: 2px; }
.balken .zahl { font-weight: 700; min-width: 2ch; text-align: right; }

/* Wortwolke */
.wolke { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .1em .9em; padding: .5em; }
.wolke span { font-weight: 700; line-height: 1.1; transition: font-size .4s; }

/* Säulen (Skala) */
.saeulen { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; align-items: end; height: 180px; }
.saeulen .s { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.saeulen .s i { display: block; width: 100%; background: var(--verlauf); border-radius: 8px 8px 0 0; transition: height .5s; min-height: 2px; }
.saeulen .s b { font-size: 1.1rem; }

/* Fotos */
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.galerie img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; background: var(--linie); }
.vorschau { display: flex; gap: 6px; flex-wrap: wrap; margin: .5em 0; }
.vorschau img { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; }

/* Zeitplan */
.tag-titel { margin: 1em 0 .4em; color: var(--gruen); }
.termin { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--linie); }
.termin .zeit { font-weight: 700; color: var(--blau); font-variant-numeric: tabular-nums; }
.termin.jetzt { background: var(--gruen-zart); border-radius: 10px; padding: 10px; border-top-color: transparent; }

.n8n-kette { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.n8n-kette .k { background: var(--blau-zart); border: 1px solid var(--blau-hell); padding: .25em .6em; border-radius: 8px; font-size: .9rem; }
.md p { margin: .4em 0; }
.md ul { margin: .3em 0; padding-left: 1.3em; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--text); color: var(--flaeche);
  padding: .7em 1.1em; border-radius: 10px; z-index: 50; max-width: calc(100% - 32px); box-shadow: var(--schatten); }
