/* Ehrenlied-Assistent: ein Bildschirm, mobile-first. Chat mittig, Eingabe unten, Steckbrief rechts (breit) oder als Schublade (schmal). */

body.schlicht .inhalt { display: flex; flex-direction: column; min-height: 0; }
.assistent { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.assistent-laedt { margin: var(--a7) auto; color: var(--text-leise); text-align: center; padding: 0 var(--a4); }

.gespraech { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); min-height: 0; position: relative; }
/* Kopfzeile aus app.css: 60 px plus 1 px Linie (ab 960 px: 72 plus 1) */
.chat-spalte { display: flex; flex-direction: column; min-height: 0; height: calc(100dvh - 61px); }
/* Alle Bedienelemente im Gespräch mindestens 44 px hoch */
.assistent .btn-klein { min-height: 44px; }

/* Leiste mit Steckbrief-Schalter (nur schmal) */
.chat-leiste { display: flex; justify-content: flex-end; padding: var(--a2) var(--a4) 0; }
.steckbrief-schalter { gap: var(--a2); }

/* Chat */
.chat { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: var(--a4) var(--a4) var(--a3); overscroll-behavior: contain; }
.nachrichten { list-style: none; margin: 0 auto; padding: 0; max-width: var(--breite-text); display: flex; flex-direction: column; gap: var(--a3); }
.blase { max-width: 92%; padding: var(--a3) var(--a4); border-radius: var(--radius); line-height: 1.5; animation: auftauchen 220ms ease-out; }
.blase-assistent { align-self: flex-start; background: var(--weiss); border: 1px solid var(--linie); border-bottom-left-radius: var(--a1); box-shadow: var(--schatten-klein); }
.blase-ich { align-self: flex-end; background: var(--tiefblau); color: var(--weiss); border-bottom-right-radius: var(--a1); }
.blase-system { align-self: center; background: transparent; color: var(--text-leise); font-size: .85rem; padding: 0 var(--a3); max-width: 100%; text-align: center; }
.blase-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.blase-text + .blase-text, .blase > * + * { margin-top: var(--a3); }
.blase-bilder { display: flex; flex-wrap: wrap; gap: var(--a2); }
.blase-bilder img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-klein); }
.blase-bilder-zahl { margin: 0; font-size: .85rem; opacity: .8; }
@keyframes auftauchen { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Drei Punkte */
.punkte { display: inline-flex; gap: 5px; padding: var(--a1) 0; }
.punkte i { width: 8px; height: 8px; border-radius: 50%; background: var(--messing); animation: pulsen 1.2s infinite ease-in-out; }
.punkte i:nth-child(2) { animation-delay: .2s; }
.punkte i:nth-child(3) { animation-delay: .4s; }
@keyframes pulsen { 0%, 80%, 100% { opacity: .3; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
.statuszeile { max-width: var(--breite-text); margin: var(--a2) auto 0; color: var(--text-leise); font-size: .9rem; font-style: italic; }
.chat .hinweis { max-width: var(--breite-text); margin: var(--a3) auto 0; }
.chat .hinweis p { margin: 0 0 var(--a2); }

/* Karten (Vorschläge) */
.vorschlaege { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--a2); }
.vorschlag { border: 1px solid var(--linie); border-radius: var(--radius-klein); padding: var(--a3); background: var(--creme); transition: background var(--dauer), border-color var(--dauer); }
.vorschlag-ja { background: var(--ok-hell); border-color: var(--ok); }
.vorschlag-nein { opacity: .55; }
.vorschlag-aendern { background: var(--creme-tief); }
.vorschlag-text { margin: 0 0 var(--a1); font-weight: 600; color: var(--tiefblau); }
.vorschlag-quelle { margin: 0 0 var(--a2); font-size: .8rem; color: var(--text-leise); }
.vorschlag-ergebnis { margin: 0; font-size: .85rem; color: var(--text-leise); }
.vorschlag .btn-gruppe .btn { min-height: 44px; }
.vorschlag textarea { min-height: 60px; margin-bottom: var(--a2); }

/* Stile: waagerecht scrollen, ein Player */
.stile { list-style: none; margin: 0 calc(-1 * var(--a4)); padding: var(--a1) var(--a4); display: flex; gap: var(--a3); overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.stil { flex: 0 0 220px; scroll-snap-align: start; border: 1.5px solid var(--linie); border-radius: var(--radius-klein); padding: var(--a3); background: var(--creme); display: flex; flex-direction: column; }
.stil-spielt { border-color: var(--messing); box-shadow: 0 0 0 3px rgba(185, 139, 58, .18); }
.stil h4 { margin: 0 0 var(--a1); }
.stil p { flex: 1; margin: 0 0 var(--a3); font-size: .9rem; color: var(--text-leise); }
.stil .btn-gruppe { gap: var(--a1); }
.stil .btn { min-height: 44px; padding-left: var(--a3); padding-right: var(--a3); }

/* Kostprobe und Kauf */
.kostprobe { margin: var(--a2) 0 0; }
.refrain { white-space: pre-wrap; font-size: 1.15rem; line-height: 1.6; color: var(--tiefblau); font-weight: 600; margin: 0 0 var(--a3); }
.kauf fieldset { margin-bottom: var(--a4); }
.produkte { display: grid; gap: var(--a2); grid-template-columns: 1fr; }
.produkt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: var(--a3); min-height: 44px; border: 1.5px solid var(--linie); border-radius: var(--radius-klein); background: var(--weiss); font: inherit; color: var(--text); cursor: pointer; transition: border-color var(--dauer), box-shadow var(--dauer); }
.produkt:hover { border-color: var(--tiefblau); }
.produkt-gewaehlt { border-color: var(--messing); box-shadow: 0 0 0 3px rgba(185, 139, 58, .2); background: var(--creme); }
.produkt strong { color: var(--tiefblau); }
.produkt small { color: var(--text-leise); line-height: 1.35; }
.produkt-preis { font-weight: 700; color: var(--messing); }
.extras { display: grid; gap: var(--a2); }
.extra { padding: var(--a2) 0; min-height: 44px; cursor: pointer; }
.extra small { color: var(--text-leise); }
.kauf-fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--a3); padding-top: var(--a3); border-top: 1px solid var(--linie); }
.kauf-summe { font-size: 1.1rem; }
.kauf .fehlertext { font-size: .95rem; color: var(--fehler); margin: 0 0 var(--a3); }
.kauf-leiste { display: flex; align-items: center; justify-content: space-between; gap: var(--a3); margin: 0 var(--a4); padding: var(--a2) var(--a3); background: var(--creme-tief); border-radius: var(--radius-klein); font-size: .9rem; }

