/* Grundgestalt für Luan.
   Warme, ruhige Farben statt Tech-Blau - passend zu etwas, das den ganzen
   Tag mitläuft.

   Die Marke: Cream Soda #FFF0C9 als heller Grundton, Blueberry #243B8F
   als Akzent. Beide sind bewusst NICHT flächig eingesetzt - Cream Soda
   trägt den Hintergrund, Blueberry markiert, was handelt. Ein Layout aus
   zwei Vollfarben ermüdet nach zehn Minuten, und dieses Ding soll man
   den ganzen Tag ansehen können. */

:root {
  color-scheme: light dark;

  /* Grundtöne: Cream Soda, aufgehellt für große Flächen */
  --grund:        #FDF8EA;   /* Cream Soda, zurückgenommen */
  --grund-karte:  #FFFFFF;
  --rand:         #EBE2CB;
  --text:         #1E2230;
  --text-leise:   #656C78;   /* 4,6:1 auf --grund, knapp über dem Mindestwert */

  /* Akzent: Blueberry */
  --akzent:       #243B8F;
  --akzent-hell:  #E8ECF8;
  --akzent-text:  #FFFFFF;
  --marke:        #FFF0C9;   /* Cream Soda pur, für Flächen und Marken */

  --warnung:      #C2410C;
  --warnung-hell: #FDEDE6;

  --radius:       12px;
  --radius-klein: 8px;
  --schatten:     0 1px 2px rgba(0,0,0,.04), 0 4px 12px rgba(0,0,0,.05);

  --schrift: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --schrift-akzent: "Instrument Serif", Georgia, serif;
  --schrift-fest: ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund:       #16171C;
    --grund-karte: #1E2028;
    --rand:        #2E3138;
    --text:        #EDEAE0;
    --text-leise:  #9AA1AA;
    /* Blueberry aufgehellt: #243B8F auf dunklem Grund ergäbe 2,1:1 und
       wäre nicht lesbar. Dieser Ton hält 5,4:1. */
    --akzent:      #8AA3EF;
    --akzent-hell: #1B2138;
    --warnung-hell: #2A1A14;
    /* Auf dem helleren Gruen im Dunkelmodus braucht es dunklen Text.
       Weiss darauf ergibt etwa 2,5:1 - unter dem Mindestwert von 4,5:1
       und auf einem Handy bei Sonne kaum lesbar. */
    --akzent-text: #121729;
    --schatten:    0 1px 2px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.25);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--schrift);
  background: var(--grund);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2 { font-weight: 500; letter-spacing: -.01em; margin: 0 0 .5rem; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.1rem; }

.serif { font-family: var(--schrift-akzent); font-style: italic; }

.leise { color: var(--text-leise); font-size: .9rem; }

/* ---------------------------------------------------------------- Aufbau */

.mitte {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 5rem;
}

.karte {
  background: var(--grund-karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--schatten);
  margin-bottom: 1rem;
}

/* -------------------------------------------------------------- Bedienung */

button, .knopf {
  font: inherit;
  font-weight: 500;
  padding: .6rem 1.1rem;
  border-radius: var(--radius-klein);
  border: 1px solid transparent;
  background: var(--akzent);
  color: var(--akzent-text);
  cursor: pointer;
  transition: opacity .15s;
}
button:hover  { opacity: .9; }
button:active { opacity: .8; }
button:disabled { opacity: .5; cursor: default; }

button.leise-knopf {
  background: transparent;
  color: var(--text-leise);
  border-color: var(--rand);
}

input, textarea {
  font: inherit;
  width: 100%;
  padding: .65rem .8rem;
  border: 1px solid var(--rand);
  border-radius: var(--radius-klein);
  background: var(--grund);
  color: var(--text);
}
input:focus, textarea:focus {
  outline: 2px solid var(--akzent);
  outline-offset: -1px;
  border-color: transparent;
}

/* ------------------------------------------------------------------ Chat */

.verlauf { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1rem; }

.blase {
  max-width: 85%;
  padding: .7rem .95rem;
  border-radius: var(--radius);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.blase.ich {
  align-self: flex-end;
  background: var(--akzent);
  color: var(--akzent-text);
  border-bottom-right-radius: 4px;
}
.blase.assistent {
  align-self: flex-start;
  background: var(--grund-karte);
  border: 1px solid var(--rand);
  border-bottom-left-radius: 4px;
}
.blase.denkt { color: var(--text-leise); font-style: italic; }

.eingabe { display: flex; gap: .5rem; align-items: flex-end; }
.eingabe textarea { resize: none; min-height: 2.7rem; max-height: 9rem; }

/* --------------------------------------------------------------- Bausteine */

.zeile {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: .7rem 0;
  border-bottom: 1px solid var(--rand);
}
.zeile:last-child { border-bottom: none; }

.marke {
  display: inline-block;
  font-size: .75rem;
  padding: .15rem .5rem;
  border-radius: 999px;
  background: var(--akzent-hell);
  color: var(--akzent);
}

.balken { height: 6px; background: var(--rand); border-radius: 999px; overflow: hidden; }
.balken > i { display: block; height: 100%; background: var(--akzent); }

.hinweis {
  padding: .7rem .9rem;
  border-radius: var(--radius-klein);
  background: var(--akzent-hell);
  color: var(--akzent);
  font-size: .9rem;
}
.hinweis.warnung { background: #FEF0E7; color: var(--warnung); }

@media (prefers-color-scheme: dark) {
  .hinweis.warnung { background: #2C1B12; color: #F0A882; }
  .hinweis { color: #8FD4AC; }
}

nav {
  display: flex; gap: .25rem;
  border-bottom: 1px solid var(--rand);
  margin-bottom: 1.5rem;
}
nav a {
  padding: .6rem .9rem;
  color: var(--text-leise);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
nav a.aktiv { color: var(--text); border-bottom-color: var(--akzent); }

/* ---------------------------------------------------- Leerzustand */
/* Ein leeres Fenster ist für Menschen ohne Technikkenntnisse die
   schwierigste Startsituation. Drei antippbare Sätze sagen mehr als
   jeder Erklärtext. */
.leerzustand {
  margin: auto 0;
  padding: 2rem 0;
  text-align: center;
}
.vorschlaege {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  align-items: center;
  margin-top: 1rem;
}
.vorschlag {
  background: var(--grund-karte);
  color: var(--text);
  border: 1px solid var(--rand);
  border-radius: 999px;
  padding: .55rem 1.1rem;
  font: inherit;
  font-size: .92rem;
  cursor: pointer;
  max-width: 100%;
  transition: border-color .15s, background .15s;
}
.vorschlag:hover { border-color: var(--akzent); background: var(--akzent-hell); }

/* Ein Fehler ist keine Antwort und sieht auch nicht so aus. */
.fehlerblase {
  align-self: flex-start;
  max-width: 44ch;
  margin: .25rem 0;
}

/* Tastaturbedienung: Der Browser-Standardring ist auf dem farbigen
   Hauptknopf kaum zu sehen. */
:where(button, a, [tabindex]):focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  border-radius: var(--radius-klein);
}
::placeholder { color: var(--text-leise); opacity: 1; }

/* Ein Link, der wie ein Knopf aussieht - für den Weg nach Telegram. */
.knopf-link {
  display: inline-block;
  background: var(--akzent);
  color: var(--akzent-text);
  text-decoration: none;
  border-radius: var(--radius-klein);
  padding: .6rem 1.1rem;
  font-weight: 500;
}
.knopf-link:hover { filter: brightness(1.08); }
