/* Everstay PoC – Olivgrün und Gold, ruhig und warm */

:root {
  --oliv-dunkel: #2e3822;
  --oliv: #3d4a2c;
  --oliv-mittel: #5b6b40;
  --oliv-hell: #e7ead9;
  --gold: #c9a85c;
  --gold-hell: #f3e8c8;
  --gold-dunkel: #8f7235;
  --papier: #f8f5ec;
  --flaeche: #fffdf7;
  --text: #2a2a22;
  --text-leise: #6d6c5f;
  --linie: #e4dfcf;
  --rot: #9c3b2e;
  --radius: 18px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--papier);
  color: var(--text);
  font: 16px/1.55 var(--sans);
}
a { color: var(--oliv-mittel); }
h1, h2 { font-family: var(--serif); font-weight: 600; color: var(--oliv); }
h1 { font-size: 1.9rem; margin: .2em 0 .3em; }
h2 { font-size: 1.25rem; margin: 0 0 .5em; }
code { background: var(--oliv-hell); padding: 1px 5px; border-radius: 4px; }
.versteckt { position: absolute; left: -9999px; }

/* ---------- Kopf */
.kopf {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px;
  background: var(--oliv);
  color: var(--gold-hell);
  border-bottom: 2px solid var(--gold);
}
.marke { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.marke-name { font-family: var(--serif); font-size: 1.35rem; letter-spacing: .03em; color: var(--gold-hell); }
.navi { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.navi a, .navi .link-knopf {
  color: var(--gold-hell); text-decoration: none; padding: 6px 10px; border-radius: 999px; font-size: .92rem;
}
.navi a.aktiv { background: rgba(201, 168, 92, .22); color: #fff; }
.navi form { margin: 0; }
.demo-hinweis {
  text-align: center; font-size: .78rem; color: var(--gold-dunkel);
  background: var(--gold-hell); padding: 4px 12px;
}

/* ---------- Knöpfe */
.knopf {
  background: var(--oliv); color: var(--gold-hell); border: 0; border-radius: 999px;
  padding: 11px 22px; font: inherit; font-weight: 600; cursor: pointer;
}
.knopf:hover { background: var(--oliv-dunkel); }
.knopf.klein { padding: 6px 14px; font-size: .9rem; }
.link-knopf { background: none; border: 0; font: inherit; color: var(--oliv-mittel); cursor: pointer; padding: 0; }
.link-knopf:hover { text-decoration: underline; }
.link-knopf.gefahr { color: var(--rot); }

/* ---------- Login */
.login-seite { background: radial-gradient(circle at 50% 20%, #4b5a36 0, var(--oliv) 45%, var(--oliv-dunkel) 100%); min-height: 100vh; }
.login { max-width: 360px; margin: 0 auto; padding: 12vh 20px 40px; text-align: center; color: var(--gold-hell); }
.login-name { color: var(--gold-hell); font-size: 2.6rem; margin: 12px 0 0; letter-spacing: .04em; }
.claim { font-family: var(--serif); font-style: italic; color: var(--gold); margin: 0 0 32px; font-size: 1.15rem; }
.login-form { display: grid; gap: 14px; text-align: left; background: rgba(255,253,247,.06); border: 1px solid rgba(201,168,92,.35); border-radius: var(--radius); padding: 22px; }
.login-form label { display: grid; gap: 6px; font-size: .9rem; color: var(--gold-hell); }
.login-form input {
  font: inherit; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--gold-dunkel);
  background: var(--flaeche); color: var(--text);
}
.login-form .knopf { background: var(--gold); color: var(--oliv-dunkel); margin-top: 6px; }
.login-form .knopf:hover { background: #d8b86c; }
.login-fuss { font-size: .8rem; opacity: .7; margin-top: 24px; }
.fehler { color: #ffd9d2; background: rgba(156,59,46,.45); padding: 8px 12px; border-radius: 10px; margin: 0; }

/* ---------- Gespräch */
.gespraech-seite { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.gespraech { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 8px 16px 120px; }
.sitzung-titel { display: flex; align-items: center; gap: 12px; margin: 26px 0 14px; color: var(--gold-dunkel); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.sitzung-titel::before, .sitzung-titel::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }

.nachricht { display: flex; flex-direction: column; margin: 10px 0; }
.nachricht .blase { max-width: 85%; padding: 10px 15px; border-radius: var(--radius); overflow-wrap: anywhere; }
.nachricht .blase p { margin: 0 0 .6em; }
.nachricht .blase p:last-child { margin-bottom: 0; }
.nachricht.nutzer { align-items: flex-end; }
.nachricht.nutzer .blase { background: var(--oliv); color: #fbf8ee; border-bottom-right-radius: 6px; }
.nachricht.everstay { align-items: flex-start; }
.nachricht.everstay .blase { background: var(--flaeche); border: 1px solid var(--linie); border-bottom-left-radius: 6px; box-shadow: 0 1px 2px rgba(61,74,44,.06); }
.nachricht .blase.streamt { white-space: pre-wrap; }
.meta { font-size: .72rem; color: var(--text-leise); margin: 3px 6px 0; }
.nachricht.hervorgehoben .blase { outline: 3px solid var(--gold); outline-offset: 2px; transition: outline-color 1.5s; }

.denkt-hinweis { color: var(--text-leise); font-style: italic; font-size: .92rem; }
.tippt { display: inline-flex; gap: 4px; padding: 4px 0; }
.tippt i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: tippt 1.2s infinite ease-in-out; }
.tippt i:nth-child(2) { animation-delay: .15s; }
.tippt i:nth-child(3) { animation-delay: .3s; }
@keyframes tippt { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.fehler-box { color: var(--rot); font-size: .92rem; }
.fehler-box button { margin-left: 8px; }

/* Quellen unter Everstay-Antworten */
.quellen { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 4px 0; }
.quelle {
  display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; text-decoration: none;
  color: var(--gold-dunkel); background: var(--gold-hell); border: 1px solid #e6d3a0; padding: 3px 10px; border-radius: 999px;
}
.quelle:hover { background: #efdcaa; }

/* „Gemerkt“ unter Nutzer-Nachrichten */
.gemerkt-liste { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-top: 5px; max-width: 85%; }
.gemerkt {
  display: flex; align-items: baseline; gap: 6px; font-size: .78rem; color: var(--oliv-mittel);
  background: var(--oliv-hell); border-radius: 10px; padding: 3px 4px 3px 10px; animation: auftauchen .5s ease-out;
}
.gemerkt.deutung { background: #f1ece0; color: var(--gold-dunkel); font-style: italic; }
.gemerkt.abgeloest { opacity: .55; text-decoration: line-through; }
.gemerkt-label { font-weight: 600; white-space: nowrap; }
.gemerkt-weg { border: 0; background: none; color: inherit; cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 6px; opacity: .6; }
.gemerkt-weg:hover { opacity: 1; }
@keyframes auftauchen { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Einwilligung zum Gedächtnis */
.zustimmung {
  margin: 14px 0; padding: 14px 18px; border-radius: var(--radius);
  background: var(--gold-hell); border: 1px solid #e6d3a0; animation: auftauchen .5s ease-out;
}
.zustimmung p { margin: 0 0 .5em; }
.zustimmung-titel { font-family: var(--serif); font-size: 1.12rem; color: var(--oliv); font-weight: 600; }
.zustimmung-knoepfe { display: flex; gap: 16px; align-items: center; margin-top: 10px; }
.zustimmung-ok { margin: 12px 4px; font-size: .88rem; color: var(--oliv-mittel); font-style: italic; }
.schalter {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; padding: 10px 16px; font-size: .9rem;
}

/* Eingabe */
.eingabe {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; gap: 8px; align-items: flex-end;
  max-width: 760px; margin: 0 auto; padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--papier) 70%, rgba(248,245,236,0));
}
.eingabe textarea {
  flex: 1; resize: none; font: inherit; line-height: 1.4; max-height: 40vh;
  padding: 12px 16px; border-radius: 22px; border: 1px solid var(--linie); background: var(--flaeche);
  box-shadow: 0 2px 10px rgba(61,74,44,.08);
}
.eingabe textarea:focus { outline: 2px solid var(--gold); border-color: transparent; }
.senden {
  flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--oliv); color: var(--gold-hell); display: grid; place-items: center;
}
.eingabe.beschaeftigt .senden { opacity: .45; cursor: default; }

/* ---------- Seiten (Erinnerungen, Admin) */
.seite { max-width: 760px; margin: 0 auto; padding: 16px 16px 60px; }
.einleitung { color: var(--text-leise); margin-top: 0; }
.filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0; }
.filter a {
  text-decoration: none; font-size: .85rem; color: var(--oliv); border: 1px solid var(--linie);
  background: var(--flaeche); padding: 5px 12px; border-radius: 999px;
}
.filter a span { color: var(--text-leise); margin-left: 3px; }
.filter a.aktiv { background: var(--oliv); color: var(--gold-hell); border-color: var(--oliv); }
.filter a.aktiv span { color: var(--gold); }
.karten { display: grid; gap: 10px; }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; padding: 12px 16px; }
.karte.deutung { background: #fbf6ea; border-style: dashed; border-color: var(--gold); }
.karte.abgeloest { opacity: .7; }
.karte.abgeloest .karte-text { text-decoration: line-through; text-decoration-color: rgba(0,0,0,.3); }
.karte-kopf { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.art { font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--oliv-mittel); }
.art-reflection { color: var(--gold-dunkel); }
.abzeichen { font-size: .72rem; background: var(--gold-hell); color: var(--gold-dunkel); padding: 1px 8px; border-radius: 999px; }
.karte-text { margin: 6px 0; font-size: 1.02rem; }
.karte-original, .deutung-hinweis { margin: 4px 0; font-size: .82rem; color: var(--text-leise); font-style: italic; }
.karte-fuss { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .8rem; margin-top: 6px; }
.karte-fuss a { color: var(--text-leise); }
.aktionen { display: flex; gap: 14px; align-items: center; }
.karte textarea { width: 100%; font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--linie); margin-top: 8px; }
.abgeloest-bereich { margin-top: 28px; }
.abgeloest-bereich summary { cursor: pointer; color: var(--oliv-mittel); font-weight: 600; }
.leer { color: var(--text-leise); font-style: italic; }

.vorfuehr-leiste {
  display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--oliv-mittel); color: #fff; font-size: .85rem; padding: 6px 12px;
}
.vorfuehr-leiste form { margin: 0; }
.vorfuehr-leiste .link-knopf { color: var(--gold-hell); font-weight: 600; text-decoration: underline; }
.vorfuehr-schritte { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-bottom: 12px; }
.vorfuehr-schritte h3 { font-family: var(--serif); color: var(--oliv); margin: 0 0 4px; font-size: 1.05rem; }
.vorfuehr-schritte p { margin: 0 0 10px; font-size: .9rem; color: var(--text-leise); }
.vorfuehr-schritte form { display: inline-block; margin: 0 6px 6px 0; }
.tabelle .aktionen form { margin: 0; }
.admin-block { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; padding: 16px; margin: 14px 0; }
.zeile { display: flex; gap: 8px; margin-bottom: 12px; }
.zeile input { flex: 1; font: inherit; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--linie); }
.meldung { background: var(--gold-hell); border: 1px solid var(--gold); padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.tabelle { width: 100%; border-collapse: collapse; font-size: .85rem; }
.tabelle th, .tabelle td { text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--linie); }

@media (max-width: 520px) {
  .marke-name { display: none; }
  .nachricht .blase, .gemerkt-liste { max-width: 92%; }
  h1 { font-size: 1.6rem; }
}