/* E-Mail inline */
.email-form { margin: 0; }
.email-titel { margin: 0 0 var(--a1); font-weight: 600; color: var(--tiefblau); }
.email-zeile { display: flex; flex-wrap: wrap; gap: var(--a2); }
.email-zeile input { flex: 1 1 200px; }
.email-fertig { margin: 0; color: var(--ok); font-weight: 600; }
.fehlertext { color: var(--fehler); }

/* Eingabe */
.eingabe { padding: var(--a2) var(--a4) max(var(--a3), env(safe-area-inset-bottom)); background: var(--creme); border-top: 1px solid var(--linie); }
.anhang { list-style: none; margin: 0 auto var(--a2); padding: 0; max-width: var(--breite-text); display: flex; gap: var(--a2); }
.anhang li { position: relative; }
.anhang img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-klein); border: 1px solid var(--linie); display: block; }
/* Trefferfläche 44 px, sichtbar ein 26-px-Kreis */
.anhang button { position: absolute; top: -18px; right: -18px; width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; background: radial-gradient(circle, var(--tiefblau) 12px, transparent 13px); color: var(--weiss); font-size: .8rem; cursor: pointer; }
.eingabe-zeile { display: flex; align-items: flex-end; gap: var(--a2); max-width: var(--breite-text); margin: 0 auto; }
.eingabe-bild { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--linie); background: var(--weiss); color: var(--tiefblau); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.eingabe-bild:hover { border-color: var(--tiefblau); }
.eingabe-bild:disabled { opacity: .5; cursor: not-allowed; }
.eingabe textarea { flex: 1; min-height: 46px; max-height: 160px; resize: none; line-height: 1.4; padding: 11px var(--a3); border-radius: 23px; }
.eingabe-senden { flex: none; width: 46px; height: 46px; padding: 0; border-radius: 50%; }
.visuell-versteckt { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Steckbrief */
.steckbrief { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: var(--a4); box-shadow: var(--schatten-klein); }
.steckbrief-kopf { display: flex; align-items: center; gap: var(--a2); margin-bottom: var(--a2); }
.steckbrief-kopf h2 { font-size: 1.1rem; margin: 0; flex: 1; }
.steckbrief-zu { margin-left: auto; }
.steckbrief .balken { margin-bottom: var(--a3); }
.steckbrief-leer { font-size: .9rem; color: var(--text-leise); margin: 0 0 var(--a3); }
.steckbrief-liste { list-style: none; margin: 0 0 var(--a3); padding: 0; display: grid; gap: var(--a1); }
.steckbrief-liste li { display: grid; grid-template-columns: 22px 1fr; column-gap: var(--a2); align-items: baseline; color: var(--text-leise); font-size: .95rem; }
.steckbrief-liste li.ok { color: var(--tiefblau); }
.haken { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--linie); display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; background: var(--weiss); align-self: center; }
li.ok .haken { background: var(--ok); border-color: var(--ok); color: var(--weiss); }
.steckbrief-wert { grid-column: 2; font-size: .85rem; color: var(--text-leise); }
.steckbrief h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--messing); margin: var(--a3) 0 var(--a1); }
.steckbrief-punkte { margin: 0; padding-left: 1.1em; font-size: .9rem; }
.steckbrief-punkte small { color: var(--text-leise); }

/* Schmal: Steckbrief als Schublade von rechts */
.steckbrief-spalte { position: fixed; inset: 0 0 0 auto; width: min(360px, 88vw); padding: var(--a3); overflow-y: auto; background: var(--creme); transform: translateX(105%); visibility: hidden; transition: transform 240ms ease, visibility 0s 240ms; z-index: 30; box-shadow: -8px 0 32px rgba(31, 42, 68, .18); }
/* visibility nimmt die geschlossene Schublade aus der Tab-Reihenfolge */
.steckbrief-offen .steckbrief-spalte { transform: none; visibility: visible; transition: transform 240ms ease; }
.steckbrief-schleier { position: fixed; inset: 0; border: 0; padding: 0; background: rgba(31, 42, 68, .35); opacity: 0; pointer-events: none; transition: opacity 240ms; z-index: 20; }
.steckbrief-offen .steckbrief-schleier { opacity: 1; pointer-events: auto; }

@media (min-width: 640px) {
  .produkte { grid-template-columns: repeat(3, 1fr); }
  .blase { max-width: 85%; }
}

/* Breit: Steckbrief als Spalte rechts */
@media (min-width: 960px) {
  .gespraech { grid-template-columns: minmax(0, 1fr) 340px; max-width: var(--breite); margin: 0 auto; width: 100%; gap: var(--a4); padding: 0 var(--a4); }
  .chat-spalte { height: calc(100dvh - 73px); }
  .chat-leiste { display: none; }
  .steckbrief-spalte { position: sticky; top: var(--a4); inset: auto; width: auto; height: fit-content; max-height: calc(100dvh - 73px - var(--a5)); overflow-y: auto; padding: var(--a4) 0; transform: none; visibility: visible; transition: none; box-shadow: none; background: transparent; z-index: auto; }
  .steckbrief-zu, .steckbrief-schleier { display: none; }
  .chat { padding-left: 0; padding-right: 0; }
  .eingabe { padding-left: 0; padding-right: 0; }
  .stile { margin: 0; padding: var(--a1) 0; }
  .kauf-leiste { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .blase { animation: none; }
  .punkte i { animation: none; opacity: .8; }
  .steckbrief-spalte, .steckbrief-schleier { transition: none; }
}
